Please help troubleshooting a Cypress PSOC1 board - Page 1
Forum section: electronics / projects

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 13, 2020, 07:37:21 am
content: HiThis is a continuation of this threadhttps://www.eevblog.com/forum/beginners/weird-issue-usb-controller-(soc)-works-only-when-v-is-shorted-to-gnd/To summarize, I am troubleshooting a USB peripheral device which is bus powered (no external powersupply) which recently stopped being recognised by Windows (Device Descriptor Failed). The board is controlled by a Cypress SOC - CY8C24894.However, the device works if it's powered up with a voltage in the range of 2.92 - 3.3V. If booted in this voltage range, the voltage can then be increased up to 3.96V but after that point the SOC stops working and traffic on the USB D+/D- lines ceases shortly thereafter. It cannot however be recognised if booted at a voltage greater than around 3.30V.The USB data signals do remain regulated at 6Mhz 3.26v per line, even with VDD up to 3.96V so the internal regulator of the SOC does seem to function. Moreover, even if we boot at 5V there is some initial traffic on the USB lines at 3.26v.I have gone through a lot of the documentation and specifically the errata in the datasheethttps://www.cypress.com/file/140926/downloadBut I cannot find anything that would pinpoint this failure mode. None of those faults fit with the setup where the SOC hangs when raising the Vdd manually past 3.96V.At this point I do not have many ideas of avenues to explore in order to find the issue.One possible thought I have is that for some reason a GPIO pin might be lightly shorted and as voltage increases past the 3.96V it crosses the max current source/sink threshold for pins and the SOC switches off. It does not explain however why we can power up the device at 3.3v and then manually increase the voltage to 3.96v, but not power it up with for example 3.7v. I do not have any ideas on how to measure current consumption of each pin as I can't get the DMM in series between each pin and the circuit.Another thought is that it has something to do with voltage ramp-up. We can see the PPOR and LVD values belowI'm wondering if there is something causing an unwanted system interrupt during voltage ramp-up. However, I could not detect any voltage drops during Vdd ramp-up that could cause this.Any help, suggestion or idea you can provide would be really appreciated as I am getting at the end of my wits here. I have a scope, function gen, dmm and power supply so let me know if there's anything I could measure or test that could shed some light on the issue. I don't have a logic analyser or cypress programmer so unfortunately I cannot get into the SOC to see what errors its throwing.I will continue probing as there are still some weird things going on with the board, for example there seems to be some PWM for leds at 200hz (which is on the low side but whatever), but the switching waveform is not square. like half square, half slope.

author: moffy
author_rank: Super Contributor
timestamp: October 15, 2020, 12:27:53 am
content: Investigate the LED waveforms, do the easy first then the hard. It's surprising how often the hard is fixed when the easy/obvious is tackled first. Sounds either like bad power or a progressive current overload.Is the chip getting hot to touch when working/not working?

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 15, 2020, 07:26:44 am
content: Quote from: moffy on October 15, 2020, 12:27:53 amyou are right, always start with the easy things but I tried all the easy stuff I can think ofThe thing is that the failure manifests itself with or without the leds connected. So even if the PWM is funky, it wouldn't create an overcurrent situation since there is no load. If the chip is monitoring the PWM and switches off if it goes out of spec regardless of load, I don't know what the spec is. The frequency does not change with the increase of voltage so it's not as simple as that unfortunately and there are no voltage spikes/drops that I can see when crossing the 3.95v threshold. Obviously if it's a 1mv spike for 1ns I'm never going to tell it apart from noise. I'm exaggerating but you get the idea.The PWM is weird and is created by the specific FET and RC topology they have used. There seems to be a clock coming from the SOC which is switching the FETs and the caps are slewing the falling edge. So it's not a true square hi-low. I can change the waveform by inserting different capacitors in parallel. The SOC doesn't care, the LEDs apparent intensity just changes due the PWM waveform changing. I will investigate further and post scope picsThere is a reverse biased diode to ground though which gives me 1.6v reverse voltage on the DMM, so that would indicate that it's busted but I can't get it to conduct with 5v reverse voltage from the PSU. The marking on the chip is 5H which as far as I know is a normal silicon switching diode, not a 1.6v zener. Forward voltage is 0.6 on the DMM so it looks standard silicon 1n4148 equivalent. Maybe I should take it off the pcb to check it.The chip is cool like a fool in a swimming pool.But I do agree that if it's not a firmware or an internal chip malfunction, then an overcurrent at 5v is the most logical explanation. But it doesn't explain why I can boot it at 3.3v and then raise it to 3.95v, but I can't boot it above approx. 3.40v. Why does raising the voltage after boot up make a difference?If it's an overcurrent on any of GPIO pins, then I have no idea how to measure that in series. It's a 56qfn chip, I would need to lift it off the board and put it on a breakout board, then insert the DMM in series between the pins and the pads on the main pcb. Nightmare.

author: moffy
author_rank: Super Contributor
timestamp: October 15, 2020, 07:37:29 am
content: Remove the diode, replace it. If it's not hot then it doesn't sound like too much current it sounds more like a bad connection on the supply. Are the FETs external to the PSOC, if so then more concerned about the driving waveform.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 15, 2020, 08:22:16 am
content: Quote from: moffy on October 15, 2020, 07:37:29 amI'll try replacing the diode but I did put 5v on the cathode and gnd on the anode, straight from the PSU, no current flows. DMM shows 1.6v reverse breakdown, resistance is in the kohm range.Nothing is hot on the board.Yes external to the SOC but on the same motherboard, what looks like 3 FETs, one of them could be a BJT (was having trouble finding the marking codes), some sort of inverting amplifier configuration. It's been a few days since I was focusing on them so I don't remember exactly. I'll post a pic of the board and from the scope.Thank you assisting

author: moffy
author_rank: Super Contributor
timestamp: October 15, 2020, 11:19:58 pm
content: Any chance of some sort of schematic? It sounds like you are working blind, a difficult situation to be in. Have you tried bypassing the on board regulator and supplying appropriate power directly from a power supply?Was there any event that preceded the device failure, like a power surge/spike etc.? Might give a clue what to look for.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 16, 2020, 06:19:25 am
content: Quote from: moffy on October 15, 2020, 07:37:29 amNo go, same behavior without the diode or with a replacement diode.The FETs are also not helping. I can change the PWM waveform by inserting caps/resistors but it doesn't care. I injected a 200hz square to simulate the clock coming from the soc, they work happily and the LEDs are powered. I can pull the clk pin high or low, SOC doesn't care. The only thing of notice is that the SOC disconnects if I short the final stage of the PWM output to ground. But it reconnects as soon as I unshort it.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 16, 2020, 06:31:06 am
content: Quote from: moffy on October 15, 2020, 11:19:58 pmDoubt the manufacturer will send me one. They know they messed something up with the design but they don't care since they can just sell replacement boards for 60euro. When they send me one I'll compare the two and see if we get anywhere. I mean I can ask for one but at the rate they respond to emails (week-10days for a reply) it might take a month just for them to tell me no sorry.Yes, the board is powered now from an external power supply for testing. I can boot it below 3.4v and raise the voltage manually to 3.95v, after that it hangs. BUt I cannot boot it from anything above 3.4v.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 failure (as documented by other users of the device and on the advice of the manufacturer) is usually attributed to plugging/unplugging the device while the host PC is on, or restarting the host pc with it attached, or a sudden loss of power. It's all BS if you ask me. If a usb device cannot handle being hotplugged or the host being rebooted, it's a failure of the design.It's definitely power related and the damage is probably internal to the SOC unfortunately. 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.Like you said, I'm working blind and without a programming unit the SOC is a black box. I think it's a dead-end to be frank, just gonna run it on the external 3.3v regulator for now and once the replacement board comes in I'll compare the two under the scope (which most likely will also be futile).

author: moffy
author_rank: Super Contributor
timestamp: October 17, 2020, 02:43:08 am
content: Sounds like good advice just to run it from the 3.3v regulator. Yes, and a USB device should be hot plugable/unplugable by design. If there is a dv/dt component to the failure, a number of devices can be triggered e.g. a parasitic SCR.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 17, 2020, 06:58:50 am
content: Quote from: moffy on October 17, 2020, 02:43:08 amYeah, it's not a real fix as we are only treating the symptoms rather than the cause but a man needs to know when he is beat and throw in the towel. I'm done with it, it's off the bench and running with the external 3.3v regulator. It was a hell of a bodge job, the manufacturer soldered the USB wires straight to the pcb holes with hot glue for immobilisation (not a lot of wire on those usb data lines, they rip off the joint with a gentle tug), I decided to put male headers on the pcb and and femle sockets for the usb wires but there is literally no space so it's pretty nasty and jammed up in there right now. Retrospectively I should have just done what the manufacturer did and solder the wires to the pcb with hot glue but that's so lame. Not my finest work by far, but it's only supposed to work until the replacement comes.It does very much look like a latch up event due to an internal failure. They did put ferrite beads and bypass capacitors but there is not a single tvs diode to be seen, despite the board having been designed with them in mind (silkscreen and pads are there, just unpopulated).I'm thinking once I get the new board I can make a new thread where we can discuss how to "enhance" the design. Might be fun.

author: moffy
author_rank: Super Contributor
timestamp: October 18, 2020, 04:25:07 am
content: Sounds like an idea. The lack of TVS devices, especially on the USB is very suspicious. Can't remember seeing a schematic without them.

author: Ctrlocti
author_rank: Regular Contributor
timestamp: October 18, 2020, 08:07:09 am
content: Quote from: moffy on October 18, 2020, 04:25:07 amoh whoever designed the board definitely made provisions for them (and for more bypass caps) but they were cut during production. the silkscreen and pads are there just unpopulated.they did keep the ferrite beads on every line going to the chip's inputs though (connected to physical toggle switches), I guess for debouncing the switches and blocking noise/errant signals from the actuation motion.I suspect the chip's internal diodes got hit repeatedly due to the lack of tvs and it failed in this manner. might have been capacitive coupling or literally anything else, I don't think we will ever know.