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

System power off for beaconing application

Hello,

Currently my beaconing application draws approximately 10uA @ 1000ms advertising interval. I am having trouble getting the chip into system power off mode so the chip only draws around 1uA of current. I have defined CONFIG_GPIO_AS_PINRESET and P0.21 is configured as RESET in system_nrf52.c (I am using PCA10040).

I have a few questions I was hoping could get answered.

  1. How do you implement sd_power_system_off() so when I press the IF BOOT/RESET button, the chip goes into power off mode?
  2. How do you check if the IF BOOT/RESET button is pressed?
    1. Do I check the status of P0.21 using nrf_gpio_pin_read()? And make sure the value is equal to 1?
  3. How can I use the same button so once I release it the system wakes up again?

Thank you for your help.

Parents
  • Hi,

    Thank you for your answer.

    So if I press the reset button, will the system automatically enter a power off state? When I test this with the PPK, pressing the reset pin has no effect on current consumption. The reason I am asking is because using a GPIO input will increase the current consumption, and ideally I want this to be as low as possible (around 10uA). I tested that by using GPIO, the system regularly consumes around 23 uA of current.

    Thank you

Reply
  • Hi,

    Thank you for your answer.

    So if I press the reset button, will the system automatically enter a power off state? When I test this with the PPK, pressing the reset pin has no effect on current consumption. The reason I am asking is because using a GPIO input will increase the current consumption, and ideally I want this to be as low as possible (around 10uA). I tested that by using GPIO, the system regularly consumes around 23 uA of current.

    Thank you

Children
  • Hi,

    AQS said:
    So if I press the reset button, will the system automatically enter a power off state?

    No. Pressing the reset button (if enabled in the UICR) will trigger a power-on-reset, so your application will run.

    AQS said:
    When I test this with the PPK, pressing the reset pin has no effect on current consumption

    That could make sense. If your application is doing whatever it normally does, and you press reset so that it starts doing the same thing again, you should expect to see the same current consumption.

    AQS said:
    The reason I am asking is because using a GPIO input will increase the current consumption, and ideally I want this to be as low as possible (around 10uA). I tested that by using GPIO, the system regularly consumes around 23 uA of current.

     You are probably seeing erratum 97. The workaround is to use port event instead, which should be just as good in this use case.

Related