-->
Page 1 of 3

watchdog

PostPosted: Mon Jul 06, 2015 2:43 pm
by brutzler
Hi,
does anybody have an example for a watchdog timer on the ESP8266?

Re: watchdog

PostPosted: Mon Jul 06, 2015 2:59 pm
by kolban
Howdy,
What do you mean by an example? The watchdog timer is part of the ESP8266 OS to ensure that it gets serviced enough to keep WiFi and TCP/IP happily. Are you trying to disable the watchdog timer? What is it you want to do with it?

Re: watchdog

PostPosted: Mon Jul 06, 2015 3:02 pm
by brutzler
Hi,

there is already one bulit in? Nice to know :-)
No, I do not want to disable it.
Is there somewhere more info? How long is the default watchdog time? Can I change it?

Re: watchdog

PostPosted: Mon Jul 06, 2015 4:18 pm
by kolban
The built in watchdog timer is built into the ESP8266 OS. If application code takes too long to return control to the OS, the watchdog timer fires and the device restarts itself. Docs are still loose on this but some notes say 1 second some say 6 seconds. I don't know of a way to change the interval. Recommendations say to return control to the OS before 50msecs have passed. In the 1.2 SDK there is talk of API to disable the "software" watchdog timer (soft_wdt) which alludes to their being perhaps more than 1 watchdog timer.

Is this what you are meaning? What did you have in mind when you said a "watchdog" timer? This may mean different things to different folks. Are you perhaps talking about general purpose timers than you can use to pass control to user code at periodic intervals?