Question on PC streamer app

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
jach_1279971
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted

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?

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

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

Hemanth

View solution in original post

0 Likes
4 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

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

Hemanth
0 Likes

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.

0 Likes

It seems my problem is solved.

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

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

Hemanth
0 Likes