Recently, I have tried to mesure my CPU temperature from the integrated sensor in my LPC54628J512
-First, I openned the lpc_adc_basic SDK example, to verify that I can read the ADC value. I thinck there is a mistake in the configuration : it's configured with ADC Channel 4, instead on Channel 0.
-Then, I have implemented the conversion in my system and verify that the mesured temperature correspond to reality. I have used calibration values from the DataSheet (https://www.nxp.com/docs/en/data-sheet/LPC546XX.pdf p142). With theses values I see a big difference.
This is my measures:
-my VDDA is 3.32V
-at 0°C ± 2°C, I mesure 700. -> with 12-bit ADC and 3.32V, that represent 700*3.32/4095 = 567 mV
In the datasheet, the value at 0°C is 584 mV (seems equal to my measure but that represent 10°C difference)
-at 28°C ± 2°C, I measure 641, that represent 700*3.32/4095 = 520 mV, this is in the range given in the datasheet
So I took it that the slope of -2.04 mV/°C is also false.
With my measures, I have calculated a slope of -1.69 mV/°C
I cannot make the experience with more extrem temperatures (the sensor works from -40°C to +105°C) so I think it's possible to improve the accuracy of my results.
Can you take a look at this ?