Capture watchdog reset

I am using the watchdog defined in stm32f2xx_iwdg.c - seems to work well. However, I would like to capture the number of times my product has reset due to a watchdog time out. The product may be reset “manually” as well so not every reset can be counted as a watchdog reset.

Ideally, I would like to capture the IWDG_ reset before the actual system.reset happens (so I can set a retained variable). Is this at all possible?

1 Like