USB bugs

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB bugs

395 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by peufeu on Mon Mar 18 10:19:54 MST 2013
I'm implementing an USB device on the LPC4330 Xplorer. I've hit a rather strange bug.
I'm using LPCUSBLib.

My code, and  the LPCUSBLib examples fail in the same way. I'm thinking about a bug in the libraries.


I'm seeing in WireShark that half of my USB Descriptor Response packets are garbled. So, the PC asks for everything twice and receives it correctly the second time. It works up to a point, but then implodes when it wants to do some SetInterface and other things that it doesn't feel like retrying when they fail.

The kernel reports a Broken Pipe error.

The response packets seem truncated at 64 bytes. Wireshark reports them as malformed. I don't know if the packet is actually truncated (ie, contains good data, but not enough of it) or contains 64 bytes of irrelevant data.

I'm updating wireshark to get more details. The new version seems to handle this better.

It happens with 2 different PCs, and on the 2 on-board USB ports, high and full speed, and will all the NXP examples. So, I guess it's a bug in the libraries, which is actually good news (easier to fix than a hardware bug under a BGA part...)

Any ideas ?
Labels (1)
0 Kudos
2 Replies

345 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tuong on Tue Mar 19 00:13:14 MST 2013
Hi,

The 64 bytes packet is the control endpoint size that you declare to host (PC) in the device descriptor.
I dont understand your situation clearly, but I guess that one of your descriptor has size multiple of 64 and when PC asking for this descriptor, although your software has finished sending the descriptor but the PC keep asking for it, this can be fixed by sending extra 1 0x00 byte or adjusting the control endpoint size.

With best regards,
0 Kudos

345 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wmues on Mon Mar 18 13:37:52 MST 2013
looks like a data toggle bit error...
0 Kudos