5.21. WDG
5.21.1. Types
Base type |
Type Name |
Brief |
---|---|---|
enum |
WDG Status enum. |
|
enum |
DWWD Reaction on violation. |
|
enum |
DWWD Window size. |
5.21.1.1. enum Wdg_StatusType
Enumerator |
Value |
Description |
---|---|---|
WDG_UNINIT |
Watchdog driver is uninitialized. State on power on before invoking Wdg_Init() |
|
WDG_IDLE |
Watchdog driver is in idle state. Default state when WDG timer regs are not being programmed. |
|
WDG_BUSY |
Watchdog driver is reprogramming the WD to trigger the watchdog. |
Brief: WDG Status enum.
5.21.1.2. enum Wdg_Reaction
Enumerator |
Value |
Description |
---|---|---|
WDG_GENERATE_RESET |
0x00000005U |
Generate Reset. |
WDG_GENERATE_NMI |
0x0000000AU |
Generate NMI. |
Brief: DWWD Reaction on violation.
5.21.1.3. enum Wdg_WindowSize
Enumerator |
Value |
Description |
---|---|---|
WDG_WINDOW_SIZE_100_PERCENT |
0x00000005U |
Window size 100 percent. |
WDG_WINDOW_SIZE_50_PERCENT |
0x00000050U |
Window size 50 percent. |
WDG_WINDOW_SIZE_25_PERCENT |
0x00000500U |
Window size 25 percent. |
WDG_WINDOW_SIZE_12_5_PERCENT |
0x00005000U |
Window size 12_5 percent. |
WDG_WINDOW_SIZE_6_25_PERCENT |
0x00050000U |
Window size 6_25 percent. |
WDG_WINDOW_SIZE_3_125_PERCENT |
0x00500000U |
Window size 3_125 percent. |
Brief: DWWD Window size.
5.21.2. Structures
Name |
Brief |
---|---|
Mode info type. |
|
WDG config structure. |
|
WDG configuration register readback data structure. |
5.21.3. Defines
Name |
Brief |
---|---|
WDG_SW_MAJOR_VERSION |
Driver Implementation Major Version. |
WDG_SW_MINOR_VERSION |
Driver Implementation Minor Version. |
WDG_SW_PATCH_VERSION |
Driver Implementation Patch Version. |
WDG_AR_RELEASE_MAJOR_VERSION |
AUTOSAR Major version specification implemented by WDG Driver. |
WDG_AR_RELEASE_MINOR_VERSION |
AUTOSAR Minor version specification implemented by WDG Driver. |
WDG_AR_RELEASE_REVISION_VERSION |
AUTOSAR Patch version specification implemented by WDG Driver. |
WDG_VENDOR_ID |
Texas Instruments Vendor ID. |
WDG_MODULE_ID |
WDG Driver Module ID. |
WDG_INSTANCE_ID |
WDG Driver Instance ID. |
WDG_E_DRIVER_STATE |
ERROR:Invalid driver state. |
WDG_E_PARAM_MODE |
ERROR:Invalid mode param. |
WDG_E_PARAM_CONFIG |
ERROR:Invalid config param. |
WDG_E_PARAM_TIMEOUT |
ERROR:Invalid timeout value. |
WDG_E_PARAM_POINTER |
ERROR:Invalid NULL ptr param. |
WDG_E_INIT_FAILED |
ERROR:Invalid Configuration set selection. |
WDG_API_INIT |
Wdg_Init() |
WDG_API_SET_MODE |
Wdg_SetMode() |
WDG_SET_TRIGGER_CONDITION |
Wdg_SetTriggerCondition() |
WDG_API_GET_VERSION_INFO |
Wdg_GetVersionInfo() |
WDG_API_TRIGGER |
Wdg_Trigger() |
WDG_API_REGISTER_READBACK |
Wdg_RegisterReadback() |
5.21.4. Functions
Return type |
Function Name |
Brief |
---|---|---|
void |
Wdg_GetVersionInfo(Std_VersionInfoType * versioninfo) |
This service returns the version information of this module. |
void |
Wdg_Init(const Wdg_ConfigType * ConfigPtr) |
This service initializes the WDG driver. |
Std_ReturnType |
Wdg_SetMode(WdgIf_ModeType Mode) |
Switches the watchdog into the mode Mode. |
void |
Wdg_SetTriggerCondition(uint16 timeout) |
Sets the timeout value for the trigger counter. |
void |
Wdg_Trigger(void ) |
This function triggers the servicing of the watchdog. |
Std_ReturnType |
Wdg_RegisterReadback(Wdg_RegisterReadbackType * RegisterReadbackPtr) |
This method is Wdg_RegisterReadback Api. |
5.21.4.1. function Wdg_GetVersionInfo
void Wdg_GetVersionInfo(
Std_VersionInfoType * versioninfo
)
Brief: This service returns the version information of this module.
Service ID[hex] : 0x04U
Sync/Async : Synchronous
Reentrancy : Reentrant
Parameters:
versioninfo - Pointer to where to store the version information of this module.
Returns:
None
Return: None
5.21.4.2. function Wdg_Init
void Wdg_Init(
const Wdg_ConfigType * ConfigPtr
)
Brief: This service initializes the WDG driver.
Service ID[hex] : 0x0
Sync/Async : Synchronous
Reentrancy : Non Reentrant
Parameters:
ConfigPtr - Pointer to WDG driver configuration set.
Returns:
None
Return: None
5.21.4.3. function Wdg_SetMode
Std_ReturnType Wdg_SetMode(
WdgIf_ModeType Mode
)
Brief: Switches the watchdog into the mode Mode.
Service ID[hex] : 0x01
Sync/Async : Synchronous
Reentrancy : Non Reentrant
Parameters:
Mode - One of the following statically configured modes
WDGIF_OFF_MODE
WDGIF_SLOW_MODE
WDGIF_FAST_MODE
Returns:
E_OK - Set Mode success
E_NOT_OK - Set Mode failed
Return: Std_ReturnType
5.21.4.4. function Wdg_SetTriggerCondition
void Wdg_SetTriggerCondition(
uint16 timeout
)
Brief: Sets the timeout value for the trigger counter.
Service ID[hex] : 0x03
Sync/Async : Synchronous
Reentrancy : Non Reentrant
Parameters:
timeout - Timeout value (milliseconds) for setting the trigger counter
Returns:
None
Return: None
5.21.4.5. function Wdg_Trigger
void Wdg_Trigger(
void
)
Brief: This function triggers the servicing of the watchdog.
This function is the watchdog trigger and is invoked from WdgIsr
Service ID[hex] : N/A
Sync/Async : Synchronous
Reentrancy : Non Reentrant
Parameters:
None
Returns:
None
Return: None
5.21.4.6. function Wdg_RegisterReadback
Std_ReturnType Wdg_RegisterReadback(
Wdg_RegisterReadbackType * RegisterReadbackPtr
)
Brief: This method is Wdg_RegisterReadback Api.
Function could be called from from task level
Service ID[hex] : N/A
Sync/Async : Synchronous
Reentrancy : Non Reentrant
Parameters:
RegisterReadbackPtr - Register readback pointer
Returns:
E_OK - Register readback success
E_NOT_OK - Register readback failed
Return: Std_ReturnType