2
\$\begingroup\$

I bought a ESP-32 development board and I'm having a lot of trouble with a button on the GPIO00 pin. This is a strapping pin on the ESP32 chip; when set to LOW on startup, the chip enters the bootloader. There's a convenient button on the development board.

In the schematic for the dev board, there's a 12k pull-up resistor between GPIO00 and 3.3V, and 470ohm between GPIO00 and the button; the button connects to ground. I confirmed this with my multimeter. Given that, I'd expect to read 0.12V when pressing the button. Instead I read 1.33V! This is outside the spec for the low-level digital input, though it seems to enter the bootloader properly.

Does anyone know why there's such a high voltage when pressing the boot button (GPIO00)? Is there anyway to mitigate this if I want to connect my own button to GPIO00?

Schematics for NodeMCU ESP-32S: NodeMCU ESP-32s schematic

\$\endgroup\$
4
  • 2
    \$\begingroup\$ Did you notice the connections to IO0 and µEN in the "USBToTTL" part? \$\endgroup\$ Dec 19, 2019 at 13:51
  • \$\begingroup\$ Yes, but I'm not sure what to make of them. I'll check what the states of DTR and RTS are. \$\endgroup\$
    – csiz
    Dec 19, 2019 at 13:56
  • \$\begingroup\$ @thebusybee turns out the DTR and RTS pins are both high, thus actively driving the GPIO00 pin high, which answer my dilemma. \$\endgroup\$
    – csiz
    Dec 19, 2019 at 14:41
  • \$\begingroup\$ So you can make this an answer for anyone else seeking for help on the same question. And, please, mark it. ;-) Or, since you "just" overlooked this detail, delete the question? \$\endgroup\$ Dec 19, 2019 at 19:49

2 Answers 2

1
\$\begingroup\$

According to the datasheet page 15 ("Strapping Pins" section): https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf

"GPIO0, GPIO45 and GPIO46 are connected to the chip’s internal pull-up/pull-down during the chip reset. Consequently, if they are unconnected or the connected external circuit is high-impedance, the internal weak pull-up/pull-down will determine the default input level of these strapping pins"

Table 3 shows GPIO0 is tied-up to the default pull-up during system reset. Table 9 shows the default pull-up resistor value is typically 45kOhm. So in theory you should measure about 0.156V at the pin when pressing the button.

In your case measuring 1.33V on GPIO0 means the equivalent pull-up resistance would be around 700 Ohm, more like if the ESP is actively driving it rather than being passive pulling.

  • Can you boot the ESP normally then measure the voltage on that pin when the button is pressed and released?
  • Can you now turn the power off, press the button while monitor the GPIO0 voltage and turn the board back on?
  • Any differences between these 2 operations?
\$\endgroup\$
2
  • \$\begingroup\$ Thanks for having a look, the 2 operations are the same. I think @thebusybee answered it in the comment. It seems that the pin is indeed driven high, but by the USB to UART bridge circuit. I'm not sure what is the point of that logic, however at least I know the pin isn't usable... \$\endgroup\$
    – csiz
    Dec 19, 2019 at 14:52
  • \$\begingroup\$ @csiz Good catch, I missed that one (I can also blame the image quality :P), good luck with your project! \$\endgroup\$
    – eeintech
    Dec 19, 2019 at 15:12
1
\$\begingroup\$

Contrary to what is stated in the ESP32 datasheet the GPIO 0 pin is not usable after boot-up on the NodeMCU style development boards because it's driven high by the USB-to-UART circuitry.

At the suggestion of @thebusybee I measured the DTR and RTS pins as logic high while the ESP32 is running normally. According to the schematic, this means GPIO00 is also set to logic high.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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