OTA firmware update causes watchdog timer to bite #431
-
|
Hey all. Really appreciate the effort that's gone into the autoconnect project. I'm using Arudino IDE and an ESP32 for a fun project that I'm working on. When I upload new firmware, I get bitten by the watchdog timer before the file finishes uploading. My Here's my serial output from the ESP32: Here's the relevant section of my task: Has anyone else encountered this? Would love any high level advice or hints. Could I perhaps disable the watchdog timer while the firmware is uploading, and then re-enable it dynamically? Thanks all! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
|
I suspect that a solution has been found! I added some superstitious Suddenly, the captive portal is a lot more responsive (faster between page loads) and the firmware upgrade now works, the WDT doesn't bite. I've read that core 0 handles Wifi and BLE, and that if you're using Wifi or BLE, that it's advisable to keep all your application logic on the other core, core 1. So that seems to have done the trick! Hope someone else is helped by this possible solution. Thanks again for making and maintaining the library all. |
Beta Was this translation helpful? Give feedback.
-
|
I have the same problem with an ESP32-S2-wroover module. This is a single core, so cannot switch the portal to another core. I try to find the offending core in the update firmware code, but cannot find it. I have lower the loop priority to the IDLE priority and I have the same problem. On esp32-s2 the watchdog is biting in a ISR context, So I don't know if this is a AutoConnect problem OR an IDF problem. |
Beta Was this translation helpful? Give feedback.
-
|
@andrewclapham @dumarjo Sorry for the late reply. First, in response to @andrewclapham; It might be worth trying And to @dumarjo; Can you let me know more about the conditions under which the phenomenon you are encountering occurs? Usually, the ISR needs to degenerate to a quite few steps. Otherwise, it will be banned by the WDT. Also, processes that prevent thread switching, such as while (1) break; loops, are also trapped by the WDT. |
Beta Was this translation helpful? Give feedback.
-
|
Hey @Hieromon no problem at all, thanks for the utility, I'm getting a huge amount of value out of it. If the problem arises again, I'll replace |
Beta Was this translation helpful? Give feedback.
I suspect that a solution has been found!
I added some superstitious
yield();commands in the offending task, but more importantly, I switched runningestablishWifiTaskfrom core 0 to core 1.Suddenly, the captive portal is a lot more responsive (faster between page loads) and the firmware upgrade now works, the WDT doesn't bite.
I've read that core 0 handles Wifi and BLE, and that if you're using Wifi or BLE, that it's advisable to keep all your application logic on the other core, core 1. So that seems to have done the trick!
Hope someone else is helped by this possible solution.
Thanks again for making and maintaining the library all.
Andrew