USB iso IN endpoint does not work

Hi all!

My USB high-speed device has an iso IN endpoint with the following
values in the endpoint descriptor:
bEndpointAddress = 0x81
bmAttributes = 0x11 (TransferType=Isochronous + UsageType=Feedback)
wMaxPacketSize = 4
bInterval = 8 (128 microframes)

I create a URB with 8 packets of 4 bytes each (32 bytes buffer size in
total) and submit it to the endpoint. The following happens:
IoCallDriver returns STATUS_PENDING (which is expected).
No IN token appears on the bus.
The IRP/URB gets completed with
STATUS_INVALID_PARAMETER/USBD_STATUS_INVALID_PARAMETER.

The IRB/URB does not get completed in the context of the IoCallDriver
call. It gets completed in the context of a DPC (scheduled by the bus
driver). Because of this I assume that my URB passes parameter validation.

I’m sure that the URB is set up correctly. I have a valid pipe handle
and a correct packet array. Other iso endpoints of the device work well.
However, those endpoints use bInterval = 1 and bmAttributes = 0x01.

Are there any know issues with bInterval settings other than 1?

Thanks.
Udo

Udo Eberhardt wrote:

My USB high-speed device has an iso IN endpoint with the following
values in the endpoint descriptor:
bEndpointAddress = 0x81
bmAttributes = 0x11 (TransferType=Isochronous + UsageType=Feedback)
wMaxPacketSize = 4
bInterval = 8 (128 microframes)

I create a URB with 8 packets of 4 bytes each (32 bytes buffer size in
total) and submit it to the endpoint. The following happens:
IoCallDriver returns STATUS_PENDING (which is expected).
No IN token appears on the bus.
The IRP/URB gets completed with
STATUS_INVALID_PARAMETER/USBD_STATUS_INVALID_PARAMETER.

You’re covering a span of 128 milliseconds there. I thought there was a
limit on how much wall clock time a single isoch URB could cover. Does
it work if you reduce your URBs to, say, 2 packets of 4 bytes?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Have not tried that yet because the WDK states that in case of high
speed the URB always needs to contain a multiple of 8 packets. But I
will give it a try and report back.

Udo

On 04.11.2009 19:40, Tim Roberts wrote:

Udo Eberhardt wrote:
> My USB high-speed device has an iso IN endpoint with the following
> values in the endpoint descriptor:
> bEndpointAddress = 0x81
> bmAttributes = 0x11 (TransferType=Isochronous + UsageType=Feedback)
> wMaxPacketSize = 4
> bInterval = 8 (128 microframes)
>
> I create a URB with 8 packets of 4 bytes each (32 bytes buffer size in
> total) and submit it to the endpoint. The following happens:
> IoCallDriver returns STATUS_PENDING (which is expected).
> No IN token appears on the bus.
> The IRP/URB gets completed with
> STATUS_INVALID_PARAMETER/USBD_STATUS_INVALID_PARAMETER.

You’re covering a span of 128 milliseconds there. I thought there was a
limit on how much wall clock time a single isoch URB could cover. Does
it work if you reduce your URBs to, say, 2 packets of 4 bytes?

Transfers on high-speed isoch endponts with a period > 8 microframes (1 frame) are not supported.

Only high-speed isoch endpoints with periods {1, 2, 4, 8} microframes are supported.

Udo Eberhardt wrote:

Have not tried that yet because the WDK states that in case of high
speed the URB always needs to contain a multiple of 8 packets.

That’s ONLY true when interval = 1. The restriction is that an URB for
a high-speed isoch pipe must always span an even multiple of 8
microframes. When interval = 1, the URB must have 8N packets. When
interval=2, it must have 4N packets. Interval=3 (every 4 uframes), 2N
packets. For interval=4 or more, there is no restriction.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

You are right. I tried to submit USBs with 1 or 2 packets. This URB
passes parameter validation in the bus driver. So the WDK docs seem not
to be clear on that point.

However, the URBs fail in the same way as before. Meanwhile Glen has
explained why. They don’t support intervals of more than one frame. I’m
now going to contact my customer to request a firmware change…

Udo

On 04.11.2009 22:40, Tim Roberts wrote:

Udo Eberhardt wrote:
> Have not tried that yet because the WDK states that in case of high
> speed the URB always needs to contain a multiple of 8 packets.

That’s ONLY true when interval = 1. The restriction is that an URB for
a high-speed isoch pipe must always span an even multiple of 8
microframes. When interval = 1, the URB must have 8N packets. When
interval=2, it must have 4N packets. Interval=3 (every 4 uframes), 2N
packets. For interval=4 or more, there is no restriction.