-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLVED ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode. (ESPTOOL-455) #741
Comments
Solution is press boot button on the esp32 board when run the code, its simple |
Hello @goldwing06, the process of entering the bootloader (download mode) is described in our documentation. I will close this issue since you found the solution! |
this comment is actually more helpful than the documentation. The docs say to press both buttons to start the ESP in download mode, but esptool appears to reset the board over USB, restarting it in regular mode. The key here is to hold the boot button while esptool is resetting the board over USB, so the ESP restarts in download mode. |
What's strange about this is, in Windows you don't have to press the button every time. The root problem is not in the ESP32, but in the code or something in Linux. |
Thank you, that pointed me in the right direction. The documentation is not very clear to me here. What works for me is: Press and hold Boot button, click EN button, click Upload, release Boot button when "Connecting...." is displayed. |
I found the same behavior when comparing ESP-IDF over windows and ESP-IDF running in Ubuntu virtual box. When in windows, I can flash normally. When running in Ubuntu, I need to press the Boot key in the board. This must be related to virtual serial port driver implementation because ESP-IDF python scripts use RTS and DTR RS-232 signals to force the board into programming mode. Somehow when in linux, these signals are not being set properly. Hence, user needs to manually place the board into programming mode by pressing the Boot key. |
Setting the second @danieldeschamps I much appreciate you posting this update. Now if we could convince Espressif to update this officially... |
Thanks for sharing the right delays for you. We will use these.... |
Neither values above helped me, nor did the increase til 5 seconds. But it was worth a try. |
This needs to be HIGHLIGHTED in the documentation, and everywhere else. |
Yeah adjusting the delays aren't working for me either. DOIT dev kit, macOS Ventura. |
Occasionally, my ESP32 will still get 'stuck'. Unplugging and reconnecting seems to fix it. |
I solved it by putting a 10uF capacitor between EN and GND |
I solved it with this |
|
|
|
This flawlessly works for me under Debian. This issue should be reopened since it's clearly a bad behaviour of esptool under certain circumstances, and "press the button" is not an acceptable solution to it. |
Using a ESP32 Dev Kit C v4 on macOS Montery and PlatformIO Core 6.1.5 which uses esptool.py v3.3 |
This worked also for me, why this is not merged? |
Thank you all for the feedback!
@SharpEdgeMarshall because it wasn't fully tested and doesn't work on all OSes. It will be probably integrated soon. See #712 (comment) |
Thank you @nicohofdtz. That worked perfectly. |
@tofublock @SharpEdgeMarshall @ajieh89 this has now been merged into master. Feel free to test! 353cefc |
@radimkarnis I discovered this thread as I recently bought an ESP32 and was following the startup guide today and encountered this issue. I'm flashing via |
Hi @ryan-mcclue, this issue has been only fixed in the esptool repository so far. IDF (which uses esptool under the hood) still ships with an older version, which doesn't include this bugfix yet. That's why running We will update the esptool version in IDF today. In the meantime, you can try to use esptool independently of IDF and see if that helps. |
Erasing or uploading anything to ESP32-S3-WROOM-1 Module using Espressif ESP-PROG seems to be a epic failure everytime. I have tried pressing and holding the boot button and that has failed to enter bootloader mode . but i have also tried only pressing reset button on ESP-PROG, The error is serial not detected. The voltage that i can measure on on EN is 3.28V and GPIO0 is 3.20V . The input voltage through ESP-PROG is around 3.3V i have tried everything possible and no luck to have it work. Even using different Laptops, PCs, OSes but nothing works. The Serial connection seems to be fine. I have test ESP32-S3-WROOM-1 devboard that works fine since i am able to erase_flash and write_flash on the dev board. i have reached the end of my endless hours trying to solve it . i need help.
When i do screen monitor
i can see that the flash seems to be empty i.e has no image
|
@developeralgo8888 Can you verify that GPIO0 is indeed pulled low when you press the BOOT button? If yes, simply hold the BOOT button and disconnect and reconnect the USB cable (to cut and restore the power). It then has to work if you run the commands with |
@radimkarnis, The GPIO0 is pulled low when i press boot. When i measure voltage on GPIO0 pin itself on the module, and also at the Tag-Connect-2030 pad pin 6 , i get Boot Not Pressed = 3.20V When i try it with Boot button pressed and |
@developeralgo8888 ok so we are moving somewhere. Now you can try monitoring the output (with
If you get to this state, you have successfully entered the download mode and you can run the commands. |
On the ESP-PROG Board i have noted the following: With ESP-PROG Boot button Pressed and held, its alternating between but also when continually pressed and released:
When ESP-PROG Reset button Pressed and held : No logs are available but if button is released it prints
When ESP-PROG Reset Button is continually pressed and released
|
@developeralgo8888 you've confirmed that both of the buttons on the ESP-PROG work as intended. The behavior you've described is correct, there is nothing wrong. Now I just need you to follow EXACTLY what I tell you:
|
@radimkarnis, is there a way to log slower ttyUSB output , it's scrolling extremely fast to even read it in real-time without logging it to a file. But let me try |
@radimkarnis, i followed exactly what you outlined but step 4: The Is the scrolling log on the ttyUSB2 monitor supposed to stop when |
Thank you so much! I have the same setup and it worked now. Not sure if is the OS version or because the board was unused for some time XD. Saved me :) |
I didn't plug the output pin when uploading. That apparently fixes the issue |
My TTGO-T4 board flashed OK on two occasions but now consistently gives the "Wrong boot mode detected " error. Nothing has changed. Could experienced contributors explain the failure modes of flash memory and its support chips. My TFT screen flashes white about 6 times and then indicates that the previous program is running. I've tried all the combinations of boot and reset suggested but nothing is now working, hence my belief I have a failure somewhere on the T4. Understanding failure scenarios may save countless hours of fruitless attempts to flash. |
Some additional information.: I tried 8 brand new, (never used) micro USB cables and 6 of them would not allow the USB port to be seen, while two did find USB port 10. I thought that was unusual. The micro USB connectror looks fine under a magnifier. |
Thank you. |
This worked for me as well. Thanks alot for this suggestion. Funny thing is, that the same board can be flashed perfectly on one win11 PC, while the other WIN11 PC always fails. Adding the capacitor did the trick and now flashing the ESP32 works fine on all mine PC's thanks |
I'm having the same issue on Ubuntu running on a VM. With WIndows 10 everything works ok
This worked |
ty ude |
this was a solution for me too, I tested with a RC pair R=10K and C=10uF (1uF like datasheet say not work for me) |
I placed a 2.2 muF capacitor from EN to Ground. Worked immediatley for me. Im using Windows, PlatformIO, ESP-WROOM-32 |
I had the same problem. |
Try to unplug the SD card before upload |
So If you have connected other devices to GPIO pins, try removing them and see if esptool starts working. |
Where is the documentation which describes how to use this tool? |
works!!! |
sorry, i'm newbie, what's exactly i have to do? |
Hazlo en esa secuencia para que tu ESP32 pueda entrar en modo Bootloader. ✌️ De preferencia usa estos cores que son mas nuevos y no tienen ese problema: ESP32-C3 Saludos |
Operating System
ubuntu 20.04
Version
v3.2
Python Version
3
Full Esptool Command Line that Was Run
python3 -m esptool --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x1000 Downloads/esp32-20220117-v1.18.bin
Esptool Output
What is the Expected Behaviour?
Should be load firmware on esp32
More Information
Solution is press boot button on the esp32 board when run the code, its simple
Other Steps to Reproduce
No response
The text was updated successfully, but these errors were encountered: