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

    GPy still dies even with WDT enabled

    Scheduled Pinned Locked Moved GPy
    7 Posts 4 Posters 532 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.
    • C Offline
      curtis.hendrix
      last edited by

      I've been tearing my hair out trying to get my GPy to operate for more than 24 hours without a hard power cycle.

      I have the watchdog enabled, configured for 1 minute on system startup, and it gets fed routinely during code operation.

      So what can cause the system to go all dead to the point that even the WDT can't bring it back?

      M 1 Reply Last reply Reply Quote 0
      • M Offline
        Martinnn @curtis.hendrix
        last edited by

        @curtis-hendrix does it say something?
        A guru meditation error does that. I had to add a hardware watchdog to make my boards operate reliably. Also try a different board, not all are created equal.

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          curtis.hendrix @Martinnn
          last edited by curtis.hendrix

          @Martinnn I didn't have my laptop hooked up to to board. The main loop flashes the LED in a very noticeable pattern, and the LED was not flashing at all (not even the heartbeat).

          I have debug prints scattered through the code, so if it was still running I would see those statements how up on the REPL.

          C 1 Reply Last reply Reply Quote 0
          • C Offline
            curtis.hendrix @curtis.hendrix
            last edited by

            I have the main loop wrapped in a try - finally block, like so:

            try:
            #main loop code
            finally:
                machine.reset()
            

            Which according to the documentation https://docs.pycom.io/gettingstarted/programming/safeboot.html should be the exact same as doing a power cycle. main.py contains my main code, so it should start executing automatically on startup.

            M C 2 Replies Last reply Reply Quote 0
            • M Offline
              Martinnn @curtis.hendrix
              last edited by

              @curtis-hendrix Connect your device to a terminal, if it crashes because of a guru meditation error, you'll see at least the beginning of the crash message. I doubt the try: loop will help in this case.

              1 Reply Last reply Reply Quote 0
              • C Offline
                crumble @curtis.hendrix
                last edited by

                The Guru Meditaion is an error of the operating system, which stops after this message. The internal watchdog needs a running OS.

                1 Reply Last reply Reply Quote 0
                • K Offline
                  kjm
                  last edited by

                  Which watchdog are you using?

                  The pycom.wdt_on_boot(True); pycom.wdt_on_boot_timeout(30000) is normally setup before you run your code & it's pretty useless. It will only reboot an idle gpy, won't wake it from deepsleep, won't cover boot.py or main.py latchups, heartbeat fails or pycoms unique zombie 4s blue flash which looks like a heartbeat but isn't.

                  The wdt=machine.WDT(timeout=30000), on the other hand, I've found to be more useful.

                  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