-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Operating System
Windows 10, Mac OS, I think in all OS es.
Board
Raspberry pi pico
Firmware
just simple app to test cdc behavior.
RasPiPicoSDK_cdc_test-main.zip
What happened ?
When handshake is set to none, to receive data we need to enable DTR. We shouldn't be force to enable DTR to receive data. (other flow control status shouldn't be changed in cdc side if it is the case.)
I believe this is related with #872 maybe with #746 too.
please watch the gif file.
How to reproduce ?
RasPiPicoSDK_cdc_test-main.zip
- Download
- Compile and run. (or just use binary named PicoTest.uf2)
- Connect to Raspberry pi pico to USB thats all. (No usb serial converters attached.)
- Use Terminal.exe or CoolTerm or any other terminal let you set DTR.
- Check DTR behavior.
Expected behavior
This the demonstration that 2 FDTI USB serial converter connected each other with 3 pins.
Rx <- Tx
Tx -> Rx
GND <-> GND
It shouldn't be forced to enable DTR to receive data either sides. Please watch the gif file.
Cause
This happens when raspberry pi usb cdc is used.
This is other issue talks about same thing.
#932
Please check this file.
https://github.com/hathach/tinyusb/blob/master/src/class/cdc/cdc_device.c
it is checking DTR if it's on or not regardless checking flow control.
bool tud_cdc_n_connected(uint8_t itf)
{
// DTR (bit 0) active is considered as connected
return tud_ready() && tu_bit_test(_cdcd_itf[itf].line_state, 0);
}