2025-11-24 8:27 AM
__LL_ADC_CALC_VREFANALOG_VOLTAGE macro presumes that VREFINT calibration value is from a 16-bit ADC. However, for STM32H723, the value I see (1522) is from 12-bit ADC conversion. So this macro returns incorrect value. On STM32H747, it works as expected (the value is 24074 which corresponds to 16-bit ADC value). I have not found any information about conversion width in the reference manual nor in the datasheet.
#define __LL_ADC_CALC_VREFANALOG_VOLTAGE(__VREFINT_ADC_DATA__,\
__ADC_RESOLUTION__) \
(((uint32_t)(*VREFINT_CAL_ADDR) * VREFINT_CAL_VREF) \
/ __LL_ADC_CONVERT_DATA_RESOLUTION((__VREFINT_ADC_DATA__), \
(__ADC_RESOLUTION__), \
LL_ADC_RESOLUTION_16B) \
)
Solved! Go to Solution.
2025-11-24 8:36 AM
2025-11-24 8:36 AM
2025-11-24 8:46 AM
Thanks, missed this.