Hi Sara and Rui
I enjoyed your tutorial on the ESP32 deep sleep. I’m now using the EXT0 and timer wakeup in a project. A feature I’d like to add is a watchdog timer. I think this needs to use the RTC wdt, but I’ve found the espressif documentation lacking in examples. Do you intend to add this feature, or has any user implemented some simple code (initialise the wdt, start, reset?).
Thanks!
Dave
Hi.
At the moment, we don’t have any tutorials or examples about that subject.
I think one of our readers, William Lucid, has some examples about that subject: https://github.com/Tech500/ESP32_Watchdog
I’m not sure if this is exactly what you’re looking for. Let me know what you think.
Regards,
Sara
Thanks Sara
I’m looking to implement a timer watchdog. Let’s say my system locks up unexpectedly, I’d like a system reboot to occur. So I’ll need to initialise the watchdog and then reset it periodically before it reaches the reboot time.
According to this post, you must use the rtc watchdog when in deep sleep:
https://esp32.com/viewtopic.php?t=13243
And I have found a code snippet to initialise the rtc_wdt, but I don’t see any code to reset the watchdog
https://www.esp32.com/viewtopic.php?t=14705
Alternatively, perhaps I could create my own watchdog as another timer interrupt from deep sleep, if I can reboot the ESP in code.
Anyway, it would be nice if someone has solved this problem already!
Thanks
Dave
Hi again.
Unfortunately, this is not a subject that I’m familiar with.
Have you taken a look at the example I shared with you? Is that useful for your scenario?
Regards,
Sara
Hi Sara
The example you shared implements a user created watchdog rather than the inbuilt rtc_wdt.
I will experiment with both. Thanks for your help
Dave