2024-06-15 03:11 PM
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.
Solved! Go to Solution.
2024-06-17 10:26 AM
Also, judging from ADC_CR.ADCALDIF being set, and the fact that ADC_CALFACT contains nonzero value only for the differential field, you probably did not perform single-ended calibration.
JW
2024-06-15 03:17 PM
I'm also using
__LL_ADC_CALC_TEMPERATURE
to get the temperature. It currently returns 79 degrees.
2024-06-16 02:41 AM - edited 2024-06-16 02:53 AM
So what you get from ADC ? (in hex)
Maybe, its ok - because typical values are at 3.0 Vdda ->
but you have 2.5Vdda .
+
btw
Did you calibrate ADC ?
2024-06-16 03:56 AM
2024-06-16 06:55 AM
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.
2024-06-16 12:53 PM
> 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
2024-06-17 08:18 AM
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.
2024-06-17 08:41 AM
> 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
2024-06-17 08:44 AM
@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 ...
2024-06-17 08:47 AM
@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?