cancel
Showing results for 
Search instead for 
Did you mean: 

STM8L152C6T6 - Temperature sensor pin

gibba
Associate II
Posted on November 25, 2013 at 14:58

Hello everyone,

I can't find the relative pin to the internal temperature sensor. Does anyone know which pin is it? Or should i only configure the TSON bit in the ADC_TRIGR1 register to wake up the temperature sensor?

In fact the problem rises also when i want to select the right channel on the adc.. Can anyone help please?

thanks a lot,

best,

Gilberto

#stm8l152c6t6-temperature-sensor
2 REPLIES 2
fggnrc2
Associate II
Posted on November 25, 2013 at 15:37

Hello Gilberto!

No micro-controller pin is connected to the internal temperature sensor.

If you want to use it, you have to switch it on by setting the TSON bit in ADC_TRIG1.

When its wake-up time is elapsed (see the datasheet), the internal temperature sensor value can be read by setting the CHSEL_STS bit in ADC_SQR1 and by starting an acquisition.

Please, be informed that each temperature sensor must be calibrated.

See AN3397 ''Temperature sensor example using the STM8L-DISCOVERY board''.

Regards,

EtaPhi

gibba
Associate II
Posted on November 25, 2013 at 16:52

Hi EtaPhi,

Thanks a lot for the accurate answer. It was really helpful.

Kind Regards,

Gilberto