Skip to main content
Associate II
July 31, 2024
Solved

NUCLEO-H563ZI ADC linearity

  • July 31, 2024
  • 1 reply
  • 1679 views

I want to use my ADC of NUCLEO-H563ZI, but there is a problem with my ADC. ADC output does not match to input voltage. Test results are as fallows.

shlee_0-1722390211604.png

I am using ADC2 IN1, IN2, IN3, IN5, IN6, all singled ended. And I am using 25MHz HSE OSC of NUCLEO-H563ZI instead of ST-LINK 8MHz output, and disabled ICACHE. 

Is there a problem with my ADC/Clock configuration settings?

shlee_1-1722390498570.png

shlee_2-1722392112394.png

shlee_3-1722392143557.png

Best answer by TDK

The ADC needs to be calibrated on every startup before it is used. Are you doing that?

Sampling time generally has the largest impact. Use the longest sampling time for the highest accuracy on a DC signal.

Lots of other factors go into ADC accuracy. This application notes talks about many of them:

cd00211314-how-to-get-the-best-adc-accuracy-in-stm32-microcontrollers-stmicroelectronics.pdf

1 reply

TDK
TDKBest answer
Super User
July 31, 2024

The ADC needs to be calibrated on every startup before it is used. Are you doing that?

Sampling time generally has the largest impact. Use the longest sampling time for the highest accuracy on a DC signal.

Lots of other factors go into ADC accuracy. This application notes talks about many of them:

cd00211314-how-to-get-the-best-adc-accuracy-in-stm32-microcontrollers-stmicroelectronics.pdf

"If you feel a post has answered your question, please click ""Accept as Solution""."
sh.leeAuthor
Associate II
July 31, 2024

I am using ADC as below, to calibration my ADC before ADC Start.

shlee_0-1722399547083.png

Is this a normal way to use it? It seems that HAL_ADCEx_Calibration_Start() doesn't work.

TDK
Super User
July 31, 2024

Probably a test setup issue. How are you applying these voltages exactly? What is your ADC sampling time? If you directly tie an ADC input pin to GND on the board, what value do you get?

 

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