Hi everybody,
I’ve a question about usb high speed isochronous transfer.
I’m using a Cypress FX2LP to send data from a CCD over USB.
Cypress firmware is configured to send 3 packets/uFrame (3072 packets/microframe) and CCD fills a single FIFO in 34 us (and I have 4 FIFOs, each of 1024 kb).
The problem is that FIFOs are getting full and some data is getting lost. But if FX2 sent 3072 kb every microframe, , FIFOs would never get full!
So my question is: is it sure that host issues an IN token every 125us? I’m using Windows XP SP2 and I’ve tried several number of packets/urb (from 8 to 256).
Thanks in advance,
Giorgio Gallina
Do you see that behavior on Vista SP2?
S.
xxxxx@gmail.com wrote:
I’ve a question about usb high speed isochronous transfer.
I’m using a Cypress FX2LP to send data from a CCD over USB.
Cypress firmware is configured to send 3 packets/uFrame (3072 packets/microframe) and CCD fills a single FIFO in 34 us (and I have 4 FIFOs, each of 1024 kb).
Are you sure about your numbers? If you are getting 1024 bytes every
34us, that’s faster than an isochronous pipe. That’s 30MB/sec, but an
isochronous pipe is limited to 24MB/sec.
The problem is that FIFOs are getting full and some data is getting lost. But if FX2 sent 3072 kb every microframe, FIFOs would never get full!
So my question is: is it sure that host issues an IN token every 125us? I’m using Windows XP SP2 and I’ve tried several number of packets/urb (from 8 to 256).
As long as you make sure there is always a read request ready and
waiting, you will get a shot in every microframe. That means you must
submit more than one URB. If you ever let the queue run dry, so that
there is no request waiting, then you will miss that frame.
Also note that there is no guarantee on the timing of the transfers.
You will have three 1024-byte transfers per microframe, but there’s no
promise how they will be spaced out. You might get three transfers
neatly spaced 40us apart, but you might get three right in a row,
followed by a 100us gap before the next one. And if your device does
not have enough data to fill the first transfer, the other two are
canceled. You will have to wait until the next microframe.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
On Tue, Oct 12, 2010 at 7:18 PM, Tim Roberts wrote:
> ?xxxxx@gmail.com wrote:
>> I’ve a question about usb high speed isochronous transfer.
>> I’m using a Cypress FX2LP to send data from a CCD over USB.
>>
>> Cypress firmware is configured to send 3 packets/uFrame (3072 packets/microframe) and CCD fills a single FIFO in 34 us (and I have 4 FIFOs, each of 1024 kb).
>
> Are you sure about your numbers? ?If you are getting 1024 bytes every
> 34us, that’s faster than an isochronous pipe. ?That’s 30MB/sec, but an
> isochronous pipe is limited to 24MB/sec.
Yes, I’m sure! But I’ve 4 x 1kb FIFOs and packets of 2500 byte to
transfer spaced by 33us. So, actually, I’m filling my FIFOs with 2500
byte in 118us (so 21 MB/sec).
>> The problem is that FIFOs are getting full and some data is getting lost. But if ?FX2 sent 3072 kb every microframe, FIFOs would never get full!
>>
>> So my question is: is it sure that host issues an IN token every 125us? I’m using Windows XP SP2 and I’ve tried several number of packets/urb (from 8 to 256).
>
> As long as you make sure there is always a read request ready and
> waiting, you will get a shot in every microframe. ?That means you must
> submit more than one URB. ?If you ever let the queue run dry, so that
> there is no request waiting, then you will miss that frame.
So IN tokens every 125us are not guaranteed? Are guaranteed only if I
submit a enough URBs?
> Also note that there is no guarantee on the timing of the transfers.
> You will have three 1024-byte transfers per microframe, but there’s no
> promise how they will be spaced out. ?You might get three transfers
> neatly spaced 40us apart, but you might get three right in a row,
> followed by a 100us gap before the next one. ?And if your device does
> not have enough data to fill the first transfer, the other two are
> canceled. ?You will have to wait until the next microframe.
IN tokens are guaranteed to be exactly spaced by 125 us (if I submit
enough URBs)?
Thank you so much!
Giorgio
Thank you very much Tim,
now it’s everything clear.
Giorgio