Skip to content

feat: add AT+DOWNLOAD to enter ROM download mode - #4

Merged
Amigache merged 1 commit into
EdgeTX:developfrom
Amigache:feat/at-download
Nov 19, 2026
Merged

Amigache merged 1 commit into
EdgeTX:developfrom
Amigache:feat/at-download

Conversation

@Amigache

@Amigache Amigache commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds an AT+DOWNLOAD command that reboots the module into the ROM serial bootloader (download mode), so a host can reflash it over the existing radio UART link without pulling GPIO9/EN.

This is the BTWifiModule side of the EdgeTX serial-passthrough flashing flow: EdgeTX exposes a passthrough port and the host sends AT+DOWNLOAD + esptool to reflash the ESP32 in place.

Implementation

  • New AT+DOWNLOAD command parsed in t_command.c.
  • reboot_into_download() sets RTC_CNTL_OPTION1_REG RTC_CNTL_FORCE_DOWNLOAD_BOOT and soft-resets.
  • Guarded by HAS_FORCE_DOWNLOAD_BOOT: only compiled on RISC-V chips (ESP32-C3, ESP32-S3, ESP32-S2, ESP32-C2) which expose that register.
  • On the original ESP32 (Xtensa), the register does not exist, so the command answers ERROR.

Testing

  • All 8 reference targets build cleanly (ESP32 original, ESP32-C3, ESP32-S3).
  • Unit tests pass 23/23.
  • End-to-end flash through EdgeTX passthrough verified on an ESP32-C3 SuperMini.

Reboot the module into the ROM serial bootloader (download mode) by setting the RTC force-download flag, so a host can reflash it over the existing radio UART link without pulling GPIO9/EN.

Only available on the RISC-V chips (ESP32-C3, ESP32-S3) which expose RTC_CNTL_OPTION1_REG / RTC_CNTL_FORCE_DOWNLOAD_BOOT; the original ESP32 (Xtensa) has no such register and answers ERROR instead.
@Amigache
Amigache merged commit dc4dd4f into EdgeTX:develop Nov 19, 2026
2 checks passed
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