USB workaround

Hardware related problems and workarounds

USB workaround

Postby Frida » Wed Jul 16, 2014 6:28 pm

Well after I have tried a lot, I have now made a workaround for my USB problems.
With an injection needle a resistance and a lot of patience I began to troubleshoot on my Parallella.
After a study of the diagram, and download of a couple dokuments, I have narrowed it to down to U33 on page 17.
I think there are a race condition on the reset network.
Now I have a jumper between USER LED CR10 pin1 and U33 PIN4.
It now boots up every time, both with and without, USB cable.
Attachments
CAM00053a.jpg
CAM00053a.jpg (150.87 KiB) Viewed 21903 times
User avatar
Frida
 
Posts: 22
Joined: Wed Sep 04, 2013 2:37 pm
Location: Middelfart, Denmark

Re: USB workaround

Postby AndrewStone » Thu Jul 17, 2014 2:42 am

Hi Frida,

Would you mind describing what you think the problem is and what your jumper does? I'm guessing pulling something to ground?

thx!
AndrewStone
 
Posts: 4
Joined: Mon Jun 30, 2014 7:39 pm

Re: USB workaround

Postby FHuettig » Thu Jul 17, 2014 4:19 am

I was just about to ask the same thing. Can you describe the symptoms this fixes? I understand your (very clever!) fix delays the release of the USB reset signal until after the FPGA has started to configure, but it's not immediately obvious how that helps. The USB reset will still be released well before the FPGA has completed configuration and a long time before Linux starts to boot.

You've got me thinking that the FPGA pins, being pulled weakly high before configuration, must be doing something evil to the PHY in that time. Perhaps the PHY is interpreting the high level on its CLKOUT pin as a request to have the clock driven by the link instead of by the PHY, that could certainly cause problems!! I'll have to look at this closely.

Thanks for taking the time to investigate, we needed a fresh perspective. The intermittent nature of this failure makes it very tough to diagnose, especially since I hardly ever see this failure any more.
-- Fred -- Hardware Guy --
FHuettig
 
Posts: 142
Joined: Wed Jan 29, 2014 8:30 pm
Location: Lexington, MA, USA

Re: USB workaround

Postby Frida » Thu Jul 17, 2014 1:03 pm

1: First I power up my board and waited until the login screen was on, then I hit the reset button shortly and waited until the login screen was on again. Now I could login.

2: I tried to hold the reset button for 10 sec. until I was sure that power on the card had stabilized. It did not help.

3: Then I found out, when I hit the reset button when the USER LED came on, then I could login.

4: I looked on the datasheet of U33, and saw that the output on pin 4 is high Z, when there is no power. It meant that the BOARD_RESET is not in reset at the moment we power up. I then took my needle and resistance and place it on pin 4 and ground and then power up. As soon the USER LED came on, I removed my needle and I could login.

5: That made my think of a rc delay on PIN 4, but before I did it, I measured the voltages on the USER LED and measured 3.16 volts on pin 2 and 1.22 volts on PIN 1. I saw that the resistance R30 was 230 ohm., so that in serie with R295 1k ohm., could held the reset ontil the USER LED came on. The 1.22 volt is high enough to get it out af reset and still under 1.8 volts that is max. So I could not resist placing a jumper from U33 PIN 4 to CR 10 PIN 1.
6: And yes, it works fine for me. Now I can held down the reset button as long as I wish, and it will still start up, when I release it.
And yes, that is what a reset button should do.

I thought with my powersupply it will take several usec. to power up all the circuits,
and which circuit has enough voltage to operate first, maybe the reset circuit come in with a reset pulse after some circuits has begun to work.


@FHuettig, Are You always using a bench powersupply, maybe it is strong enough to rapidly power on the circuit, so that you dont se our problems:)

What does TURBO_MODE?, it is high when powered from J12, and low when I change the jumper to power it from USB_VBUS.

Please ask again if there is something not to understand.
User avatar
Frida
 
Posts: 22
Joined: Wed Sep 04, 2013 2:37 pm
Location: Middelfart, Denmark

Re: USB workaround

Postby Sean S » Thu Jul 17, 2014 3:59 pm

I am going to give this a go on my board in the next few hours and let you know if it worked for me.
Sean S
 
Posts: 30
Joined: Mon May 19, 2014 5:30 pm

Re: USB workaround

Postby FHuettig » Thu Jul 17, 2014 4:23 pm

Frida, Thanks again for the info and your time doing the investigation! I hope you don't mind a few more questions:

Frida wrote:1: First I power up my board and waited until the login screen was on, then I hit the reset button shortly and waited until the login screen was on again. Now I could login.

Are you saying that before your fix, when you first power-on the board after it has been un-powered for a substantial amount of time, you can't login (meaning USB doesn't work?) until you hit the reset button (and then USB works)? @SeanS is that what you see?

Frida wrote:...snip...
6: And yes, it works fine for me. Now I can held down the reset button as long as I wish, and it will still start up, when I release it.
And yes, that is what a reset button should do.

:) 100% agree!

Frida wrote:@FHuettig, Are You always using a bench powersupply, maybe it is strong enough to rapidly power on the circuit, so that you dont se our problems:)

I have three setups, one with a bench supply so I can monitor current but two others with standard wall-warts. I use them about equally and my observations are the same on all three. But the behavior I see is contrary to what you describe, I never (?) see USB failure on initial power-up, but I do if I hit the reset button, so when I see failures the power has been stable for a long time. That's not quite correct, I do see the problem if I power-cycle quickly, just not if the power has been off for 10-15 seconds or more.

Frida wrote:What does TURBO_MODE?, it is high when powered from J12, and low when I change the jumper to power it from USB_VBUS.

I don't think that signal serves any real purpose. I believe (I've never asked) that it was intended to "enable" higher-power use of the board when it was powered from the barrel connector rather than from USB. For example an FPGA configuration might disable HDMI output if TURBO_MODE is not asserted, or run the Epiphany at a lower clock speed. At this time the signal is unused / unconnected in our FPGA configurations.
-- Fred -- Hardware Guy --
FHuettig
 
Posts: 142
Joined: Wed Jan 29, 2014 8:30 pm
Location: Lexington, MA, USA

Re: USB workaround

Postby perles » Thu Jul 17, 2014 4:57 pm

FHuettig wrote:Frida, Thanks again for the info and your time doing the investigation! I hope you don't mind a few more questions:

Frida wrote:1: First I power up my board and waited until the login screen was on, then I hit the reset button shortly and waited until the login screen was on again. Now I could login.

Are you saying that before your fix, when you first power-on the board after it has been un-powered for a substantial amount of time, you can't login (meaning USB doesn't work?) until you hit the reset button (and then USB works)? @SeanS is that what you see?


FHuettig, I can confirm Frida's observation. I don't get the USB port on a fresh power-on. And my power supply is the one sold by Adapteva. Though, I didn't have a chance to test the reset method Frida's mentioned.
perles
 
Posts: 8
Joined: Fri Jun 20, 2014 4:28 pm

Re: USB workaround

Postby Frida » Thu Jul 17, 2014 6:47 pm

Are you saying that before your fix, when you first power-on the board after it has been un-powered for a substantial amount of time, you can't login (meaning USB doesn't work?) until you hit the reset button (and then USB works)? @SeanS is that what you see?

Yes, it only has to be un-powered 15 sec or more. Right after I see HDMI.., when I do not see my Logitech, I know that I have to hit the reset button.
User avatar
Frida
 
Posts: 22
Joined: Wed Sep 04, 2013 2:37 pm
Location: Middelfart, Denmark

Re: USB workaround

Postby FHuettig » Thu Jul 17, 2014 7:36 pm

Thanks Perles / Frida. Interesting, now I'm wondering if the failure mode at power-on is the same as I see after a reset or quick power-cycle. When I see a failure the system can't see the PHY at all, for example:

Code: Select all
> grep phy /var/log/dmesg
...(2 other messages)...
xusbps-dr e0002000.usb: Unable to init USB phy, missing?

> lsusb
unable to initialize libusb: -99


That's the only sailient difference between working and non-working in my cases. If you (anyone/everyone) have a chance, can you look for this message either by running 'dmesg | grep phy' over ssh or by mounting the SD card on a different computer and looking in the /var/dmesg file? Or, if you get it running a subsequent time you can check for that message in the previous log at /var/log/dmesg.0. For example, I looked at @theyogre's logs posted in another thread and the phy seems to have initialized normally and even has communications with a device. In that case I have to guess that the connector is faulty, maybe. Meanwhile the log pieces posted by @e-rod show the phy failing to initialize when it doesn't work, and working when it does initialize. The question remains why this happens, and maybe we have a new clue here.
-- Fred -- Hardware Guy --
FHuettig
 
Posts: 142
Joined: Wed Jan 29, 2014 8:30 pm
Location: Lexington, MA, USA

Re: USB workaround

Postby FHuettig » Thu Jul 17, 2014 8:42 pm

Update:

My theory, that the PHY was getting into a mode where the ULPI interface was clocked by the external input (pin 26) instead of driving a clock out on pin 1, is busted. :( Even when the phy is "missing" there is still a nice clean 60MHz clock.

Also, I am able to "resurrect" a board after it has failed (because of a reset, in my case) by employing Frida's trick of holding the USB reset a bit longer than the FPGA reset. So maybe there is only one failure mode, it's just that diffrerent boards/chips exhibit the problem in different ways (at power-on or only after reset).

I'll keep digging.
-- Fred -- Hardware Guy --
FHuettig
 
Posts: 142
Joined: Wed Jan 29, 2014 8:30 pm
Location: Lexington, MA, USA

Next

Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 2 guests