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.

Loading program doesn't clear flags

Hello,

Sorry to be asking this here, but this problem is killing me. Whenever I force an EMS3 error (for test purposes), whenever I stop the debug operation and start it again (loading a new program), I noticed that it doesn't clear the error flags. And I am almost certain that CCS is capable of doing this, at least in debug mode.

Am I crazy for thinking this? Maybe I'm missing an option in the in the configuration.

  • Pablo,

    Some of these ESM flags are cleared only on a power on reset. Power on reset also resets the debug logic, so CCS cannot be *connected* to the target when you issue a power on reset (or it will drop the connection).

    Recently we added an option to issue a power on reset through the 20 pin debug cable but this signal has to be connected from the cable to the nPORRST pin on the device, and you need to disconnect all the cores and select "Reset Board" from the reset menu to issue it.

    You could also try adding some code to the GEL OnReset() hook that explicitly writes to the ESM registers and clears the flags.

    Of course, the only way to make your app. self-contained would be to add code that clears the ESM registers and does something appropriate as a result (application dependent) ... but the above can be crutches for development purposes.