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.

TMS320F28069: Adding a time out mechanism to the API Flash2806x_Erase()

Part Number: TMS320F28069

Hello,

Could you please advise how to add a time out mechanism to the API Flash2806x_Erase() ?

Reading (Flash2806x_API_Quickstart.pdf), my idea would be counting timer interrupts, but it would not useful. The API sometimes disable the interrupt. It would be harmful for the flash memory cells to abort the flash memory operation.


Let me share the backgound.

My customer experienced a phenomenon that the flash API Flash2806x_Erase() didn't return when its arguments were not correct.
Now they are doing a workarounds.

Of course they will correct ther arguments. At the same time, they asked me ideas to add a time out mechanism for the API Flash2806x_Erase().

Notes:

  • The customer arguments were no good for their application code, but in-range for the F28069 hardeware.
  • They called the Flash2806x_Erase() from RAM.

  • Nambu,

    Flash API disables maskable interrupts (by setting INTM) only when timing critical algorithms are executed. So, if timer fires a interrupt in middle of flash erase timing critical operation, it would be left pending till timing algorithm is complete. Once complete, CPU will receive the interrupt. So, you shouldn't be missing timer interrupts unless timer interrupts within 5ms etc. What is the frequency of timer interrupts? Also, what is your timeout condition?

    I would setup my timer to interrupt every 2 - 3 secs.

    Regards,
    Manoj
  • Manoj,
    Thank you very much!