|
From: Xiaofan C. <xia...@gm...> - 2012-11-14 02:14:22
|
On Wed, Nov 14, 2012 at 12:05 AM, geo <sha...@ya...> wrote: > Microcontroller with usb1.1, 32bytes buffer for bulk transfers and a lot of > real time data to move to Pc with Linux - kernel2.6 > As far as I understand the maximum theoretical bandwidth available for bulk > transfers in this case is 19 transfers * 64 bytes / frame (1ms) = 1218 > bytes/frame , 1218 kbytes/second > > As my bulk endpoint size is 32bytes the maximum theoretical transfer rate > is: 33 transfers * 32 bytes = 1056 bytes/frame, 1056 kbytes/second. > > I know this is the theoretical max , but I would be happy with around > 650Kbytes/second ... instead I'm getting a little less than the theoretical > max of 19 transfers*32bytes / frame = 608 bytes/frame ... around > 500bytes/frame. > > My device contains 4 bulk endpoints, 2 in , 2 out, all with 32 > bytes simple buffer ( not double buffered ). What if you change to 64Bytes for this bulk endpoint? That may help. Double buffer will also help. The following is of course just for speed testing and may not be the real-world example. You can see it can reach 1000KB+ speed for single direction and 500KB loopback. http://www.microchip.com/forums/tm.aspx?m=417509 For those tests, I was using libusbdotnet with libusb-1.0 backend under Linux. I have also carried out tests under Windows with either WinUSB, libusb-win32 or libusb-1.0 backend of libusbdotnet, also using libubK's benchmark application. The benchmark firmware is here. http://code.google.com/p/usb-travis/ -- Xiaofan |