ESP32 S3 pin 20 is always HIGH after start

Hello Friends,
I have little problem with pin 20 on ESP32 S3.
After start it is always goes high.
Is it because the pin 20 on ESP32 S3 has USB-JTAG?
Will it help if I burn the efuse with espefuse.py tool?
Thanks!

P.S.
In my case relay is connected on pin 20, so even when I set it to LOW in setup loop, it still makes click.

What exact board do you have? Post a link to it's schematics!

Have you tried compiling with USB Mode set to USB-OTG

How can I do it?

Under Tools->Board you should see a lot of options

Looks like there is nothing you can do.

From the ESP32-S3 data sheet:
GPIO19 and GPIO20 pins both have two high-level glitches during chip power-up, each
lasting for about 60 µs. The total duration for the glitches and the delay are 3.2 ms and 2ms respectively for GPIO19 and GPIO20.

Pin 20 is GPIO20

Yes, but I don't think that 3.2ms is enough to make click with relay

Use another pin for the relay.

It is already custom made PCB, can't change it.

It is easy to change a PCB. Cut the trace and solder a wire to a new pin.

Before designing a PCB, it is a good idea to test the circuit on a breadboard.

1 Like

And then it stays high, if I don't set it to LOW in the code. I don't think that the glitches are the problem.

I'm not sure if you can the default pull-ups for GPIO20 and GPIO19 with the efuses

Dear All,
I am more or less in the same shoes as mastino2, so I will share my findings so far.
I also designed a custom PCB for ESP32-S3-Wroom1U, and yes, before doing the wiring I read the technical reference manual and the datasheet. I was aware of the 60us glitch, and decided to use GPIO19 and GPIO20 as output pins, driving a P-channel MOSFET with the help of an N-channel transistor. Looking at the pins after reset with an oscilloscope I could measure the high/low times of these pins. GPIO19 has this glitch, and it is forgiveable in my circuit. But GPIO20 has 175ms high time after reset, and only after this can my code call pinMode and digitalWrite on this pin. I think this is what mastino2 notices in a form of a relay click. I tried many approaches, mostly by burning various efuses I read about on the ESP32 forums, but none helped. I partly bricked a few chips, because when I burned USB_PHY_SEL, both GPIO19 and GPIO20 stopped answering to pinMode and digitalWrite commands - they stayed low independently. Noticed that GPIO20 still goes high in upload mode. jim-p mentioned to try to compile and upload after ticking USB-OTG mode in Arduino IDE, that I must try next, because I think that is the only thing I haven't tried yet. My next ideas would be to modify the default behaviour of the pins at reset, but have still no clue how to do it? Maybe I must tinker with the bootloader? - I am unfortunately not skilled enough (yet), but will google even more to find the answer.

Hello,
Write me pm, I have the correct command which will help. But it works only in ESP IDF.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.