Hello,
do you have some experiences with USB communication with C5505?
I am trying to implement USB CDC Class. I have downloaded CSL library 1.00 and I am trying to modify the example code (csl_usb_intc_example.c). I have modified Configuration Descriptor. If the size of Configuration Descriptor is less than 64 B, Windows successfully recognizes the device and wants to install the driver. But If the size of Configuration Descriptor is 67 B, Windows cannot recognize the device. Am I doing something wrong or is there bug in CSL library?
Control endpoint initialization:
status = USB_initEndptObj(CSL_USB0, hEpObjArray[1], CSL_USB_IN_EP0, CSL_USB_CTRL, CSL_USB_EP0_PACKET_SIZE, CSL_USB_EVENT_EOT, NULL);
Configuration Descriptor Transfer:
status = USB_postTransaction(hEpObjArray[1], 67, cfgDescPtr, CSL_USB_IN_TRANSFER);
Configuration Descriptor Definition (it should be correct because I have compared it with another project):
Uint16 cfgDesc[34] =
{
//~ Configuration Descriptor ~//
0x0209, // Size of this descriptor in bytes, CONFIGURATION descriptor type
0x0043, // Total length of data for this cfg (word)
0x0102, // Number of interfaces in this cfg, Index value of this configuration
0xA000, // Configuration string index, Attributes
0x0900, // Max power consumption (2X mA), Size of next descriptor in bytes
//~ Interface Descriptor ~//
0x0004, // INTERFACE descriptor type, Interface Number
0x0100, // Alternate Setting Number, Number of endpoints in this intf
0x0202, // Class: Communication Interface, Subclass: abstract control model
0x0002, // Protocol: V.25ter (AT commands), Interface string index
//~ CDC Class-Specific Descriptors ~//
0x2405, // Delka dalsiho deskriptoru, Typ: interface
0x0100, // Podtyp: Header, Hodnota LSB
0x0410, // Hodnota MSB (verze BCD - 1.10), Delka dalsiho deskriptoru
0x0224, // Typ: interface, Podtyp: ACM = Abstract Control Management
0x0502, // Hodnota (supported commands for the Abstract Control Model interface), Delka dalsiho deskriptoru
0x0624, // Typ: interface, Podtyp: Union Functional Descriptor
0x0100, // Hodnota CDC_COMM_INTF_ID, Hodnota CDC_DATA_INTF_ID
0x2405, // Delka dalsiho deskriptoru, Typ: interface
0x0001, // Podtyp: Call Management Functional Descriptor, Hodnota (volby)
0x0701, // Hodnota CDC_DATA_INTF_ID, Delka dalsiho deskriptoru
//~ Endpoint Descriptor ~//
0x8205, // Typ: endpoint, EP02_IN
0x0803, // Interrupt Transfer, Velikost paketu (LSB)
0xFF00, // Velikost paketu (MSB), Polling Interval
//~ Interface Descriptor ~//
0x0409, // Size of next descriptor in bytes, INTERFACE descriptor type
0x0001, // Interface Number, Alternate Setting Number
0x0A02, // Number of endpoints in this intf, Class: Data Interface
0x0000, // Subclass: 0, Protocol: No class specific protocol required
0x0700, // Interface string index, Delka dalsiho deskriptoru
//~ Endpoint Descriptors ~//
0x0405, // Typ: endpoint, EP04_OUT
0x4002, // Bulk Transfer, Velikost paketu (LSB)
0x0000, // Velikost paketu (MSB), Polling Interval
0x0507, // Delka dalsiho deskriptoru, Typ: endpoint
0x0283, // EP03_IN, Bulk Transfer
0x0040, // Velikost paketu (word)
0x0000 // Polling Interval, 0 */
};