EasyManua.ls Logo

Infineon SP37 - Lfbaudratecalibration(); Description; Actions; Prototype

Infineon SP37
135 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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

Table of Contents