Martin Nike
|
Strange USB Class Driver Problem
|
Martin Nike
08/20/2010 1:59 PM
post63770
|
Strange USB Class Driver Problem
Hi
I have created a USB Class driver using the DDK and have come across a strange issue.
a) Plug device in.
b) Start driver -
- all the interfaces, endpoints are detected and opened OK.
- set interface is called to select an alternate interface.
c) Threads are started that perform the USB IO when the application needs it.
Later, from within the other threads, usbd_io is called to write to a bulk out pipe. The first two calls succeed, but
the third never returns (Timeout is infinity). A return URB (On the bulk in pipe) never receives any data.
Scenario 2
a) Start driver
b) Plug in device
- as before, all USB config is setup and configured OK.
c) Application threads are started.
- USBD_IO transmits OK.
- USBD_IO receives data on the bulk in pipe.
I am baffled as why it should work in scenario 2, but not scenario 1.
The device works fine under Linux, and I can't see the Linux driver doing anything particularly different.
I'd prefer scenario #1 to work.
There's no other USB driver running, just the stack.
Could this be a device issue? Or could it be some sort of startup/timing issue that's causing this problem?
|
|
|