EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

USB - Bulk Transfer speed up

Started by edurohr December 18, 2007
Hi all,

I'm using a LPC2148 device with built-in USB (Full Speed) device
controller.
I can sucessfully make Bulk transfers at every 1ms, but cannot do it
faster.
Since my endpoint is limitted to 64 bytes, I can't reach transfer rates
above 64Kbytes/s, even using a full speed device.
How could I increase this rate, once it could be close to 12Mbits/sec
(theoricaly)?

All sugestions are welcome,
Eduardo 


> I'm using a LPC2148 device with built-in USB (Full Speed) device > controller. > I can sucessfully make Bulk transfers at every 1ms, but cannot do it > faster.
Why not?
> Since my endpoint is limitted to 64 bytes, I can't reach transfer rates > above 64Kbytes/s, even using a full speed device.
Sure you can. You just need multiple 64 byte packets transferred within one frame.
> How could I increase this rate, once it could be close to 12Mbits/sec > (theoricaly)?
With fully optimized device and host drivers, you can reach 8-9 MBit.
> All sugestions are welcome,
http://www.lvr.com/usb.htm http://www.usb.org/phpbb/ Leo Havm�ller.
>> I'm using a LPC2148 device with built-in USB (Full Speed) device >> controller. >> I can sucessfully make Bulk transfers at every 1ms, but cannot do it >> faster. > >Why not?
I belive that the bottleneck is in the host driver. I'm using LIBUSB-WIN32 and I saw with a osciloscope that each communication at USB is done exactly at every 1ms.
> >> Since my endpoint is limitted to 64 bytes, I can't reach transfer
rates
>> above 64Kbytes/s, even using a full speed device. > >Sure you can. You just need multiple 64 byte packets transferred within
one
>frame.
How can I do this?
> >> How could I increase this rate, once it could be close to 12Mbits/sec >> (theoricaly)? > >With fully optimized device and host drivers, you can reach 8-9 MBit.
I'm actually with 32kbytes :( Thanks for attention.
> >> All sugestions are welcome, > >http://www.lvr.com/usb.htm >http://www.usb.org/phpbb/ > >Leo Havm�ller. > >
On Dec 18, 3:24 pm, "edurohr" <edur...@gmail.com> wrote:
> Hi all, > > I'm using a LPC2148 device with built-in USB (Full Speed) device > controller. > I can sucessfully make Bulk transfers at every 1ms, but cannot do it > faster. > Since my endpoint is limitted to 64 bytes, I can't reach transfer rates > above 64Kbytes/s, even using a full speed device. > How could I increase this rate, once it could be close to 12Mbits/sec > (theoricaly)? > > All sugestions are welcome, > Eduardo
You need to read up on USB. USB Full Speed is polled at 1ms, so you can't go any faster than that. Like Leo said, you need to use all of the buffers within a single 1ms frame.
>On Dec 18, 3:24 pm, "edurohr" <edur...@gmail.com> wrote: >> Hi all, >> >> I'm using a LPC2148 device with built-in USB (Full Speed) device >> controller. >> I can sucessfully make Bulk transfers at every 1ms, but cannot do it >> faster. >> Since my endpoint is limitted to 64 bytes, I can't reach transfer
rates
>> above 64Kbytes/s, even using a full speed device. >> How could I increase this rate, once it could be close to 12Mbits/sec >> (theoricaly)? >> >> All sugestions are welcome, >> Eduardo > >You need to read up on USB. USB Full Speed is polled at 1ms, so you >can't go any faster than that. Like Leo said, you need to use all of >the buffers within a single 1ms frame. >
Thanks for help, it works! Now I can get 8Mbit/s, using multiple packets per frame. I'm using the LibUsb library, so just need to increase the SIZE in the line: usb_bulk_write(dev, EP_OUT, (char *)buffer, SIZE, TIMEOUT); On firmware, once my device the output buffer has only 64 bytes lenght, I have to reload it very fast. Now I'm trying to read and write data in the same frame. Is it possible with LibUsb? Is it possible at all?

The 2024 Embedded Online Conference