Temperature of the internal temperature sensor
Using STM32F0308C on a custom board. When I read the temperature sensor I am getting 1765 and the TS_CAL value is 1778.
Supply voltage is 3.3V, VREF_INT is 1524 and I am reading 1525 on the internal reference. So I assume I must apply a 1524/1525 correction to the temperature reading which gives me 1777. This must correspond approximately to 29.4°C if I did the math right.
However it is very cold today (less than 20°C in the room) so my question is if the internal temperature sensor is always this higher. Processor is running at 8MHz.
Summarizing:
VDD/VDDA: 3.3V
VREF_INT: 1524
TS_CAL: 1775
Vref reading: 1525
Temp reading: 1778
Temp reading corrected: 1777
Temperature: 29.4°C
Same firmware running on a STM32F0308 discovery board gives:
VDD/VDDA: 3.0V
VREF_INT: 1531
TS_CAL: 1768
Vref reading: 1704
Temp reading: 1989
Temp reading corrected: 1787
Temperature: 26.4°C
So the question is is the temperature I get makes sense, why there is this 3°C discrepancy and if it makes sense it being several °C above the ambient temperature when the microcontroller has just been powered on.
EDIT: before anybody asks, using ADC 14MHz with the highest sampling time (~17us).
