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

ble trurn off and on without reset the whole environment

My application uses a NRF52840 (SD140, SDK 15.2.), very simple circuit and needs to be extremely low current consumption. I measured the current in conditions of BLE on and BLE off. To turn on BLE, I use the following code:

ble_stack_init();
gap_params_init();
gatt_init();
services_init();
advertising_init();
conn_params_init();
advertising_start(erase_bonds);

My intention is: to turn on BLE when give some condition  and turn it off when transmission is finished and again on ble . My question is: how do I turn off and then turn on BLE dynamically, without reset the whole environment. I guess turning on seems easy, using the code above. But turning off and remaining CPU running? How do I do that? can we use this  api for off

nrf_sdh_disable_request();
sd_softdevice_disable();

and on

sd_softdevice_enable();

Related