-
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
Incorrect bootloader mode (SPI_DOWNLOAD_BOOT) (ESPTOOL-507) #774
Comments
Hello @osterwood,
Does this mean you are using a custom solution to switch the board into the download mode? You disable auto-reset behavior with `--before no_reset, so you must ensure to do that manually (or programmatically with a custom script?). The problem might be in your custom board pulling some of the strapping pins (mainly GPIO8 and GPIO2). This is a handy summary of boot modes as a result of different strapping pins configurations:
There is nothing wrong with the ESP, it is not corrupted. esptool.py should be able to communicate with it even if no SPI flash chip is attached. This issue is just a matter of a wrong boot mode. Please check your strapping pins and try to enter the standard download mode. |
Thanks for the handy table mapping GPIO state to boot mode (with output messages). That is super useful -- and would be great to have included in the online documentation (https://docs.espressif.com/projects/esptool/en/latest/esp32c3/advanced-topics/boot-mode-selection.html) Looks like GPIO8 is low when it should be high (e.g. chip is seeing 100 instead of 110). I'll look into that. |
There is an active feature request to update the documentation: #732 It is in the pipeline! Let me please know if you manage to resolve your issue. |
That was in fact the issue. Pulled GPIO8 high and now everything is okay. That changed in our setup and I hadn't realized it. |
Operating System
macOS / Linux
Esptool Version
v4.2.1
Python Version
3.10.4
Chip Description
ESP32C3
Device Description
Custom board with a linux system controlling BOOT and CHIP_EN pins. Flashing is done via a UART.
Hardware Configuration
Various GPIO to a power management system
How is Esptool Run
CLI
Full Esptool Command Line that Was Run
esptool.py --before no_reset --chip esp32c3 --port DEV_PATH chip_id
Esptool Output
More Information
When I connect a serial console to the UART and enter bootloader, I now see the following output:
Prior to the failure, I was observing this output:
Interestingly, the code I have on the ESP32C3 still runs fine when the chip is reset in normal boot mode. The only failure seems to be in entering the correct download mode.
In between "working" and "cannot refresh" included some probing of the running ESP32 where the VDD_SPI net was accidentally brought to ~0v a few times. Could this have corrupted part of the built-in SPI and could the be preventing re-flashing?
Is there a way to recover a device which is entering this non-standard SPI_DOWNLOAD_BOOT mode?
Normal boot out is this:
Other Steps to Reproduce
No response
I Have Read the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: