Using GPIO2 as an input

Zebu1er
Posts: 2
Joined: Fri Dec 04, 2015 9:52 pm

Using GPIO2 as an input

Postby Zebu1er » Tue Dec 08, 2015 6:57 am

Hi,
I'm using an ESP-01 layout module which only exposes TX0, RX0, GPIO0, and GPIO2. I want to keep RX0/TX0 in their original functions. I've already used GPIO0 as an input/output (DHT11). Now I have to connect another device (water flow meter) to GPIO2 through a resistor (4K7). But that device has no high impedance mode, so it can hold down the input low while the ESP8266 boots.
So, is it possible to setup ESP8266 to ignore the state of the GPIO2 at boot time ? I read that this pin is initially configured as a TX1 for debugging purpose, but never read anything about why it's sensing for low level at boot time, and why it prevents normal operating modes (what does it do then ?).

Espressif_Kelly
Posts: 140
Joined: Mon Oct 27, 2014 10:40 am

Re: Using GPIO2 as an input

Postby Espressif_Kelly » Mon Dec 14, 2015 11:08 am

Dear Zebu1er,

GPIO0 has to be pulled high or low in order to control the boot mode while GPIO2 needs to be high in both uart download mode and flash boot mode.

GPIO2 has internal pull-up, so GPIO2 can be just left floating.

Any more questions, please let us know.

Thanks.

Who is online

Users browsing this forum: No registered users and 2 guests