Watchdog Overview
Introduction
A watchdog, also called a watchdog timer, is a hardware timing device. If an error occurs in the main program of the system and fails to reset the watchdog timer, the watchdog timer sends a reset signal to restore the system to a normal state.
Available APIs
Table 1 Watchdog APIs
Capability
|
Function
|
Description
|
Open/Close
|
WatchdogOpen
|
Opens a watchdog.
|
WatchdogClose
|
Closes a watchdog.
|
Start/Stop
|
WatchdogStart
|
Starts a watchdog.
|
WatchdogStop
|
Stops a watchdog.
|
Timeout duration
|
WatchdogSetTimeout
|
Sets the watchdog timeout duration.
|
WatchdogGetTimeout
|
Obtains the watchdog timeout duration.
|
Status
|
WatchdogGetStatus
|
Obtains the watchdog status.
|
Feeding
|
WatchdogFeed
|
Feeds a watchdog, or resets a watchdog timer.
|
NOTE:
All watchdog functions provided in this document can be called only in kernel mode.