[Answered] Exposing the EN and Boot buttons off DevKitC

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

[Answered] Exposing the EN and Boot buttons off DevKitC

Postby kolban » Fri Sep 23, 2016 11:09 pm

On a DevKitC board we have two tiny little buttons called "Boot" and "EN" that need to be held in order to flash applications. I am currently un-aware of any recipe to flash the device other than holding down "Boot", holding down "EN", releasing "EN" and then finally releasing "Boot". This results in the device entering a flashing state as shown in the serial output with:

Code: Select all

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
With this background, the core question. Assuming this is the recommended procedure, I am finding that my "fat fingers" have a hard time mashing the small micro buttons. I have my DevKitC on a breadboard. Is there a sequence of signals that I can send to the device through the externalized pins that will achieve the same effect? Another way of saying this ... is the schematic wiring for the "Boot" and "EN" buttons known?

Later ... after some reading and testing. It seems that if we bring the "EN" pin of the device low it will reboot. If we reboot with IO0 high it will normal boot while if we reboot with IO0 low, it will flash boot.
Last edited by kolban on Wed Dec 28, 2016 1:38 am, edited 1 time in total.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Exposing the EN and Boot buttons off DevKitC

Postby ESP_Sprite » Sat Sep 24, 2016 9:15 am

Actually, the DevKitC boards should have the circuit that's also available in the NodeMCU that allows esptool to automatically reset the board to upload mode. Unfortunately, the first version of the DevKitC boards (which iirc is all boards out there atm) has a bug in the circuit that breaks this functionality. There's a way to rework this into something working, but it involves re-soldering two transistors and changing two 0402-size resistors... if there's any demand, I'm willing to look it up on monday.

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Exposing the EN and Boot buttons off DevKitC

Postby kolban » Sat Sep 24, 2016 2:04 pm

Thank you for the kind offer and it may be of value to others. Your quick support is fantastic ... and you are VERY appreciated. However, I only have one DevKitC and hope to use that as the testing environment for updating my notes/book on the ESP8266/ESP32. I'm no where near skilled enough to even begin to approach the DevKitC with a soldering iron ... I will break the device if I attempt that.

What might be useful would be if we could come up with a schematic that would allow us to externalize a couple of buttons on a piece of strip board. I envision two buttons ... one called "reboot" and one called "flash". The "reboot" button would would pulse EN low while holding IO0 high while the "flash" button would pulse EN low while holding IO0 low. I suspect this could be achieved with discrete logic (transistors or TTL devices) but I'm thinking that if we can't come up with a simple circuit or don't have the components to achieve it in our workshops (hobby room) maybe we can create the same effect using one of the many Arduino's we most likely have and a simple Arduino sketch.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Exposing the EN and Boot buttons off DevKitC

Postby ESP_Angus » Mon Sep 26, 2016 11:12 pm

You can also cheat a little bit with the current revision (buggy) Core boards, the "EN" button still auto-toggles to reset the chip. So the simplest flashing procedure is:
  • Hold down IO0 button.
  • Run 'make flash' or esptool.py
  • Release IO0 button once flashing starts
You can even swap the first two steps if you forget to press IO0 first (if you press IO0 while esptool is trying to connect, it will usually work.)

This is a bit less fiddly than trying to juggle both buttons in sequence. The updated Core boards won't have this bug, they'll automatically reset into flashing mode when required.

If you want a more convenient button, wiring up a button that switches IO0 to GND will work.

human890209
Posts: 54
Joined: Wed Aug 15, 2018 8:56 am

Re: [Answered] Exposing the EN and Boot buttons off DevKitC

Postby human890209 » Sun Sep 09, 2018 3:15 am

Hi,
I got a DOIT ESP32 board, I press and hold Boot key when downloading the flash when flashing start I let it go.
But the DOIT ESP32 didn't get a Reset button. I tried to press EN or BOOT, or together, but the board didn't reset.
But the board does reset when clicking the Reset button of Arduino IDE's Serial Monitor.
How to reset the board with the physical button? Is that a bug for the earlier boards?
---------------------------
Tested, it's a physical flaw. Resolder the button, problem solved.

segaura
Posts: 1
Joined: Sun Jul 28, 2019 6:29 pm

Re: Exposing the EN and Boot buttons off DevKitC

Postby segaura » Sun Jul 28, 2019 6:32 pm

ESP_Sprite wrote:
Sat Sep 24, 2016 9:15 am
Actually, the DevKitC boards should have the circuit that's also available in the NodeMCU that allows esptool to automatically reset the board to upload mode. Unfortunately, the first version of the DevKitC boards (which iirc is all boards out there atm) has a bug in the circuit that breaks this functionality. There's a way to rework this into something working, but it involves re-soldering two transistors and changing two 0402-size resistors... if there's any demand, I'm willing to look it up on monday.
(I know I am trying to resurrect a 2016's thread...)

Does this issue also affect somehow OTA updates?

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: [Answered] Exposing the EN and Boot buttons off DevKitC

Postby ESP_Sprite » Mon Jul 29, 2019 2:33 am

No. OTA does not use the external reset.

camztouch
Posts: 5
Joined: Sat May 09, 2020 8:13 pm

Re: [Answered] Exposing the EN and Boot buttons off DevKitC

Postby camztouch » Wed Sep 28, 2022 9:53 am

I know this is an old thread, but I have another somewhat related question. How do I know, if my board has the buggy circuit? Is there any way of detecting, without flashing? On my boards I have to press these buttons, but I think I didn't have to do this the first time I flashed them...

Who is online

Users browsing this forum: Google [Bot] and 54 guests