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.

CCS/TMS570LS3137: Tracking PORST occurrence by SYSESR

Expert 1995 points
Part Number: TMS570LS3137

Tool/software: Code Composer Studio

Hello,

According to the Technical Reference Manual (SPNU499C), any PORST occurrence is reflected on the SYSES register (bit 15). Well, during a debugging session and even with a SYSES different from zero, if I press the PORST button, the console returns the following message and the status of the debug is of course as disconnected :

Dap: Error: (Error -242 @ 0x0) A router subpath could not be accessed. The board configuration file is probably incorrect. (Emulation package 6.0.576.0) 
CortexR4: Error: (Error -2063 @ 0x0) Unable to reset device. Power-cycle the board. If error persists, confirm configuration and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.576.0) 
CortexR4: Error: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.576.0) 
CortexR4: Unable to determine target status after 20 attempts
CortexR4: Failed to remove the debug state from the target before disconnecting.  There may still be breakpoint op-codes embedded in program memory.  It is recommended that you reset the emulator before you connect and reload your program before you continue debugging

When I reconnect (ctrl+Alt+C) the SYSES register is zero. I expected 0x8000 or more instead.

How can I verify the bit 15 of the SYSES is set actually by PORST?

Regards,

-Marco

  • Hello Marco,

    There is probably some test code located in flash which checks the ESR and clear the bit in ESR. Please erase your flash, do the test, and use memory browser window to read the ESR value. I just did a test, and the value is ESR is 0x8008.
  • I execute the test by reading the memory and nothing is changed. I forgot to mention that after the re-connection it hangs on the for-loop of abort (file exit.c). I do not know if it is related to the issue.

    The only way so far to get that result is to comment out the reset of ESR by SYS_EXCEPTION = 0xFFFFU. It works even if the reset occurs before the debugging of the line:

    if ((SYS_EXCEPTION & POWERON_RESET) != 0U)

  • Hello Marco,

    I guess the code in the flash read the SYSESR register and the bit 15 is cleared. Please erase the whole flash and leave it blank, PORRST thd edevice, and reconnect the MCU through the JTAG, then check the SYSESR using CCS memory broswer. The bit 15 of SYSESR should be set.