Acheivable USB speed in Full Speed ?

Hi All,
I have downloaded a 4MB firmware file on to my USB device with endpoint size of 64bytes which is connected through full speed . The results was shocking as it takes more than 10 minutes to download. The USB driver i have used is the usbsamp driver in wdk. What is the realistic speed than can be achieved and is there any tips to download the file faster ?

Are you sending the firmware to the device in 64 byte chunks one transfer at a time? Or one transfer that contains the entire buffer?

d

Sent from my phone with no t9, all spilling mistakes are not intentional.

-----Original Message-----
From: xxxxx@gmail.com
Sent: Wednesday, February 18, 2009 7:18 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Acheivable USB speed in Full Speed ?

Hi All,
I have downloaded a 4MB firmware file on to my USB device with endpoint size of 64bytes which is connected through full speed . The results was shocking as it takes more than 10 minutes to download. The USB driver i have used is the usbsamp driver in wdk. What is the realistic speed than can be achieved and is there any tips to download the file faster ?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Yes, I am sending 64 chunks at a time. Its not possible from the application to read 4mb of data in one buffer so i am reading 4096 bytes from th file at a time and sending 64 bytes on usb.

Full speed UHCI controller is usually able to execute only up to one or two application requests per USB frame. Send your data in bigger pieces. 4K is OK.
Make sure the endpoint is bulk, not interrupt.

Send your data in as big chunks as you can, the max packet size is not the max transfer size. Furthermore open the handle to the device as overlapped and send more than one packet at a time to make sure you saturate the usb schedule.

Why is your app limited to reading the fw in 4k chunks? If it is a file on disk, you can read the whole buffer in at once. If it from some other source you can accumulate the entire fw file before sending it to the device.

d

Sent from my phone with no t9, all spilling mistakes are not intentional.

-----Original Message-----
From: xxxxx@gmail.com
Sent: Wednesday, February 18, 2009 8:57 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Acheivable USB speed in Full Speed ?

Yes, I am sending 64 chunks at a time. Its not possible from the application to read 4mb of data in one buffer so i am reading 4096 bytes from th file at a time and sending 64 bytes on usb.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Even this way it is possible to transfer 4 MB within 4 - 5 seconds
to/from full speed USB device. Using synchronous requests it’d be a bit
slower but not so much (with 4 kB requests it can be 5 - 10 sec). Check
where is a bottleneck. It can be at app side (use traces to see
workflow) or at device side (use USB analyser). I’d presume problem at
device side. If so, you’d see a lot of NAKs in the log from USB
analyser.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Thursday, February 19, 2009 5:54 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Acheivable USB speed in Full Speed ?

Yes, I am sending 64 chunks at a time. Its not possible from
the application to read 4mb of data in one buffer so i am
reading 4096 bytes from th file at a time and sending 64
bytes on usb.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online
at http://www.osronline.com/page.cfm?name=ListServer

I tried sending 512bytes chunks at a time to the device and I found it was true. The download was done in 40seconds this time. There was also no NACKS from the device so seems like the device is working fine. But when i saw the USB logs through a analyzer i found that some junk data was also accompaning my download data(e.g: CCCCCCCCC).

xxxxx@gmail.com wrote:

I tried sending 512bytes chunks at a time to the device and I found it was true. The download was done in 40seconds this time. There was also no NACKS from the device so seems like the device is working fine. But when i saw the USB logs through a analyzer i found that some junk data was also accompaning my download data(e.g: CCCCCCCCC).

Are you FILLING the 512-byte chunks? CCCCCCCC is an indication of
uninitialized memory.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Subhashis Sikder wrote:

Tim Roberts wrote:

> But when i saw the USB logs through a analyzer i found that some
> junk data was also accompaning my download data(e.g: CCCCCCCCC).

Are you FILLING the 512-byte chunks? CCCCCCCC is an indication
of uninitialized memory.

Gosh Tim … you didn’t mention THAT part!