Using LFCLK, enabling and running the WDT causes the nRF52840 to hang until the watchdog reset when calling nrf_drv_clock_lfclk_release. This is with SDK v15.2.0
Steps to recreate
1) start the lfclk byFullscreen123ret_code_t err_code = nrf_drv_clock_init();APP_ERROR_CHECK(err_code);nrf_drv_clock_lfclk_request(NULL);
2) stop the clockFullscreen123nrf_drv_clock_lfclk_release();NRF_LOG_INFO("clock release.");nrf_drv_clock_uninit();
3) init the BLE Device as mentioned in the BLE ExampleFullscreen123456789void iot_ble_initialize(void){ble_stack_init();gap_params_init();gatt_init();advertising_init();services_init();conn_params_init();}
4) reset after 3 mins and go back to step1If the resets continuously happen
then randomly I see that the nrf_drv_clock_lfclk_release is getting stuck
I was able to trace the call to following:Fullscreen1234a. nrf_drv_clock_lfclk_releaseb. lfclk_stopc. nrfx_clock_lfclk_stopd. while(nrf_clock_lf_is_running()). <--- Hangs here Is there a reason as to why the nrf_drv_clock_lfclk_release is getting stuck
Thanks in advance.