- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, dear friends,
I met a problem in FX3 to receive residual data in FX3: in order to achieve high speed, I set a large transfer data length for XferData() function, such as 1024*128, but at the end of the data transfer, there will be a little amount of data smaller than 1024*128. So when XferData() time out and meet error, I call XferData()again and try a smaller data length , but It's will never succeed and can't receive the data tail . But if I set a smaller data length all the time, I can receive the tail.
Does anybody know how to solve this problem? Thank you very much and best wishes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems like the residual data you have in this scenario is a multiple of endpoint max pkt size (1024 for superspeed).
In such cases, if you setup XferData with len greater than the exact amount of data, it will not return.
This is as per usb protocol and you need to append the residual data in the Fx3 with a ZLP (zero length packet). The ZLP will cause any XferData() call to return without timeout error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
i may have the similar issue above. Does "the exact amount of data" you referred in line 3 mean 1024 or burst_length*1024?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much and I will try it.