From 472fb260527e66ce3d4ba2336763dfecf3b367e5 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Tue, 24 Mar 2026 10:37:30 +0100 Subject: [PATCH 1/2] docs: Add download mode FAQ section --- src/frequently-asked-questions.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/frequently-asked-questions.md b/src/frequently-asked-questions.md index a09e51a..dd83be6 100644 --- a/src/frequently-asked-questions.md +++ b/src/frequently-asked-questions.md @@ -50,3 +50,22 @@ The [Cargo Book][cargo-book] and the [Embassy Documentation][embassy-documentati ## Can I Use `mem::forget` on Drivers? The `mem::forget` function should be avoided, as forgetting drivers may result in unintended consequences. Peripheral drivers provide `Drop` implementations which return the peripheral to its default, unconfigured state, and if necessary cancel any Direct Memory Access (DMA) transactions which are current in progress. Forgetting a driver may result in erroneously configured peripherals and/or DMA transactions which run indefinitely and never complete. + +## Entering/exiting Download Mode + +Download mode is a boot mode used for firmware programming and debugging. In this mode, the chip does not boot the application from Flash, instead, it waits to receive new firmware data through interfaces such as UART or USB, and writes it to Flash. + +### Selecting Boot Mode + +When a reset ocurs, the ROM bootloader reads the state of specific strapping pins and selects the boot mode based on their levels at that moment: +- If the boot strapping pin is high → the chip enters SPI Boot mode (runs the application from Flash). +- If the boot strapping pin is low → the chip enters Download mode (waits for firmware). +See more information about boot mode selection in [ESP-IDF documentation][esp-idf-bootmode] + +When the device is on download mode you will see the following serial output: "waiting for download". See [ESP-IDF Download Mode documentation][esp-idf-downloadmode] + +After flashing the chip, the chip needs to return to SPI Boot mode to run the new firmware. This can be achieved by reseting the target, causing the strapping pins to be re-sampled, and the chip boots normally or by using the `--after watchdog-reset` option of `espflash` and `esptool` when in USB-Serial/JTAG Mode, see [ESP-IDF Troubleshooting][esp-idf-troubleshooting]. + +[esp-idf-bootmode]: https://docs.espressif.com/projects/esptool/en/latest/esp32c6/advanced-topics/boot-mode-selection.html +[esp-idf-downloadmode]: https://docs.espressif.com/projects/esp-techpedia/en/latest/esp-friends/get-started/try-firmware/try-firmware-troubleshooting.html#download-mode +[esp-idf-troubleshooting]: https://docs.espressif.com/projects/esptool/en/latest/esp32c6/troubleshooting.html#leaving-download-mode-in-usb-serial-jtag-mode From efd0752b6396093894b2beda85ca2eadab93bc15 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Wed, 25 Mar 2026 14:59:35 +0100 Subject: [PATCH 2/2] fix: Header capitalization --- src/frequently-asked-questions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frequently-asked-questions.md b/src/frequently-asked-questions.md index dd83be6..6a37d97 100644 --- a/src/frequently-asked-questions.md +++ b/src/frequently-asked-questions.md @@ -51,7 +51,7 @@ The [Cargo Book][cargo-book] and the [Embassy Documentation][embassy-documentati The `mem::forget` function should be avoided, as forgetting drivers may result in unintended consequences. Peripheral drivers provide `Drop` implementations which return the peripheral to its default, unconfigured state, and if necessary cancel any Direct Memory Access (DMA) transactions which are current in progress. Forgetting a driver may result in erroneously configured peripherals and/or DMA transactions which run indefinitely and never complete. -## Entering/exiting Download Mode +## Entering/Exiting Download Mode Download mode is a boot mode used for firmware programming and debugging. In this mode, the chip does not boot the application from Flash, instead, it waits to receive new firmware data through interfaces such as UART or USB, and writes it to Flash.