It's also possible that adding a large capacitor (maybe 470♟ or something similar) between VCC and GND might smooth out the power, if that's the problem. If not, you might connect it to a higher current power source like a regulated power supply - try to use at least 3.3V, 500mA - you may need more current depending on what other hardware you have in your circuit. If you have the equipment to monitor voltage and current after the update, I'd try that - you may see a spike on the current or a dip on the voltage.
This can lead to erratic crashes, which it reports as rst cause: 2 when it restarts. The ESP8266 can draw a surprising amount of current at times and may cause a voltage dip if the power supply can't handle it. If you're not, the other likely cause is power. Possibly the reset line is being unexpectedly held low. If the code you're loading uses deep sleep or if you have anything connected to the ESP8266 reset pin, that would be the first place to look for problems. Rst cause:2 means that the CPU rebooted because of "External reset or wake-up from Deep-sleep"
Esp8266 firmware upgrade serial#
Where to look for a cause? SKETCH SIZE : 363264Įdit after update i changed serial speed to 74880 as per comment, here's the output Flashing binary /Binary.binĮts Jan 8 2013,rst cause:2, boot mode:(3,6) It works randomly, sometimes new program starts - but most of the times it returns with some trash Flashing binary /Binary.bin Serial.printf("Failed to open binary file") Īfter above returns true i reboot the esp with: if (RunBinary("/Binary.bin") = true) If (!Update.begin(maxSketchSpace, U_FLASH))
Uint32_t maxSketchSpace = (ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000 I am updating firmware for my esp8266 from flash using following code: RunBinary(const String& strFileName)įile file = SPIFFS.open(strFileName, "r")