Hello,
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 |
T2 | -40 | -40 |
T1 | 145 | 145 |
PX | 1229 | 1229 |
CX | 1225 | 1225 |
P1 | 2575 | 47631 |
P2 | 1429 | 46485 |
C1 | 1515 | 62955 |
C2 | 2181 | 63621 |
|
|
|
A | 918944 | 21246084 |
B | 1295320 | -19023720 |
T | 37.4112341632604 | 1728.62365481082 |
|
Request to clarify above questions
Thanks
Chethan
Solved! Go to Solution.
1) Yes, that's right.
2) I think you answered yourself. 16-bit TSENS1_CAL Wx code must be ANDed by 0x0FFF before use.
using this method, we are consistently seeing temperature readings that are 10 degrees higher than what would be expected based on the thermal gun. Why?
1) Yes, that's right.
2) I think you answered yourself. 16-bit TSENS1_CAL Wx code must be ANDed by 0x0FFF before use.
Thanks for the clarifying questions . Information on "16-bit TSENS1_CAL Wx code must be ANDed by 0x0FFF before use" is missed in the TRM , shouldn't we add this note in TRM ?