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
Name | Description |
---|---|
WDT_Enable | Enables the WDT peripheral |
WDT_Disable | Disables the WDT peripheral |
WDT_IsEnabled |
Returns true if the WDT is enabled |
WDT_WindowEnable | Enables the WDT window mode |
WDT_WindowDisable | Disables the WDT window mode |
WDT_IsWindowEnabled | Checks if the window mode of the WDT is enabled. |
WDT_Clear | Restarts the WDT counter |