EasyManuals Logo

ST SPC560P34 User Manual

ST SPC560P34
936 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #488 background imageLoading...
Page #488 background image
LIN Controller (LINFlex) RM0046
488/936 Doc ID 16912 Rev 5
Equation 31
LFDIV is an unsigned fixed point number. The 12-bit mantissa is coded in the LINIBRR and
the fraction is coded in the LINFBRR.
The following examples show how to derive LFDIV from LINIBRR and LINFBRR register
values:
Example 11Deriving LFDIV from LINIBRR and LINFBRR register values
If LINIBRR = 27d and LINFBRR = 12d, then
Mantissa (LFDIV) = 27d
Fraction (LFDIV) = 12/16 = 0.75d
Therefore LFDIV = 27.75d
Example 12Programming LFDIV from LINIBRR and LINFBRR register values
To program LFDIV = 25.62d,
LINFBRR = 16 Ă— 0.62 = 9.92, nearest real number 10d = 0xA
LINIBRR = mantissa (25.620d) = 25d = 0x19
Note: The baud counters are updated with the new value of the baud registers after a write to
LINIBRR. Hence the baud register value must not be changed during a transaction. The
LINFBRR (containing the Fraction bits) must be programmed before the LINIBRR.
Note: LFDIV must be greater than or equal to 1.5d, i.e. LINIBRR = 1 and LINFBRR = 8. Therefore,
the maximum possible baudrate is fperiph_set_1_clk / 24.
Tx/ Rx baud =
f
periph_set_1_clk
(16 Ă— LFDIV)
Table 232. Error calculation for programmed baud rates
Baud
rate
f
periph_set_1_clk
= 64 MHz f
periph_set_1_clk
= 16 MHz
Actual
Value programmed
in
the baud rate
register
% Error =
(Calculated –
Desired)
baud rate
/ Desired
baud rate
Actual
Value programmed in
the baud rate register
% Error =
(Calculated –
Desired)
baud rate
/ Desired
baud rate
LINIBRR LINFBRR LINIBRR LINFBRR
2400 2399.97 1666 11 –0.001 2399.88 416 11 –0.005
9600 9599.52 416 11 –0.005 9598.08 104 3 –0.02
10417 10416.7 384 0 –0.003 10416.7 96 0 –0.003
19200 19201.9 208 5 0.01 19207.7 52 1 0.04
57600 57605.8 69 7 0.01 57554 17 6 –0.08
115200 115108 34 12 –0.08 115108 8 11 –0.08
230400 230216 17 6 –0.08 231884 4 5 0.644
460800 460432 8 11 –0.08 457143 2 3 –0.794
921600 927536 4 5 0.644 941176 1 1 2.124

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST SPC560P34 and is the answer not in the manual?

ST SPC560P34 Specifications

General IconGeneral
BrandST
ModelSPC560P34
CategoryMicrocontrollers
LanguageEnglish

Related product manuals