1
\$\begingroup\$

I want my layout will include female headers to connect CP2102 MICRO USB to UART TTL Module 6Pin so I could just 'stick' it to my PCB while uploading the code. The 5V for the ESP will be supply from external source during operation.

The thing is the CP2102 has the following pins: 5V, 3.3V, GND, TX, RX, DTR:

top photo of PCB

I looked in the schematic of ESP32, micro USB 5V&USB-UART section and I saw that for upload the code properly I need RTS pin from CP2102, which is not accessible:

serial wiring

So it's seems that there is a missing pin out (RTS) for uploading the code. I didn't find any module for micro USB&UART that contain all the desired pins.

Is there any solution for it? Or should I implement the micro USB 5V&USB-UART section on my layout?

Thanks.


Update:

So I got the board and the USB to UART section looks like:

schematic diagram

I tried to upload a sketch to the board and got the following message:

Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____

I pushed the BOOT push-button as always do with ESP32 and nothing happen! I also measured voltages across IO0: 3.3v and 0V when I push the button.

Finally I got the message:

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

My design looks the same as the reference suggest, but still I failed in uploading a sketch.

\$\endgroup\$
  • \$\begingroup\$ You need to sutdy the programming process to understand what these are used for versus the possible alternatives and make your own decision. \$\endgroup\$ – Chris Stratton Mar 30 '19 at 14:52
1
\$\begingroup\$

Do you need RTS? Yes and no. Per the reference schematics for the ESP-WROOM-32, the RTS pin is needed (along with DTR) if you want the programming process to be able to automatically restart and put the ESP device into the correct "Boot" mode for programming and then automatically restart it and run in the regular boot mode after it's done programming. If you don't have the RTS pin, then you'll have to use a separate mechanism (like a pushbutton) connected directly to the ESP-WROOM-32 pin IO0 so that you can power it up in the correct boot mode for programming.

I am somewhat familiar with this process, as I have split off the ESP programmer / power circuit into my own custom PCB, following the same reference schematics that you're looking at.

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ According to the reference schematics, it's seems that i need both the RTS pin and push-button for IO0. I have the complete board (nudemcu-32s) and when I want to upload a code I must press the push-button of IO0 (BOOT) for a while otherwise i get fatal error: "timed out waiting for packet header". So from my experience the push-button is necessary anyway. \$\endgroup\$ – Electrician Mar 31 '19 at 15:48
  • \$\begingroup\$ @Electrician it is very likely that design is incorrect, then. I initially ran into the same problem when I first made my custom ESP32 programmer PCB, but if it is done correctly then the pushbutton isn't necessary (as I found out when I fixed my circuit). If you are already relying on the pushbutton, then you probably won't need RTS coming out of the programmer circuit. \$\endgroup\$ – mith Apr 1 '19 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.