Skip to content

Commit e55b4ff

Browse files
committed
Merge branch 'feature/esp32s3_dfu' into 'master'
docs, cmake: updates for ESP32-S3 DFU support Closes IDF-3534 See merge request espressif/esp-idf!15348
2 parents b86fe0c + 347884a commit e55b4ff

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

docs/en/api-guides/dfu.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Device Firmware Upgrade through USB
88
Device Firmware Upgrade through USB is not supported with ESP32 chips.
99

1010
Device Firmware Upgrade (DFU) is a mechanism for upgrading the firmware of devices through Universal Serial Bus (USB).
11-
DFU is supported by ESP32-S2 chips. The necessary connections for the USB peripheral are shown in the following table.
11+
DFU is supported by {IDF_TARGET_NAME} chips. The necessary connections for the USB peripheral are shown in the following table.
1212

1313
+------+-------------+
1414
| GPIO | USB |
@@ -22,8 +22,14 @@ DFU is supported by ESP32-S2 chips. The necessary connections for the USB periph
2222
| +5V | +5V (red) |
2323
+------+-------------+
2424

25+
.. only:: esp32s3
26+
27+
By default, :doc:`USB_SERIAL_JTAG<usb-serial-jtag-console>` module is connected to the internal PHY of the ESP32-S3, while USB_OTG peripheral can be used only if the external USB PHY is connected. Since DFU mode is provided via USB_OTG peripheral, it cannot be used through the internal PHY in this configuration.
28+
29+
You can permanently switch the internal USB PHY to work with USB_OTG peripheral instead of USB_SERIAL_JTAG by burning ``USB_PHY_SEL`` eFuse. See ESP32-S3 Technical Reference Manual for more details about USB_SERIAL_JTAG and USB_OTG.
30+
2531
.. note::
26-
The ESP32-S2 chip needs to be in bootloader mode for the detection as a DFU device and flashing. This can be
32+
The {IDF_TARGET_NAME} chip needs to be in bootloader mode for the detection as a DFU device and flashing. This can be
2733
achieved by pulling GPIO0 down (e.g. pressing the BOOT button), pulsing RESET down for a moment and releasing
2834
GPIO0.
2935

@@ -112,8 +118,8 @@ Please see the `libusb wiki <https://github.com/libusb/libusb/wiki/Windows#How_t
112118
details.
113119

114120
The drivers can be installed by the `Zadig tool <https://zadig.akeo.ie/>`_. Please make sure that the device is in
115-
download mode before running the tool and that it detects the ESP32-S2 device before installing the drivers. The Zadig
116-
tool might detect several USB interfaces of ESP32-S2. Please install the WinUSB driver for only that interface for
121+
download mode before running the tool and that it detects the {IDF_TARGET_NAME} device before installing the drivers. The Zadig
122+
tool might detect several USB interfaces of {IDF_TARGET_NAME}. Please install the WinUSB driver for only that interface for
117123
which there is no driver installed (probably it is Interface 2) and don't re-install the driver for the other interface.
118124

119125
.. warning::

docs/en/api-guides/usb-otg-console.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ Connect {IDF_TARGET_NAME} to the USB port as follows
3131

3232
Some development boards may offer a USB connector for the internal USB peripheral — in that case, no extra connections are required.
3333

34+
.. only:: esp32s3
35+
36+
By default, :doc:`USB_SERIAL_JTAG<usb-serial-jtag-console>` module is connected to the internal PHY of the ESP32-S3, while USB_OTG peripheral can be used only if the external USB PHY is connected. Since CDC console is provided via USB_OTG peripheral, it cannot be used through the internal PHY in this configuration.
37+
38+
You can permanently switch the internal USB PHY to work with USB_OTG peripheral instead of USB_SERIAL_JTAG by burning ``USB_PHY_SEL`` eFuse. See ESP32-S3 Technical Reference Manual for more details about USB_SERIAL_JTAG and USB_OTG.
39+
40+
Note however that USB_SERIAL_JTAG also provides a CDC console, so enabling the CDC console shouldn't be the primary reason for switching from USB_SERIAL_JTAG to USB_CDC.
41+
42+
3443
Software Configuration
3544
======================
3645

tools/cmake/dfu.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function(__add_dfu_targets)
88
elseif("${target}" STREQUAL "esp32s2")
99
set(dfu_pid "2")
1010
elseif("${target}" STREQUAL "esp32s3")
11-
set(dfu_pid "6")
11+
set(dfu_pid "9")
1212
elseif("${target}" STREQUAL "esp32c3")
1313
return()
1414
elseif("${target}" STREQUAL "esp32h2")

0 commit comments

Comments
 (0)