Skip to main content
Associate
February 11, 2024
Solved

STM32H563ZITx series ADC conversion-Reg

  • February 11, 2024
  • 2 replies
  • 2450 views

Tried implementing ADC conversion on STM32H563ZI Nucleo board. But, getting only a constant value like 66,67,68,69 in serial monitor(Tera term) irrespective of the given input even the i/p is unplugged getting the same values. Need a help to fix this. Thanks in advance!

This topic has been closed for replies.
Best answer by AScha.3

Did you set the sequence for ADC1 in Cube (even if regular conversion -> only one "rank" ) ?

ie :

AScha3_0-1707660551724.png

 

 

+

first need calibrate the adc , to get good precision, use :  HAL_ADCEx_Calibration_Start(..);

2 replies

AScha.3
AScha.3Best answer
Super User
February 11, 2024

Did you set the sequence for ADC1 in Cube (even if regular conversion -> only one "rank" ) ?

ie :

AScha3_0-1707660551724.png

 

 

+

first need calibrate the adc , to get good precision, use :  HAL_ADCEx_Calibration_Start(..);

If you feel a post has answered your question, please click on " Best Answer ".
TDK
February 11, 2024

PA4 (ADC1_IN18) is VBUS_SENSE on that board, unless you disconnect it by removing SB56.

> sConfig.SamplingTime = ADC_SAMPLETIME_2CYCLES_5;

Probably insufficient sampling time for most application.

Calibration is required before using the ADC.

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