So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By db533
#71079 I'm trying to get my ESP-12F into Flash mode to upload a program from Arduino IDE. However, when I try to bring the ESP-12F into Flash mode, I get the clock out (26 MHz) on GPIO0. If I try to upload from the Arduino IDE, I get "error: espcomm_upload_mem failed". And on Serial Monitor, set to 74880 baud, I get " ets Jan 8 2013,rst cause:2, boot mode:(1,6)". i.e. I cannot upload any programs to the ESP-12F.

My setup is as follows:
- Powering the ESP-12F with 3.3V from AMS1117. 100 uF capacitor between Vcc and Ground.
- Reset pulled high with 1k, pulled to Ground when pushbutton pressed. 100nF capacitor is connected from
- Reset to GND to minimise noise.
- GPIO15 pulled to GND via 2k
- GPIO2 pulled to Vcc via 10k
- GPIO0 pulled to Vcc via 1k, pulled to GND when pushbutton pressed.
- CP2102 3.3V USB to UART serial interface module adaptor connects my laptop to the ESP-12.
- GND to GND
- Tx - Rx
- Rx - Tx

The steps I take to get the ESP-12 into flash mode are as follows:
1. Scope shows both Reset and GPIO0 are high when I power on the circuit.
2. Press and hold button on GPIO0. GPIO0 drops to 0V.
3. Press and hold button on Reset. Now both reset and GPIO0 are at 0V.
4. Release Reset button. GPIO0 shows a 26MHz signal. DC average level is 0V, AC RMS = 385mV
5. Release the GPIO0 button. GPIO0 shows a 26MHz signal. DC average level is 2.05V, AC RMS = 630mV

I would have expected GPIO0 to return to 3.3V, but instead it has a clock output wave, centred on 2.05 VDC.

If I try to upload a program, I get the "error: espcomm_upload_mem failed".

Any thoughts? Have I wired something incorrectly? What can I try to get the ESP-12 into Flash mode?

Any suggestions welcome!
User avatar
By db533
#71196
philbowles wrote:There's part of the problem : "1. Scope shows both Reset and GPIO0 are high when I power on the circuit. " GPIO0 has to be 0v AT POWER UP. No good trying it after the board is powered on. If you have anything connected to GPIO0 it has to be pulled low in hardware. (and GPIO2 high of course)


Thanks for the suggestion. I don't recall every reading in the datasheet that GPIO0 has to be 0V at power up, but perhaps I missed it. I believe that you should be able to get the ESP8266 into flash mode even if it was powered up in Run mode without power cycling, but I'm not the expert.

In any case, I tried holding GPIO0 at 0V at power up. All that changes is that I get step 4 outcome straight away at power up. i.e. GPIO0 shows a 26MHz signal. DC average level is 0V, AC RMS = 385mV

And then releasing GPIO0 to be pulled high then ends in the same outcome. i.e. GPIO0 shows a 26MHz signal. DC average level is 2.05V, AC RMS = 630mV.

Anything else I could try?
User avatar
By db533
#71273
philbowles wrote:Have a look at THIS post and check your wiring of GPIO15:

http://www.esp8266.com/viewtopic.php?f=13&t=2500


Yeah, I found that post too. It prompted me to resolder all connections (yes, every single connection on the stripboard) and to check for any unexpected solder joints across strips.

GPIO15 is at 19 mV DC. As the clock signal appears (releasing Reset button while pulling GPIO0 to GND), this changes to 10mV DC, but with 100mV AC RMS 26MHz signal, which I believe is from the leads connecting the ESP-12 to the circuitboard. (They are approx 1.5 inch / 5cm cables). But that should still appear to be pulled low, I believe.

I also checked the other key pins that need to be pulled high:

CP_EN is pulled high at 3.2V DC. Once the clock output is generated, it picks up a 90mV AC RMS 26Mhz signal, but it stays high at 3.2 V DC.

GPIO2 is pulled high at 3.2V DC. Once the clock output is generated (at release of Reset button which GPIO0 is pulled low), I get the 26MHz signal at 140mV AC RMS.

The circuit in the link does not show resistors pulling GPIO15 and GPIO2 respectively so I tried shorting my pull-up/down resistors in GPIO15 and GPIO2 in turn, but this still results in the clock signal on GPIO0.

Still scratching my head...