cancel
Showing results for 
Search instead for 
Did you mean: 

Getting wrong value from ADC - STM32G431KBT6

Pedro Oliveira
Associate II

Hi everyone,

I'm getting weird values from ADC in a new board that I developed. It looks like it has an offset on it, but a big one.

The analog signals arriving in the pins are ok. I tested with a scope. To make sure there was nothing wrong with the analog signals I read the Vrefint value, it also presents an estrange reading.

The Vrefint value that I get from my board is around 2700. I tried the same code in a NUCLEO board using the same microcontroller (STM32G431HKBT6) and the value that I get is 1500 (what I think is the correct value).

The only difference that I see between my board and the NUCLEO board is the VDDA. While on my board the VDDA is supplied by a different voltage regulator (3.3V). In the NUCLEO board, the VDDA and VDD are almost the same. 

The voltage between VSS and VSSA is not bigger than 20mV. They are linked by a 10uH inductor.

4 REPLIES 4
TDK
Guru

VSSA and VSS should be tied directly, don’t think I’ve seen them separated by an inductor on any schematic. Shorting those would be a good test.

what is VDD? Probably 3.3V. Does VDDA have enough capacitance?

Schematic would be informative.

If you feel a post has answered your question, please click "Accept as Solution".
Pedro Oliveira
Associate II

I've already shorted the VSS and VSSA. The problem persisted.

Here is the supply schematic, I separated the Digital and Analog supplies by a filter. 0693W00000JMmuWQAT.png0693W00000JMmu2QAD.png

It turned out to be a poor soldering problem.

Thanks, TDK.

Do you perform calibration, as outlined in RM?

Read also the Errata, especially Wrong ADC result if conversion done late after calibration or previous conversion.

You may also want to read AN5346.

JW