JAJSOS3B September 2023 – September 2023 AMC131M03
PRODUCTION DATA
Set the TS_EN bit in the CH2_CFG register to 1b, and the TS_SEL bit in the CH2_CFG register to 1b to select the external temperature sensor mode. Set the PGAGAIN2[2:0] bits in the GAIN register to 000b (gain of 1) when using the external temperature sensor. In this mode, the ADC for channel 2 measures the voltage between the AIN2P and AIN12N pins (channel 2 input), as shown in Figure 8-16, for sensing an external temperature sensor (such as a PTC or NTC element).
The PTC or NTC element is powered from the secondary (high-side) supply that is generated by the onboard DC/DC converter and therefore exhibits supply variations. As shown in Figure 8-16, to eliminate supply variations and enable a ratiometric measurement, the ADC reference input for channel 2 in external temperature sensor mode is connected to a voltage Vref_R derived from the secondary (high-side) supply HLDO_OUT using a resistor divider R1 and R2. This reference selection is different from the internal temperature sensor mode and the normal ADC conversion mode, because in both modes the ADC is measured with respect to the internal reference VREF of 1.2 V. R1 and R2 are selected so that Vref_R is also typically 1.2 V.
Equation 9 and Equation 10 determine the external temperature by measuring the temperature-dependent resistance of the NTC or PTC element, assuming a gain of 1.
In Equation 9, ConversionResult is expressed in units ranging from 0 (zero-scale) to 1.0 (full-scale). To obtain ConversionResult from the decimal ADC code, divide the ADC code by 223.
Equation 9 can be transformed into Equation 12, which calculates the temperature-dependent resistance of the NTC or PTC element from the ADC conversion result on channel 2.
Equation 12 illustrates that the measurement of the NTC or PTC resistance is independent from the secondary (high-side) supply voltage and is therefore ratiometric, eliminating any errors from variation of the supply voltage.