Power optimization recommendations
Nordic System-on-Chip (SoC) designs are aimed at ease of use and ultra-low power consumption. However, working on a final design might require fine-tuning some areas of your application.
General recommendations
This section describe general recommendations for reducing power consumption of your application. These recommendations are valid regardless of the SoC you are using.
See also the documentation for the Zephyr RTOS Power Management subsystem. The subsystem provides interfaces and APIs that enable power management implementations for different SoCs and architectures.
Use power profiling tools
A power-optimized development ecosystem typically consists of the following developer tools:
nRF Connect SDK
Development kits
Power Profiler Kit II is a flexible, low-cost tool that you can use for real-time power measurement of your design. You can measure power on a connected development kit or any external board.
Together, these tools provide a unified solution for developers to evaluate, develop and characterize ultra-low power designs with ease. See Installation and Configuring and building for more information about the nRF Connect SDK and its development environment.
Disable serial logging
Current measurements on devices that have the nRF Connect SDK samples or applications programmed with the default configuration, might show elevated current values, when compared to the expected current values from Nordic ultra-low power SoCs. It is because most of the samples and applications in the nRF Connect SDK are configured to perform logging over serial port (associated with UART(E) peripheral) by default.
As an example, the image below shows the power measurement output on Power Profiler Kit II for an nRF9160 DK with the Blinky sample compiled for the nrf9160dk/nrf9160/ns
board target without modifications in the sample configuration.
The average current is close to 470 µA, which drains a 500 mAh lithium polymer battery approximately in six weeks. To reduce current consumption, disable serial logging.
To disable serial output, you must change the project configuration associated with the sample or application. See Configuring and building for information about how to permanently or temporarily change the configuration.
Note
If the application consists of multiple images, like applications built for the nRF53 Series, logging must be disabled on both images. See Developing with nRF53 Series and Multi-image builds using child and parent images.
Set the project configuration
CONFIG_SERIAL
ton
irrespective of whether you are building the sample for the SPE-only board targets or board targets with NSPE.For the board target with NSPE (for example,
nrf9160dk/nrf9160/ns
), ensure that serial logging is also disabled in Trusted Firmware-M by settingCONFIG_TFM_LOG_LEVEL_SILENCE
toy
.
The output on Power Profiler Kit II shows the power consumption on an nRF9160 DK with the sample compiled for the nrf9160dk/nrf9160/ns
board target with CONFIG_SERIAL=n
.
The average current reduces to 6 µA, which implies 9.5 years of battery life on a 500 mAh lithium polymer battery compared to the 6-week battery life of the previous measurement.
For a similar configuration, see the Cellular: UDP sample, which transmits UDP packets to an LTE network using an nRF91 Series DK.
You can use the sample to characterize the current consumption of the nRF91 Series SiP.
It is optimized for low power operation on the board targets nrf9151dk/nrf9151/ns
, nrf9161dk/nrf9161/ns
, and nrf9160dk/nrf9160/ns
without any modifications.
Verify idle current due to other peripherals
Peripherals other than the serial ports can also cause elevated currents.
The power management of the Nordic SoCs automatically switches in and out the resources that are needed by the active peripherals. Peripherals that need a high frequency clock like UART, PWM, PDM or high frequency timers will show similar currents if enabled.
You can check the current consumption in peripherals for the SoC or the SiP you are using in the relevant Product Specification’s “Power and clock management” section. For example, for the nRF9160 SiP, see the Electrical specification of nRF9160 page.
Note
Be careful with the use of pull-up resistors when designing the hardware for ultra-low power operation.
An I/O pin with a 10 kΩ pull-up resistor that is set to GND
will result in a current consumption of 300 µA at 3V.
Disable unused pins and peripherals
Some of the pins and peripherals are enabled by default for some boards. Depending on the peripheral or the pin type, they can increase the device power consumption to a different extent. If the application does not use them, make sure they are disabled.
To disable a particular peripheral, set its state in the board’s devicetree overlay to disabled
.
For example, for ADC:
&adc {
status = "disabled";
};
Enable Device Power Management module
The Device Power Management module provides an interface that the device drivers use to be informed about entering the suspend state or resuming from the suspend state. This allows the device drivers to do any necessary power management operations, such as turning off device clocks and peripherals, which lowers the power consumption.
To enable suspending peripherals when the CPU goes to sleep, set the CONFIG_PM_DEVICE
Kconfig option to y
.
Put the external flash into sleep mode in inactivity periods
When the CPU goes to sleep, some of the peripherals are suspended by their drivers. However, the driver is not always able to know the application behavior and handle the peripheral state optimally.
One such case is the external flash usage by the applications. It is very rarely used, and only for the Device Firmware Upgrade purposes. For this reason, you might want to suspend the external flash for the majority of the time and have it in active state only if needed. The state change for the Device Firmware Upgrade case is handled in the nRF Connect SDK, but for other proprietary use cases, you should handle state changes in your own implementation.
For example, to control the QSPI NOR external flash, you can use the following implementation:
#include <zephyr/pm/device.h>
const auto * qspi_dev = DEVICE_DT_GET(DT_INST(0, nordic_qspi_nor));
if (device_is_ready(qspi_dev))
{
// Put the peripheral into suspended state.
pm_device_action_run(qspi_dev, PM_DEVICE_ACTION_SUSPEND);
// Resume the peripheral from the suspended state.
pm_device_action_run(qspi_dev, PM_DEVICE_ACTION_RESUME);
}
Power down unused RAM
Optimizing the memory footprint of your application can reduce the amount of RAM used, but unused RAM still consumes power. You can power down this unused RAM to reduce the power consumption of your application. In the nRF Connect SDK, you can use the RAM power-down library for this purpose.
Configure radio transmitter power
The radio transmitter power (radio TX power) has a significant impact on the device power consumption. The higher the transmitter power, the greater the wireless communication range, but it also leads to higher power consumption. Make sure to choose the optimal configuration for your specific use case.
Protocol-specific recommendations
Besides applying General recommendations, read the following subsections for more information on how to optimize specific subsystems.
Bluetooth Mesh
The Bluetooth Mesh protocol offers the Low Power node (LPN) feature for optimizing the power consumption of the Bluetooth Mesh devices.
Gazell
Gazell is an asymmetrical protocol where the Device role is power-optimized. A Gazell Device attains the lowest current consumption during idle times. The Gazell Link Layer API provides functions for setting protocol parameters, including those that affect current consumption. From the power optimization point of view, the most important functions are:
nrf_gzll_set_tx_power()
.nrf_gzll_set_sync_lifetime()
- Adapt this parameter based on how often the application sends data to Host.When the link is synchronized, packets are transmitted faster, but an additional timer is running, consuming more current. However, when the link is out of sync, sending a single packet may require multiple transmissions until Device and Host find each other on the same channel at the same time.
nrf_gzll_set_max_tx_attempts()
- In poor RF conditions, retransmissions of each packet may be required, thus increasing the current consumption.Setting the value zero means unlimited retransmissions until a packet gets acknowledged.
Matter
To optimize the power consumption of your Matter application, complete the actions listed on the Reducing power consumption in Matter page.
NFC
The nRF Connect SDK provides implementations of two NFC libraries, Type 2 Tag and Type 4 Tag.
If you want to implement a read-only NFC tag with a short NDEF payload, use the Type 2 Tag library that implements a more lightweight protocol and therefore consumes less energy than the Type 4 Tag library. For larger payloads, the Type 4 Tag library may be more power-efficient, as it allows exchanging longer frames, which can shorten the overall data exchange.
These recommendations are very generic because the actual performance depends on the capabilities of the NFC polling device that reads the tag, so each specific use case needs a separate analysis.
The NFC libraries do not provide any configuration options that have a significant impact on current consumption. NFC can wake your application up from system off mode, so using this mode and NFC as a wakeup source can be a way to reduce current consumption.
Thread
The Thread protocol offers Sleepy End Device types for optimizing the power consumption of the Thread devices. Sleepy End Devices try to limit their power consumption by sleeping most of the time.
The Thread: CLI sample can be used to perform power consumption measurements when configured following some of the general recommendations. See the Power consumption measurements section of the sample documentation for more information.
Wi-Fi
The Wi-Fi protocol introduces the power save mechanism that allows the Station (STA) device to spend the majority of the time in a sleep state and wake up periodically to check for pending traffic. For more information about the Wi-Fi power save mechanism, see the Wi-Fi MAC layer documentation.
To enable the Wi-Fi power save mode, set the CONFIG_NRF_WIFI_LOW_POWER
Kconfig option to y
.
See Operating in power save modes for more information about the power save modes.