Page 1 of 1

ESP32S3, How to close flow control of USB CDC

Posted: Fri May 03, 2024 8:14 am
by ken_cheng
Hi Team,
Is there any way to close flow control of USB CDC?
When dtr = 0. CDC CONNECTED. USB CDC write OK.
When dtr = 1. CDC DISCONNECTED. USB CDC write failed. Host can't get response from the device.
Ken.

16:09:32.971 -> CDC LINE STATE: dtr: 0, rts: 1
16:09:33.910 -> CDC CONNECTED
16:09:33.910 -> CDC LINE STATE: dtr: 1, rts: 1
16:09:34.988 -> CDC DISCONNECTED
Hardware: ESP32-S3-DevKitC-1

Re: ESP32S3, How to close flow control of USB CDC

Posted: Fri May 03, 2024 7:13 pm
by lbernstone
I don't believe there is any flow control available in the CDC implementation- all transfers use bulk methods and it behaves like a full duplex device.
The DTR/RTS are used as strapping pins, much like they are with a normal uart adapter for GPIO0 and CHIP_EN.
Screenshot from 2024-05-03 09-16-17.png
Screenshot from 2024-05-03 09-16-17.png (34.6 KiB) Viewed 997 times
I don't know if it is timing out after the DTR is set (there is 78 ms b/w the signal and the disconnect), but a disconnection seems a bit of an over-reation there. If this is happening on the HWCDC, you should probably open a ticket with ESP-IDF about it. If this is in tinyusb, then you should be able to trap and ignore this with events.