how to control 2 fx3 usb to work in different thread?

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

cross mob
fumac_3907466
Level 1
Level 1

how to control 2 fx3 usb to work in different thread? When I use two thread to read/write data using fx3 usb, it will crash random while call function (XferData).

Could you help to share me some detail codes?thank.

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

Hi,

I think you are mentioning about Host side applications talking to FX3 Device.

Is it a C# OR C++ application?

Howmany endpoints does the Device has? If we call two threads as Thread1 and Therad2, Thread1 and Thread2 perform read/write transfers to IN/OUT endpoints. Please provide details.

What is the timeout for the XferData() given in both the threads? Does the XferData() calls in both the threads happen independently without any synchronization between them i.e Does one thread make XferData() call only after the other thread completes doing so?

If you have given timeout as zero for any XferData call, please try giving non-zero value.

We do not have any Cypress multithreaded application.

And which driver/library(C#/CPP) are you using (Please use latest release available in FX3 SDK)

Regards,

Hemanth

Hemanth
0 Likes