WinCE 5.0 USB connection issues
- From: Darren Steadman <darren.steadman@xxxxxxxxxxxxxxx>
- Date: 25 Apr 2007 04:07:43 -0700
We are currently having issues with the USB drivers under WinCE 5.0 as
far as detecting that a device has been connected when our nk.bin
image is compiled in release mode.
Here is the following setup
VIA EPIA-ML board with latest BIOS
Latest VIA BSP for the specific board
Two identical USB devices (our custom built boards) that use FTDI usb
controllers, chip ID is FT232RL (batch number 0642-A).
The problem we are having:
Recently we had a new batch of out custom boards made and we started
to integrate them into our enclosures with the VIA EPIA-ML
motherboards. We connect the custom boards to the motherboard using
correctly shielded cables to the internal USB header.
While testing we found that a certain number of the custom boards were
not being detected by WinCE 5.0 when they were connected. For testing
we also tried using the external USB ports and they also failed.
We talked to VIA about the problem and they requested that we sent
them a setup that they could test, so we sent (to their German office)
one of our EPIA-ML boards and two of our custom boards, one that
worked and another that didn't. The German arm of VIA could not find
anything wrong with the hardware interaction and so offered to send
the whole kit to Korea to be tested at their manufacturing plant. The
Koreans verified that there wasn't any problem with their hardware.
At this point I started to investigate the WinCE drivers. After
testing and placing RETAILMSG output statements I found that the
device was failing on
DEVICE_CONFIG_STATUS_SCHEDULING_GET_DEVICE_DESCRIPTOR_TEST
in cdevice.cpp (UHCD version) It was attempting to get the descriptor
of the device and fails when calling IssueTrasfer on the control pipe
in GetDescriptor (same .cpp file) It comes back with dwErrorFlags set
to 4 which translates to USB_STALL_ERROR.
Now if I put a RETAILMSG call or a Sleep into the IssueTransfer
(Control Pipe) (C:\WINCE500\PUBLIC\COMMON\OAK\DRIVERS\USB\HCD\UHCD
\cpipe.cpp) function at the top before any other code is executed then
everything works fine. (If the Sleep is too large it breaks other
stuff). The point is it seems to be a timing issue.
mechanisum to try and get everything working again.From what I can see if a stall is encountered then there is no retry
So the basic questions are:
Why am I getting the stall in the first place?
How should it be handled to give the device a chance to work?
Why does it work in Debug but not in Release? (What I observed above
might answer that)
How can I fix it?
I've already previously had problems with USB devices and WinCE that
was kindly fixed by someone of these boards regarding WinCE not
handling Over current correctly.
It seems that every time we managed to fix and issue with WinCE USB
drivers another appears.
Just as a note it also seems that the same problem as above occurs
under WinCE 6.0 as far as I can remember. I havn't done anything with
6.0 for at least a month now. So this could be an on going issue
across CE in general.
Help with this would be greatly appreciated as it could potentially
become a big problem for us. We have invested a lot of time and money
developing our application to run under CE and if these final USB
issues can not be sorted out then it might force us away from CE.
Darren
.
- Follow-Ups:
- Re: WinCE 5.0 USB connection issues
- From: David Liao \(MS\)
- Re: WinCE 5.0 USB connection issues
- Prev by Date: Re: How to set up Platform Builder and Lauterbach
- Next by Date: RE: driver Intel 82541ER - Help
- Previous by thread: Re: How to set up Platform Builder and Lauterbach
- Next by thread: Re: WinCE 5.0 USB connection issues
- Index(es):
Relevant Pages
|