-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firmware stuck in wdt reset loop prevents flashing #193
Comments
You have some other issue in your serial communication chain. esptool.py can perfectly flash a chip stuck in no matter what. However, not every serial adapter, and even not every host-site driver for one, can handle any of possible weird conditions easily. (That's mostly for @projectgus to confirm there's nothing wrong with esptool.py per se, though I myself reported various weird cases.) |
In both cases this is CH340G on Linux. Same board, same linux laptop. |
Somehow, I'm not surprised - the usual suspect. |
E.g., this module is also CH340 based: pfalcon/yaota8266#7 |
You might try |
Hi @zgoda, I have a few questions:
If it's not a premade USB dev board (ESP8266 + CH340 in a single device) then could you please supply a photo of the hardware setup? Angus |
Tried couple of other options so to recap:
Other than in this particular case esptool.py works fine. ESP-01 does not have reset connection, 3 other boards reset fine after flashing. |
The same firmware fails on all this different hardware? That's interesting, as far as I know it shouldn't be possible to end up in a reset loop which can't be stopped via the hardware RST or EN line. Which the NodeMCU & WeMos D1 definitely have. Is there any chance you could please send me the faulty firmware, in a way that I can trigger the bug to test? You can email me it directly (angus at espressif) if you don't want to post it publically. |
@zgoda Did you make any progress with this? Any chance you can (publically or privately) share the wdt-loop-inducing firmware or an |
I will try to reproduce this. The bug in Sming that was the cause of this issue is long gone. Inducing WDT reset by simple long sleep does not produce this effect and firmware can be safely flashed. My guess is this should be very tight loop, when reset happens very early. |
It seems like #213 may be a symptom of the same kind of problem (I suggested a possible workaround there as well.) If the reset-inducing timeout is delayed enough that esptool.py can take control of the chip, then we can probably make the correct register writes to disable it. Otherwise we may need to try and recover immediatelyt from the WDT-induced reset, hoping that the ESP8266 comes out of this into bootloader mode so we can then take control. |
can anyone give me a software link so as to flash a 8266 |
I think this is probably fixed in esptool.py v2.6 with the fix for #351 and related issues. The version at the time also used the stub loader, and esptool-ck (working) does not use a stub loader, and this is probably at the root of the problem. Please reopen if you still see this happening on v2.6. |
I have buggy firmware that enters wdt reset loop at some time. Once it enters the loop, there is no way to flash anything on this chip using esptool.py, operation ends with
A fatal error occurred: Timed out waiting for packet header
.Ch. Klippel esptool (aka
esptool-ck
) works ok in such stuation.The text was updated successfully, but these errors were encountered: