Page 1 of 1

ESP32 Strapping Pins for Automatic Upload

Posted: Mon Apr 20, 2020 10:44 am
by Brento
I was wondering if someone can share a circuit they know works for auto-uploading when USB is connected (via CP2102N USB-UART bridge)?

https://www.aliexpress.com/item/3284057 ... hweb201603_

The board from the link above, appears to have have it built in, as it allows me upload sketches to the board via USB, without needing to hold down any buttons. Unfortunately, I have no schematic to it to see how it does that.

I currently have a pullup 10k resistor on CHIP_PU, and I have GPIO0 and GPIO2 being used by a TFT LCD. I heard something about being able to connect GPIO0 direct to CTS, and CHIP_PU direct to RTS on the CP2102N chip to achieve this automatic uploading. Has anyone tried that with success?

If the USB cable is disconnected, will this circuit then properly do an SPI boot when powered via power adapter?

Re: ESP32 Strapping Pins for Automatic Upload

Posted: Mon Apr 20, 2020 2:55 pm
by ESP_Sprite
Schematics for Espressif-built devboards are generally available; you could look at e.g. the the one from the DevkitC if you need inspiration.

Re: ESP32 Strapping Pins for Automatic Upload

Posted: Mon Apr 20, 2020 7:59 pm
by Brento
Oh hey, that's exactly what I was looking for! I presume the ESP32-D2WD processor works with the R values seen in that example? I have seen similar schematics with 100k and 0k resistors, but could not figure out how those values were chosen. I imagine they were for other chips.

One thing that perplexes me about that schematic.. why are the buttons there? I do not have to press any buttons when uploading a new schematic, it is automatic, it seems, based on the SS8050 transistors shown. I only use the reset button to restart the app, but technically, I can do that by cycling the power anyways.

Re: ESP32 Strapping Pins for Automatic Upload

Posted: Tue Apr 21, 2020 7:49 am
by ESP_Sprite
The buttons are there because the automatic circuit is somewhat dependent on the timing of the rts/dtr signals, and in some cases (programming software running in a VM, for instance) that timing cannot be met. It's a failsafe, more or less.

Re: ESP32 Strapping Pins for Automatic Upload

Posted: Wed Apr 22, 2020 12:31 am
by Brento
Ok thanks!