EasyManua.ls Logo

Freescale Semiconductor MPC5604B - Page 391

Default Icon
934 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...
MPC5604B/C Microcontroller Reference Manual, Rev. 8
380 Freescale Semiconductor
Eqn. 21-1
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 21-1. Deriving 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 21-2. Programming 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.
Table 21-1. 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 rateLINIBRR 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
Tx/ Rx baud =
f
periph_set_1_clk
(16 × LFDIV)

Table of Contents

Other manuals for Freescale Semiconductor MPC5604B

Related product manuals