USB "Time out error"

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

USB "Time out error"

903件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jonas2 on Mon Sep 16 07:27:55 MST 2013
I try to set up the USB module in device slave mode and connect it to a Win XP pc. This is the message sequence:

1) The host send "Get Device Descriptor" to address 0
2) The device answers.
3) The host send "Set Address", set the address to 2
4) The host send "Get Device Desriptor" to address 2.
5) The device sends the descriptor and get a USB error interrupt. The error code read with   the SIE command 0xFF ( Get Error Code) is 0110 "Time Out Error".

The USB analyzer that I use issue a "Invalid PID sequence" error.

I use a LPC1778 and the nxpUSBlib. Any ideas of what the cause of this error might be?
ラベル(1)
0 件の賞賛
3 返答(返信)

619件の閲覧回数
lpcware
NXP Employee
NXP Employee
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.
0 件の賞賛

619件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jonas2 on Tue Sep 17 00:29:21 MST 2013
Ok but why do I get the Time out error, what is the cause of it? The first descriptor request is answered correctly, it's the second request that fauils. It's the same piece of code that handles these two requests.

Thanks!
0 件の賞賛

619件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Paul on Mon Sep 16 12:45:31 MST 2013
Can you try using the USB libraries found in LPCOpen?  The LPCOpen libraries are based on nxpUSBlib, but I have found that LPCOpen has solved a few of the problems that you may encounter in nxpUSBlib.
You can download LPCOpen from: http://www.lpcware.com/content/project/lpcopen-platform-nxp-lpc-microcontrollers

- Paul
0 件の賞賛