Booting without pressing any buttons
Booting without pressing any buttons
Apologies if I am asking a very basic question. I am using the Arduino IDE and when uploading code to an Espduino, the module auto boots and loads the code without hitting the boot button.
My code is very large and takes a while to compile and link. On a Devkit, I have to wait and hit the boot and reset buttons exactly when the IDE starts the upload. IDE gives you 5 seconds to do that. I cannot wait for 10 minutes for the compile, and be ready to hit the Devkit's boot and reset buttons just in time for the upload.
At other times, I have remote desktop access to the PC that is connected to the ESP32, but I am not physically present to hit the buttons. How do I upload?
How do I tell Devkit (and other such modules) to auto-boot, not wait for buttons to be pressed, and not reject the upload?
Thanks.
Bromium
My code is very large and takes a while to compile and link. On a Devkit, I have to wait and hit the boot and reset buttons exactly when the IDE starts the upload. IDE gives you 5 seconds to do that. I cannot wait for 10 minutes for the compile, and be ready to hit the Devkit's boot and reset buttons just in time for the upload.
At other times, I have remote desktop access to the PC that is connected to the ESP32, but I am not physically present to hit the buttons. How do I upload?
How do I tell Devkit (and other such modules) to auto-boot, not wait for buttons to be pressed, and not reject the upload?
Thanks.
Bromium
Re: Booting without pressing any buttons
It depends on the devkit (and it would be helpful if you could be more specific wrt which one you're using), but in general those have a little auto-reset circuit that enables this. Sometimes those don't work properly on some computers/OSses; in that case adding an 10u resistor capacitor between the EN/RESET pin and ground sometimes works. Btw, 10 minutes compile time is ridiculously long: unless you're using an ancient computer for this, I'd investigate if there's something (anti-virus?) interfering with the compile process.
Re: Booting without pressing any buttons
Thank you so much for your reply. It is very helpful.
1- How do I tell which module I am using? I just guess that it is a DevKit. I really do not know. It is a WROOM-32 with one micro USB and two buttons. It has 38 pins. The markings fit a terminal board that says ESP32/V4 Goouuu.
2- Do I need to enable this auto-reset circuit?
3- By 10u do you mean 10K or 10M?
4- Could you tell me which boards shall I try on the IDE, if it is not a DevKit?
Bromium
1- How do I tell which module I am using? I just guess that it is a DevKit. I really do not know. It is a WROOM-32 with one micro USB and two buttons. It has 38 pins. The markings fit a terminal board that says ESP32/V4 Goouuu.
2- Do I need to enable this auto-reset circuit?
3- By 10u do you mean 10K or 10M?
4- Could you tell me which boards shall I try on the IDE, if it is not a DevKit?
Bromium
Re: Booting without pressing any buttons
You can post a pic, and we can probably see if it'd a proper Devkit-C or a clone. You shouldn't need to enable any auto-reset circuit, the deal is that it does its thing automaticallyThank you so much for your reply. It is very helpful.
1- How do I tell which module I am using? I just guess that it is a DevKit. I really do not know. It is a WROOM-32 with one micro USB and two buttons. It has 38 pins. The markings fit a terminal board that says ESP32/V4 Goouuu.
2- Do I need to enable this auto-reset circuit?
3- By 10u do you mean 10K or 10M?
4- Could you tell me which boards shall I try on the IDE, if it is not a DevKit?
Bromium
Re: Booting without pressing any buttons
I will try these and get back to you. Also I have some non-CH340 dev modules that Arduino IDE does not recognize either of their USB ports. Thanks.
-
Great_Plunger
- Posts: 2
- Joined: Fri Jul 26, 2024 11:50 pm
Re: Booting without pressing any buttons
First of all, can you save binary file after compilation? Secondly, as example, once we used a programming connector with 10u capacitor and near 1M resistor between one pin and GND, it is possible that something also was on EN pin. This pin connected to strapping each time when connector was attaching to board and power applied. It was enough to booting.
Re: Booting without pressing any buttons
Mystery solved!
I managed to get the board https://www.ebay.com/itm/404536226926 to boot after all!!!
You had suggested a 10 uF capacitor between EN pin and ground. The only way to get this to boot was in addition putting a 10K resistor in parallel to the capacitor. And only 10K works. 9K or 12K do not work. The capacitor must not be smaller than 10 uF, but can be any size larger.
It is a pity that Espressif requires a timing circuit for the strapping pin EN. Especially that it is not a GPIO. Why would they do this?
So in short, connect 10K resistor and 10 uF (or larger) capacitor in parallel between EN and GND.
Brom
I managed to get the board https://www.ebay.com/itm/404536226926 to boot after all!!!
You had suggested a 10 uF capacitor between EN pin and ground. The only way to get this to boot was in addition putting a 10K resistor in parallel to the capacitor. And only 10K works. 9K or 12K do not work. The capacitor must not be smaller than 10 uF, but can be any size larger.
It is a pity that Espressif requires a timing circuit for the strapping pin EN. Especially that it is not a GPIO. Why would they do this?
So in short, connect 10K resistor and 10 uF (or larger) capacitor in parallel between EN and GND.
Brom
Re: Booting without pressing any buttons
Because the CPU can only be started when the circumstances are right: voltage is at the right level, power supply can provide the required power, bootstrap pins have stabilized at their initial values, any external clock oscillator is started and stable, etc. How this is guaranteed is something that depends on the circuit; some schematics (e.g. ones that are powered by a solar panel) require more extensive circuitry (e.g. a voltage supervisor) than others. In most cases, a simple RC delay suffices if the R/C are dimensioned in such a way that EN comes up later than the required voltages do.It is a pity that Espressif requires a timing circuit for the strapping pin EN. Especially that it is not a GPIO. Why would they do this?
Re: Booting without pressing any buttons
Very interesting. Could ESP32 have a bit of firmware in the ROM to check for all these parameters, and if all are in place, accept the command to get into boot mode? And if the check fails, to blink a code on a LED? This would take an Espressif engineer one day to code, while saving millions of manhours of user time trying to figure out the problem? Not to mention how profitable it would be for them.
Re: Booting without pressing any buttons
The issue is that the chip itself, including the ROM, CPU, PLL and everything else that is needed to run code like that, also needs the SoC to be in the proper state. Can't use code to check if the chip is in a state capable of checking code. (Also note that some things can't be checked: there is no way to know for instance how long the bootstrap pins will take to get up to the 'proper' levels, or to figure out if the PSU can source enough current.)Very interesting. Could ESP32 have a bit of firmware in the ROM to check for all these parameters, and if all are in place, accept the command to get into boot mode? And if the check fails, to blink a code on a LED? This would take an Espressif engineer one day to code, while saving millions of manhours of user time trying to figure out the problem? Not to mention how profitable it would be for them.
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot], PerplexityBot, Sprite and 5 guests
