Have to Press "EN" To Start Custom Board

oklambdago
Posts: 19
Joined: Mon Mar 15, 2021 12:54 pm

Have to Press "EN" To Start Custom Board

Postby oklambdago » Tue Mar 30, 2021 3:12 am

Hi There,

I hope I'm missing something simple, but I have a problem with custom board. Board works great, flash downloads, but after flashing, and anytime I connect power, I have to press "EN" for the controller to start.

I'm attaching a schematic showing what I did with EN and GPIO0. IO2 is floating, which from the documentation I assume is OK.

https://imgur.com/FQ7Kp2e

After some experimenting, I removed C1 and now the board starts without pressing EN. Should I just be using a bigger capacitor? Or is it OK to leave IO0 floating on boot unless I want to flash firmware (and then would hold the button?)

Note: I want to be able to use the normal process for putting the board into flash download mode by doing the boot/en sequence, but I want the board to START when connected to power. I've checked on the scope and EN is pulled high at boot. I don't wish to make the board automatically go into this mode when flashing from the PC, I'm fine pressing the buttons.

oklambdago
Posts: 19
Joined: Mon Mar 15, 2021 12:54 pm

Re: Have to Press "EN" To Start Custom Board

Postby oklambdago » Wed Mar 31, 2021 12:14 pm

Bump. Any hints on what I might be doing wrong here?

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

Re: Have to Press "EN" To Start Custom Board

Postby boarchuz » Wed Mar 31, 2021 1:56 pm

Is it booting into download mode or not at all? (Is there any serial output?) I'm guessing it's in download mode as EN rises before IO0.

Removing C1 should be fine (reduces time for IO0 high).

The latest hardware guidelines recommend starting with 10k/1uF on EN, so you could consider increasing the capacitance there instead/also (delays EN high).

oklambdago
Posts: 19
Joined: Mon Mar 15, 2021 12:54 pm

Re: Have to Press "EN" To Start Custom Board

Postby oklambdago » Wed Mar 31, 2021 2:05 pm

Hi boarchuz,

If configured like the posted schematic it boots into download mode. Pressing EN starts the device. Removing C1 makes it boot right away and if I do the BOOT/EN button sequence it boots into download mode.

I'm wondering if C1 is not needed why use a cap at all? My previous value was .1uF, which I got from the latest devkitc reference design. It appears to be to small then?

If it is preferable to have a capacitor there I can try it with a higher value and see what happens. If it is not needed I can also omit it. If anyone has any sage guidance on this I'd appreciate it!

Thanks!

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

Re: Have to Press "EN" To Start Custom Board

Postby boarchuz » Wed Mar 31, 2021 3:20 pm

It's a little unclear in your comment where you're referring to IO0 or the enable pin.

C1 in the image is the filter cap on IO0. You don't want a higher value here.

The "10k/1uF" in my previous comment refers to the recommended RC delay on the enable pin. This corresponds to R2 and C3 in your schematic. You should try a higher value for C3.

oklambdago
Posts: 19
Joined: Mon Mar 15, 2021 12:54 pm

Re: Have to Press "EN" To Start Custom Board

Postby oklambdago » Wed Mar 31, 2021 3:57 pm

Hi Boarchuz,

Sorry, I'm just trying to clarify if C1 was needed at all. I will try replacing C3 from .1uF to 1uF and see what happens. As for C1, is it advisable to have a filter cap there? I can try the .1uF cap on C1 again once I have C3 replaced.

As for your suggestion, is the recommendation you mention coming from this document? https://www.espressif.com/sites/default ... nes_en.pdf

Thanks!

oklambdago
Posts: 19
Joined: Mon Mar 15, 2021 12:54 pm

Re: Have to Press "EN" To Start Custom Board

Postby oklambdago » Wed Mar 31, 2021 5:07 pm

Actually, now I'm a little confused.

From table 4 in the hardware design guidelines:

ESP32 Boots into SPI Boot when GPIO0 = 1 and GPIO2 = DC.
ESP32 Boots into Firmware download mode when GPIO0=0, and GPIO2=0

GPIO0 defaults to PULL UP, GPIO2 defaults to PULL DOWN.

So, in the circuit I posted, the device boots when given power because GPIO2 is pulled low and since GPIO0 is unconnected, it reads as 1. EN never comes into play.

Is it really acceptable to leave GPIO0 unconnected unless the button is pushed? I am only asking because the reference design had a cap on that line.

Does anyone know what the purpose of the cap on GPIO0 was? Here's a link to the reference schematic: https://imgur.com/a/EMp1Nj1

Perhaps I'm reading it wrong, but I think the cap on IO0 is only correct when used in conjunction with the transistor switch on RTS and DTR.

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

Re: Have to Press "EN" To Start Custom Board

Postby boarchuz » Wed Mar 31, 2021 6:20 pm

It's for debouncing the button.

It seems the ESP32 is starting up before the voltage on IO0 has risen to logic high. You need to delay startup a bit longer so that the weak internal pullup on IO0 has enough time to 'charge' C1.

oklambdago
Posts: 19
Joined: Mon Mar 15, 2021 12:54 pm

Re: Have to Press "EN" To Start Custom Board

Postby oklambdago » Wed Mar 31, 2021 11:49 pm

Hi boarchuz,

After adding the 1uF cap to C3 and replacing C1 the board displays the same behavior as before. It boots straight into firmware upload mode. Of course removing C1 allows the board to boot normally.

Any ideas of other things to check?

Thanks!

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

Re: Have to Press "EN" To Start Custom Board

Postby boarchuz » Thu Apr 01, 2021 3:21 am

Might be on the wrong track, hopefully someone else can help.
A schematic and, if possible, capturing IO0 and EN with an oscilloscope on applying power would be really helpful.

Who is online

Users browsing this forum: No registered users and 102 guests