Hi,
i would like to create descriptor with two interfaces, but attempt to do so causes that in device manager Windows display that device cannot start, and control center does not display anything. If with the same endpoints i write descriptor with one interface, then everything is ok. See sample descriptors below.
Thanks.
---------------
Two interfaces that do not work (device cannot start):
const uint8_t CyFxUSBHSConfigDscr[] =
{
// Configuration Descriptor Type
0x09, // Descriptor Size
CY_U3P_USB_CONFIG_DESCR, // Configuration Descriptor Type
0x29,0x00, // Length of this descriptor and all sub descriptors
0x02, // Number of interfaces
0x01, // Configuration number
0x00, // COnfiguration string index
0x80, // Config characteristics - Bus powered
0x64, // Max power consumption of device (in 2mA unit)
// Interface Descriptor
0x09, // Descriptor size
CY_U3P_USB_INTRFC_DESCR, // Interface Descriptor type
0x00, // Interface number
0x00, // Alternate setting number
0x01, // Number of end points
0xFF, // Interface class
0x00, // Interface sub class
0x00, // Interface protocol code
0x00, // Interface descriptor string index
// EP1 interrupt IN
0x07, // Descriptor size
CY_U3P_USB_ENDPNT_DESCR, // Endpoint descriptor type
CY_FX_EP1_INT, // Endpoint address and description
CY_U3P_USB_EP_INTR, // Interrupt endpoint type
0x00,0x04, // Max packet size = 1024 bytes
0x01, // Servicing interval for data transfers
// Interface Descriptor
0x09, // Descriptor size
CY_U3P_USB_INTRFC_DESCR, // Interface Descriptor type
0x00, // Interface number
0x00, // Alternate setting number
0x01, // Number of end points
0xFF, // Interface class
0x00, // Interface sub class
0x00, // Interface protocol code
0x00, // Interface descriptor string index
// EP2 isochronous IN
0x07, // Descriptor size
CY_U3P_USB_ENDPNT_DESCR, // Endpoint Descriptor Type
CY_FX_EP2_ISO, // Endpoint address and description
CY_U3P_USB_EP_ISO, // Iso End point Type
0x00,0x04, // Max packet size = 1024 bytes
0x01 // Servicing interval for data transfers
};
---------------
One interface with two endpoints that work:
const uint8_t CyFxUSBHSConfigDscr[] =
{
// Configuration Descriptor Type
0x09, // Descriptor Size
CY_U3P_USB_CONFIG_DESCR, // Configuration Descriptor Type
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
0x64, // Max power consumption of device (in 2mA unit)
// Interface Descriptor
0x09, // Descriptor size
CY_U3P_USB_INTRFC_DESCR, // Interface Descriptor type
0x00, // Interface number
0x00, // Alternate setting number
0x02, // Number of end points
0xFF, // Interface class
0x00, // Interface sub class
0x00, // Interface protocol code
0x00, // Interface descriptor string index
// EP1 interrupt IN
0x07, // Descriptor size
CY_U3P_USB_ENDPNT_DESCR, // Endpoint descriptor type
CY_FX_EP1_INT, // Endpoint address and description
CY_U3P_USB_EP_INTR, // Interrupt endpoint type
0x00,0x04, // Max packet size = 1024 bytes
0x01, // Servicing interval for data transfers
// EP2 isochronous IN
0x07, // Descriptor size
CY_U3P_USB_ENDPNT_DESCR, // Endpoint Descriptor Type
CY_FX_EP2_ISO, // Endpoint address and description
CY_U3P_USB_EP_ISO, // Iso End point Type
0x00,0x04, // Max packet size = 1024 bytes
0x01 // Servicing interval for data transfers
};
---------------
|