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 freezes after 6 - 12 hours

    Scheduled Pinned Locked Moved LoPy
    lopyfreezeserial
    7 Posts 3 Posters 745 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.
    • M Offline
      morpheus
      last edited by morpheus

      Hello everyone,

      i'm having some trouble with a lopy 4, it runs like expected for 6 -12 hours and suddenly freezes, no heartbeat anymore.
      Pushing the reset button brings it back to life.
      Here's some example code:

          wdt = WDT(timeout=4000) 
          while True:
      
           wdt.feed()
           foobar.read() 
          #foobar.read just reads serial data, send's data via raw-lora and writes data from lora 
             #back to serial. 
           gc.collect()
           machine.idle()
           print("main loop")
           time.sleep(1)
      

      Can someone explain why the watchdog doesn't work as expected or any idea why the lopy4 is acting up?

      Ps: Firmware is latest stable.

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

        The watchdog will work only, if you run into a python problem. If the OS fails with a Guru Meditation or you run into an ESP32 error, only an external watchdog will help.

        You can try the latest unstable version. On my task this version is much more stable than 1.18.x. Pycom updated esp idf which fixed a lot of stuff related to threads and timers.

        M 2 Replies Last reply Reply Quote 0
        • M Offline
          morpheus @crumble
          last edited by

          @crumble thanks, I will try out a the dev-branche today and give feedback tomorrow.
          Interesting detail, the error seems related with the activ watchdog and "higher" (20 bytes every 10 seconds) throughput on the serial interface.
          A older testdevice without a watchdog and less communication made it through two weeks without any issues.

          1 Reply Last reply Reply Quote 0
          • M Offline
            morpheus @crumble
            last edited by

            @crumble your tip safed the day, i changed to unstable and the uptime now is >72h.
            Something like that should not happen in a stable version.

            C 1 Reply Last reply Reply Quote 0
            • C Offline
              crumble @morpheus
              last edited by

              @morpheus

              Something like that should not happen in a stable version.

              stable does not mean the absence of error ;)
              The problem is the used microcontroler. The ESP32 is young. So there are a lot of issues in hard- and software. Pycom just inherits these errors. To ensure the same behaviour, they cannot exchange the basic libraries in a stable branch. Changes in this area will have effects on the timings. If you have found an early slot to init the pytrack, you don't want to search for a new one when a small python error has been fixed.

              The amount of known error is really small ... compared to intel. But on intel machines you run really seldom into them. The ESP32 has some basic problems, which seems not to be fixed completly by the OS. I assume that most of my i2c problems can be blamed on the MC and the IDF.

              I do not understand why pycom does not declare the 1.20 branch as stable. It fixed so many errors for me that I like to see it as the stable branch. Maybe they want to deploy it together with some cloud changes. But 23 will be the better number for this ;)

              M P 2 Replies Last reply Reply Quote 0
              • M Offline
                morpheus @crumble
                last edited by

                @crumble

                stable does not mean the absence of error ;)

                I know, it's just frustrating because there is no real debubbing interface, but I will not throw in the towel so fast ;)

                Thanks again for your help!

                1 Reply Last reply Reply Quote 0
                • P Offline
                  Paul Thornton @crumble
                  last edited by

                  @crumble said in Lopy freezes after 6 - 12 hours:

                  I do not understand why pycom does not declare the 1.20 branch as stable. It fixed so many errors for me that I like to see it as the stable branch. Maybe they want to deploy it together with some cloud changes. But 23 will be the better number for this ;)

                  Features are still being worked on and improved. Even more stability cant hurt :D

                  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