EPS32-C3 USB serial not writing

krcewm
Posts: 1
Joined: Tue Mar 28, 2023 8:31 pm

EPS32-C3 USB serial not writing

Postby krcewm » Tue Mar 28, 2023 9:01 pm

Hello,

I'm currently writing a simple serial passthrough program for the ESP32-C3 that reads from the integrated USB Serial/JTAG controller and writes to UART1, and vice versa. The code will gladly read data using

Code: Select all

usb_serial_jtag_read_bytes
but

Code: Select all

usb_serial_jtag_write_bytes
does not print any output to the console (checked using the IDF monitor and with PuTTY). Echoing the data back to UART1 confirms that it's read is working correctly, and the return from

Code: Select all

usb_serial_jtag_write_bytes
is nonzero (in this case 1). Does anyone have an idea as to why no data is sent to the PC via the USB-CDC?

Thanks!

matheus.lemos
Posts: 3
Joined: Fri Mar 08, 2024 6:02 pm

Re: EPS32-C3 USB serial not writing

Postby matheus.lemos » Fri Mar 08, 2024 6:20 pm

Hello!
I'm having almost the same issue with my ESP32-S3. I could only see the print message when enabling "CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y", but it enables the debug logs on USB either.

matheus.lemos
Posts: 3
Joined: Fri Mar 08, 2024 6:02 pm

Re: EPS32-C3 USB serial not writing

Postby matheus.lemos » Tue Apr 02, 2024 11:36 am

I found a workaround for my issue, I hope it could help you too. If you add the driver command "usb_serial_jtag_ll_txfifo_flush();" after calling "usb_serial_jtag_write_bytes", the tx buffer will be flushed and then you will be able to see the message in your serial.

Who is online

Users browsing this forum: No registered users and 141 guests