Hi All,
I am hoping someone out there can help. I have had a terrible time getting
the USB host driver to run on my XSCALE (PXA270) board. I know one of the
reasons is because it is running WINCE 4.1, but currently that can't be
helped. As it stands, I have the OHCI sample driver that came with the OS
compiling, installing, and running. I get interrupts, my IST runs, but I am
not talking to any devices. What I experience is a failure on TD, with an
error status of 0x5. I believe this means the device is not responding.
Since NO devices respond, and I have tried multiple boards to rule out the
HC, I have to assume the problem is with my driver or the hardware itself
coming from the OHCI controller, to the actual USB port. Our HW guys insist
the problem must be in the driver, because when they put a scope in between
the USB cable, there is some sort of signal. However because the signal is
differential, they can't tell me what it is, if it is TX, RX, or both.
What I would like to do, is add some debug statements to my driver, to dump
what goes into the transfer output buffer, and what, if anything comes back.
This sounds simple enough, but I lack the USB knowledge to really know:
1) What should the output be? I believe I read somewhere when a device is
first plugged in, the HCD issues a "poll" and expects "some response". But
both of these are rather vague. Is there some document that describes this
process in detail? I need to know what the host is expected to send, and
what it is expecting to recieve.
2) I'm having a tough time figuring out where in the code I'd trace this
information. My thought was I could trace the TX in IssueTransfer
(cpipe.cpp), but I am not sure which of the parameters is the actual data.
The reported buffer lengths are zero, so is the "poll" a "control" packet?
If so, does all the data go in the lpvControlHeader? Again knowing what the
data is supposed to be might clue me in. It looks like RX works the same,
using the dwFlags parameter when the transfer is issued to indicate the
transfer is coming from the device. So maybe I could trap both RX and TX in
the same place?
3) If I am getting ANYTHING back from the device will I get an error of 0x5,
or does this only occur when there is NO response?
Thanks to anyone out there who has the time to answer me. My experiences
implementing the USB host controller has felt like a good month of beating my
head into a brick wall :)