Merge branch 'doc/update_usj_docs' into 'master'

docs: update usb_serial_jtag documents

Closes IDF-3202 and DOC-2301

See merge request espressif/esp-idf!15922
This commit is contained in:
Simon
2021-11-23 07:41:53 +00:00
3 changed files with 22 additions and 7 deletions

View File

@@ -4,23 +4,26 @@ USB Serial/JTAG Controller Console
On chips with an integrated USB Serial/JTAG Controller, it is possible to use the part of this controller that implements a serial port (CDC) to implement the serial console, instead of using UART with an external USB-UART bridge chip. {IDF_TARGET_NAME} contains this controller, providing the following functions:
* Bidirectional serial console, which can be used with :doc:`IDF Monitor <tools/idf-monitor>` or another serial monitor
* Bidirectional serial console, which can be used with :doc:`IDF Monitor <tools/idf-monitor>` or another serial monitor.
* Flashing using ``esptool.py`` and ``idf.py flash``.
* JTAG debugging using e.g. OpenOCD, simultaneous with serial operations
* JTAG debugging using e.g. OpenOCD, simultaneous with serial operations.
Note that, in contrast with the USB OTG peripheral found in some Espressif chips, the USB Serial/JTAG Controller is a fixed function device, implemented entirely in hardware. This means it cannot be reconfigured to perform any function other than to provide a serial channel and JTAG debugging functionality.
Note that, in contrast with the USB OTG peripheral in some Espressif chips, the USB Serial/JTAG Controller is a fixed function device, implemented entirely in hardware. This means it cannot be reconfigured to perform any function other than to provide a serial channel and JTAG debugging functionality.
Hardware Requirements
=====================
{IDF_TARGET_USB_DP_GPIO:default="Not Updated!",esp32c3="18",esp32s3="19"}
{IDF_TARGET_USB_DM_GPIO:default="Not Updated!",esp32c3="19",esp32s3="20"}
Connect {IDF_TARGET_NAME} to the USB port as follows:
+------+-------------+
| GPIO | USB |
+======+=============+
| 19 | D+ (green) |
| {IDF_TARGET_USB_DP_GPIO} | D+ (green) |
+------+-------------+
| 18 | D- (white) |
| {IDF_TARGET_USB_DM_GPIO} | D- (white) |
+------+-------------+
| GND | GND (black) |
+------+-------------+
@@ -36,6 +39,12 @@ USB console feature can be enabled using ``CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG``
Once the option is enabled, build the project as usual.
Alternatively, you can access the output through usb_serial_jtag port but make sure the option ``CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG`` in choice ``ESP_CONSOLE_SECONDARY`` is selected.
.. warning::
Besides output, if you also want to input or use REPL with console, please select ``CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG``.
Uploading the Application
=========================
@@ -52,5 +61,5 @@ There are several limitations to the USB console feature. These may or may not b
2. If the application enters light sleep (including automatic light sleep) or deep sleep mode, USB CDC device will disappear from the system.
3. The behaviour between an actual USB-to-serial bridge chip and the USB Serial/JTAG Controller is slightly different if the ESP-IDF application does not listen for incoming bytes. An USB-to-serial bridge chip will just send the bytes to a (not listening) chip, while the USB Serial/JTAG Controller will block until the application reads the bytes. This can lead to a non-responsive looking terminal program.
3. The behavior between an actual USB-to-serial bridge chip and the USB Serial/JTAG Controller is slightly different if the ESP-IDF application does not listen for incoming bytes. An USB-to-serial bridge chip will just send the bytes to a (not listening) chip, while the USB Serial/JTAG Controller will block until the application reads the bytes. This can lead to a non-responsive looking terminal program.