ESP32 GPIO state at power-on

micha5104
Posts: 4
Joined: Sat Jan 20, 2018 9:39 pm

ESP32 GPIO state at power-on

Postby micha5104 » Sat Jan 20, 2018 9:51 pm

Hi,

I have a relay connected to two of my ESP32 GPIO ports 26 and 27. The relay is one of these arduino suitable relays (see e.g. http://arduino-info.wikispaces.com/ArduinoPower).
During normal operation everything works nicely, but during power-on of the ESP32 the two GPIO ports are high, and the relay triggers.
Is there any way to prevent this?

I've tried to connect the GPIOs to GRND via a 1K resistor (which I've read somewhere else). This reduces the time the GPIOs are high, but the relay still triggers.

I'm planning to control my garage door via this setup, and I don't want to have the relay triggering after e.g. a power outage, which would cause the garage door to automatically open.

Any help would be greatly appreciated!

dmaxben
Posts: 108
Joined: Thu Nov 16, 2017 6:04 pm

Re: ESP32 GPIO state at power-on

Postby dmaxben » Mon Jan 22, 2018 6:17 pm

Im curious about this too...

The ESP32 does take a "long" time to boot and set GPIO's...it would be nice if there was some way to "hard code" the boot state for a given GPIO...

Nespressif
Posts: 76
Joined: Tue Sep 12, 2017 11:25 am

Re: ESP32 GPIO state at power-on

Postby Nespressif » Wed Jan 24, 2018 1:26 pm

Maybe this is a clue:
Strapping pins
When an ESP32 is powered on, we may wish to control/configure how it boots. To
achieve this, a set of pins are defined that are read for the very short time that is
considered the bootstrap time. For the sake of discussion, we should image this as the
instantaneous time at which the device is powered up.
The values of these pins are "remembered" and available in the ESP32 register called
GPIO_STRAPPING. The boot-loader will examine these values and act accordingly. We
can also read this register later to see what values were in effect at boot time.
Extract of Kolban-esp32 pag 510

Greeting

Who is online

Users browsing this forum: No registered users and 63 guests