2023-11-16 03:10 AM
Hi,
How can we extract a correct reading of the internal temperature of the STM32L452 in degree C?
We currently read a number '141' but this is clearly not the CPU temperature which should be 22-28oC
We have followed the general app note on temperature reading https://www.st.com/resource/en/application_note/dm00035957-stm32l1x-temperature-sensor-example-stmicroelectronics.pdf
This does not provide right info.
Is there a correct procedure for extracting this?
Thanks
2023-11-16 04:10 AM
Welcome @bmohandes, to the community!
You used AN3964 to refer to an application note that was written for STM32L1.
It is best to take a look at the description of the temperature sensor in RM0394, section 16.4.32. The principle is also illustrated in the example ADC_TemperatureSensor for the STM32L476, which can be found in the repository, either your local copy STM32Cube_FW_L4 in
STM32Cube_FW_L4_Vxyz/Projects/NUCLEO-L476RG/Examples_LL/ADC/ADC_TemperatureSensor
or the online one which can be found here.
Hope that helps?
Regards
/Peter