Not able to connect to FX3 USB Controller with C++ application; C# works

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

cross mob
LoLa_4657001
Level 1
Level 1

Hi,

I am trying to develop code in C++ with an FX3 USB Controller.

I started with example applications included in the SDK.

Unfortunately only the applications (Streamer, Control Center) coded in C# do work, within the C++ applications I am not able to detect a connected USB device.

I tried both, just executing the .exe file as provided in the SDK and also recompiled it on my Computer. I am using Windows 10 Enterprise and Visual Studio 2017.

I tried to develop my own C++ application and found out that DeviceCount returns zero although a device is connected.

Any suggestions what could be the problem?

Thanks a lot!

Regards,

Lou

0 Likes
1 Solution

I think I know what the problem is; unfortunately I can not test it until thursday.

I installed the driver that came with the Demo 3 board, which is using another GUID.

The C# version of the code uses 'USBDeviceList' which does not require a GUID.

The C++ version uses 'CCyUSBDevice' which requires a GUID (and uses the standard GUID if none is provieded).

I now replaced 'CYUSBDRV_GUID' with the GUID provided in my 'cyusb3.inf' file as described in the API documentation.

Hope it works now!

I will test as soon as possible and give feedback.

View solution in original post

0 Likes
6 Replies
YatheeshD_36
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

Please let me know the firmware your are running on the FX3 device. If you are using the Superspeed Explorer Kit, make it enumerate as a bootloader device by populating PMODE jumper J4 and reset the FX3 device, check if it detected in the C++ bulkloop application.

Refer to the snippet below in which I have used the C++ bulkloop application and the FX3 device is detected.

pastedImage_0.png

Thanks,

Yatheesh

Hi,

thanks for your quick Reply.

Unfortunately I do not know which firmware is on the FX3, since it is installed on a preconfigured ONSemi Demo 3 Board. I do not have access to the source files.

For the bulkloop application it is the same issue: the C# version works, but the C++ version does not.

The following screenshot ist from the C# version:

pastedImage_0.png

0 Likes

I think I know what the problem is; unfortunately I can not test it until thursday.

I installed the driver that came with the Demo 3 board, which is using another GUID.

The C# version of the code uses 'USBDeviceList' which does not require a GUID.

The C++ version uses 'CCyUSBDevice' which requires a GUID (and uses the standard GUID if none is provieded).

I now replaced 'CYUSBDRV_GUID' with the GUID provided in my 'cyusb3.inf' file as described in the API documentation.

Hope it works now!

I will test as soon as possible and give feedback.

0 Likes

Hello,

Your understanding is correct.

For the C++ application to detect the device the GUID used in the application for the CCyUSBDevice Class and the GUID of the driver  (in the .inf file) to which the device is bound to should be the same.

Thanks,

Yatheesh

0 Likes

I tested today with the correct GUID and it worked!

Thanks for your Support!

0 Likes

ABsolutelly agree! I tested the same issue on my site project and everything works perfectly.

0 Likes