Skip to content

fix: clear the force download boot flag before resetting an ESP32-S3 - #1150

Open
virzak wants to merge 2 commits into
esp-rs:mainfrom
virzak:fix/clear-force-download-boot
Open

virzak wants to merge 2 commits into
esp-rs:mainfrom
virzak:fix/clear-force-download-boot

Conversation

@virzak

@virzak virzak commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Firmware that reboots an ESP32-S3 into download mode over USB (TinyUSB's DFU or console, or a custom vendor request) sets RTC_CNTL_FORCE_DOWNLOAD_BOOT. The bit survives every reset except a power-on, so after flashing or espflash reset the chip boots straight back into download mode. esptool clears it before a hard reset (esptool/targets/esp32s3.py, see espressif/arduino-esp32#6762); this does the same before the hard and watchdog resets, logging and ignoring a failed write so the reset still happens.

Tested on an ESP32-S3-Zero over USB-Serial-JTAG, with firmware that sets the bit and resets into the ROM loader:

espflash reset espflash write-bin
Before Stays in download mode Stays in download mode
After Boots the application Boots the application

Only the ESP32-S3, as in esptool. The ESP32-S2 has the same bit but I can't test it.

Firmware that reboots into download mode over USB sets
RTC_CNTL_FORCE_DOWNLOAD_BOOT, which survives every reset except a
power-on, so the device stayed in download mode after flashing or
`espflash reset`. esptool clears it before a hard reset.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant