General question regarding GPIO2 and program uploading

zliudr
Posts: 360
Joined: Thu Oct 03, 2019 5:15 am

General question regarding GPIO2 and program uploading

Postby zliudr » Thu Aug 01, 2024 8:20 pm

According to ESP32-wrover-e doc, GPIO2 is a strapping pin with a default pull-down resistor. And if its value is LOW together with a LOW GPIO0, then program download commences. Is this correct? From my design experience with ESP32, I only have to connect GPIO0 and RESET to CP2102 in an XOR-style transistor connections, never involving GPIO2. So I guess as long as I don't connect GPIO2 to anything, it's pulled down so GPIO0 determines program downloads. But if I do want to use GPIO2, I must ensure that on RESET it is effectively pulled down, such as having a strong enough external pull-down resistor like 1K, correct?

Probably same way to make use of the strapping pin GPIO12, which controls the internal LDO voltage and has a pull-down resistor as well?

Thank you!

User avatar
jgustavoam
Posts: 164
Joined: Thu Feb 01, 2018 2:43 pm
Location: Belo Horizonte , Brazil
Contact:

Re: General question regarding GPIO2 and program uploading

Postby jgustavoam » Fri Aug 02, 2024 12:19 am

Reference:
https://www.espressif.com/sites/default ... eet_en.pdf

2.4 Strapping Pins
There are five strapping pins:
• MTDI
• GPIO0
• GPIO2
• MTDO
• GPIO5

Each strapping pin is connected to its internal pull-up/pull-down during the chip reset. Consequently, if a
strapping pin is unconnected or the connected external circuit is high-impedance, the internal weak
pull-up/pull-down will determine the default input level of the strapping pins.

To change the strapping bit values, users can apply the external pull-down/pull-up resistances, or use the
host MCU’s GPIOs to control the voltage level of these pins when powering on the chip.
After reset release, the strapping pins work as normal-function pins.
ESP32 strpaing pins.JPG
ESP32 strpaing pins.JPG (76.27 KiB) Viewed 646 times
Retired IBM Brasil
Electronic hobbyist since 1976.

Who is online

Users browsing this forum: No registered users and 46 guests