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;
68#if NRFX_API_VER_AT_LEAST(3, 2, 0)
91 nrfx_wdt_config_t config = NRFX_WDT_DEFAULT_CONFIG;
93#if NRFX_API_VER_AT_LEAST(3, 2, 0)
99 if(err_code != NRFX_SUCCESS) {
103 err_code = nrfx_wdt_channel_alloc(&wdt, &wdt_channel_id);
105 if(err_code != NRFX_SUCCESS) {
115 if(wdt_initialized) {
116 nrfx_wdt_enable(&wdt);
123 if(wdt_initialized) {
124 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.