2021-01-12 04:33 AM
Hi,
I am having problems measuring accurate temperatures with the internal temperature sensor of the STM32L011D4P7 over the full device temperature range of -40 °C to 130 °C.
What I did: Measuring the temperature as described in the Reference Manual (RM0377), Chapter 13.9 "Reading the temperature" which mentions the code example A.8.17.
There are two temperature calibration values TS_CAL1 and TS_CAL2 mentioned and used.
The two images show temperature measurements I did in a climatic chamber. The STM32 internal measurement (purple) is done as described above. Two external temperature sensors (green) controlled by additional testing hardware (not the STM32) are used to measure the ambient temperature and the case temperature on top of the STM32.
Calculation values:
Read out Calibration values from STM32 at the addresses mentioned in the example code:
TS_CAL1: 662
TS_CAL2: 940
Measured example values:
external temperature sensor in the climatic chamber:
-40 °C | 30 °C | 130 °C
meaured STM32 ADC raw value (VDDA = 3.3 V):
469 | 613 | 817
STM32 internal temperature calculated as described in A.8.17 from ADC raw values:
-21 °C | 35 °C | 117 °C
Measurements in the climatic chamber:
Measurement evaluation:
Finally my questions:
EDIT:
Many greetings
Jens
2021-01-18 12:16 AM
Aquiring a calibration value myself is not an option because this is for a series product.
Yes I agree with you. The tracking of the curves seem fine. Only the calibration TS_CAL2 seems to be off.
The generated code states there is no TS_CAL1. But in the address used in the code example there is an value which looks very much like the TS_CAL1 value.
I was playing with the calibration values. The TS_CAL1 + the average slope of the temperature sensor actually gives a temperature curve which looks realistic! (I udpated this in the plots above)