2023-11-11 09:39 AM
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
2023-11-11 10:13 AM
Dear @TOsso.1 ,
you can be inspired by this example code and then customize it for this MCU and board
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