TMS320F28P550SJ: Help: Change flash_api EraseSector() to a non blocking function

Part Number: TMS320F28P550SJ

Tool/software:

Hello,

I have successfully integrated the flash_api Erase Sector() function in my application. However, I would like to make this function non blocking.

right now, it waits in: 

while (Fapi_checkFsmForReady() != Fapi_Status_FsmReady){}
until FSM is done with erase sector operation.
Is there a way to change this?
Thank you
  • Hi Mohamed,

    To make the call non-blocking, you can remove that while loop. Please note, however, that you cannot read or execute code from a flash bank that is currently being programmed or erased, and if wanting to perform another flash operation you will need to make sure the FSM is ready and check for any errors from the previous erase sector command before issuing the command.

    Best,

    Alex