Description
Hardware:
Board: ESP32-wroom-32D (custom board)
Core Installation/update date: 1.0.0?
IDE name: Arduino IDE
Flash Frequency: 80Mhz
PSRAM enabled: no
Upload Speed: 115200
Computer OS: Windows 10
Description:
Hi
I have build a simple test program to check the OTA functionality on ESP32. There are 2 versions of a bin fil I download with on integer value different in the two. Both programs start OTA and download the other bin file. If the same bin fil starts after a reset the OTA must have failed somehow. I also have a timer that restarts the MCU after 5 minutes.
After running the program over the weekend I have 6722 successful OTA and 162 fails. 2.4% fail rate. There is a few instances (<5) where the MCU simply freeze and do the restart failsafe kicks in. But the most of the failures there is a LoadStoreError. The full exception you can find bellow.
Do anyone else have this problem? Any solutions?
Sketch:
Update.onProgress(OnProgress);
ESPhttpUpdate.rebootOnUpdate(false);
t_httpUpdate_return ret = ESPhttpUpdate.update(bin);
switch (ret) {
case HTTP_UPDATE_FAILED:
Serial.printf("HTTP_UPDATE_FAILD Error (%d): %s", ESPhttpUpdate.getLastError(), ESPhttpUpdate.getLastErrorString().c_str());
vTaskDelay(1000);
ESP.restart();
break;
case HTTP_UPDATE_NO_UPDATES:
Serial.println("HTTP_UPDATE_NO_UPDATES");
vTaskDelay(1000);
ESP.restart();
break;
case HTTP_UPDATE_OK:
Serial.println("HTTP_UPDATE_OK");
vTaskDelay(1000);
ESP.restart();
break;
}
Debug Messages:
Guru Meditation Error: Core 1 panic'ed (LoadStoreError). Exception was unhandled.
Core 1 register dump:
PC : 0x400d8f3c PS : 0x00060930 A0 : 0x800d8fdc A1 : 0x3ffb1d00
A2 : 0x3ffbc01c A3 : 0x3ffb1d4f A4 : 0x00000001 A5 : 0x40000000
A6 : 0x00043814 A7 : 0x04d8e925 A8 : 0x00000000 A9 : 0xffffffff
A10 : 0x00000000 A11 : 0x3ffbc7ec A12 : 0x00000050 A13 : 0x3ffb1c10
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x0000000a EXCCAUSE: 0x00000003
EXCVADDR: 0x40000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
Decoding 12 results
0x400d8f3c: WiFiClientRxBuffer::read(unsigned char*, unsigned int) at C:\Users\test\AppData\Local\arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\WiFi\src/WiFiClient.cpp line 507
0x400d8fd9: WiFiClientRxBuffer::read(unsigned char*, unsigned int) at C:\Users\test\AppData\Local\arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\WiFi\src/WiFiClient.cpp line 507
0x40161442: WiFiClient::operator bool() at C:\Users\test\AppData\Local\arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\WiFi\src/WiFiClient.cpp line 507
0x400db219: Print::println(int, int) at C:\Users\test\AppData\Local\arduino15\packages\esp32\hardware\esp32\1.0.0\cores\esp32/Print.cpp line 227
0x400db245: Stream::timedRead() at C:\Users\test\AppData\Local\arduino15\packages\esp32\hardware\esp32\1.0.0\cores\esp32/Stream.cpp line 279
0x400d8bb2: UpdateClass::writeStream(Stream&) at C:\Users\test\AppData\Local\arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\Update\src/Updater.cpp line 308 (discriminator 2)
0x400da391: ESP32HTTPUpdate::runUpdate(Stream&, unsigned int, String, int) at C:\Program Files (x86)\Arduino\libraries\esp32-http-update\src/ESP32httpUpdate.cpp line 33
0x400da713: ESP32HTTPUpdate::handleUpdate(HTTPClient&, String const&, bool) at C:\Program Files (x86)\Arduino\libraries\esp32-http-update\src/ESP32httpUpdate.cpp line 33
0x400da896: ESP32HTTPUpdate::update(String const&, String const&) at C:\Program Files (x86)\Arduino\libraries\esp32-http-update\src/ESP32httpUpdate.cpp line 33
0x400d202e: SimpleOta(char const*, char const*) at C:\atechcomp\OneDrive - atechcomp.no\SW\Arduino\ota_test/ButtonHandling.ino line 47
0x400d234d: setup() at C:\atechcomp\OneDrive - atechcomp.no\SW\Arduino\ota_test/ButtonHandling.ino line 47
0x40145f7f: _GLOBAL__sub_I__ZNSt12ctype_bynameIwEC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/libstdc++-v3/include/bits/locale_facets_nonio.h line 754
: (inlined by) _GLOBAL__sub_I__ZNSt12ctype_bynameIwEC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/src/c++11/locale-inst.cc line 380