How best to put the NRF52840 into power saving mode

Hello Everyone.

I intend to put my device in low power mode since my project is going to run on battery.

I have read a good number of articles and I am overwhelmed at this point.

Can someone please point me in the right direction, I would appreciate any type of help.

my project uses the following MCU resource:

The two uarts; one uart peripheral for sensor and one for gsm module.

NVS; I am logging data along with timestamp.

I want the NRF52840 to do the following;

  • Collect sensor data every 
  • log the data in NVS
  • lastly send the data to server.
  • Then enters the sleep mode. 

This should happen every 20secs.

from this site, I learnt about the following mode;

System OFF is the deepest power saving mode the system can enter. In this mode, the system’s core functionality is powered down and all ongoing tasks are terminated.

The device can be put into System OFF mode using the register SYSTEMOFF. When in System OFF mode, the device can be woken up through one of the following signals:

  • The DETECT signal, optionally generated by the GPIO peripheral.
  • The ANADETECT signal, optionally generated by the LPCOMP module.
  • The SENSE signal, optionally generated by the NFC module to wake-on-field.
  • Detecting a valid USB voltage on the VBUS pin (VBUS,DETECT).
  • A reset.

The system is reset when it wakes up from System OFF mode.

One or more RAM sections can be retained in System OFF mode, depending on the settings in the RAM[n].POWER registers. RAM[n].POWER are retained registers. These registers are usually overwritten by the start-up code provided with the nRF application examples.

System ON mode

System ON is the default state after power-on reset. In System ON mode, all functional blocks such as the CPU or peripherals can be in IDLE or RUN mode, depending on the configuration set by the software and the state of the application executing.

In System ON mode, when the CPU and all peripherals are in IDLE mode, the system can reside in one of the two sub-power modes.

The sub-power modes are:

  • Constant Latency
  • Low-power

In Constant Latency mode, the CPU wakeup latency and the PPI task response are constant and kept at a minimum. This is secured by forcing a set of basic resources to be turned on while in sleep. The cost of constant and predictable latency is increased power consumption. Constant Latency mode is selected by triggering the CONSTLAT task.

In Low-power mode, the automatic power management system described in System ON mode ensures that the most efficient supply option is chosen to save power. 

Which of these modes is best suited for what I want to accomplish, please? which of the functions do I need to call to set the NRF into either of these modes or do I have to use direct register manipulation?

What should I look at out for? Any tutorial or similar implementation that I could easily look at and study?

I'm using the NRF connect SDK. Thanks.

Parents
  • Hi,

    Just a few toughts:

    - Do you have a target usage defined?

    - Do you have any usage measurements of your current firmware?

    If not; please start with those, in many case's you dont need to do that much to reach low power usage.

    Without anything special i reach ~8uA with an active LTE connection in PSM mode.

    Once you have your baseline, try to figure out where the unwanted power is going, usualy it is a peripheral or the connection to it (uart/spi/etc).
    To turn of the nrf busses like uart; give the CONFIG_PM a shot, you just need a reference to the device, and call pm_device_action_run(dev-pointer, PM_DEVICE_ACTION_SUSPEND | PM_DEVICE_ACTION_RESUME)

    Grts,

Reply
  • Hi,

    Just a few toughts:

    - Do you have a target usage defined?

    - Do you have any usage measurements of your current firmware?

    If not; please start with those, in many case's you dont need to do that much to reach low power usage.

    Without anything special i reach ~8uA with an active LTE connection in PSM mode.

    Once you have your baseline, try to figure out where the unwanted power is going, usualy it is a peripheral or the connection to it (uart/spi/etc).
    To turn of the nrf busses like uart; give the CONFIG_PM a shot, you just need a reference to the device, and call pm_device_action_run(dev-pointer, PM_DEVICE_ACTION_SUSPEND | PM_DEVICE_ACTION_RESUME)

    Grts,

Children
Related