STM32 gotchas
152.Internal temperature sensor returned unexpected value (troubleshooting guide)

ADC in STM32 features a temperature sensor on one of its inputs. This is a circuit, which generates voltage linearly proportional to the internal temperature of the chip. Users often test this as this is a relatively convenient test to try the ADC; however, sometimes the results are confusing.

Here are some guidelines how to achieve correct result from temperature sensor: