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?