Example MPC5644A TSENS Temperature calculation

File uploaded by Petr Stancik Employee on Apr 22, 2015Last modified by Diana Torres on Feb 24, 2017
Version 2Show Document
  • View in full screen mode

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

* Detailed Description:

 

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

* Calibration constants for TSENS are read from TSENS registers and

* eQADC is set to measure Vbg and TSENS outputs. eQADC calibration is also done.

* Calculated internal temperature can be displayed on the Terminal.

*

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

* (with different values for sure)

*

*    fsys = 150MHz

*

*    TSENS temperature calculation

*

*    Calibration constants read from TSENS registers

*

*    T_LOW = 25

*    T_HIGH = 145

*    TSENS_CODE_T_LOW = 5441

*    TSENS_CODE_T_HIGH = 7305

*    VBG_CODE_T_LOW = 4010

*

*

*                 (TSENS_CODE_T*beta - TSENS_CODE_T_LOW)*(T_HIGH - T_LOW)

*    T = T_LOW - --------------------------------------------------------- [degC]

*                       (TSENS_CODE_T_HIGH - TSENS_CODE_T_LOW)

*

*

*    VBG_CODE_T (ch45)  = 3959 => beta = 1.01288

*    TSENS_CODE_T (ch128) = 5608

*

*    Temp = 31.80 degC

*   

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

* Test HW:        XPC564AKIT208S and XPC564AKIT324S

* MCU:            SPC5644AMMG1,0M14X and SPC5644AMVZ1,0M14X

* Fsys:           150/132/120/12 MHz

* Debugger:       Lauterbach Trace32

*                 PeMicro USB-ML-PPCNEXUS

* Target:         RAM, internal_FLASH

* Terminal:       19200-8-no parity-1 stop bit-no flow control on eSCI_A

* EVB connection: default

*

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

Outcomes