16-22
MCF5272 User’s Manual
Operation
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.
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).
Once enabled, the autobaud detector can calculate the transmission rate only once. If a new
calculation is required, UCR[ENAB] must first be cleared and then set again. Thus, a new
UART connection cannot be hot-plugged into an active UART connection if that
connection is operating at a different rate without first reinitializing the autobaud detector.
Baudrate
Externalclockfrequency
16or1
---------------------------------------------------------------------
=
Содержание DigitalDNA ColdFire MCF5272
Страница 1: ...MCF5272UM D Rev 0 02 2001 MCF5272 ColdFire Integrated Microprocessor User s Manual ...
Страница 38: ...xxxviii MCF5272 User s Manual TABLES Table Number Title Page Number ...
Страница 58: ...1 10 MCF5272 User s Manual MCF5272 Specific Features ...
Страница 90: ...2 42 MCF5272 User s Manual Exception Processing Overview ...
Страница 96: ...3 6 MCF5272 User s Manual MAC Instruction Execution Timings ...
Страница 158: ...5 46 MCF5272 User s Manual Motorola Recommended BDM Pinout ...
Страница 184: ...7 12 MCF5272 User s Manual Interrupt Controller Registers ...
Страница 338: ...13 44 MCF5272 User s Manual Application Examples ...
Страница 414: ...18 6 MCF5272 User s Manual PWM Programming Model ...
Страница 452: ...19 38 MCF5272 User s Manual Power Supply Pins ...
Страница 482: ...20 30 MCF5272 User s Manual Reset Operation ...
Страница 492: ...21 10 MCF5272 User s Manual Non IEEE 1149 1 Operation ...
Страница 548: ...INDEX Index 12 MCF5272 User s Manual ...