chmorgan / esphttpd-freertos

freertos example of libesphttpd for esp32 and esp8266
53 stars 14 forks source link

OTA update over WiFi not stable #24

Closed phatpaul closed 4 years ago

phatpaul commented 4 years ago

An OTA update seems to fail 50% of the time when performed over WiFi. It almost never fails via Ethernet.

Usually the WiFi connection to the esp AP disappears from my phone, then my phone tries to connect to another AP. So it seems the WiFi is unstable during the flashing process. Has anyone else experienced this?

Perhaps it can be improved by yielding more time from the flash operation to the WiFi functions?

phatpaul commented 4 years ago

I set the following in sdkconfig and it seems to fix my problem:

CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y
CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=50
CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=10

That option wasn't there in previous IDF and I guess I didn't set it when I upgraded to 3.3. It is the default.