I had few questions on the TSENS calculations on MPC5675K
1) As per MPC5675K TRM, TSENS calibration constants will retrieved from test sector of flash
Constant Description for TSENS calculations using Formula:
P1 Code from the ADC converting VTSENS in PTAT mode at 145 C
P2 Code from the ADC converting VTSENS in PTAT mode at -40 C
C1 Code from the ADC converting VTSENS in CTAT mode at 145 C
C2 Code from the ADC converting VTSENS in CTAT mode at -40 C
Test flash memory information:
0x0000 TSENS1_CAL W1/W2 Temperature sensor Calibration data W1 and W2
0x0004 TSENS1_CAL W3/W4 Temperature sensor Calibration data W3 and W4
Question here is Calibration data TSENS1_CAL W1/W2/W3/W4 is interpreted as P1/P2/C1/C2 Respectively? Or is there any alternative correlation to interpret the calibration constants TSENS1_CAL W1/W2/W3/W4 w.r.t P1/P2/C1/C2?
2)Temperature sensor Calibration data (TSENS1_CAL W1/W2/W3/W4) retrieved from test sector is of 16 bit data for each constant.
Whether we need to use all 16 bit Calibration constant Data for TSENS calculations or we need to use only 12 Bit data? Since the ADC conversion values will be of 12 bit from the Channel Data Register n (CDRn) of ADC for getting current PTAT or CTAT values at Generic temperature.
if I use 16 Bit Data then I am getting incorrect temperature as output from the formula, but if I use 12 bit then I am getting correct temperature as output. Refer below example and data.
Example: Case 1 output is 37.4112341632604 ◦C using 12 bit Calibration Const Data
Case 2 output is 1728.62365481082 ◦C using 16 bit Calibration Const Data.
CASE 1: Using 12 Bit
CASE 2: Using 16 Bit
Request to clarify above questions