Hardware Libraries  20.1
Stratix 10 SoC Hardware Manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Watchdog Timer Interrupt Management

Description

This functional group implements management of the interrupts of the watchdog timers.

Functions

bool alt_wdog_int_is_pending (ALT_WDOG_TIMER_t tmr_id)
 
bool alt_wdog_int_is_enabled (ALT_WDOG_TIMER_t tmr_id)
 
ALT_STATUS_CODE alt_wdog_int_clear (ALT_WDOG_TIMER_t tmr_id)
 
bool alt_wdog_int_if_pending_clear (ALT_WDOG_TIMER_t tmr_id)
 
ALT_STATUS_CODE alt_wdog_response_mode_set (ALT_WDOG_TIMER_t tmr_id, ALT_WDOG_RESET_TYPE_t type)
 
ALT_WDOG_RESET_TYPE_t alt_wdog_response_mode_get (ALT_WDOG_TIMER_t tmr_id)
 
uint32_t alt_wdog_compcode_get (ALT_WDOG_TIMER_t tmr_id)
 
uint32_t alt_wdog_ver_get (ALT_WDOG_TIMER_t tmr_id)
 

Function Documentation

bool alt_wdog_int_is_pending ( ALT_WDOG_TIMER_t  tmr_id)

Returns the status of the interrupt of the specified watchdog timer module but does not clear it. Return TRUE if the interrupt of the specified general purpose timer module is pending and FALSE otherwise.

Parameters
tmr_idThe timer identifier.
Return values
TRUEThe timer interrupt is currently pending.
FALSEThe timer interrupt is not currently pending.
bool alt_wdog_int_is_enabled ( ALT_WDOG_TIMER_t  tmr_id)

Returns the state of the interrupt of the specified watchdog timer module.

Parameters
tmr_idThe timer identifier.
Return values
TRUEThe timer interrupt is currently pending.
FALSEThe timer interrupt is not currently pending.
ALT_STATUS_CODE alt_wdog_int_clear ( ALT_WDOG_TIMER_t  tmr_id)

Clears the pending status of the interrupt of the specified watchdog timer module.

Parameters
tmr_idThe timer identifier.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
bool alt_wdog_int_if_pending_clear ( ALT_WDOG_TIMER_t  tmr_id)

Returns the status of the interrupt of the specified watchdog timer module and also clears it. Return TRUE if the interrupt of the specified timer module is pending and FALSE otherwise.

Parameters
tmr_idThe timer identifier.
Return values
TRUEThe timer interrupt was pending.
FALSEThe timer interrupt was not pending.
ALT_STATUS_CODE alt_wdog_response_mode_set ( ALT_WDOG_TIMER_t  tmr_id,
ALT_WDOG_RESET_TYPE_t  type 
)

Sets the timeout response mode of the specified watchdog timer. For ALT_WATCHDOGx or ALT_WATCHDOGx_INITIAL, the options are to generate a system reset or to generate an interrupt and then generate a system reset if the interrupt is not cleared by the next time the watchdog timer counter rolls over.

Parameters
tmr_idThe timer identifier.
typeALT_WDOG_WARM_RESET - reset the core immediately.

ALT_WDOG_INT_THEN_RESET - raise an interrupt. If the interrupt is not cleared before the timer counts down to zero again, reset the CPU cores.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGSpecified an incorrect timer or an unsupported response mode for the specified timer.
ALT_WDOG_RESET_TYPE_t alt_wdog_response_mode_get ( ALT_WDOG_TIMER_t  tmr_id)

Returns the response mode of the specified timer.

Parameters
tmr_idThe timer identifier.
Return values
ALT_WDOG_WARM_RESET- reset the core immediately.
ALT_WDOG_INT_THEN_RESET- Raise an interrupt. If the interrupt is not cleared before timer wraps around again, reset the CPU cores.
ALT_WDOG_UNKNOWN- The operation failed or invalid watchdog timer id.
uint32_t alt_wdog_compcode_get ( ALT_WDOG_TIMER_t  tmr_id)

Returns the component code of the watchdog timer module.

Parameters
tmr_idThe timer identifier.
Return values
uint32_tThe component code of the module. It should be 0x44570120.
uint32_t alt_wdog_ver_get ( ALT_WDOG_TIMER_t  tmr_id)

Returns the version code of the watchdog timer module.

Parameters
tmr_idThe timer identifier.
Return values
uint32_tThe encoded revision number of the module.