Appiko
Functions

Hardware abstraction layer the watchdog timer peripheral in nRF5x SoCs. More...

Functions

void hal_wdt_init (uint32_t period_ms, void(*wdt_timeout_handler)(void))
 
void hal_wdt_start (void)
 
void hal_wdt_feed (void)
 

Detailed Description

Function Documentation

◆ hal_wdt_feed()

void hal_wdt_feed ( void  )

Feeds the WDT so that it does not bite.

Note
The WDT feeding should preferably be done in the main thread level, not in an interrupt routine.

Definition at line 64 of file hal_wdt.c.

Referenced by hal_wdt_init().

◆ hal_wdt_init()

void hal_wdt_init ( uint32_t  period_ms,
void(*)(void)  wdt_timeout_handler 
)

Initialize the WDT peripheral

Parameters
period_msThe period in ms after which the WDT bites if not fed
wdt_timeout_handlerThe handler to call in case WDT bites.
Note
The SoC will reset about 60 us after the handler is called. This handler can be used to do general house keeping before the reset.

Definition at line 34 of file hal_wdt.c.

References hal_wdt_feed(), and LFCLK_TICKS_MS.

◆ hal_wdt_start()

void hal_wdt_start ( void  )

Starts the WDT.

Warning
The WDT cannot be stopped once started.

Definition at line 71 of file hal_wdt.c.