stm32f4xx-hal
stm32f4xx-hal copied to clipboard
ADC sample conversion and calibration interface loses resolution
The ADC field calibrated_vdda and the functions sample_to_millivolts,make_sample_to_millivolts and reference_voltage + their configuration counterparts use millivolts as unit of measurement.
While the VREF+ of the STM32F4xx CPUs is in the range of 1.8-3.3V, the maximum ADC resolution is 12 bits with 4096 possible steps. Therefore in 12 bit mode we lose 1-2 bits in resolution through the conversion and calibration API.