STM32 ADC reference voltage
If your reference voltage is 2.5V, and you supply 2.5V to an input then your ADC (assuming 16-bit resolution and single-ended measurement against GND) should return exactly 65535, so the range is limited by the reference voltage.

There is at least one "trick". For example you can measure Vdd (eg. to figure out the battery voltage the MCU is running from) - you configure the ADC to use AVDD as the reference and measure internal bandgap reference against it.