Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Best low-power sleep mode for nRF52832 with GPIO wake-up

Hello,

I’m developing a project using the nRF52832 and I’d like to put the MCU into the lowest possible power consumption mode while still being able to wake it up via a GPIO interrupt (e.g., a Level Switch press).

Could you please advise:

  1. What is the best power-saving instruction or API call in Zephyr RTOS for this use case?

  2. Which sleep mode (System ON, System OFF, Idle, etc.) is most appropriate for allowing wake-up from a GPIO pin?

  3. Are there any specific configurations required in prj.conf or the device tree to enable this functionality?

Thank you in advance for your guidance.

Best regards,


Luiz Miranda

Parents Reply Children
  • Hello:

    Does system_off mean restarting the application as if it had been powered back on?
    If so, it's not good for my application.
    I need the best power-saving mode that restarting the application after the instruction that placed the MCU into sleep mode.
    This instruction must to maintain saved all RAM.
    The MCU must to wake up after an interruption in a specific pin that i will define in app and it needs to make a specific procedure (example: sound a buzzer).

    Please tell me the typical sleep current is for it.

    Best Regards

    Luiz 

  • Hi Luiz,

    Yes correct, wake up from System OFF will trigger a system reset so it sounds like System ON mode sleep is what you need. This mode is entered automatically by Zephyr when the program enters the System IDLE thread when there are no pending tasks. To ensure low power in this mode, you can turn off the UART (set CONFIG_SERIAL=n in prj.conf) and make sure you use GPIOTE PORT and not GPIOTE IN events for button interrupts. Sleep current should be around 2 ua. This is with the RTC (kernel timer) used by the Zephyr active.

    - Zephyr button sample

    -  RE: how to reduce NRF52840 GPIOTE's power consume under NCS 2.9.1 ?  - how to use GPIOTE PORT events with zephyr GPIO API

    Best regards,

    Vidar

  • Hi Vidor:


    My case is:

    The PCB will have a Nrf52832 and a Switch.
    It is not a switch button. It is a Switch Level.

    1-) When the switch is pressed the program must to run an Alarme routine by interuption.
    2-) The routine will send an alarm (for example a continuos sound on Buzzer)
    3-) The switch will be released with a human intervetion.
    After that the sound is off on the buzzer and the program must to put the nRF52832 on sleep mode.
    4 -) The nRf52832 will wake up when the switch is pressed and the next steps are...Go to step 1 above.

    Do you have a logical to implement System OFF or it is only possible to use System IDLE?

    Regards

    Luiz

  • Hi Luiz,

    I'm not familiar with the term "switch level", so not sure whether you're using a push button, toggle switch, or something else, but it shouldn't matter. The pin interrupt will be triggered when the switch closes the circuit and pulls the input either high or low depending on if your circuit is active low or high.

    Luiz Miranda said:
    Do you have a logical to implement System OFF or it is only possible to use System IDLE?

    You can use System OFF mode too for the scenario you described. It was just that you mentioned earlier that this wouldn't work for your application.

    Regards,

    Vidar

Related