Watchdog Timer#

Modules#

watchdog_timer_clock_config_t

watchdog_timer_config_t

sl_watchdog_timer_version_t

Enumerations#

enum
RO_32KHZ_CLOCK = 1
MCU_FSM__CLOCK = 2
}

Enumeration to represent bg-pmu clock sources.

enum
TIME_DELAY_0
TIME_DELAY_1
TIME_DELAY_2
TIME_DELAY_3
TIME_DELAY_4
TIME_DELAY_5
TIME_DELAY_6
TIME_DELAY_7
TIME_DELAY_8
TIME_DELAY_9
TIME_DELAY_10
TIME_DELAY_11
TIME_DELAY_12
TIME_DELAY_13
TIME_DELAY_14
TIME_DELAY_15
TIME_DELAY_16
TIME_DELAY_17
TIME_DELAY_18
TIME_DELAY_19
TIME_DELAY_20
TIME_DELAY_21
TIME_DELAY_22
TIME_DELAY_23
TIME_DELAY_24
TIME_DELAY_25
TIME_DELAY_26
TIME_DELAY_27
TIME_DELAY_28
TIME_DELAY_29
TIME_DELAY_30
TIME_DELAY_31
TIME_DELAY_LAST
}

Enumeration to represent possible time delays values for WDT interrupt time and system reset time with 32 KHZ clock freq.

Typedefs#

typedef void(*

Typedef for the function pointer of the callback function.

typedef AON_CLK_T

Renaming low frequency fsm-clock type enum.

typedef FSM_CLK_T

Renaming high frequency fsm-clock type enum.

Functions#

void

Initialize the Watchdog timer (Power-up WDT and enables it to run during sleep mode).

sl_status_t
sl_si91x_watchdog_configure_clock(watchdog_timer_clock_config_t *timer_clk_config_ptr)
sl_status_t
sl_si91x_watchdog_set_configuration(watchdog_timer_config_t *timer_config_ptr)
sl_status_t
sl_si91x_watchdog_register_timeout_callback(watchdog_timer_callback_t on_timeout_callback)

Register Watchdog timer timeout callback and enables NVIC.

sl_status_t
sl_si91x_watchdog_set_interrupt_time(time_delays_t interrupt_time)

Set Watchdog timer interrupt time(upper time-stamp for WDT restart) duration.

uint8_t

Read Watchdog timer interrupt time set value (in terms of power of two)

sl_status_t
sl_si91x_watchdog_set_system_reset_time(time_delays_t system_reset_time)

Set Watchdog timer system-reset time duration.

uint8_t

Read Watchdog timer system-reset time set value (in terms of power of two).

sl_status_t
sl_si91x_watchdog_set_window_time(time_delays_t window_time)

Set Watchdog timer window time value (lower time-stamp for WDT restart).

uint8_t

Read Watchdog timer window time set value (in terms of power of two).

boolean_t

Read Watchdog timer system-reset status.

void

De-initialize Watchdog timer, mask its interrupt, de-power and disable timer.

void

Unregister Watchdog timer timeout callback.

Get the release version of Watchdog timer.

__STATIC_INLINE void

Start and enable the Watchdog timer.

__STATIC_INLINE void

Stop Watchdog timer by disabling it.

__STATIC_INLINE void

Restart (kick) an already running Watchdog timer.

__STATIC_INLINE void

Enable the Watchdog timer to reset system on processor lockup.

__STATIC_INLINE void

Disable the Watchdog timer to reset system on processor lockup.

Enumeration Documentation#

bg_pmu_clock_t#

bg_pmu_clock_t

Enumeration to represent bg-pmu clock sources.

Enumerator
RO_32KHZ_CLOCK

RO_32KHz_clock.

MCU_FSM__CLOCK

mcu_fsm__clock


Definition at line 66 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

time_delays_t#

time_delays_t

Enumeration to represent possible time delays values for WDT interrupt time and system reset time with 32 KHZ clock freq.

Enumerator
TIME_DELAY_0

for time delay of 0.03125 milliseconds

TIME_DELAY_1

for time delay of 0.0625 milliseconds

TIME_DELAY_2

for time delay of 0.125 milliseconds

TIME_DELAY_3

for time delay of 0.25 milliseconds

TIME_DELAY_4

for time delay of 0.5 milliseconds

TIME_DELAY_5

for time delay of 1 milliseconds

TIME_DELAY_6

for time delay of 2 milliseconds

TIME_DELAY_7

for time delay of 4 milliseconds

TIME_DELAY_8

for time delay of 8 milliseconds

TIME_DELAY_9

for time delay of 16 milliseconds

TIME_DELAY_10

for time delay of 32 milliseconds

TIME_DELAY_11

for time delay of 64 milliseconds

TIME_DELAY_12

for time delay of 128 milliseconds

TIME_DELAY_13

for time delay of 256 milliseconds

TIME_DELAY_14

for time delay of 512 milliseconds

TIME_DELAY_15

for time delay of 1.024 seconds

TIME_DELAY_16

for time delay of 2.048 seconds

TIME_DELAY_17

for time delay of 4.096 seconds

TIME_DELAY_18

for time delay of 8.192 seconds

TIME_DELAY_19

for time delay of 16.384 seconds

TIME_DELAY_20

for time delay of 32.768 seconds

TIME_DELAY_21

for time delay of 65.536 seconds

TIME_DELAY_22

for time delay of 131.072 seconds

TIME_DELAY_23

for time delay of 262.144 seconds

TIME_DELAY_24

for time delay of 524.288 seconds

TIME_DELAY_25

for time delay of 1048.576 seconds

TIME_DELAY_26

for time delay of 2097.152 seconds

TIME_DELAY_27

for time delay of 4194.304 seconds

TIME_DELAY_28

for time delay of 8388.60 seconds

TIME_DELAY_29

for time delay of 16777.216 seconds

TIME_DELAY_30

for time delay of 33554.432 seconds

TIME_DELAY_31

for time delay of 67108.864 seconds

TIME_DELAY_LAST

for time delay value validation


Definition at line 72 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

Typedef Documentation#

watchdog_timer_callback_t#

typedef void(* watchdog_timer_callback_t) (void) )(void)

Typedef for the function pointer of the callback function.

Parameters
N/Adata

(void *)extra parameter for user application


Definition at line 60 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

low_freq_fsm_clock_t#

typedef AON_CLK_T low_freq_fsm_clock_t

Renaming low frequency fsm-clock type enum.


Definition at line 62 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

high_freq_fsm_clock_t#

typedef FSM_CLK_T high_freq_fsm_clock_t

Renaming high frequency fsm-clock type enum.


Definition at line 63 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

Function Documentation#

sl_si91x_watchdog_init_timer#

void sl_si91x_watchdog_init_timer (void )

Initialize the Watchdog timer (Power-up WDT and enables it to run during sleep mode).

Parameters
[in]

Also un-masks its interrupt & sets RTC clock time-period.

Returns

  • none


Definition at line 142 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_configure_clock#

sl_status_t sl_si91x_watchdog_configure_clock (watchdog_timer_clock_config_t * timer_clk_config_ptr)
Parameters
N/Atimer_clk_config_ptr

Definition at line 156 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_set_configuration#

sl_status_t sl_si91x_watchdog_set_configuration (watchdog_timer_config_t * timer_config_ptr)
Parameters
N/Atimer_config_ptr

Definition at line 175 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_register_timeout_callback#

sl_status_t sl_si91x_watchdog_register_timeout_callback (watchdog_timer_callback_t on_timeout_callback)

Register Watchdog timer timeout callback and enables NVIC.

Parameters
[in]on_timeout_callback

(function pointer) Callback function pointer to be called when timer timeout interrupt occurred.

Returns

  • status 0 if successful, else error code SL_STATUS_NULL_POINTER (0x0022) - Callback function pointer parameter is a null pointer. SL_STATUS_BUSY (0x0004) - The callback is already registered, user must unregister previous callback before registering again SL_STATUS_OK (0x0000) - Successfully registered timer timer-out callback


Definition at line 188 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_set_interrupt_time#

sl_status_t sl_si91x_watchdog_set_interrupt_time (time_delays_t interrupt_time)

Set Watchdog timer interrupt time(upper time-stamp for WDT restart) duration.

Parameters
[in]interrupt_time

(time_delays_t), timer timeout interrupt duration, Number of clock pulses = 2^(interrupt_time), time_delays_t

Returns

  • status 0 if successful, else error code SL_STATUS_INVALID_PARAMETER (0x0021) - 'interrupt_time' parameter has invalid value. SL_STATUS_INVALID_CONFIGURATION (0x0023) - 'interrupt_time' value is less than window time or greater than system reset time SL_STATUS_OK (0x0000) - Successfully set watchdog timer timeout time value


Definition at line 204 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_get_interrupt_time#

uint8_t sl_si91x_watchdog_get_interrupt_time (void )

Read Watchdog timer interrupt time set value (in terms of power of two)

Parameters
[in]
  • sl_si91x_watchdog_set_interrupt_time

Returns


Definition at line 214 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_set_system_reset_time#

sl_status_t sl_si91x_watchdog_set_system_reset_time (time_delays_t system_reset_time)

Set Watchdog timer system-reset time duration.

Parameters
[in]system_reset_time

(time_delays_t) timer system-reset duration, Number of clock pulses = 2^(system_reset_time), time_delays_t

Returns

  • status 0 if successful, else error code SL_STATUS_INVALID_PARAMETER (0x0021) - 'system_reset_time' parameter has invalid value. SL_STATUS_INVALID_CONFIGURATION (0x0023) - 'system_reset_time' value is less than window time or interrupt time SL_STATUS_OK (0x0000) - Successfully set watchdog timer system-reset time value


Definition at line 229 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_get_system_reset_time#

uint8_t sl_si91x_watchdog_get_system_reset_time (void )

Read Watchdog timer system-reset time set value (in terms of power of two).

Parameters
[in]

Returns


Definition at line 239 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_set_window_time#

sl_status_t sl_si91x_watchdog_set_window_time (time_delays_t window_time)

Set Watchdog timer window time value (lower time-stamp for WDT restart).

Parameters
[in]window_time

(time_delays_t), timer window time, Number of clock pulses = 2^(window_time),time_delays_t

Returns

  • status 0 if successful, else error code SL_STATUS_INVALID_PARAMETER (0x0021) - 'window_time' parameter has invalid value. SL_STATUS_INVALID_CONFIGURATION (0x0023) - 'window_time' value is greater than interrupt time or system reset time SL_STATUS_OK (0x0000) - Successfully set watchdog timer window time value


Definition at line 256 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_get_window_time#

uint8_t sl_si91x_watchdog_get_window_time (void )

Read Watchdog timer window time set value (in terms of power of two).

Parameters
[in]

Returns


Definition at line 266 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_get_timer_system_reset_status#

boolean_t sl_si91x_watchdog_get_timer_system_reset_status (void )

Read Watchdog timer system-reset status.

Parameters
[in]

Returns

  • returns true if watchdog timer resets system, else returns false


Definition at line 274 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_deinit_timer#

void sl_si91x_watchdog_deinit_timer (void )

De-initialize Watchdog timer, mask its interrupt, de-power and disable timer.

Parameters
[in]

Returns

  • none


Definition at line 285 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_unregister_timeout_callback#

void sl_si91x_watchdog_unregister_timeout_callback (void )

Unregister Watchdog timer timeout callback.

Parameters
[in]

Returns

  • none


Definition at line 295 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_get_version#

sl_watchdog_timer_version_t sl_si91x_watchdog_get_version ( none)

Get the release version of Watchdog timer.

Parameters
[in]none

Returns

  • (sl_watchdog_version_t) type structure


Definition at line 304 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_start_timer#

__STATIC_INLINE void sl_si91x_watchdog_start_timer (void )

Start and enable the Watchdog timer.

Parameters
[in]

Returns

  • none


Definition at line 328 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_stop_timer#

__STATIC_INLINE void sl_si91x_watchdog_stop_timer (void )

Stop Watchdog timer by disabling it.

Parameters
[in]

Returns

  • none


Definition at line 350 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_restart_timer#

__STATIC_INLINE void sl_si91x_watchdog_restart_timer (void )

Restart (kick) an already running Watchdog timer.

Parameters
[in]

Returns

  • none


Definition at line 376 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_enable_system_reset_on_processor_lockup#

__STATIC_INLINE void sl_si91x_watchdog_enable_system_reset_on_processor_lockup (void )

Enable the Watchdog timer to reset system on processor lockup.

Parameters
[in]

Returns

  • none


Definition at line 397 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h

sl_si91x_watchdog_disable_system_reset_on_processor_lockup#

__STATIC_INLINE void sl_si91x_watchdog_disable_system_reset_on_processor_lockup (void )

Disable the Watchdog timer to reset system on processor lockup.

Parameters
[in]

Returns

  • none


Definition at line 419 of file components/siwx917_soc/drivers/unified_api/inc/sl_si91x_watchdog_timer.h