cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H563ZITx series ADC conversion-Reg

MADHESHWARAN_S
Associate II

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!

1 ACCEPTED SOLUTION

Accepted Solutions
AScha.3
Chief II

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 "Accept as Solution".

View solution in original post

2 REPLIES 2
AScha.3
Chief II

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 "Accept as Solution".
TDK
Guru

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".