GPy still dies even with WDT enabled
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?
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.
The Guru Meditaion is an error of the operating system, which stops after this message. The internal watchdog needs a running OS.
@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.
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.pycontains my main code, so it should start executing automatically on startup.
@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.
@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.