Reply
Highlighted
Posts: 6
Registered: ‎06-13-2013

CP2110 throughput on Linux and Mac

Hi,

We experience different behavior when using the CP2110 HidUart bridge on our custom board to transmit data to Linux and Mac contra Windows 7.

The MCU side implements flow control, and when transmitting data from the MCU at a high baud rate to the Host PC we achieve HID full speed (about 64kb/s, 1ms between every HID packet sent from the MCU).
However, when doing the exact same thing on a Linux machine we´re only able to achive a third of that. It seems to be 3ms between every HID packet sent from the MCU.
Doing the exact same thing on Mac OSX (10.6.8) we achieve half the speed compared to Windows 7 (2ms between every HID packet sent from the MCU).

The data amount is about 60kbyte and the data received by the host have been verified, so everything is transmitted, just slower on Linux and Mac vs Windows.

Is this a known behavior for the USB stacks on Windows7, Linux (Ubuntu 12.04.1) and MacOSX (10.6.8)?

I can provide USB sniffs if necessary.

Best regards
Henrik
Posts: 18
Registered: ‎05-02-2013

Re: CP2110 throughput on Linux and Mac

Hi hek,

It is likely that the USB drivers are polling the device at different rates. The CP2110 requests an IN token to come every frame (e.g. once every millisecond); however, in our experience, some OS's often cannot achieve that rate and will poll every 2 or 3 frames. If it is the OS, your logs should show three SOF (Start of Frame) packets between each IN packet, and there will be no IN NAK packets. If you see NAK's, then it may be a device-side issue.

It may also be helpful to experiment by plugging into different hubs, host controllers, etc. on the same machine. Sometimes a host will poll devices plugged directly into its host controller more often than devices plugged into hubs.

Best Regards,
Jeff
Posts: 6
Registered: ‎06-13-2013

Re: CP2110 throughput on Linux and Mac

Hi Jeff,

What you describe is exactly what we experience. On Linux there are three SOF packet between every IN packet and on Mac there are two SOF packets between every IN packet, no NAKs.

Thanks for the advice, we will experiment some and see if we can get a more efficient setup. Luckily it´s not really a show stopper, but it´s quite annoying.

Best regards
Henrik