AnsweredAssumed Answered

STM32F103 how to calculate temperature sensor

Question asked by chen zero on Dec 27, 2017

I am confused on how to calculate temperature from the internal sensor.

From RM008 (http://www.st.com/content/ccc/resource/technical/document/reference_manual/59/b9/ba/7f/11/af/43/d5/CD00171190.pdf/files/… )

Page 235,  Temperature (in °C) = {(V25 - Vsense) / Avg_Slope} + 25. ( formula 1)

and from datasheet, page 79,

http://www.st.com/content/ccc/resource/technical/document/datasheet/33/d4/6f/1d/df/0b/4c/6d/CD00161566.pdf/files/CD00161… 

V25= 1.43 V , average_slope= 4.3 mV/°C

so, in formula 1, need to calculate Vsense.

Suppose that from ADC1, the converted value is X, so,

Vsense = X /4096 * Vrefint, right ? but how to get Vrefint ?

 

from doc, the Vrefint can get from ADC1 channel 17,

however, I can not find any formula to to calculate the Vrefint,

I found some doc said that for STM32F0 series chip, Vrefint can be caluclated by reading data in system

address: Vrefint_cal (0x1FFF F7BA - 0x1FFF F7BB), however, seems that this address is not defined for SMT32F103 series.

 

Can you give some help on how to calculate temperature or Vrefint ?

Thank you very much !

Outcomes