2020-05-25 06:13 AM
Hello everyone,
im currently working on a custom pcb which uses the STM32L031K6 and im having some troubles with it.
Ive attatched the schematic and some oscilloscope measurements.
Fault description:
-random signals and floating voltage levels on various I/O pins
-fault occurence ranges from minutes to hours
-3rd board revision, changed several periphal ICs, same error pattern
-errors seems to occur at random, even when the board is in idle (no h bridge switching)
Board I/O:
-rs232 via uart (MAX3250)
-12bit dac via i2c (MCP4725)
-16bit adc via spi (INA240+ ADS8864)
-3 digouts for h bridge control (no pwm, just steady state enable/disable)
-1 digout for current control ic (drv110), gives static enable signal (drv110 drives h-bridge low side switch via pwm)
-2 digouts for led
-1 internal 12bit adc
Supply:
-24V lab supply behind transformer
Debug probe:
-Segger J link edu mini via usb isolator
Things ive tried:
-closely observed 3v3 supply, seems clean, no overvoltage during start up or sudden shut downs, tried several different switching controllers on each board revision, all seemed fine to me
-tried several compilers, eclipse, keil & atollic, projection creation & µC initialisation via cubemx, created projects with "normal code" (which seems to run decent on some board revisions), and some with no functional code with setting all digouts to zero
-tried all combinations for digouts & alternate functions, pushpull, open drain, /w & w/o pullup/pulldowns
-replaced µC numerous times, all seem to get faulty after a while (perhaps faulty batch/damage during storage?)
-obviously the i/o ports seemed to get damaged, but why several at the same time?
Appreciate any help from you guys.
Kind regards
2020-05-25 11:29 PM
2020-05-25 11:36 PM
I know the FDMQ8205A in this case maybe is a bit off-use, but it looked like an ordinary h-bridge to me. (however oddly small package for 8 amps) I got it running to about 3amps and the case got barely over 40°C
On each board revision i tried out a different power stages.
-DRV103, internal low side MOSFET - worked fine
-DRV110 with an external low side MOSFET and shunt voltage sense/current control - worked fine
-H-Bridge with FDMQ8205A & DRV110 (current revision) - also works
2020-05-26 12:29 AM
2020-05-26 01:24 AM
As long as you are comfortable that the programmer you are using is able to drive a 100nF capacitor easily, since I assume the programmer is connected to nRST too. Otherwise a 1k in series with the reset capacitor will assist there. I agree though, this would only affect the ability to program, nothing to do with the problems you were experiencing. I have found on the L4 that it was easy to damage the processor through the programming cable, by getting the wiring wrong (in our case we used a 6-pin connector, and inserting it 180 degrees flipped would cause the damage). Symptoms of damage were minor, just an increase from 2uA (normal) to 4 or 5uA in the current consumption. However, this value usually increased over time. In one case the unit failed 3 months (and half a continent away) later, with processor still running, but drawing excessive current, flattening the battery very rapidly. It sounded like some sort of latchup.
2020-05-26 01:30 AM
Ive checked the pinout of the debug connector numerous times. Although its prone to flipping the connector 180°, doing so would result being not able to flash/program/debug at all (and im pretty sure i didnt flipped it in between). So i would say the damage isnt coming from this direction.
But ill add a footprint for an optional series resistor just in case, thanks. Wouldnt have thought that the debugger actually has to supply the current for the cap at the reset pin.
2020-05-26 01:43 AM
I had another look at the waveforms you showed on UART RX, and they still don't make any sense to me. Either the GND reference was periodically coming adrift (scope GND?) or the pin is not being driven properly, or there's a break in the GND / 3V3 in the PCB somewhere. I'd also have a look at what equipment and power supplies are grounded or AC coupled to GND. The other possibility is some sort of I/O conflict - i.e. the line isn't floating because it's not driven, but is fighting another driving source. If you see those waveforms again, try and have a look how "stiff" the signal is to find out which of those it is. I usually tap it with my finger to inject a weak 50Hz signal.
2020-05-26 01:58 AM
I agree with you about being able to toggle all pins, seems to imply no permanent damage to the output circuitry, however, silicon doesn't always blow cleanly. It can be possible to blow the transistor that drives low, but not the one that drives high, in an output, or vice versa, or to create a resistive leakage path through silicon. And you can damage the input and not the output circuitry in a pin, of course, or vice versa.
2020-05-26 02:10 AM
The first thing that came to mind when i saw those waveforms is that theres some I/O conflict, i.e. µC pin functions conflicting with each other.
On a freshly fitted board, UART RX & TX both work fine.
Just to make sure, ive disconnected the RS232 transciever completely from the µC via desoldering some stuff. (R32, R35 & Q5)
On its own in idle mode, the MAX3250 is floating at 3V3 at RX on pin 2 (R1out) like its supposed to. (correct me if im wrong)
Then i tried to directly connect MAX3250 Pin 2 and the µC UART RX Pin directly via wire (following the datasheet) and i also got those glitches which can been seen in the uploaded waveforms. Which to me points to a damaged or conflicted µC-pin or rather a completely fried internal I/O Port.
2020-05-26 02:21 AM
What did the micro pin do when you disconnected the MAX chip from the UART? did it float or did it jump to some voltage? It should float (or be weakly pulled up, if you've enabled that)? You may have a short to another pin somewhere, of course, but you've probably looked for that already. And it can't be a stray solder ball because you've already replaced the micro a few times. Or e.g. Q5 might be the wrong part (assembly houses do make mistakes sometimes).
My question is, if the pin is damaged or conflicted, what is driving the waveforms? It must be a conflict with another pin or source, either within the micro or outside.
2020-05-26 02:29 AM
RX pin is floating steady on its own at 1,45V. Nothing seems to be driving it to Vdd or GND. So my suspicion is that theres an internal short inside the whole I/O Port Bank to an internal clock signal or some other internal signal