I am using PE to set the ADC to measure temperature with the on-chip VREG temp sensor:
And I can switch the CPMUHTCTL register between the band-gap voltage and temperature to get a calibration point for the conversion calculation: CPMUHTCTL_HTE = 1, CPMUHTCTL_VSEL = 1 for bandagap voltage; CPMUHTCTL_HTE = 1, CPMUHTCTL_VSEL = 0 for sensor voltage.
My problem is that the sensor voltage ADC reading doesn't vary over temperature. I have tested it over a range of +- 10 degrees and always get exactly the same ADC reading, to the last bit. The ADC value is quite different from the ADC value with the bandgap voltage set, so I know I'm not still measuring the constant bandgap voltage. I'm using the GetChanValue16 method to read the ADC after calling the Measure method.
Is there anything I've missed, because as I understand from all the various references, there is a sensitivity of about 1.75 mv / degree C, which should make the ADC value change over the temp range I'm testing it at ?