[Answered] Exposing the EN and Boot buttons off DevKitC

User avatar
kolban
Posts: 891
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: 894
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: 891
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: 417
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.

Who is online

Users browsing this forum: No registered users and 2 guests