# Sending reset reason when Watchdog is triggered

**URL:** <https://community.particle.io/t/sending-reset-reason-when-watchdog-is-triggered/58270>\
**Category:** Edge Systems\
**Created:** [November 1, 2020, 2:44am UTC](https://community.particle.io/t/sending-reset-reason-when-watchdog-is-triggered/58270 "2020-11-01T02:44:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [November 1, 2020, 2:44am UTC](https://community.particle.io/t/sending-reset-reason-when-watchdog-is-triggered/58270/1 "2020-11-01T02:44:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [November 2, 2020, 1:40pm UTC](https://community.particle.io/t/sending-reset-reason-when-watchdog-is-triggered/58270/2 "2020-11-02T13:40:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![eberseth](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/eberseth/32/25386_2.png) [@eberseth](https://community.particle.io/u/eberseth)\
**Post date:** [November 2, 2020, 7:33pm UTC](https://community.particle.io/t/sending-reset-reason-when-watchdog-is-triggered/58270/3 "2020-11-02T19:33:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [November 3, 2020, 12:48am UTC](https://community.particle.io/t/sending-reset-reason-when-watchdog-is-triggered/58270/4 "2020-11-03T00:48:24Z")

</div>

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. 😃
