Page 1 of 1

ESP32 GPIO state at power-on

Posted: Sat Jan 20, 2018 9:51 pm
by micha5104

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.
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!

Re: ESP32 GPIO state at power-on

Posted: Mon Jan 22, 2018 6:17 pm
by dmaxben
Im curious about this too...

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

Re: ESP32 GPIO state at power-on

Posted: Wed Jan 24, 2018 1:26 pm
by Nespressif
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