← index #8035PR #7715
Related · high · value 2.430
QUERY · ISSUE

ESP32-S2 2nd usb-serial port

openby emardopened 2021-11-26updated 2021-11-29
port-esp32

HI

At micropython for ESP32-S2, I'd like to have
secondary USB-serial port (like /dev/ttyACM1 on linux)
which directly maps to board's hardware serial port
RX/TX pins and if possible, few RS232 signaling lines.

Can this (easily) be done?

CANDIDATE · PULL REQUEST

esp32/boards: Add GENERIC_C3_USB.

closedby xorbitopened 2021-08-26updated 2021-08-30
port-esp32

Add a new board type for ESP32-C3 revision 3 and up that implements the USB serial/JTAG port on pin 18 and 19. This variant uses the USB serial for programming and console, leaving the UART free.

  • Pins 18 and 19 are correctly reserved for this variant. I also added pins 14-17 as reserved for flash for any ESP32-C3 so they can't be reconfigured anymore to crash the system.
  • Added usb_serial_jtag.c and .h to implement this interface.
  • Interface was tested to work correctly together with webrepl.
  • Interface was tested to work correctly when sending and receiving large files with ampy.
  • Disconnecting terminal or USB will not hang the system when it's trying to print.
  • Control+C is working correctly.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied