AnsweredAssumed Answered

LPC2468 USB Issue on Windows 10

Question asked by Hoa Nguyen on May 31, 2019
Latest reply on Jun 4, 2019 by Hoa Nguyen

Hello, 

I'm trying to fix a usb driver for my application, this is a reuse driver from nxp called usbstdreq.c.  For some reasons when I plug usb to Windows 7 and it works (it send all the bytes from device side to host side) but on Windows 10 it gives a warning and I can't connect my device to Windows 10, I have a usb analyzer and monitor the traffic between host and device and see that my device only sends 64 bytes instead of 67 bytes as on Windows 7.

 

More details: On Windows 7 after the host set an address for the device it then ask for Device Descriptors then Configuration Descriptors, follow by three String Descriptors, then after three String Descriptors the host asks for Device Descriptors and 1 Configuration Descriptors (device send total 67 bytes includes all descriptors to host) and it Sets the Configurations.  But on Windows 10 everything is same as Windows 7 but after the device sends all 67 bytes to host, the host ask again for Device Descriptors and Configuration Descriptors at this time device only sends 64 bytes, sometimes it does not sends anything and host suspends the connections.

 

In more depth:

On Windows 7: after the host (PC) set an address to the device it then ask for device descriptor, configuration descriptor, then few string descriptors, after that the host again asks for device descriptor and configuration descriptor (67 bytes are sent if the connection is successful), then the host starts setting configuration for the device.  It only fails to communicate because the on the last request for configuration descriptor the device only sends 64 bytes (it’s rare but sometimes device doesn’t send anything).

 

Set address --> host asks for device descriptor (18 bytes) --> device responses to the request (18 bytes) --> host asks for configuration descriptor(255 bytes) --> device responses to the request (67 bytes) --> host asks for string descriptors --> device responses to the requests --> host asks for device descriptor (18 bytes) --> device responses to the request -->host asks for configuration descriptor (256 bytes) --> device responses to the request(67 bytes) it would be fail here if device only sends 64 bytes or 0 bytes --> host set configuration --> communication starts.

 

In short:

Success case: Set address --> device (18 bytes) --> configuration (67 bytes) --> string --> device (18 bytes) --configuration (67 bytes) --> set configuration --> success.

Fail case: Set address --> device (18 bytes) --> configuration (67 bytes) --> string --> device (18 bytes) --> configuration (64 bytes or 0 bytes) --> fail.

 

 

On Windows 10: everything is the same as on Windows 7 after host asks for second device descriptor, then host asks 2 times for configuration descriptor, then host again asks for device descriptor (3rd time) and 2 times for configuration descriptor.  If it successfully communicates on the last request for configuration descriptor the device would response with 67 bytes, but most of the time the device only sends 64 bytes or 0 bytes.

 

Same as Windows 7 --> device responses to the request (18 bytes) --> host asks for configuration descriptor (9 bytes) --> device responses to the request(9 bytes) --> host asks for configuration descriptor(255 bytes) --> device responses to the request (67 bytes) --> host asks for configuration descriptor (9 bytes) --> device responses to the request(9 bytes) sometime it will fail here if 0 bytes sent --> host asks for configuration descriptor(256 bytes) --> device responses to the request (67 bytes) most of the time it fails here because only 64 or 0 or 3 bytes sent -->  host set configuration --> communication starts. 

In short:

Success case: Set address --> device (18 bytes)  --> configuration --> string --> device (18 bytes)  --> configuration (9 bytes)  --> configuration (67 bytes)  --> device (18 bytes)  --> configuration (9 bytes)  --> configuration (67 bytes)  --> set configuration --> success.

 

Fail case 1 (most of the time): Set address --> device (18 bytes)  --> configuration --> string --> device (18 bytes)  --> configuration (9 bytes) --> configuration (67 bytes)  --> device (18 bytes)  --> configuration (9 bytes)  --> configuration (64 or 0 or 3 bytes)  --> fail. 

Fail case 1 (rare): Set address --> device (18 bytes)  --> configuration --> string --> device (18 bytes)  --> configuration (9 bytes)  --> configuration (67 bytes)  --> device (18 bytes)  --> configuration (0 bytes) --> fail.

 

Any help would be appreciated.

 

Thanks,  

Outcomes