Communication Processor Module
MOTOROLA
MPC823 USER’S MANUAL
16-199
SCC2
COMMUNICATION
16
PROCESSOR
MODULE
MAX_IDL—Once a character is received, the SCC2 UART controller begins counting
any idle characters that are received. If a MAX_IDL number of idle characters is
received before the next data character, an idle timeout occurs and the buffer is closed.
This, in turn, can produce an interrupt request to the core to receive the data from the
buffer. Thus, MAX_IDL provides a convenient way to demarcate frames in UART mode.
To disable the MAX_IDL feature, simply program it to 0x0000. An idle character is
calculated the following number of bit times: 1 + data length (5, 6, 7, or 8) + 1 (if parity
bit is used) + number of stop bits (1 or 2). For example, for 8 data bits, no parity, and 1
stop bit, the character length is 10 bits.
IDLC—The RISC microcontroller uses this value to store the current idle counter value
in the MAX_IDL timeout process. IDLC is a down-counter and you do not need to
initialize or access it.
BRKCR—The SCC2 UART controller sends a break character sequence whenever a
STOP TRANSMIT command is issued to the CPCR. The number of break characters
sent by the SCC2 UART controller is determined by the value in BRKCR. For 8 data
bits, no parity, 1 stop bit, and 1 start bit, each break character is 10 bits long and
consists of all zeros.
PAREC, FRMEC, NOSEC, and BRKEC—You must initialize these 16-bit (modulo–2
16
)
counters. When the following conditions occur, they are incremented by the RISC
microcontroller.
t PAREC counts received parity errors.
t FRMEC counts received characters with framing errors.
t NOSEC counts received characters with noise errors.
t BRKEC counts the number of break conditions that occur on the RX pin. Notice that
one break condition can last for hundreds of bit times, yet this counter is
incremented only once during that period.
BRKLN—This value is used to store the length of the last break character that is
received and is as long as the break. For example, if the receive pin is low for 20 bit
times, BRKLN shows the value 0x0010. BRKLN is accurate to within one character unit
of bits. For 8 data bits, no parity, 1 stop bit, and 1 start bit, BRKLN is accurate to within
10 bits.
UADDR1, UADDR2—In multidrop mode, the SCC2 UART controller provides
automatic address recognition for two addresses. In this case, you program the lower
order bytes of UADDR1 and UADDR2 with the two preferred addresses.
TOSEQ—This value is used to transmit out-of-sequence characters in the transmit
stream. Using this field, the preferred characters can be inserted into the transmit FIFO
without affecting any transmit buffer that might currently be in progress.
CHARACTER1 to CHARACTER 8—These characters define the receive control
characters on which interrupts can be generated.
RCCM—This value is used to mask the comparison of the CHARACTER1 to
CHARACTER 8 parameters so that classes of control characters can be defined. A one
enables the bit comparison and a zero masks it.