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.

TMS320F2800157: Servicing interrupts while erasing flash sector

Part Number: TMS320F2800157

Hello,

As the title states, i am trying to service ISR whilst flash is being erased and there is currently no workaround.

My setup:

I have cpu timer 1 setup to trigger every 100us and am toggling a pin in ISR. Every second i am erasing a (fully written) flash sector and observing pin not toggling for a couple of ms when flash is being erased.

What i have done:

- i put all my functions into ram: the functions that call Flash API (all of subsequent layers, up to main), FAPI itself and also the timer ISR. I check these functions are infact in ram with memory viewer and i can also confirm that they are being executed from ram because PC is pointing to ram when breakpointing ISR.

- i am not accesing the sector that is being erased in ISR - infact all i am doing in ISR is toggling the pin by directly writting to GPIO data out register.

- i have also noticed that Fapi_issueAsyncCommandWithAddress function is blocking type. CPU stays in this function for the duration of couple of ms and during this time, pin is not toggling. Fapi_checkFsmForReady should check if FSM has finished flash erase and i would expect cpu to quickly come out of issueAsyncCommand function and then loop while checking FsmForReady function (and being able to execute other code). But this is not happening, FsmForReady function is checked once and passes. 

Questions:

Does something else need to be configured for this to work? Can flash API be interrupted on this chip?