This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

power manager: How to handle the situation when battery is dangerously low?

Hi,

I am currently developing a product which is supplied with battries (chip is nRF52810). Under normal conditions, the product goes into system OFF mode in standby, it can be woken up by GPIOTE.

However, when the battery level is dangerously low, It should not wake up, instead, it is optimal that it stays in system OFF mode.

I see that it is recommanded in the "nrf_pwr_mgmt.h" file to use the enum NRF_PWR_MGMT_SHUTDOWN_STAY_IN_SYSOFF in this situation.

But my questions are:

1. how to use NRF_PWR_MGMT_SHUTDOWN_STAY_IN_SYSOFF to make sure that the product doesn't wake up unexpectedly?

2. what is the difference between NRF_PWR_MGMT_SHUTDOWN_GOTO_SYSOFF and NRF_PWR_MGMT_SHUTDOWN_STAY_IN_SYSOFF?

3. generally, how to handle the situation when battery is dangerously low and all functions shall be locked, what is the best way to do it?

  • Hi

    1. NRF_PWR_MGMT_SHUTDOWN_STAY_IN_SYSOFF can be called when the battery is measured to be I.E. <5%. So when this is called, you typically don't configure any wake-up. That way the device will stay OFF until you reset the board either by power cycling it or press the on-board reset button.

    2. You make the difference on your own terms, you decide when each of them should be called and what/if they configure as wake up pins. You can see how they''re both used in the power management example in our SDK, where an if-statement tells the device to either go to system OFF mode as usual or if it should go to system OFF and stay there.

    3. I would suggest referring to the power management example. When and how you put the device to STAY_IN_SYSOFF is entirely up to you, but I would maybe generate an event when the battery is measured to be what you define as very low that causes the device to stay in SYSOFF the next time it goes to sleep.

    Best regards,

    Simon

Related