cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H723ZG reading vref problem

Enes1
Associate

Hello, i am trying to read internal temperature and vref values from ADC3. I shared ADC3 ioc settings.

iocADc.PNG

 

ADC clock mux freq is 96MHz and sampling time is set to ADC3_SAMPLETIME_247CYCLES_5.

On init routine calibration line as below :

HAL_ADCEx_Calibration_Start(&hadc3, ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED);

 

When i am trying to read internal temperature with :

*result = __HAL_ADC_CALC_TEMPERATURE(TEMPSENSOR_CAL_VREFANALOG, adcResult, ADC_RESOLUTION_12B);

everthing is fine with roughly 44.5 degrees. But reading vref is not working properly.

*result = __HAL_ADC_CALC_VREFANALOG_VOLTAGE(adcResult,ADC_RESOLUTION_12B);

This code returns 206mV.

0 REPLIES 0