Infineon SP37 Скачать руководство пользователя страница 85

SP37

Tire Pressure Monitoring Sensor

ROM Library Functions

 

ROM Library Function Guide

85

Revision 1.0, 2011-12-15

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.
It is mandatory to call this function prior to the first use of the LF Receiver.
The calibrated SFR LFDIV value may be stored in the FLASH and loaded into SFR LFDIV anytime the
LF Receiver is operated. If this calibration is performed regularly by the application, the bitrate tolerance of the
transmitted LF data may be increased beyond the value normally specified (see 

[1]

).

Prior to calling this function the crystal oscillator must be enabled by calling StartXtalOsc() and the crystal
frequency in Hz divided by 2 has to be stored in the FLASH user configuration sector at address 57FA

H

 (MSByte)

to 57FC

H

 (LSByte). If the value found at this FLASH location is not within the range of 9 MHz to 10 MHz a default

clock frequency of 9.843750 MHz (XTAL/2 for 315 MHz carrier) is used for the tuning and the function returns an
error in the StatusByte and sets SFR LFDIV to a nominal value.

2.20.2

Actions

Set SFR LFDIV according to the current frequency of the LF RC Oscillator

2.20.3

Prototype

signed char 

LFBaudrateCalibration

(unsigned int 

baudrate

)

2.20.4

Inputs

2.20.5

Outputs

Table 89

LFBaudrateCalibration: Input Parameters

Register / Address

Type

Name

Description

R6, R7

unsigned int

baudrate

Baudrate
3900dec: 3900 baud

Table 90

LFBaudrateCalibration: Output values

Register/ Address

Type

Name

Description

R7

signed char

StatusByte

StatusByte:
0: Success
-1: XTAL frequency out of range
-2: XTAL not enabled or input parameter out of range

Содержание SP37

Страница 1: ...y Function Guide Revision 1 0 2011 12 15 SP37 High integrated single chip TPMS sensor with a low power embedded micro controller and wireless FSK ASK UHF transmitter SP370 900kPa Version A5 TPMS Tire Pressure Monitoring Sensor ...

Страница 2: ...ery 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 a...

Страница 3: ...n 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 Executi...

Страница 4: ...xRay 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 Technol...

Страница 5: ...2 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...

Страница 6: ...mp_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_Volt...

Страница 7: ...2 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 ...

Страница 8: ... 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 8...

Страница 9: ...tions 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 Inp...

Страница 10: ... 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 R...

Страница 11: ...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 ...

Страница 12: ...ly_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 Lo...

Страница 13: ...3 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_Temperatur...

Страница 14: ...ble 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_...

Страница 15: ...serConfigSector 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 Resourc...

Страница 16: ...1 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 1...

Страница 17: ...nd TAmbient 25 C 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 1 2 Type definitions The following table defines the parameter types used throughout this document The Keil C51 Compiler stores data in big endian format MSB first 1 3 Wak...

Страница 18: ... location 19 687 500 Hz 2 9 843 750 Hz 963426H Hz The values in FLASH have to be written in the following way Flash address 57FAH 96H Flash address 57FBH 34H Flash address 57FCH 26H 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 89F080H Hz The values in FLASH have to be written in t...

Страница 19: ...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...

Страница 20: ...vice 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 Mul...

Страница 21: ...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 Table 3 ROM Library functions cont d ROM Library function Description Page ...

Страница 22: ...nfigured 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...

Страница 23: ...teger array in RAM to receive the measurement result SensorResult 2 signed int RawTemperature Previous Raw Temperature value can optionally be used as input parameter Refer to bit RAWTemp in SensorConfig SensorResult 3 signed int LowPressureThre shold 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 m...

Страница 24: ...upported for raw uncompensated measurements PRANGE Pressure range ignored if SensorConfig 10 ARANGE 1 0B Low range 500kPa 1B High range 900kPa RAWTemp Selects source of raw temperature data for compensation 0B Perform new raw temperature measurement 1B Use raw temperature data supplied in SensorResult 2 Table 6 Meas_Sensor Input Parameter SensorConfig 7 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 ...

Страница 25: ...00B 1 Sample 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 00H No delay fastest possible sample rate 01H 4FH Not allowed 50H FFH 1 sample rate sample rate in systemclocks divided by 8...

Страница 26: ...then the ADC underflow overflow bits may be ignored SensorResult 0 signed int Compensated Pressure If Input Bit SensorConfig 7 Sens_Type 1 If Input Bit SensorConfig 6 RAW 0 8000H 2048 0 kPa Only theoretical 0000H 0 0 kPa 7FFFH 2047 9375 kPa 2048 kPa 1 LSB where 1 LSB 1 16 kPa If Input Bit SensorConfig 6 RAW 1 8000H since no compensation is performed Compensated Acceleration If Input Bit SensorConf...

Страница 27: ... 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 CFG01 CFG1 CFG2 DIVIC DPH DPL PSW TCON1 TH01 TL01 TMOD1 1 Only affected if more than 1 sample is taken Stack 13 Bytes2 2 Two additional bytes not included here are needed to call the library function ...

Страница 28: ...ction Compensated with new raw temperature measurement 2 samples1 tautocomp n ew 944 1008 µs DIVIC 00H SensorConfig 0481H SampleRate 00H Execution Time in autorange selection Compensated when supplied with previously obtained raw temperature value 2 samples1 tautpcomp p rev 714 760 µs DIVIC 00H SensorConfig 0581H SampleRate 00H Execution Time in autorange selection for each additional sample for a...

Страница 29: ...sly obtained raw temperature value 2 samples1 Qautocomp prev 1 196 1 869 µC DIVIC 00H SensorConfig 0581H SampleRate 00H Charge Consumption in autorange selection for each additional sample for averaging1 Qautosampl e 0 118 0 148 µC SampleRate 00H Only 1 2 4 8 16 32 64 samples possible 1 The execution time and charge consumption for automatic range selection have been verified when the proper press...

Страница 30: ...xecution Time Raw uncompensated acceleration result 2 samples tRAW 304 332 µs DIVIC 00H SensorConfig 0041H SampleRate 00H Execution Time for each additional sample for averaging tsample 64 71 µs SampleRate 00H Charge Consumption Compensated with new internal raw temperature measurement 2 samples Qcomp new 1 603 2 512 µC DIVIC 00H SensorConfig 0001H SampleRate 00H Charge Consumption Compensated whe...

Страница 31: ...fluence the measurement result under stable input pressure conditions The device is set to IDLE mode during the delay between measurement acquisitions 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 Inf...

Страница 32: ... integer array in RAM to receive the measurement result PressResult 2 signed int RawTemperature Previous Raw Temperature value can optionally be used as input parameter Refer to bit RAWTemp in SensorConfig PressResult 3 signed int LowPressureThre shold 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 ...

Страница 33: ...d from high to low pressure range 1B Customer Configuration See PressResult 3 and PressResult 4 ARANGE Automatic range selection for pressure measurement 0B Manual 1B Automatic 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 measuremen...

Страница 34: ... is performed the autorange selection is disabled and the range has be set manually Note See Table 16 for impact on ROM Library function output RES RES bits have to be set to 0B Mode Pressure Mode 0B Average value 1B Maximum value 2POWN 2 0 Number of ADC measurements that are taken and averaged 111B 64 Samples 110B 64 Samples 101B 32 Samples 100B 16 Samples 011B 8 Samples 010B 4 Samples 001B 2 Sam...

Страница 35: ...urement failure and the measurement results are not valid Otherwise if the pressure measurement result is outside of this input range then the ADC underflow overflow bits and the pressure measurement results may be ignored PressResult 0 signed int Compensated Pressure If Input Bit SensorConfig 6 RAW 0 8000H 2048 0 kPa Only theoretical 0000H 0 0 kPa 7FFFH 2047 9375 kPa 2048 kPa 1 LSB where 1 LSB 1 ...

Страница 36: ...teresis thresholds may be either the Infineon default values or values supplied as parameters to the pressure measurement functions To apply the default hysteresis values when using Automatic Pressure Range the SensorConfig 10 ARANGE bit within the SensorConfig parameter must be set to 1B and the SensorConfig 11 HYST bit within the SensorConfig parameter must be cleared to 0B For the 900kPa SP37 A...

Страница 37: ... Automatic Bit 9 will be ignored Bit 9 Pressure range valid only if Bit 10 0 0 Low e g 500 kPa 1 High e g 900 kPa Bit 7 Sensor type 0 Acceleration 1 Pressure Bit 6 Compensation selection 0 bit 10 is available for automatic range selection Compensation skipped 1 Only manual is available Compensation available Meas_Sensor _PressLow Current Pressure Range Low Range High Range Set Current Pressure Ran...

Страница 38: ...2 7 Resource Usage Table 17 Meas_Pressure Resources Type Used or Modified Registers R0 R1 R2 R3 R4 R5 R6 R7 SFR ACC B CFG01 CFG1 CFG2 DIVIC DPH DPL PSW TCON1 TH01 TL01 TMOD1 1 Only affected if more than 1 sample is taken Stack 13 Bytes2 2 Two additional bytes not included here are needed to call the library function ...

Страница 39: ...ed Pressure result with new raw temperature measurement 2 samples1 tautocomp n ew 948 1010 µs DIVIC 00H SensorConfig 0481H SampleRate 00H Execution Time in automatic range compensated when supplied with previously obtained raw temperature value 2 samples1 tautocomp p rev 716 762 µs DIVIC 00H SensorConfig 0581H SampleRate 00H Execution Time in automatic pressure range for each additional sample for...

Страница 40: ...supplied with previously obtained raw temperature value 2 samples1 Qautocomp prev 1 196 1 873 µC DIVIC 00H SensorConfig 0581H SampleRate 00H Charge Consumption in automatic pressure range for each additional sample for averaging1 Qautosampl e 0 118 0 148 µC SampleRate 00H Only 1 2 4 8 16 32 64 samples possible 1 The execution time and charge consumption for automatic range selection have been veri...

Страница 41: ...Configure register to perform a 2 sample pressure measurement Automatic Range Selection unsigned int SensorConfig 0x0481 unsigned char SampRate 0x00 struct for pressure measurement results struct signed int Pressure signed int Raw_pressure signed int Raw_temperature idata Press_Result Pressure measurement function call StatusByte Meas_Pressure SensorConfig SampRate Press_Result Pressure if StatusB...

Страница 42: ...and above 450 kPa respectively Finally to reduce the amount of data handling required by the application program note that the input value to Scale_Pressure is passed as a pointer This allows the same pointer to the Meas_Pressure output structure PressResult 0 to be re used as the input pointer to Scale_Pressure Note Scale function is intended to provide backward compatibility with SP30 100 450kPa...

Страница 43: ...sure Resources Type Used or Modified Registers R0 R2 R3 R4 R5 R6 R7 SFR A B PSW Stack 4 bytes1 1 Two additional bytes not included here are needed to call the library function Table 22 Scale_Pressure Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time t 121 133 µs DIVIC 00H Charge Consumption Q 0 188 0 317 µC DIVIC 00H ...

Страница 44: ...nt Pressure signed int Raw_pressure signed int Raw_temperature idata Press_Result Pressure measurement function call StatusByte Meas_Pressure SensorConfig SampRate Press_Result Pressure if StatusByte Pressure measurement was successful PressureByte Scale_Pressure Press_Result Pressure else Pressure measurement was not successful underflow or overflow of ADC result Sensor Fault Wire Bond Check or V...

Страница 45: ...ements unless a previously measured raw temperature value is supplied The number of samples and the 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 acceleration conditions The device is set to IDLE mode during the delay between measurement acquisitions 2 4 2 A...

Страница 46: ... 24 and Table 25 R5 unsigned char SampleRate Defines the number of system clock cycles 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 R3 signed int idata AccelResult Pointer to an integer array in RAM to receive the measurement result AccelResult 2 signed int Raw Temperature Previous Raw Tem...

Страница 47: ...rature compensation is performed Returns compensated raw value 1B No compensation is performed Returns only raw value If SensorConfig bit RAWTemp is set to 1B no RAW temperature measurement is performed Note See Table 29 for impact on ROM Library function output RES Must be set to 0B Mode Acceleration Measure Mode 0B Average value 1B Maximum value 2POWN 2 0 Number of ADC measurements that are take...

Страница 48: ...ide of this input range then the ADC underflow overflow bits and the acceleration measurement results may be ignored AccelResult 0 signed int Compensated Acceleration If Input Bit SensorConfig 6 RAW 0 8000H 2048 0 g 0000H 0 0 g 7FFFH 2047 9375 g 2048 g 1 LSB where 1 LSB 1 16 g If Input Bit SensorConfig 6 RAW 1 8000H since no compensation is performed AccelResult 1 signed int Raw Acceleration Data ...

Страница 49: ...00H Execution Time Raw uncompensated acceleration result 2 samples tRAW 304 334 µs DIVIC 00H SensorConfig 0041H SampleRate 00H Execution Time for each additional sample for averaging tsample 64 71 µs SampleRate 00H Charge Consumption Compensated with new internal raw temperature measurement 2 samples Qcomp new 1 611 2 516 µC DIVIC 00H SensorConfig 0001H SampleRate 00H Charge Consumption Compensate...

Страница 50: ...ation measurement unsigned int SensorConfig 0x0001 unsigned char SampRate 0x00 struct for acceleration measurement results struct signed int Acceleration signed int Raw_acceleration signed int Raw_temperature idata Accel_Result Acceleration measurement function call StatusByte Meas_Acceleration SensorConfig SampRate Accel_Result Acceleration if StatusByte Acceleration measurement was successful el...

Страница 51: ...e for offset using calibration data stored in FLASH Compensated Temperature 2 5 3 Prototype unsigned char Meas_Temperature signed int idata Temp_Result 2 5 4 Inputs 2 5 5 Outputs Table 30 Meas_Temperature Input Parameters Register Address Type Name Description R7 signed int idata Temp_Result Pointer to an integer array in RAM to receive the measurement result Table 31 Meas_Temperature Output value...

Страница 52: ...FR ACC B CFG0 CFG1 CFG2 DIVIC DPH DPL PSW Stack 9 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 33 Meas_Temperature Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time tcomp 668 726 µs DIVIC 00H by default 2 ADC measurements are taken and averaged Charge Consumption Qcomp 1 2 1 82 µC DIVIC...

Страница 53: ...rn value of temperature measurement is stored in StatusByte unsigned char StatusByte struct for temperature measurement results struct signed int Temperature signed int Raw_temperature idata Temp_Result Temperature measurement function call StatusByte Meas_Temperature Temp_Result Temperature if StatusByte Temperature measurement was successful else Temperature measurement was not successful underf...

Страница 54: ...for averaging arithmetic mean 2 6 3 Prototype unsigned char Raw_Temperature signed int idata TempResult 2 6 4 Inputs 2 6 5 Outputs Table 34 Raw_Temperature Input Parameters Register Address Type Name Description R7 signed int idata TempResult Pointer to an integer array in RAM to receive the measurement result Table 35 Raw_Temperature Output values Register Address Type Name Description R7 unsigne...

Страница 55: ...R ACC B CFG0 CFG1 CFG2 DPH DPL PSW Stack 5 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 37 Raw_Temperature Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time tRAW 274 299 µs DIVIC 00H by default 2 ADC measurements are taken and averaged Charge Consumption QRAW 0 513 0 773 µC DIVIC 00H by...

Страница 56: ...p_Temperature signed int idata TempRawIn signed int idata TempResult 2 7 4 Inputs 2 7 5 Outputs Table 38 Comp_Temperature Input Parameters Register Address Type Name Description R6 MSB R7 LSB signed int idata TempRawIn Raw measurement value gathered from Meas_Pressure or Meas_Acceleration or Raw_Temperature R5 signed int idata Temp_Result Pointer to an integer array in RAM to receive the measureme...

Страница 57: ...esources Type Used or Modified Registers R0 R1 R2 R3 R4 R5 R6 R7 SFR ACC B DPH DPL PSW Stack 4 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 41 Comp_Temperature Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time t 420 454 µs DIVIC 00H Charge Consumption Q 0 63 1 089 µC DIVIC 00H ...

Страница 58: ...w_pressure signed int Raw_temperature idata Press_Result struct for compensated temperature results struct signed int Temperature signed int Raw_temperature idata Temp_Result Pressure measurement function call StatusByte Meas_Pressure SensorConfig SampRate Press_Result Pressure if StatusByte Pressure measurement was successful else Pressure measurement was not successful underflow or overflow of A...

Страница 59: ...Meas_Supply_Voltage signed int idata Batt_Result 2 8 4 Inputs 2 8 5 Outputs Table 42 Meas_Supply_Voltage Input Parameters Register Address Type Name Description R7 signed int idata Batt_Result Pointer to an integer array in RAM to receive the measurement result Table 43 Meas_Supply_Voltage Output values Register Address Type Name Description R7 unsigned char StatusByte 0000 0000B Success xxxx xxx1...

Страница 60: ...7 SFR ACC B CFG0 CFG1 CFG2 DIVIC DPH DPL PSW Stack 3 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 45 Meas_Supply_Voltage Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time t 373 405 µs DIVIC 00H by default 2 ADC measurements are taken and averaged Charge Consumption Q 0 634 1 01 µC DIVIC...

Страница 61: ...Return value of battery voltage measurement is stored in StatusByte unsigned char StatusByte struct for battery voltage measurement results struct signed int Voltage signed int Raw_voltage idata Volt_Result Battery voltage measurement function call StatusByte Meas_Supply_Voltage Volt_Result Voltage if StatusByte Battery voltage measurement was successful else Battery voltage measurement was not su...

Страница 62: ...g_Supply_Voltage and Get_Supply_Voltage These functions must be called in this particular sequence and each function is separately described in detail Start_Supply_Voltage enables and configures the ADC allows settling of the analogue ADC part and places the ADC into standby state It must be called prior to calling the Trig_Supply_Voltage function 2 9 2 Actions Prepare the ADC and the Supply Volta...

Страница 63: ...oltage Trig_Supply_Voltage and Get_Supply_Voltage on Page 68 Table 48 Start_Supply_Voltage Resources Type Used or Modified Registers R7 SFR ACC Stack 0 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 49 Start_Supply_Voltage Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time t 12 13 µs DIVIC...

Страница 64: ...unction is called by the application immediately after an RF datagram byte is shifted into SFR RFD to prevent disruption of RF data transmission 2 10 2 Actions Bring ADC from standby to active state Measure the supply voltage sensor with ADC Place ADC into standby state 2 10 3 Prototype void Trig_Supply_Voltage void 2 10 4 Inputs 2 10 5 Outputs 2 10 6 Resource Usage Table 50 Trig_Supply_Voltage In...

Страница 65: ... for usage of the functions Start_Supply_Voltage Trig_Supply_Voltage and Get_Supply_Voltage on Page 68 Table 53 Trig_Supply_Voltage Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time tDIVIC 0 3 4 µs DIVIC 00H tDIVIC 3 192 208 µs DIVIC 03H Charge Consumption QDIVIC 0 0 005 0 008 µC DIVIC 00H QDIVIC 3 0 154 0 354 µC DIVIC 03H ...

Страница 66: ...et using calibration data stored in FLASH 2 11 3 Prototype unsigned char Get_Supply_Voltage signed int idata Batt_Result 2 11 4 Inputs 2 11 5 Outputs Table 54 Get_Supply_Voltage Input Parameters Register Address Type Name Description R7 signed int idata Batt_Result Pointer to an integer array in RAM to receive the measurement result Table 55 Get_Supply_Voltage Output values Register Address Type N...

Страница 67: ...s Type Used or Modified Registers R0 R1 R2 R3 R4 R5 R6 R7 SFR ACC B CFG1 CFG2 DIVIC DPH DHL PSW Stack 3 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 57 Get_Supply_Voltage Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time t 205 222 µs DIVIC 00H Charge Consumption Q 0 308 0 532 µC DIVIC 0...

Страница 68: ...Byte struct for battery voltage measurement results struct signed int Voltage signed int Raw_voltage idata Volt_Result ADC setup for supply voltage measurement is done before real time critical function is executed Start_Supply_Voltage real time critical function starts here Trig_Supply_Voltage end of real time critical function Get the measurement result after the real time critical function Stat...

Страница 69: ...ype unsigned char ADC_Selftest signed int idata Delta 2 12 4 Inputs 2 12 5 Outputs Table 58 ADC_Selftest Input Parameters Register Address Type Name Description R7 signed int idata Delta Pointer to an integer array in RAM to receive the ADC measurement result Table 59 ADC_Selftest Output values Register Address Type Name Description R7 unsigned char StatusByte 0000 0000B Success xxxx xxx1B Underfl...

Страница 70: ... R1 R2 R3 R4 R5 R6 R7 SFR ACC B CFG0 CFG1 CFG2 DIVIC DPH DPL PSW Stack 7 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 61 ADC_Selftest Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time t 645 701 µs DIVIC 00H 3 Numbers of ADC measurements are taken Charge Consumption Q 1 2 1 84 µC DIVIC 0...

Страница 71: ...een updated wait for the Interval Timer to initialize Enter POWER DOWN state 2 13 3 Prototype void Powerdown void 2 13 4 Inputs 2 13 5 Outputs 2 13 6 Resource Usage Table 62 Powerdown Input Parameters Register Address Type Name Description None Table 63 Powerdown Output values Register Address Type Name Description None Table 64 Powerdown Resources Type Used or Modified Registers SFR ACC CFG0 CFG1...

Страница 72: ... 15 2 13 7 Execution Information Table 65 Powerdown Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time t 11 36 21 6 µs DIVIC 00H ITinit 0 RFSE 1 before entering PDWN Charge Consumption Q 0 018 0 053 µC DIVIC 00H ITinit 0 RFSE 1 before entering PDWN ...

Страница 73: ...ut any action and the application program will continue uninterrupted If the temperature is above the TMAX threshold the TMAX threshold will be reduced software hysteresis and the THERMAL SHUTDOWN state is entered 2 14 2 Actions Turn on the TMAX Detector Enter THERMAL SHUTDOWN state with hysteresis if TMAX Detector is set 2 14 3 Prototype void ThermalShutdown void 2 14 4 Inputs 2 14 5 Outputs 2 14...

Страница 74: ...er Symbol Values Unit Note Test Condition Min Typ Max Execution Time tT TMAX 73 79 µs Temp TMAX function will return without any action DIVIC 00H tT TMAX 71 77 µs Temp TMAX function will enter THERMAL SHUTDOWN state DIVIC 00H Charge Consumption QT TMAX 0 109 0 188 µC Temp TMAX function will return without any action DIVIC 00H QT TMAX 0 106 0 183 µC Temp TMAX function will enter THERMAL SHUTDOWN st...

Страница 75: ...l oscillator clock Wait in IDLE for set Delay time 2 15 3 Prototype signed char StartXtalOsc unsigned char Delay 2 15 4 Inputs 2 15 5 Outputs 2 15 6 Resource Usage Table 70 StartXtalOsc Input Parameters Register Address Type Name Description R7 unsigned char Delay Delay time to wait in IDLE after XTAL is enabled Duration µs Delay x 42 67 µs Table 71 StartXtalOsc Output values Register Address Type...

Страница 76: ... characterization t30 1323 1440 µs DIVIC is 0 delay is 30 t40 1750 1901 µs DIVIC is 0 delay is 40 tdelta 52 7 56 1 µs DIVIC is 0 delta delay is 1 Charge Consumption1 Q30 1 22 2 15 µC DIVIC is 0 delay is 30 Q40 1 6 2 83 µC DIVIC is 0 delay is 40 Qdelta 0 05 0 09 µC DIVIC is 0 delta delay is 1 Library function prototypes include SP37_ROMLibrary h include Reg_SP37 h void main Return value of start xt...

Страница 77: ... 3 Prototype signed char StopXtalOsc void 2 16 4 Inputs 2 16 5 Outputs 2 16 6 Resource Usage Table 74 StopXtalOsc Input Parameters Register Address Type Name Description None Table 75 StopXtalOsc Output values Register Address Type Name Description R7 signed char StatusByte StatusByte 0 XTAL stopped 1 XTAL already off no action 2 XTAL not stopped because it is still needed e g due to an ongoing RF...

Страница 78: ...ution Time t 20 22 µs DIVIC 00H Charge Consumption Q 0 035 0 058 µC DIVIC 00H Library function prototypes include SP37_ROMLibrary h include Reg_SP37 h Defines define bitmask_TMOD_CLK 0x08 define bitmask_RFS_RFSE 0x02 void main Return value of stop xtal oscillator is stored in StatusByte signed char StatusByte while RFS bitmask_RFS_RFSE Wait for RF Transmission to end RFC 0x03 Disable PA PLL TMOD b...

Страница 79: ...st tuning curve and check the PLL Lock Detector result Select the highest tuning curve and check the PLL Lock Detector result 2 17 3 Prototype signed char PLL_Ref_Signal_Check void 2 17 4 Inputs 2 17 5 Outputs 2 17 6 Resource Usage Table 78 PLL_Ref_Signal_Check Input Parameters Register Address Type Name Description None Table 79 PLL_Ref_Signal_Check Output values Register Address Type Name Descri...

Страница 80: ...tion Guide 80 Revision 1 0 2011 12 15 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 t 273 295 µs DIVIC 00H Charge Consumption Q 0 41 0 71 µC DIVIC 00H ...

Страница 81: ...le the PLL by clearing SFR bit RFC 1 ENPLL to reduce the current consumption 2 Re Calibration of the tuning curve is necessary when VBAT changes more than 800mV or TAmbient changes more than 70 C 2 18 2 Actions Select appropriate tuning curve Enable PLL for a RF transmission Wait until PLL is locked 2 18 3 Prototype signed char VCO_Tuning void 2 18 4 Inputs 2 18 5 Outputs VCO_Tuning Output values ...

Страница 82: ... RFC Stack 4 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 84 VCO_Tuning Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time tfirstTUN 2360 2560 µs First tuning after RESET DIVIC is 00H treTUN 915 989 µs Re tuning DIVIC is 00H Charge Consumption QfirstTUN 14 2 24 1 µC First tuning after RE...

Страница 83: ...ctor at address 57FAH MSByte to 57FCH LSByte If the value found at this FLASH location is not within the range of 9 MHz to 10 MHz a default clock frequency of 9 843750 MHz XTAL 2 for 315 MHz carrier is assumed for the tuning In addition this function automatically calibrates the LF On Off Timer precounter SFR LFOOTP to 50 ms 2 19 2 Actions Calibrate the interval timer precounter SFR ITPL SFR ITPH ...

Страница 84: ...4 R5 R6 R7 SFR ACC B CFG0 DPTR ITPH ITPL LFOOTP PSW TCON TH0 TH1 TL0 TL1 TMOD Stack 2 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 88 IntervalTimerCalibration Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time1 1 Values are obtained by extrapolation not by characterization t12Mhz 1190 16...

Страница 85: ...illator must be enabled by calling StartXtalOsc and the crystal frequency in Hz divided by 2 has to be stored in the FLASH user configuration sector at address 57FAH MSByte to 57FCH LSByte If the value found at this FLASH location is not within the range of 9 MHz to 10 MHz a default clock frequency of 9 843750 MHz XTAL 2 for 315 MHz carrier is used for the tuning and the function returns an error ...

Страница 86: ...FR ACC B CFG0 DPTR LFDIV PSW TCON TMOD TH0 TH1 TL0 TL1 Stack 4 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 92 LFBaudrateCalibration Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time1 1 Values are obtained by extrapolation not by characterization tXTAL 983 1070 µs Baudrate 3900 DIVIC 00...

Страница 87: ...ong idata Product 2 21 4 Inputs 2 21 5 Outputs 2 21 6 Resource Usage Table 93 SMulIntInt Input Parameters Register Address Type Name Description R7 signed int idata Multiplicand1 Pointer to Multiplicand1 R5 signed int idata Multiplicand2 Pointer to Multiplicand2 R3 signed long idata Product Pointer to an long array in RAM to the 32 Bit multiplication Product Multiplicand1 Multiplicand2 Table 94 SM...

Страница 88: ... Function Guide 88 Revision 1 0 2011 12 15 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 t 75 81 µs DIVIC 00H Charge Consumption Q 0 112 0 194 µC DIVIC 00H ...

Страница 89: ...alue for the remainder can be found in R0 MSB R1 R2 R3 LSB 2 22 6 Resource Usage Table 97 UDivLongLong Input Parameters Register Address Type Name Description R7 unsigned long idata Dividend Pointer to 32 bit Dividend R5 unsigned long idata Divisor Pointer to 32 bit Divisor Table 98 UDivLongLong Output values Register Address Type Name Description R4 MSB R5 R6 R7 LSB unsigned long Quotient 32 bit ...

Страница 90: ...nction Guide 90 Revision 1 0 2011 12 15 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 t 387 418 µs DIVIC 00H Charge Consumption Q 0 581 1 004 µC DIVIC 00H ...

Страница 91: ...he output value for the remainder can be found in R4 MSB and R5 LSB 2 23 6 Resource Usage Table 101 UDivIntInt Input Parameters Register Address Type Name Description R6 MSB R7 LSB unsigned int Dividend 16 bit Dividend R4 MSB R5 LSB unsigned int Divisor 16 bit Divisor Table 102 UDivIntInt Output values Register Address Type Name Description R6 MSB R7 LSB unsigned int Quotient 16 bit Quotient of th...

Страница 92: ...unction Guide 92 Revision 1 0 2011 12 15 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 t 104 113 µs DIVIC 00H Charge Consumption Q 0 156 0 270 µC DIVIC 00H ...

Страница 93: ...idata BlockStart unsigned char BlockLength 2 24 4 Inputs 2 24 5 Outputs Table 105 CRC8_Calc Input Parameters Register Address Type Name Description R7 unsigned char Preload Preload Value for the CRC Calculation According to CCITT a value FFH is recommended R5 unsigned char idata BlockStart Pointer to first Byte of the Data that is to be used for calculating checksum R3 unsigned char BlockLength Le...

Страница 94: ...ed Registers R0 R1 R2 R3 R4 R5 R7 SFR ACC PSW Stack 0 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 108 CRC8_Calc Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time t 8 x 9 9 x 10 µs DIVIC 00H x is the number of bytes Charge Consumption Q 0 012 x 0 013 0 021 x 0 023 µC DIVIC 00H x is the ...

Страница 95: ...unsigned char CRC_Baicheva_Calc unsigned char Preload unsigned char idata BlockStart unsigned char BlockLength 2 25 4 Inputs 2 25 5 Outputs 2 25 6 Resource Usage Table 109 CRC_Baicheva_Calc Input Parameters Register Address Type Name Description R7 unsigned char Preload Preload Value for the CRC Calculation According to VDA protocol value AAH is used R5 unsigned char idata BlockStart Pointer to fi...

Страница 96: ...uded here are needed to call the library function Table 112 CRC_Baicheva_Calc Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time t 11 x 85 12 x 92 µs DIVIC 00H x is the number of bytes Charge Consumption Q 0 016 x 0 128 0 028 x 0 221 µC DIVIC 00H x is the number of bytes Table 111 CRC8_Baicheva_Calc Resources cont d Type Used or Modifi...

Страница 97: ...Read_ID Input Parameters Register Address Type Name Description R7 idata ID_Result Pointer to a structure according to the following definition idata struct ID_Struct unsigned long ID unsigned char ProdCode Table 114 Read_ID Input Parameters Register Address Type Name Description R7 idata ID_Result Pointer to a structure according to the following definition idata struct ID_Struct unsigned long ID...

Страница 98: ...R6 R7 SFR ACC DPH DPL PSW Stack 2 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 116 Read_ID Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time t 32 35 µs DIVIC 00H Charge Consumption Q 0 048 0 082 µC DIVIC 00H Library function prototypes include SP37_ROMLibrary h ID structure is defined i...

Страница 99: ...nt ManuRevNb void 2 27 4 Inputs 2 27 5 Outputs 2 27 6 Resource Usage Table 117 ManuRevNb Input Parameters Register Address Type Name Description None Table 118 ManuRevNb Output values Register Address Type Name Description R6 MSB R7 LSB signed int Manufacturer Revision Number 37XYH X Design Step A F Y Version 0 9 Table 119 ManuRevNb Resources Type Used or Modified Registers R6 R7 SFR ACC PSW DPTR ...

Страница 100: ... Function Guide 100 Revision 1 0 2011 12 15 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 t 9 10 µs DIVIC 00H Charge Consumption Q 0 013 0 023 µC DIVIC 00H ...

Страница 101: ... 121 FW_Revision_Nb Input Parameters Register Address Type Name Description R4 MSB R5 LSB unsigned int idata Lib_Rev Pointer to the RAM location where the FLASH Library code revision will be returned R6 MSB R7 LSB unsigned int idata ROM_Rev Pointer to the RAM location where the ROM code revision will be returned Table 122 FW_Revision_Nb Input Parameters Register Address Type Name Description R4 MS...

Страница 102: ... Table 123 FW_Revision_Nb Resources Type Used or Modified Registers R0 R5 R7 SFR ACC Stack 2 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 124 FW_Revision_Nb Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time t 12 13 µs Charge Consumption Q 0 018 0 030 µC ...

Страница 103: ...e has to be taken that ambient temperature TFL supply voltage VbatFL and Endurance EnFL are within specified range see 1 2 29 2 Actions Erase the FLASH user configuration sector 2 29 3 Prototype signed char Erase_UserConfigSector void 2 29 4 Inputs 2 29 5 Outputs 2 29 6 Resource Usage Table 125 Erase_UserConfigSector Input Parameters Register Address Type Name Description None Table 126 Erase_User...

Страница 104: ... Guide 104 Revision 1 0 2011 12 15 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 t 103000 111300 µs DIVIC 00H Charge Consumption Q 222 358 µC DIVIC 00H ...

Страница 105: ... all required environmental conditions are fulfilled Special care has to be taken that ambient temperature TFL supply voltage VbatFL and Endurance EnFL are within specified range see 1 Note Before written new data the Flash User Config Sector needs to be erased by the user 2 30 2 Actions Write one 32 Byte FLASH Line of the FLASH user configuration sector 2 30 3 Prototype signed char WriteFlashUser...

Страница 106: ...es Type Used or Modified Registers R0 R1 R2 R3 R4 R5 R6 R7 SFR ACC CFG1 CRC0 CRC1 CRCC CRCD DIVIC DPH DPL PSW TCON TH0 TH1 TL0 TL1 TMOD Stack 5 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 132 WriteFlashUserConfigurationSectorLine Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time1 1 Val...

Страница 107: ...ied after the entire line has been written In the event that the write verification fails this function will return 2 Note The application software has to ensure that Flash is only programmed or erased when all required environmental conditions are fulfilled Special care has to be taken that ambient temperature TFL supply voltage Vbat and Endurance EnFL are within specified range see 1 Note Each F...

Страница 108: ... detected 3 The StartAddress is not multiple of 32 or the StartAddress is out of range nothing was performed or Table 135 WriteFlashCodeSectorLine Resources Type Used or Modified Registers R0 R1 R2 R3 R4 R5 R6 R7 SFR ACC PSW DPTR CFG1 TCON TMOD TH0 TL0 TH1 TL1 DSR CRC0 CRC1 CRCD CRCC DIVIC Stack 5 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 136 Wri...

Страница 109: ...LASH is only programmed or erased when all required environmental conditions are fulfilled Special care has to be taken that ambient temperature TFL supply voltage VbatFL and Endurance EnFL are within specified range see 1 This function returns 1 and has no effect if executed in DEBUG mode 2 32 2 Actions Set the Lockbyte 3 protecting the User Configuration sector 2 32 3 Prototype signed char Flash...

Страница 110: ...ional bytes not included here are needed to call the library function RAM2 2 The FlashSetLock overwrites RAM addresses 0x10 to 0x8F during its execution For this reason it is recommended to perform a software reset CFG2 0 RESET 1 after this function returns 0x10 to 0x8F Table 140 FlashSetLock Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Executi...

Страница 111: ...ts two bit errors The ECC is calculated from read executed FLASH and the result is stored in the ECC result bit It cannot distinguish between a single bit or two bit error 2 33 2 Actions Check the ECC result bit 2 33 3 Prototype signed char ECC_Check void 2 33 4 Inputs 2 33 5 Outputs 2 33 6 Resource Usage Table 141 ECC_Check Input Parameters Register Address Type Name Description None Table 142 EC...

Страница 112: ...ion Min Typ Max Execution Time t 6 7 µs DIVIC 00H Charge Consumption Q 0 009 0 016 µC DIVIC 00H Library function prototypes include SP37_ROMLibrary h void main Return value of ECC check is stored in StatusByte unsigned char StatusByte ECC check function call to reset the ECC check function StatusByte ECC_Check CRC16 check function call to test User Data Sector StatusByte CRC16_Check 0x5780 0x80 EC...

Страница 113: ...2 34 2 Actions Calculate 16 bit CRC Compare CRC with pre computed CRC located in the last 2 Bytes of the code block 2 34 3 Prototype signed char CRC16_Check unsigned char code StartAddr unsigned int Length 2 34 4 Inputs 2 34 5 Outputs Table 145 CRC16_Check Input Parameters Register Address Type Name Description R6 MSB R7 LSB unsigned char code StartAddr Pointer to first Byte of the Data that is us...

Страница 114: ...le 147 CRC16_Check Resources Type Used or Modified Registers R4 R5 R6 R7 SFR ACC B CRC0 CRC1 CRCD DPH DPL PSW Stack 0 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 148 CRC16_Check Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time t 22 x 8 24 x 9 µs DIVIC 00H x is the number of bytes Char...

Страница 115: ...this FLASH location is not within the range of 9 MHz to 10 MHz a default clock frequency of 9 843750 MHz is assumed for the checking Before the function returns the previous clock settings are restored 2 35 2 Actions Check the frequency of the 12 MHz RC Oscillator using the crystal oscillator as measurement standard 2 35 3 Prototype signed char HIRC_Clock_Check void 2 35 4 Inputs 2 35 5 Outputs Ta...

Страница 116: ...ional bytes not included here are needed to call the library function Table 152 HIRC_Clock_Check Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time tOFF 3430 5210 µs DIVIC 00H XtalOSC is OFF at the start of the function Execution Time tON 820 891 µs DIVIC 00H XtalOSC is ON at the start of the function Charge Consumption QOFF 3 81 8 69 ...

Страница 117: ...kup table has to be stored in the FLASH The input values are compared against threshold points defined in the lookup table and the thresholds must be sorted in increasing order The column is chosen by Value1 thresholds and the row is selected by Value2 thresholds respectively If Value1 is lower than its lowest threshold then the left most column is selected and likewise if Value2 is lower than its...

Страница 118: ... code TablePointer unsigned char Value1 unsigned char Value2 2 36 4 Inputs Figure 15 shows how the compensated value table must appear in FLASH memory Table 153 GetCompValue Input Parameters Register Address Type Name Description R6 MSB R7 LSB unsigned char code TablePointer Pointer to the first Byte of lookup table R5 unsigned char Value1 Measured Value1 for comparison with thresholds from thresh...

Страница 119: ...r Value2 M 1 1 14 Compensated values 1 2 M for measured Value1 e g temperature V1 sorted in increasing order of Value2 e g voltage threshold Compensated values M 1 2 M for V1 1 measured Value1 V1 2 sorted in increasing order of Value2 threshold Compensated values N 2 M 1 2 M for V1 N 1 measured Value1 V1 N sorted in increasing order of Value2 threshold Compensated values N 1 M 1 2 M for V1 N measu...

Страница 120: ...eturns the compensated value from the lookup table defined by selected column and row Table 155 GetCompValue Resources Type Used or Modified Registers R0 R1 R3 R5 R6 R7 SFR ACC DPH DPL PSW SP Stack 2 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 156 GetCompValue Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Mi...

Страница 121: ...an be determined by an offset time of 28 µs plus the multiplication of the input parameter value with 100µs The maximum delay time is limited in practice by the watchdog timer which may be reset by the application prior to the function call 2 37 2 Actions Set SFR DIVIC 00B Configure timers according to the delay time Enter IDLE state Delay until timer is elapsed 2 37 3 Prototype void Wait100usMult...

Страница 122: ...tes1 1 Two additional bytes not included here are needed to call the library function Table 160 Wait100usMultiples Execution Time and Charge Consumption Parameter Symbol Values Unit Note Test Condition Min Typ Max Execution Time t100 131 138 µs DIVIC is 00H counter 1 t600 636 682 µs DIVIC is 00H counter 6 t 100 100 109 µs DIVIC is 00H counter is increased Charge Consumption Q100 0 113 0 19 µC DIVI...

Страница 123: ...Additionally if the randomized delay capability of Send_RF_Telegram is used it is strongly recommended to seed the Pseudo Random Number generator with a value unique to each sensor e g the LSB of the unique Sensor ID in order to obtain better randomization This is particularly important if the random delay is used as part of an anti collision technique to prevent overlapping RF telegrams from two ...

Страница 124: ...8 1 4 Pattern Descriptor entries In general the concept is to divide the RF telegram into blocks of similar bit encoding and modulation which can be described by one Pattern Descriptor entry A collection of Pattern Descriptors form the bulk of the PDT Consider the following example an RF telegram with some number of Manchester coded Run In or preamble bits followed by a special Start of Message sy...

Страница 125: ... to reduce overall current consumption The Delay type is detailed in Figure 19 Figure 19 Delay Type Pattern Descriptor The first byte TYPE of a Delay type Pattern Descriptor is a fixed value of DDH The second byte DURATION specifies a fixed duration of delay time in milliseconds ms The third byte RANDOM specifies the maximum duration of a randomly generated delay time in milliseconds ms The Random...

Страница 126: ...ptor once F2H process Pattern Descriptor twice FFH process Pattern Descriptor fifteen times F0H process Pattern Descriptor sixteen times For example the PDT describes a single RF telegram and if four duplicate telegrams are desired then an EOT marker of F4H is required Note that with each processing of the PDT any RANDOM delays are taken with a new random value obtained from the Random Number 2 38...

Страница 127: ... array Start of the table Delay of OSC Battery Voltage Measurement Run In TSI PatternType FSK ASK Manchester Biphase Run In TSI Pattern Length Run In TSI bits declaration Transmit Pattern Type FSK ASK Manchester Biphase Transmit Pattern Length Transmit Pattern Declaration End of the Table RF_Telegram_Function Declaration of the table Descriptor Array RF Transmitter Configuration 434MHz Start Xtal ...

Страница 128: ...ions as determined by EOT byte and transmit the data Disable the Crystal Oscillator and the RF transmitter PLL 2 38 4 Prototype signed char Send_RF_Telegram unsigned int baudrate unsigned char idata descriptorPtr 2 38 5 Inputs Table 161 Send_RF_Telegram Input Parameters Register Address Type Name Description R6 MSB R7 LSB unsigned int baudrate Baudrate bps of transmitted data R5 unsigned char idat...

Страница 129: ... ACC B CFG0 CFG1 CFG2 DIVIC DPH DPL PSW RFC RFD RFENC RFTX RFS RNGD TCON TH0 TH1 TL0 TL1 TMOD Stack 10 Bytes1 1 Two additional bytes not included here are needed to call the library function Table 164 Send_RF_Telegram Execution Time Parameter Symbol Values Unit Note Test Condition Min Typ Max Function overhead for 1 transmission burst t 1082 1176 µs 1 chip transmitted 9600 bps t 52 1 52 6 µs 1 chi...

Страница 130: ...Zload 434MHz 300 Ohm Zload 315MHz 450 Ohm 1 chip transmitted 10000 bps Q 0 267 0 446 µC PA disabled e g ASK off Q 0 418 0 598 µC SFR RFTX PAOP 00b Pout 5 dBm Zload 434MHz 500 Ohm Zload 315MHz 650 Ohm Q 0 513 0 749 µC SFR RFTX PAOP 01b Pout 8 dBm Zload 434MHz 300 Ohm Zload 315MHz 450 Ohm 1 chip transmitted 20000 bps1 1 Values are obtained by extrapolation not by characterization Q 0 134 0 249 µC PA...

Страница 131: ...r 1 0x10 Length 14 bits descriptorPtr 2 14 Data 8 bits 7 0 transmitted 01010101 descriptorPtr 3 0x55 Data 6 bits 7 2 transmitted 101001 descriptorPtr 4 0xA5 Transmit type pattern descriptor Type FSK Manchester descriptorPtr 5 0x00 Length 16 bits descriptorPtr 6 16 Data 8 bits 7 0 transmitted 10101010 descriptorPtr 7 0xAA Data 8 bits 7 0 transmitted 01010101 descriptorPtr 8 0x55 End of table patter...

Страница 132: ...al SFRs which are refreshed at reset only 2 39 3 Prototype void Internal_SFR_Refresh void 2 39 4 Inputs 2 39 5 Outputs 2 39 6 Resource Usage Table 166 Internal_SFR_Refresh Input Parameters Register Address Type Name Description None Table 167 Internal_SFR_Refresh Output values Register Address Type Name Description None Table 168 Internal_SFR_Refresh Resources Type Used or Modified Registers SFR A...

Страница 133: ...on Guide 133 Revision 1 0 2011 12 15 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 t 27 29 2 µs DIVIC 00H Charge Consumption Q 0 041 0 071 µC DIVIC 00H ...

Страница 134: ...ure Monitoring Sensor Reference Documents ROM Library Function Guide 134 Revision 1 0 2011 12 15 3 Reference Documents This section contains documents used for cross reference throughout this document 1 SP37 Datasheet ...

Страница 135: ...Published by Infineon Technologies AG w w w i n f i n e o n c o m ...

Отзывы: