STM32 gotchas
208. Strange ADC readings on some ('L4+) Disco boards (due to VREF+ not powered in anticipation of using internal VREFBUF)

On the 32L496GDISCOVERY and 32L4R9IDISCOVERY boards, when trying to take ADC conversions, results may be surprising (as noted e.g. by user kvresto).

Reason is, that on these board, by default, VREF+ pin of mcu is connected only to capacitors. There are pads for serial resistors which would connect VREF+ to the VDDA source, but they are unpopulated on these boards. This is done probably in anticipation that users would prefer using the internal VREFBUF reference, which was a new feature on these models as compared to the older STM32 and even older 'L4; however, VREFBUF is switched off after reset, so it needs to be switched on before using ADC (or the serial resistor would need to be populated, or external VREF source would need to be connected on the respective connector pin).

This all is properly documented in their respective User Manuals.

There may be other boards with this surprising default configuration, but from a cursory check it appears, that the newer DISCOs ('L5, 'U5) tend to have VREF+ pin (marked there also somewhat confusingly as VREFP) connected through solder bridges to VDDA. This is the case also on related Nucleo64 boards (also for 'L4); while Nucleo144 boards appear to have VREF+ simply tied together with VDDA to the common VDD power supply.

Corollary is, before using ADC on Disco boards, double-check, how VREF+ pin is connected exactly.