AM64x MCU+ SDK  10.00.00

Introduction

This module contains APIs to program and use the WDT.

Files

file  watchdog_rti.h
 This file contains the prototype of WDT driver APIs.
 

Data Structures

struct  Watchdog_HwAttrs
 Watchdog Driver HW configuration. More...
 
struct  Watchdog_Params
 Watchdog Parameters. More...
 
struct  Watchdog_Config
 Watchdog Global configuration. More...
 
struct  Watchdog_MCB
 Watchdog Driver Controller Control Block. More...
 

Functions

void Watchdog_setReaction (Watchdog_Handle handle, uint32_t dwwdReaction)
 Set DWWD reaction. More...
 
uint32_t Watchdog_getWindowSize (Watchdog_Handle handle)
 Get DWWD Window Size. More...
 
void Watchdog_setWindowSize (Watchdog_Handle handle, uint32_t dwwdWindowSize)
 Set DWWD Window Size. More...
 
bool Watchdog_isClosedWindow (Watchdog_Handle handle)
 The function checks for Closed Window. More...
 
void Watchdog_clear (Watchdog_Handle handle)
 The function clears the Watchdog to prevent a reset signal from being generated if the module is in Watchdog_RESET_ON reset mode. More...
 
void Watchdog_close (Watchdog_Handle handle)
 The function closes a Watchdog peripheral specified by the Watchdog handle. It stops (holds) the Watchdog counting on applicable platforms. More...
 
void Watchdog_init (void)
 The functions initializes the Watchdog module. More...
 
void Watchdog_deinit (void)
 The functions de-initializes the Watchdog module. More...
 
Watchdog_Handle Watchdog_open (uint8_t index, Watchdog_Params *params)
 Opens a Watchdog object with the index and parameters specified, and returns a Watchdog_Handle. More...
 
void Watchdog_paramsInit (Watchdog_Params *params)
 Function to set default values of Watchdog_Params in params. More...
 

Typedefs

typedef struct Watchdog_Config_s * Watchdog_Handle
 Watchdog Handle. More...
 
typedef void(* Watchdog_Callback) (Watchdog_Handle handle, void *callbackFxnArgs)
 Watchdog callback pointer. More...
 

Enumerations

enum  Watchdog_DebugMode { Watchdog_DEBUG_STALL_ON = 0, Watchdog_DEBUG_STALL_OFF = 1 }
 Watchdog debug stall settings. More...
 
enum  Watchdog_ResetMode { Watchdog_RESET_OFF = 0xAU, Watchdog_RESET_ON = 0x5U }
 Watchdog reset mode settings. More...
 
enum  Watchdog_WindowSize {
  Watchdog_WINDOW_100_PERCENT = CSL_RTI_RTIWWDSIZECTRL_WWDSIZE_100_PERCENT, Watchdog_WINDOW_50_PERCENT = CSL_RTI_RTIWWDSIZECTRL_WWDSIZE_50_PERCENT, Watchdog_WINDOW_25_PERCENT = CSL_RTI_RTIWWDSIZECTRL_WWDSIZE_25_PERCENT, Watchdog_WINDOW_12_5_PERCENT = CSL_RTI_RTIWWDSIZECTRL_WWDSIZE_12_5_PERCENT,
  Watchdog_WINDOW_6_25_PERCENT = CSL_RTI_RTIWWDSIZECTRL_WWDSIZE_6_25_PERCENT, Watchdog_WINDOW_3_125_PERCENT = CSL_RTI_RTIWWDSIZECTRL_WWDSIZE_3_125_PERCENT
}
 Watchdog Window Size settings. More...
 
enum  Watchdog_DriverState { Watchdog_DriverState_UNINIT = 0, Watchdog_DriverState_OPERATIONAL = 1 }
 Watchdog Driver Status. More...
 

Macros

#define WATCHDOG_CLEAR_STATUS   (0xFFU)
 macro to clear the status. More...
 

Macro Definition Documentation

◆ WATCHDOG_CLEAR_STATUS

#define WATCHDOG_CLEAR_STATUS   (0xFFU)

macro to clear the status.

Typedef Documentation

◆ Watchdog_Handle

typedef struct Watchdog_Config_s* Watchdog_Handle

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.

Enumeration Type Documentation

◆ 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.

Function Documentation

◆ Watchdog_setReaction()

void Watchdog_setReaction ( Watchdog_Handle  handle,
uint32_t  dwwdReaction 
)

Set DWWD reaction.

Parameters
handleWatchdog Handle
dwwdReactionDWWD reaction for violation/expiration. Values given by macro
Note
  1. 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.
  2. 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()

uint32_t Watchdog_getWindowSize ( Watchdog_Handle  handle)

Get DWWD Window Size.

Parameters
handleWatchdog Handle
Returns
Watchdog Window size.

◆ Watchdog_setWindowSize()

void Watchdog_setWindowSize ( Watchdog_Handle  handle,
uint32_t  dwwdWindowSize 
)

Set DWWD Window Size.

Parameters
handleWatchdog Handle
dwwdWindowSizeDWWD Window Size. Values given by macro
Note
  1. 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.
  2. 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()

bool Watchdog_isClosedWindow ( Watchdog_Handle  handle)

The function checks for Closed Window.

Parameters
handleWatchdog Handle
Returns
closed window status.

◆ Watchdog_clear()

void Watchdog_clear ( Watchdog_Handle  handle)

The function clears the Watchdog to prevent a reset signal from being generated if the module is in Watchdog_RESET_ON reset mode.

Parameters
handleWatchdog Handle

◆ Watchdog_close()

void Watchdog_close ( Watchdog_Handle  handle)

The function closes a Watchdog peripheral specified by the Watchdog handle. It stops (holds) the Watchdog counting on applicable platforms.

Parameters
handleWatchdog Handle

◆ 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()

Watchdog_Handle Watchdog_open ( uint8_t  index,
Watchdog_Params params 
)

Opens a Watchdog object with the index and parameters specified, and returns a Watchdog_Handle.

Parameters
indexLogical peripheral number for the Watchdog indexed into the Watchdog_Config table
paramsPointer 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()

void Watchdog_paramsInit ( Watchdog_Params params)

Function to set default values of Watchdog_Params in params.

Parameters
params[IN] pointer to the structure to be initialized