XferData returns true but no data in buffer

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

cross mob
GrWa_2302706
Level 4
Level 4
50 questions asked 25 replies posted 10 replies posted

Hi

GFIP II of FX3 runs at 100MHz with 32-bit data lines.

For each read, it will use the status below to check whether the data is received.

     bRead = mDevice.BulkInEndPt.XferData(ref data, ref length, PacketMode);

Sometimes, all zeros are in the buffer even though bRead returns true and XrefData returns 16B length, which the correct transferred data length.

May I know what are the possible reasons for the data loss ? Thanks.

BR

Grace

0 Likes
1 Solution

Hello,

For a bulk endpoint, the field successes will be incremented by one if the API FinishDataXfer is a success. Therefore, it can show success even if some random data is transferred. In order to check whether the data transferred is correct, please check the box "Show Transfered Data" in the streamer application.

Edited​:

If you dont see any buffers without data using streamer application, then please modify your host application by referring to the source code of streamer application. The source code of the streamer application can be found in the following location.

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\cpp\streamer

Note : This location depends on the installation directory of FX3 SDK.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

0 Likes
10 Replies
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello,

Please let me know the following:

1. Which firmware are you using?

2. Are you using a custom host application for viewing the transferred data? If not, then please let me know which host application are you using in this work?

Also, please go through the following thread:

FX3 xferdata API returns NULL packet

There is a workaround mentioned in this thread. Please follow the workaround and let me know if this solves your issue.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes

Hi Jayakrishna

Using Sync Slave FIFO code example and CyUSB.dll.

BR

Grace

0 Likes

Hi Jayakrishna

As the thread said, adding a delay would affect the throughput heavily, is there any other way ?

Thanks.

BR

Grace

0 Likes

Hello,

Please  let me know whether the addition of the delay solved your problem with a compromise in throughput?

Can you please try the same with streamer application and check the data received? Please let me know whether the same error occurs?

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes

Hi Jayakrishna

It happens at a very low rate, around 1/5000. Therefore, could you tell me the purpose of 2 trials you mentioned ?

Thanks a lot.

BR

Grace

0 Likes

Hello,

Please confirm which test gave you a data rate of 1/5000. Is it by adding delay to your application or is it by using streamer. I recommended you to perform the above tests to understand if the problem is related to your host application or not.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes

Hello Jayakrishna

Is it by adding delay to your application or is it by using streamer ?

Grace: Neither. It's original issue occurrence rate.

Test 1: add 6ms delay and it doesn't work. Add 50ms delay however the host cannot accept it and returns error.

Test 2: could you give me the instructions of using streamer for test ?

Thanks and regards.

Grace

0 Likes

Hello,

Please refer to Page 62 of the following document to understand how to find throughput using streamer application.

http://static6.arrow.com/aropdfconversion/b9d02c19ebf53e3279c245a29c1614a81ad41a16/docid48380.pdf

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes

Hi Jayakrishna

For streamer test, no failure or error is found.

streamer.png

Does the success mean the data is transferred correctly (correct size, and correct data) ?

BR

Grace

0 Likes

Hello,

For a bulk endpoint, the field successes will be incremented by one if the API FinishDataXfer is a success. Therefore, it can show success even if some random data is transferred. In order to check whether the data transferred is correct, please check the box "Show Transfered Data" in the streamer application.

Edited​:

If you dont see any buffers without data using streamer application, then please modify your host application by referring to the source code of streamer application. The source code of the streamer application can be found in the following location.

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\cpp\streamer

Note : This location depends on the installation directory of FX3 SDK.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes