This module contains APIs to program and use the WDT.
|
file | watchdog_rti.h |
| This file contains the prototype of WDT driver APIs.
|
|
◆ WATCHDOG_CLEAR_STATUS
#define WATCHDOG_CLEAR_STATUS (0xFFU) |
macro to clear the status.
◆ Watchdog_Handle
◆ Watchdog_Callback
typedef void(* Watchdog_Callback) (Watchdog_Handle handle, void *callbackFxnArgs) |
Watchdog callback pointer.
This is the typedef for the function pointer that will allow a callback function to be specified in the Watchdog_Params structure. The function will take Watchdog_Handle of the Watchdog and user argument as arguments.
◆ Watchdog_DebugMode
Watchdog debug stall settings.
This enumeration defines the debug stall modes for the Watchdog. On some targets, the Watchdog timer will continue to count down while a debugging session is halted. To avoid unwanted resets, the Watchdog can be set to stall while the processor is stopped by the debugger.
Enumerator |
---|
Watchdog_DEBUG_STALL_ON | Watchdog will be stalled at breakpoints
|
Watchdog_DEBUG_STALL_OFF | Watchdog will keep running at breakpoints
|
◆ Watchdog_ResetMode
Watchdog reset mode settings.
This enumeration defines the reset modes for the Watchdog. The Watchdog can be configured to either generate a reset upon timeout or simply produce a periodic interrupt.
Enumerator |
---|
Watchdog_RESET_OFF | Timeouts generate NMI interrupt only
|
Watchdog_RESET_ON | Generates reset after timeout
|
◆ Watchdog_WindowSize
Watchdog Window Size settings.
This enumeration defines the size of the digital watchdog window size.
Enumerator |
---|
Watchdog_WINDOW_100_PERCENT | Window size is 100%
|
Watchdog_WINDOW_50_PERCENT | Window size is 50%
|
Watchdog_WINDOW_25_PERCENT | Window size is 25%
|
Watchdog_WINDOW_12_5_PERCENT | Window size is 12.5%
|
Watchdog_WINDOW_6_25_PERCENT | Window size is 6.25%
|
Watchdog_WINDOW_3_125_PERCENT | Window size is 3.125%
|
◆ Watchdog_DriverState
Watchdog Driver Status.
The enumeration describes the status of the Watchdog Driver Instance
Enumerator |
---|
Watchdog_DriverState_UNINIT | Driver is uninitialized.
|
Watchdog_DriverState_OPERATIONAL | Driver is operational.
|
◆ Watchdog_setReaction()
void Watchdog_setReaction |
( |
Watchdog_Handle |
handle, |
|
|
uint32_t |
dwwdReaction |
|
) |
| |
Set DWWD reaction.
- Parameters
-
handle | Watchdog Handle |
dwwdReaction | DWWD reaction for violation/expiration. Values given by macro |
- Note
- DWWD need to be serviced if Reaction is changed when DWWD is enabled and Window is Open,to take immediate effect. If not serviced, DWWD will generated previously configured Reaction irrespective of current configuration.
- If DWWD is enabled and Window is Close then any change in Reaction will take immediate effect. DWWD need not to be serviced in this case.
◆ Watchdog_getWindowSize()
Get DWWD Window Size.
- Parameters
-
- Returns
- Watchdog Window size.
◆ Watchdog_setWindowSize()
void Watchdog_setWindowSize |
( |
Watchdog_Handle |
handle, |
|
|
uint32_t |
dwwdWindowSize |
|
) |
| |
Set DWWD Window Size.
- Parameters
-
handle | Watchdog Handle |
dwwdWindowSize | DWWD Window Size. Values given by macro |
- Note
- DWWD need to be serviced if Window Size is changed when DWWD is enabled and Window is Open,to take immediate effect. If not serviced, DWWD Window Size will not be changed irrespective of current configuration.
- If DWWD is enabled and Window is Close then any change in Window Size will take immediate effect. DWWD need not to be serviced in this case.
◆ Watchdog_isClosedWindow()
The function checks for Closed Window.
- Parameters
-
- Returns
- closed window status.
◆ Watchdog_clear()
The function clears the Watchdog to prevent a reset signal from being generated if the module is in Watchdog_RESET_ON reset mode.
- Parameters
-
◆ Watchdog_close()
The function closes a Watchdog peripheral specified by the Watchdog handle. It stops (holds) the Watchdog counting on applicable platforms.
- Parameters
-
◆ Watchdog_init()
void Watchdog_init |
( |
void |
| ) |
|
The functions initializes the Watchdog module.
◆ Watchdog_deinit()
void Watchdog_deinit |
( |
void |
| ) |
|
The functions de-initializes the Watchdog module.
◆ Watchdog_open()
Opens a Watchdog object with the index and parameters specified, and returns a Watchdog_Handle.
- Parameters
-
index | Logical peripheral number for the Watchdog indexed into the Watchdog_Config table |
params | Pointer to an parameter block, if NULL it will use default values. |
- Returns
- A Watchdog_Handle on success or a NULL on an error or if it has been opened already.
◆ Watchdog_paramsInit()
Function to set default values of Watchdog_Params in params.
- Parameters
-
params | [IN] pointer to the structure to be initialized |