2018-08-05 04:00 AM
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:
Can someone please shed some light on this for me confusing issue?
2018-08-05 05:28 AM
Yes, the slope is negative.
JW
2018-08-05 10:59 AM
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.