Skip to main content
Graduate II
November 24, 2025
Solved

Incorrect calculation of __LL_ADC_CALC_VREFANALOG_VOLTAGE on STM32H723

  • November 24, 2025
  • 2 replies
  • 141 views

__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) \
 )
    This topic has been closed for replies.
    Best answer by Issamos

    Hello @heveskar 

    This is a known issue reported internally by an ST employee (post available here). It should be solved on the future.

    Best Regards.

    II

    2 replies

    IssamosAnswer
    Graduate II
    November 24, 2025

    Hello @heveskar 

    This is a known issue reported internally by an ST employee (post available here). It should be solved on the future.

    Best Regards.

    II

    heveskarAuthor
    Graduate II
    November 24, 2025

    Thanks, missed this.