Page 1 of 1

ESP32 Wroom-32 board GPIO25 can't be INPUT

Posted: Thu Jul 19, 2018 1:57 pm
by xiangcheng
Hi, I'm developing sensors application for customer with ESP32 WROOM-32 board which is bought from official site of ESPressif. I'm using a standard function which sets pin to input or output.
The issue on my board is: GPIO25 is always high when I set it as INPUT mode and use gpio_get_level(25).
I can set GPIO 18, 19 , 22, 23 as INPUT and they works well. But for GPIO25, it is always high. Did I miss anything? any hardware limitation?

Some log from gpio.c is: I think it is right. Please give some advice thanks.

Code: Select all

I (126) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 

Re: ESP32 Wroom-32 board GPIO25 can't be INPUT

Posted: Fri Jul 20, 2018 10:04 am
by ESP_Sprite
There is absolutely nothing special about GPIO25, from what I know. What board specifically do you use? DevkitC, Wrover-Kit, ...?

Re: ESP32 Wroom-32 board GPIO25 can't be INPUT

Posted: Fri Jul 20, 2018 11:51 am
by Vader_Mester
The pull-up is enabled on this pin.
I (126) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0

This means that it will be high unless something shorts it down to ground.
In this case, since it is an input, your external circuitry that outputs to this pin must pull this down to ground, in order to make this pin "become zero".

You should check, that the circuit that outputs to this pin is in fact pull-capable, and what kind of output it has, so it can in fact short it to ground.
If the circuitry can't pull it to GND "strong" enough, then the pin will remain above 0 volts. If you try to set this pin to 0 with your circuit, and the resistance between the pin and ground is comparable with the internal pull-up resistance in the ESP, then the voltage on this pin (using the standard voltage devider equation) can keep the voltage on the pin above the low detection treshold.

Vgpio = Vhigh * Rtognd /(Rpullup * Rtognd).
In order for this pin to see a strong "0", you will need to be 0,8V or below (in case of a 3,3V supply to the ESP).
I'm not sure what's the resistance value of the internal pull-up though.

Try to turn off the internal pull-up and see what happens.

Re: ESP32 Wroom-32 board GPIO25 can't be INPUT

Posted: Mon Jul 23, 2018 3:16 am
by xiangcheng
Thanks above 2 BIg-Niu.

I use DevKit which is bought from official site and connected some sensors and LCD screen to combine one under-developing board. I will change the hardware board since it seems to be some "short" issue which is unknown to me. Thanks alot.