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

User avatar
By MartinS
#74472 Hello, I have made a custom board using the ESP 12-F module and a CP2102 USB to serial IC with the same autoprogramming circuit as the NodeMCU using DTR and RTS.

CP2102:
Image
ESP 12-F and auto programming circuit:
Image

What works:
1: The ESP-module has a stable 3.3V power supply able to supply sufficient current
2: Using a serial terminal I can write to the RX pin on the ESP-module and read that it arrives using a logic analyzer (i.e the CP2102 works)
3: Boot message on serial terminal (with no handshake) when I press the reset button is:

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 25408, room 16
tail 0
chksum 0xef
load 0x00000000, len 0, room 8
tail 0
chksum 0xef
load 0x00000000, len 0, room 0
tail 0
chksum 0xef
csum 0xef
csum err
ets_main.c


What I have tried so far:
1: Added this URL http://arduino.esp8266.com/versions/2.4.0/package_esp8266com_index.json in the window for Additional Board Manager URLs in the Preferences in Arduino IDE v1.8.5.
2: Chosen NodeMCU 1.0 (ESP 12-E Module) under Tools -> Boards, as the schematic and auto reset circuit should be the same. I am unsure if the difference between ESP 12-E and ESP 12-F makes a difference though
3:Chosen the correct COM-port
4: Tried to upload ESP8266 -> Blink example but gotten this error message:
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed

5: Installed Visual Studio with platformIO package, also chosen the same board (NodeMCU 1.0 (ESP 12-E Module))
6: Written a short Arduino sketch:
#include <Arduino.h>

void setup() {
Serial.begin(9600);
}

void loop() {
delay(1000);
Serial.println("Hello World!");
}
7: Built and uploaded, but still gotten the same error message:
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed

8: I have tried to upload the sketches from both point 4 and 7 after holding in the reset button then tying GPIO0 to ground manually, releasing reset button and getting boot mode: (1 6), but still gotten the same error message.

9: When uploading the Arduino sketches without manually resetting, using a logic analyzer, I see that the RTS line goes high, and should pull GPIO0 low, but GPIO0 continues to output the 26 MHz clock signal. Is this expected behaviour?

Image


I would really appreciate some input and/or help, as I have been googling potential solutions for days now.

Thanks
-Martin
Last edited by MartinS on Fri Oct 19, 2018 8:12 am, edited 1 time in total.
User avatar
By MartinS
#74589 I desoldered the ESP 12-F module from my PCB and attached pin headers to it. I then desoldered an ESP 12-E module from a working NodeMCU v0.9 development kit and mounted the ESP 12-F to the NodeMCU, and was able to upload firmware to it successfully using the Arduino IDE. This means that it is my PCB that is the problem. I'll have to look into it further.
User avatar
By MartinS
#74704 I found that it was the MOSFET that was causing trouble with the RTS# and DTR# lines. I removed the MOSFETS and tied DTR# to GPIO0 and RTS# to RESET and was able to program the ESP using the Arduino IDE. Only now the ESP resets constanly . I'll have to take a look at that.