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 ?