1 Reply Latest reply on Apr 7, 2020 11:47 PM by YatheeshK_36

    How to control ezusb fx1/fx2 in windows10(64Bit) App


      We are trying to upgrade our ezusb device(cy64613) to ezusb fx1(cy64713) for 64bit windows.

      Our windows app has been developed using CBuilder2007.


      1. Previously

      For this old device control,

      First got handle for device using CreateFile windows API

      and used  deviceIOcontrol API with taken handle.


      In our case for devicename \\\\.\\ezusb-0 is used


      Handle=CreateFile("\\\\.\\ezusb-0",.....) for getting handle.



      what  name has to be used for new device ezusb fx1 or fx2?


      2. Referring to TRM


      for getting device handle using CyAPI


           USBDevice= new CCyUSBDevice( );


      can be used.



         When trying to above using CyAPI.lib(for BC6)( taken from installed Cypress Suite USB 3.4.7)

        Alaways access vilation error happened!!


      Please help me!!!


      Kenny Lim

        • 1. Re: How to control ezusb fx1/fx2 in windows10(64Bit) App



          Please use the CyAPI.lib from the FX3 SDK which contains the latest library files.

          Once the FX3 SDK is installed you can find the library files in the path: <installation directory>\Cypress\EZ-USB FX3 SDK\1.3\library

          The API document "CyAPI.pdf" is present in folder path: <installation directory>\Cypress\EZ-USB FX3 SDK\1.3\doc\SuiteUSB


          Note: for the CyAPI.lib to be used, the device should be bound to the cypress cyusb3 driver.


          Using the CyAPI library:

          A device instance should be created using the CCyUSBDevice class.

          example: CCyUSBDevice *FX2 = new CCyUSBDevice();

          This will not return a handle to the device yet.


          To get the handle to the device you can either use the Open() method  with the device number as an argument. If only one cypress device is connected to the host then you can direct pass 0 as an argument.


          if (!FX2->Open(0))


          printf("open failed\n");



          printf("device opened\n");


          Once the device is opened you can use the DeviceHandle() function to get an handle to the device opened.


          HANDLE handle = FX2->DeviceHandle();


          Please refer to the attached host appication, which detects number of devices bound to the cyusb3 driver and opens device 0, prints the VID, PID in decimal and the number of endpoints, of the device connected.