Discussion:
WinUSB large data question
(too old to reply)
Kid
2010-07-05 04:23:22 UTC
Permalink
hi

Can we use virtual memory or file mapping view buffer for WinUSB ? How can
we send large data more than gigabytes to USB device ?

Thank for your teaching .
Simon Richter
2010-07-05 12:25:12 UTC
Permalink
Hi,
Post by Kid
Can we use virtual memory or file mapping view buffer for WinUSB ? How can
we send large data more than gigabytes to USB device ?
I think setting up transfer requests of this size is a bad idea;
instead, just set up a loop that submits the data in handy chunks.

Simon
Kid
2010-07-06 06:16:41 UTC
Permalink
What is the max buffer size do you suggest ?
Post by Simon Richter
Hi,
Post by Kid
Can we use virtual memory or file mapping view buffer for WinUSB ? How can
we send large data more than gigabytes to USB device ?
I think setting up transfer requests of this size is a bad idea;
instead, just set up a loop that submits the data in handy chunks.
Simon
.
Simon Richter
2010-07-06 09:57:44 UTC
Permalink
Hi,
Post by Kid
What is the max buffer size do you suggest ?
I use two buffers of 1500 bytes each, that is, I prepare the next buffer
while the current one is transferring. Depending on your protocol, you
can also submit the second buffer while the first is still active; if
the first transfer fails for some reason, you will need to
resynchronize, but this way, you can keep the bus fully saturated.

Smaller buffers than 1500 bytes will hurt performance. Larger buffers
are generally okay, but they should be in the order of kilobytes (64kB
would be a good value if you are just copying data around).

Simon
Doron Holan [MSFT]
2010-07-06 20:20:45 UTC
Permalink
IIRC, the USB host controller will chunk up transfers at the 3 MB boundary,
so you can easily send a large buffer to winusb. a 1 GB is rather large
though.

d

"Simon Richter" wrote in message news:i0uumq$hs7$***@online.de...

Hi,
Post by Kid
What is the max buffer size do you suggest ?
I use two buffers of 1500 bytes each, that is, I prepare the next buffer
while the current one is transferring. Depending on your protocol, you
can also submit the second buffer while the first is still active; if
the first transfer fails for some reason, you will need to
resynchronize, but this way, you can keep the bus fully saturated.

Smaller buffers than 1500 bytes will hurt performance. Larger buffers
are generally okay, but they should be in the order of kilobytes (64kB
would be a good value if you are just copying data around).

Simon

Loading...