ModularSensors > Classes > extendedWatchDogSAMD
ModularSensors > Modules > Primary Object Classes > extendedWatchDogSAMD


extendedWatchDogSAMD class

The extendedWatchDogSAMD class uses the early warning interrupt to of the built in SAMD watchdog to extend the allowable time between resets of the watchdog's clock up to multiple minute timescales.

Code for this is taken from the Adafruit SleepyDog library: https://github.com/adafruit/Adafruit_SleepyDog/ and this library: https://github.com/javos65/WDTZero

Public static variables

static uint32_t _barksUntilReset
The number of times the pre-reset interrupt is allowed to fire before the watchdog reset is allowed.

Constructors, destructors, conversion operators

extendedWatchDogSAMD()
Construct a new extended watch dog object for SAMD processors.
~extendedWatchDogSAMD()
Destroy the extended watch dog object for SAMD processors.

Public functions

void setupWatchDog(uint32_t resetTime_s)
One-time initialization of watchdog timer.
void enableWatchDog()
Enable the watchdog.
void disableWatchDog()
Disable the watchdog.
void resetWatchDog()
Reset the watchdog's clock to prevent the board from resetting.

Function documentation

voidsetupWatchDog(uint32_t resetTime_s)

One-time initialization of watchdog timer.

Parameters
resetTime_s The length of time in seconds between resets of the watchdog before the entire board is reset.