I have added WDT to the blinky_freertos sample.
And I am debugging with SEGGER ozone.
building with SDK17:
If you reset the software in the debugger and start it, the application freezes.
t stops in the following loop.
And RTC1 is not counting up.
*********************************************************************
port_cmsis_systick.c
/* No SD - we would just block interrupts globally.
* BASEPRI cannot be used for that because it would prevent WFE from wake up.
*/
do{
__WFE();
} while (0 == (NVIC->ISPR[0] | NVIC->ISPR[1]));
**********************************************************************
However, after WDT reset, blinky works normally.
I have built the same application with SDK15.
It was perfectly fine.
SDK17 seems to have a problem.
I found a difference with SDK15.
SDK17 nrf_drv_clock.c
*****************************************
nrf_drv_clock_init()
...
if (nrf_wdt_started())
{
m_clock_cb.lfclk_on = true;
}
*****************************************
If a software reset occurs after WDT is activated, WDT remains activated after the reset. However, LFCLK is stopped.
As a result, the above process does not start LFCLK, so even if RTC1 is started, it will not be counted up.