On Thu, 1 Sep 2005, Sven Duscha wrote:

> Hello,
> 
> I'm using a Cypress FX2LP EZ-USB development board to design software 
> for an USB2 Cy7c68013a-128 FX2LP chip.
> 
> I got the device to work with the usbcore-driver and am now 
> experimenting with bulk transfers. The easiest approach seemed to use 
> functions provided in libusb-0.1.10a (http://libusb.sourceforge.net/) 
> to do bulk transfers with usb_bulk_read and usb_bulk_write.
> 
> The problem is that in doing so I only get a maximum transfer rate of 
> ca. 3000k/sec. That is beyond the limitations of USB1.1 and therefore 
> the device seems to work in USB2.0 mode, but still far below the 
> limitations of USB2-High speed specifications.
> 
> I did tests with different firmwares that were provided with KEIL 
> development tools (bulksrc, bulkloop) and ezconsole and none provides 
> any higher transfer speeds.
> 
> My only guess is that going through generic usbcore-support could be 
> the bottle neck. But I'm a bit reluctant to delve into development of 
> a device driver for the Cypress FX2LP module.
> 
> On the other hand there is hardly any information on the linux support 
> for the FX2LP available on the net, even the less from Cypress 
> itself. Most drivers and sample applications are for the 
> FX-USB1.1-version only.

The bottleneck isn't usbcore, it's libusb.  However you don't need to 
write your own device driver.  It's possible to do what you want using 
ioctl and usbfs.  You could even hack the libusb source code to support 
it, if you want.

What you need is to make asynchronous submissions -- that is, don't wait
for an URB to complete before submitting the next one.  You should queue
enough data to fill the bulk pipe for 20 ms or more; thereafter each time
one URB completes you submit a new URB.  Remember that usbfs has a limit
of 16 KB per URB.  High-speed bulk transfers are capable of handling up to
52 KB/ms, which means you will need to keep at least 1 MB of data (or 64
URBs) in flight.

Alan Stern



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to