What happens if I trigger an NVIC reset from the WDT ISR? The product spec states:
See Reset on page 69 for more information about reset sources. If the watchdog is configured to generate an interrupt on the TIMEOUT event, the watchdog reset will be postponed with two 32.768 kHz clock cycles after the TIMEOUT event has been generated. Once the TIMEOUT event has been generated, the impending watchdog reset will always be effectuated.
Does the NVIC reset clear the TIMEOUT event? Or will we the WDT end up resetting the device a second time?
I'm trying to improve our logging for crashes, but it's a bit tricky because our logging touches the filesystem, and doing anything with the filesystem after something has went wrong enough to cause the WDT to trip can corrupt the filesystem. For other less severe crashes I'm setting saving some context in some no init RAM and logging it after an NVIC reset. However, for WDT reset's I'm not sure this will work as the RAM might be corrupted.
Thanks,
Josh