cancel
Showing results for 
Search instead for 
Did you mean: 

Why is STM32F072 Temperature Sensor Calibration Value TS_CAL1 higher than TS_CAL2 ?

bossamba
Associate II

While implementing a course temperature monitor for our custom boards I noticed,

that the readout of the two calibration values shows TS_CAL1 greater than TS_CAL2:

According to documents "https://www.st.com/resource/en/reference_manual/dm00031936.pdf" and "https://www.st.com/resource/en/datasheet/stm32f072vb.pdf"

TS_CAL1 should be the "TS ADC raw data acquired at a temperature of 30 °C" and

TS_CAL2 should be the "TS ADC raw data acquired at a temperature of 110 °C".

So I used:

#define ADDR_TS_CAL1 ((uint16_t*) ((uint32_t) 0x1FFFF7B8)) /* 30 deg */
#define ADDR_TS_CAL2 ((uint16_t*) ((uint32_t) 0x1FFFF7C2)) /* 110 deg */
 
 

Reading at the given addresses by debugger or software show the following values:

TS_CAL1 = 0x06DA (1754 decimal)

TS_CAL2 = 0x0523 (1315 decimal)

That's odd. It provides a negative slope of the characteristic curve. The higher the ADC-readout the lower the temperature ??

Interestingly is there another post regarding a STM32F091 which show similar calibration values at the given addresses, but unfortunately no one refers to the obvious inverted order of the two calibration values:

https://community.st.com/s/question/0D50X00009Xkhx8SAB/getting-temperature-from-adc-on-stm32f091?t=1533460362630

Can someone please shed some light on this for me confusing issue?

2 REPLIES 2

Yes, the slope is negative.

JW

bossamba
Associate II

Thank you, Mr. Waclawek. So I can trust on these values.

Besides that, I had issues with a too short sample time and a wrong VDDA calculation but it looks much better now.