31.3.3.8 Temperature Measurement

An on-chip temperature sensor is available. To perform a temperature measurement, follow these steps:
  1. Configure the voltage reference to internal 1.024V by writing to the Reference Selection (REFSEL) bit field in the Control C (ADCn.CTRLC) register.
  2. Select the temperature sensor as the input in the Positive Input Multiplexer (ADCn.MUXPOS) register.
  3. Configure the ADC Sample Duration by writing a value ≥ 60 µs × f CLK_ADC to the Sample Duration (SAMPDUR) bit field in the Control E (ADCn.CTRLE) register.
  4. Acquire the temperature sensor output voltage by running a 10-bit Single-Ended conversion.
  5. Process the measurement result as described below.
The measured voltage has a linear relationship to 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:

T = ( ADC Result + Offset ) × Slope 1024

It is possible to perform further calibration to achieve even more accurate results. For example, multi-point calibration can be performed by imposing known temperatures on the device and recording the corresponding ADC results. This helps create a precise calibration curve, which can be implemented in firmware to adjust the output result.