AnsweredAssumed Answered

MX28 WinCE6 USB enumeration issue

Question asked by Rodrigue Simonneau Employee on Feb 4, 2014
Latest reply on Feb 28, 2014 by Adeneo Engineering Team

Dear Support,



Customer have a device that is not enumerating properly on the TX28 from Karo (SOM manufacturer) units with Windows CE 6.0.  It contains an interface that lists zero as the number of endpoints.  As far I know, this is a valid interface that uses only the control endpoint.


However, the enumeration fails when determining the number of interfaces.

Specifically, in BSP/common/src/soc/COMMON_FSL_V3/MS/USBH/USB2COM/cdevice.cpp, the CreateUsbConfigurationStructure() call fails in the "second step". 


The buffer contains 18 bytes, which correspond to a configuration descriptor and an interface descriptor.  The interface descriptor specifies bNumEndpoints == 0, and there are also no additional interfaces.  Therefore, 18 is the complete length of the data for the two descriptors.

The code has a test:

while (offset + x + sizeof(USB_INTERFACE_DESCRIPTOR) < dataBufferLen)


where offset=9, x=0, and dataBufferLen=18.

Therefore, the test fails, preventing the number of interfaces from being incremented, and resulting in a failure of the entire enumeration.

Changing the '<' to '<=' seems to resolve the problem.


Can we confirm this is an issue?

It seems that both WinCE 6.0 & WinCE 7.0 use the same conditional statement, so presumably both will fail, but only WinCE6 was tested.