Infineon Logo AIROC BTSDK v4.4 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Watchdog Interface

Defines a driver for the watchdog interface. More...

Typedefs

typedef void( wiced_hal_application_wdog_cback_t )(uint8_t *app_thread_cb, uint32_t app_thread_cb_size, uint8_t *app_thread_stack, uint32_t app_thread_stack_size)
 

Functions

void wiced_hal_wdog_disable (void)
 Disable the system watchdog. More...
 
void wiced_hal_wdog_reset_system (void)
 Execute a soft reset of the system. More...
 
void wiced_hal_wdog_restart (void)
 Restart the watchdog (restart the watchdog's internal timer). More...
 
void wiced_hal_wdog_set_restart_countdown (uint32_t count)
 Change the watchdog count down. More...
 
wiced_result_t wiced_hal_wdog_enable_application_wdog (wiced_hal_application_wdog_cback_t *p_application_wdog_cback)
 Enables application thread watchdog. More...
 

Detailed Description

Defines a driver for the watchdog interface.

This driver manages the hardware watchdog countdown timer. When enabled, the watchdog timer will generate an interrupt when the timer counts down to zero, then will reload the counter. If the counter counts down to zero again, the hardware performs a device reset. The lowest priority "idle" thread restarts the watchdog counter preiodically, and other operations that may keep the system busy call wiced_hal_wdog_restart to extend the watchdog countdown.

Function Documentation

void wiced_hal_wdog_disable ( void  )

Disable the system watchdog.

Useful for debugging when the watchdog would interfere and reset the system when not desired (e.g. when the system is connected to a debugger, etc).

NOTE: This is for debugging purposes only. Hence, there is no complementary "Enable Watchdog" function. Please do not use this function in production applications.

Parameters
none
Returns
none
wiced_result_t wiced_hal_wdog_enable_application_wdog ( wiced_hal_application_wdog_cback_t *  p_application_wdog_cback)

Enables application thread watchdog.

Parameters
p_application_wdog_cbackcallback to be called when appliation thread is deadlocked
Returns
wiced_result_t
void wiced_hal_wdog_reset_system ( void  )

Execute a soft reset of the system.

Parameters
none
Returns
none
void wiced_hal_wdog_restart ( void  )

Restart the watchdog (restart the watchdog's internal timer).

Used to manually "pet" the watchdog when certain processes might otherwise cause the watchdog to trigger and reset the system. The default timeout for watchdog reset is two seconds.

Parameters
none
Returns
none
void wiced_hal_wdog_set_restart_countdown ( uint32_t  count)

Change the watchdog count down.

Parameters
countcountdown reload value for watchdog, 128000 = 1 sec
Returns
none