-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
[TW#12379] esp_ota_begin() runs into default 5s watchdog on large firmware binaries #578
Comments
Hi @flyinggorilla ,thank for your report,yes, it should let IDLE task feed task WDT,this is a loop in functions "spi_flash_erase_range", add a "vTaskDelay" in the loop will fix your issue,I think @igrr can give a perfect solution about it.
|
It gives this error even when i try upload blink code via OTA. Did you find any solution yet? |
@blmhemu as @tzxespressio mentioned, adding a vTaskDelay(1) inside the loop where you call esp_ota_write() should fix this problem. It's worth noting that the Task Watchdog is (in default config) not fatal, so even though these errors are printed the OTA should complete OK. You can also adjust the Task Watchdog timeout in menuconfig (under Component Config -> ESP32-Specific Config) up from 5 seconds to a larger number. It's firing because the OTA process is monopolising the system while writing to flash. It probably won't happen if you're not on a high speed connection like a LAN, where packets are coming faster than they can be written to flash - meaning the task is constantly starting a new write, and never pausing. All this said, it's still a bug we plan to fix so the default configuration doesn't print this error. |
@projectgus Thanks for getting to me. It says have written image length xxxx till some number and then hangs and never completes. For your record i have disable / increased the time of watch dog in menuconfig as well as have put some vTaskDelay (about 100 or 10 millisecond). I tried everything i could but it never completes it just stops at Have written image length yyyyy and no progress. I am attaching a image here for your reference. |
@liuzfesp please take a look (regarding |
Im working with example ota right now and im not having issues with flashing 1,5MB app over internet. |
Since this is a very old issue, I'm going to close it. Please feel free to reopen it if your problem is still unsolved. Thanks. |
hi, i am working on implementing OTA support and ran into this watchdog issue. I think the problem is that erasing the flash of large OTA partitions >1MB (i.e. 1280K) takes longer than 5s and then runs into the watchdog.
This issue can be worked around by increasing the "Task watchdog timeout (seconds)" from default 5s to 10s. So maybe thats good enough of a solution. However, since I dont like to deviate from defaults, I felt I report this back to you.
calling....
err = esp_ota_begin(mpUpdatePartition, OTA_SIZE_UNKNOWN, &mOtaHandle);
leads to...
with almost maximum OTA partition sizes...
Hope that helps,
Best,
FG
The text was updated successfully, but these errors were encountered: