Enabling PM for blinky example on NRF9160 DK

Hi there,

I am new to the platform , we are working on a proof of concept to  reduce idle power consumption as low as possible on an NRF9160, I want to put the system in system off mode using pm_power_state_force and then wake it up with an interrupt. To accomplish this I wanted to take an example like blinky, setup an additional button input , force it into system off mode then wake up on the button press.  

The issue is that when i try to set CONFIG_PM=y, in the project config file, i see the warning :"CONFIG_PM was assigned the value y, but got the value n. Missing dependencies:
SOC_SERIES_EFR32BG22 || SOC_SERIES_EFR32BG27 || SOC_SERIES_EFR32MG24 || (SOC_SERIES_DA1469X && SOC_FAMILY_RENESAS_SMARTBOND) || (SYS_CLOCK_EXISTS && HAS_PM)" and I assume this is why I cant call :

pm_power_state_force(); in main

I am using the blinky example in sdk version 2.8.0 for further info.

Parents
  • Hello,

    The issue is that when i try to set CONFIG_PM=y, in the project config file, i see the warning

    Try using CONFIG_PM_DEVICE=y instead of CONFIG_PM=y.

    I see from zephyr's release notes that:

      * The following functions were renamed:
    
        * :c:func:`pm_power_state_next_get()` is now :c:func:`pm_state_next_get()`
        * :c:func:`pm_power_state_force()` is now :c:func:`pm_state_force()`

    Sp perhaps you need to use pm_state_force() instead of pm_power_state_force().

    However, you can also use sys_poweroff(), as demonstrated in the sample you can find in:

    NCS\zephyr\samples\boards\nordic\system_off. It is a small sample that just writes a few lines to the UART console, before disabling the uart, setting a gpio/button for wakeup, and enters system off.

    Best regards,

    Edvin

  • Hi Edwin, you are correct , it was renamed, however from SDK version 2.5.0 the PM subsystem was removed altogether. See:  NCS 2.5.0 NRF9160 PM discussion . I got an older version , added the PM call to go into system off mode and was successful, I can wake with button press but I can see that it is impossible to wake with a timer , which is  a requirement, do you have any suggestions to minimize power consumption?

  • Hello,

    Unfortunately, it is not possible to have a timer running in System Off mode, and hence, it can not be used to wake up the device. The possible wake-up sources are listed here:

    https://docs.nordicsemi.com/bundle/ps_nrf9160/page/chapters/pmu/doc/operationmodes/system_off_mode.html

    So if you want to wake up on a timer, you need to use System On mode, which is a lighter form of sleep. This is the default state when the CPU is not actually running. So if you e.g. calls: k_sleep(K_MSEC(1000)); then it will set up a timer interrupt 1 second ahead, and enter system on mode. 

    In reality, it is a bit more complex, since you can have several threads in Zephyr, but when all threads are done with their tasks for now, it will automatically enter sleep/system on mode automatically.

    From system on mode, any interrupt will wake the device, and the application is not reset on wakeup.

    Best regards,

    Edvin

Reply Children
No Data
Related