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

High integrated single-chip tpms sensor with a low power embedded microcontroller and wireless fsk/ask uhf transmitter
Table of Contents

Advertisement

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
to 57FC
(LSByte). If the value found at this FLASH location is not within the range of 9 MHz to 10 MHz a default
H
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

Table 89
LFBaudrateCalibration: Input Parameters
Register / Address
R6, R7
2.20.5

Outputs

Table 90
LFBaudrateCalibration: Output values
Register/ Address
R7
ROM Library Function Guide
Type
Name
unsigned int
baudrate
Type
Name
signed char
StatusByte
Tire Pressure Monitoring Sensor
Description
Baudrate
3900dec: 3900 baud
Description
StatusByte:
0: Success
-1: XTAL frequency out of range
-2: XTAL not enabled or input parameter out of range
85
SP37
ROM Library Functions
(MSByte)
H
Revision 1.0, 2011-12-15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents