ESP32 Automatic flash error

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

ESP32 Automatic flash error

Postby urbanze » Thu Nov 23, 2017 3:28 pm

Unfortunately I put 48V on the 3.3V pin of ESP32 and obviously he had a quick death.

This is my ESP32 from revision 1 and I bought two new ones that are revision 0. However, the two new ones do not automatically upload, it is necessary to press the Boot button (GP0> GND).

I saw a @rudy topic that says about changing the esptool.py file about delay's that have to do with the capacitor and etc, but the change did not work. I tested several delays and activation methods between pins GP0 and EN but without success.

1-) What is the reason for this small inconvenience? And how to solve it (no hardware changes, preferably)?

2-) What are the significant differences between the two reviews? I did not find anything relatively straightforward and good at this question just rumors.

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

Re: ESP32 Automatic flash error

Postby ESP_Sprite » Fri Nov 24, 2017 8:32 am

What board do you use? You're talking about an ESP32 but that is only the chip.

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: ESP32 Automatic flash error

Postby urbanze » Fri Nov 24, 2017 11:32 am

ESP_Sprite wrote:What board do you use? You're talking about an ESP32 but that is only the chip.
Sorry, I forget. It's NodeMCU-32 DoIT, see photo:
(both can't flash without press button)

https://i.imgur.com/753Skhk.jpg
Image

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: ESP32 Automatic flash error

Postby loboris » Fri Nov 24, 2017 1:20 pm

The procedure to enter the bootloader mode is quite simple:
  • press and hold the BOOT button
  • press and release the EN button
  • release the BOOT button.
Flash your firmware.

You don't need to change anything.

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: ESP32 Automatic flash error

Postby urbanze » Fri Nov 24, 2017 1:56 pm

loboris wrote:The procedure to enter the bootloader mode is quite simple:
  • press and hold the BOOT button
  • press and release the EN button
  • release the BOOT button.
Flash your firmware.

You don't need to change anything.
I know about this, but the question is "why automatic doens't work?" My last nodemcu trigger DTR and RTS without any problem (automatic upload work correctly).

joster
Posts: 5
Joined: Wed Dec 07, 2016 12:02 am

Re: ESP32 Automatic flash error

Postby joster » Fri Dec 01, 2017 12:07 am

I'm not familiar with your board, but if it's like the Espressif ESP32 Core Board, the auto-programming is handled by two transistors hooked to the RTS and DTR lines of the onboard USB to serial bridge IC. Have you verified that the DTR and RTS lines are toggling when you attempt to flash? If not it may be in your USB to serial chip. If they are toggling, verify that the transistors outputs are driving the EN and IO0 lines.

It sounds to me like either the transistors or the serial to USB IC got fried.

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: ESP32 Automatic flash error

Postby urbanze » Fri Dec 01, 2017 1:42 am

joster wrote:I'm not familiar with your board, but if it's like the Espressif ESP32 Core Board, the auto-programming is handled by two transistors hooked to the RTS and DTR lines of the onboard USB to serial bridge IC. Have you verified that the DTR and RTS lines are toggling when you attempt to flash? If not it may be in your USB to serial chip. If they are toggling, verify that the transistors outputs are driving the EN and IO0 lines.

It sounds to me like either the transistors or the serial to USB IC got fried.

They can not be "fried", they are "new factory", since the first upload *most of the time* did not work, however the worst is that sometimes the boards were able to automatically upload. I will do some tests with oscilloscope and multimeter to verify the pins GP0 and EN.

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: ESP32 Automatic flash error

Postby urbanze » Fri Dec 01, 2017 11:28 am

I have tested the commands by ESPTOOL.PY itself and all commands are working (activating and deactivating the pins as programmed). I tried several delays and ways to make it work, but the boot just does not happen. However if done manually it happens. I think I need to go to the oscilloscope, but with the multimeter I already know that the transistors and CP2102 are working.

Does anyone have any ideas?

Image

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: ESP32 Automatic flash error

Postby urbanze » Fri Dec 01, 2017 12:08 pm

I added a capacitor as mentioned in a post (https://github.com/espressif/esptool/issues/136) and it worked.

So I already have two ways to make it work: pressing the button or adding a capacitor between EN and GND.

But is there no way to set the times between DTR and RTS to "get around" this bug?

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: ESP32 Automatic flash error

Postby urbanze » Sun Dec 10, 2017 2:21 am

I was testing some items in ESP32 that have this automatic flash problem and I noticed something very strange!

When I use "make erase_flash" and then I upload any sketch "make flash", it works most of the time, not requiring capacitors or pressing the button.

What is it? What is going on? Solution?

Who is online

Users browsing this forum: No registered users and 110 guests