Skip to main content
Visitor II
November 25, 2013
Question

STM8L152C6T6 - Temperature sensor pin

  • November 25, 2013
  • 2 replies
  • 716 views
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
    This topic has been closed for replies.

    2 replies

    Visitor II
    November 25, 2013
    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

    gibbaAuthor
    Visitor II
    November 25, 2013
    Posted on November 25, 2013 at 16:52

    Hi EtaPhi,

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

    Kind Regards,

    Gilberto