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

how to turn off and on BLE service dynamically

My application uses a NRF52 (SD132, SDK 15.0.0), 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);

The current is about 0.6mA. Without the code above, my application is still working (no bluetooth connection of course), and the current drops to 6uA.

My intention is: to turn on BLE when hard button is pressed and turn it off when transmission is finished. 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?

Thanks a lot. Dimtai 10/29/2018

Parents Reply Children
No Data
Related