It all happens on the bus. What does an analyzer trace look like?
Is the device connected at full speed instead of high-speed?
Do you queue both the read and write at the same time so both
transactions can happen in the same frame. USB controllers only
interrupt the host once per 1ms frame, so I would expect the average
latency if you queue both requests to be about 1ms on a lightly
loaded bus.
Is your driver a user-mode application, or a kext? Are you making
synchronous or asynchronous calls to read and write your pipes?
Your experience sounds abnormal, but we don't have enough information
to even guess and what might not be quite right.
David Ferguson
Apple Computer
At 2:58 PM +0200 9/13/05, Gerald Heinig wrote:
Hi all,
I'm developing a device driver for a USB communications device.
I've run into problems with latency when sending and receiving
messages to and from my USB device. The device is controlled via
firmware commands which are sent over the bulk out pipe and whose
responses are read in through the bulk in pipe.
Each firmware command takes 0.5 seconds with my driver, which is 3
orders of magnitude too slow. The corresponding Windows driver for
the same device reports firmware command turnaround times of between
500 and 1200 _micro_seconds.
I've also noticed data transfer is too slow by a factor of 20 or so.
Transfer rate should be around 20-30 MBit/sec, I'm currently getting
0.5 Mbit/sec transmit and 1.0 Mbit/sec receive. My guess is that
maybe something's working in low speed or full speed mode, instead
of high speed. However, that wouldn't explain the terrible latency
I'm experiencing. The amounts of data that I'm transmitting are so
low (~20 bytes, on average), that data transfer time can't be the
reason.
Any ideas?
Cheers,
Gerald
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden