Content originally posted in LPCWare by NXP_Paul on Tue Sep 17 13:10:41 MST 2013
I am not sure why you are getting the time-out error. Note that a USB host may change the number of bytes it requests for the Get Device Descriptor request. The first time, it may request a smaller number of bytes (generally eight bytes). The host requests a smaller number when it queries address 0 because it wants to find out the maximum packet size of endpoint 0. The second time a Get Device Descriptor is sent by the host, it will request the entire Device Descriptor.
Make sure that your code is sending the correct number of bytes that the host requested.
It would be useful to have a USB analyzer to see what is actually occurring on the bus.