Prev: persistent font substitution
Next: user buffer question
From: Kid on 5 Jul 2010 00:23 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 .
From: Simon Richter on 5 Jul 2010 08:25 Hi, On 2010å¹´07æ05æ¥ 06:23, Kid wrote: > 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
From: Kid on 6 Jul 2010 02:16 What is the max buffer size do you suggest ? "Simon Richter" wrote: > Hi, > > On 2010年07月05日 06:23, Kid wrote: > > > 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 > > . >
From: Simon Richter on 6 Jul 2010 05:57 Hi, On 2010å¹´07æ06æ¥ 08:16, Kid wrote: > 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
From: Doron Holan [MSFT] on 6 Jul 2010 16:20 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$1(a)online.de... Hi, On 2010年07月06日 08:16, Kid wrote: > 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
|
Pages: 1 Prev: persistent font substitution Next: user buffer question |