Thad Phetteplace

Truncated packets using USB on MCF54455

Discussion created by Thad Phetteplace on Jan 29, 2009
Latest reply on Feb 10, 2009 by Thad Phetteplace
I am porting a driver originally written for the IMX31 to run on an MCF54455.  I am developing on the MCF54455EVB and when running Linux the USB works fine, so the hardware is fine.  As far as I can tell, I am initializing the USB core and setting up the registers no differently than on Linux, but I can not even reliably send a SETUP message.  My QH and TD records all look good, are mapped into valid RAM, and I see most of the data is making it onto the bus when I sniff the line, but packets are often being truncated or not acknowledged.  I am not even out of setup yet, so the Periodic queue is empty and we having nothing else on the async queue but this setup message.

The status being written back to the TD has the Transaction Error and Halted bits set and the CErr count has been decremented to zero... probably because the device (a storage dongle) did not succesfully responded.  On occassion the config message will make it and the device responds, but then that message is truncated.

Other info:  I am using the internal tranceiver, so connecting at full speed not high.

My instincts tell me this is a timing problem, that I am running past the end of the frame or something like that, but I can't find how to verify or adjust for that.  I've been through the EHCI spec and the MCF54455 spec and nothing jumps out at me, especially considering the usual PCI bus timing issues don't apply with this embedded core.

Anyone have any ideas what the most likely cause is?  Any suggestions on how dig into it a bit deeper?  Most of my USB work has been at higher layers, so this is new territory for me.

Thanks.

Outcomes