|
3 | 3 | Device Firmware Upgrade (DFU) through USB |
4 | 4 | ========================================== |
5 | 5 |
|
| 6 | +:link_to_translation:`zh_CN:[中文]` |
| 7 | + |
6 | 8 | Device Firmware Upgrade (DFU) is a mechanism for upgrading the firmware of devices through Universal Serial Bus (USB). There are a few requirements that need to be met: |
7 | 9 |
|
8 | | -- DFU is supported by ESP32-S2 and ESP32-S3 chips. |
9 | | -- You will need to do some electrical connection work. Here is a `guide <https://blog.espressif.com/dfu-using-the-native-usb-on-esp32-s2-for-flashing-the-firmware-b2c4af3335f1>`_ for the ESP32-S2 board. The necessary connections for the USB peripheral are shown in the following table. |
10 | | - |
11 | | -+------+---------------+ |
12 | | -| GPIO | USB | |
13 | | -+======+===============+ |
14 | | -| 20 | D+ (green) | |
15 | | -+------+---------------+ |
16 | | -| 19 | D- (white) | |
17 | | -+------+---------------+ |
18 | | -| GND | GND (black) | |
19 | | -+------+---------------+ |
20 | | -| +5V | +5V (red) | |
21 | | -+------+---------------+ |
| 10 | +- DFU is supported by ESP32-S2 and ESP32-S3 chips. |
| 11 | +- You will need to do some electrical connection work. Here is a `guide <https://blog.espressif.com/dfu-using-the-native-usb-on-esp32-s2-for-flashing-the-firmware-b2c4af3335f1>`_ for the ESP32-S2 board. The necessary connections for the USB peripheral are shown in the following table. |
| 12 | + |
| 13 | + .. list-table:: |
| 14 | + :header-rows: 1 |
| 15 | + |
| 16 | + * - GPIO |
| 17 | + - USB |
| 18 | + * - 20 |
| 19 | + - D+ (green) |
| 20 | + * - 19 |
| 21 | + - D- (white) |
| 22 | + * - GND |
| 23 | + - GND (black) |
| 24 | + * - +5V |
| 25 | + - +5V (red) |
22 | 26 |
|
23 | 27 | After meeting the above requirements: |
24 | 28 |
|
25 | 29 | 1. The chip needs to be in bootloader mode for detection as a DFU device and flashing. This can be achieved by pulling GPIO0 down (e.g., pressing the BOOT button), pulsing RESET down for a moment, and releasing GPIO0. |
26 | 30 | 2. Install USB drivers (Windows only). The drivers can be installed by the `Zadig tool <https://zadig.akeo.ie/>`_. |
| 31 | + |
27 | 32 | - Ensure that the device is in download mode before running the tool and that it detects the device before installing the drivers. |
28 | 33 | - The Zadig tool might detect several USB interfaces of the target. Install the WinUSB driver only for the interface without a driver installed (likely Interface 2), and avoid re-installing drivers for other interfaces. |
29 | 34 | - Manual driver installation via Device Manager in Windows is not recommended, as it might cause flashing issues. |
30 | 35 |
|
31 | 36 | After meeting the above requirements, you can proceed to build and flash via DFU. To use DFU: |
32 | 37 |
|
33 | 38 | 1. Edit the active launch configuration. |
34 | | -2. In the main tab, select the *Flash over DFU* option. |
| 39 | +2. In the main tab, select the ``Flash over DFU`` option. |
35 | 40 | 3. Select a suitable IDF target for DFU. |
36 | 41 | 4. When using the build command, an extra file (``dfu.bin``) will be created, which can be used later for flashing. |
37 | 42 |
|
38 | 43 | .. image:: https://user-images.githubusercontent.com/24419842/226182180-286099d3-9c1c-4394-abb0-212d43054529.png |
39 | 44 | :alt: DFU actions |
40 | 45 |
|
41 | | -Additional information, including common errors and known issues, is available in `this <https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/dfu.html#usb-drivers-windows-only>`_. |
42 | | - |
| 46 | +Additional information, including common errors and known issues, is available `here <https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/dfu.html#usb-drivers-windows-only>`_. |
0 commit comments