ADuCM302x Device Drivers API Reference Manual  Release 3.1.2.0
WDT Driver

Watchdog Timer (WDT) Driver. More...

Modules

 Static Configuration
 

Enumerations

enum  ADI_WDT_RESULT {
  ADI_WDT_SUCCESS,
  ADI_WDT_FAILURE_LOCKED
}
 

Functions

ADI_WDT_RESULT adi_wdt_Enable (bool const bEnable, ADI_CALLBACK const pfCallback)
 WDT Enable. More...
 
void adi_wdt_Kick (void)
 WDT Reset. More...
 
void adi_wdt_GetCount (uint16_t *const pCurCount)
 WDT Read Count. More...
 

Detailed Description

Watchdog Timer (WDT) Driver.

The watchdog timer driver allows the user to enable the timer with the static configuration parameters, reset the timer, and read the timer count. No interface is provided for setting the timer parameters are runtime since the WDT may only be configured once for the program lifetime. The timer is disabled by default by the ADuCM4x50 boot kernel.

Note
The application must include drivers/wdt/adi_wdt.h to use this driver

Enumeration Type Documentation

◆ ADI_WDT_RESULT

Watchdog Device Error Codes.

Enumerator
ADI_WDT_SUCCESS 

Generic success.

ADI_WDT_FAILURE_LOCKED 

Timer is locked.

Definition at line 60 of file adi_wdt.h.

Function Documentation

◆ adi_wdt_Enable()

ADI_WDT_RESULT adi_wdt_Enable ( bool const  bEnable,
ADI_CALLBACK const  pfCallback 
)

WDT Enable.

Enables/disables the WDT with the paramters supplied in adi_wdt_config.h

Parameters
[in]bEnable: True to turn WDT on, false to turn it off
[in]pfCallback: If interrupt mode is enabled, specify application callback function, otherwise simply pass NULL for the argument.
Returns
ADI_WDT_RESULT

Definition at line 115 of file adi_wdt.c.

◆ adi_wdt_Kick()

void adi_wdt_Kick ( void  )

WDT Reset.

Resets the WDT

Returns
None

Definition at line 172 of file adi_wdt.c.

Referenced by adi_wdt_GetCount().

◆ adi_wdt_GetCount()

void adi_wdt_GetCount ( uint16_t *const  pCurCount)

WDT Read Count.

Read the current WDT count

Parameters
[out]pCurCount: Pointer to memory to read the count into
Returns
None

Definition at line 191 of file adi_wdt.c.