Hi!
I am trying to use the nrfx watchdog driver on nrf9160 on a custom board.
The application boots, but nrfx_wdt_init() throw error NRFX_ERROR_INVALID_STATE aka. "The driver was already initialized."
prj.conf
# WATCHDOG CONFIG_WATCHDOG=y CONFIG_WDT_NRFX=y CONFIG_WATCHDOG_TIMEOUT_MS=30000
main.c
if (IS_ENABLED(CONFIG_WATCHDOG)) {
const nrfx_wdt_config_t wdt_conf = {
.behaviour = NRF_WDT_BEHAVIOUR_RUN_SLEEP_HALT,
.reload_value = CONFIG_WATCHDOG_TIMEOUT_MS,
NRFX_WDT_IRQ_CONFIG
};
nrfx_err_t err_nrfx = nrfx_wdt_init(&wdt_inst, &wdt_conf, wdt_handler);
if (NRFX_SUCCESS != err_nrfx) {
LOG_ERR("Watchdog init error: %d", err_nrfx);
//sys_reboot(SYS_REBOOT_COLD);
return;
}
nrfx_wdt_enable(&wdt_inst);
LOG_INF("Watchdog started");
}