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.

TMS320F28388D: Interrupt_Illegal OperationHandler occurs when writing data to flash using TI FlashApi

Part Number: TMS320F28388D

Tool/software:

I'm using the F28388D and have implemented a FlashLog system using F021 Flash API.
When I run the application right after flashing, the system works fine and logs can be written to Flash.
However, if I perform a device reset, restart from CCS, the system crashes when calling Fapi_issueProgrammingCommand() and triggers an Illegal Operation ISR.

Boom Problem Summary:
Flash write works after flashing via CCS

Crash (Illegal Operation) happens after reset restart or power cycle

Crash location is inside Fapi_issueProgrammingCommand()

White check mark My setup:

I already added #pragma CODE_SECTION(..., ".TI.ramfunc") to all Flash-related functions

.TI.ramfunc is properly placed in RAM via linker

I call memcpy(RamfuncsRunStart, RamfuncsLoadStart, RamfuncsLoadSize); in main()

I call InitFlash() and Fapi_initializeAPI(...) and Fapi_setActiveFlashBank(...) before using Flash API