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.

RM44L520: FEE and watchdog

Part Number: RM44L520
Other Parts Discussed in Thread: HALCOGEN

Good day, colleagues,

I have a question from my customer, description below:

 

I use RM44L520 safety MCU.

It seems as impossible to use FEE (Flash EEPROM Emulation) module if watchdog is configured to fire at less than 8 s (maximum "Sector/Bank erase time, EEPROM Emulation" from RM44L520 datasheet, chapter 6.10.6 Data Flash).

For my application, I should use 2.5 ms watchdog fire time. But there is no user callback to service watchdog in TI_FeeInternal_PollFlashStatus() function, so call of TI_Fee_Format() will reset MCU.

What can I do with it without changing sources for FEE module generated by HalCoGen?

Thank you,

Daria

  • Hi Daria,

    You can suspend the flash program/erase operation using the FAPI_SUSPEND_FSM macro of the F021 API, then call Fapi_ProgramResume or  Fapi_EraseResume later to resume the flash operation.

    You need to allow the erase operation to execute for at least 2.5ms before suspending, otherwise the erase state-machine will not progress, and the erase will not complete.

  • Just check. My previous reply was lost on e2e.ti.com site after pressing "Reply" button,

  • So, retry #2 to post an answer on this site.

    Hello!

    Thanks for answer.

    I want to clarify the answer.

    As I see in source codes of ti_fee_format.c:

    1. the call of TI_Fee_Format() from my code will call of Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, ...)

    2. Fapi_issueAsyncCommandWithAddress() will return immediately. Note that maximum time to sector erase is 8 s.

    3. next, in TI_Fee_Format() is call of TI_FeeInternal_PollFlashStatus() which will wait for end previous operation (sector erase, 8 s maximum)

    4. at call of TI_FeeInternal_PollFlashStatus(), MCU will reset by WDT.

    At what time I should call of FAPI_SUSPEND_FSM? Before the call of TI_Fee_Format()?

    Regards, Vitaliy

  • The 8 second flash erase time only happens at extreme worst case: near the 100K write erase cycle limit, and at cold temperature.

    TI_Fee_Format(0 is used to format all the virtually sectors. You will lose all the data in FEE after calling this function. This function should be called only if you want to reconfigure the Data Blocks/Virtual Sectors or detect a serious error condition.

    FAPI_SUSPEND_FSM is called to free CPU up for feeding the watchdog. 

  • Hi.

    Isn't TI_FeeInternal_PollFlashStatus() called regularly after start of erasing sector?

    For example, the calls:TI_Fee_MainFunction() -> TI_FeeInternal_FindNextVirtualSector() -> TI_FeeInternal_FindReadyForEraseVirtualSector() -> Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, ...) and then call of TI_FeeInternal_PollFlashStatus() which should wait for finish job of erasing sector.

  • It is called once after the sector erase command is issued.

  • And most probably may get more than 2.5 ms -> MCU will reset by WDT

  • The erase operation has to execute for at least 2.5ms before suspending, otherwise the erase state-machine will not progress, and the erase will not complete. If 2.5ms watchdog is used, the watchdog may not be got serviced on time.