Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    GPIO pin behaviour in Deep Sleep mode

    Scheduled Pinned Locked Moved LoPy
    lopy gpio
    5 Posts 3 Posters 1.3k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W Offline
      wstallwood
      last edited by

      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 ?

      L J 2 Replies Last reply Reply Quote 0
      • L Offline
        livius @wstallwood
        last edited by

        @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..

        think about people first, then computers

        W 1 Reply Last reply Reply Quote 0
        • J Offline
          jcaron @wstallwood
          last edited by

          @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...

          W 1 Reply Last reply Reply Quote 0
          • W Offline
            wstallwood @jcaron
            last edited by

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

            1 Reply Last reply Reply Quote 0
            • W Offline
              wstallwood @livius
              last edited by

              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.

              1 Reply Last reply Reply Quote 1

              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
              • 1 / 1
              • First post
                Last post

              Pycom on Twitter

              Pycom