3.2.24 Watchdog Timer (WDT)

The particular device family offers several built-in capabilities that allow user applications to select the best balance of performance and low-power consumption. The WDT can be used to detect system software malfunctions by resetting the device if the WDT is not cleared periodically in software. The WDT can be configured in Window mode or Non-Window mode. Various WDT time-out periods can be selected using the WDT postscaler. The WDT can also be used to wake the device from Sleep or Idle mode (Power Save mode).

Using The Library

The Watchdog Timer has the following features:

• Independent Run and Sleep Mode Counters

• May Use Alternate Clock Sources and Postscalers for Run Mode Counter

• Up to 32 Configurable Time-Out Periods

• Independent 5-bit Postscalers for Run and Sleep Mode Counters

• Hardware and Software Enable

• Windowed WDT Option - Four Window Sizes Controlled by Software Configuration Bits

Library Interface

Watchdog Timer peripheral library provides the following interfaces:

Functions

NameDescription
WDT_EnableEnables the WDT peripheral
WDT_DisableDisables the WDT peripheral
WDT_IsEnabled

Returns true if the WDT is enabled

WDT_WindowEnableEnables the WDT window mode
WDT_WindowDisableDisables the WDT window mode
WDT_IsWindowEnabledChecks if the window mode of the WDT is enabled.
WDT_ClearRestarts the WDT counter