8 Replies Latest reply on Aug 28, 2018 12:39 AM by yumic_3247926

    Why I can't find device used CCyUSBDevice



      This is the test code.

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




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





      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();




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



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

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

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





        return 0;


        • 1. Re: Why I can't find device used CCyUSBDevice



          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

          • 2. Re: Why I can't find device used CCyUSBDevice


            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?

            • 3. Re: Why I can't find device used CCyUSBDevice



              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

              • 4. Re: Why I can't find device used CCyUSBDevice

                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?

                • 5. Re: Why I can't find device used CCyUSBDevice



                  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

                  • 6. Re: Why I can't find device used CCyUSBDevice

                    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?

                    • 7. Re: Why I can't find device used CCyUSBDevice



                      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

                      • 8. Re: Why I can't find device used CCyUSBDevice

                        Thank you very much!


                        Best regards,