2022-03-30 07:09 AM
Hi,
We have produced a set of devices with the stm32L072 mounted. It measures the internal temperature sensor, which result in around 29 degrees for most of the devices. Which is what we can expect, right? For the internal temperature sensor.
But a few device give us around 19 degrees, and cause test failure. We belief the measurement is incorrect. I checked everything and the only thing that is different between the devices are the temperature calibration values, preprogrammed in the device at address TEMPSENSOR_CAL1_ADDR and TEMPSENSOR_CAL2_ADDR. I compared the raw measured adc values and they are similar to a device that passed the test. Also the reference voltage measurement give us the same value, no error with that measurement.
I did a simple test by using the calibration values of a device that passed our test and use those in a device which failed. Now this device also measures around 29 degrees, and passes the test. Could it be the calibration values are wrong? Could they have been altered?
Any ideas?
thank you.
2022-03-30 07:44 AM
The internal temperature sensor is not particular accurate. Are you performing the calculation using the TS_CAL1/TS_CAL2 calibrated temperature values, or just nominal settings? Is the ADC sampling time you're using sufficient?
The stored values really should be correct, but I don't see another explanation, if the above issues are not the cause.
2022-03-30 07:20 PM
Compensate also by reading vref to know vdd.
Some calibration data are respective to 3.0V
Also this is internal instant localized silicon temperature, need at least time average. The internal temp sensor should be used as relative indicator, not absolute one, especially to guess the ambiant temp.
2022-04-03 11:42 PM
This, we know. It is not intended for absolute measurements. But we see >10 degree difference between some devices. And yes, we do use Vdd compensation, and use the calibration data. And we do average multiple measurements. The point is, when I use calibration data from another device (a device that gives me around 29 degrees), I get data that is more in line with the fast majority of the devices.
29 degrees is not a weird value, right? When the ambient temperature is room temperature. But 19 degrees seems a bit low to me. The fact there are calibration values, it means the temperatures should be all around the same. Maybe 1 or 2 degrees off from the average, but not 10. Right?