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 ? -
@wstallwood
I suppose you can usepin.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.. -
@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...
-
@jcaron sorry that's a good point, we'll be deploying on L01 boards so no deep sleep shield required.
-
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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login