2013-11-25 05:58 AM
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-sensor2013-11-25 06:37 AM
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, EtaPhi2013-11-25 07:52 AM
Hi EtaPhi,
Thanks a lot for the accurate answer. It was really helpful.Kind Regards,Gilberto