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

Commit

Permalink
ESP32: reset watchdog timer
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
flowerysong committed Apr 8, 2022
1 parent ec665b5 commit 9861b8d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/AsyncElegantOTA.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ class AsyncElegantOtaClass{
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
Expand Down

0 comments on commit 9861b8d

Please sign in to comment.