why the data length of iso transfer is always 0?

hi,everyone
I am writing a driver for a camera ov511+.It seems all right before it
begins to transfer iso data.I called
usbd_io(urb, cam->IsoPipe, iso_cbf, cam,USBD_TIME_INFINITY);
and in the callback function iso_cbf,
usbd_urb_status( urb, &fst, &flen ) is called .but every time ,the fst is
USBD_STATUS_CMP yet the flen equals to 0. the USBD_STATUS_CMP means the
operation has completed but why the data length is 0?
Could anyone give me some tips? thanks very much

Is this always or only when the frame ends ?
May this is the indicator to the end of frame ?
cheers, peter

Meg Dai wrote:

hi,everyone
I am writing a driver for a camera ov511+.It seems all right before it
begins to transfer iso data.I called
usbd_io(urb, cam->IsoPipe, iso_cbf, cam,USBD_TIME_INFINITY);
and in the callback function iso_cbf,
usbd_urb_status( urb, &fst, &flen ) is called .but every time ,the fst is
USBD_STATUS_CMP yet the flen equals to 0. the USBD_STATUS_CMP means the
operation has completed but why the data length is 0?
Could anyone give me some tips? thanks very much

It always acts that way. I setup another iso transfer at the end of
iso_cbf so that the function will be called continually, but the result is
always the same: the status is1000000 and the length of data transferred is
0 .

“peter” <pidderw@hotmail.com> ??? news:3F830B34.4030601@hotmail.com

Is this always or only when the frame ends ?
May this is the indicator to the end of frame ?
cheers, peter

Meg Dai wrote:
hi,everyone
I am writing a driver for a camera ov511+.It seems all right before it
begins to transfer iso data.I called
usbd_io(urb, cam->IsoPipe, iso_cbf, cam,USBD_TIME_INFINITY);
and in the callback function iso_cbf,
usbd_urb_status( urb, &fst, &flen ) is called .but every time ,the fst
is
USBD_STATUS_CMP yet the flen equals to 0. the USBD_STATUS_CMP means the
operation has completed but why the data length is 0?
Could anyone give me some tips? thanks very much

\

I saw this, when doing a usbd_pipe_reset or usbd_pipe_abort and then
changing the alternate/interface and restarting isochron transfers.
All transfers are USBD_URB_CMP but with 0 bytes length.
May try avoid to use usbd_abort_pipe().
cheers, peter

Meg Dai wrote:

It always acts that way. I setup another iso transfer at the end of
iso_cbf so that the function will be called continually, but the result is
always the same: the status is1000000 and the length of data transferred is
0 .

“peter” <> pidderw@hotmail.com> > ??? news:> 3F830B34.4030601@hotmail.com> …

Is this always or only when the frame ends ?
May this is the indicator to the end of frame ?
cheers, peter

Meg Dai wrote:

hi,everyone
I am writing a driver for a camera ov511+.It seems all right before it
begins to transfer iso data.I called
usbd_io(urb, cam->IsoPipe, iso_cbf, cam,USBD_TIME_INFINITY);
and in the callback function iso_cbf,
usbd_urb_status( urb, &fst, &flen ) is called .but every time ,the fst

is

USBD_STATUS_CMP yet the flen equals to 0. the USBD_STATUS_CMP means the
operation has completed but why the data length is 0?
Could anyone give me some tips? thanks very much



\

Hi, Peter, thanks for your help.
But in my case,it is different. In fact, after i called usbd_abort_pipe,the
return status would be 20409fa,which is not defined at all, and i have
disabled all usbd_abort_pipe, the result is still the same.Could there be
any other causes for this?
Best regards
“peter” <pidderw@hotmail.com> ??? news:3F8747A1.2010301@hotmail.com

I saw this, when doing a usbd_pipe_reset or usbd_pipe_abort and then
changing the alternate/interface and restarting isochron transfers.
All transfers are USBD_URB_CMP but with 0 bytes length.
May try avoid to use usbd_abort_pipe().
cheers, peter

Meg Dai wrote:
It always acts that way. I setup another iso transfer at the end of
iso_cbf so that the function will be called continually, but the result
is
always the same: the status is1000000 and the length of data transferred
is
0 .

“peter” <> pidderw@hotmail.com> > ??? news:> 3F830B34.4030601@hotmail.com> …

Is this always or only when the frame ends ?
May this is the indicator to the end of frame ?
cheers, peter

Meg Dai wrote:

hi,everyone
I am writing a driver for a camera ov511+.It seems all right before it
begins to transfer iso data.I called
usbd_io(urb, cam->IsoPipe, iso_cbf, cam,USBD_TIME_INFINITY);
and in the callback function iso_cbf,
usbd_urb_status( urb, &fst, &flen ) is called .but every time ,the fst

is

USBD_STATUS_CMP yet the flen equals to 0. the USBD_STATUS_CMP means the
operation has completed but why the data length is 0?
Could anyone give me some tips? thanks very much





\

You are sure, that all previous transfers are terminated/completed
before you start a new transfer (usbd_io) with the same urb buffer.
e.g. if you change the alternate?
The iso_cbf is called by a separate thread wich runs in parallel
to your code. What kind of protection/synchronisation you use in
your iso_cbf to protect your urb-frame?
In my drivers, I use a single flag in the device attribute to mark
the usage of all urb buffers. If I detect this flag in my iso_cb,
I don’t restart the usbd_io() and wait until all frames are drained.
cheers, peter
Meg Dai wrote:

Hi, Peter, thanks for your help.
But in my case,it is different. In fact, after i called usbd_abort_pipe,the
return status would be 20409fa,which is not defined at all, and i have
disabled all usbd_abort_pipe, the result is still the same.Could there be
any other causes for this?
Best regards


I saw this, when doing a usbd_pipe_reset or usbd_pipe_abort and then
changing the alternate/interface and restarting isochron transfers.
All transfers are USBD_URB_CMP but with 0 bytes length.
May try avoid to use usbd_abort_pipe().
cheers, peter

Meg Dai wrote:

It always acts that way. I setup another iso transfer at the end of
iso_cbf so that the function will be called continually, but the result

is

always the same: the status is1000000 and the length of data transferred

is

0 .

“peter” <> pidderw@hotmail.com> > ??? news:> 3F830B34.4030601@hotmail.com> …


Is this always or only when the frame ends ?
May this is the indicator to the end of frame ?
cheers, peter

Meg Dai wrote:


hi,everyone
I am writing a driver for a camera ov511+.It seems all right before it
begins to transfer iso data.I called
usbd_io(urb, cam->IsoPipe, iso_cbf, cam,USBD_TIME_INFINITY);
and in the callback function iso_cbf,
usbd_urb_status( urb, &fst, &flen ) is called .but every time ,the fst


is


USBD_STATUS_CMP yet the flen equals to 0. the USBD_STATUS_CMP means the
operation has completed but why the data length is 0?
Could anyone give me some tips? thanks very much





\

Hi,peter.
I can get data now! I update the rtos to 6.2.0 and the result is different!
thank you very much .
I have not considered the problem of is protection for i use only one urb
one time.
“peter” <pidderw@hotmail.com> ??? news:3F89848A.9040004@hotmail.com

You are sure, that all previous transfers are terminated/completed
before you start a new transfer (usbd_io) with the same urb buffer.
e.g. if you change the alternate?
The iso_cbf is called by a separate thread wich runs in parallel
to your code. What kind of protection/synchronisation you use in
your iso_cbf to protect your urb-frame?
In my drivers, I use a single flag in the device attribute to mark
the usage of all urb buffers. If I detect this flag in my iso_cb,
I don’t restart the usbd_io() and wait until all frames are drained.
cheers, peter
Meg Dai wrote:
Hi, Peter, thanks for your help.
But in my case,it is different. In fact, after i called
usbd_abort_pipe,the
return status would be 20409fa,which is not defined at all, and i have
disabled all usbd_abort_pipe, the result is still the same.Could there
be
any other causes for this?
Best regards


I saw this, when doing a usbd_pipe_reset or usbd_pipe_abort and then
changing the alternate/interface and restarting isochron transfers.
All transfers are USBD_URB_CMP but with 0 bytes length.
May try avoid to use usbd_abort_pipe().
cheers, peter

Meg Dai wrote:

It always acts that way. I setup another iso transfer at the end of
iso_cbf so that the function will be called continually, but the
result

is

always the same: the status is1000000 and the length of data
transferred

is

0 .

“peter” <> pidderw@hotmail.com> > ??? news:> 3F830B34.4030601@hotmail.com> …


Is this always or only when the frame ends ?
May this is the indicator to the end of frame ?
cheers, peter

Meg Dai wrote:


hi,everyone
I am writing a driver for a camera ov511+.It seems all right before
it
begins to transfer iso data.I called
usbd_io(urb, cam->IsoPipe, iso_cbf, cam,USBD_TIME_INFINITY);
and in the callback function iso_cbf,
usbd_urb_status( urb, &fst, &flen ) is called .but every time ,the
fst


is


USBD_STATUS_CMP yet the flen equals to 0. the USBD_STATUS_CMP means
the
operation has completed but why the data length is 0?
Could anyone give me some tips? thanks very much







\