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

LFCLK is not starting after restart if watchdog has been started on first run with SDK 17.0.2

Hey,

Yesterday we decided to update SDK to 17.0.2. After this change our FreeRTOS stopped working.
We started investigating where is the problem and we found that when vPortSetupTimerInterrupt calls nrf_drv_clock_lfclk_request then nrfx_clock_lfclk_start is not called because m_clock_cb.lfclk_on is already true.


Reson why this bool is true is change in this new SDK, in function nrf_drv_clock_init this code has been added:

if (nrf_wdt_started())
{
m_clock_cb.lfclk_on = true;
}

First look at this may look fine but after restart under Embedded Studio NRF_WDT->RUNSTATUS has value 1 even BEFORE watchdog initialization.

In nrfx_wdt code I didn't found any reference to nrfx_clock_lfclk, so is this `if` valid?

If it should be like this, solution can be something like this:

if (nrf_wdt_started() && nrf_clock_lf_is_running())
{
m_clock_cb.lfclk_on = true;
}


What is a valid solution for this issue?


BR,
zori

Parents Reply Children
No Data
Related