Hi,
I am using nRF5_SDK_12.3.0 and based on \ble_peripheral\ble_app_uart ( with softdevice of s130) to build my application.
Recently, I tried to add the wdt to my nrf51822 firmware.
So I config the following in sdk_config.h as follows:
WDT_ENABLED 1
WDT_CONFIG_BEHAVIOUR 0
WDT_CONFIG_RELOAD_VALUE 2000
WDT_CONFIG_IRQ_PRIORITY 3
And initialize the wdt using the following code:
nrf_drv_wdt_config_t config = NRF_DRV_WDT_DEAFULT_CONFIG;
err_code = nrf_drv_wdt_init(&config, wdt_event_handler);
APP_ERROR_CHECK(err_code);
err_code = nrf_drv_wdt_channel_alloc(&m_channel_id);
APP_ERROR_CHECK(err_code);
nrf_drv_wdt_enable()
The watchdog feeding is in main loop
for (;;)
{
nrf_drv_wdt_channel_feed(m_channel_id);
power_manage();
}
However, when I trigger the ble advertising with APP_ADV_TIMEOUT_IN_SECONDS is 0 (disabling the timeout). The chip enter wdt_event_handler after about 1.5 mins. I don't know why as the WDT_CONFIG_BEHAVIOUR is also set to 0 so that wdt pause at halt and sleep mode.
Please let me know your comment on this issue. Thanks.