cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-H723ZG ADC Accuracy Problem

TOsso.1
Associate II

Hey

I have a few question about working with the ADC on NUCLEO-H723ZG (The mcu is STM32H7237ZG)

1.I try to work with the ADC, I saw some example in the internet and I tried to use this examples.

This is the function that I tried:

HAL_ADC_Start(&hadc1); // start the adc

x = HAL_ADC_GetValue(&hadc1); // get the adc value

I try to measure 2.2V DC but I get Value of 2.3 and I tried another voltage and I get big Accuracy error.

The error is not constant and and it varies from measurement to measurement.

I try to use the HAL_ADCEx_Calibration_Start function but this is not help me.

2. I tryed to create a few measurment like:

x = HAL_ADC_GetValue(&hadc1); // get the adc value

x = HAL_ADC_GetValue(&hadc1); // get the adc value

x = HAL_ADC_GetValue(&hadc1); // get the adc value

and I change the DC voltage that I sampled but the X value did't change.

3.I want to work with few channels from ADC1 but I did't find simple implamantion of the code. Every time I have to change the channel and only then sample? I need to use every time with HAL_ADC_ConfigChannel function?

Thank you very much

 

1 REPLY 1
STOne-32
ST Employee

Dear @TOsso.1 ,

you can be inspired by this example code and then customize it for this MCU and board 

https://github.com/STMicroelectronics/STM32CubeH7/blob/master/Projects/NUCLEO-H743ZI/Examples/ADC/ADC_RegularConversion_Polling/Src/main.c

regarding the accuracy error , try first to measure the VSS/ ground on your selected channel to see the quality of the ground noise on this hardware .

hope it helps you .

STOne-32