WDT yet to be implemented?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
User avatar
jwissing
Posts: 29
Joined: Thu Jun 19, 2014 12:23 pm
Location: Germany

WDT yet to be implemented?

Post by jwissing » Mon May 09, 2016 3:53 pm

After deploying my nodeMCU with BME280, it reported for about 15 hours temp, humidity and pressure, which i consider a great success,
being able to assemble and program that stuff during one weekend.
But it stopped reporting after said 15 hours.
I had read about the WDT in the docs and wanted to give it a try before doing root cause analysis.
But module machine has no name WDT.
I hope it is still in the backlog and will be available later?

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: WDT yet to be implemented?

Post by pfalcon » Mon May 09, 2016 4:36 pm

WDT is run automatically by the system. So, even when it will be implemented for the sole purpose of "checkmark", it won't change much on your side. ESP8266 system firmware (as distributed by Espressif as binary blobs) contains dozens and dozens of places where if some low-level assertion fails, it just locks up the module. Yes, they could reboot it, but they lock it up instead.

To diagnose the issue, you would need to run it with serial terminal connected and see what you get in log (please post on github).

If you'd like to do something with it right now, the solution is simple and well known - don't wait till problem occurs to reboot, reboot proactively. And that's actually what you're doing anyway, if you're using deepsleep mode, and you want to use it for any battery-operated device. Deepsleep is effectively turns off power, and then reboots the device after timeout. That of course doesn't work that well for a "central", always-on node, but nobody told that ESP8266 works particularly well for that (well, I never heard Espressif saying that, so I can't blame them [too much], and (we MicroPython project) of course can't promise that either, if the device vendor doesn't do that).

Note that one of the aims of Kickstarter project was also to look into improving these things. But that requires serious reverse-engineering of ESP internals (as there're no source code provided). But last too months, I didn't find me having enough time to do any useful progress in that, busy with various other things. I definitely not doing that now either, writing all the responses here on the forum ;-).
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

User avatar
jwissing
Posts: 29
Joined: Thu Jun 19, 2014 12:23 pm
Location: Germany

Re: WDT yet to be implemented?

Post by jwissing » Mon May 09, 2016 4:42 pm

pfalcon wrote:...
Thank you for the long explanation.
I had not yet used deepsleep but will try that route.

Post Reply