-->
Page 1 of 6

Deepsleep and Watchodog timer example?

PostPosted: Wed Jul 18, 2018 2:42 am
by panoss
I want to use a watchdog timer to reset the NodeMCU in case it 'freezes'.
Is there any example code using deepsleep and watchdog?

Re: Deepsleep and Watchodog timer example?

PostPosted: Wed Jul 18, 2018 4:33 am
by QuickFix
I'm afraid it's a bit of a contradiction (in software): a SW-watchdog is active while the code is running and when deep sleep is active, no code is running. :?

You could, of course, create an external watchdog in hardware that trips when the ESP isn't woken from deep sleep. :idea:

Re: Deepsleep and Watchodog timer example?

PostPosted: Wed Jul 18, 2018 4:50 am
by panoss
How about it 's harware watchdog? Can it be used?

Re: Deepsleep and Watchodog timer example?

PostPosted: Wed Jul 18, 2018 5:24 am
by btidey
Both hardware and software watchdogs are there to catch running application freezes or timeouts.

In sleep nothing is running except for the timer that will trigger a wake. So the internal watchdogs are not relevant.