There were lots of emails from me in this mailing list and newsgroups before, but lets
mention everything once more.
I have got a board with a Cypress FX2 Chip and a PIC. The Pic creates Data bytes like
0 1 2 3 4 5 6 ..15 .. 0 1 2 ...
with a high bandwidth(appr 5 Mbytes/S). This Data is fed into the FX2 chip using
slave_io mode. A C program reads that Data into my linux box.
Concretely The FX2 has a 1KB Fifo which is filled by the PIC with the FX2 pins into Buffer6.
The PC reads that data with USB Bulk Transfers through EP6 in. I use libusb-0.1.12 for that.
In this C Program I measure the data rate. Its about 3 MB/S. Also I see, that the received data is inconsistent.
So I suspect that there are buffer overflows in the FX2 as USB does not transfer the Data fast enough. Tim told me that they already achieved about 30 MB/s with USB.
Please find attached the firmware for the FX2 and the c testprogram.
/proc/bus/usb/devices is also attached to see my usb configuration.
Could it be, that my usb cable is too long ? its about 3 meters. I presume, that I already use High speed usb. Else not even 3MB/s would be possible.
I was told, that you can achieve bigger data rates by using bigger buffer sizes. Actually I get best data rate with about 512 Bytes buffers. Using Buffers of 16KB decreases Data rate.
I have looked into libusb-1.0 in order to utilize the asynchronous usb bulk transfer. But
I did not yet have success as it has a completely different interface, and
I was not even yet able to scan through the usb devices. In libusb-1.0 i have found a test program, which lists the devices. This neither works. It always dumps the same bus with number 8xxxxx. Bus linked lists dont seem to work.
Does anybody have working sample code ?
Can anybody help me ? My primary goal is getting better data rates.