SEETHARAM GOVINDASWAMY wrote:
We developed our own USB host driver which works fine for Bulk Mode.
Why did you develop a USB host driver?
But in Isochoronous mode, data corruption problem occurs.
We are supposed to receive 376 bytes of data with packet size 64
bytes. But the received data is not the one which we are expecting for…
Is there anything particularly we must take care for Isochronous Mode?
There’s not nearly enough information here to address your question.
Isochronous requests work very differently from bulks requests. With
bulk, the buffer just continues to fill up as new packets arrive, no
matter how long the gap between them.
With isochronous, each packet in the request corresponds exactly to one
interval. If no data is not received during an interval, the
corresponding packet will have 0 bytes.
So, lets say you submit an isochronous request with 8 packets of 64
bytes, on an endpoint with an interval of 1 microframe. The URB will be
finished after 8 microframes, regardless of how much data was received.
So, if the device can only prepare 64 bytes every 3 microframes, the 8
packets will have 64 bytes, 0 bytes, 0 bytes, 64 bytes, 0 bytes, 0
bytes, 64 bytes, 0 bytes.
Also remember that the data are not packed together. The resulting
buffer will have 64 good bytes, then 128 bytes of garbage (because 2
packets were not filled), then 64 good bytes, then 128 bytes of garbage,
then 64 more good bytes.
376 is not a multiple of 64. Did you mean 384?
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.