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

    18s wakeup time from deepsleep

    Scheduled Pinned Locked Moved GPy
    gpydeepsleep
    2 Posts 2 Posters 226 Views 2 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.
    • K Offline
      kjm
      last edited by

      When main.py runs after a deepsleep, the 2nd line (after the imports) is

      start=utime.ticks_ms()
      

      the last line in the program is

      end=utime.ticks_ms(); diff=end-start; sleep=600-diff; machine.deepsleep(sleep*1000)
      

      diff is essentially the time it took for the program to run & I subtract it from 10 mins to get the deepsleep time. I figured this would give me an update every 10 mins, but it actually updates every 10.3mins. I'm thinking the extra 18s must be the time between wakeup & the 2nd line of main.py? 18s seems a long time for main.py to start? Just curious.

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @kjm
        last edited by

        @kjm The Pycom devices need between 1-2 seconds to start up. There is some analysis of that in the forum, based on the supply current analysis. LTE devices are slower than e.g. the WiPy. I do not know what's in your main.py script. But that one may take some time. LTE.attach() from power on for instance takes at my place 15 seconds and more.

        P.S.: Your formula above looks a little bit strange, because in the statement:
        sleep=600-diff
        you mix physical units. The unit of 600 is implicitly s (seconds), the unit of diff is ms (milliseconds).

        1 Reply Last reply Reply Quote 0

        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