From d80d4877f5e48412b7c96a62ed079d28aa284a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Mon, 24 Oct 2022 14:27:35 +0200 Subject: [PATCH] doc: provide force DFU method --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 4210cf562..af62a61e7 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,23 @@ The main application needs to implement the runtime mode separately. To switch from runtime to DFU mode during detach, set the boot partition in `otadata` to `factory`, and restart the ESP. +force DFU +--------- + +The USB DFU firmware does not act as bootloader. +Meaning, the ESP bootloader does not start the USB DFU firmware, which in turn starts the main firmware. +The main firmware in the OTA0 partition is directly loaded by the ESP bootloader. +Thus is it up to the main firmware to start the DFU mode, as described in `runtime`. + +In case the main firmware is defective, and does not allow to switch back to DFU mode, you can still force booting the USB DFU firmware. +For that, boot the ESP ROM bootloader (i.e. download mode), and invalidate the OTA data partition: + +~~~ +otatool.py --esptool-args after=no_reset_stub --port /dev/ttyACM0 erase_otadata +~~~ + +When restating the ESP by pressing the reset button, the ESP bootloader will start the firmware which is in the factory partition, which should be the DFU firmware previously flashed. + design choice =============