ESP32 Strapping Pins for Automatic Upload

Brento
Posts: 21
Joined: Mon Apr 20, 2020 10:02 am

ESP32 Strapping Pins for Automatic Upload

Postby Brento » Mon Apr 20, 2020 10:44 am

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?

ESP_Sprite
Posts: 9599
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 Strapping Pins for Automatic Upload

Postby ESP_Sprite » Mon Apr 20, 2020 2:55 pm

Schematics for Espressif-built devboards are generally available; you could look at e.g. the the one from the DevkitC if you need inspiration.

Brento
Posts: 21
Joined: Mon Apr 20, 2020 10:02 am

Re: ESP32 Strapping Pins for Automatic Upload

Postby Brento » Mon Apr 20, 2020 7:59 pm

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.

ESP_Sprite
Posts: 9599
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 Strapping Pins for Automatic Upload

Postby ESP_Sprite » Tue Apr 21, 2020 7:49 am

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.

Brento
Posts: 21
Joined: Mon Apr 20, 2020 10:02 am

Re: ESP32 Strapping Pins for Automatic Upload

Postby Brento » Wed Apr 22, 2020 12:31 am

Ok thanks!

Who is online

Users browsing this forum: No registered users and 95 guests