cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Anonymous
Not applicable

1.png

This is the test code.

when I didn't load the IMG the result is like this:

2.png

but when I loaded the IMG ,the reslut is like this:

3.png

4.png

This IMG can work!

Could you tell me why the empty it can find the device,instead the loading right IMG can't find device?

Thank you !

The console  code:

#include "stdafx.h"

#include <iostream>

using namespace std;

#include "CyAPI.h"

int _tmain(int argc, _TCHAR* argv[])

{

  CCyUSBDevice* pUSB = new CCyUSBDevice;

  int nDeviceCount = pUSB->DeviceCount();

  cout<<nDeviceCount<<endl;

  for (int nIdx = 0; nIdx < pUSB->DeviceCount(); nIdx++)

  {

  pUSB->Open(nIdx);

  printf("%s\n", pUSB->DeviceName);

  printf("%d\n", pUSB->VendorID);

  printf("%d\n", pUSB->ProductID);

  }

  getchar();

  return 0;

}

0 Likes
1 Solution
SrinathS_16
Moderator
Moderator

Hello,

The IMG file that you have loaded complies to the UVC class and the device gets bound to the UVC driver. CyAPI library can only identify devices that are bound to the CYUSB3 driver.

Best regards,

Srinath S

View solution in original post

8 Replies
SrinathS_16
Moderator
Moderator

Hello,

The IMG file that you have loaded complies to the UVC class and the device gets bound to the UVC driver. CyAPI library can only identify devices that are bound to the CYUSB3 driver.

Best regards,

Srinath S

View solution in original post

Anonymous
Not applicable

Hi!

Thanks for your help!

The camera sensor is connected to Fx3.FX3 is connected to the computer host via usb3.0.

The data collected can be uploaded to the host without processing.The host can also send

the instructions to control sensor.

Which firmware should I refer to for such projects.Not the UVC pattern.I have learned AN75779.

But the requirement is not all like this.Could you help me?

0 Likes
SrinathS_16
Moderator
Moderator

Hello,

In case you do not want to implement the FX3 device in UVC class, you can refer to the AN65974 example which implements an FPGA interface. But, it would be better to use the UVC class for camera devices since the existing host applications can be used.

In order to communicate with the control sensor, you can implement a vendor interface in addition to the UVC class interface and use vendor commands  to communicate with the device. An example of this is included as part of the AN75779 example. The macro USB_DEBUG_INTERFACE has to be defined to enable this.

Best regards,

Srinath S

0 Likes
Anonymous
Not applicable

We make the new host applications ,host applications calls cypress apilib's interface.

The AN65974 I have learned,but it doesn'n have contol instructions,only bulk transfer.

What should i do?

0 Likes
SrinathS_16
Moderator
Moderator

Hello,

The control endpoint is available on the device by default and hence need not be separately configured.

- To use vendor commands, the device must have an additional vendor interface which can be defined in the descriptor file as follows.

     /* Interface descriptor */

     0x09,                           /* Descriptor size */

     CY_U3P_USB_INTRFC_DESCR,        /* Interface Descriptor type */

     0x00,                           /* Interface number */

     0x00,                           /* Alternate setting number */

     0x00,                           /* Number of end points */

     0xFF,                           /* Interface class */

     0x00,                           /* Interface sub class */

     0x00,                           /* Interface protocol code */

     0x00,                           /* Interface descriptor string index */

- The above descriptor should be added as part of the configuration descriptor and it has to be noted that the length of the configuration descriptor field and the number of interfaces field must be modified after the inclusion of this descriptor.

- To implement the vendor commands, the CyFxSlFifoApplnUSBSetupCB() callback function must be modified to implement the required functionality. As an example of vendor request handling, the USBBulkSourceSink example that comes with the FX3 SDK can be referred.

Best regards,

Srinath S

0 Likes
Anonymous
Not applicable

The IMG file that I have loaded complies to the UVC class.

If I want to develop applications in Windows, what API should I use? The DirectShow?

0 Likes
SrinathS_16
Moderator
Moderator

Hello,

The DirectShow or the Media Foundation APIs can be used. Also, there are a lot of free Windows applications that comply to the UVC class. You can also consider using one of them.

Best regards,

Srinath S

0 Likes
Anonymous
Not applicable

Thank you very much!

Best regards,

sunny

0 Likes