Skip to content
esp-labsESP32-S3 bench guide
All blocks

Connectivity

USB Serial/JTAG

A serial port and a debugger on two pins, no adapter needed

runs on the board

Loading the 3D view…

  • D+
  • D−

Key facts

Gotchas

GPIO19 and 20 are the USB wires

By default GPIO19 (D-) and GPIO20 (D+) belong to the built-in USB Serial/JTAG port. Turning them into plain GPIOs cuts that USB port off.

GPIO39-42 can be JTAG

MTCK, MTDO, MTDI and MTMS sit on GPIO39-42. They are free by default, since JTAG goes over USB, but an external debugger needs them.

In our labs

1 lab uses this block, in 1 track. Open a track to see them.

  • done by you
  • runs on the board
  • built, not flashed
  • planned

Key registers

USB_SERIAL_JTAG_EP1_REGoffset 0x0000
USB_SERIAL_JTAG_EP1_REG
BitsFieldWhat it does
7:0USB_SERIAL_JTAG_RDWR_BYTERead a byte from the host, or write one to send (up to 64 per packet).

Technical reference §33.6

USB_SERIAL_JTAG_EP1_CONF_REGoffset 0x0004
USB_SERIAL_JTAG_EP1_CONF_REG
BitsFieldWhat it does
2USB_SERIAL_JTAG_SERIAL_OUT_EP_DATA_AVAILBytes from the host waiting.
1USB_SERIAL_JTAG_SERIAL_IN_EP_DATA_FREERoom to write.
0USB_SERIAL_JTAG_WR_DONESend what was written.

Technical reference §33.6

USB_SERIAL_JTAG_INT_RAW_REGoffset 0x0008
USB_SERIAL_JTAG_INT_RAW_REG
BitsFieldWhat it does
9USB_SERIAL_JTAG_USB_BUS_RESET_INT_RAWThe host reset the bus.
3USB_SERIAL_JTAG_SERIAL_IN_EMPTY_INT_RAWThe send buffer is empty.
2USB_SERIAL_JTAG_SERIAL_OUT_RECV_PKT_INT_RAWA packet arrived from the host.

Technical reference §33.6

USB_SERIAL_JTAG_CONF0_REGoffset 0x0018
USB_SERIAL_JTAG_CONF0_REG
BitsFieldWhat it does
14USB_SERIAL_JTAG_USB_PAD_ENABLEUSB function on the pads.
9USB_SERIAL_JTAG_DP_PULLUPD+ pull-up: tells the host a device is there.
0USB_SERIAL_JTAG_PHY_SEL0 internal PHY, 1 external.

Technical reference §33.6

Read the full sectionTechnical reference §33