Post topics, source code that relate to the Arduino Platform

User avatar
By ProfBeeman
#42594 I'm using an Adafruit Huzzah with Arduino 1.6.5 and ESP8266 2.1.0, communicating from OSX over a genuine FTDI cable. My rig has always worked perfectly, literally hundreds of times in the past.

Today, however, I screwed up and interrupted a flash midway through. The Huzzah now seems to be stuck--it won't drop out of flash mode (the little red LED on the Huzzah stays half-bright), but the Arduino IDE and esptool can't connect to it to restart the flash so that it will finish. Resetting doesn't help (with or without GPIO0 held low), unplugging doesn't help, rebooting my Mac doesn't help... it really seems like this board is now just permanently stuck in this state.

I can't believe I'm the first person to botch a serial flash this way. Has anyone else seen a similar problem? More importantly, has anyone else solved a similar problem?

Thanks in advance!
User avatar
By leenowell
#42690 Can the esptool.py connect to it at all? If so, have you tried it to erase the flash completely and then reload a new one? This is what fixed my "bricked" esp12f's. The other issue I had on the write flash was that I was not using 4M flash size. This was working fine for ages until one day it got bricked. Doing the erase and then reflashing my code using 4M fixed it
User avatar
By ProfBeeman
#42697 Thanks for the reply, Lee. I had tried, unsuccessfully, running esptool with erase_flash, but your message prompted me to try harder. :)

Here's the sequence that finally worked:
1. Jump GPIO2 to +3.3V
2. Jump GPIO15 to GND
3. Hold the button to bring GPIO0 to GND
4. Press the RESET button, then release it and GPIO0
5. Erase the flash with esptool erase_flash. The tool says "this will take a while", but it actually finishes almost instantly. The GPIO0 LED will still be half-lit, but you are not out of the woods yet.
6. Remove the GPIO2 and GPIO15 wires
7. Reset while holding the GPIO0 button as with a normal flash operation
8. Upload with the IDE

Digging into the Espressif docs, I think I kind of understand why this fixed the problem, and I think all I really needed to do was jump GPIO15 low. [EDIT: Nope, after bricking another one, I got the chance to experiment some more and all of these steps are required.] But I'm not sure, and I certainly don't want to re-brick another one just to test my theory. So I'll just leave these instructions here as a voodoo ritual for the next person.
Last edited by ProfBeeman on Sun Mar 27, 2016 1:56 pm, edited 2 times in total.