Asynchronous Serial Ports (UARTs)
13-16
Am186™CC/CH/CU Microcontrollers User’s Manual
13.5.5.2
Receiver Bit Sampling
Whenever the receiver is enabled and is not in-frame (i.e., no data frame is currently being
received), it remains in a Search-for-start-bit mode. In this mode, the receiver looks for a
High to Low transition of the RXD input. This sampling is done based on the divided Baud
Clock. When a transition is detected, the receiver waits one-half bit-time, until the expected
midpoint of the start bit, then resamples the RXD input. If RXD is sampled Low, a valid start
bit has been detected and the receiver enters In-Frame mode. If RXD is sampled High, it
is assumed that the initial transition was a glitch and the receiver remains in Search-For-
Start-Bit mode. While in In-Frame mode, the receiver samples each bit one time at the
expected midpoint for that bit.
When the High-Speed UART is configured in Autobaud mode, the High-Speed UART uses
the undivided autobaud clock during the search for the High-to-Low transition while in
Search-For-Start-Bit mode. When the transition is detected, the receiver enters Start-Bit-
Calibration mode. In this mode, the undivided autobaud clock is used to time the duration
from the detection of the initial falling edge to the next rising edge of RXD. The number of
autobaud clocks is divided by 16 and written to the baud divisor register. If the autobaud
registers (HSPAB3–HSPAB0) are active, the value written to the baud divisor register may
be provided by one of these registers. In either case, the receiver enters normal In-Frame
mode, as with frames that do not use autobaud, and the new value of the baud divisor is
used to generate the baud clock for the next and subsequent bits.
13.5.5.3
Detecting the Baud Rate Automatically (High-Speed UART Only)
The High-Speed UART supports automatic baud rate detection (autobaud) by setting the
ABAUD bit in the HSPCON1 register to 1. When in autobaud mode, the detection of a
transmission from High to Low on the receive data signal causes the baud rate timer to
begin counting. A transition from Low to High stops the baud rate timer and causes the
serial port to exit autobaud mode. The baud rate timer runs at the processor clock or at the
external serial port clock rate if enabled (via the XTRN bit in the HSPCON1 register). The
closest possible baud-rate divisor is determined (rounded) and automatically programmed
into the Baud Rate Divisor (HSPBDV) register. The data is reported in the Receive Data
(HSPRXD) register and can be read by software.
For automatic baud rate detection to function correctly, the first data sent must be a Low
bit (the start bit) followed by a High bit (the least significant bit of the data). This allows the
use of the Hayes AT interface, which requires the initial character to be an ascii character a.
Although a framing error
may result, software should check the value of the initial character
to verify that it matches the expected character.
There is no automatic determination of parity use or sense, word length, or number of stop
bits.
Figure 13-7 shows the possible error ranges that exist over 167 implied baud divisors. The
worst-case % error occurs when the baud rate expected requires a real number baud divisor
that lies halfway between two integer baud divisors and is rounded up. Assuming 0.3%
error is an acceptable error per bit, autobaud mode that selects a divisor above 166 should
always yield acceptable results. For baud rates that require a baud divisor of less than 166,
the end user must determine whether the High-Speed UART autobaud capability is
appropriate for the application. Figure 13-8 illustrates autobaud detection under various
frequencies.
Содержание Am186 CC
Страница 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Страница 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Страница 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Страница 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Страница 39: ...Architectural Overview Am186 CC CH CU Microcontrollers User s Manual 1 15 Figure 1 6 32 Channel Linecard CH CC...
Страница 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Страница 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Страница 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Страница 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Страница 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...