FX3 Windows 10 USB Descriptor issue

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
fdelaplace
Level 1
Level 1
5 replies posted 5 questions asked 10 sign-ins

Hello,

We have made MFi products with a FX3 microcontroller inside. We now need to update the firmware of these products with the use of software running on Windows 10+. So we wanted to use the project fwdownload_fx3 included in EZ-USB™ FX3 SDK for Windows (x32) (exe) 1.3.4. The default path of this project is "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\cpp\fwdownload_fx3".

The issue that we are facing is that our MFi products are not working with Windows 10. When we open the Device Manager it shows "configuration descriptor failure" and then "Windows has stopped this device because it has reported problems. (Code 43)" It seems to be quite close to this case: https://community.infineon.com/t5/Knowledge-Base-Articles/Invalid-Configuration-Descriptor-in-Window....

I noticed we have the descriptor below specific for windows

/* Microsoft OS Descriptor. */

const uint8_t CyFxUSBMicrosoftOSDscr[] __attribute__ ((aligned (32))) =

{

    0x10,

    CY_U3P_USB_STRING_DESCR,

    'O', 0x00,

    'S', 0x00,

    ' ', 0x00,

    'D', 0x00,

    'e', 0x00,

    's', 0x00,

    'c', 0x00

};


Maybe the issue is that it’s corresponding to the Microsoft OS 1.0 Descriptors Specification not compatible on Windows 10 and we should update this to make it match Microsoft OS 2.0 Descriptors Specification.

It could be also a driver issue, we didn’t dig in that way but in this case it seems that we could build our own driver https://community.infineon.com/t5/USB-superspeed-peripherals/Windows-10-FX3-USB3-1-0-0-driver/m-p/68....

Our goal is to find a way to flash our products that are currently running a firmware we made and that is already deployed on them. So do you think it is possible to fix the issue we are facing without updating the code of our firmware, for example the USB descriptors part?

Thank you very much and have a nice one.

Best regards,

François Delaplace

0 Likes
5 Replies
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello François Delaplace,

Can you please share the complete descriptors used for windows for us to check?

Best Regards,
Jayakrishna
0 Likes

Hello Jayakrishna,

Please find attached the trace from our USB analyser with the descriptors.

Best regards,

François Delaplace

0 Likes

Hello,

Please share the descriptor file used in the project. We need to check if we are able to reproduce the issue at our end by using the same descriptors.

Best Regards,
Jayakrishna
0 Likes
Hello Jayakrishna,

Please find the following code to set the descriptors:

/* Register the USB device descriptors with the driver. */
CyU3PUsbSetDesc (CY_U3P_USB_SET_HS_DEVICE_DESCR, 0, (uint8_t *)CyFxUSB20DeviceDscr);
CyU3PUsbSetDesc (CY_U3P_USB_SET_SS_DEVICE_DESCR, 0, (uint8_t *)CyFxUSB30DeviceDscr);

/* BOS and Device qualifier descriptors. */
CyU3PUsbSetDesc (CY_U3P_USB_SET_DEVQUAL_DESCR, 0, (uint8_t *)CyFxUSBDeviceQualDscr);
CyU3PUsbSetDesc (CY_U3P_USB_SET_SS_BOS_DESCR, 0, (uint8_t *)CyFxUSBBOSDscr);

/* Default Configuration descriptors. */
//USB 3.0 only used for flash prog SPI
CyU3PUsbSetDesc (CY_U3P_USB_SET_SS_CONFIG_DESCR, 0, (uint8_t *)CyFxUSBSSConfigDscr);
//CyU3PUsbSetDesc (CY_U3P_USB_SET_HS_CONFIG_DESCR, 0, (uint8_t *)CyFxUSBHSConfigDscr);
 
//Specific decriptor for iAP2 and EA Native
CyU3PUsbSetDesc (CY_U3P_USB_SET_HS_CONFIG_DESCR, 0, (uint8_t *)CyFxVideoStreamingHSConfigDscr);
 
//CyU3PUsbSetDesc (CY_U3P_USB_SET_FS_CONFIG_DESCR, 0, (uint8_t *)CyFxUSBFSConfigDscr);

/* String Descriptors */
err = CyU3PUsbSetDesc (CY_U3P_USB_SET_STRING_DESCR, 0, (uint8_t *)CyFxUSBStringLangIDDscr);
if (err != CY_U3P_SUCCESS)
{
LOG_ERR("CyU3PUsbSetDesc(CyFxUSBStringLangIDDscr) failed with error = %d", err);
}
err = CyU3PUsbSetDesc (CY_U3P_USB_SET_STRING_DESCR, 1, (uint8_t *)CyFxUSBManufactureDscr);
if (err != CY_U3P_SUCCESS)
{
LOG_ERR("CyU3PUsbSetDesc(CyFxUSBManufactureDscr) failed with error = %d", err);
}
err = CyU3PUsbSetDesc (CY_U3P_USB_SET_STRING_DESCR, 2, (uint8_t *)CyFxUSBProductDscr);
if (err != CY_U3P_SUCCESS)
{
LOG_ERR("CyU3PUsbSetDesc(CyFxUSBProductDscr) failed with error = %d", err);
}
err = CyU3PUsbSetDesc (CY_U3P_USB_SET_STRING_DESCR, 3, (uint8_t *)CyFxUSBSerialNumberDscr);
if (err != CY_U3P_SUCCESS)
{
LOG_ERR("CyU3PUsbSetDesc(CyFxUSBSerialNumberDscr) failed with error = %d", err);
}
err = CyU3PUsbSetDesc (CY_U3P_USB_SET_STRING_DESCR, 4, (uint8_t *)CyFxUSBStringiAP2Dscr);
if (err != CY_U3P_SUCCESS)
{
LOG_ERR("CyU3PUsbSetDesc(CyFxUSBStringiAP2Dscr) failed with error = %d", err);
}
err = CyU3PUsbSetDesc (CY_U3P_USB_SET_STRING_DESCR, 5, (uint8_t *)CyFxUSBStringEADscr);
if (err != CY_U3P_SUCCESS)
{
LOG_ERR("CyU3PUsbSetDesc(CyFxUSBStringEADscr) failed with error = %d", err);
}

err = CyU3PUsbSetDesc (CY_U3P_USB_SET_STRING_DESCR, 6, (uint8_t *)CyFxUSBStringEACtrlDscr);
if (err != CY_U3P_SUCCESS)
{
LOG_ERR("CyU3PUsbSetDesc(CyFxUSBStringEACtrlDscr) failed with error = %d", err);
}

err = CyU3PUsbSetDesc (CY_U3P_USB_SET_STRING_DESCR, 7, (uint8_t *)CyFxUSBStringEAPhotoDscr);
if (err != CY_U3P_SUCCESS)
{
LOG_ERR("CyU3PUsbSetDesc(CyFxUSBStringEAPhotoDscr) failed with error = %d", err);
}

And here is the declarations:

/* Standard Device Descriptor for USB 2.10 */
const uint8_t CyFxUSB20DeviceDscr[] __attribute__ ((aligned (32))) =
{
0x12, /* Descriptor size */
CY_U3P_USB_DEVICE_DESCR, /* Device descriptor type */
0x10,0x02, /* USB 2.10 */
CY_FX_CHOSEN_DEVICE_CLASS, /* Device Class */
CY_FX_CHOSEN_DEVICE_SUBCLASS, /* Device Sub-class */
CY_FX_CHOSEN_DEVICE_PROTOCOL, /* Device protocol */
0x40, /* Maxpacket size for EP0 : 64 bytes */
CY_FX_APPLICATION_VENDOR_ID, /* Vendor ID */
CY_FX_APPLICATION_UVC_HS_GENERIC_ID, /* Product ID */
CY_FX_APPLICATION_DEVICE_RELEASE_NUMBER, /* Device release number */
0x01, /* Manufacturer string index */
0x02, /* Product string index */
0x03, /* Serial number string index */
0x01 /* Number of configurations */
};

#pragma mark -
#pragma mark CyFxUSBBOSDscr Binary Device Object Store Descriptor

/* Binary device object store descriptor */
const uint8_t CyFxUSBBOSDscr[] __attribute__ ((aligned (32))) =
{
0x05, /* Descriptor size */
CY_U3P_BOS_DESCR, /* Device descriptor type */
0x16,0x00, /* Length of this descriptor and all sub descriptors */
0x02, /* Number of device capability descriptors */

/* USB 2.0 extension */
0x07, /* Descriptor size */
CY_U3P_DEVICE_CAPB_DESCR, /* Device capability type descriptor */
CY_U3P_USB2_EXTN_CAPB_TYPE, /* USB 2.0 extension capability type */
0x1E,0x64,0x00,0x00, /* Supported device level features: LPM support, BESL supported,
Baseline BESL=400 us, Deep BESL=1000 us. */

/* SuperSpeed device capability */
0x0A, /* Descriptor size */
CY_U3P_DEVICE_CAPB_DESCR, /* Device capability type descriptor */
CY_U3P_SS_USB_CAPB_TYPE, /* SuperSpeed device capability type */
0x00, /* Supported device level features */
0x0E,0x00, /* Speeds supported by the device : SS, HS and FS */
0x03, /* Functionality support */
0x00, /* U1 Device Exit latency */
0x00,0x00 /* U2 Device Exit latency */
};

#pragma mark -
#pragma mark CyFxUSBDeviceQualDscr Standard Device Qualifier Descriptor

/* Standard Device Qualifier Descriptor */
const uint8_t CyFxUSBDeviceQualDscr[] __attribute__ ((aligned (32))) =
{
0x0A, /* Descriptor size */
CY_U3P_USB_DEVQUAL_DESCR, /* Device qualifier descriptor type */
0x10,0x02, /* USB 2.10 */
0x00, /* Device class */
0x00, /* Device sub-class */
0x00, /* Device protocol */
0x40, /* Maxpacket size for EP0 : 64 bytes */
0x01, /* Number of configurations */
0x00 /* Reserved */
};

#pragma mark -
#pragma mark CyFxUSBStringLangIDDscr Standard Language ID String Descriptor

/* Standard Language ID String Descriptor */
const uint8_t CyFxUSBStringLangIDDscr[] __attribute__ ((aligned (32))) =
{
0x06, /* Descriptor size */
CY_U3P_USB_STRING_DESCR, /* Device descriptor type */
0x09,0x04, /* Language en ID supported */
0x0C,0x04 /* Language fr ID supported */
};
0 Likes

Hello,

Please let me know if you are planning to use the device in USB 3.0 or USB 2.0 mode. This is because, I find that the device descriptor shared is only for USB 2.0 but, the configuration descriptors are only registered for USB 3.0 (the configuration descriptor registering part for USB 2.0 is commented out). Also, please share the complete descriptor file so that we can test at our end quickly. Please note that the macro definitions used in the descriptors should also be shared so that we can understand the setting used for specific fields within the descriptors.

Best Regards,
Jayakrishna
0 Likes