Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

slow USB 2.0 bulk transfers on Windows 10

megabitemegabite Member Posts: 2

We are moving our USB 2.0 device from a custom driver to WinUSB. The device must continue to work with both the older driver and the new WinUSB approach so changing to isochronous for example would not be possible. I did not write the custom driver. I wrote the firmware for a new version of the device for the custom driver and application. I am writing the application and WinUSB interface. In other words, I know just enough to be dangerous...

In our testing we are seeing significantly slower bulk transfer speeds on Windows 10 vs Windows 7. Windows 10 takes approximately 60% longer to transfer.  This same slowdown occurs whether we run the original C++ application which uses the custom driver or the new C# application using WinUSB.

Our data is not large = ~10 Mb/s (1 Mb every 10 Hz revolution, i.e. 100 ms)

In our base tests, we transfer two blocks of ~470K, one block of ~54k, and a final block of ~107k.
On Windows 7, each 470k blocks take just over 18 ms to transfer - overall ~43 ms for 1.1 Mb transfer
On Windows 10, each 470k blocks take just over 29 ms to transfer == 61% longer - overall ~70 ms for 1.1 Mb transfer

These times were verified using tracing on the embedded device under JTAG control as well as a USB 3 analyzer between the device and the PC.

Because of the added delay we are just barely collecting data at full speed. We currently have at 83 us to spare running at 10 Hz... The device is revolution oriented, if you miss the timing then you wait for the next time around. We are afraid any delay or a slower machine would drop us down to half speed. Picking up even 5-10 ms would be useful.

Is there any knowledge, information, suggestions for the cause and possible solution for this significant difference in bulk transfer speeds? 

TIA!

Comments

  • Eric_WittmayerEric_Wittmayer Member Posts: 47

    If you have a USB analyzer trace, look to see if the host is waiting for the device, or the device is waiting for the host.
    For instance, in this example trace, you can see that the device NAKd the IN for 25ms before it actually sent the data.

    Compare the trace from Win 7 with Win 10 and look for differences in timing.

    If you can post the USB trace files we can take a look.
    Eric

  • megabitemegabite Member Posts: 2

    thanks Eric, I will look into that

    a fellow coder just found an algorithm that gives us some breathing room. hopefully that will work for us.

    thanks again!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 20 Apr 2020 LIVE ONLINE
Writing WDF Drivers 11 May 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA