PORTS Forum
Ports and Interfaces => USB => Topic started by: WestfW on April 18, 2022, 04:03:47 am
-
I have run into some disappointing performance for CDC/ACM devices using OS default drivers (OUT performance significantly poorer than IN performance, for instance.) Before I go around trying to optimize the device code, I thought I'd do a bit of research, and I found here:
Reports are that the Windows [CDC/ACM] driver is slow (640Kbit/sec)
However, that appears to be a very old comment. Is it still true of current Windows (W10, W11)? What about other OS CDC/ACM drivers? (I seem to have similar performance issues on MacOS 10.13, for instance.)
(Testing with TinyUSB on RPi Pico and SAMD cpus, BTW.)
-
I don't know if the CDC driver's performance has improved in recent years. Alternatives include WinUSB and FTDI's chips and drivers.
-
I guess a more general question:
If I have a USB device that isn't performing as well as I'd like, is there any quick way to discover whether the bottleneck is in the host code or the device code?
-
A protocol analyzer can show timing and data such as whether the device is NAKing communication attempts.
http://janaxelson.com/development_tools.htm#analyzers
-
I dont think thats a problem of the usbser.sys driver, especially since you are seeing bad performance in OSX too.
My guess is its your TinyUSB device, TinyUSB is that software usb on Atmels right?
If so thats a lowspeed design and does not report bulkEps with 0x40 size. Bulk EPs are not allowed for lowspeed devices acording to the USB spec, because it will lower the performance.
-
You may be thinking of V-USB which is pure software USB for AVR, or perhaps LUFA which is hardware based for AVR.
TinyUSB is not tied to any specific hardware.
I've just brought it up on my NXP KL27 project for example.
I'm not using CDC so can't comment on its performance.
In general TinyUSB is mostly well written so I'm suspect of that being the bottleneck.
What each hardware needs is a TinyUSB hardware layer interface, there could be issues there.
https://www.tinyusb.org