How to achive power optimisation in NRF5340

Hi,

We are trying to attain power optimization in our project, which uses the nRF5340 board. In our code we have implimented RTOS, BLE for data transfer and are using i2c and spi for other device communication, uart for data logging.
 We tried enabling the System and Device power management in our prj.conf file as mentioned in the post optimizing-power-on-nrf53-designs  but found no difference in the current consuption.    

  1. By testing, we have found that calling the function k_sleep() decreases the current consumption. What is the relevance of k_sleep() in power consumption?
  2. The RTOS waits for events to be set to execute the necessary process in our project. Does the device go to sleep while waiting for the event?
  3. If a pin is undefined, is there any chance it draws current via the pin? Some of the pins, we are not using in the code—do we need to undefine those pins?
  4. Does UART logging consume more power?
  5. What is the minimum power consumption we can achieve with this device configuration?
  6. How can we control power management in the device?

  • Hi Maya,

    I will try to answer them one by one.

    By testing, we have found that calling the function k_sleep() decreases the current consumption. What is the relevance of k_sleep() in power consumption?

    This function is used to put the thread which calls it, to sleep, for a specified period. When any thread calls the k_sleep(), the scheduler will put the CPU into a low power state if there are no other ready threads. Hence there is a reduction in the power consumption.

    The RTOS waits for events to be set to execute the necessary process in our project. Does the device go to sleep while waiting for the event?

    Yes of course. The device can enter a low-power state if you have enabled power management (CONFIG_PM). If so, the idle thread will put your system in the lowest possible power state thereby reducing the power consumption.

    If a pin is undefined, is there any chance it draws current via the pin? Some of the pins, we are not using in the code—do we need to undefine those pins?

    The default state of all GPIO pins in nRF5340 is as a disconnected input. Unless you've previously configured them to something else, you can leave unused pins in their default state and also physically disconnected to draw no current. That being said, it's always a good practice to not leave unused pins floating and define the state of unused pins.

    Does UART logging consume more power?

    Definitely. If you are not using UART, then it's better to disable it in order to conserve power and in case you need it, enable it only when it's needed and disable them soon after, because as long as UART is active, this prevents the MCU from entering any deeper sleep modes. You can utitilize the power management API.

    What is the minimum power consumption we can achieve with this device configuration?

    The nRF5340 can achieve very low power consumption, potentially down to microampere levels, when properly configured and in a sleep mode with all peripherals disabled. We cannot guarantee a definite number, as this depends on various factors like your device configuration, power management strategies you use, and your peripherals etc. But there have been instances where upto 8uA have been achieved.

    How can we control power management in the device?

    There are various methods like disabling unused peripherals, setting them into a particular power state, checking your hardware settings, and such. You can, as mentioned previously, take a look at the power management API which can be of help. You can also use the PPK2 or the Online power profiler to optimize your designs and consumption.

    Regards,

    Priyanka

  • Hi,

    We tried some of your suggestions, but we are still unable to reduce the current consumption to the microampere range as mentioned.

    1.  Additionally, in our code, we have enabled the OTA DFU function and added a related child image. Could this affect the device's power consumption in any way?

    We are using SDK version 2.4.2

    Thanks

  • Yes, enabling OTA DFU will cause a slightly higher power consumption because, of course it invloves wireless activity. Moreover the DFU might involve some background tasks in which the processor might be involved. Also, the child image will require some extra storage space and you extra code to handle the DFU will also take up some space. In case there are periodic checks for the OTA DFU, this can also contribute in power consumption.

    -Priyanka

  • Hi,

    We tried disabling every peripheral, log, and BLE on our custom board and achieved a current consumption in the 85 µA range. The code only contained a while loop with a 1-second delay. we have enabled (CONFIG_PM) in the .conf file.
    However, when we added BLE configurations and initialization to the same code, we observed the current consumption rise to around 1.6 mA.
    We are observing a current consumption of around 365 µA on the nrf5340 DK board when using the same code.

    Is there a possibility of power consumption through these disabled pins?
    Do you know what we might be doing wrong?

    Regard,
    Maya

  • Hi Maya,

    The power consumption, as mentioned earlier, can depend on your designs. So when you say that the DK current consumption is lesser than your custom boards, it would also be helpful to compare the hardware of both the boards, because this can influence the current consumption.

    -Priyanka

Related