cancel
Showing results for 
Search instead for 
Did you mean: 

Weird ADC failure STM32F091, any ideas

We've been building a PCB with four STM32F091s on each PCB and we've built about 50 units by now (over about 3 years). I have now seen three PCBs where the ADC readings are 'bad' on two of the four micros. By 'bad' I mean conversion values are 30% ish low.

With the design having been stable for quite a while, the chances of uncovering a new bug seem slim, but chip damage seems even more unlikely. The fault also 'went away' on one of the PCBs, so more evidence that it's not damage.

The ADC reference is VDD 3.3V on all the chips, and they all run the same code.

Anyone got any thoughts?

1 ACCEPTED SOLUTION

Accepted Solutions

I really appreciate the help I've had on this problem, so thanks to you all.

So what was the problem down to? Why were so many micros working before this problem started to appear?

Mechanical stress! The boards are bolted to a heatsink, so there's a thermal pad under most of it. Recently a thicker pad was being fitted and where the PCB overhangs the pad (not ideal with hindsight), pulling down the bolts was bowing the PCB. The chips don't like it!

View solution in original post

41 REPLIES 41

Boards running continuously/long-term? If yes, does the "self-healing" relate to reset? Possible temperature excurses?

The ADC has calibration for a reason.

JW

The boards haven't had much running, and work at office temperatures. The one that came back did so after a power cycle, not just a reset.

ONadr.1
Senior III

I would try replacing the mcu with a new one. This would show whether the problem is in the MCu or in the external measuring channel. It would also be good to check if the MCu's internal measurement channel and the calibration of the converter (against the internal reference source and zeroing) are set correctly.

Hard to get the MCUs at the moment and not sure that would prove. I'm measuring the ADC input voltage at the MCU pin, so there's no external measurement channel involved.

Measuring the internal reference should throw some light on the problem but will involve significant code changes, which might in turn affect the problem. Ideally I'd like to know the meaning of the calibration register values so I can sanity check them, but I didn't find any description of their contents.

Now waiting for the next faulty board to cross my desk.

> Ideally I'd like to know the meaning of the calibration register values

IMO in 'F0 you don't have the calibration register available to the user, i.e. it's internal.

According to the Calibration subchapter of ADC chapter of RM0091:

Calibration should be performed before starting A/D conversion. It removes the offset error

which may vary from chip to chip due to process variation.

According to RM0091 ADC_DR description:

Just after a calibration is complete, DATA[6:0] contains the calibration factor.

JW

Nothing is making much sense :unamused_face:. The DR calibration results are 0, 1, 3 and 63 (-1 perhaps), but so what! If I include the measurement of the internal reference and use that to calculate the ADC VCC reference voltages I get 2.748V, 2.776V, 2.760V and 2.491V, all a long way off my actual 3.3V.

S.Ma
Principal

You could check what happens if the sample and hold time for a conversion is changed significantly.

Also, measuring Vref voltage will tell you the Vdd. You could put by SW a range detection every 10 minutes to make sure there is no drift.

ONadr.1
Senior III

If the measurement results are unstable like this, I would look at the quality of the supply voltage (ripple, interference)

Measurements are completely stable (+/- a few counts) just wrong by 30%. ADC reference is 3.3V VCC, which looks very nice, LDO regulated.