Skip to content
This repository was archived by the owner on Jul 6, 2024. It is now read-only.

ESP32: reset watchdog timer during update #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
ESP32: reset watchdog timer
Fixes:

E (20871) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (20871) task_wdt:  - IDLE (CPU 0)
E (20871) task_wdt: Tasks currently running:
E (20871) task_wdt: CPU 0: ipc0
E (20871) task_wdt: CPU 1: loopTask
E (20871) task_wdt: Aborting.
flowerysong committed Apr 28, 2022
commit 19580462cc0713691836ab3497d2e25a2541369c
2 changes: 2 additions & 0 deletions src/AsyncElegantOTA.cpp
Original file line number Diff line number Diff line change
@@ -80,6 +80,8 @@ void AsyncElegantOtaClass::begin(AsyncWebServer *server, const char* username, c
uint32_t maxSketchSpace = (ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000;
if (!Update.begin((cmd == U_FS)?fsSize:maxSketchSpace, cmd)){ // Start with max available size
#elif defined(ESP32)
// Increase watchdog timer to avoid panic
esp_task_wdt_init(15, 0);
int cmd = (filename == "filesystem") ? U_SPIFFS : U_FLASH;
if (!Update.begin(UPDATE_SIZE_UNKNOWN, cmd)) { // Start with max available size
#endif