ESP32-S3: GPIO0 pull-down Issue

Douglas-EDM
Posts: 12
Joined: Thu May 19, 2022 12:47 pm

ESP32-S3: GPIO0 pull-down Issue

Postby Douglas-EDM » Thu May 19, 2022 1:03 pm

Good day,

We are using a ESP32-S3-DEVKITC-1-N8 for a POC. We have a 100kΩ pull down resistor on GPIO0.
We power the device by pressing a button, which is also connected to GPIO0 to determine when it is pressed again.
When the button is pressed, the input to GPIO0 = 3.3V, when it is released, the input remains at 2.8V.

We have tested our board without the ESP inserted, and the pull down works correctly. We have also tested the ESP and the voltage is 2.9V on GPIO0.

The GPIO0 is set up using Arduino IDE with the code: pinMode(0, INPUT);
I have even tried using internal pull-downs with the code: pinMode(0, INPUT_PULLDOWN); This sucesfully pulls the pin low to 0V when the ESP is not plugged in and powered through usb. But when we power the device while pressing the button, it remains at 2.8V when the button is released.

Is this related to GPIO0 being a strapping pin? How can we properly set up the pin to pull down to 0V as it should after boot up?

Regards
Douglas

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

Re: ESP32-S3: GPIO0 pull-down Issue

Postby ESP_Sprite » Thu May 19, 2022 1:37 pm

Pulling GPIO0 low on startup also puts the device in download mode (meaning your Arduino app isn't executed, and the built-in pullup on that pin is never undone). Perhaps that can explain the issue? Mostly saying this because:
This sucesfully pulls the pin low to 0V when the ESP is not plugged in and powered through usb. But when we power the device while pressing the button, it remains at 2.8V when the button is released.
This is suspect... how can a pin that is 0V when nothing is connected to it suddenly go to 2.8V when you connect a pulldown to it?

Douglas-EDM
Posts: 12
Joined: Thu May 19, 2022 12:47 pm

Re: ESP32-S3: GPIO0 pull-down Issue

Postby Douglas-EDM » Thu May 19, 2022 1:58 pm

HI,

When we press the button it switches on power to the ESP.
The button then also pulls the pin high, and when it is released it does not fall to 0V but remains at 2.8V.
So in effect when the device is started, GPIO0 = 3V3.

If I have the ESP removed and I power it then using USB, GPIO = 0V. I then apply an external 3V3 to GPIO0 and when I remove it, it returns to 0V.

It seems like the issue is when the device starts with GPIO0 = 3v3, then it does not pull low to GND when it is set up as an Input even with an external pull down to GND.

savage
Posts: 23
Joined: Mon Jul 15, 2019 9:24 pm

Re: ESP32-S3: GPIO0 pull-down Issue

Postby savage » Fri May 20, 2022 1:15 pm

The internal pullup on GPIO0 is reenabled during every chip reset. It is unclear from your description: are you resetting the pin state every time you press the button and restart the ESP?

What version of Arduino are you using? Old versions of Arduino did not alter the pullup/pulldown state when pinMode(0,INPUT) was called, but I am not sure if that ever applied to ESP32.

As another check, can you read the voltage on both sides of the external pulldown resistor? Just to double-check whether that outside line is high as expected and not low or floating.

kokonuts
Posts: 15
Joined: Tue Jul 11, 2017 6:39 pm

Re: ESP32-S3: GPIO0 pull-down Issue

Postby kokonuts » Wed May 03, 2023 5:15 pm

I am having the same issue. How did you fix it?

Douglas-EDM
Posts: 12
Joined: Thu May 19, 2022 12:47 pm

Re: ESP32-S3: GPIO0 pull-down Issue

Postby Douglas-EDM » Thu May 04, 2023 4:58 am

I just moved pins around and kept GPIO0 for the programming only.

Who is online

Users browsing this forum: No registered users and 31 guests