Skip to content

Commit

Permalink
Fix ESP32-Solo WDT on HTTP OTA update (#5426)
Browse files Browse the repository at this point in the history
* Fix ESP32-Solo WDT on HTTP OTA update

* Fix ESP32-Solo WDT on HTTP OTA update

* Fix commits

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
  • Loading branch information
arendst and lucasssvaz authored Feb 7, 2024
1 parent d59efdc commit bbbbec9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cores/esp32/Esp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ String EspClass::getSketchMD5()
md5.add(pb, readBytes);
lengthLeft -= readBytes;
offset += readBytes;

#if CONFIG_FREERTOS_UNICORE
delay(1); // Fix solo WDT
#endif
}
free(pb);
md5.calculate();
Expand Down
4 changes: 4 additions & 0 deletions libraries/Update/src/Updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,10 @@ size_t UpdateClass::writeStream(Stream &data) {
if((_bufferLen == remaining() || _bufferLen == SPI_FLASH_SEC_SIZE) && !_writeBuffer())
return written;
written += toRead;

#if CONFIG_FREERTOS_UNICORE
delay(1); // Fix solo WDT
#endif
}
return written;
}
Expand Down

0 comments on commit bbbbec9

Please sign in to comment.