ESP8266 Flash Tool Sync Question

Posts: 7
Joined: Wed Sep 14, 2016 3:37 am

ESP8266 Flash Tool Sync Question

Postby jimyates » Thu Apr 13, 2017 3:14 am

I want to flash new firmware into ESP8266s (Wroom-02) that are already installed onto a mother board that have all the necessary hardware connections to put the ESP8266 into flash mode, but am having problems getting the ESP8266 Flash Tool to sync with the ESP8266 through the USB port on the mother board.

The ESP8266 communicates with its mother board using USART at 115200 baud, normally using AT commands.

The mother board is running an XMEGA processor running at 32 mHz and has a USB connection.

In an effort to flash the ESP8266 using the USB on the mother board, I have created a "software bridge" between the USB RX and the ESP8266 RX USARTs, and between the ESP8266 TX and the USB TX USARTs. This "bridging" is done as follows:

    in the USB RX interrupt service routine, when a byte is received from the USB, it is immediately put into the immediate send data buffer of the USART connected to the ESP8266 RX

    in the interrupt service routine for the ESP8266 TX USART, any byte received from the ESP8266 is immediately placed in the USB TX USART immediate send data buffer.

In this configuration, with the ESP8266 in normal operation mode (IO0 pulled high), I can exchange data with it through the USB port using a terminal program with no problems.

However, when I put the ESP8266 in flash mode (pull IO0 low and reset the ESP8266) the ESP8266 Flash Tool will not sync with the ESP8266.

I have confirmed that all the ESP8266 pins are in the correct mode, and that the ESP8266 is in Flash mode. In fact, in order to diagnose this problem I have soldered two external wires to the ESP8266 USART ports and directly connected a separate USB-to-ttl converter to it (leaving the rest of the IO connections and power on the mother board) and connected the PC to the ESP8266 "directly" using this USB-to-ttl converter. In this configuration the Flash Tool will sync with the ESP8266.

Why won't the ESP8266 Flash Tool sync with the ESP8266 when the data is passed through the other processor?

Does anyone have any idea how I can solve this inability to sync using just the mother board USB?

User avatar
Posts: 467
Joined: Wed Jun 29, 2016 7:17 pm
Location: India

Re: ESP8266 Flash Tool Sync Question

Postby pratik » Sun May 14, 2017 8:36 pm

Are you definitely sure that the xmega is able to bridge the UART signals through properly? If not, you may try lowering the baud rate down to 9600. Make sure your settings are at 9600-8-N-1 if 115200 seems too high.

To test the UART bridging, you can try this:
1. Somehow flash AT firmware on to the ESP-WROOM (by soldering wires directly)
2. Program xmega to act as UART bridge
3. Try to use serial terminal to see if you can send and receive AT command/response to WROOM via xmega

If this works, then do let me know. Maybe we can narrow the issue down further after this!
Pratik Panda

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):

Who is online

Users browsing this forum: No registered users and 3 guests