ESP32S3, How to close flow control of USB CDC

ken_cheng
Posts: 3
Joined: Mon Aug 21, 2023 10:07 am

ESP32S3, How to close flow control of USB CDC

Postby ken_cheng » Fri May 03, 2024 8:14 am

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

lbernstone
Posts: 826
Joined: Mon Jul 22, 2019 3:20 pm

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

Postby lbernstone » Fri May 03, 2024 7:13 pm

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 953 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.

Who is online

Users browsing this forum: No registered users and 102 guests