From 506ab97396d5f644c30794ddf74c89403d13194b Mon Sep 17 00:00:00 2001 From: "pedro.minatel" Date: Tue, 26 Apr 2022 11:24:33 +0200 Subject: [PATCH 1/7] USB CDC and DFU docs --- docs/source/tutorials/cdc_dfu_flash.rst | 41 +++++ docs/source/tutorials/dfu.rst | 6 - docs/source/tutorials/gpio_mapping.rst | 226 ++++++++++++++++++++++++ docs/source/tutorials/io_mux.rst | 4 +- 4 files changed, 269 insertions(+), 8 deletions(-) create mode 100644 docs/source/tutorials/cdc_dfu_flash.rst delete mode 100644 docs/source/tutorials/dfu.rst create mode 100644 docs/source/tutorials/gpio_mapping.rst diff --git a/docs/source/tutorials/cdc_dfu_flash.rst b/docs/source/tutorials/cdc_dfu_flash.rst new file mode 100644 index 00000000000..1b5b0a17132 --- /dev/null +++ b/docs/source/tutorials/cdc_dfu_flash.rst @@ -0,0 +1,41 @@ +######################## +USB CDC and DFU Flashing +######################## + +Introduction +------------ + +Since the ESP32-S2 introduction, Espressif has been working on USB peripheral support for some of the SoC families, including the ESP32-C3 and the ESP32-S3. + +This new peripheral allows a lot of new possibilities, including flashing the firmware directly to the SoC without any external USB-to-Serial converter. + +In this tutorial, we will guide you on how to use the embedded USB to flash the firmware. + +**The current list of supported SoCs:** + +========= ======================= +SoC USB Peripheral Support +========= ======================= +ESP32-S2 CDC and DFU +ESP32-C3 CDC +ESP32-S3 CDC and DFU +========= ======================= + +USB DFU +------- + +Flashing Using DFU +****************** + +.. note:: + DFU is only supported by the ESP32-S2. + +USB CDC +------- + +Flashing Using CDC +****************** + +Hardware +-------- + diff --git a/docs/source/tutorials/dfu.rst b/docs/source/tutorials/dfu.rst deleted file mode 100644 index 1744906f79a..00000000000 --- a/docs/source/tutorials/dfu.rst +++ /dev/null @@ -1,6 +0,0 @@ -### -DFU -### - -.. note:: - DFU is only supported by the ESP32-S2. diff --git a/docs/source/tutorials/gpio_mapping.rst b/docs/source/tutorials/gpio_mapping.rst new file mode 100644 index 00000000000..f2e2080cdc7 --- /dev/null +++ b/docs/source/tutorials/gpio_mapping.rst @@ -0,0 +1,226 @@ +############ +GPIO Mapping +############ + +Introduction +------------ + +This tutorial will guide you to select the right **GPIO** to be used. Some GPIOs have special features and some have restrictions. + +Choosing the right **GPIO** can save time and avoid any non-expected behavior. + +For all ESP32 SoC families, the GPIOs can have distinct functions or not be available depending on the module type. Be sure to check this before changing your project module to another one. + +ESP32 Modules +------------- + +Here is the GPIO mapping for the ESP32 modules. + +.. tabs:: + + .. tab:: ESP32-WROOM-32E/U + + ===================== =========================================== + GPIO Description and Usage Restriction + ===================== =========================================== + Restricted GPIOs 6 + Straping Pins 5 + Available GPIOs 17 + Input Only 4 + **Total GPIOs** **32** + ===================== =========================================== + + ===================== =========================================== + GPIO Description and Usage Restriction + ===================== =========================================== + GPIO00 I/O & Boot Mode + GPIO01 I/O & Download UART + GPIO02 Strapping: Input/Output + GPIO03 I/O & Download UART + GPIO04 Input/Output + GPIO05 Strapping: Input/Output + **GPIO06** **Restricted for SPI Flash** + **GPIO07** **Restricted for SPI Flash** + **GPIO08** **Restricted for SPI Flash** + **GPIO09** **Restricted for SPI Flash** + **GPIO10** **Restricted for SPI Flash** + **GPIO11** **Restricted for SPI Flash** + GPIO12 Strapping: Input/Output + GPIO13 Input/Output + GPIO14 Input/Output + GPIO15 Strapping: Input/Output + GPIO16 Input/Output + GPIO17 Input/Output + GPIO18 Input/Output + GPIO19 Input/Output + *GPIO20* *Not Available* + GPIO21 Input/Output + GPIO22 Input/Output + GPIO23 Input/Output + *GPIO24* *Not Available* + GPIO25 Input/Output + GPIO26 Input/Output + GPIO27 Input/Output + *GPIO28* *Not Available* + *GPIO29* *Not Available* + *GPIO30* *Not Available* + *GPIO31* *Not Available* + GPIO32 Input/Output + GPIO33 Input/Output + GPIO34 Input Only + GPIO35 Input Only + GPIO36 Input Only + *GPIO37* *Not Available* + *GPIO38* *Not Available* + GPIO39 Input Only + ===================== =========================================== + + .. tab:: ESP32-WROVER-E/IE + + ===================== =========================================== + GPIO Description and Usage Restriction + ===================== =========================================== + GPIO00 I/O & Boot Mode + GPIO01 I/O & Download UART + GPIO02 Strapping: Input/Output + GPIO03 I/O & Download UART + GPIO04 Input/Output + GPIO05 Strapping: Input/Output + **GPIO06** **Restricted for SPI Flash** + **GPIO07** **Restricted for SPI Flash** + **GPIO08** **Restricted for SPI Flash** + **GPIO09** **Restricted for SPI Flash** + **GPIO10** **Restricted for SPI Flash** + **GPIO11** **Restricted for SPI Flash** + GPIO12 Strapping: Input/Output + GPIO13 Input/Output + GPIO14 Input/Output + GPIO15 Strapping: Input/Output + *GPIO16* *Not Available* + *GPIO17* *Not Available* + GPIO18 Input/Output + GPIO19 Input/Output + *GPIO20* *Not Available* + GPIO21 Input/Output + GPIO22 Input/Output + GPIO23 Input/Output + *GPIO24* *Not Available* + GPIO25 Input/Output + GPIO26 Input/Output + GPIO27 Input/Output + *GPIO28* *Not Available* + *GPIO29* *Not Available* + *GPIO30* *Not Available* + *GPIO31* *Not Available* + GPIO32 Input/Output + GPIO33 Input/Output + GPIO34 Input Only + GPIO35 Input Only + GPIO36 Input Only + GPIO37 Input Only + GPIO38 Input Only + GPIO39 Input Only + ===================== =========================================== + + .. tab:: ESP32-MINI-1/U + + ===================== =========================================== + GPIO Description and Usage Restriction + ===================== =========================================== + GPIO00 I/O & Boot Mode + GPIO01 I/O & Download UART + GPIO02 Strapping: Input/Output + GPIO03 I/O & Download UART + GPIO04 Input/Output + GPIO05 Strapping: Input/Output + **GPIO06** **Restricted for SPI Flash** + **GPIO07** **Restricted for SPI Flash** + **GPIO08** **Restricted for SPI Flash** + GPIO09 Input/Output + GPIO10 Input/Output + **GPIO11** **Restricted for SPI Flash** + GPIO12 Strapping: Input/Output + GPIO13 Input/Output + GPIO14 Input/Output + GPIO15 Strapping: Input/Output + *GPIO16* *Not Available* + *GPIO17* *Not Available* + GPIO18 Input/Output + GPIO19 Input/Output + *GPIO20* *Not Available* + GPIO21 Input/Output + GPIO22 Input/Output + GPIO23 Input/Output + *GPIO24* *Not Available* + GPIO25 Input/Output + GPIO26 Input/Output + GPIO27 Input/Output + *GPIO28* *Not Available* + *GPIO29* *Not Available* + *GPIO30* *Not Available* + *GPIO31* *Not Available* + GPIO32 Input/Output + GPIO33 Input/Output + GPIO34 Input Only + GPIO35 Input Only + GPIO36 Input Only + *GPIO37* *Not Available* + *GPIO38* *Not Available* + GPIO39 Input Only + ===================== =========================================== + + .. tab:: ESP32-WROOM-DA + + ===================== =========================================== + GPIO Description and Usage Restriction + ===================== =========================================== + GPIO00 I/O & Boot Mode + GPIO01 I/O & Download UART + **GPIO02** **Antenna Switch** + GPIO03 I/O & Download UART + GPIO04 Input/Output + GPIO05 Strapping: Input/Output + **GPIO06** **Restricted for SPI Flash** + **GPIO07** **Restricted for SPI Flash** + **GPIO08** **Restricted for SPI Flash** + **GPIO09** **Restricted for SPI Flash** + **GPIO10** **Restricted for SPI Flash** + **GPIO11** **Restricted for SPI Flash** + GPIO12 Strapping: Input/Output + GPIO13 Input/Output + GPIO14 Input/Output + GPIO15 Strapping: Input/Output + GPIO16 Input/Output + GPIO17 Input/Output + GPIO18 Input/Output + GPIO19 Input/Output + *GPIO20* *Not Available* + GPIO21 Input/Output + GPIO22 Input/Output + GPIO23 Input/Output + *GPIO24* *Not Available* + **GPIO25** **Antenna Switch** + GPIO26 Input/Output + GPIO27 Input/Output + *GPIO28* *Not Available* + *GPIO29* *Not Available* + *GPIO30* *Not Available* + *GPIO31* *Not Available* + GPIO32 Input/Output + GPIO33 Input/Output + GPIO34 Input Only + GPIO35 Input Only + GPIO36 Input Only + *GPIO37* *Not Available* + *GPIO38* *Not Available* + GPIO39 Input Only + ===================== =========================================== + +ESP32-S2 Modules +---------------- + +ESP32-C3 Modules +---------------- + +ESP32-S3 Modules +---------------- diff --git a/docs/source/tutorials/io_mux.rst b/docs/source/tutorials/io_mux.rst index 8bdbb0799c3..562810eae05 100644 --- a/docs/source/tutorials/io_mux.rst +++ b/docs/source/tutorials/io_mux.rst @@ -5,12 +5,12 @@ GPIO Matrix and Pin Mux Introduction ------------ -This is a basic introduction on how the peripherals work in the ESP32. This tutorial can be used to understand +This is a basic introduction to how the peripherals work in the ESP32. This tutorial can be used to understand how to define the peripheral usage and its corresponding pins. In some microcontrollers' architecture, the peripherals are attached to specific pins and cannot be redefined to another one. -For example. +For example: The *XYZ* MCU defines that the I2C peripheral SDA signal is the IO5 on the physical pin 10 and the SCL is on the IO6 and physical pin 11. From 85ad84967fafe9754131910336b24cbd33a9a533 Mon Sep 17 00:00:00 2001 From: "pedro.minatel" Date: Mon, 16 May 2022 12:58:05 +0100 Subject: [PATCH 2/7] Added DFU and CDC guide for flashing --- docs/source/tutorials/cdc_dfu_flash.rst | 84 +++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 5 deletions(-) diff --git a/docs/source/tutorials/cdc_dfu_flash.rst b/docs/source/tutorials/cdc_dfu_flash.rst index 1b5b0a17132..5a1773cd5e9 100644 --- a/docs/source/tutorials/cdc_dfu_flash.rst +++ b/docs/source/tutorials/cdc_dfu_flash.rst @@ -9,7 +9,7 @@ Since the ESP32-S2 introduction, Espressif has been working on USB peripheral su This new peripheral allows a lot of new possibilities, including flashing the firmware directly to the SoC without any external USB-to-Serial converter. -In this tutorial, we will guide you on how to use the embedded USB to flash the firmware. +In this tutorial, you will be guided on how to use the embedded USB to flash the firmware. **The current list of supported SoCs:** @@ -17,25 +17,99 @@ In this tutorial, we will guide you on how to use the embedded USB to flash the SoC USB Peripheral Support ========= ======================= ESP32-S2 CDC and DFU -ESP32-C3 CDC +ESP32-C3 CDC only ESP32-S3 CDC and DFU ========= ======================= +It's important that your board includes the USB connector attached to the embedded USB from the SoC. If your board doesnt have the USB connector, you can attach an external one to the USB pins. + +This instructions will only work on the supported devices with the embedded USB peripheral. The external USB-to-Serial doesn't works on this tutorial. + USB DFU ------- +The USB DFU (Device Firmware Upgrade) is a class specification from the USB standard that adds the ability to upgrade the device firmware by the USB interface. + Flashing Using DFU ****************** .. note:: - DFU is only supported by the ESP32-S2. + DFU is only supported by the ESP32-S2 and ESP32-S3. See the table of supported SoCs. + +To use the USB DFU to flash the device, you will need to configure some settings in the Arduino IDE according to the following steps: + +1. Enter into Download Mode manually + +This step is done only for the first time you flash the firmware in this mode. To enter into the download mode, you need to press and hold BOOT button and press and release the RESET button. + +To check if this procedure was done correctly, now you will see the new USB device listed in the available ports. Select this new device in the **Port** option. + +2. Configure the USB DFU + +Now you need to set the USB DFU as default on BOOT and for flashing. + +Go to the Tools menu in the Arduino IDE and set the following options: + +**For ESP32-S2** + +* USB DFU On Boot -> Enable + +* Upload Mode -> Internal USB + +**For ESP32-S3** + +* USB Mode -> USB-OTG (TinyUSB) + +* USB DFU On Boot -> Enabled + +Setp 3 - Flash +^^^^^^^^^^^^^^ + +Now you can upload your sketch to the device. After flashing, you need to manually reset the device. + +On the USB DFU, you can't use the USB for the serial output for the logging, just for flashing. To enable the serial output, use the CDC option instead. USB CDC ------- -Flashing Using CDC -****************** +The USB CDC (Communications Device Class) allows you to communicate to the device like in a serial interface. This mode can be used on the supported targets to flash and monitor the device in a similar way on devices that uses the external serial interfaces. + +To use the USB CDC, you need to configure your device in the Tools menu: + + +1. Enter into Download Mode manually + +Similar to the DFU mode, you will need to enter into download mode manually. To enter into the download mode, you need to press and hold BOOT button and press and release the RESET button. + +To check if this procedure was done correctly, now you will see the new USB device listed in the available ports. Select this new device in the **Port** option. + +2. Configure the USB CDC + +**For ESP32-S2** + +* USB CDC On Boot -> Enabled + +* Upload Mode -> Internal USB + +**For ESP32-C3** + +* USB CDC On Boot -> Enabled + +**For ESP32-S3** + +* USB CDC On Boot -> Enabled + +* Upload Mode -> UART0 / Hardware CDC + +3. Flash and Monitor + +You can now upload your sketch to the device. After flashing for the first time, you need to manually reset the device. + +This procedure enables the flashing and monitoring thought the internal USB and does not requires you to manually enter into the download mode or to do the manual reset after flashing. + +To monitor the device, you need to select the USB port and open the Monitor tool selecting the correct baud rate (usually 115200) according to the `Serial.begin` defined in your code. Hardware -------- +If you are developing a custom hardware using the compatible SoC, and want to remove the external USB-to-Serial chip, this feature will complete substitute the needs of the external chip. See the SoC datasheet for more details about this peripheral. From a48c56365d3c01a8c7efe296c392ab9df964f626 Mon Sep 17 00:00:00 2001 From: "pedro.minatel" Date: Mon, 16 May 2022 13:07:01 +0100 Subject: [PATCH 3/7] Added tools menu reference guide --- docs/source/tutorials/cdc_dfu_flash.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/tutorials/cdc_dfu_flash.rst b/docs/source/tutorials/cdc_dfu_flash.rst index 5a1773cd5e9..37f01c5ae9f 100644 --- a/docs/source/tutorials/cdc_dfu_flash.rst +++ b/docs/source/tutorials/cdc_dfu_flash.rst @@ -25,6 +25,8 @@ It's important that your board includes the USB connector attached to the embedd This instructions will only work on the supported devices with the embedded USB peripheral. The external USB-to-Serial doesn't works on this tutorial. +For a complete reference to the Arduino IDE tools menu, please see the `Tools Menus <../guides/tools_menu.html>`_ reference guide. + USB DFU ------- From 60ed00278f563ab42077085477e475093a356d25 Mon Sep 17 00:00:00 2001 From: Pedro Minatel Date: Mon, 16 May 2022 13:11:02 +0100 Subject: [PATCH 4/7] Deleted unrelated file to this PR The file was added by mistake. --- docs/source/tutorials/gpio_mapping.rst | 226 ------------------------- 1 file changed, 226 deletions(-) delete mode 100644 docs/source/tutorials/gpio_mapping.rst diff --git a/docs/source/tutorials/gpio_mapping.rst b/docs/source/tutorials/gpio_mapping.rst deleted file mode 100644 index f2e2080cdc7..00000000000 --- a/docs/source/tutorials/gpio_mapping.rst +++ /dev/null @@ -1,226 +0,0 @@ -############ -GPIO Mapping -############ - -Introduction ------------- - -This tutorial will guide you to select the right **GPIO** to be used. Some GPIOs have special features and some have restrictions. - -Choosing the right **GPIO** can save time and avoid any non-expected behavior. - -For all ESP32 SoC families, the GPIOs can have distinct functions or not be available depending on the module type. Be sure to check this before changing your project module to another one. - -ESP32 Modules -------------- - -Here is the GPIO mapping for the ESP32 modules. - -.. tabs:: - - .. tab:: ESP32-WROOM-32E/U - - ===================== =========================================== - GPIO Description and Usage Restriction - ===================== =========================================== - Restricted GPIOs 6 - Straping Pins 5 - Available GPIOs 17 - Input Only 4 - **Total GPIOs** **32** - ===================== =========================================== - - ===================== =========================================== - GPIO Description and Usage Restriction - ===================== =========================================== - GPIO00 I/O & Boot Mode - GPIO01 I/O & Download UART - GPIO02 Strapping: Input/Output - GPIO03 I/O & Download UART - GPIO04 Input/Output - GPIO05 Strapping: Input/Output - **GPIO06** **Restricted for SPI Flash** - **GPIO07** **Restricted for SPI Flash** - **GPIO08** **Restricted for SPI Flash** - **GPIO09** **Restricted for SPI Flash** - **GPIO10** **Restricted for SPI Flash** - **GPIO11** **Restricted for SPI Flash** - GPIO12 Strapping: Input/Output - GPIO13 Input/Output - GPIO14 Input/Output - GPIO15 Strapping: Input/Output - GPIO16 Input/Output - GPIO17 Input/Output - GPIO18 Input/Output - GPIO19 Input/Output - *GPIO20* *Not Available* - GPIO21 Input/Output - GPIO22 Input/Output - GPIO23 Input/Output - *GPIO24* *Not Available* - GPIO25 Input/Output - GPIO26 Input/Output - GPIO27 Input/Output - *GPIO28* *Not Available* - *GPIO29* *Not Available* - *GPIO30* *Not Available* - *GPIO31* *Not Available* - GPIO32 Input/Output - GPIO33 Input/Output - GPIO34 Input Only - GPIO35 Input Only - GPIO36 Input Only - *GPIO37* *Not Available* - *GPIO38* *Not Available* - GPIO39 Input Only - ===================== =========================================== - - .. tab:: ESP32-WROVER-E/IE - - ===================== =========================================== - GPIO Description and Usage Restriction - ===================== =========================================== - GPIO00 I/O & Boot Mode - GPIO01 I/O & Download UART - GPIO02 Strapping: Input/Output - GPIO03 I/O & Download UART - GPIO04 Input/Output - GPIO05 Strapping: Input/Output - **GPIO06** **Restricted for SPI Flash** - **GPIO07** **Restricted for SPI Flash** - **GPIO08** **Restricted for SPI Flash** - **GPIO09** **Restricted for SPI Flash** - **GPIO10** **Restricted for SPI Flash** - **GPIO11** **Restricted for SPI Flash** - GPIO12 Strapping: Input/Output - GPIO13 Input/Output - GPIO14 Input/Output - GPIO15 Strapping: Input/Output - *GPIO16* *Not Available* - *GPIO17* *Not Available* - GPIO18 Input/Output - GPIO19 Input/Output - *GPIO20* *Not Available* - GPIO21 Input/Output - GPIO22 Input/Output - GPIO23 Input/Output - *GPIO24* *Not Available* - GPIO25 Input/Output - GPIO26 Input/Output - GPIO27 Input/Output - *GPIO28* *Not Available* - *GPIO29* *Not Available* - *GPIO30* *Not Available* - *GPIO31* *Not Available* - GPIO32 Input/Output - GPIO33 Input/Output - GPIO34 Input Only - GPIO35 Input Only - GPIO36 Input Only - GPIO37 Input Only - GPIO38 Input Only - GPIO39 Input Only - ===================== =========================================== - - .. tab:: ESP32-MINI-1/U - - ===================== =========================================== - GPIO Description and Usage Restriction - ===================== =========================================== - GPIO00 I/O & Boot Mode - GPIO01 I/O & Download UART - GPIO02 Strapping: Input/Output - GPIO03 I/O & Download UART - GPIO04 Input/Output - GPIO05 Strapping: Input/Output - **GPIO06** **Restricted for SPI Flash** - **GPIO07** **Restricted for SPI Flash** - **GPIO08** **Restricted for SPI Flash** - GPIO09 Input/Output - GPIO10 Input/Output - **GPIO11** **Restricted for SPI Flash** - GPIO12 Strapping: Input/Output - GPIO13 Input/Output - GPIO14 Input/Output - GPIO15 Strapping: Input/Output - *GPIO16* *Not Available* - *GPIO17* *Not Available* - GPIO18 Input/Output - GPIO19 Input/Output - *GPIO20* *Not Available* - GPIO21 Input/Output - GPIO22 Input/Output - GPIO23 Input/Output - *GPIO24* *Not Available* - GPIO25 Input/Output - GPIO26 Input/Output - GPIO27 Input/Output - *GPIO28* *Not Available* - *GPIO29* *Not Available* - *GPIO30* *Not Available* - *GPIO31* *Not Available* - GPIO32 Input/Output - GPIO33 Input/Output - GPIO34 Input Only - GPIO35 Input Only - GPIO36 Input Only - *GPIO37* *Not Available* - *GPIO38* *Not Available* - GPIO39 Input Only - ===================== =========================================== - - .. tab:: ESP32-WROOM-DA - - ===================== =========================================== - GPIO Description and Usage Restriction - ===================== =========================================== - GPIO00 I/O & Boot Mode - GPIO01 I/O & Download UART - **GPIO02** **Antenna Switch** - GPIO03 I/O & Download UART - GPIO04 Input/Output - GPIO05 Strapping: Input/Output - **GPIO06** **Restricted for SPI Flash** - **GPIO07** **Restricted for SPI Flash** - **GPIO08** **Restricted for SPI Flash** - **GPIO09** **Restricted for SPI Flash** - **GPIO10** **Restricted for SPI Flash** - **GPIO11** **Restricted for SPI Flash** - GPIO12 Strapping: Input/Output - GPIO13 Input/Output - GPIO14 Input/Output - GPIO15 Strapping: Input/Output - GPIO16 Input/Output - GPIO17 Input/Output - GPIO18 Input/Output - GPIO19 Input/Output - *GPIO20* *Not Available* - GPIO21 Input/Output - GPIO22 Input/Output - GPIO23 Input/Output - *GPIO24* *Not Available* - **GPIO25** **Antenna Switch** - GPIO26 Input/Output - GPIO27 Input/Output - *GPIO28* *Not Available* - *GPIO29* *Not Available* - *GPIO30* *Not Available* - *GPIO31* *Not Available* - GPIO32 Input/Output - GPIO33 Input/Output - GPIO34 Input Only - GPIO35 Input Only - GPIO36 Input Only - *GPIO37* *Not Available* - *GPIO38* *Not Available* - GPIO39 Input Only - ===================== =========================================== - -ESP32-S2 Modules ----------------- - -ESP32-C3 Modules ----------------- - -ESP32-S3 Modules ----------------- From 2d5915d4e7b510644ba4b0c9bbf28c4f8df365a5 Mon Sep 17 00:00:00 2001 From: "pedro.minatel" Date: Mon, 16 May 2022 13:20:02 +0100 Subject: [PATCH 5/7] Small fix in the Serial.begin mention --- docs/source/tutorials/cdc_dfu_flash.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/tutorials/cdc_dfu_flash.rst b/docs/source/tutorials/cdc_dfu_flash.rst index 37f01c5ae9f..a75c2702f34 100644 --- a/docs/source/tutorials/cdc_dfu_flash.rst +++ b/docs/source/tutorials/cdc_dfu_flash.rst @@ -109,7 +109,7 @@ You can now upload your sketch to the device. After flashing for the first time, This procedure enables the flashing and monitoring thought the internal USB and does not requires you to manually enter into the download mode or to do the manual reset after flashing. -To monitor the device, you need to select the USB port and open the Monitor tool selecting the correct baud rate (usually 115200) according to the `Serial.begin` defined in your code. +To monitor the device, you need to select the USB port and open the Monitor tool selecting the correct baud rate (usually 115200) according to the ``Serial.begin()`` defined in your code. Hardware -------- From 10ea269f8630d51abc332caed5e544ba376b8f60 Mon Sep 17 00:00:00 2001 From: "pedro.minatel" Date: Mon, 16 May 2022 13:37:57 +0100 Subject: [PATCH 6/7] Added a not for USB CDC isntead of DFU --- docs/source/tutorials/cdc_dfu_flash.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/source/tutorials/cdc_dfu_flash.rst b/docs/source/tutorials/cdc_dfu_flash.rst index a75c2702f34..1b8a0b8453d 100644 --- a/docs/source/tutorials/cdc_dfu_flash.rst +++ b/docs/source/tutorials/cdc_dfu_flash.rst @@ -69,7 +69,10 @@ Setp 3 - Flash Now you can upload your sketch to the device. After flashing, you need to manually reset the device. -On the USB DFU, you can't use the USB for the serial output for the logging, just for flashing. To enable the serial output, use the CDC option instead. +.. note:: + On the USB DFU, you can't use the USB for the serial output for the logging, just for flashing. To enable the serial output, use the CDC option instead. + If you want to use the USB DFU for just upgrading the firmware using the manual download mode, this will work just fine, however, for developing please consider using USB CDC. + USB CDC ------- From 960362af56e94ebd51681a4a3f810d1d2dbdbe48 Mon Sep 17 00:00:00 2001 From: "pedro.minatel" Date: Mon, 30 May 2022 09:41:53 +0100 Subject: [PATCH 7/7] PR review changes --- docs/source/tutorials/cdc_dfu_flash.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/tutorials/cdc_dfu_flash.rst b/docs/source/tutorials/cdc_dfu_flash.rst index 1b8a0b8453d..03b9c5ce1df 100644 --- a/docs/source/tutorials/cdc_dfu_flash.rst +++ b/docs/source/tutorials/cdc_dfu_flash.rst @@ -21,9 +21,9 @@ ESP32-C3 CDC only ESP32-S3 CDC and DFU ========= ======================= -It's important that your board includes the USB connector attached to the embedded USB from the SoC. If your board doesnt have the USB connector, you can attach an external one to the USB pins. +It's important that your board includes the USB connector attached to the embedded USB from the SoC. If your board doesn't have the USB connector, you can attach an external one to the USB pins. -This instructions will only work on the supported devices with the embedded USB peripheral. The external USB-to-Serial doesn't works on this tutorial. +These instructions it will only work on the supported devices with the embedded USB peripheral. This tutorial will not work if you are using an external USB-to-serial converter like FTDI, CP2102, CH340, etc. For a complete reference to the Arduino IDE tools menu, please see the `Tools Menus <../guides/tools_menu.html>`_ reference guide. @@ -48,7 +48,7 @@ To check if this procedure was done correctly, now you will see the new USB devi 2. Configure the USB DFU -Now you need to set the USB DFU as default on BOOT and for flashing. +In the next step you can set the USB DFU as default on BOOT and for flashing. Go to the Tools menu in the Arduino IDE and set the following options: