-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
docs/ESP32: Reinitialize watchdog timer with longer timeout. #11981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
I think we discussed this before, that the idea of a WDT is that it cannot be reconfigured. That's a feature, not a limitation, because it prevents code from accidentally disabling the WDT (eg by setting the timeout to a very large number). If the WDT cannot be fed fast enough then other things should be fixed so it can be fed fast enough. |
Let's start from the very beginning. A problem occurs when you want to update the software: SOLUTION: Re-initializing the WDT gives you time to update the software. boot.py is not interesting
main.py starts automatically
|
@IhorNehrutsa I liked so much you PR, because I will need to update my What I'm thinking to do is:
I think that using this approach you do not need to change the watchdog timer. Does that make sense for you? Thank you! |
@beyonlo |
@beyonlo @IhorNehrutsa I know this works because I've been working on it for a while at asyncmd. The only limitation (apart from time precision) I've found so far when it comes to the number of tasks currently running is memory which if using a Footnotes
|
@Carglglz I did read about the aiorepl and it is wonderful - I want to use it the future for real time inspection :) But in my case I need to download a Problem is that write data in the flash is blocking. So, with watchdog timer with 1 second, to write/unpack all that data in the flash will take more than 1s. So, even that I'm using |
@IhorNehrutsa I not started to write that |
@IhorNehrutsa There is a PR for an |
I recognise that 1s watchdog timeout is pretty tight, any reason why 5s or 10s wouldn't work?
The only trade-off I see is that it would be a few seconds slower I guess... 🤔 |
Hello @Carglglz
In my case I need to read some sensors each ~500 ms (it is a prerequisite - I have a thread just for that) with max 1s/2s, and if that do not read in until 2s, I need to act a relay(alarm)
Yes, I though in that too. I'm already using the new In my opinion/my vision, maybe is much dangerous to work in the limit of watchdog timeout during the |
0f14af5
to
b2770e2
Compare
docs/ESP32: Reinitialize watchdog timer with longer timeout. Signed-off-by: Ihor Nehrutsa <IhorNehrutsa@gmail.com>
b2770e2
to
77a5199
Compare
If the WDT timeout is short(several seconds), a problem occurs when updating the software:
you don't have enough time to copy updates to the device.
ESP32 allows reinitializing the watchdog with a longer timeout - like an hour.
Discussion in
ESP32/machine_wdt.c: Add WDT.deinit() method. #6631
The best explanation at comment
This PR is a copy of #10901 which was damaged due to rebase.