cancel
Showing results for 
Search instead for 
Did you mean: 

STM8L Internal temperature Sensor

Stm32User
Associate II
Posted on April 22, 2010 at 18:37

STM8L Internal temperature Sensor

#stm8l-temperature-sensor
3 REPLIES 3
Stm32User
Associate II
Posted on May 17, 2011 at 15:08

The ADC uses the VREF input as its reference in my case AVDD (+3V3).

The device has an internal bandgap which can be connected to the input for scaling measurements. This is 1.23v nom so no I would not expect fullscale.

I have discovered two things :-

1) You need to wait 10uS after powering up the internal VRef before it is stable.  This delay gives me sensible readings.

2) The datasheet has a typographical error.  The temperature sensor produces 1.62mV / Deg K not 1.62mV/DegC.  When calculating the temperature you need to subtract 273.15 !

will2
Associate II
Posted on May 17, 2011 at 15:08

That's a 12-bit A/D, right?  Which would make your A/D counts range 0 - 4095.  Wouldn't you expect to see maximum counts when you apply your Vref+ to the A/D?  The A/D values that you got back don't seem correct.

FordFairlane
Associate III
Posted on May 28, 2012 at 14:08

Hello

I have searched for any application note to calculate microcontroller temperature but I have not found any information.

Does anybody have a function to get the microcontroller temperature?, in that case could anybody share the source code?.

Thank you un advance.

Regards