Low Power Current Consumption with nRF52833 Connect SDK vs nRF5 SDK

Hello!

I was wondering what methods exist to optimize either the configuration or code to get the lowest power consumption with the nRF Connect SDK?

Before I used the nRF5 SDK and, with the ble_app_uart example, was able to get 2uA current by commenting everything out and running just:

int main(void)
{
    for (;;)
    {
        idle_state_handle();
    }
}

Now, with the nRF Connect SDK commenting everything out and just running the following:

void main(void)
{
    for (;;)
    {
        k_sleep(K_FOREVER);
    }
}

And instead I get current jumping back and forth from 2uA to 200uA

For the nRF Connect SDK I am using the same peripheral_uart with the prj_minimal.conf. Not sure if there are other methods to optimize power or prevent this unstable power issue.

Please let me know if I am missing anything!

Thanks!

  • Hi Rahul,

    We have a whole chapter on Power Optimization in NCS here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_power_opt.html

    Please check it out. And in case you didn't know, we have an online power profiler where you can estimate your power draw with different features enabled/disabled, in case you need a reference:  Online Power Profiler for Bluetooth LE 

    It's possible that the 200uA draw you're seeing is caused by some internal pull-up/pull-down resistor, as was the case here:  Attaching Interrupt increases power to 200uA 

    I hope that helps!

    Best regards,

    Raoul

  • Hi Raoul,

    I have been experimenting further with this and using a PPK2 I have a few more questions:

    I have tried initializing SPI using two approaches: Zephyr and nRFX

    Zephyr

    To make things easier, I worked with the SPI_bitbang library, but removed all logs from the prj.conf file. Using this approach, I got 2mA of current. Seems SPI_bitbang draws a significant amount of current, unclear as to why that is.

    nRFx

    I have determined with the old nRF5 SDK that with just spi driver init with the following configs:

    mode = SPI_MODE_0, frequency=125k, bit order=MSB first, IRQ=2

    current is roughly 2uA.

    With the new nRF Connect SDK and the same initialization I see the following:

    The current consumption for some reason ramps up from 5uA to 100uA. Eventually it drops down and stays at 5uA. I'm not sure as to why this ramp up occurs. 

    Only thing I could think of is a compatibility issue with nRFx drivers and Zephyr RTOS causing this...but even so I'm not sure how to make it work with the Zephyr approach.

    I would suspect with an nRF52833 just doing SPI init would draw around 5-10uA. So I'm not sure how to proceed with either the nRFx or the Zephyr approach.

    Thanks,

    Rahul

  • Hi Rahul, sorry to let you wait.

    That's quite a difference in power consumption. First of all, are you using Zephyr's power management features at all? If not, that is definitely something to include.

    Further, Zephyr SPI has both a bitbanged and nrfx driver (see this case), and although I'm not 100% certain which one would be better for power consumption, I would think that bitbanging/software controlled SPI is worse as it prevents the CPU from sleeping during operation.

    Meanwhile the nrfx driver makes use of the serial communication hardware. When used with Power Management and in particular when enabling easyDMA, the CPU could remain completely asleep during communication. 

    My colleague tells me that the ramp up you are seeing is an indicator of a capacitor being charged up (and eventually discharged). If you could supply a PPK2 file of your measurements, we could take a closer look at this.

    Best regards,

    Raoul

Related