Communication Processor Module
MOTOROLA
MPC823 USER’S MANUAL
16-153
BRGs
COMMUNICATION
16
PROCESSOR
MODULE
16.8.1 Autobaud Operation
Using the autobaud process, a UART determines the baud rate of its received character
stream by examining the pattern received and the timing information of that pattern. The
MPC823 baud rate generators have a built-in autobaud control function that automatically
measures the length of a start bit and modifies the baud rate accordingly. If the ATB bit in
the BRGCx register is set, the autobaud control block starts searching for a low level on the
RXD2 signal, which it assumes is the beginning of a start bit and begins counting the start
bit length. During this time, the BRG output clock toggles for 16 BRG clock cycles at the BRG
input clock rate and then stops with the BRGOx output clock in the low state.
After the RXD2 signal changes back to the high level, the autobaud control block rewrites
measurement error that occurs at high baud rates, this divide ratio written by the autobaud
controller may not be the precise, baud rate you prefer (56,600 could be the resulting baud
rate, rather than 57,600). Thus, an interrupt is provided for you in the SCCE–UART register
to signify that the BRGCx register was rewritten by the autobaud controller. When this
interrupt is recognized, you should rewrite the BRGCx with the value you prefer. It is
recommended that this be done as quickly as possible (even prior to the first character being
fully received) to ensure that all characters are recognized correctly by the UART.
Once a full character is received, you can check the software to verify that the received
character matches a predefined value (such as “a” or “A”). The software should then check
for other characters (such as “t” or “T”) and program the serial communication controller to
the preferred parity mode. You can change the parity mode in the SCC2 UART mode
Note: The serial communication controller associated with this baud rate generator
must be programmed to UART mode and have the TDCR and RDCR fields in
the GSMR_L set to the 16
× option for the autobaud function to operate correctly.
Input frequencies such as 1.32MHz, 3.68MHz, 7.36 MHz, and 14.72MHz should
be used. For autobaud to operate successfully, the serial communication
controller must be connected to the baud rate generator. For instance, SCC2
must be clocked by BRG2 to successfully perform the autobaud function. Also,
for the serial communication controller to correctly detect an autobaud lock and
generate an interrupt, it must receive three full RX clocks from the baud rate
generator before the autobaud process begins. To do this, set the ATB bit to 0
in the BRGCx register and enable the BRGx receive clock to the highest
frequency. Immediately prior to the start of the autobaud process (after device
initialization), set the ATB bit to 1.