An on-chip temperature sensor is available. To do a temperature measurement, follow these
steps:
Configure the voltage reference
to internal 2.048V by
writing to the Reference Selection (REFSEL) bit field in the Control C
(ADCn.CTRLC) register.
Select the temperature sensor as
input in the Positive Input Multiplexer (ADCn.MUXPOS) register.
Configure the ADC Sample Duration
by writing a value ≥ to the Sample Duration (SAMPDUR) bit field in
the Control E (ADCn.CTRLE) register.
Acquire the temperature sensor
output voltage by running a 10-bit Single-Ended conversion.
Process the measurement result,
as described below.
The measured voltage has a linear relationship to the temperature. The
relationship between the ADC conversion result and temperature in kelvin is tested in
production and is available in the Signature Row:
SIGROW.TEMPSENSE0: gain/slope
correction
SIGROW.TEMPSENSE1: offset
correction
Use the following equation to calculate the temperature in kelvin:
It is possible to perform further calibration to achieve even more accurate results. For
example, multi-point calibration is performed by imposing known temperatures on the
device and recording the ADC results. This helps create a precise calibration curve,
which can be implemented in firmware to adjust the output result.