Getting the ESP32 to accept a flash without pressing button

I have a Heltec board that you can flash with pytool (ie: the Arduino IDE), but I'm currently using a Node32S that doesn't accept flash programming unless you hold down the button on the board.

Since its the same MCU, I'm wondering if there's a way that I can bootstrap the pins on it so that it'll accept flash programming over USB without me having to press anything.

I'd like to be able to update the code now that it's inside the project box without taking it all apart!

If it were a simple case of connecting a pin then you would imagine the Node32S would have done it already.

There is a bit of extra hardware on some ESP32 boards that forces the boot pin low when the USB interface attempts to start the upload.

If the ESP32 board had a direct serial programming connection, rather than USB, it ought to be easy enough to add such a bit of hardware since the upload is started by DTR being forced low, which also instigates reset.

The "Node32s" is a development board like this complete with USB interface etc. ?:

You also have the option of updating a sketch using OTA (Over the Air) instead of a cable connection.

@6v6gt........Presuambly the Node32S is different, the schematic you posted has the bit of hardware that in effect presses the boot switch for you when you start programming.

davepl:
I'd like to be able to update the code now that it's inside the project box without taking it all apart!

Have you considered using OTA programming, you don't even need to plug it into a computer serial port to upload after the initial upload of the OTA core. Just needs to be on the same WiFi network as your Arduino IDE PC

Yup, I know it's not a "production" solution but I just stuck the dev board in there and powered it from USB.

I'll look into OTA, but I've not started the WiFi core for any other purpose on this project, and am using both cores, so wasn't sure it was a great idea for this particular project.

From the datasheet it seems like if you hold EN low, it takes a flash, if not, it boots. But how does the Heltec work then I wonder?

davepl:
From the datasheet it seems like if you hold EN low, it takes a flash, if not, it boots. But how does the Heltec work then I wonder?

No, on reset (EN) if the boot pin (IO0) is low it goes into download program mode.

See my comment in post #1 and the circuit diagram in #2 for the circuit that allows this to be done automatically.

[quote
See my comment in post #1 and the circuit diagram in #2 for the circuit that allows this to be done automatically.

[/quote]

Can you steer me to that, I'm not sure where you're saying it is. Thanks

I remember seeing a while back a quick breadboard workaround from a link in a comment on RNT site using a capacitor across several pins, but I don't remember the details or the link. I do remember trying it and it worked seemingly well. Maybe it was yours :slight_smile:

As an update, I did find the article I refereed to here:

It looks kinda cheap and dirty, but it works for me........ :stuck_out_tongue_closed_eyes: Maybe help others.....

1 Like

I use a powered hub and no longer have to hold the ESP32 button down during program download.

Also, if one was to look at the ESP32 schematic 5V from the USB port is distributed without a protection for any back-flow issue that might arise from burning up an ESP32. Putting 6V on your hosting computers USB buss can do a load of wonky things. A powered hub is separated from the host computer power supply's 5V.

flagtrax:
Can you steer me to that, I'm not sure where you're saying it is. Thanks

Well ...... the post you just made was #7, look on the right margin .........

So if you scroll up the screen whilst reading this, you will find posts #1 and #2

Well DUH, it is monday isn't it..........