Infineon SP37 Function Manual

TPMS
SP37
High integrated single-chip TPMS sensor with a low power embedded micro­controller and wireless FSK/ASK UHF transmitter
SP370 900kPa Version A5
ROM Library Function Guide
Revision 1.0, 2011-12-15
Sense & Control
Edition 2011-12-15 Published by
Infineon Technologies AG 81726 Munich, Germany
© 2011 Infineon Technologies AG
All Rights Reserved.
Legal Disclaimer
The information given in this document shall in no event be regarded as a guarantee of conditions or characteristics. With respect to any examples or hints given herein, any typical values stated herein and/or any information regarding the application of the device, Infineon Technologies hereby disclaims any and all warranties and liabilities of any kind, including without limitation, warranties of non-infringement of intellectual property rights of any third party.
Information
For further information on technology, delivery terms and conditions and prices, please contact the nearest Infineon Technologies Office (www.infineon.com).
Warnings
Due to technical requirements, components may contain dangerous substances. For information on the types in question, please contact the nearest Infineon Technologies Office.
Infineon Technologies components may be used in life-support devices or systems only with the express written approval of Infineon Technologies, if a failure of such components can reasonably be expected to cause the failure of that life-support device or system or to affect the safety or effectiveness of that device or system. Life support devices or systems are intended to be implanted in the human body or to support and/or maintain and sustain and/or protect human life. If they fail, it is reasonable to assume that the health of the user or other persons may be endangered.
SP37
We Listen to Your Comments
Any information within this document that you feel is wrong, unclear or missing at all? Your feedback will help us to continuously improve the quality of this document. Please send your proposal (including a reference to this document) to:
sensors@infineon.com
Tire Pressure Monitoring Sensor
SP37 High integrated single-chip TPMS sensor with a low power embedded micro-controller and wireless FSK/ASK UHF transmitter
Revision History: 2011-12-15, Revision 1.0 Previous Revision: Revision 0.1 Page Subjects (major changes since last revision)
Page 17 WakeUp time updated Page 22 Chapter Meas_Sensor updated Page 27 Note for calling two additional bytes, valid for all functions Page 31 Chapter Meas_Pressure updated Page 36 Chapter Automatic Pressure Range Operation added Page 42 Execution Time of the function Scale_Pressure updated Page 45 Chapter Meas_Acceleration updated Page 54 Execution Time of the function Raw_Temperature updated Page 54 Register of Output Value of Raw_Temperature corrected Page 71 Register CFG1 used in Powerdown Function Page 72 Execution Time of the function Powerdown updated Page 76 Execution Time of the function StartXtalOsc updated Page 84 Execution Time of the function IntervalTimerCalibration updated Page 86 Execution Time of the function LFBaudrateCalibration updated Page 87 Function MulIntInt(): 2 additional bytes for stack added Page 97 ReadID Input and Output Parameters updated Page 101 FW_Revision_Nb Input and Output Parameters updated Page 106 Execution Time of the function FlashUserConfigSectorLine updated Page 107 New function WriteFlashCodeSectorLine Page 110 Ressource Usage of the function FlashSetLock updated Page 110 Execution Time of the function FlashSetLock updated Page 121 Execution Time of the function Wait100usMultiples updated Page 123 Execution Time of the function Send_RF_Telegram updated Page 126 Flow Chart of Send_RF_Telegram Function
ROM Library Function Guide 3 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
Trademarks of Infineon Technologies AG
AURIX™, C166™, CanPAK™, CIPOS™, CIPURSE™, EconoPACK™, CoolMOS™, CoolSET™, CORECONTROL™, CROSSAVE™, DAVE™, EasyPIM™, EconoBRIDGE™, EconoDUAL™, EconoPIM™, EiceDRIVER™, eupec™, FCOS™, HITFET™, HybridPACK™, I²RF™, ISOFACE™, IsoPACK™, MIPAQ™, ModSTACK™, my-d™, NovalithIC™, OptiMOS™, ORIGA™, PRIMARION™, PrimePACK™, PrimeSTACK™, PRO-SIL™, PROFET™, RASIC™, ReverSave™, SatRIC™, SIEGET™, SINDRION™, SIPMOS™, SmartLEWIS™, SOLID FLASH™, TEMPFET™, thinQ!™, TRENCHSTOP™, TriCore™.
Other Trademarks
Advance Design System™ (ADS) of Agilent Technologies, AMBA™, ARM™, MULTI-ICE™, KEIL™, PRIMECELL™, REALVIEW™, THUMB™, µVision™ of ARM Limited, UK. AUTOSAR™ is licensed by AUTOSAR development partnership. Bluetooth™ of Bluetooth SIG Inc. CAT-iq™ of DECT Forum. COLOSSUS™, FirstGPS™ of Trimble Navigation Ltd. EMV™ of EMVCo, LLC (Visa Holdings Inc.). EPCOS™ of Epcos AG. FLEXGO™ of Microsoft Corporation. FlexRay™ is licensed by FlexRay Consortium. HYPERTERMINAL™ of Hilgraeve Incorporated. IEC™ of Commission Electrotechnique Internationale. IrDA™ of Infrared Data Association Corporation. ISO™ of INTERNATIONAL ORGANIZATION FOR STANDARDIZATION. MATLAB™ of MathWorks, Inc. MAXIM™ of Maxim Integrated Products, Inc. MICROTEC™, NUCLEUS™ of Mentor Graphics Corporation. Mifare™ of NXP. MIPI™ of MIPI Alliance, Inc. MIPS™ of MIPS Technologies, Inc., USA. muRata™ of MURATA MANUFACTURING CO., MICROWAVE OFFICE™ (MWO) of Applied Wave Research Inc., OmniVision™ of OmniVision Technologies, Inc. Openwave™ Openwave Systems Inc. RED HAT™ Red Hat, Inc. RFMD™ RF Micro Devices, Inc. SIRIUS™ of Sirius Satellite Radio Inc. SOLARIS™ of Sun Microsystems, Inc. SPANSION™ of Spansion LLC Ltd. Symbian™ of Symbian Software Limited. TAIYO YUDEN™ of Taiyo Yuden Co. TEAKLITE™ of CEVA, Inc. TEKTRONIX™ of Tektronix Inc. TOKO™ of TOKO KABUSHIKI KAISHA TA. UNIX™ of X/Open Company Limited. VERILOG™, PALLADIUM™ of Cadence Design Systems, Inc. VLYNQ™ of Texas Instruments Incorporated. VXWORKS™, WIND RIVER™ of WIND RIVER SYSTEMS, INC. ZETEX™ of Diodes Zetex Limited.
Last Trademarks Update 2011-02-24
ROM Library Function Guide 4 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor

Table of Contents

Table of Contents
Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.1 General Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.2 Type definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.3 Wakeup Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.4 Restricted RAM and FLASH areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.4.1 Restricted RAM areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.4.2 Restricted FLASH areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.5 8051 Instruction Set Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2 ROM Library Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.1 Meas_Sensor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.1.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.1.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.1.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.1.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.1.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.1.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.1.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.2 Meas_Pressure() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.2.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.2.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.2.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.2.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.2.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.2.6 Automatic Pressure Range Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.2.7 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.2.8 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.2.9 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.3 Scale_Pressure() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.3.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.3.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.3.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.3.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.3.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.3.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.3.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.3.8 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
2.4 Meas_Acceleration() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.4.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.4.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.4.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.4.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.4.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.4.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.4.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . 49
ROM Library Function Guide 5 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
2.4.8 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.5 Meas_Temperature() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.5.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.5.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.5.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.5.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.5.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.5.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
2.5.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
2.5.8 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
2.6 Raw_Temperature() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.6.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.6.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.6.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.6.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.6.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.6.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.6.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.7 Comp_Temperature() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.7.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.7.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.7.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.7.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.7.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.7.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.7.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.7.8 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
2.8 Meas_Supply_Voltage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.8.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.8.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.8.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.8.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.8.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.8.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
2.8.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
2.8.8 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
2.9 Start_Supply_Voltage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
2.9.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
2.9.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
2.9.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
2.9.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
2.9.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
2.9.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
2.9.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
2.9.8 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
2.10 Trig_Supply_Voltage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
2.10.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
2.10.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
2.10.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
2.10.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
2.10.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Table of Contents
ROM Library Function Guide 6 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
2.10.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
2.10.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
2.10.8 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
2.11 Get_Supply_Voltage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
2.11.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
2.11.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
2.11.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
2.11.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
2.11.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
2.11.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
2.11.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
2.11.8 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
2.12 ADC_Selftest() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
2.12.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
2.12.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
2.12.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
2.12.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
2.12.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
2.12.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
2.12.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
2.13 Powerdown() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.13.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.13.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.13.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.13.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.13.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.13.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.13.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
2.14 ThermalShutdown() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.14.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.14.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.14.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.14.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.14.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.14.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.14.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
2.15 StartXtalOsc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
2.15.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
2.15.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
2.15.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
2.15.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
2.15.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
2.15.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
2.15.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
2.15.8 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
2.16 StopXtalOsc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
2.16.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
2.16.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
2.16.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.16.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
2.16.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Table of Contents
. . . . . . . . . . . . . 77
ROM Library Function Guide 7 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
2.16.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
2.16.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
2.16.8 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
2.17 PLL_Ref_Signal_Check() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
2.17.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
2.17.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
2.17.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
2.17.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
2.17.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
2.17.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
2.17.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
2.18 VCO_Tuning() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
2.18.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
2.18.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
2.18.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
2.18.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
2.18.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
2.18.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
2.18.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
2.19 IntervalTimerCalibration() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
2.19.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
2.19.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
2.19.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
2.19.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
2.19.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
2.19.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
2.19.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
2.20 LFBaudrateCalibration() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
2.20.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
2.20.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
2.20.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
2.20.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
2.20.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
2.20.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
2.20.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
2.21 SMulIntInt() (16Bit * 16Bit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
2.21.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
2.21.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
2.21.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
2.21.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
2.21.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
2.21.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
2.21.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
2.22 UDivLongLong() (32Bit : 32Bit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
2.22.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
2.22.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
2.22.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
2.22.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
2.22.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
2.22.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
2.22.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Table of Contents
ROM Library Function Guide 8 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
2.23 UDivIntInt() (16Bit : 16Bit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
2.23.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
2.23.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
2.23.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
2.23.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
2.23.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
2.23.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
2.23.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
2.24 CRC8_Calc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
2.24.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
2.24.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
2.24.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
2.24.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
2.24.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
2.24.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
2.24.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
2.25 CRC_Baicheva_Calc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
2.25.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
2.25.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
2.25.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
2.25.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
2.25.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
2.25.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
2.25.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
2.26 Read_ID() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
2.26.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
2.26.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
2.26.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
2.26.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
2.26.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
2.26.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
2.26.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
2.26.8 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
2.27 ManuRevNb() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
2.27.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
2.27.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
2.27.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
2.27.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
2.27.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
2.27.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
2.27.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
2.28 FW_Revision_Nb() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
2.28.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
2.28.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
2.28.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
2.28.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
2.28.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
2.28.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
2.28.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.29 Erase_UserConfigSector() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
2.29.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Table of Contents
. . . . . . . . . 102
ROM Library Function Guide 9 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
2.29.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
2.29.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
2.29.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
2.29.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
2.29.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
2.29.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
2.30 WriteFlashUserConfigSectorLine() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
2.30.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
2.30.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
2.30.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
2.30.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
2.30.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
2.30.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
2.30.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
2.31 WriteFlashCodeSectorLine() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
2.31.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
2.31.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
2.31.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
2.31.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
2.31.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
2.31.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
2.31.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
2.32 FlashSetLock() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
2.32.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
2.32.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
2.32.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
2.32.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
2.32.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
2.32.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
2.32.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
2.33 ECC_Check() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
2.33.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
2.33.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
2.33.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
2.33.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
2.33.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
2.33.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
2.33.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
2.33.8 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
2.34 CRC16_Check() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
2.34.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
2.34.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
2.34.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
2.34.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
2.34.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
2.34.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
2.34.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
2.34.8 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
2.35 HIRC_Clock_Check() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
2.35.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
2.35.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Table of Contents
ROM Library Function Guide 10 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
2.35.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
2.35.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
2.35.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
2.35.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
2.35.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
2.36 GetCompValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
2.36.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
2.36.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
2.36.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
2.36.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
2.36.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
2.36.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
2.36.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
2.37 Wait100usMultiples() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
2.37.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
2.37.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
2.37.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
2.37.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
2.37.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
2.37.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
2.37.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
2.38 Send_RF_Telegram() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
2.38.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
2.38.1.1 Baud Rate parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
2.38.1.2 Pattern Descriptor table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
2.38.1.3 Start of Table indicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
2.38.1.4 Pattern Descriptor entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
2.38.1.5 Transmit Type Pattern Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
2.38.1.6 Delay Pattern descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
2.38.1.7 End of Table pattern descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
2.38.2 Flow Chart of Send_RF_Telegram() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
2.38.3 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
2.38.4 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
2.38.5 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
2.38.6 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
2.38.7 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
2.38.8 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
2.38.9 Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
2.39 Internal_SFR_Refresh() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
2.39.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
2.39.2 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
2.39.3 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
2.39.4 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
2.39.5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
2.39.6 Resource Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
2.39.7 Execution Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Table of Contents
3 Reference Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
ROM Library Function Guide 11 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor

List of Figures

List of Figures
Figure 1 SP37 OpCode Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Figure 2 Flow Chart for configuration of SensorConfig for Meas_Pressure() function. . . . . . . . . . . . . . . . . 37
Figure 3 Code example for usage of Meas_Pressure() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Figure 4 Code example for usage of Scale_Pressure() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Figure 5 Code example for usage of Meas_Acceleration(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Figure 6 Code example for usage of Meas_Temperature() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Figure 7 Code example for usage of Comp_Temperature(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Figure 8 Code example for usage of Meas_Supply_Voltage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Figure 9 Code example for usage of the functions Start_Supply_Voltage, Trig_Supply_Voltage and
Get_Supply_Voltage() 68
Figure 10 Code example for usage of StartXtalOsc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Figure 11 Code example for usage of StopXtalOsc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Figure 12 Code example for usage of Read_ID() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Figure 13 Code example for usage of the functions ECC_Check() and CRC16_Check() . . . . . . . . . . . . . . 112
Figure 14 M by N matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Figure 15 Lookup table organization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Figure 16 Datagram format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Figure 17 Datagram format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Figure 18 Transmit Type Pattern Descriptor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Figure 19 Delay Type Pattern Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Figure 20 End of Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Figure 21 Flow Chart of the Send_RF_Telegram() function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Figure 22 Code example for usage of Send_RF_Telegram(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
ROM Library Function Guide 12 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor

List of Tables

List of Tables
Table 1 Definition of types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Table 2 Wakeup Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Table 3 ROM Library functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Table 4 Meas_Sensor: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 5 Meas_Sensor: Input Parameter: SensorConfig[15:8] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 6 Meas_Sensor: Input Parameter: SensorConfig[7:0] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 7 Meas_Sensor: Input Parameter: SampleRate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Table 8 Meas_Sensor: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Table 9 Meas_Sensor: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Table 10 Meas_Sensor: Pressure Measurement: Execution Time and Charge Consumption . . . . . . . . . . 28
Table 11 Meas_Sensor: Acceleration Measurement: Execution Time and Charge Consumption . . . . . . . . 30
Table 12 Meas_Pressure: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Table 13 Meas_Pressure: Input Parameter: SensorConfig[15:8] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Table 14 Meas_Pressure: Input Parameter: SensorConfig[7:0] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Table 15 Meas_Pressure: Input Parameter: SampleRate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Table 16 Meas_Pressure: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Table 17 Meas_Pressure: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Table 18 Meas_Pressure: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Table 19 Scale_Pressure: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Table 20 Scale_Pressure: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Table 21 Scale_Pressure: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Table 22 Scale_Pressure: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Table 23 Meas_Acceleration: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Table 24 Meas_Acceleration: Input Parameter: SensorConfig[15:8] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Table 25 Meas_Acceleration: Input Parameter: SensorConfig[7:0] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Table 26 Meas_Acceleration: Input Parameter: SampleRate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Table 27 Meas_Acceleration: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Table 28 Meas_Acceleration: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Table 29 Meas_Acceleration: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Table 30 Meas_Temperature: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Table 31 Meas_Temperature: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Table 32 Meas_Temperature: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Table 33 Meas_Temperature: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Table 34 Raw_Temperature: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Table 35 Raw_Temperature: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Table 36 Raw_Temperature: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Table 37 Raw_Temperature: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Table 38 Comp_Temperature: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Table 39 Comp_Temperature: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Table 40 Comp_Temperature: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Table 41 Comp_Temperature: Execution Time and Charge Consumption. . . . . . . . . . . . . . . . . . . . . . . . . . 57
Table 42 Meas_Supply_Voltage: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table 43 Meas_Supply_Voltage: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Table 44 Meas_Supply_Voltage: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Table 45 Meas_Supply_Voltage: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . 60
Table 46 Start_Supply_Voltage: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Table 47 Start_Supply_Voltage: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Table 48 Start_Supply_Voltage: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Table 49 Start_Supply_Voltage: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . 63
. 59
ROM Library Function Guide 13 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
Table 50 Trig_Supply_Voltage: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Table 51 Trig_Supply_Voltage: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Table 52 Trig_Supply_Voltage: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Table 53 Trig_Supply_Voltage: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . 65
Table 54 Get_Supply_Voltage: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Table 55 Get_Supply_Voltage: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Table 56 Get_Supply_Voltage: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Table 57 Get_Supply_Voltage: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . 67
Table 58 ADC_Selftest: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Table 59 ADC_Selftest: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Table 60 ADC_Selftest: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Table 61 ADC_Selftest: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Table 62 Powerdown: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Table 63 Powerdown: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Table 64 Powerdown: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Table 65 Powerdown: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Table 66 ThermalShutdown: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Table 67 ThermalShutdown: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Table 68 ThermalShutdown: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Table 69 ThermalShutdown: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Table 70 StartXtalOsc: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Table 71 StartXtalOsc: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Table 72 StartXtalOsc: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Table 73 StartXtalOsc: Execution Time and Charge Consumption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Table 74 StopXtalOsc: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Table 75 StopXtalOsc: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Table 76 StopXtalOsc: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Table 77 StopXtalOsc: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Table 78 PLL_Ref_Signal_Check: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Table 79 PLL_Ref_Signal_Check: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Table 80 PLL_Ref_Signal_Check: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Table 81 PLL_Ref_Signal_Check: Execution Time and Charge Consumption. . . . . . . . . . . . . . . . . . . . . . . 80
Table 82 VCO_Tuning: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Table 83 VCO_Tuning: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Table 84 VCO_Tuning: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Table 85 IntervalTimerCalibration: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Table 86 IntervalTimerCalibration: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Table 87 IntervalTimerCalibration: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Table 88 IntervalTimerCalibration: Execution Time and Charge Consumption. . . . . . . . . . . . . . . . . . . . . . . 84
Table 89 LFBaudrateCalibration: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Table 90 LFBaudrateCalibration: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Table 91 LFBaudrateCalibration: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Table 92 LFBaudrateCalibration: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . 86
Table 93 SMulIntInt: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Table 94 SMulIntInt: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Table 95 SMulIntInt: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Table 96 SMulIntInt: Execution Time and Charge Consumption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Table 97 UDivLongLong: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Table 98 UDivLongLong: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Table 99 UDivLongLong: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Table 100 UDivLongLong: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
List of Tables
ROM Library Function Guide 14 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
Table 101 UDivIntInt: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Table 102 UDivIntInt: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Table 103 UDivIntInt: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Table 104 UDivIntInt: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Table 105 CRC8_Calc: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Table 106 CRC8_Calc: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Table 107 CRC8_Calc: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Table 108 CRC8_Calc: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Table 109 CRC_Baicheva_Calc: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Table 110 CRC_Baicheva_Calc: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Table 111 CRC8_Baicheva_Calc: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Table 112 CRC_Baicheva_Calc: Execution Time and Charge Consumption. . . . . . . . . . . . . . . . . . . . . . . . . 96
Table 113 Read_ID: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Table 114 Read_ID: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Table 115 Read_ID: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Table 116 Read_ID: Execution Time and Charge Consumption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Table 117 ManuRevNb: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Table 118 ManuRevNb: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Table 119 ManuRevNb: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Table 120 ManuRevNb: Execution Time and Charge Consumption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Table 121 FW_Revision_Nb: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Table 122 FW_Revision_Nb: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Table 123 FW_Revision_Nb: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Table 124 FW_Revision_Nb: Execution Time and Charge Consumption. . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Table 125 Erase_UserConfigSector: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Table 126 Erase_UserConfigSector: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Table 127 Erase_UserConfigSector: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Table 128 Erase_UserConfigSector: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . 104
Table 129 WriteFlashUserConfigurationSectorLine: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Table 130 WriteFlashUserConfigurationSectorLine: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Table 131 WriteFlashUserConfigurationSectorLine: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Table 132 WriteFlashUserConfigurationSectorLine: Execution Time and Charge Consumption . . . . . . . . . 106
Table 133 WriteFlashCodeSectorLine: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Table 134 WriteFlashCodeSectorLine: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Table 135 WriteFlashCodeSectorLine: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Table 136 WriteFlashCodeSectorLine: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . 108
Table 137 FlashSetLock: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Table 138 FlashSetLock: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Table 139 FlashSetLock: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Table 140 FlashSetLock: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Table 141 ECC_Check: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Table 142 ECC_Check: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Table 143 ECC_Check: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Table 144 ECC_Check: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Table 145 CRC16_Check: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Table 146 CRC16_Check: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Table 147 CRC16_Check: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Table 148 CRC16_Check: Execution Time and Charge Consumption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Table 149 HIRC_Clock_Check: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Table 150 HIRC_Clock_Check: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Table 151 HIRC_Clock_Check: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
List of Tables
ROM Library Function Guide 15 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
Table 152 HIRC_Clock_Check: Execution Time and Charge Consumption. . . . . . . . . . . . . . . . . . . . . . . . . 116
Table 153 GetCompValue: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Table 154 GetCompValue: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Table 155 GetCompValue: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Table 156 GetCompValue: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Table 157 Wait100usMultiples: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Table 158 Wait100usMultiples: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Table 159 Wait100usMultiples: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Table 160 Wait100usMultiples: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . 122
Table 161 Send_RF_Telegram: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Table 162 Send_RF_Telegram: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Table 163 Send_RF_Telegram: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Table 164 Send_RF_Telegram: Execution Time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Table 165 Send_RF_Telegram: Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Table 166 Internal_SFR_Refresh: Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Table 167 Internal_SFR_Refresh: Output values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Table 168 Internal_SFR_Refresh: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Table 169 Internal_SFR_Refresh: Execution Time and Charge Consumption . . . . . . . . . . . . . . . . . . . . . . . 133
List of Tables
ROM Library Function Guide 16 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
Introduction

1 Introduction

1.1 General Considerations

This document describes the ROM Library functions that are available in the SP37 Version A5 step device. When the ROM Library Function “FW_Revision_Nb()” on Page 101 is called, these devices will return the value 0A32 for the ROM revision.
In order for the application to use these ROM Library functions, the following files have to be included to the software project:
SP37_ROMLibrary.h (the header file the function prototypes)
SP37_ROMLibrary.lib (the precompiled ROM Library functions)
Notes
1. The application must ensure that no IDLE-RESUME event source is active before any call of the
ROM Library_functions.
2. All typical charge consumptions and typical execution times stated throughout this document were obtained
from measurements of 10 devices at
3. Analysis of General Register, SFR, and Stack resource usage was performed on object code generated by
Keil uVision3 (Assembler version: 8.00d, Compiler version: 8.08, Linker version: 6.05, Hex converter version: 2.6.0.1).
V
= 3.0 V and T
BAT
Ambient
= 25°C
H

1.2 Type definitions

The following table defines the parameter types used throughout this document.
Table 1 Definition of types Type Description Range
Minimum Maximum
Unsigned char 8 bit value without sign bit 0 255 Signed char 8 bit value with sign bit -128 127 Unsigned int 16 bit value without sign bit 0 65,535 Signed int 16 bit value with sign bit -32,768 32,767 Unsigned long 32 bit value without sign bit 0 4,294,967,295 Signed long 32 bit value with sign bit -2,147,483,648 2,147,483,647
The Keil C51 Compiler stores data in big endian format (MSB first).

1.3 Wakeup Handler

The Wakeup-Handler is executed every time the device wakes up from POWER DOWN state. Possible wakeup sources are listed in SP37 Datasheet [1].
Table 2 Wakeup Handler Parameter Symbol Values Unit Note / Test Condition
Min. Typ. Max.
Wakeup from POWER DOWN state (independent of Wakeup source)
t
wakeup
0.85 1.8 ms
ROM Library Function Guide 17 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
Introduction

1.4 Restricted RAM and FLASH areas

The ROM Library functions use certain address areas in RAM and FLASH. To ensure that the ROM Library functions operate properly, the application may not use these locations for storage, nor alter the contents of these memory locations

1.4.1 Restricted RAM areas

The RAM area C1H through FFH (upper 63 Bytes) of the 256 Bytes RAM is used and overwritten by the ROM Library functions.

1.4.2 Restricted FLASH areas

The FLASH area 57FAH through 57FCH is reserved for storage of the crystal frequency to be used in the application. The crystal frequency (divided by two) has to be written to that location during FLASH programming in the production in order to provide the ROM Library functions with the correct timebase for calibration purposes.
For 315 MHz applications a 19.6875 MHz crystal is used and the crystal frequency divided by two has to be written to that location.
19,687,500 Hz : 2 = 9,843,750 Hz = 963426 The values in FLASH have to be written in the following way:
Flash address 57FA
Flash address 57FBH: 34
Flash address 57FCH: 26
H
: 96
H
H
H
For 433.92 MHz applications an 18.0800 MHz crystal is used and the crystal frequency divided by two has to be written to that location.
18,080,000 Hz : 2 = 9,040,000 Hz = 89F080 The values in FLASH have to be written in the following way:
Flash address 57FA
Flash address 57FBH: F0
Flash address 57FCH: 80
H
: 89
H
H
H
The FLASH address 57FFH is reserved for Lockbyte 3. This value must not be changed by the application otherwise it might result in an unintentionally locked FLASH User Configuration Sector. Locking this sector is irreversible and shall only be done by either programming the Lockbyte 3 together with writing and locking the FLASH Code Sector or by a dedicated ROM Library function FlashSetLock().
Note: If Erase_UserConfigSector() or WriteFlashUserConfigSectorLine() are used by the application it has to
be ensured that these restricted Flash locations are restored to the proper values.
H
H
Hz
Hz

1.5 8051 Instruction Set Summary

As the SP37 incorporates an 8051 compatible microcontroller, Figure 1 shows the SP37 OpCode Map.
ROM Library Function Guide 18 Revision 1.0, 2011-12-15
SP37
0
123456789ABCDEF0
1
2
3
4
5
6
7
8
9
AJMP
page1
2/2
LCALL
addr16
3/2
RET
1/2
ACALL
page0
2/2
ACALL
page1
2/2
RRC
A
1/1
DEC
A
1/1
DEC
dir
2/1
DEC
@R0
1/1
DEC
@R1
1/1
DEC
R0
1/1
DEC
R1
1/1
DEC
R2
1/1
DEC
R3
1/1
DEC
R4
1/1
DEC
R5
1/1
DEC
R6
1/1
DEC
R7
1/1
RL
A
1/1
RLC
A
1/1
RETI
1/2
AJMP
page2
2/2
ACALL
page2
2/2
ORL
dir,A
2/1
ORL
dir,#imm
3/2
ANL
dir,A
2/1
ANL
dir,#imm
3/2
AJMP
page3
2/2
ACALL
page3
2/2
XRL
dir,A
2/1
XRL
dir,#imm
3/2
MOV
A,#imm
2/1
ORL
C,bit
2/2 *
JMP
@A+DPTR
1/2
ANL
C,bit
2/2 *
AJMP
page4
2/2
ACALL
page4
2/2
AJMP
page5
2/2
ACALL
page5
2/2
AJMP
page6
2/2
ACALL
page6
2/2
AJMP
page7
2/2
ACALL
page7
2/2
MOVC
A,@A +PC
1/2
MOVC
A,@A+DPTR
1/2
DIV
AB
1/4
MOV
dir,@R0
2/2 *
MOV
dir,@R1
2/2 *
MOV
dir,R0
2/2 *
MOV
dir,R1
2/2 *
MOV
dir,R2
2/2 *
MOV
dir,R3
2/2 *
MOV
dir,R4
2/2 *
MOV
dir,R5
2/2 *
MOV
dir,R6
2/2 *
MOV
dir,R7
2/2 *
MOV
dir,dir
3/2
MOV
bit,C
2/2 *
MOV
C,bit
2/1
INC
DPTR
1/2 *
MUL
AB
1/4
MOV
@R0,dir
2
/2*
MOV
@R1,dir
2/2 *
MOV
R0, dir
2/2 *
MOV
R1, dir
2/2 *
MOV
R2, dir
2/2 *
MOV
R3, dir
2/2 *
MOV
R4, dir
2/2 *
MOV
R5, dir
2/2 *
MOV
R6, dir
2/2 *
MOV
R7, dir
2/2 *
CPL
bit
2/1
CPL
C
1/1
CJNE
A,#imm
3/2
CJNE
A,dir
3/2
CJNE
@R0,#im m
3/2
CJNE
@R1,#imm
3/2
CJNE
R0,#imm
3/2
CJNE
R1,#imm
3/2
CJNE
R2,#imm
3/2
CJNE
R3,#imm
3/2
CJNE
R4,#imm
3/2
CJNE
R5,#imm
3/2
CJNE
R6,#imm
3/2
CJNE
R7,#imm
3/2
CLR
bit
2/1
CLR
C
1/1
SWAP
A
1/1
XCH
A,@R0
1/1
XCH
A,@R1
1/1
XCH
A,R0
1/1
XCH
A,R1
1/1
XCH
A,R2
1/1
XCH
A,R3
1/1
XCH
A,R4
1/1
XCH
A,R5
1/1
XCH
A,R6
1/1
XCH
A,R7
1/1
XCH
A,dir
2/1
SETB
bit
2/1
SETB
C
1/1
DA
A
1/1
DJNZ
dir,rel
3/2
XCHDA,
@R0
1/1
XCHD
A,@R1
1/1
DJNZ
R0, re l
2/2
DJNZ
R1, re l
2/2
DJNZ
R2, rel
2/2
DJNZ
R3, re l
2/2
DJNZ
R4, re l
2/2
DJNZ
R5, re l
2/2
DJNZ
R6, re l
2/2
DJNZ
R7, re l
2/2
MOVX
A,@R0
1/2
MOVX
A,@R1
1/2
MOVX
@R0,A
1/2
MOVX
@R1,A
1/2
CLR
A
1/1
CPL
A
1/1
MOV
@R0, A
1/1
MOV
@R1,A
1/1
MOV
R0,A
1/1
MOV
R1,A
1/1
MOV
R2,A
1/1
MOV
R3,A
1/1
MOV
R4,A
1/1
MOV
R5,A
1/1
MOV
R6,A
1/1
MOV
R7,A
1/1
MOV
A,@R0
1/1
MOV
A,@R1
1/1
MOV
A,R0
1/1
MOV
A,R1
1/1
MOV
A,R2
1/1
MOV
A,R3
1/1
MOV
A,R4
1/1
MOV
A,R5
1/1
MOV
A,R6
1/1
MOV
A,R7
1/1
MOV
A,dir
2/1
MOV
dir,A
2/1
ADD
A,@R0
1/1
ADD
A,@R1
1/1
ADD
A,R0
1/1
ADD
A,R1
1/1
ADD
A,R2
1/1
ADD
A,R3
1/1
ADD
A,R4
1/1
ADD
A,R5
1/1
ADD
A,R6
1/1
ADD
A,R7
1/1
ADD
A,dir
2/1
ADD
A,#imm
2/1
ADDC
A,@R0
1/1
ADDC
A,@R1
1/1
ADDC
A,R0
1/1
ADDC
A,R1
1/1
ADDC
A,R2
1/1
ADDC
A,R3
1/1
ADDC
A,R4
1/1
ADDC
A,R5
1/1
ADDC
A,R6
1/1
ADDC
A,R7
1/1
ADDC
A,dir
2/1
ADDC
A,#imm
2/1
ORL
A,@R0
1/1
ORL
A,@R1
1/1
ORL
A,R0
1/1
ORL
A,R1
1/1
ORL
A,R2
1/1
ORL
A,R3
1/1
ORL
A,R4
1/1
ORL
A,R5
1/1
ORL
A,R6
1/1
ORL
A,R7
1/1
ORL
A,dir
2/1
ORL
A,#imm
2/1
ANL
A,@R0
1/1
ANL
A,@R1
1/1
ANL
A,R0
1/1
ANL
A,R1
1/1
ANL
A,R2
1/1
ANL
A,R3
1/1
ANL
A,R4
1/1
ANL
A,R5
1/1
ANL
A,R6
1/1
ANL
A,R7
1/1
ANL
A,dir
2/1
ANL
A,#imm
2/1
XRL
A,@R0
1/1
XRL
A,@R1
1/1
XRL
A,R0
1/1
XRL
A,R1
1/1
XRL
A,R2
1/1
XRL
A,R3
1/1
XRL
A,R4
1/1
XRL
A,R5
1/1
XRL
A,R6
1/1
XRL
A,R7
1/1
XRL
A,dir
2/1
XRL
A,#imm
2/1
MOV
dir,#imm
3/2
MOV
@R0,#im m
2/1
MOV
@R1,#imm
2/1
MOV
R0,#imm
2/1
MOV
R1,#imm
2/1
MOV
R2,#imm
2/1
MOV
R3,#imm
2/1
MOV
R4,#imm
2/1
MOV
R5,#imm
2/1
MOV
R6,#imm
2/1
MOV
R7,#imm
2/1
SUBB
A,@R0
1/1
SUBB
A,@R1
1/1
SUBB
A,R0
1/1
SUBB
A,R1
1/1
SUBB
A,R2
1/1
SUBB
A,R3
1/1
SUBB
A,R4
1/1
SUBB
A,R5
1/1
SUBB
A,R6
1/1
SUBB
A,R7
1/1
SUBB
A,dir
2/1
SUBB
A,#imm
2/1
AJMP
page0
2/2
LJMP
addr16
3/2
RR
A
1/1
INC
A
1/1
INC
dir
2/1
INC
@R0
1/1
INC
@R1
1/1
INC
R0
1/1
INC
R1
1/1
INC
R2
1/1
INC
R3
1/1
INC
R4
1/1
INC
R5
1/1
INC
R6
1/1
INC
R7
1/1
NOP
1/1
JBC
bit,rel
3/2
JB
bit,rel
3/2
JNB
bit,rel
3/2
JC
rel
2/2
JNC
rel
2/2
JZ
rel
2/2
JNZ
rel
2/2
SJMP
rel
2/2
MOV
DPTR,# imm
3/2
ORL C,bit
2/2 *
ANL
C,bit
2/2 *
PUSH
dir
2/2 *
POP
dir
2/2 *
MOVX
A,@DPTR
1/2
MOVX
@DPTR,A
1/2
A
B
C
D
E
F
All mnemonics Copyright © 1 980 Inte l C orp ora tion.
INC
DPTR
1/2 *
mnemonic
inst. length (bytes)
inst. cycles (* indicates optimzed)
addressing mode
Least Significant Nybble
Most Significant Nybble
Tire Pressure Monitoring Sensor
Figure 1 SP37 OpCode Map
Introduction
ROM Library Function Guide 19 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
ROM Library Functions

2 ROM Library Functions

The following library functions are available for application usage:
Table 3 ROM Library functions ROM Library function Description Page
Meas_Sensor() Measures the ambient air pressure or acceleration Page 22 Meas_Pressure() Measures the ambient air pressure Page 31 Scale_Pressure() Scale pressure into a single byte for RF transmission Page 42 Meas_Acceleration() Measures the acceleration Page 45 Meas_Temperature() Measures the ambient temperature Page 51 Raw_Temperature() Measures the raw temperature Page 54 Comp_Temperature() Compensates raw temperature data Page 56 Meas_Supply_Voltage() Measures the battery voltage Page 59 Start_Supply_Voltage() These three functions perform a Battery Voltage Trig_Supply_Voltage() Page 64 Get_Supply_Voltage() Page 66 ADC_Selftest() Returns the delta of ADC test measurements Page 69 Powerdown() Forces the device to POWER DOWN state Page 71 ThermalShutdown() Forces the device to THERMAL SHUTDOWN state Page 73 StartXtalOsc() Enables the Crystal Oscillator Page 75 StopXtalOsc() Stops the Crystal Oscillator Page 77 PLL_Ref_Signal_Check() Evaluates Crystal Resonator signal Page 79 VCO_Tuning() Tunes the VCO frequency Page 81 IntervalTimerCalibration() Calibrates the Interval Timer precounter Page 83 LFBaudrateCalibration() Calibrates the LF baudrate divider Page 85 SMulIntInt() Multiplies two signed values (16 bit * 16 bit) Page 87 UDivLongLong() Divides two unsigned values (32 bit : 32 bit) Page 89 UDivIntInt() Divides two unsigned values (16 bit : 16 bit) Page 91 CRC8_Calc() Calculates an 8 Bit CRC with polynom 83 CRC_Baicheva_Calc() Calculates an 8 Bit CRC with poylnom 97 Read_ID() Returns the unique device ID Page 97 ManuRevNb() Returns the device revision number Page 99 FW_Revision_Nb() Returns the ROM- and Flash library revision number Page 101 Erase_UserConfigSector() Erases the FLASH user configuration sector Page 103 WriteFlashUserConfigSectorLine() Writes one FLASH line (32 Bytes) in the FLASH user
WriteFlashCodeSectorLine() Writes one FLASH line (32 Bytes) in the FLASH
FlashSetLock() Sets the Lockbyte to protect the User Configuration
ECC_Check() Evaluates the ECC result bit Page 111
measurement during an RF Transmission.
H
H
configuration sector
Code Sector 0.
sector
Page 62
Page 93 Page 95
Page 105
Page 107
Page 109
ROM Library Function Guide 20 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
Table 3 ROM Library functions (cont’d) ROM Library function Description Page
CRC16_Check() Evaluates the CRC16 result of a memory block Page 113 HIRC_Clock_Check() Evaluates the 12 MHz_RC_Oscillator frequency Page 115 GetCompValue() Returns a compensated value from look up table Page 117 Wait100usMultiples() Performs a delay of 100 µs multiples Page 121 Send_RF_Telegram() Configures and transmits RF frames Page 123 Internal_SFR_Refresh() Loads default values into the internal SFRs Page 132
ROM Library Functions
ROM Library Function Guide 21 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
ROM Library Functions

2.1 Meas_Sensor()

2.1.1 Description

This function performs a pressure or acceleration sensor measurement determined by SensorConfig. The pressure or acceleration result can be either:
Compensated for sensitivity, offset and temperature
Output as raw value without performing the compensation The function can measure either pressure or acceleration with up to 64 samples at a specified sample rate. The
function will return the maximum or average (arithmetic mean) pressure or acceleration value in order to compensate for noise. The function performs a new temperature measurement for compensating the pressure or acceleration measurements, unless a previously measured raw temperature value is supplied. Number of samples and raw temperature source are both determined by SensorConfig. SampleRate controls how frequently the measurement acquisitions occur and will not influence the measurement result under stable input pressure or acceleration conditions. The device is set to IDLE mode during the delay between measurement acquisitions.
In case of pressure measurement, SensorConfig can be configured to automatically determine the high/low pressure range where to perform the measurement. The choice of the pressure measurement range can also be performed manually.The pressure hysteresis thresholds can be selected: either predefined from Infineon factory­default setting, or specified when calling this function (see SensorResult).

2.1.2 Actions

Pressure Measurement
Measure pressure sensor with channel and number of samples given by SensorConfig
Check wire bonds between the ASIC and the sensor die
Average the measurement result(s), or (optionally) use the maximum raw measurement, to obtain a raw
pressure value
Sensor gain is automatically configured
(optionally) Switch between Low and High Pressure range automatically, using configured thresholds
(optionally) Perform a raw temperature measurement
(optionally) Compensate the raw pressure value Acceleration Measurement
Measure acceleration sensor with channel and number of samples given by SensorConfig
Check wire bonds between the ASIC and the sensor die & sensor beam integrity
Sensor gain is automatically configured
Average the measurement(s), or (optionally) use the maximum raw measurement, to obtain a raw acceleration
value
(optionally) Perform a raw temperature measurement
(optionally) Compensate the raw acceleration value

2.1.3 Prototype

unsigned char Meas_Sensor (unsigned int SensorConfig, unsigned char SampRate, signed int idata *SensorResult )
ROM Library Function Guide 22 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
ROM Library Functions

2.1.4 Inputs

Table 4 Meas_Sensor: Input Parameters Register / Address Type Name Description
R6 (MSB) R7 (LSB)
R5 unsigned char SampleRate Defines the number of system clock cycles
R3 signed int
*(SensorResult+2) signed int RawTemperature Previous Raw Temperature value can optionally
*(SensorResult+3) signed int LowPressureThre
*(SensorResult+4) signed int HighPressureThr
unsigned int SensorConfig Defines Sensor Configuration (refer to Table 5
and Table 6)
(12 MHz RC Oscillator) divided by 8 which is waited between consecutive measurements.
Note: Only applicable if SensorConfig.2-0
[2POWN2:0] greater than 1 Sample
SensorResult Pointer to an integer array in RAM to receive the
idata*
shold
eshold
measurement result
be used as input parameter. Refer to bit RAWTemp in SensorConfig.
(optional input parameter) Value for hysteresis (in 1/16kPa) used by the pressure auto-range selection to determine when to switch from High­to-Low. It must be specified only if the parameter SensorConfig.11 is set to 1 (Customer Configuration).
(optional input parameter) Value for hysteresis (in 1/16kPa) used by the pressure auto-range selection to determine when to switch from Low­to-High. It must be specified only if the parameter SensorConfig.11 is set to 1 (Customer Configuration).
ROM Library Function Guide 23 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
ROM Library Functions
Table 5 Meas_Sensor: Input Parameter: SensorConfig[15:8] Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 RES RES RES RES HYST ARANGE PRANGE RAWTemp
RES RES bits have to be set to 0
B
HYST Select the thresholds for pressure hysteresis:
0
: Internal Configuration:550kPa is the threshold from low to high pressure range
B
and 500kPa is the threshold from high to low pressure range. 1
: Customer Configuration - see (SensorResult+3) and (SensorResult+4)
B
ARANGE Automatic range selection for pressure measurement:
0
: Manual
B
1
: Automatic
B
If compensation is disabled (SensorConfig.6[RAW]==.1) a manual pressure range measurement is performed, using the range specified by SensorConfig.9[PRANGE]. Automatic Pressure Range is not supported for raw (uncompensated) measurements.
PRANGE Pressure range: (ignored if SensorConfig.10[ARANGE]==1)
0
: Low range (500kPa)
B
1
: High range (900kPa)
B
RAWTemp Selects source of raw temperature data for compensation
0
: Perform new raw temperature measurement
B
1
: Use raw temperature data supplied in *(SensorResult+2)
B
Table 6 Meas_Sensor: Input Parameter: SensorConfig[7:0] Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Sens_Type RAW RES RES MODE 2POWN.2 2POWN.1 2POWN.0
Sens_Type Select Pressure or Acceleration Measurement
0
: Acceleration Measurement
B
1
: Pressure Measurement
B
RAW Defines if the raw ADC result is compensated
0
: Temperature compensation is performed. Returns compensated & raw value
B
: No compensation is performed. Returns only raw value. If
1
B
SensorConfig bit RAWTemp is set to 1
, no RAW temperature measurement is
B
performed. If no compensation is performed, the autorange selection is disabled and the range has to be set manually.
Note: See Table 8 for impact on ROM Library function output
RES RES bits have to be set to 0
B
ROM Library Function Guide 24 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
ROM Library Functions
Table 6 Meas_Sensor: Input Parameter: SensorConfig[7:0] (cont’d) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Sens_Type RAW RES RES MODE 2POWN.2 2POWN.1 2POWN.0
Mode Acceleration and Pressure Mode:
0
: Average value
B
1
: Maximum value
B
2POWN[2:0] Number of ADC measurements that are taken and averaged
111
: 64 Samples
B
110
: 64 Samples
B
101
: 32 Samples
B
100
: 16 Samples
B
011
: 8 Samples
B
010
: 4 Samples
B
001
: 2 Samples
B
000
: 1 Sample
B
Table 7 Meas_Sensor: Input Parameter: SampleRate Bit7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 SR.7 SR.6 SR.5 SR.4 SR.3 SR.2 SR.1 SR0
SR[7:0] Number of systemclock cycles divided by 8 between two consecutive samples (only
applicable if more than one sample is taken): 00
: No delay (fastest possible sample rate)
H
01
..4FH: Not allowed
H
50
..FFH: 1/sample rate (sample rate in systemclocks divided by 8)
H
ROM Library Function Guide 25 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor

2.1.5 Outputs

Table 8 Meas_Sensor: Output values Register/ Address Type Name Description
R7 unsigned char StatusByte 0000.0000
*(SensorResult+0) signed int Compensated
Pressure
xxxx.xxx1 xxxx.xx1xB: Overflow of ADC Result xxxx.x1xxB: Sensor Fault Wire Bond Check xxxx.1xxx for acceleration measurement) xxx1.xxxx
If Input Bit SensorConfig.7[Sens_Type] == 1; If Input Bit SensorConfig.6[RAW] == 0: 8000 0000 7FFF ( = 2048 kPa - 1 LSB where 1 LSB = 1/16 kPa)
B
B
B
= -2048.0 kPa (Only theoretical)
H
= 0.0 kPa
H
= 2047.9375 kPa
H
ROM Library Functions
: Success
B
: Underflow of ADC Result
1)
1)
: Sensor Fault Diagnosis Resistor (only
: VMIN warning
If Input Bit SensorConfig.6[RAW] == 1:
since no compensation is performed
8000
H
Compensated Acceleration
If Input Bit SensorConfig.7[Sens_Type] == 0; If Input Bit SensorConfig.6[RAW] == 0: 8000
= -2048.0 g
H
0000
= 0.0 g
H
7FFF
= 2047.9375 g
H
( = 2048 g - 1 LSB where 1 LSB = 1/16 g)
If Input Bit SensorConfig.6[RAW] == 1: 8000
since no compensation is performed
H
*(SensorResult+1) signed int Raw Pressure 10 Bit ADC Result Value:
0000.00xx.xxxx.xxxx
B
Raw Acceleration 10 Bit ADC Result Value:
0000.00xx.xxxx.xxxx
B
*(SensorResult+2) signed int Raw Temperature If Input Bit SensorConfig.6[RAW] == 0:
16 Bit scaled signed ADC Result Value
If Input Bit SensorConfig.6[RAW] == 1: 8000
since no temperature measurement is
H
performed
1) If the sensor measurement result is within the input range for which its accuracy is specified, then the ADC
underflow/overflow condition is due to a measurement failure and the measurement results are not valid. Otherwise, if the sensor measurement result is outside of this input range, then the ADC underflow/overflow bits may be ignored.
ROM Library Function Guide 26 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor

2.1.6 Resource Usage

Table 9 Meas_Sensor: Resources Type Used or Modified
Registers R0, R1, R2, R3, R4, R5, R6, R7 SFR ACC, B, CFG0
1)
TMOD
Stack 13 Bytes2)
1) Only affected if more than 1 sample is taken
2) Two additional bytes, not included here, are needed to call the library function
1)
, CFG1, CFG2, DIVIC, DPH, DPL, PSW, TCON1), TH01), TL01),
ROM Library Functions
ROM Library Function Guide 27 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
ROM Library Functions

2.1.7 Execution Information

Table 10 Meas_Sensor: Pressure Measurement: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition
Min. Typ. Max.
Execution Time Compensated with new raw temperature measurement, 2 samples
Execution Time Compensated when supplied with previously obtained raw temperature value, 2 samples
Execution Time Raw (uncompensated) pressure result, 2 samples
Execution Time for each additional sample for averaging
Execution Time in autorange selection Compensated with new raw temperature measurement, 2 samples
Execution Time in autorange selection Compensated when supplied with previously obtained raw temperature value, 2 samples
1)
Execution Time in autorange selection for each additional sample for averaging
1)
Charge Consumption Compensated with new raw temperature measurement, 2 samples
Charge Consumption Compensated when supplied with previously obtained raw temperature value, 2 samples
Charge Consumption Raw (uncompensated) pressure result, 2 samples
Charge Consumption for each additional sample for averaging
t
comp,new
t
comp,prev
t
RAW
t
sample
916 1016 µs DIVIC = 00H,
SensorConfig = 0081 SampleRate = 00
686 768 µs DIVIC = 00H,
SensorConfig = 0181 SampleRate = 00
304 332 µs DIVIC = 00H,
SensorConfig = 00C1 SampleRate = 00
54 60 µs SampleRate = 00
,
H
H
,
H
H
,
H
H
H
Only 1, 2, 4, 8, 16, 32, 64 samples possible
t
autocomp,n
ew
1)
t
autpcomp,p
rev
t
autosample
944 1008 µs DIVIC = 00H,
SensorConfig = 0481 SampleRate = 00
714 760 µs DIVIC = 00H,
SensorConfig = 0581 SampleRate = 00
54 59 µs SampleRate = 00
,
H
H
,
H
H
H
Only 1, 2, 4, 8, 16, 32, 64 samples possible
Q
comp,new
Q
comp,prev
Q
RAW
Q
sample
1,62 2,535 µC DIVIC = 00H,
SensorConfig = 0081 SampleRate = 00
1,175 1,889 µC DIVIC = 00H,
SensorConfig = 0181 SampleRate = 00
0,549 0,821 µC DIVIC = 00H,
SensorConfig = 00C1 SampleRate = 00
0,118 0,151 µC SampleRate = 00
,
H
H
,
H
H
,
H
H
H
Only 1, 2, 4, 8, 16, 32, 64 samples possible
ROM Library Function Guide 28 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
ROM Library Functions
Table 10 Meas_Sensor: Pressure Measurement: Execution Time and Charge Consumption (cont’d) Parameter Symbol Values Unit Note / Test Condition
Min. Typ. Max.
Charge Consumption in autorange selection Compensated with new raw
Q
autpcomp,
new
1,643 2,515 µC DIVIC = 00H,
SensorConfig = 0481 SampleRate = 00
,
H
H
temperature measurement, 2 samples
Charge Consumption in autorange selection Compensated when supplied
1)
Q
autocomp,
prev
1,196 1,869 µC DIVIC = 00H,
SensorConfig = 0581 SampleRate = 00
,
H
H
with previously obtained raw temperature value, 2 samples
Charge Consumption in autorange selection for each
1)
Q
autosampl
e
0,118 0,148 µC SampleRate = 00
Only 1, 2, 4, 8, 16, 32, 64 samples possible
H
additional sample for averaging
1) The execution time and charge consumption for automatic range selection have been verified when the proper pressure
1)
range is selected.
ROM Library Function Guide 29 Revision 1.0, 2011-12-15
SP37
Tire Pressure Monitoring Sensor
ROM Library Functions
Table 11 Meas_Sensor: Acceleration Measurement: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition
Min. Typ. Max.
Execution Time Compensated with new raw temperature measurement, 2 samples
Execution Time Compensated when supplied with previously obtained raw temperature
t
comp,new
t
comp,prevt
906 1013 µs DIVIC = 00H,
SensorConfig = 0001 SampleRate = 00
652 765 µs DIVIC = 00H,
SensorConfig = 0101 SampleRate = 00
,
H
H
,
H
H
value, 2 samples Execution Time Raw
(uncompensated) acceleration result, 2 samples
Execution Time for each
t
RAW
t
sample
304 332 µs DIVIC = 00H,
SensorConfig = 0041 SampleRate = 00
64 71 µs SampleRate = 00
,
H
H
H
additional sample for averaging Charge Consumption
Compensated with new internal raw temperature measurement,
Q
comp,new
1,603 2,512 µC DIVIC = 00H,
SensorConfig = 0001 SampleRate = 00
,
H
H
2 samples Charge Consumption
Compensated when supplied with previously obtained raw
Q
comp,prev
1,122 1,866 µC DIVIC = 00H,
SensorConfig = 0101 SampleRate = 00
,
H
H
temperature value, 2 samples Charge Consumption Raw
(uncompensated) acceleration result, 2 samples
Charge Consumption for each
Q
Q
RAW
sample
0,551 0,805 µC DIVIC = 00H,
SensorConfig = 0041 SampleRate = 00
0,135 0,17 µC SampleRate = 00
,
H
H
H
additional sample for averaging
ROM Library Function Guide 30 Revision 1.0, 2011-12-15
Loading...
+ 105 hidden pages