Skip to main content
DU2
Associate II
September 23, 2020
Solved

LO31K6 : How to get Temperature data?

  • September 23, 2020
  • 2 replies
  • 717 views

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.
Best answer by Imen.D

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

2 replies

TDK
September 23, 2020

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
September 28, 2020

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