Configure GPIO 4 low during Boot

Chindasv
Posts: 1
Joined: Tue Aug 11, 2020 6:37 pm

Configure GPIO 4 low during Boot

Postby Chindasv » Tue Aug 11, 2020 6:45 pm

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

lbernstone
Posts: 669
Joined: Mon Jul 22, 2019 3:20 pm

Re: Configure GPIO 4 low during Boot

Postby lbernstone » Wed Aug 12, 2020 2:19 am

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

boarchuz
Posts: 566
Joined: Tue Aug 21, 2018 5:28 am

Re: Configure GPIO 4 low during Boot

Postby boarchuz » Wed Aug 12, 2020 3:06 am

It has internal pulldown by default.

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

Aussie Susan
Posts: 44
Joined: Thu Aug 22, 2019 3:48 am

Re: Configure GPIO 4 low during Boot

Postby Aussie Susan » Wed Aug 12, 2020 3:14 am

@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

Who is online

Users browsing this forum: bendix, Google [Bot] and 62 guests