BLE Beacon example not deep sleeping on NRF52

24 Oct 2019

Hello

I've just flashed an untouched version of the ble beacon example (https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-Beacon/), and I'm getting huge current draw on an NRF52. Around 900ua with Serial disabled, and 9ma with Serial printf calls in there.

from the look of the cpu stats it is just never deep sleeping

Uptime: 2001 Sleep time: 1930 Deep Sleep: 0 Uptime: 4001 Sleep time: 3864 Deep Sleep: 0 Uptime: 6001 Sleep time: 5798 Deep Sleep: 0 Uptime: 8001 Sleep time: 7733 Deep Sleep: 0 Uptime: 10001 Sleep time: 9667 Deep Sleep: 0 Uptime: 12001 Sleep time: 11601 Deep Sleep: 0 Uptime: 14001 Sleep time: 13535 Deep Sleep: 0

Any ideas? Surely someone tested this?

Cheers

Ben

28 Oct 2019

Hi Ben,

Thanks for reporting this, I just found that the HCI driver blocking the deep sleep process.

https://github.com/ARMmbed/mbed-os/blob/e1c3de649dd9c16d9548f73b4bbb71858af904f7/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_NRF5x/NRFCordioHCIDriver.cpp#L202

Would you raise a GitHub issue, so that we can track and work on it.

https://github.com/ARMmbed/mbed-os/issues

Regards, Desmond