I have an existing USB 2 UMDF driver package that supports multiple devices. This has been in the field and working for several years. It uses the v1009 Wudf and WinUsb coinstallers.
We are now adding a new device to the supported list, but this device is a USB 3 device.
We have modified the inf to add support for the new device and rebuilt and signed the updated package.
When we connect the USB 3.0 device to a USB 2.0 port it enumerates properly and we can access it, but when we connect it to a USB 3.0 port it fails to enumerate and gives the following error in the Device Manager:
Windows has stopped this device because it has reported problems. (Code 43)
The USB device returned an invalid USB configuration descriptor.
Here is the USB descriptor structures that I use as part of the Cypress FX3 dev system for the device (I have obscured the VID and PID values for security reasons, but the VID is registered and is used by the other devices in the package).:
/*
/* Standard device descriptor for USB 3.0 */
const uint8_t CyFxUSB30DeviceDscr attribute ((aligned (32))) =
{
0x12, /* Descriptor size */
CY_U3P_USB_DEVICE_DESCR, /* Device descriptor type (0x01) */
0x00,0x03, /* USB 3.0 */
0x00, /* Device class */
0x00, /* Device sub-class */
0x00, /* Device protocol */
0x09, /* Maxpacket size for EP0 : 2^9 = 512 bytes */
/* Vendor ID /
, / Product ID /
0x00,0x00, / Device release number /
0x01, / Manufacture string index /
0x02, / Product string index /
0x00, / Serial number string index /
0x01 / Number of configurations /
};
/ Standard device descriptor for USB 2.0 /
const uint8_t CyFxUSB20DeviceDscr[] attribute ((aligned (32))) =
{
0x12, / Descriptor size /
CY_U3P_USB_DEVICE_DESCR, / Device descriptor type (0x01) /
0x10,0x02, / USB 2.10 /
0x00, / Device class /
0x00, / Device sub-class /
0x00, / Device protocol /
0x40, / Maxpacket size for EP0 : 64 bytes /
, / Vendor ID /
, / Product ID /
0x00,0x00, / Device release number /
0x01, / Manufacture string index /
0x02, / Product string index /
0x00, / Serial number string index /
0x01 / Number of configurations /
};
/ Binary device object store descriptor /
const uint8_t CyFxUSBBOSDscr[] attribute ((aligned (32))) =
{
0x05, / Descriptor size /
CY_U3P_BOS_DESCR, / Device descriptor type (0x0F) /
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 (0x10) /
CY_U3P_USB2_EXTN_CAPB_TYPE, / USB 2.0 extension capability type (0x02) /
0x02,0x00,0x00,0x00, / Supported device level features: LPM support /
/ SuperSpeed device capability /
0x0A, / Descriptor size /
CY_U3P_DEVICE_CAPB_DESCR, / Device capability type descriptor (0x10) /
CY_U3P_SS_USB_CAPB_TYPE, / SuperSpeed device capability type (0x03) /
0x00, / Supported device level features /
0x0E,0x00, / Speeds supported by the device : SS, HS and FS /
0x03, / Functionality support /
0x0A, / U1 Device Exit latency /
0xFF,0x07 / U2 Device Exit latency /
};
/ Standard device qualifier descriptor /
const uint8_t CyFxUSBDeviceQualDscr[] attribute ((aligned (32))) =
{
0x0A, / Descriptor size /
CY_U3P_USB_DEVQUAL_DESCR, / Device qualifier descriptor type (0x06) /
0x00,0x02, / USB 2.0 /
0x00, / Device class /
0x00, / Device sub-class /
0x00, / Device protocol /
0x40, / Maxpacket size for EP0 : 64 bytes /
0x01, / Number of configurations /
0x00 / Reserved /
};
/ Standard super speed configuration descriptor /
const uint8_t CyFxUSBSSConfigDscr[] attribute ((aligned (32))) =
{
/ Configuration descriptor /
0x09, / Descriptor size /
CY_U3P_USB_CONFIG_DESCR, / Configuration descriptor type (0x02) /
// 0x2C,0x00, / Length of this descriptor and all sub descriptors /
0x53,0x00, / Length of this descriptor and all sub descriptors /
0x01, / Number of interfaces /
0x01, / Configuration number /
0x00, / Configuration string index /
0x80, / Config characteristics - Bus powered /
0x32, / Max power consumption of device (in 8mA unit) : 400mA /
/ Interface descriptor /
0x09, / Descriptor size /
CY_U3P_USB_INTRFC_DESCR, / Interface Descriptor type (0x04) /
0x00, / Interface number /
0x00, / Alternate setting number /
// 0x02, / Number of end points /
0x05, / Number of end points /
0xFF, / Interface class /
0x00, / Interface sub class /
0x00, / Interface protocol code /
0x00, / Interface descriptor string index /
// These are the “original” descriptors for SuperSpeed for the example program
// / Endpoint descriptor for producer EP /
// 0x07, / Descriptor size /
// CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type /
// CY_FX_DEBUG_PRODUCER, / Endpoint address and description /
// CY_U3P_USB_EP_BULK, / Bulk endpoint type /
// 0x00,0x04, / Max packet size = 1024 bytes /
// 0x00, / Servicing interval for data transfers : 0 for bulk /
//
// / Super speed endpoint companion descriptor for producer EP /
// 0x06, / Descriptor size /
// CY_U3P_SS_EP_COMPN_DESCR, / SS endpoint companion descriptor type /
// (CY_FX_EP_BURST_LENGTH - 1), / Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time /
// 0x00, / Max streams for bulk EP = 0 (No streams) /
// 0x00,0x00, / Service interval for the EP : 0 for bulk /
//
// / Endpoint descriptor for consumer EP /
// 0x07, / Descriptor size /
// CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type /
// CY_FX_DEBUG_CONSUMER, / Endpoint address and description /
// CY_U3P_USB_EP_BULK, / Bulk endpoint type /
// 0x00,0x04, / Max packet size = 1024 bytes /
// 0x00, / Servicing interval for data transfers : 0 for Bulk /
//
// / Super speed endpoint companion descriptor for consumer EP /
// 0x06, / Descriptor size /
// CY_U3P_SS_EP_COMPN_DESCR, / SS endpoint companion descriptor type /
// (CY_FX_EP_BURST_LENGTH - 1), / Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time /
// 0x00, / Max streams for bulk EP = 0 (No streams) /
// 0x00,0x00 / Service interval for the EP : 0 for bulk /
// / Endpoint descriptor for producer EP /
// 0x07, / Descriptor size /
// CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type /
// CY_FX_DEBUG_CONSUMER, / Endpoint address and description /
// CY_U3P_USB_EP_BULK, / Bulk endpoint type /
// 0x00,0x02, / Max packet size = 512 bytes /
// 0x00, / Servicing interval for data transfers : 0 for bulk /
/ Endpoint descriptor for Debug Consumer EP /
0x07, / Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type (0x05) /
CY_FX_DEBUG_CONSUMER, / Consumes debug (0x81) /
CY_U3P_USB_EP_BULK, / Bulk endpoint type (0x02) /
// 0x00,0x04, / Max packet size = 1024 bytes /
0x00,0x02, / Max packet size = 512 bytes /
0x00, / Servicing interval for data transfers : 0 for bulk /
/ Super speed endpoint companion descriptor for Debug Consumer EP /
0x06, / Descriptor size /
CY_U3P_SS_EP_COMPN_DESCR, / SS endpoint companion descriptor type (0x30) /
(CY_FX_EP_BURST_LENGTH - 1), / Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) /
0x00, / Max streams for bulk EP = 0 (No streams) /
0x00,0x00, / Service interval for the EP : 0 for bulk /
// / Endpoint descriptor for consumer EP /
// 0x07, / Descriptor size /
// CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type /
// CY_FX_DEBUG_PRODUCER, / Endpoint address and description /
// CY_U3P_USB_EP_BULK, / Bulk endpoint type /
// 0x00,0x02, / Max packet size = 512 bytes /
// 0x00, / Servicing interval for data transfers : 0 for bulk /
/ Endpoint descriptor for Debug Producer EP /
0x07, / Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type (0x05) /
CY_FX_DEBUG_PRODUCER, / Produces debug (0x01) /
CY_U3P_USB_EP_BULK, / Bulk endpoint type (0x02) /
// 0x00,0x04, / Max packet size = 1024 bytes /
0x00,0x02, / Max packet size = 512 bytes /
0x00, / Servicing interval for data transfers : 0 for bulk /
/ Super speed endpoint companion descriptor for Debug Producer EP /
0x06, / Descriptor size /
CY_U3P_SS_EP_COMPN_DESCR, / SS endpoint companion descriptor type (0x30) /
(CY_FX_EP_BURST_LENGTH - 1), / Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) /
0x00, / Max streams for bulk EP = 0 (No streams) /
0x00,0x00, / Service interval for the EP : 0 for bulk /
// / Endpoint descriptor for producer EP /
// 0x07, / Descriptor size /
// CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type /
// XI_API_CONSUMER, / Responses back to Plugin/DLL /
// CY_U3P_USB_EP_BULK, / Bulk endpoint type /
// 0x00,0x02, / Max packet size = 512 bytes /
// 0x00, / Servicing interval for data transfers : 0 for bulk /
/ Endpoint descriptor for API Consumer EP /
0x07, / Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type (0x05) /
XI_API_CONSUMER, / Responses back to Plugin/DLL (0x82) /
CY_U3P_USB_EP_BULK, / Bulk endpoint type (0x02) /
// 0x00,0x04, / Max packet size = 1024 bytes /
0x00,0x02, / Max packet size = 512 bytes /
0x00, / Servicing interval for data transfers : 0 for bulk /
/ Super speed endpoint companion descriptor for API Consumer EP /
0x06, / Descriptor size /
CY_U3P_SS_EP_COMPN_DESCR, / SS endpoint companion descriptor type (0x30) /
(CY_FX_EP_BURST_LENGTH - 1), / Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) /
0x00, / Max streams for bulk EP = 0 (No streams) /
0x00,0x00, / Service interval for the EP : 0 for bulk /
// / Endpoint descriptor for consumer EP /
// 0x07, / Descriptor size /
// CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type /
// XI_API_PRODUCER, / Commands FROM the Plugin/DLL /
// CY_U3P_USB_EP_BULK, / Bulk endpoint type /
// 0x00,0x02, / Max packet size = 512 bytes /
// 0x00, / Servicing interval for data transfers : 0 for bulk /
/ Endpoint descriptor for API Producer EP /
0x07, / Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type (0x05) /
XI_API_PRODUCER, / Commands FROM the Plugin/DLL (0x04) /
CY_U3P_USB_EP_BULK, / Bulk endpoint type (0x02) /
// 0x00,0x04, / Max packet size = 1024 bytes /
0x00,0x02, / Max packet size = 512 bytes /
0x00, / Servicing interval for data transfers : 0 for bulk /
/ Super speed endpoint companion descriptor for API Producer EP /
0x06, / Descriptor size /
CY_U3P_SS_EP_COMPN_DESCR, / SS endpoint companion descriptor type (0x30) /
(CY_FX_EP_BURST_LENGTH - 1), / Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) /
0x00, / Max streams for bulk EP = 0 (No streams) /
0x00,0x00, / Service interval for the EP : 0 for bulk /
// / Endpoint descriptor for consumer EP /
// 0x07, / Descriptor size /
// CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type /
// XI_VID_PRODUCER, / Video data from the Plugin/DLL /
// CY_U3P_USB_EP_BULK, / Bulk endpoint type /
// 0x00,0x02, / Max packet size = 512 bytes /
// 0x00, / Servicing interval for data transfers : 0 for bulk /
/ Endpoint descriptor for Video Producer EP /
0x07, / Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type (0x05) /
XI_VID_PRODUCER, / Video data from the Plugin/DLL (0x06) /
CY_U3P_USB_EP_BULK, / Bulk endpoint type (0x02) /
// 0x00,0x04, / Max packet size = 1024 bytes /
0x00,0x02, / Max packet size = 512 bytes /
0x00, / Servicing interval for data transfers : 0 for bulk /
/ Super speed endpoint companion descriptor for Video Producer EP /
0x06, / Descriptor size /
CY_U3P_SS_EP_COMPN_DESCR, / SS endpoint companion descriptor type (0x30) /
(CY_FX_EP_BURST_LENGTH - 1), / Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) /
0x00, / Max streams for bulk EP = 0 (No streams) /
0x00,0x00, / Service interval for the EP : 0 for bulk /
};
/ Standard high speed configuration descriptor /
const uint8_t CyFxUSBHSConfigDscr[] attribute ((aligned (32))) =
{
/ Configuration descriptor /
0x09, / Descriptor size /
CY_U3P_USB_CONFIG_DESCR, / Configuration descriptor type (0x02) /
0x35,0x00, / Length of this descriptor and all sub descriptors /
// 0x27,0x00, / Length of this descriptor and all sub descriptors /
0x01, / Number of interfaces /
0x01, / Configuration number /
0x00, / COnfiguration string index /
0x80, / Config characteristics - bus powered /
0x32, / Max power consumption of device (in 2mA unit) : 100mA /
/ Interface descriptor /
0x09, / Descriptor size /
CY_U3P_USB_INTRFC_DESCR, / Interface Descriptor type (0x04) /
0x00, / Interface number /
0x00, / Alternate setting number /
0x05, / Number of endpoints /
// 0x03, / Number of endpoints /
0xFF, / Interface class /
0x00, / Interface sub class /
0x00, / Interface protocol code /
0x00, / Interface descriptor string index /
/ Endpoint descriptor for producer EP /
0x07, / Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type (0x05) /
CY_FX_DEBUG_CONSUMER, / Consumes debug (0x81) /
CY_U3P_USB_EP_BULK, / Bulk endpoint type (0x02) /
0x00,0x02, / Max packet size = 512 bytes /
0x00, / Servicing interval for data transfers : 0 for bulk /
/ Endpoint descriptor for consumer EP /
0x07, / Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type (0x05) /
CY_FX_DEBUG_PRODUCER, / Produces debug (0x01) /
CY_U3P_USB_EP_BULK, / Bulk endpoint type (0x02) /
0x00,0x02, / Max packet size = 512 bytes /
0x00, / Servicing interval for data transfers : 0 for bulk /
/ Endpoint descriptor for producer EP /
0x07, / Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type (0x05) /
XI_API_CONSUMER, / Responses back to Plugin/DLL (0x82) /
CY_U3P_USB_EP_BULK, / Bulk endpoint type (0x02) /
0x00,0x02, / Max packet size = 512 bytes /
0x00, / Servicing interval for data transfers : 0 for bulk /
/ Endpoint descriptor for consumer EP /
0x07, / Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type (0x05) /
XI_API_PRODUCER, / Commands FROM the Plugin/DLL (0x04) /
CY_U3P_USB_EP_BULK, / Bulk endpoint type (0x02) /
0x00,0x02, / Max packet size = 512 bytes /
0x00, / Servicing interval for data transfers : 0 for bulk /
/ Endpoint descriptor for consumer EP /
0x07, / Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type (0x05) /
XI_VID_PRODUCER, / Video data from the Plugin/DLL (0x06) /
CY_U3P_USB_EP_BULK, / Bulk endpoint type (0x02) /
0x00,0x02, / Max packet size = 512 bytes /
0x00, / Servicing interval for data transfers : 0 for bulk /
};
/ Standard full speed configuration descriptor /
const uint8_t CyFxUSBFSConfigDscr[] attribute ((aligned (32))) =
{
/ Configuration descriptor /
0x09, / Descriptor size /
CY_U3P_USB_CONFIG_DESCR, / Configuration descriptor type (0x02) /
0x20,0x00, / Length of this descriptor and all sub descriptors /
0x01, / Number of interfaces /
0x01, / Configuration number /
0x00, / COnfiguration string index /
0x80, / Config characteristics - bus powered /
0x32, / Max power consumption of device (in 2mA unit) : 100mA /
/ Interface descriptor /
0x09, / Descriptor size /
CY_U3P_USB_INTRFC_DESCR, / Interface descriptor type (0x04) /
0x00, / Interface number /
0x00, / Alternate setting number /
0x02, / Number of endpoints /
0xFF, / Interface class /
0x00, / Interface sub class /
0x00, / Interface protocol code /
0x00, / Interface descriptor string index /
/ Endpoint descriptor for consumer EP /
0x07, / Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type (0x05) /
CY_FX_DEBUG_CONSUMER, / Endpoint address and description (0x81) /
CY_U3P_USB_EP_BULK, / Bulk endpoint type (0x02) /
0x40,0x00, / Max packet size = 64 bytes /
0x00, / Servicing interval for data transfers : 0 for bulk /
/ Endpoint descriptor for producer EP /
0x07, / Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, / Endpoint descriptor type (0x05) /
CY_FX_DEBUG_PRODUCER, / Endpoint address and description (0x01) /
CY_U3P_USB_EP_BULK, / Bulk endpoint type (0x02) /
0x40,0x00, / Max packet size = 64 bytes /
0x00 / Servicing interval for data transfers : 0 for bulk /
};
/ Standard language ID string descriptor /
const uint8_t CyFxUSBStringLangIDDscr[] attribute ((aligned (32))) =
{
0x04, / Descriptor size /
CY_U3P_USB_STRING_DESCR, / Device descriptor type /
0x09,0x04 / Language ID supported /
};
/ Standard manufacturer string descriptor /
const uint8_t CyFxUSBManufactureDscr[] attribute ((aligned (32))) =
{
0x0E, / Descriptor size /
CY_U3P_USB_STRING_DESCR, / Device descriptor type /
‘X’,0x00,
‘i’,0x00,
‘t’,0x00,
‘r’,0x00,
‘o’,0x00,
‘n’,0x00
};
/ Standard product string descriptor /
const uint8_t CyFxUSBProductDscr[] attribute ((aligned (32))) =
{
0x18, / Descriptor size /
CY_U3P_USB_STRING_DESCR, / Device descriptor type /
‘U’,0x00,
‘S’,0x00,
‘B’,0x00,
’ ',0x00,
‘t’,0x00,
‘o’,0x00,
’ ',0x00,
‘S’,0x00,
‘C’,0x00,
‘S’,0x00,
‘I’,0x00
};
/ Microsoft OS Descriptor. /
const uint8_t CyFxUsbOSDscr[] attribute ((aligned (32))) =
{
0x3A,
CY_U3P_USB_STRING_DESCR,
‘X’, 0x00,
‘i’, 0x00,
‘t’, 0x00,
‘r’, 0x00,
‘o’, 0x00,
‘n’, 0x00,
’ ', 0x00,
‘U’, 0x00,
‘S’, 0x00,
‘B’, 0x00,
’ ', 0x00,
‘t’, 0x00,
‘o’, 0x00,
’ ', 0x00,
‘S’, 0x00,
‘C’, 0x00,
‘S’, 0x00,
‘I’, 0x00,
’ ', 0x00,
‘C’, 0x00,
‘o’, 0x00,
‘n’, 0x00,
‘v’, 0x00,
‘e’, 0x00,
‘r’, 0x00,
‘t’, 0x00,
‘e’, 0x00,
‘r’, 0x00
};
/ Place this buffer as the last buffer so that no other variable / code shares
* the same cache line. Do not add any other variables / arrays in this file.
* This will lead to variables sharing the same cache line. /
const uint8_t CyFxUsbDscrAlignBuffer[32] attribute ((aligned (32)));
-------------------------------------------
This is what the WDK 8.1 USBView utility reports for the device:
[Port16] FailedEnumeration : Unknown USB Device (Invalid Configuration Descriptor)
Is Port User Connectable: yes
Is Port Debug Capable: no
Companion Port Number: 1
Companion Hub Symbolic Link Name: USB#ROOT_HUB30#4&10962df6&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
Protocols Supported:
USB 1.1: no
USB 2.0: no
USB 3.0: yes
—===>Device Information<===—
String Descriptor for index 2 not available while device is in low power state.
ConnectionStatus: FailedEnumeration
Current Config Value: 0x00 -> Device Bus Speed: Super
Device Address: 0x0A
Open Pipes: 0
!ERROR: No open pipes!
===>Device Descriptor<===
bLength: 0x12
bDescriptorType: 0x01
bcdUSB: 0x0300
bDeviceClass: 0x00
!*ERROR: Device enumeration failure
---------------------------------------------------
Can anyone suggest what, if anything, is wrong with the above descriptors for a USB 3 device (I have checked them against the USB 3.0 spec and cannot see any errors)?
If there is nothing wrong with the descriptors I can post the INF file I am using in case I need to make some changes in there.
Thanks,
Peter Young
Xitron Europe.