Part Number: TMS320F28388D
Hi,
I am working on developing USB communication through CM core in F28388D. I tested and confirmed the example 'USB Generic Bulk Device (usb_dev_bulk) - CM'. For this example, I have to install the driver 'usb_dev_bulk.inf'. But, I would like to automatically bind to WinUSB.sys without install the driver.
I tried to use BOS Descriptor and MS OS 2.0 Descriptor as follows but I failed. Let me know if you have any solutions or suggetions.
uint8_t g_pBOSDescriptor[] = {
/* BOS Descriptor Header */
0x05, /* bLength */
0x0F, /* bDescriptorType = BOS */
0x21, 0x00, /* wTotalLength = 33 bytes */
0x01, /* bNumDeviceCaps = 1 */
/* Microsoft OS 2.0 Platform Capability Descriptor */
0x1C, /* bLength = 28 bytes */
0x10, /* bDescriptorType = DEVICE CAPABILITY */
0x05, /* bDevCapabilityType = PLATFORM */
0x00, /* bReserved */
/* Platform Capability UUID (MS OS 2.0) D8DD60DF-4589-4CC7-9CD2-659D9E648A9F */
0xDF, 0x60, 0xDD, 0xD8,
0x89, 0x45, 0xC7, 0x4C,
0x9C, 0xD2, 0x65, 0x9D,
0x9E, 0x64, 0x8A, 0x9F,
/* Windows version (8.1+) */
0x00, 0x00, 0x03, 0x06, /* dwWindowsVersion = 0x06030000 */
/* wMSOSDescriptorSetTotalLength (size of MS OS 2.0 descriptor set) */
0x2E, 0x00, /* 46(=0x2E) bytes */
/* bMS_VendorCode (used in vendor request to fetch MS OS 2.0 set) */
0x01, /* Vendor code */
/* bAltEnumCode */
0x00
};
uint8_t g_pMSOS20DescriptorSet[] = {
// MS OS 2.0 Descriptor Set Header (10 bytes)
0x0A, 0x00, // wLength = 10 bytes
0x00, 0x00, // MSOS20_SET_HEADER_DESCRIPTOR (0x0000)
0x00, 0x00, 0x03, 0x06, // dwWindowsVersion = Windows 8.1 / 10+ (0x06030000)
0x2E, 0x00, // wTotalLength = 46 bytes (0x002E)
// MS OS 2.0 Configuration Subset Header (8 bytes)
0x08, 0x00, // wLength = 8 bytes
0x01, 0x00, // MSOS20_SUBSET_HEADER_CONFIGURATION (0x0001)
0x01, // bConfigurationValue = 1
0x00, // bReserved = 0
0x24, 0x00, // wTotalLength = 36 bytes (0x0024)
// MS OS 2.0 Function Subset Header (8 bytes)
0x08, 0x00, // wLength = 8 bytes
0x02, 0x00, // MSOS20_SUBSET_HEADER_FUNCTION (0x0002)
0x00, // bFirstInterface = 0
0x00, // bReserved = 0
0x1C, 0x00, // wSubsetLength = 28 bytes (0x001C)
// MS OS 2.0 Compatible ID Descriptor (20 bytes)
0x14, 0x00, // wLength = 20 bytes
0x03, 0x00, // MSOS20_FEATURE_COMPATIBLE_ID (0x0003)
'W', 'I', 'N', 'U', 'S', 'B', 0x00, 0x00, // Compatible ID: "WINUSB\0\0"
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Sub-Compatible ID: Null
};
Jeong
