SLAU847D October 2022 – May 2024 MSPM0L1105 , MSPM0L1106 , MSPM0L1227 , MSPM0L1228 , MSPM0L1228-Q1 , MSPM0L1303 , MSPM0L1304 , MSPM0L1304-Q1 , MSPM0L1305 , MSPM0L1305-Q1 , MSPM0L1306 , MSPM0L1306-Q1 , MSPM0L1343 , MSPM0L1344 , MSPM0L1345 , MSPM0L1346 , MSPM0L2227 , MSPM0L2228 , MSPM0L2228-Q1
The PMU provides a basic temperature sensor which can be used to approximate the temperature of the device. The temperature sensor is connected internally to the ADC, and the ADC must be used to perform a temperature measurement. See the device-specific data sheet to determine the correct internal ADC channel to use when measuring the temperature sensor.
The temperature sensor outputs a voltage which has a linear relationship with temperature. The temperature coefficient (TSc) is the slope of the temperature-voltage relationship (given in mV/C), and is given in the specifications section of the device-specific data sheet.
A unit-specific single-point trim value (TEMP_SENSE0.DATA) is provided in the factory constants memory of each device. This value indicates the temperature sensor output voltage at the factory trim temperature (TSTRIM), in ADC result code format. The ADC result code in TEMP_SENSE0.DATA is based upon 12-bit sampling mode together with the 1.4V internal voltage reference. The TSTRIM temperature is also given in the specifications section of the device-specific data sheet.
The approximate temperature of the device can be computed through the use of the following parameters:
The temperature is computed through the linear relationship given in Equation 1, where VSAMPLE is the current temperature sensor voltage, and VTRIM is the factory calibrated temperature sensor voltage at the TSTRIM temperature (derived from TEMP_SENSE0.DATA):
The ADCCODE raw result can be converted to a voltage equivalent (VSAMPLE) as shown in the relationship in Equation 2, where RES is the ADC resolution in bits, and VREF is the ADC reference voltage.
To illustrate the process of converting an ADC sample of the temperature sensor into an approximate device temperature, an example is given below.
Example parameters:
First, the current temperature sensor sample voltage is calculated using Equation 3:
Then, the single-point calibration voltage is calculated using the same means:
Then, the temperature is approximated using Equation 5: