I am trying to use a K24 with MQX 4.2 to act as a USB composite device with a virtual comm and a mass storage device.
I used this demo C:\Freescale\Freescale_MQX_4_2\usb_v2\example\device\composite\msd_cdc
It fails during the enumeration process, and I am stuck.
Windows reports "Windows has stopped this device because it has reported problems. (Code 43)"
And USB Trace gives me "USBHub:Create Device Failed" with fid_NtStatus: 3221225628 (0xC000009C) AKA STATUS_DEVICE_DATA_ERROR
I am thinking that the device descriptor is wrong, or that it never makes it to the host.
Any clues would be appreciated!
I enabled debuging for the USB stack and this is what I get.
SEGGER J-Link GDB Server V4.98b - Terminal output channel
USB bsp_usb_dev_soc_init
Enter USB_Class_MSC_Init
USB_Control_Service ++
00++ Enter ++ type:128
descriptor class 1
send 18 to host
ready to receive ZLT on EP0
USB_Control_Service ++
USB_Control_Service ++
USB_Control_Service ++
00++ Enter ++ type:0
send 0 to host
USB_Control_Service ++
00++ Enter ++ type:128
descriptor class 1
send 18 to host
ready to receive ZLT on EP0
USB_Control_Service ++
USB_Control_Service ++
USB_Control_Service ++
USB_Control_Service ++
USB_Control_Service ++
00++ Enter ++ type:128
descriptor class 1
send 18 to host
ready to receive ZLT on EP0
USB_Control_Service ++
USB_Control_Service ++
USB_Control_Service ++
USB_Control_Service ++
00++ Enter ++ type:0
send 0 to host
USB_Control_Service ++
send ZLT done
USB_Control_Service ++
00++ Enter ++ type:128
descriptor class 1
send 18 to host
ready to receive ZLT on EP0
int8_t g_device_descriptor[DEVICE_DESCRIPTOR_SIZE] =
{
18, /* "Device Descriptor Size */
1, /* "Device" Type of descriptor */
0x00, 0x02, /* BCD USB version */
0xEF, /* Miscellaneous Device Class */
0x02, /* Common Class */
0x01, /* Interface Association Descriptor */
64, /* Max Packet size */
0xA2,0x1F, /* Vendor ID */
0x00,0x08, /* Product ID */
0x00,0x08, /* BCD Device version */
0x01, /* Manufacturer string index */
0x02, /* Product string index */
0x00, /* Serial number string index */
0x01 /* Number of configurations */
};
Thanks