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.

How to identify a watchdog reset on the TM4C1294 microcontroller from for example, a power-on reset ?

I can reset the TM4C1294  microcontroller by watchdog. But how after the reset to identify that it was caused by watchdog, not by other sources. Are there any built-in microcontroller features ? Or should I  use watchdog interrupt and store some flag in some non-volatile memory ? Can built-in microcontroller RAM survive during watchdog reset ? Or should I use some other built-in memory (flash etc.) ?

  • John Doe52 said:
    But how after the reset to identify that it was caused by watchdog, not by other sources. Are there any built-in microcontroller features ?

    The TivaWare function SysCtlResetCauseGet returns the reason for a reset, by reading the Reset Cause (RESC) register.

    Note that because the reset reasons are sticky until either cleared by software or a power-on reset, multiple reset reasons may be returned if multiple resets have occurred (call SysCtlResetCauseClear to clear the reset reasons).

  • Hello John,

    While the in built RAM will be OK after reset, it is best not to trust the same as it may be overwritten by initialization data. Instead you may want to switch to battery backed RAM in Hibernate as it is not affected by the Main reset if Hibernate module is enabled for a wakeup source or switch to EEPROM for long term storage,

    Regards
    Amit