This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LC4357-EP: ESM2 error while debugging.

Part Number: TMS570LC4357-EP

Tool/software:

Hello,

What is the issue if esm2 ISR is getting executed immediately after flashing the code during debugging.

PS:ESM2 status bit value is 0x0080

  • Hi Deepak,

    1. Root Cause:
    • The error is caused by speculative instruction fetches by the CPU
    • CPU may attempt to read from a random flash address/ RAM address, generating an uncorrectable ECC error.
    1. Behavior:
    • The CPU discards the speculatively fetched data and doesn't generate an abort
    • However, the memory read still triggers the CPU event signal that tells the ESM there was an uncorrectable flash error
    • This results in the ESM2 error being triggered
    1. Solution Options:

    2. MPU Configuration:

      • You can prevent this error by configuring the MPU to set unused flash regions as "No Access"
      • When the MPU blocks access to unused regions, the CPU can't perform speculative fetches from those areas, preventing the ESM2 error
    3. ECC Programming:

      • Ensure proper ECC values are programmed for all flash memory spaces that might be accessed
      • The ECC values for all flash memory space (Flash banks 0 through 6) must be properly programmed before program/data can be read
    4. Important Notes:

    • This is a known behavior related to the CPU's speculative fetch mechanism
    • The error occurs because the speculative fetch attempts to access flash regions with invalid or unprogrammed ECC values
    • Group 2 errors (like this one) will always trigger the nERROR pin as they cannot be disabled.

    --
    Thanks & regards,
    Jagadish.