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

    machine.pin_deepsleep_wakeup function is not working in LOPY4 firmware version 1.19.0.b2

    Scheduled Pinned Locked Moved Firmware
    5 Posts 5 Posters 1.2k Views 5 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.
    • B Offline
      bigboy20769
      last edited by

      I want to make sure that I am correct about the firmware issue. I am struggling tried to run a simple deep sleep function test, but finally, I think I found out the culprit. The function pin_deepsleep_wakeup is not included in the LoPy4 firmware version 1.19.0.b2, instead it is pin_sleep_wakeup! (word deep is missing). I am indeed puzzled why no one noticed it.

      Orginal code not working:
      machine.pin_deepsleep_wakeup(['P8'], mode=machine.WAKEUP_ANY_HIGH, enable_pull=True)
      machine.deepsleep(40)

      Modified code working:
      machine.pin_sleep_wakeup(['P8'], mode=machine.WAKEUP_ANY_HIGH, enable_pull=True)
      machine.deepsleep(40)

      Dillip

      philwilkinsonP 1 Reply Last reply Reply Quote 0
      • philwilkinsonP Offline
        philwilkinson @bigboy20769
        last edited by

        @bigboy20769 deep sleep class is only used for the deep sleep shield. Lopy4 does not use the deep sleep shield.

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

          @philwilkinson OP is not using the deep sleep shield library but machine.deepsleep which is the “native” deep sleep.

          @bigboy20769 I kind of remember the name change being alluded to in the release notes of a recent firmware version. Documentation is not up to date though.

          1 Reply Last reply Reply Quote 0
          • S Offline
            serafimsaudade
            last edited by

            I got a PGy with 1.19.0.b4 firmware and "pin_deepsleep_wakeup" don't exist, but
            "pin_sleep_wakeup" exists, and works as expected.

            I think, the official documentation need a revision.

            cumps,

            1 Reply Last reply Reply Quote 0
            • danD Offline
              dan
              last edited by

              Hi @bigboy20769 and @serafimsaudade,

              It has indeed been changed. Just to note that you're using development firmware while the documentation is based on the stable version. If you check the dev documentation, you can find the changed method. Once the dev firmware has been released, the main documentation will be updated as well.

              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