Page 1 of 1

Configure GPIO 4 low during Boot

Posted: Tue Aug 11, 2020 6:45 pm
by Chindasv
HI there is any chance I can configure ESP32 to have GPIO_04 to be low during boot? It takes 5 msec to get into my Setup:
pinMode(4, OUTPUT);
digitalWrite(4, 0);
And causes a blink in my aplication.
Thanks

Re: Configure GPIO 4 low during Boot

Posted: Wed Aug 12, 2020 2:19 am
by lbernstone
You can attach a pull down resistor between the pin and ground to have it go low while your pin is floating during boot. 10K-50K Ohm will work depending on your application.
https://en.wikipedia.org/wiki/Pull-up_resistor

Re: Configure GPIO 4 low during Boot

Posted: Wed Aug 12, 2020 3:06 am
by boarchuz
It has internal pulldown by default.

Try
digitalWrite(4, 0);
pinMode(4, OUTPUT);

Re: Configure GPIO 4 low during Boot

Posted: Wed Aug 12, 2020 3:14 am
by Aussie Susan
@boarchuz - that code would only get executed AFTER the boot sequence.
The OP was asking about how to keep the pin low DURING boot.
Susan