Skip to main content
DU2
Associate II
Sep 23, 2020 4:12 AM UTC
Solved

LO31K6 : How to get Temperature data?

Hello, I am using L031K6 for low battery sensor project

I made L031K6 to sense 3~4 channel of AC measure,

so that currently using ADC-DMA for measure, and succesfully get 3 channel of AC data

but additionaly, I want to make L031K6 sense temperature of surroundings

by its ADC port

The CPU mannual said that It can sense temperature by one of ADC channel,

but I think there is no more precise description or proper example code.

so Could you show me the precise way to get temperature by L031K6?

Thanks to read.

This topic has been closed for replies.
Imen.DBest answer
ST Technical Moderator
Sep 28, 2020 9:28 AM UTC

Hello @DU​ ,

Have a look to the RM0377 in Analog-to-digital converter (ADC)  section to calculate the temperature, and refer to the code example: A.8.17: Temperature computation code example.

0693W000004Hve3QAC.jpg

Hope that answers your question, and please mark the post of user which is the "Best".

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks

2 replies

TDK
Sep 23, 2020 1:44 PM UTC

It senses the chip temperature, which is typically much higher than ambient. It's just a different channel on the ADC. Works the same as converting other channels. The reference manual and datasheet will have more info.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Imen.DBest answer
ST Technical Moderator
Sep 28, 2020 9:28 AM UTC

Hello @DU​ ,

Have a look to the RM0377 in Analog-to-digital converter (ADC)  section to calculate the temperature, and refer to the code example: A.8.17: Temperature computation code example.

0693W000004Hve3QAC.jpg

Hope that answers your question, and please mark the post of user which is the "Best".

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks