GPIO pin behaviour in Deep Sleep mode



  • Just a clarification really before I add electrical complexity to my project that's not needed.

    Am I correct in assuming that regardless of pull-up or pull-down set on pins. Once we enter deep sleep mode all inputs and outputs will float ? Is this true even of the pins in the RTC domain, such as P8 ?

    The reason I ask is that I'm integrating a coulomb counter to monitor my active state battery consumption and need to pull a pin low on the counter to hold it in sleep mode.
    I'm guessing I'll need to do it with an external resistor and then pull it high in the code in order for it to stay low in deepsleep, is that correct ?



  • Just in case anyone else searches for this. Yes pin.hold works during a deep sleep but as obvious as it is now it only works on pins in the RTC domain on the pinout (and naturally not the input only pins). You can set pin.hold on any pin but it's only effective on those.



  • @jcaron sorry that's a good point, we'll be deploying on L01 boards so no deep sleep shield required.



  • @wstallwood you should probably clarify what deep sleep you are asking about:

    • LoPy deep sleep
    • LoPy 4 deep sleep
    • deep sleep shield deep sleep
    • PySense deep sleep
    • PyTrack deep sleep

    They behave quite differently...



  • @wstallwood
    I suppose you can use pin.hold
    https://docs.pycom.io/chapter/firmwareapi/pycom/machine/Pin.html
    it restore state after sleep, but you must test if it then float during sleep
    It should not but..


Log in to reply
 

Pycom on Twitter

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.