cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L432 Internal Temp Sensor

PCarn.1
Associate III

I'm trying to get the internal temperature sensor working on a custom board with an STM32L432KC. VDDA is 2.5V and is stable. The raw readings I'm getting are about 200 counts higher than I would expect on a 12bit config. The reading doesn't change based on temperature, usually I can see a 5 degree change if I shoot compressed air at the chip. I'm guessing I'm somehow reading a different ADC channel but I'm not exactly sure how to debug that. Attached are the register values after boot up.

14 REPLIES 14
PCarn.1
Associate III

I'm also using 

__LL_ADC_CALC_TEMPERATURE

to get the temperature. It currently returns 79 degrees.

So what you get from ADC ? (in hex)

Maybe, its ok - because typical values are at 3.0 Vdda ->

AScha3_0-1718530794244.png

but you have 2.5Vdda .

+

btw

Did you calibrate ADC ?

AScha3_0-1718531564047.png

 

If you feel a post has answered your question, please click "Accept as Solution".

+1 to what @AScha.3  said above; some more possible sources of problems here.

JW

PCarn.1
Associate III

I understand the calibration values might be off. But I should still see the raw counts changing with major temperature changes, but I don't.

> I understand the calibration values might be off.

Why do you think the problem are the calibration values? I pointed you to a list, did you exclude all other sources of problems?

> I should still see the raw counts changing with major temperature changes, but I don't.

So, you read out the same value over and over?

JW

 

PCarn.1
Associate III

I don't think it's the calibration values. There is some variation in my readings but they are not affected by temperature changes. I have other ADC channels that are working so I know my ADC is on. There's a problem specific to the temperature sensor channel that I can't figure out. It almost seems like I'm reading a different a different ADC channel.

> There is some variation in my readings

How much?

> but they are not affected by temperature changes.

At all? And what are those temperature changes? Blowing air won't change internal temperature much, unless the chip is really hot on the surface.

Have you checked that all other items of the list I linked to are OK?

JW


@waclawek.jan wrote:

Blowing air won't change internal temperature much, unless the chip is really hot 


Or the air is significantly hotter (or colder) than the chip ...

Andrew Neil
Evangelist III

@PCarn.1 wrote:

usually I can see a 5 degree change if I shoot compressed air at the chip.


Some more info on this "usually" - same chip? same board?