NRF9151DK (NCS v3.0.2, Zephyr) - Best practice to go into sleep mode with RTC and GPIO wakeup

Hello,

I need support regarding putting my device to low power mode (sleep) and waking up with a timer or GPIO input.


I’m working on an application using the nRF9151 DK, with nRF Connect SDK v3.0.2 (Zephyr RTOS).

My goal is:

Put the device into a low-power sleep mode and waking it up periodically using (mainly) RTC and in some cases with a GPIO interrupt

I’ve read the documentation and multiple forum messages, but I am still struggling to get a minimal working example. 

I have managed to fire an alarm using the Counter API from Zephyr but can't seem to get the device to go to sleep. 

I can't figure out which Zephyr power management API I should be using (pm_state_force, k_sleep)? I have seen that some have suggested the pm_state_force but this seems to be unavailable for nrf9151 DK.

Any help would be appreciated

Parents
  • Though the nRF9151 is a SoC, it comes with different components and so also with different sleeping strategies. The two main components are:

    - the modem (that takes the most of the energy, if active)

    - the cortex-m33 application processor.

    To put the modem in a low power state, PSM is used very frequently. In some cases eDRX may get used and it's also not that uncommon to switch it on/off (lte_lc_normal/lte_lc_power_off).

    Your application processor will go in a low power state, if you use k_sleep or wait for something (e.g. k_sem_take or k_mutex_lock or poll). If you use multiple threads, all need to wait for something. The only thing you should not do is "waiting in a busy-loop".

Reply
  • Though the nRF9151 is a SoC, it comes with different components and so also with different sleeping strategies. The two main components are:

    - the modem (that takes the most of the energy, if active)

    - the cortex-m33 application processor.

    To put the modem in a low power state, PSM is used very frequently. In some cases eDRX may get used and it's also not that uncommon to switch it on/off (lte_lc_normal/lte_lc_power_off).

    Your application processor will go in a low power state, if you use k_sleep or wait for something (e.g. k_sem_take or k_mutex_lock or poll). If you use multiple threads, all need to wait for something. The only thing you should not do is "waiting in a busy-loop".

Children
No Data
Related