• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32 watchdog timer in deep sleep

Q&A Forum › ESP32 watchdog timer in deep sleep
0 Vote Up Vote Down
David Morgan asked 2 years ago

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

5 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

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

0 Vote Up Vote Down
David Morgan answered 2 years ago

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
 
 

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

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

0 Vote Up Vote Down
David Morgan answered 2 years ago

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

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Ok.
Then, let me know your results.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.

      Notifications