This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-MSPM0L1306: LP-MSPM0L1306: Internal (on-chip) temperature sensor formula for calculating VTRIM unclear

Part Number: LP-MSPM0L1306
Other Parts Discussed in Thread: MSPM0L1306,

Hi,

I'm working on an application for the MSPM0L1306 that uses the internal temperature sensor. I have modified the adc12_single_conversion example to use the internal temperature sensor (Channel 11) and 1.4V internal reference. With the development board in my desk, I'm getting values around 1899 and the TEMP_SENSE_0 value for my chip is 367.

below is the code snippet:

while (1) {
DL_ADC12_startConversion(ADC12_0_INST);

while (false == gCheckADC) {
__WFE();
}

gAdcResult = DL_ADC12_getMemResult(ADC12_0_INST, DL_ADC12_MEM_IDX_0);

VSAMPLE = (1.4/4096)*(gAdcResult - 0.5);
TEMP_SENSE_DATA = FACTORYREGION->TEMP_SENSE0;
VTRIM = (1.4/4096)*(TEMP_SENSE_DATA - 0.5);
TSAMPLE = (1/-0.00175)*(VSAMPLE - VTRIM)+30;

gCheckADC = false;
DL_ADC12_enableConversions(ADC12_0_INST);
}

Plugging these values into the formulas from section 2.2.5 Temperature Sensor of the TRM manual I get the following:

VSAMPLE = (1.4 V / 4096) * (1899 - 0.5)  = 648.9 mV 

VTRIM = (1.4 V / 4096) * (367 - 0.5) = 125.2 mV

TSAMPLE = (648.9 mV - 125.2 V) / (-1.75 mV / °C) + 30°C = -269.21 °C

This value is not realistic. However, when using the VTRIM from the example in the manual, I get much more plausible results:

TSAMPLE = (648.9 mV - 634.5 mV) / (-1.75 mV / °C) + 30°C = 21.79 °C

However, this ignores any per-chip factory calibration, and I'm reluctant to use such a fix in production. I am getting similar results for the other LP-MSPM0L1306.