-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CDC doesn't respect no flow control setting (DTR control needed to receive data) #906
Comments
Are you sure that this isn't a quirk of your particular serial terminal program? I never had to fiddle with any DTR settings when using PuTTY as detailed in https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf |
yes i'm sure. Check this out. This is with CoolTerm on MacOS. |
PuTTY or Teraterm terminals are made for VT100 etc., not exactly plain text transmission. You can use if you want. But those are uses other pins too. DTR -> DSR and DSR <- DTR. That's the problem. Asking host application for DSR on is reduce the compatibility with other apps if user is explicitly select no flow control. I'm saying this because if you check 2 FDTI USB serial converter example gif, it doesn't uses DTR. If flow control set to none most 3rd party apps only uses RX, TX, GND. |
you used screen command right? its also uses VT100. I'm talking about CDC not UART. I can see that you connect the serial over rx,tx,gnd pins. |
This is my setup. Raspberry pi pico -> USB thats all. No usb serial converters attached. This happens when raspberry pi usb cdc is used. |
Yes, I checked again just to be 100% sure. I downloaded the file and write to my pico. Yes I only check CDC over USB. I didn't even check uart output because you can clearly see my setting that I disabled UART I'm not talking about uart. https://github.com/MrGreensWorkshop/RasPiPicoSDK_cdc_test/blob/main/CMakeLists.txt
|
As I mentioned earlier here if you use VT100 terminal you can't catch it. May I kindly ask you, please check with Coolterm as I mentioned here Please make sure initial line states for DTR, RTS is off. Thank you. |
Might be worth flagging this up on the tinyUSB GitHub issue tracker, since it is their code. |
"can't reproduce" feels sad. |
The problem is how tinyUSB implemented in pico-sdk source code.
I made a PR #932 which gives user option to disable DTR check. |
Not my call to reopen, @kilograham? |
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 caused by tinyusb lib. That's why I open this issue also in tinyusb repo.
please watch the gif file.
How to reproduce ?
RasPiPicoSDK_cdc_test-main.zip
Expected behavior
This the demonstration that 2 FDTI USB serial converter connected each other with 3 pins.
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.
Discussed in here hathach/tinyusb#1548 and hathach/tinyusb#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.
The text was updated successfully, but these errors were encountered: