- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm wondering the best way to handle a partial data transfer on the PC side? On the FX3, my DMA callback gets executed during a partial buffer like it should and performs the proper steps however, on the PC side I don't know the proper way to handle data xfer. I always get out of sync. I don't know what the size of the data xfer is and what to put in "bytes" length to xferdata function on the PC side. Is there away to stuff the buffer on the FX3 side so the buffer is always the same size? What is the best way to handle this situation?
Thanks a ton for the help!
Brandon
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
CyU3PDmaChannelSetWrapUp/CyU3PDmaMultiChannelSetWrapUp API wraps up the current active producer socket, but CyU3PDmaSocketSetWrapUp wraps up the DMA buffers corresponding to a socket.
The former API is usually used for syncing as it blocks other operations of the buffer while the API is running, which is not the case for CyU3PDmaSocketSetWrapUp.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the data that device is sending is less than the Xfer call, then to finish the Xfer, the device needs to send a ZLP (Zero Length packet). On detecting a ZLP, the host will finish the Xfer call so you do not need to worry about the size of data coming from the device
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nishant,
Thank-you for your help! I'm wondering, does the CyU3PDmaSocketSetWrapUp (CY_U3P_PIB_SOCKET_0); function do what your talking about or do I still need to send a ZLP? Or both?
Thanks,
Brandon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to send a ZLP. The CyU3PDmaSocketSetWrapUp will only commit the buffer, so you need to send a ZLP after that to indicate the host the end of transfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the difference between CyU3PDmaSocketSetWrapUp and CyU3PDmaMultiChannelSetWrapUp ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
CyU3PDmaChannelSetWrapUp/CyU3PDmaMultiChannelSetWrapUp API wraps up the current active producer socket, but CyU3PDmaSocketSetWrapUp wraps up the DMA buffers corresponding to a socket.
The former API is usually used for syncing as it blocks other operations of the buffer while the API is running, which is not the case for CyU3PDmaSocketSetWrapUp.
Best Regards,
AliAsgar