This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Watchdog issues with with SDK 15.1.0 bootloader

Hi

I've just analyzed a behavior releated to the watchdog and the new SDK 15.1.0 bootloader. The bootloader just reseted after the configured watchdog timeout has elapsed (5 seconds in my case) and the integrated watchdog feeding logic of the bootloader (nrf_bootloader_wdt.c) did not work.

The problem was related to the fact that after the reset to the bootloader the LFCLK was still running for the activated WDT, but it is stopped for any other peripheral. The timer that is setup by the bootloader for WDT feeding did not get clock cycles. This should not happen normally because the LFCLK is started in the "timer_init" function of the "nrf_bootloader_dfu_timers.c" module if not running. But the test if the LFCLK is running somehow seems to return invalid values in some cases and a causing that the start of the LFCLK is not initiated. More details to the problem with the LFCLK can be found in this issue. To fix it i removed the test if the timer is already running with an result that the timer start task is triggered anyway. Is there potential problem with this fix?

While analyzing this i struggled over another strange code issue (not directly related to the upper topic) that needs some explanation. What is the usage of the variable "m_wdt_keep_internal_feed" in the module "nrf_bootloader_wdt.c"? In my opinion this value is never set and somehow useless.

Regards Adrian

Parents Reply Children
No Data
Related