0

I am trying to do a control transfer on the infineon fx3 but when I call libusb_control_transfer() I get LIBUSB_ERROR_PIPE. Can anyone help with this please?

int BulkTransferLoopback::sendControl(uint8_t data[], int length, uint8_t rx[]) {
    int numdevs = cyusb_open();
    if (numdevs > 0)
    {
        int r = cyusb_open(VENDORID, PRODUCTID);
        if (r != 1) {
            // check for errors
            printf("Could not open device!\n");
        }
        _handle = cyusb_gethandle(0);
        findEndpoints();


        // Send data
        // I think error is coming from parameters 1-3.
        int err = libusb_control_transfer(_handle, 0x40, 42, 0x1234, 0, data, 2, 1000);
        printf("%s\n", libusb_error_name(err));
        cyusb_close();
    }

    return numdevs;
}
Eddie
  • 15
  • 6
Luke
  • 1
  • 2

1 Answers1

0

Will get LIBUSB_ERROR_PIPE when the control request was not supported by the device, so first you can check if The control request is handled properly in FX3 or not.

And you can check USB traces using a USB analyzer (like Wireshark) to understand the status of the USB control transfer.

also, https://community.infineon.com/ can help you to debug your FW code.