- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to BeginDataXfer, WaitForXfer, and FinishDataXfer approach ,
BeginDataXfer queues up the request i.e. gives the buffer and its location to the USB stack
Waitforxfer waits for the transfer to complete, it'll wait for the timeout value specified if the transfer doesn't complete by then it'll timeout the reqeust
Finishdataxfer retrieves the data that was received. If only part of the data was received and a timeout happened it'll release the rest of the buffer
If I just only implement "Slave read" (BULK IN) in FX3 to read data from FPGA, can I just invoke Waitforxfer() & Finshdataxfer() and delete BeginDataXfer() in streamer app?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
To make asynchronous transfers, all the above three APIs are necessary and it has to be done the way the streamer is implementing the same.
I think you are looking for synchronous transfers where you request for some data and wait for it to return. In that case please refer to XferData() API. You can look for documentation regarding it in section 4.14.7 in CyUSB.NET.pdf in the following path:
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\doc\SuiteUSB
Also you can refer to it's usage in 'control center' application source code.
Please let me know for any questions.
Regards,
Hemanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
To make asynchronous transfers, all the above three APIs are necessary and it has to be done the way the streamer is implementing the same.
I think you are looking for synchronous transfers where you request for some data and wait for it to return. In that case please refer to XferData() API. You can look for documentation regarding it in section 4.14.7 in CyUSB.NET.pdf in the following path:
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\doc\SuiteUSB
Also you can refer to it's usage in 'control center' application source code.
Please let me know for any questions.
Regards,
Hemanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regarding to the BULK mode of asynchronous transfers, Finishdataxfer retrieves the data that was received but the second parameter of this function is just a value, how do I know that how much data is received by the host?
For data transmission, what is the minimum number of data per packet should be transmitted? 512 * 8 bytes? Can I send out arbitrary number of bytes? How?
As I know that the advantage of asynchronous transfer is no need to wait for the return, and the transfer rate will be higher than synchronous transfer, right?
I'm modifying C++ streamer, thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems my problem is solved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good to know the same. But regarding your question - 'how do I know that how much data is received by the host?':
The second parameter of FinishDataXfer() tells the actual number of bytes transferred.
Regards,
Hemanth