This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Keep GPIO state during SYSTEM OFF

Hello,

I have a question regarding GPIO setting during sleep mode.

nRF52832 is sleep and wake-up by GPIO state(Red in below picture).

When Red is high, nRF52832 go to sleep mode. When Red is low, nRF52832  wake-up.

At -2 sec,  nRF52832  went to sleep.

And suddenly at -66 msec, Red become 1.7 volt.  

It looks like during sleep mode, GPIO become no pull.

Since a VDD_IO of sensor is connected to  GPIO.

I need to keep it high during sleep mode.

In 18.8 Reset behavior, it is specified that GPIO isn't retained when wake up from system OFF.

Is there a way to keep GPIO state?

Parents
  • Hello,

    When waking up from system OFF the GPIO peripheral registers will not maintain configured values, but the GPIO should behave the same. So if a pin was configured as input with pull-up, then it should still be input with pull-up after wakeup also, but make sure you re-configure the GPIO by writing to the GPIO registers after wakeup in any case. If this does not work as expected, then make sure to power cycle the chip before measuring GPIO and pin configuration, it can be that the chip is in debug mode if you don't power cycle, and in debug mode the chip will be in emulated system OFF and can behave slightly differently on wakeup.

    Best regards,
    Kenneth

Reply
  • Hello,

    When waking up from system OFF the GPIO peripheral registers will not maintain configured values, but the GPIO should behave the same. So if a pin was configured as input with pull-up, then it should still be input with pull-up after wakeup also, but make sure you re-configure the GPIO by writing to the GPIO registers after wakeup in any case. If this does not work as expected, then make sure to power cycle the chip before measuring GPIO and pin configuration, it can be that the chip is in debug mode if you don't power cycle, and in debug mode the chip will be in emulated system OFF and can behave slightly differently on wakeup.

    Best regards,
    Kenneth

Children
No Data
Related