Win10 specific issue in data transfer from an FX3 over USB3.

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

cross mob
BaSi_4567401
Level 1
Level 1
Welcome! 5 replies posted First question asked

Hello All,

We are using the Cypress .Net library for data transfer from an FX3 over USB3. The filename is CyUSB.dll, original version 1.2.2.0, latest version 1.2.3.0.

Our application is WPF, with the camera acquisition running in a standard .Net Thread

We use the CyUSBDevice.BulkInEndPt.XferData function to read camera frames sent from the FX3. The frame size is normally approx. 8MB, and it is always a multiple of 16KB.

The frame rate is normally from 2 to 10 frames a second, but does not seem critical to producing the error condition.

Normally this function will return true and the data is transferred, but the issue occurs that often running on Windows10 this function will return false, and only partial frame data is transferred, sometimes half the frame size, sometimes less.

Often it is not possible to recover from this situation, even after calling Abort and Reset on the BulkInEndPt, no further transfers will succeed.

The BulkInEndPt.UsbdStatus returns “state=ERROR status=UKNOWN” and the BulkInEndPt.LastError is 997. We have not found any useful information from these.

The latest Cypress FX3 SDK (1.3.4)  has several CyUSB.dll files that are different at the binary level, all with the same version number, but they all give the same behavior.

A possibly related note is that the FX3 SDK 1.3.4 includes the USBSuite Release Notes, link here : https://www.cypress.com/file/138771/download

Which has the following statement:

  • The CyUsb.NET C# libraries have a known issue related to the garbage collection of buffers used for

asynchronous data transfers (BeginDataXfer and FinishDataXfer). The compiler directives used to pin the

buffer in memory until completion may get optimized away in release builds, making the buffers susceptible

to be freed by the garbage collector while they are in use. This can cause applications using these library

methods to crash when they start queueing up large number of transfers across multiple endpoints.

  • This issue will be fixed in the final release version of the FX3 SDK 1.3.3. Until then, it is recommended that

applications using the CyUsb.NET libraries pin any data buffers into memory using the Windows APIs until

the corresponding data transfer is finished.

This may be related to our issue, but does not describe our situation exactly – we use the synchronous function XferData, and our application doesn’t crash, it just returns an error condition.

Since we are now using FX3 SDK 1.3.4 we also assume it has been fixed.

0 Likes
5 Replies
KandlaguntaR_36
Moderator
Moderator
Moderator
25 solutions authored 10 solutions authored 5 solutions authored

Hello,

Mostly, the above mentioned limiattions/ known issues would have fixed in beyond SDK 1.3.3. I will check internally and confirm it.

Since you are usinbg Sync. data transfers, the above know issue wouldn't be a problem in your use case.

In general, 997 error comes, when the device is not sending the host requested amount data within a time frame. Have you tried increasing the timeout period of XferData API?

Can you please confirm the following?

1. The application is working fine in Windows 7. It is only issue in Windows 7. Is this correct?

2. In windows 10, the device is streaming the video data correctly. The application is not capturing the data from the device. Is it correct?

Regards,

Sridhar

0 Likes

Hello Sridhar,

Please see our comments here:

Mostly, the above mentioned limiattions/ known issues would have fixed in beyond SDK 1.3.3. I will check internally and confirm it.

FSL: OK, please let us know what is confirmed.

Since you are usinbg Sync. data transfers, the above know issue wouldn't be a problem in your use case.

In general, 997 error comes, when the device is not sending the host requested amount data within a time frame. Have you tried increasing the timeout period of XferData API?

FSL: We set the timeout of the BulkInEndPt (which does the XferData) to 1500ms. Which should be plenty long enough.  We have built a new version with the timeout set to 5000ms and the same errors were observed.

Can you please confirm the following?

  1. The application is working fine in Windows 7. It is only issue in Windows 7. Is this correct?

FSL: We have no reported issues on Windows 7

  1. In windows 10, the device is streaming the video data correctly. The application is not capturing the data from the device. Is it correct?

FSL: The issues are only observed on Windows 10.  A Win7/Win10 dual boot PC connected to the hardware runs fine with Windows 7 but not with Windows 10. So this suggests that the device is streaming the data OK.

0 Likes

Hello,

I can confirm that the known issue mentioned in the first thread was fixed long back and document has not updated.

We will update it in the next version. Thank you for pointing this.

Can you please use Streamer application (Asynchronous data transfer) provided with the SDK (C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\c_sharp\streamer) and check whethere there is data flow?

0 Likes

Hello,

The Streamer app has been used by the contractor, so we do not have access to it. Can you please help in getting the app?

Thank You and Best Regards,

Balint

0 Likes

Hello,

Please download the FX3 SDK from here ( https://www.cypress.com/documentation/software-and-drivers/ez-usb-fx3-software-development-kit ) and get the streamer in the following folder: (C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\c_sharp\streamer

Regards,

Sridhar

0 Likes