Example MPC5744P TSENS temperature calculation

File uploaded by Petr Stancik Employee on Apr 17, 2015
Version 1Show Document
  • View in full screen mode

********************************************************************************

* Detailed Description:

*

* Example shows MCU's temperature measurement with the help of TSENS.

* Calibartion constants for TSENS0 and TSENS1 are read from Test Flash and

* ADC0/ADC1 is set to measure Vbg and TSENS outputs.

* Calculated internal temperature can be desplayed on the Terminal.

*

* EVB connection:

*

*   Route LINFlexD_0 TXD/RXD (PB2/PB3) signals to the main board RS-232 transceiver

*   Daughtercard:

*   J17.11–12 ON  .. Connect LINFlexD_0 TXD (PB2) to main board.

*   J17.8–9 ON .. Connect LINFlexD_0 RXD (PB3) to main board.

*

*   Motherboard

*   J14 - SCI_RX ON

*   J13 - SCI_TX ON

*   J25 - SCI_PWR ON

*

* See results on PC terminal (19200, 8N1, None). You should get following text

* (with different values for sure)

*

* TSENS0/TSENS1 temperature measurement

* press any key to continue...

*

* Calibration constants read from Test Flash

*

* TSENS0                           TSENS1

*

* K1 = 429                         K1 = -220

* K2 = -5785                       K2 = -5767

* K3 = -12800                      K3 = -12736

* K4 = 45                          K4 = 45

*

*      K1 * Vbg_code * 2^-1 + K2 * TSENS_code * 2^3

* T = ------------------------------------------------------------------------- / 4 - 273.15 [degC]

*     [K3 * Vbg_code * 2^2 + K4 * TSENS_code] * 2^-10

*

* Vbg0_code      = 1502               Vbg1_code      = 1502

* TSENS0_code = 2002               TSENS1_code = 1988

*

* TSENS0 temp = 34.57 degC         TSENS1 temp = 36.78 degC

*

* ------------------------------------------------------------------------------

* Test HW:  MPC57xx

* Maskset:  1N65H

* Target :  RAM, internal_FLASH

* Fsys:     200 MHz PLL with 40 MHz crystal reference

* Terminal: 19200, 8N1, None

********************************************************************************

Outcomes