cancel
Showing results for 
Search instead for 
Did you mean: 

Reading non zero value on HAL_ADC_GetValue when input is connected to ground STM32G030F6P6.

SMali.4
Associate II

Hello,

    I am working on STM32G030F6P6 microcontroller. PA0 pin is configured as analog input, 12 bit resolution. I am reading non zero values when PA0 pin is connected to ground. I tried on 3 different microcontrollers but each microcontroller ADC values are different from each other (eg. 145,  165). 

   Power supply to microcontroller is connected through 3.3V linear voltage regulator, also 100nf capacitor is added close to the microcontroller power pins.

   What should I do? Please help with the same.

thanks,
siddharth.

1 ACCEPTED SOLUTION

Accepted Solutions
STOne-32
ST Employee

Dear @SMali.4 ,

it seems you have a ground noise to minimize and ensure offset calibration is done at startup of the ADC. Here is our Generic Application Note on how to get best from Our ADCs https://www.st.com/resource/en/application_note/an2834-how-to-get-the-best-adc-accuracy-in-stm32-microcontrollers-stmicroelectronics.pdf#page23

Ciao

STOne-32

View solution in original post

1 REPLY 1
STOne-32
ST Employee

Dear @SMali.4 ,

it seems you have a ground noise to minimize and ensure offset calibration is done at startup of the ADC. Here is our Generic Application Note on how to get best from Our ADCs https://www.st.com/resource/en/application_note/an2834-how-to-get-the-best-adc-accuracy-in-stm32-microcontrollers-stmicroelectronics.pdf#page23

Ciao

STOne-32