Jay Monkman

Bug report for USB examples

Discussion created by Jay Monkman on Jan 13, 2020
Latest reply on Jan 14, 2020 by Daniel Chen

Is there a better place for reporting bugs? I couldn't find any.


I've run into an issue with some of the RT1050 USB examples where they don't enumerate correctly when connected to a computer running windows 10.


I found it with the following examples, but may be in others:





The problem is caused by an incorrect subclass in the IAD section of the configuration descriptor (g_UsbDeviceConfigurationDescriptor). In those examples, the subclass is set to 0x03 (Telephone Control Model) instead of 0x02 (Abstract Control Model). In fact, the interface descriptors in those examples are correctly set to Abstract Control Model.


Here's the code from usb_device_composite_cdc_msc_sdcard_lite/bm/usb_device_descriptor.c:

/* Define configuration descriptor */
uint8_t g_UsbDeviceConfigurationDescriptor[] = {


   /* Interface Association Descriptor */
   /* Size of this descriptor in bytes */
   /* INTERFACE_ASSOCIATION Descriptor Type */
   /* The first interface number associated with this function */
   /* The number of contiguous interfaces associated with this function */
    /* The function belongs to the Communication Device/Interface Class */
    /* The function uses the No class specific protocol required Protocol */
    /* The Function string descriptor index */



Changing that highlighted 0x03 to 0x02 allowed the example to correctly enumerate. To be consistent with the code, it should probably be "USB_CDC_VCOM_CIC_SUBCLASS", which evaluates to 0x02 in that example.


I found this in version 2.4.2, but it seems to still exist in 2.7.0 of the SDK.