xxxxx@dalsemi.com wrote:
Thanks for clarifying. Yes, apparently I have 4 endpoints (I mixed up control with interrupt):
- Control (send commands to USB device)
- Interrupt (host read – for device status )
- Bulk (host read)
- Bulk (host write)
So, control transfers are faster than interrupt.
No, it isn’t that simple. All pipes run at the same speed – 480 Mbps.
The key is the packeting. USB transfers happen in packets; the
different types of pipes do different types of packeting. Control pipe
transfers are limited to 64 bytes per packet, but there can be several
of them in a frame. Bulk pipe transfers are limited to 512 bytes per
packet, but again you can cram many of them into a single frame.
Interrupt pipe are guaranteed a piece of the frame time, but they cannot
transmit except during their slot. So, if an interrupt pipe is
configured to have one packet in every 4 microframes, the host will
guarantee that you always get that time, but you can’t get any more than
that. Isochronous pipes use a similar reservation scheme.
Bulk and control share whatever bandwidth is leftover after the
interrupt and isochronous reservations. That’s the danger of a bulk
pipe. If you have three high-speed cameras plugged in, each with a big
isochronous reservation, the bulk pipe has to battle for what it left.
Believe it or not, I actually have fully functioning code (based on a former driver), but one of my control transfers is much slower for some reason in my WinUSB implementation when compared to the former driver code. What are the typical bottlenecks for control transfers?
How large is the transfer? Control pipe transfers are very small, and
they do have more overhead. If you’re transferring hundreds of
kilobytes, you should try to do it on your bulk pipe instead. If it’s
just tens of bytes, then the pipe type is probably irrelevane.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.