STM32H743 reading internal reference voltage
I want to read the internal reference voltage to calibrate the ADC on a Nucleo H743ZI. I can read the clock backup battery voltage and the temperature perfectly (ADC3) and I get a value when reading the reference (also ADC3) so I think the code is correct but I always get a value of about 1.22 volts (scaling by 3.3). I've tried all combinations of setting up the reference voltage.
HAL_SYSCFG_DisableVREFBUF();
HAL_SYSCFG_EnableVREFBUF();
HAL_SYSCFG_VREFBUF_HighImpedanceConfig(); HAL_SYSCFG_VREFBUF_VoltageScalingConfig();I assume the buffer shouldn't be enabled as that would be driving the reference voltage against the input to VREF+ which is wired to 3.3V on the Nucleo.
Any ideas appreciated.
#stm32h7