1 Reply Latest reply on Jan 5, 2015 8:31 AM by markus.freilinger

    FX3 - Control Transfers - Custom command

    markus.freilinger

      Hallo!

         

      Based on
      http://www.cypress.com/?app=forum&id=167&rID=53345
      and
      http://www.cypress.com/?id=4&rID=61438
      I am trying to implement a custom "Vendor command" which sets/toggles a GPIO pin of the FX3.

         

      I started with the "slfifo, 2bit addressing" example from Cypress and modified the CyFxSlFifoApplnUSBSetupCB function by adding
      else if (bType == CY_U3P_USB_VENDOR_RQT) {
              if (bRequest == 0x13) {
                  isHandled = CyTrue;
                  // todo here comes the gpio code
                  CyU3PUsbAckSetup();
              }
      }

         

      But when I do a control transfer on the PC:
      libusb_control_transfer(handle, 0x40, 0x13, 0, 0, NULL, 0, 1000)
      the PC only yields an "I/O error". Libusb in the debug mode (DebugView) says that the "device is not working as expected"
      Based on the time the control action needs (always ~5 seconds), some timeout gets hit.

         

      Do you known what is/might be going wrong here?

         

      Regards,

         

      Markus