Sending reset reason when Watchdog is triggered

Is there a way for us to send a reset reason where the hardware watchdog triggered the event?

I see that there’s an reset reason sent when it is due to DFU.

The hardware watchdog can’t set the reset reason before reset. The reason is that setting the reset reason requires catching the interrupt and running code to set the reason in retained memory. However, since the whole purpose of the hardware watchdog is to pull the hardware reset line when code is not executing properly, it can’t set the reset reason before reboot.

It could, however, at setup() time, after reset, query the AM1805 to see if the WDT fired. This would be able to differentiate between actual pin reset and WDT triggering a pin reset. The Tracker Edge code does not do this, but it probably could and is a reasonable feature request.

1 Like

I can put in on the list. The RTC was managed by the device OS in the past so that the reset reason could be directly integrated into the diagnostics message. We’d have to check into having this information fed from the application on the event of an RTC reset.

Not super critical since the watchdog is working as expected but if you know a device is “crashing” over time, it means something for a product deployed remotely. :smiley: