50#include "nrfx_config.h"
53#ifdef WATCHDOG_CONF_ENABLE
54#define WATCHDOG_ENABLE WATCHDOG_CONF_ENABLE
57#define WATCHDOG_ENABLE 1
61static const nrfx_wdt_t wdt = NRFX_WDT_INSTANCE(0);
62static nrfx_wdt_channel_id wdt_channel_id;
63static uint8_t wdt_initialized = 0;
80 nrfx_wdt_config_t config = NRFX_WDT_DEFAULT_CONFIG;
83 if(err_code != NRFX_SUCCESS) {
87 err_code = nrfx_wdt_channel_alloc(&wdt, &wdt_channel_id);
89 if(err_code != NRFX_SUCCESS) {
100 nrfx_wdt_enable(&wdt);
107 if(wdt_initialized) {
108 nrfx_wdt_channel_feed(&wdt, wdt_channel_id);
void watchdog_reboot(void)
Keeps control until the WDT throws a reset signal.
void watchdog_start(void)
Starts the WDT in watchdog mode if enabled by user configuration, maximum interval.
void watchdog_periodic(void)
Writes the WDT clear sequence.
void watchdog_init(void)
Initialisation function for the WDT.
static void wdt_event_handler(void)
WDT events handler.