I have noticed that when I run in release mode, turn WDT on, write bonding info, clear bonding info, and reset, my application suddenly uses 2mA more and takes 5 minutes (the length of my WDT timeout) to respond again. But there is no fatal error reported, even though I turned on logs for release mode. When I use GDB, it shows this, implying watchdog_enable is the problem. But how can this be? I have also noticed that if I skip the "write bonding info, clear bonding info" steps, the "5 minute unresponsiveness" does not happen. Is the unresponsiveness because of the ENTER_CRITICAL_REGION? I noticed that if I comment out watchdog_enable, the unresponsiveness goes away.
(gdb) list 1327 1328 static void watchdog_enable(void){ 1329 1330 //Configure WDT. 1331 nrf_drv_wdt_config_t config = NRF_DRV_WDT_DEAFULT_CONFIG; 1332 config.reload_value = NRF_WATCHDOG_RELOAD_VALUE; 1333 nrf_drv_wdt_init(&config, wdt_event_handler); 1334 nrf_drv_wdt_channel_alloc(&m_channel_id); 1335 nrf_drv_wdt_enable(); 1336 }
SDK 14.0
Softdevice S132 5.0.0