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.

TMS320F280021: Standalone Code not running without ERTM

Part Number: TMS320F280021

Hi all,

we have a problem using our designed firmware on a custom standalone board. Our firmware powers up correctly using the JTAG debug emulator, in which we can step through our code. 

We are currently using DCSM, so the DCSM passwords and secure zones are set in the OTP. After unlocking the OTP we can flash the chip every time. That is not an issue.

Our code uses several perpiherals such as ECAP, EPWM, ADC_C and GPIOs, on which each peripheral clock is set in the SysCtrl.c. We use the internal RC oscillator INT_OSC2. Watchdog is disabled at boot as done in the codestart branch, and set later on at startup. Additionally, some peripherals use interrupts. We have a designated Flash Sector used solely for virtual EEPROM using FAPI, which is sporadically written during runtime. An earlier firmware version runs perfectly on the standalone board. We made some minor changes in the code and experienced problems.

After flashing on our custom board, the code runs and can write to the flash during runtime. After reset nothing works anymore.

We have isolated the problem to ERTM, which was integrated into the firmware in the previous version. In the new firmware version it was omitted, resulting in the code not working at all in standalone after reset or new power up after the first write to the flash virtual EEPROM sector (directly after startup). Write is performed 64bit aligned and it works correctly when debugging, so writing to flash should not be the issue. As mentioned, it worked in the previous version. After reintroducing ERTM into the code, it also works in standalone mode in the newer version.


My question is, why does ERTM effect standalone run if it is solely for debug purposes, or am I missing the point? Or is the issue not related to ERTM? In that case, why did reintroducing ERTM solve the problem?