Showing results for 
Search instead for 
Did you mean: 

Is it possible to reset by watchdog in hardfault?

Posted on August 06, 2014 at 09:13


My system happened to be in hardfault state.


In case of hardfault state, Is it possible to reset by watchdog?

Thanks ahead


Associate II
Posted on August 06, 2014 at 09:38

Hello Kevin,

try to solve the hardfault, as this is not a regular operating condition and normally this is solvable. Most probably the hard fault is an escalated issue based on a nullpointer dereference, division by zero etc.

I expect the IWDG and WWDG peripherals to work also when the CPU is in Interrupt or HardFault state, as the HardFault only applies to the ARM Cortex part of the MCU.



Associate II
Posted on August 06, 2014 at 16:19

Both watchdog timers remain active when a fault occurs.  Remember the purpose of a watchdog is to ensure the CPU does not hang in a loop, which can occur in a fault just as easily as an application.  If you do any long term activity in a fault then you have to reload the watchdogs at the appropriate points.

In my applications I drive a flashing LED to signal a hard fault that can't be recovered.  The LED timer routine periodically resets the watchdogs while it times the LED status display.

  Jack Peacock