2026-02-20 12:57 PM
Hi,
I am making updates to a custom PCB where I would like to add ADC functionality. My board is powered by batteries and I expect the supply voltage to fluctuate slightly and I need the ADC conversions to be accurate. The reference manual says I can use the internal Vrefint to calculate what the value of VDDA/VREF+ so that I may calculate my conversions with better accuracy. Additionally, I wanted to follow this guide (https://community.st.com/t5/stm32-mcus/how-to-use-the-stm32-adc-s-internal-reference-voltage/ta-p/621425) to understand how I may implement this in firmware.
The issue I see now is that on the chip's datasheet it mentions that Vrefint is internally connected to ADC1_IN0, however, ADC1_IN0 has no pinout on this package of the chip. Furthermore, in STM32CubeMX the ADC1_IN0 channel is not able to be selected (although Vrefint channel is able to be selected).
Now I have some confusion since the datasheet mentions the internal connection. Maybe this package does not have this available? But STM32CubeMX allows me to select the Vrefint channel still, so I may not understand something.
Is there some way I may achieve ADC accuracy with some other method? Or perhaps I am missing some information?
Please let me know if anyone may be able to help me understand this better.
Thank you,
Kaitlyn
Solved! Go to Solution.
2026-02-20 1:27 PM
VREFINT is an internal net. It is not exposed on a pin.
In STM32CubeMX, the Vrefint channel is the ADC1_IN0 channel. It's available on all packages.
2026-02-20 1:27 PM
VREFINT is an internal net. It is not exposed on a pin.
In STM32CubeMX, the Vrefint channel is the ADC1_IN0 channel. It's available on all packages.
2026-02-20 2:06 PM
Thank you for your clarification. I had known Vrefint was internally connected, but I had assumed that the channel would need to at least be enabled or have a pinout. I see this is different from other chips like the one used in the guide.
I understand now.
Thank you,
Kaitlyn
2026-02-20 2:15 PM - edited 2026-02-20 2:16 PM
The guide enables two channels: channel 0 and VREFINT. They are independent. On that chip, channel 0 is not VREFINT.
The VREFINT channel is never exposed on a pin. It is always internal-only.
2026-02-20 2:21 PM
I see now that I was still confused. Thank you for the extra clarification.