English
Language : 

MCF5272CVM66 Datasheet, PDF (381/544 Pages) Freescale Semiconductor, Inc – MCF5272 ColdFire® Integrated Microprocessor
UART Modules
to improve the accuracy of the clock source as shown in the following example using a 48 MHz CLKIN
and 230kbs UART baud rate:
1. UART Divider= CLKIN / (16 x 2 x UART Baud Rate)
= 48E06 / (32 x 230E03)
= 6.52
= 6 (truncate to lowest whole number)
UDU = 0x00, UDL = 0x06
2. The truncation has resulted in an effective 8.7% error (0.52/6)
3. Using the formula Fractional Divider = (truncated remainder * 16)
= 0.52 * 16
= 8.32
= 8 (truncate to nearest whole number)
UFPD = 0x08
4. This now gives an effective total error in the baud rate as:
%Error = 100 x (Truncated remainder) / (16 x (UD + UFPD/16)]
= 100 x 0.32 / (16 x (6 + 8/16))
= 32 / 104
= 0.31%
16.5.1.2.2 External Clock
An external source clock (URT_CLK) can be used as is or divided by 16.
Baudrate = E-----x---t--e----r--n----a----l-c----l-o----c---k----f--r--e----q----u---e----n----c---y-
16or1
16.5.1.2.3 Autobaud Detection
The UART can determine the clock rate of a received character stream from the timing of the received
pattern. If UCRn[ENAB] is set, the autobaud detector searches for a low level on URT_RxD, indicating a
start bit. Start-bit length is measured until URT_RxD returns to a high level, then the transmission rate is
calculated and loaded into UDUn, UDLn, and UFPDn.
The calculated transmission rate can be determined by reading UABUn and UABLn. Errors may occur in
the calculation of high transmission rates due to distortion effects from the external drivers. If the
calculated rate is inaccurate, UDUn, UDLn, and UFPDn must be written with the appropriate value as soon
as possible to ensure that characters are properly received by the UART. The first character is always
correctly captured, even though the transmission rate is not yet calculated.
The first character must be an odd character such as ‘a’ or ‘A’ to ensure that it contains an isolated start
bit. The parity mode can be determined by monitoring subsequent characters.
The process for using the autobaud detector is as follows:
• UDUn, UDLn, and UFPDn must be initialized to 0x00.
• The receiver and transmitter clock sources must be set to TIMER (UCSR = 0xDD).
• Autobaud must be enabled (UCR[ENAB] = 1).
• The receiver must be enabled (UCR[RC] = 01).
MCF5272 ColdFire® Integrated Microprocessor User’s Manual, Rev. 3
Freescale Semiconductor
16-21