Weird issue: USB controller (SOC) works only when V+ is shorted to gnd? - Page 1
Forum section: electronics / beginners

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 09, 2020, 03:25:44 pm
content: I'm troubleshooting a USB peripheral device (a SOC being the brains and USB controller) powered by the PC USB port (no external psu/ac adaptor) which only works if the 5v line is shorted to Gnd before plugging it in the PC and works fine as long as the short is maintained. It disconnects as soon as the short is interrupted. It's a USB 2 device, but this behaviour only manifests itself when plugged into the a USB 3 port.Without shorting vdd to ground, the device fails to be properly recognised by windows (error 43 and invalid descriptor) on both USB 2 and 3 including powered hubs.While shorted, the ferrite bead closest to the power line takes the brunt of the current and is boiling hot (untouchable/pcb is getting brownish) and the jumpers/cables are warm. The SOC and all the other passives are not warm at all. Everything works just fine with the device.I haven't experienced anything like this before, I would be very happy if you could give me your ideas.

author: magic
author_rank: Super Contributor
timestamp: October 09, 2020, 06:30:02 pm
content: Something doesn't add up. How does it work if the USB power line is shorted to ground and there is no other power supply?

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 09, 2020, 06:52:25 pm
content: no idea.I haven't actually been able to put it under the scope or the dmmwhile it's shortedas I had to use a PC in another room to confirm that it actually works in windows (old pc in the lab. no usb3)I'll try on Monday morning but not sure what to even probe. It works so the SOC is getting the voltage it wants...either way I wouldn't be able to probe it for too long, I think that ferrite bead is going to melt if I leave it shorted for more than a few minutes.on second thought I don't even understand why that FB is burning up since I'm shorting upstream of it. the jumper cable I'm using gets pretty hot but nowhere near the heat of the bead.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 10, 2020, 08:14:32 am
content: any ideas? how can something work onlywhileV+ is being shorted to GND?I would understand better if it workedafterit was shorted, some kind of power cycle/ hard reset thing but it stops working as soon as the short is stopped.The most reasonable explanation is that it's not actually being shorted but I was using a jumper wire from the V+ pin (where the USB V+ wire is soldered) to the chassis ground eyelet which is connected/soldered to the ground plane with a through hole via. I don't see how that's not a short. Resistance between the eyelet and the ground pin was a few milliohm. Resistance between V+ and GND is about 12-15kohm.i tried the experiment with a powered usb 3 hub but the hub switches the port off when it detects the short. on a normal USB 3 port, it works but not on a USB 2 so I guess it's drawing more than 500ma.The other thing I was thinking was about that ferrite bead that's right after the V+ pin (in series). It gets awful hot when V+ is shorted, even though it's downstream the short so technically there shouldn't be enough current to heat it up. It's acting as if it is causing the short rather than the jumper wire. Or at least they are sharing the current since the wire also gets warm.How would you proceed from this point if you were me? Other than blindly probing it and going by gut feeling (which is surprising effective, that's how I discovered this weird behavior) I was thinking of hooking it up to a power supply and giving it a very low voltage/low current, shorting it and start following the voltage around with a dmm to see how it's escaping the short. Or hooking it up to the function gen and pulsing it.Maybe I should post this in another section of the forum? It's not exactly Beginner friendly I guess

author: JustMeHere
author_rank: Frequent Contributor
timestamp: October 10, 2020, 09:21:31 am
content: This must be happening:

author: oPossum
author_rank: Super Contributor
timestamp: October 10, 2020, 09:23:43 am
content: Are you shorting it with a paperclip?

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 10, 2020, 09:45:40 am
content: Quote from: JustMeHere on October 10, 2020, 09:21:31 amThanks, watching now.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 10, 2020, 09:46:16 am
content: Quote from: oPossum on October 10, 2020, 09:23:43 amno, short male-male dupont cable (just a breadboard cable essentially)

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 10, 2020, 10:26:07 am
content: Quote from: JustMeHere on October 10, 2020, 09:21:31 amThat was a very interesting video, thanks!But I'm not sure how it would apply in my case. Since I'm shorting V+ to Gnd as close as possible to the USB cable, the circuit should be starved and non-operational. So technically there shouldn't be any/sufficient voltage on the SOC pins to go through the internal ESD diodes to the Vdd/Vss pins since it was all diverted to GND via the jumper cable causing the short.Maybe I'm missing something fundamental here but since I'm offering a very low resistance for V+ to GND (the jumper wire), there shouldn't be sufficient voltage potential after the short for the circuit to operate.On top of that, the device only works if it's shorted in this manner! It's as if the massive current draw from the short "fixes" whatever the issue is with the circuit.

author: oPossum
author_rank: Super Contributor
timestamp: October 10, 2020, 10:33:39 am
content: Is the voltage regulator that feed the SOC working properly?

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 10, 2020, 11:05:39 am
content: Quote from: oPossum on October 10, 2020, 10:33:39 amWhen Unshorted and plugged in the pc USB port (but not recognised by windows), I measured a very stable nominal 5v within spec, with reference to ground on the SOC's Vdd and the Vdd of the "USB Controller Section" of the SOC as well as on some of the Digital I/O. I don't have a circuit schematic with voltage junctions and references so it's all educated guess.Here is the SOC pin layout:and datasheethttps://www.cypress.com/file/140926/download, pin layout on page 10-11I wasn't able to physically get a good probe (trying to juggle the board, keep the probe on a 56pin qfn and plugging in/out the usb to the pc is funny business) to check for power-up issues but from what I could see, the vdd ramp-up voltage was a bit dodgy (got a spike up to 5.6v and noise) but nothing conclusive yet. I was trying to figure out how to get two scope probes on the pcb to check that there is no timing issue between the USB and SOC vdd but then I encountered the weird issue with the miraculous short.How can I check the regulator more thoroughly? I don't really know how to put it under load since the SOC is the load.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 10, 2020, 11:09:56 am
content: I'm actually going to go to the lab in a bit so I can take whatever measurement or test you think I should.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 10, 2020, 03:24:52 pm
content: So an update.When unshorted there is a stable 5.065v on both Vdd.Upon power-up it does spike up to 5.25v but then settles back down. 5.25 is within spec of the SOC.10-90% ramp up time on the scope is 6-8us, I didn't pursue this further.When "shorted" on a USB3 port, the voltage drops to 3v and the device works happily. When "shorted" on a USB2 port, voltage drops to 1.5v and device is not working. As far as I know there is no 3.3v logic nor do I see a 3.3v regulator anywhere so I don't know why it like 3v instead of the 5v.Then I did a dumb and tried to measure the current being drawn while shorted with the dmm, in parallel. Oopsie daisy. USB port did not like that at all, and it did do it's job this time - power surge warning. Since then, it doesn't recognise the "shorted" device - it gives me the power surge warning. I can probably reset that by reinstalling the usb drivers.So that means that somehow touching the V+ to the GND pins on the PCB is not a real short. Putting the dmm leads on V+ and GND was a real short and that shut off the USB port. I can't imagine that the resistance of my jumper wire is just enough to get the device working but the lower resistance of the DMM tripped it. Hell of a coincidence if that's it. I actually didn't know that USB works as a constant current source - is it supposed to do that? Drop the V if you ask more I ?At this point I'm thinking of simply desoldering the V+ and GND wires from the PCB and hooking it up to my powersupply. I'll give it 3v and see if it works. I'll leave the datalines connected to the PC. I've never done this, let's see if it works.

author: magic
author_rank: Super Contributor
timestamp: October 10, 2020, 04:22:20 pm
content: Do not disconnect board ground from the PC's ground. "Ground" potentials of the two ends could become different, it will likely not work, it may blow up the Cypress chip or the USB controller.There is no downside to having the grounds connected, just replace VBUS with 3V.USB is supposed to be protected from output short circuit. Common implementation is a polymer fuse. This needs to cool down after it tripped.BTW, USB signaling is 3.3V. This chip should be powered from a 3.3V regulator or it should have a 3.3V regulator internally to power its USB interface. Read the datasheet for details. This could be the source of your problem.That being said, I have heard that in practice USB ports are tolerant of 5V signals

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 10, 2020, 04:24:19 pm
content: Alright, we are getting somewhere!Device works only when fed a V of 2.9 to 3.45V.It's very finicky if I plug/unplug the usb plug (half the time windows throws an error) but is very consistently recognised when switching it on/off from the power supply.This leads me to suspect a couple things.A) Something somewhere is operating on 3.3v logic and is locking everything up because it's not getting it. However I checked the datasheets of the onboard ICs and they are all rated for 5v. Will investigate further.B)If A is true, then there is a 3.3v regulator somewhere who has failed passing through the full 5v instead of 3.3v.C)Something doesn't like the electrical noise/spikes of manually plugging in the USB plug.If anyone has any ideas, please

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 10, 2020, 04:26:55 pm
content: Quote from: magic on October 10, 2020, 04:22:20 pmYes, I kept the GND and just removed the V+. I had a feeling having two grounds would not be nice. Thanks for the warning thoughI posted my results above, your reply came while I was typing. Please take a look.

author: magic
author_rank: Super Contributor
timestamp: October 10, 2020, 04:28:57 pm
content: See my edit. USB is supposed to work at 3.3V.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 10, 2020, 04:33:58 pm
content: Quote from: magic on October 10, 2020, 04:22:20 pmHey I didn't catch your edit, we are typing at the same time.Damn, I didn't know this. I thought everything would be operating on 5v. I'll read the datasheet again but it did say max 5.25v and the USB Vdd was referenced from that (within a max/min window). I hope it has not blown an internal 3.3v regulator.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 10, 2020, 05:00:52 pm
content: So the SOC operates between 3-5.25V. There is an internal 3.3v regulator. So it should be fine on 5v. Maybe there's someting wrong with the internal regulator so as it turns on, it disconnects the device. This could explain the issue.There's a couple interesting things I found though:Maybe? although it "crashes" if I manually raise the V on the powersupply above 3.45v which shouldn't be a "wake-up" event. That's the 3.3v regulator kicking in probably.Could it be a timing issue?

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 10, 2020, 10:17:05 pm
content: I've been balls deep in the documentation but nothing really concrete so far. I'll see maybe play around with the resistors/caps/diodes on the vdd and d+/d- lines, maybe they are out of spec now and are causing some sort of delay which resets/hangs the usb module in the soc.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 12, 2020, 10:13:50 pm
content: So while I am still unable to boot the device with a Vdd above 3.3v, if I boot it at 3.3v I can then raise the Vdd up to 3.96V before it hangs.I think it's unlikely, but not impossible, that the internal 3.3v regulator is blown because I was able to raise the Vdd to 3.96V and the Voltage on the D-/D+ lines remained regulated at 3.26v.If I boot the device with initial 5v applied, there is some initial traffic on the D-/D+ lines at 3.26v.There also another daughter board with a couple shift registers which is sending or receiving 3.3v clock/pulses. If Vdd drops below 3.3v, that signal follows it downwards but once we go above 3.3v it stays at 3.3v.I think I will make another thread here or in another section of the forum, as the title is no longer relevant.Still, if any of you have any ideas, it would be of great help!

author: magic
author_rank: Super Contributor
timestamp: October 13, 2020, 06:35:01 am
content: I think you can change thread title by editing the first post.It looks like the Cypress chip has internal 3.3V regulation and is roughly working OK at 5V. Maybe there is a logic error elsewhere on the board that causes it to hang?Is it your board or some commercial product you are fixing?

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 13, 2020, 12:43:56 pm
content: Quote from: magic on October 13, 2020, 06:35:01 amah well I made a new thread.https://www.eevblog.com/forum/projects/please-help-troubleshooting-a-cypress-psoc1-board/But there's not a lot of traffic on it so I don't think it's going to be an issue.Yes the internal 3.3v seems to work and I also found an external 3.3v ldo which seems to work as well. It's on a daughter board with two shift registers. I don't understand why it needs to be there since the shift registers are rated to work at 5v but it's there and it outputs 3.3v. I can't probe much on that board since it would require a lot of hardware disassembly and putting it back together correctly is not guaranteed. I think I'm going to start taking prints from the scope and post them here, maybe somebody will see something I am missing.It's a commercial unit, a HID. It's a replica of an aircraft throttle control. Pretty expensive too, especially when it came out. This failure is actually quite common and the "solution" is that the manufacturer just sends you another pcb - the same one from 2010 though , no revisions. However, with covid and such, they are not responding to my request for a new board. There is a guy who offers to repair them for cheap but he was not willing to share his method, which is fair enough I guess. We are in different continents so it's not a viable solution for me. However, he says he replaces the soc which means he probably pulls the firmware from an existing one, loads it into the replacement soc with a programmer and maybe adds some of the firmware "fixes" found in the datasheet errata. He is only asking for 25$ so he probably won't do much more than that.The manufacturer advises to remove the device from the PC when it's not in operation and not to restart the PC with it plugged in. Which isridiculousbut also indicates that it's a problem with the chip itself (or at least the motherboard) and not any of the daughter boards, and it's somehow related to powering off/on the device.The only thing that's keeping from just tossing it (apart from my pride) is that the SOC works just fine at 3.3v. The memory is not corrupt, the firmware is all there. I could just put a 3.3v ldo on the Vbus and call it a day, see how long it lasts, but I have spent so much time on it I want to figure out what's wrong with it. Of course if it's firmware corruption then I will never know without getting a programming unit (100$, not worth it).

author: magic
author_rank: Super Contributor
timestamp: October 13, 2020, 05:02:08 pm
content: Most microcontrollers with internal flash can be locked so that getting the firmware out of them is very hard. Nobody wants his product cloned in China. Replacing such chips on commercial boards is no easy task.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 13, 2020, 06:10:58 pm
content: Quote from: magic on October 13, 2020, 05:02:08 pmyep I read on the cypress forums that they can be locked. But then again the guy says that he replaces the chip so either it's unlocked or he is lying about replacing the chip, but that's not very nice.In your opinion, does the fact that it hangs if booted with a V of more than approx.3.30v but once booted at 3.30v, the voltage can be raised up to 3.95v point to anything? Is this a phenomenon encountered anywhere else or is there a component who behaves like this? What can be "tricked" or overcome by raising the voltage slowly?

author: JustMeHere
author_rank: Frequent Contributor
timestamp: October 13, 2020, 06:38:34 pm
content: The idea behind the video is that you are powering your chip by the 3.3v in the data line. Grounding the +5v provides a way for the 3.3v to power the rest of the chip.An oscilloscope would confirm if you are seeing data in the 3.3v supply you are reporting.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 13, 2020, 07:25:50 pm
content: Quote from: JustMeHere on October 13, 2020, 06:38:34 pmThe short was dropping the USB Vbus to 3V to keep the current constant so the chip was working because it refuses to work with a 5v supply for some reason. It was just a happy coincidence.But I understand what you are saying in regards to the video. I actually just did that earlier, I found a pin tied to a daughter board that was outputting 3.3v from an external regulator and the chip needed to see that 3.3v (correction: it just needed a high signal, not 3.3v) on its pin to boot up for some reason. I gave it 4.3v and it was dropping 1v across the internal diodes (probably) so it powered up with 3.3v on the Vdd line.Not sure what you mean by"seeing data in the 3.3v supply you are reporting". There's data on the USB lines if that's what you mean as long as I boot it at 3.3v, then I can raise the voltage until 3.95v upon which it hangs. I tried to see if the voltage on the USB data lines crosses the 3.6v limit in the datasheet but the scope doesn't trigger. Max is peaks at 3.45 or 3.5v when the voltage is manually raised to 3.95v.If I try to boot it at 5v, I can't get the scope to trigger on anything past 3.25 on the data lines.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: October 16, 2020, 01:39:57 am
content: Do you see noise in whatever that +v you're measuring that follows the data signal. I'm not sure what you will see, but your signal; or at least half of it, will show up in your power if you're being powdered by data (in some way)

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 16, 2020, 06:13:33 am
content: Quote from: JustMeHere on October 16, 2020, 01:39:57 amNo it's clean. I am powering it from the bench power supply now for testing. It boots under 3.4v and then I can raise it to 3.95v when it hangs, but I can't straight up boot it at anything above 3.4v.I am reading 3.3v some initial traffic on the usb data lines when I boot it at 5v so the regulator works and the device attempts to communicate with the host but then it fails to enumerate. I don't know enough about the USB protocol to identify if there is a timing or voltage issue on the data lines. The datasheet on the soc says that max/min on the data lines is 3.6v/-03.v but I can't get the scope to trigger on any such values. There is an errata on the datasheet about the d+ line getting pulled low for 15-20us when the 3.3v regulator kicks in but I can only get a 1us drop and the voltage is nowhere near -0.3v.Right now I took a cheap and noisy 3.3v external regulator and hooked it up to the USB cable, the board works (power by the usb bus, no external psu). There's lots of noise from the inductor on the 3.3v board but it works. So it's quite tolerant of noise. It just doesn't like being booted at anything above 3.4v.The whole thing is weird, I'm trying to understand why it lets me raise the V manually to 3.95V but it doesn't want to start with that voltage? Maybe an internal diode is misbehaving, 3.95-0.6v (typical forward voltage drop) is 3.35v which might have something to do with the internal 3.3v regulator.

author: magic
author_rank: Super Contributor
timestamp: October 16, 2020, 06:34:46 am
content: Does D+/D- voltage rise as you increase VCC? Maybe it has two modes, with the internal regulator active or bypassed, and it only works in bypassed mode (3V supply) for whatever stupid reason. Dunno, just guessing.It is extremely unlikely to ever output more than VCC or less than GND, but look for pulses down to GND or almost GND.Do you have a Linux system at hand? What appears in dmesg when it fails?

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 16, 2020, 06:52:20 am
content: Quote from: magic on October 16, 2020, 06:34:46 amIt rises to around 3.4v with Vdd at 3.95v but only when I manually increase the voltage after I have booted it at 3.3v. But If I start it at anything above 3.4v (so it hangs), the data line are 3.25v-3.3v for the brief initial traffic (it's trying to communicate with the host but then fails to enumerate).Yes you are right it does have two modes, the internal regulator is bypassed when the voltage is <=3.3v. That was also my intitial thought, that the internal regulator has failed but I can see brief 3.3v traffic at 5v. Maybe it turns on for a little while and then crashes.I could trigger on some 1us pulses slightly below ground on the d+ line. But I could trigger on those also during normal operation (at 3.3v supply) so it's not exclusive to when the chip is powered by 5v.No linux but I was thinking of installing a windows usb analyser to see the traffic. Worth a shot but not too optimistic.

author: magic
author_rank: Super Contributor
timestamp: October 16, 2020, 07:08:16 am
content: Quote from: Ctrlocti on October 16, 2020, 06:52:20 amIf it's full-speed USB then it is normal for data bits to make D+ or D- zero and if there is noise on GND some may possibly reach a few mV below zero.Quote from: Ctrlocti on October 16, 2020, 06:52:20 amThat will do. The point is just to know which point it fails at and whether it always fails at some specific point or randomly.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 16, 2020, 07:35:49 am
content: Quote from: magic on October 16, 2020, 07:08:16 amYeah even to my untrained eye it didn't look like a fault.I'll see what I get out of the usbanalyser.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 16, 2020, 10:16:15 am
content: As expected, not much to see. Unexpected removal, consistently.At this point I think I'm done. I'll run it with the external 3.3v regulator until I receive the replacement board. Maybe I'll compare the two boards with the scope, see if they behave differently in any measurable way. If the new board dies again at a later stage, I'll probably roll my own board with a different controller. Shouldn't be too hard except for some melexis MLX90333 Position Sensors, those might be a bitch to get to interface correctly with a new mcu.