Editing
esp
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===WDT- Watchdog Timer=== [https://arduino-esp8266.readthedocs.io/en/latest/boards.html#boot-messages-and-modes Boot messages and Modes]<br> Here is a very [https://www.sigmdel.ca/michel/program/esp8266/arduino/watchdogs_en.html detailed explanation] of the Watchdog timers in the ESP8266.<br> The ESP8266 is a little different than the standard Arduino boards in that it has the watchdog(WDT) turned on by default. If the watchdog timer isn't periodically reset then it will automatically reset your ESP8266. The watchdog is reset every time '''loop()''' runs or you call '''delay()''' or '''yield()''' but if you have blocking code like a while or for loop, then the watchdog may time out, resulting in your reset.<br> The '''delay()''' function is blocking so this prevents other code from running while it's sitting there waiting out the delay. '''delay()''' doesn't cause WDT reset though because it automatically calls '''yield()''' to prevent that.<br> When the ESP reboots, you get the reboot cause: ets Jan 8 2013,rst cause:2, boot mode:(3,7) *Soft WDT: Cause 2 *Hardware WDT: Cause 4 ;Cause for reset: {| class="wikitable" |- ! Number ! Description |- | 0 | unknown |- | 1 | normal boot |- | 2 | reset pin |- | 3 | software reset |- | 4 | watchdog reset |} <br> ;Boot Mode {| class="wikitable" |- ! Number ! GPIO15 ! GPIO0 ! GPIO2 ! Mode |- | 0 | 0V | 0V | 0V | Not valid |- | 1 | 0V | 0V | 3.3V | Uart |- | 2 | 0V | 3.3V | 0V | Not valid |- | 3 | 0V | 3.3V | 3.3V | Flash |- | 4 | 3.3V | 0V | 0V | SDIO |- | 5 | 3.3V | 0V | 3.3V | SDIO |- | 6 | 3.3V | 3.3V | 0V | SDIO |- | 7 | 3.3V | 3.3V | 3.3V | SDIO |} <br> The timeout for the hardware watchdog is 8.2 seconds, and 3.2 seconds for the software watchdog timeout<br> Don't block software watchdog too long with blocking code, otherwise it will trigger hardware watchdog reset.<br> You can reset the WDT inside your blocking code with: ESP.wdt_reset() or yield(); {{template:top}}
Summary:
Please note that all contributions to Notebook may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Notebook:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Home Page
C++ Reference
ESP Hardware
ESPHome
Home Assistant
Network Stuff
Tools
What links here
Related changes
Special pages
Page information