Page 1
T P M S Tire Pressure Monitoring Sensor S P 3 7 High integrated single-chip TPMS sensor with a low power embedded micro- controller and wireless FSK/ASK UHF transmitter SP370 900kPa Version A5 R O M L i b r a r y F u n c t i o n G u i d e Revision 1.0, 2011-12-15 S e n s e &...
Page 2
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.
Page 3
SP37 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...
Tire Pressure Monitoring Sensor Introduction Introduction 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.
Flash locations are restored to the proper values. 8051 Instruction Set Summary As the SP37 incorporates an 8051 compatible microcontroller, Figure 1 shows the SP37 OpCode Map.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 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...
Page 21
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 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...
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).
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) unsigned int SensorConfig Defines Sensor Configuration (refer to Table 5 R7 (LSB) Table unsigned char SampleRate Defines the number of system clock cycles (12 MHz RC Oscillator) divided by 8 which is waited between consecutive measurements.
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 HYST ARANGE PRANGE RAWTemp RES bits have to be set to 0...
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 MODE 2POWN.2 2POWN.1 2POWN.0 Mode Acceleration and Pressure Mode:...
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 – 1016 µs DIVIC = 00...
Page 29
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 – 1,643 2,515 µC DIVIC = 00...
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 – 1013 µs DIVIC = 00 comp,new with new raw temperature...
SensorConfig can be configured to automatically determine the high/low pressure range. The choice of the pressure measurement range can also be performed manually.The pressure hysteresis thresholds detection can be selected: either predefined from Infineon factory-default setting, or specified when calling this function - see PressResult.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.2.4 Inputs Table 12 Meas_Pressure: Input Parameters Register / Address Type Name Description R6 (MSB) unsigned int SensorConfig Defines Sensor Configuration (refer to Table 13 R7 (LSB) Table unsigned char SampleRate Defines the number of system clock cycles (12 MHz RC Oscillator) divided by 8 which is waited between consecutive measurements.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions Table 13 Meas_Pressure: Input Parameter: SensorConfig[15:8] Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 HYST ARANGE PRANGE RAWTemp RES bits have to be set to 0...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions Table 14 Meas_Pressure: Input Parameter: SensorConfig[7:0] Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Sens_Type MODE 2POWN.2 2POWN.1 2POWN.0 Sens_Type Select Pressure Measurement : Pressure Measurement Defines if the raw ADC result is compensated : Temperature compensation is performed.
The Automatic Pressure Range feature is implemented as two separate pressure range calibrations within the SP37 A5 device. One calibration is optimized for a “low range” of 100-500kPa, the other for a “high range” of 500- 900kPa. When the Automatic Pressure Range feature is enabled, the SP37 applies the calibration from the most appropriate pressure range.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.2.8 Execution Information Table 18 Meas_Pressure: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Execution Time Compensated – 1017 µs DIVIC = 00 comp,new...
Page 40
SP37 Tire Pressure Monitoring Sensor ROM Library Functions Table 18 Meas_Pressure: Execution Time and Charge Consumption (cont’d) Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Charge consumption in – 1,644 2,519 µC DIVIC = 00 autocomp, automatic range selection...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.2.9 Code Example // Library function prototypes #include "SP37_ROMLibrary.h" void main() // Return value of pressure measurement is stored in StatusByte unsigned char StatusByte; // Input parameters for pressure measurement // Configure register to perform a 2-sample pressure measurement // Automatic Range Selection unsigned int SensorConfig = 0x0481;...
100…450 kPa is represented with an unsigned byte ranging from 0…255. A scale factor of 1.373 kPa/LSB is required to meet this typical requirement. The SP37 Meas_Pressure function, however, returns a signed integer value that represents pressure as 1/16 kPa/LSB. Conversion from 1/16 kPa/LSB to 1.373 kPa/LSB is therefore a commonly required task, but one that is not straightforward as care must be taken...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.3.6 Resource Usage Table 21 Scale_Pressure: Resources Type Used or Modified Registers R0, R2, R3, R4, R5, R6, R7 A, B, PSW Stack 4 bytes 1) Two additional bytes, not included here, are needed to call the library function 2.3.7...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.3.8 Code Example // Library function prototypes #include "SP37_ROMLibrary.h" void main() // Return value of pressure measurement is stored in StatusByte unsigned char StatusByte; // 8-bit pressure value is stored in PressureByte unsigned char PressureByte;...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions Meas_Acceleration() 2.4.1 Description This function performs an acceleration sensor measurement. The result can be either: • Compensated for sensitivity, offset and temperature • Output as raw value without performing the compensation The function can measure acceleration with up to 64 samples at a specified sample rate. The function will return the average (arithmetic mean) acceleration value in order to compensate for noise.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.4.4 Inputs Table 23 Meas_Acceleration: Input Parameters Register / Address Type Name Description R6 (MSB) unsigned int SensorConfig Defines Sensor Configuration (refer to Table 24 R7 (LSB) Table unsigned char SampleRate Defines the number of system clock cycles (12 MHz RC Oscillator) divided by 8 which is waited between consecutive measurements.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions Table 24 Meas_Acceleration: Input Parameter: SensorConfig[15:8] Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 RAWTemp Must be set to 0. RAWTemp Selects source of raw temperature data for compensation...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.4.7 Execution Information Table 29 Meas_Acceleration: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Execution Time Compensated – 1015 µs DIVIC = 00 comp,new...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.4.8 Code Example // Library function prototypes #include "SP37_ROMLibrary.h" void main() // Return value of acceleration measurement is stored in StatusByte unsigned char StatusByte; // Input parameters for acceleration measurement unsigned int SensorConfig = 0x0001;...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions Meas_Temperature() 2.5.1 Description This function performs a temperature measurement and returns both raw and compensated temperature results. The Compensated Temperature result is compensated for sensitivity and offset errors. The Raw Temperature result is uncompensated and may be used as input for Meas_Sensor(), Meas_Pressure(), Meas_Acceleration() and Comp_Temperature().
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.5.6 Resource Usage Table 32 Meas_Temperature: Resources Type Used or Modified Registers R0, R1, R2, R3, R4, R5, R6, R7 ACC, B, CFG0, CFG1, CFG2, DIVIC, DPH, DPL, PSW Stack 9 Bytes 1) Two additional bytes, not included here, are needed to call the library function 2.5.7...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.5.8 Code Example // Library function prototypes #include "SP37_ROMLibrary.h" void main() // Return value of temperature measurement is stored in StatusByte unsigned char StatusByte; // struct for temperature measurement results struct{ signed int Temperature;...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions Raw_Temperature() 2.6.1 Description This function performs a raw temperature measurement. The Raw Temperature result is uncompensated and may be used as input for Meas_Sensor(), Meas_Pressure(), Meas_Acceleration() and Comp_Temperature(). 2.6.2 Actions • Measures the temperature sensor with 2 ADC samples for averaging (arithmetic mean) 2.6.3...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.6.6 Resource Usage Table 36 Raw_Temperature: Resources Type Used or Modified Registers R0, R3, R4, R5, R6, R7 ACC, B, CFG0, CFG1, CFG2, DPH, DPL, PSW Stack 5 Bytes 1) Two additional bytes, not included here, are needed to call the library function 2.6.7...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions Comp_Temperature() 2.7.1 Description This function will convert a previously obtained raw temperature value into a compensated temperature value. This function can be called after a pressure, acceleration or raw temperature measurement to compensate the raw temperature.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.7.6 Resource Usage Table 40 Comp_Temperature: Resources Type Used or Modified Registers R0, R1, R2, R3, R4, R5, R6, R7 ACC, B, DPH, DPL, PSW Stack 4 Bytes 1) Two additional bytes, not included here, are needed to call the library function 2.7.7...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.7.8 Code Example // Library function prototypes #include "SP37_ROMLibrary.h" void main() // Return value of pressure and temperature measurement is stored in StatusByte unsigned char StatusByte; // Input parameters for pressure measurement unsigned int SensorConfig = 0x0081;...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions Meas_Supply_Voltage() 2.8.1 Description This function performs a battery voltage measurement and returns both raw and compensated voltage results. The compensated battery voltage result is compensated for offset error. 2.8.2 Actions • Measure the supply voltage sensor with 2 ADC samples for averaging •...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.8.6 Resource Usage Table 44 Meas_Supply_Voltage: Resources Type Used or Modified Registers R0, R1, R2, R3, R4, R5, R6, R7 ACC, B, CFG0, CFG1, CFG2, DIVIC, DPH, DPL, PSW Stack 3 Bytes 1) Two additional bytes, not included here, are needed to call the library function 2.8.7...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.8.8 Code Example // Library function prototypes #include "SP37_ROMLibrary.h" void main() // Return value of battery voltage measurement is stored in StatusByte unsigned char StatusByte; // struct for battery voltage measurement results struct{ signed int Voltage;...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions Start_Supply_Voltage() 2.9.1 Description The battery voltage typically shows a significant drop during RF transmission, when a considerable current is drawn. Calling the monolithic function Meas_Supply_Voltage() during RF transmission is often not feasible because of its execution time.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.9.6 Resource Usage Table 48 Start_Supply_Voltage: Resources Type Used or Modified Registers Stack 0 Bytes 1) Two additional bytes, not included here, are needed to call the library function 2.9.7 Execution Information...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.10 Trig_Supply_Voltage() 2.10.1 Description Trig_Supply_Voltage() is the second part of a set of three functions to measure the battery voltage during RF transmission. It is called after Start_Supply_Voltage(), and triggers an ADC battery voltage measurement. Upon the call of this function the ADC resumes from standby, performs a measurement and then goes back to standby, keeping the result.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.10.7 Execution Information Table 53 Trig_Supply_Voltage: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Execution Time – µs DIVIC = 00 DIVIC=0 – µs...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.11 Get_Supply_Voltage() 2.11.1 Description Get_Supply_Voltage() is the third part of a set of three functions to measure the battery voltage during RF transmission. It reads the measured value obtained during Trig_Supply_Voltage(), turns off the ADC, and performs battery voltage compensation.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.11.6 Resource Usage Table 56 Get_Supply_Voltage: Resources Type Used or Modified Registers R0, R1, R2, R3, R4, R5, R6, R7 ACC, B, CFG1, CFG2, DIVIC, DPH, DHL, PSW Stack 3 Bytes 1) Two additional bytes, not included here, are needed to call the library function 2.11.7...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.11.8 Code Example // Library function prototypes #include "SP37_ROMLibrary.h" void main() // Return value of battery voltage measurement is stored in StatusByte unsigned char StatusByte; // struct for battery voltage measurement results struct{ signed int Voltage;...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.12 ADC_Selftest() 2.12.1 Description The ADC self test is a combination of three measurements that use various channels as input and reference for the ADC. The output of this function is the delta deviation from the ideal value.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.12.6 Resource Usage Table 60 ADC_Selftest: Resources Type Used or Modified Registers R0, R1, R2, R3, R4, R5, R6, R7 ACC, B, CFG0, CFG1, CFG2, DIVIC, DPH, DPL,PSW Stack 7 Bytes 1) Two additional bytes, not included here, are needed to call the library function 2.12.7...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.13 Powerdown() 2.13.1 Description This function forces the device to POWER DOWN state. 2.13.2 Actions • If an RF Transmission is in process, wait until it has completed • If the SFR ITPR has been updated, wait for the Interval Timer to initialize •...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.14 ThermalShutdown() 2.14.1 Description This function forces the device to THERMAL SHUTDOWN state. The application should call this function whenever the ambient temperature is close to the maximum operating range (this can be detected by using Meas_Temperature()) to protect the device while the ambient temperature is above the specified operating conditions.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.14.7 Execution Information Table 69 ThermalShutdown: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Execution Time – µs Temp. < TMAX: function will return T<TMAX...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.15 StartXtalOsc() 2.15.1 Description This function enables the crystal oscillator clock and delays for a defined amount of time. The delay time should be long enough that the crystal oscillator is stable, which is determined by the crystal startup time (see [1]). The minimum/maximum tolerance of the delay time may be derived by considering the tolerance of the 12 MHz RC Oscillator (see [1]).
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.15.7 Execution Information Table 73 StartXtalOsc: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Execution Time – 1323 1440 µs DIVIC is 0; delay is 30 –...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.16 StopXtalOsc() 2.16.1 Description This function disables the crystal oscillator clock if no other peripherals are using it. Therefore, peripherals using the crystal oscillator should be disabled prior to calling this function.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.16.7 Execution Information Table 77 StopXtalOsc: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Execution Time – µs DIVIC = 00 Charge Consumption –...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.17 PLL_Ref_Signal_Check() 2.17.1 Description This function can be called prior to VCO_Tuning() routine to test the lowest and highest VCO tuning curves that are disjoint in terms of operating frequencies. If the PLL Lock Detector indicates lock for both of the disjoint VCO tuning curves, a malfunction of the Crystal Resonator is most likely the source of the fault.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.17.7 Execution Information Table 81 PLL_Ref_Signal_Check: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Execution Time – µs DIVIC = 00 Charge Consumption –...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.18 VCO_Tuning() 2.18.1 Description This function selects an appropriate tuning curve for the VCO and enables the PLL. If no proper tuning curve could be selected the PLL will be disabled before the function returns with an error result.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.18.6 Resource Usage Table 83 VCO_Tuning: Resources Type Used or Modified Registers R0, R1, R5, R6, R7 ACC, DIVIC, PSW, RFC Stack 4 Bytes 1) Two additional bytes, not included here, are needed to call the library function 2.18.7...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.19 IntervalTimerCalibration() 2.19.1 Description This function initiates a calibration of the Interval Timer precounter (ITPL and ITPH) to obtain a specific interval timer timebase between 1Hz and 20Hz. The function can work with both clock sources (12MHz RC Clock and Crystal clock), utilizing a special timer mode.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.19.5 Outputs Table 86 IntervalTimerCalibration: Output values Register/ Address Type Name Description signed char StatusByte StatusByte: 0: Success -1: No valid crystal frequency found in FLASH -2: Input parameter out of range 2.19.6...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.20 LFBaudrateCalibration() 2.20.1 Description Calling this function calibrates the LF baudrate divider using the crystal oscillator as a frequency reference, thus reducing the impact of offset and the current drift of the LF RC Oscillator upon the LF baudrate accuracy.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.21 SMulIntInt() (16Bit * 16Bit) 2.21.1 Description This function multiplies the first signed int value (16 bit) Multiplicand1 by the second signed int value (16bit) Multiplicand2 and produces a 32-bit signed result.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.21.7 Execution Information Table 96 SMulIntInt: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Execution Time – µs DIVIC = 00 Charge Consumption –...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.22 UDivLongLong() (32Bit : 32Bit) 2.22.1 Description This function divides the unsigned long value (32 bit) Dividend by the unsigned long value (32 bit) Divisor. 2.22.2 Actions • Perform division 2.22.3 Prototype unsigned long UDivLongLong(unsigned long idata * Dividend, unsigned long idata * Divisor) 2.22.4...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.22.7 Execution Information Table 100 UDivLongLong: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Execution Time – µs DIVIC = 00 Charge Consumption –...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.23 UDivIntInt() (16Bit : 16Bit) 2.23.1 Description This function divides the unsigned int value (16 bit) Dividend by the unsigned int value (16 bit) Divisor. 2.23.2 Actions • Perform division 2.23.3 Prototype unsigned int UDivIntInt(unsigned int Dividend, unsigned int Divisor) 2.23.4...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.23.7 Execution Information Table 104 UDivIntInt: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Execution Time – µs DIVIC = 00 Charge Consumption –...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.24 CRC8_Calc() 2.24.1 Description This function calculates the CRC-8 checksum for a memory area in RAM using a fixed polynomial (x +x+1). The CRC-8 calculation starts with a defined preload value. 2.24.2 Actions •...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.24.6 Resource Usage Table 107 CRC8_Calc: Resources Type Used or Modified Registers R0, R1, R2, R3, R4, R5, R7 ACC, PSW Stack 0 Bytes 1) Two additional bytes, not included here, are needed to call the library function 2.24.7...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.25 CRC_Baicheva_Calc() 2.25.1 Description This function calculates a 8-bit CRC checksum for a memory area in RAM using a fixed polynomial +x+1). It supports the standardized TPMS data protocol from the German Association of the Automotive Industry (VDA) and is optimal for data word length of 119 bits and below.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions Table 111 CRC8_Baicheva_Calc: Resources (cont’d) Type Used or Modified ACC, PSW Stack 0 Bytes 1) Two additional bytes, not included here, are needed to call the library function 2.25.7 Execution Information Table 112...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.26 Read_ID() 2.26.1 Description This function returns the unique serial number of the device and a product description code. 2.26.2 Actions • Read 4-byte ID • Read 1 byte product code 2.26.3...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.26.6 Resource Usage Table 115 Read_ID: Resources Type Used or Modified Registers R0, R3, R4, R5, R6, R7 ACC, DPH, DPL, PSW Stack 2 Bytes 1) Two additional bytes, not included here, are needed to call the library function 2.26.7...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.27 ManuRevNb() 2.27.1 Description This function returns the Infineon SP37 revision number 2.27.2 Actions • Read 2-byte Revision Number from ROM and return it 2.27.3 Prototype signed int ManuRevNb (void) 2.27.4 Inputs...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.27.7 Execution Information Table 120 ManuRevNb: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Execution Time – µs DIVIC = 00 Charge Consumption –...
Library code revision will be returned xxxx = SP37 FLASH Library version R6(MSB), unsigned int ROM_Rev Pointer to the RAM location where the ROM R7(LSB) idata* code revision will be returned 0A32 = SP37 ROM Library Version A5 ROM Library Function Guide Revision 1.0, 2011-12-15...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.28.6 Resource Usage Table 123 FW_Revision_Nb: Resources Type Used or Modified Registers R0, R5, R7 Stack 2 Bytes 1) Two additional bytes, not included here, are needed to call the library function 2.28.7...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.29 Erase_UserConfigSector() 2.29.1 Description This function erases the FLASH user configuration sector located at FLASH address 5780 -- 57FF if the Lockbyte 3 is not set. If Lockbyte 3 is set this function will return -1 without any action.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.29.7 Execution Information Table 128 Erase_UserConfigSector: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Execution Time – 103000 111300 µs DIVIC = 00 Charge Consumption –...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.30 WriteFlashUserConfigSectorLine() 2.30.1 Description This function writes one line in the FLASH user configuration sector located at FLASH address 5780 -- 57FF the Lockbyte 3 is not set. If Lockbyte 3 is set this function will return -1 without any action.
. If the SP37 is in RUN mode and Lockbyte 2 is not set the write is performed, otherwise this function will return -1. The line contents are verified after the entire line has been written. In the event that the write verification fails, this function will return -2.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.31.5 Outputs Table 134 WriteFlashCodeSectorLine: Output values Register/ Address Type Name Description signed char Statusbyte 0: success -1: Lockbyte 2 is set (Code Sector Lock), without writing anything; or the function was called while the device is in debug Mode.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.32 FlashSetLock() 2.32.1 Description This function sets the Lockbyte 3 which protects the User Configuration sector. This function returns -1 and has no effect if executed in DEBUG mode. Attention: This function shows only effect if the Lockbyte 2 that protects the Code Sector is set.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.33 ECC_Check() 2.33.1 Description This function evaluates the Error Code Correction (ECC) result bit. This bit shows if an error in the read/executed FLASH has been detected since the last call of this function.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.33.7 Execution Information Table 144 ECC_Check: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Execution Time – µs DIVIC = 00 Charge Consumption –...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.34 CRC16_Check() 2.34.1 Description This function computes a 16-bit CRC of a code block from a start address with a defined length from FLASH, which includes a pre-computed 16-bit CRC, which is stored in the last 2 Bytes of the memory block ((StartAddr + Length - 2) is CRC High) and ((StartAddr + Length - 1) is CRC Low).
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.34.6 Resource Usage Table 147 CRC16_Check: Resources Type Used or Modified Registers R4, R5, R6, R7 ACC, B, CRC0, CRC1, CRCD, DPH, DPL, PSW Stack 0 Bytes 1) Two additional bytes, not included here, are needed to call the library function 2.34.7...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.35 HIRC_Clock_Check() 2.35.1 Description This function measures the frequency of the 12 MHz RC Oscillator, using the crystal oscillator as a measurement standard. It evaluates whether the 12 MHz RC Oscillator is working in the specified range (see [1]).
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.36 GetCompValue() 2.36.1 Description This function retrieves an 8 bit value from a 2 dimensional lookup table depending on input values Value1 and Value2. The lookup table is a M by N matrix and can be of any size from 2 x 2 up to 15 x 15 holding 225 different values in its maximum configuration.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.36.2 Actions • Compare Value1 with defined thresholds from threshold type 1 • Compare Value2 with defined thresholds from threshold type 2 • Return compensated value 2.36.3 Prototype unsigned char GetCompValue(unsigned char code * TablePointer, unsigned char Value1, unsigned char Value2) 2.36.4...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.36.5 Outputs Table 154 GetCompValue: Output values Register/ Address Type Name Description unsigned char Compensated Value Returns the compensated value from the lookup table defined by selected column and row 2.36.6 Resource Usage...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.37 Wait100usMultiples() 2.37.1 Description This function performs a delay of 100 µs multiples. It clears the CPU clock divider SFR DIVIC, initializes the timers according to the delay time, and uses IDLE state during the delay time. In case an unexpected resume event occurs, the IDLE state will be left and the function remain in RUN state until the delay is elapsed.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.37.6 Resource Usage Table 159 Wait100usMultiples: Resources Type Used or Modified Registers R6, R7 ACC, B, CFG0, CFG2, DIVIC, DPTR, PSW, TCON, TH0, TL0, TH1, TL1, TMOD Stack 0 Bytes 1) Two additional bytes, not included here, are needed to call the library function 2.37.7...
2.38.1 Description In principle, transmission of an RF telegram using the SP37 can be divided into two distinct portions: RF Peripheral Initialization, and RF Data Transmission. In the case of the Send_RF_Telegram() function, the application program must perform the Initialization, and the Send_RF_Telegram() function addresses Data Transmission. To permit arbitrary RF telegram formats, an interpreted table-driven approach is employed.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.38.1.3 Start of Table indicator The Start of Table is always the first byte of the PDT. The Start of Table is detailed in Figure START of TABLE delayOSC n.u. Figure 17 Datagram format Bits 4..0 - delayOSC - define the delay for the StartXtalOsc() used in the RF_Transmission routine.
The random delay is obtained using the SP37 Pseudo Random Number (PRN) generator peripheral. In order to achieve some "randomness" between individual devices, it is recommended to seed the PRN generator with a value unique to each device.
SP37 Tire Pressure Monitoring Sensor ROM Library Functions END of TABLE Figure 20 End of Table The exact value of the EOT byte indicates how many times the PDT should be processed. • process Pattern Descriptor once • process Pattern Descriptor twice •...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions RF_Telegram_Function Declaration of the table: Descriptor Array Declaration of the table: Descriptor Array Declaration of the size of the array RF Transmitter Configuration (434MHz) Start of the table: Delay of OSC, Battery...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.38.3 Actions • Set the Timer mode and reload values to achieve the appropriate baudrate • Process the Pattern Descriptor Table (one or more repetitions, as determined by EOT byte) and transmit the data •...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.38.6 Outputs Table 162 Send_RF_Telegram: Output values Register/ Address Type Name Description signed char StatusByte: 0: Success -1: Error in data vector descriptor 2.38.7 Resource Usage Table 163 Send_RF_Telegram: Resources Type Used or Modified...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.38.9 Code Example // Library function prototypes #include "SP37_ROMLibrary.h" void main() // Return value of send RF telegram is stored in sendRF_StatusByte signed char sendRF_StatusByte; // Array for pattern descriptor table unsigned char idata descriptorPtr[10];...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.39 Internal_SFR_Refresh() 2.39.1 Description This function refreshes on demand all internal registers which are refreshed by reset only. 2.39.2 Actions • Loads default values into the internal SFRs which are refreshed at reset only 2.39.3...
SP37 Tire Pressure Monitoring Sensor ROM Library Functions 2.39.7 Execution Information Table 169 Internal_SFR_Refresh: Execution Time and Charge Consumption Parameter Symbol Values Unit Note / Test Condition Min. Typ. Max. Execution Time – 29,2 µs DIVIC = 00 Charge Consumption –...
SP37 Tire Pressure Monitoring Sensor Reference Documents Reference Documents This section contains documents used for cross- reference throughout this document. SP37 Datasheet ROM Library Function Guide Revision 1.0, 2011-12-15...
Page 135
. i n f i n e o n . c o m Published by Infineon Technologies AG...