Hi all,
I got strange behavior: when I disable the SoftDevice (nRF52832, S132 V3.0, SDK 12.2) seem that ALL the RTCs, not just the one used by the SD, are stopped, and also the LFCLK are stopped.
This behavior, of course (why?) do not occours when I'm debugging.
Here my code:
void Ble_DeInit(void)
{
uint8_t sd_enabled;
uint32_t err_code;
sd_softdevice_is_enabled(&sd_enabled);
if(ble_state != Ble_State_SD_Disabled){
Ble_Set_Connectability(OFF);
do{
Ble_Task();
}while(Ble_Flags.set_connectability != 0 && Ble_Flags.reset_connectability != 0 && ble_state != Ble_State_Idle);
}
if(sd_enabled)
{
err_code = softdevice_handler_sd_disable(); // ~ -125uA
APP_ERROR_CHECK(err_code);
Ble_Flags.is_sd_active = 0;
}
/* softdevice_handler_sd_disable disables the lfclk (?): re-enable */
nrf_drv_clock_uninit(); // to avoid the error
err_code = nrf_drv_clock_init();
APP_ERROR_CHECK(err_code);
nrf_drv_clock_lfclk_request(NULL); // ~ +60uA
ble_state = Ble_State_NOT_INITIALIZED;
}
Any idea? Thanks!