Altera HWLIB  16.0
The Altera HW Manager API Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
Watchdog Timer Enable, Disable, Restart, Status

Description

This functional group contains the basic functions to control and manage the watchdog timers.

Functions

ALT_STATUS_CODE alt_wdog_init (void)
 
ALT_STATUS_CODE alt_wdog_uninit (void)
 
ALT_STATUS_CODE alt_wdog_stop (ALT_WDOG_TIMER_t tmr_id)
 
ALT_STATUS_CODE alt_wdog_start (ALT_WDOG_TIMER_t tmr_id)
 
bool alt_wdog_tmr_is_enabled (ALT_WDOG_TIMER_t tmr_id)
 
ALT_STATUS_CODE alt_wdog_reset (ALT_WDOG_TIMER_t tmr_id)
 

Function Documentation

ALT_STATUS_CODE alt_wdog_init ( void  )

Initialize the watchdog timer module before use

Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_STATUS_CODE alt_wdog_uninit ( void  )

Uninitialize the watchdog timer module & return to reset state

Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_STATUS_CODE alt_wdog_stop ( ALT_WDOG_TIMER_t  tmr_id)

Stop the specified watchdog timer. ALT_WATCHDOG0, ALT_WATCHDOG1, ALT_WATCHDOG0_INITIAL and ALT_WATCHDOG1_INITIAL cannot be stopped once started.

Parameters
tmr_idThe watchdog timer identifier.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGTried to stop an invalid watchdog timer.
ALT_STATUS_CODE alt_wdog_start ( ALT_WDOG_TIMER_t  tmr_id)

Start the specified watchdog timer.

Parameters
tmr_idThe watchdog timer identifier.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGTried to enable an invalid watchdog timer.
bool alt_wdog_tmr_is_enabled ( ALT_WDOG_TIMER_t  tmr_id)

Returns whether the specified watchdog timer is currently running or not.

Parameters
tmr_idThe watchdog timer identifier.
Return values
TRUEThe timer is currently running.
FALSEThe timer is currently not running.
ALT_STATUS_CODE alt_wdog_reset ( ALT_WDOG_TIMER_t  tmr_id)

Reloads the counter countdown value, clears the timer interrupt, and restarts the watchdog timer. User can reset the timer at any time before timeout. This is also known as kicking, petting, feeding, waking, or walking the watchdog.
If the timer is reset while stopped, it remains stopped, the timer reset value is reloaded and the countdown will start from there when it is started. The timer configuration is retained.

Parameters
tmr_idThe watchdog timer identifier.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGTried to reset an invalid watchdog timer.