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.

TMS320F28377D: Flash API works on initial run, but not after CPU reset

Part Number: TMS320F28377D
Other Parts Discussed in Thread: C2000WARE

Hello,

I am trying to use the flash API to program some data in a flash sector. Everything works fine on the initial run after loading the program with CCS, but if I do a CPU reset, the flash API function Fapi_issueProgrammingCommand() returns success when calling it, but when I check the FSM status, I get a value of 48, which means bits CSTAT and INVDAT are set. This indicates that the function attempted to program a “1” where a “0” was already present, which is clearly not the case as I can see in the memory browser. I found a post with a similar issue (Compiler/TMS320F28075: Flash API works on initial run, but not after reset. - C2000 microcontrollers forum - C2000Tm︎ microcontrollers - TI E2E support forums), but their solution (reinitializing the Flash API just before calling the erase function) did not work in my case. I suspect the issue is related to what CCS does when loading the program or reset the CPU. I checked the GEL file for my device, but I'm not absolutely sure what each of these routines do. Any idea on what might be causing the issue I have.

Thank you,

Juan