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:16 AM
12-bit resolution I'm seeing 1714 counts +/- 3 counts. I've set the temp sensor up on STM32G474s, F217s, L475s, and G431s, on all of them blowing compressed air on the chip can cool it down from it's ambient temp of 30C to 25C.
Almost all of those points on the list can be ruled out when taking into account that the other ADC channels are working and not being concerned with conversion to degrees C yet.
2024-06-17 10:19 AM
The one point in that list that does apply can be checked by the photo of the registers posted above. Ch17 is enabled.
2024-06-17 10:19 AM
> I'm seeing 1714 counts +/- 3 counts
In the screenshot in your initial post I see DR=1439.
JW
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-17 10:27 AM
Also, the 'L432 may run cooler (have lower power consumption) than the other chips, so blown air may have less influence at its die temperature.
JW