41.3.3.8 Temperature Measurement

An on-chip temperature sensor is available. To do a temperature measurement, follow these steps:
  1. Configure the voltage reference to internal 2.048V by writing to the Reference Selection (REFSEL) bit field in the Control C (ADCn.CTRLC) register.
  2. Select the temperature sensor as input in the Positive Input Multiplexer (ADCn.MUXPOS) register.
  3. Configure the ADC Sample Duration by writing a value ≥ 32 µ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 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:

T = ( Offset Correction ADC Result ) × Gain Correction 1024

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.