Hardware watchdog

Since 5.3.0:

Starting with Device OS 5.3.0, Gen 3 devices based on the nRF52840 (Boron, B Series SoM, Argon, Tracker SoM) and RTL827x (P2, Photon 2, Tracker M) can use the hardware watchdog built into the MCU. This is highly effective at resetting based on conditions that cause user or system firmware to freeze when in normal operating mode. It is only operational in normal operations mode, not DFU or safe mode.

Typically you start it from setup(). Since it does not run during firmware updates, it's safe to use a relatively short timeout, however you probably don't want to set it lower than 30 seconds to prevent unintended resets.

The watchdog is automatically stopped before sleep mode and when reset, so it will not adversely affect safe mode, DFU mode, or OTA upgrades of Device OS.