Feed hardware watchdog timer while in deep sleep

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
newb
Posts: 43
Joined: Wed Jan 10, 2018 8:19 pm
Location: Bulgaria

Feed hardware watchdog timer while in deep sleep

Post by newb » Thu Jan 24, 2019 6:46 am

Is it possible to feed hardware watchdog timer such as STWD100 while esp8266 is in deep sleep? Depending on the particular model the WDT's maximum timeout is between 2.24ms and 142ms, but I put my esp8266 for about 30min in deep sleep. I assume you can't work with the esp8266 pins while it's in deep sleep?

kevinkk525
Posts: 969
Joined: Sat Feb 03, 2018 7:02 pm

Re: Feed hardware watchdog timer while in deep sleep

Post by kevinkk525 » Thu Jan 24, 2019 7:39 am

No you can't work with anything on the esp8266 while in deep sleep. That's why it's called deep sleep.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode

newb
Posts: 43
Joined: Wed Jan 10, 2018 8:19 pm
Location: Bulgaria

Re: Feed hardware watchdog timer while in deep sleep

Post by newb » Thu Jan 24, 2019 8:24 am

Thanks, Kevin. On a second thought, any hangs would happen while esp8266 is working, not in deep sleep mode, so feeding the hardware WDT wouldn't be a problem. Am I right?

kevinkk525
Posts: 969
Joined: Sat Feb 03, 2018 7:02 pm

Re: Feed hardware watchdog timer while in deep sleep

Post by kevinkk525 » Thu Jan 24, 2019 8:33 am

You should feed the hardware WDT when the esp is running and disabled it before deep sleep if it supports it.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode

newb
Posts: 43
Joined: Wed Jan 10, 2018 8:19 pm
Location: Bulgaria

Re: Feed hardware watchdog timer while in deep sleep

Post by newb » Thu Jan 24, 2019 2:01 pm

..and disabled it before deep sleep if it supports it
Aha! Thanks for the idea :D

Post Reply