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

nRF52840 Dongle BLE Power Optimization

I am currently running ble_peripheral/ble_app_blinky using the nRF52840 Dongle and S140 nRF52 6.1.1. I have removed the lines for CONNECTED_LED and ADVERTISING_LED to get a more accurate reading of the power consumption for Bluetooth. I am currently measuring the current of the entire board with a Fluke 177 multimeter with the power coming from 5V via VBUS.

  • I set both minimum and maximum connection interval to 10ms
  • I changed the connection interval from 0 to 99
  • I modified ble_evt_handler() to not advertise upon being disconnected
  • I enabled dcdc mode right  before advertising_start() in main()

I am measuring 310uA when advertising with the default 40ms interval. When connected to my iPhone via nRF Connect, it uses 170uA. When disconnected and not advertising, it uses 20uA.

Nordic's online profiler tool estimates 11uA with my parameters. 170uA seems a bit high and almost an order of magnitude off from the estimates. I understand that's including other things on the chip though given 20uA at idle, I would assume that with Bluetooth it would use at 40uA or something on that order. Are there other things I can do/disable to lower power consumption?

I intend to use the nRF52840 dongle as a controller for a Bluetooth keyboard so the device needs to be connected for the most part. A lot of power optimization guides suggest setting NRF_POWER->TASKS_LOWPWR to 1. Is that something that I can do? Where in the code would I do that?

  • Hi, it's not clear to me what the connection interval is. You say that you set the max and min connection interval to 10ms and also changing from 0 to 99. The connection interval is decided by the central device. And you should be able to set this in nRF connect.

    The TASKS_LOWPWR is the default setting, it just reverts back to low power mode if it was set to constant latency earlier. So this is not something you have to worry about if you haven't used constant latency mode.

    Have you enabled DCDC on both REG0 and REG1? You can enable both in the start of main(), you don't have to wait until right before advertising.

  • can you post the source code for this? I am playing with the dongle and created an empty main() without even a while loop and am getting 6mA of consumption. I don't understand how you guys are getting anything in uAs! Are you modifying the dongle hardware? Can you point me in the right direction?

  • So, the CPU never stops running unless you tell it to stop. 6mA is the expected current when the CPU is running. Just having a main function without a while loop, means that the CPU will exit main and continue running some random place in memory and most likely hardfault. So you need a while loop. If you put __WFE() inside that while loop, the CPU will pause and wait for an event (WFE = wait for event) to continue. So the source code for the lowest consumption will be like this:

    int main(void){
    while(true){
    __WFE();
    }
    }
Related