I am having an issue with a USB 2.0 high-bandwidth iso endpoint. It isn't
behaving the way I expect.
The descriptor for the endpoint has the maximum bandwidth -- wMaxPacketsize
of 0x1400, meaning 1024 bytes with 3 transfers per microframe. I had
assumed that I would use this like any other isochronous endpoint, by
sending it a series of 1024-byte packets, so that each microframe would
consume 3 such packets.
However, that does not seem to be what the host controller driver expects.
I was VERY surprised to find that USBD_PIPE_INFORMATION.MaximumPacketSize
was 3072, not 1024. Further, if I send it a series of 1024-byte packets, I
get USBD_STATUS_INVALID_PARAMETER. It looks as though USBD will only
schedule one URB per microframe.
So why is this a problem? Well, let's say our data is coming in chunks of
2600 bytes, which means 1024 plus 1024 plus 552. We are using an FX2. Our
data rate is lower than the maximum bandwidth. When the FX2 gets an IN
token but its FIFO is empty, it does not reply. When that happens, I will
get a packet with 1024+1024 bytes plus an error, followed by a packet with
552+1024+1024, but those bytes are all packed together. I can't identify
the packet boundaries.
So, is it a fact that USBD will only schedule one URB per microframe? Or
have I missed something?
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.