cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103 how to calculate temperature sensor

chen zero
Associate II
Posted on December 27, 2017 at 17:46

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/CD00171190.pdf/jcr:content/translations/en.CD00171190.pdf

 )

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/CD00161566.pdf/jcr:content/translations/en.CD00161566.pdf

 

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 !

1 REPLY 1
Dzor
Associate II

No,

Vsense = X /4096 * VDDA

Because On 64-pin packages and packages with less pins VREF is internally connected to the ADC
voltage supply (VDDA).