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

    LoPy RTC loses time during deep-sleep

    Scheduled Pinned Locked Moved Issues & Bugs
    lopyrtcdeepsleep
    4 Posts 4 Posters 1.7k Views 4 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.
    • E Offline
      Eric24
      last edited by

      I'm seeing some very strange behavior with the LoPy RTC during deep-sleep mode (this is with the latest firmware that supports keeping the RTC alive during deep-sleep).

      From the REPL:

      1. Initialize the RTC to the now-current time using rtc.init((2017, 6, 16, ...)); note that you can use the (default) internal RC oscillator or the external 32KHz crystal (if you have one)--the effect is the same either way.
      2. Execute machine.deepsleep(5000); or any reasonable value--there is no apparent relationship between the deepsleep delay and the "lost" time.
      3. After the LoPy wakes up, execute rtc.now() to show the RTC's time.

      I would expect the RTC time to be the then-current time (or very, very close to it), but when I do this, the RTC "loses" time, typically several hundred seconds, but somewhat inconsistent. This happens each time I go through a deep-sleep cycle. But if I just let the LoPy sit there idle for a while, or running some sort of "exercise" loop, rtc.now() always returns the expected then-current time.

      Does anyone else see this same behavior? I want to be sure I'm not chasing a ghost.

      1 Reply Last reply Reply Quote 0
      • C Offline
        cfaessler
        last edited by

        Hello @Eric24 do you know if this has been resolved yet?

        L 1 Reply Last reply Reply Quote 0
        • B Offline
          bucknall
          last edited by

          Hi @Eric24 & @cfaessler,

          There is a problem with the machine.deepsleep() function on this version of the LoPy. Please see (https://forum.pycom.io/topic/1022/root-causes-of-high-deep-sleep-current/78) for more information about this.

          That means that when this function is called, it simply resets the device rather than putting it into deepsleep mode. You will need to use a Deep Sleep Shield to utilise this feature and to keep the RTC tracking, whilst the device is in deep sleep.

          Thanks,

          Alex

          Developer Evangelist - Pycom

          1 Reply Last reply Reply Quote 0
          • L Offline
            lposada @cfaessler
            last edited by

            @cfaessler did yoy fix this issue?

            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