STM32 gotchas
134. Internal VREFBUF reference not available in lower-pin-count packages

Reference voltage to the ADC1 in STM32 comes from a dedicated VREF+ pin2. Users are expected to provide a stable and clean reference voltage to this pin from some external source.

In newer STM32 families (starting with 'L44), there's an optional internal reference voltage source, VREFBUF3, which can typically provide two output voltages, nominally 2.048V and 2.5V5 (provided VDDA is high enough).

If VREFBUF is enabled, its output is connected directly to VREF+, internally.

In most (although not all) STM32 models in smaller packages (typically below 64 pins), VREF+ is internally bonded to VDDA, to allow for more GPIO pins. In such models, of course, VREFBUF output would clash with VDDA, so it is not allowed to switch it on, effectively making it unavailable.

1. ... and some other analog-related functions...

2. This has also a counterpart, VREF-. However, this pin is expected to be at VSSA (analog ground) potential all the time, and in all but the largest packages it is indeed internally bonded to VSSA.

3. Not to be confused with VREFINT reference source, which is present in all STM32, connected internally to one of the ADC input multiplexer's inputs. VREFINT thus provides only an indirect reference in case that VREF+ voltage is relatively stable but unknown (e.g. coming from a battery).

4. Not all newer models have VREFBUF, e.g. some Value Line models (i.e. those with primary marking ending with 0) don't. Check your STM32 model's Datasheet.

5. Newer STM32 families/models provide additional/different voltage levels, e.g. 1.5V and 1.8V. Check VREFBUF characteristics section in your particular STM32 model's Datasheet.