Communication Processor Module
MOTOROLA
MPC823 USER’S MANUAL
16-201
SCC2
COMMUNICATION
16
PROCESSOR
MODULE
16.9.15.6 SCC2 UART COMMANDS. You can program the CPM command register
(CPCR) with the following commands to transmit data.
STOP TRANSMIT—After a hardware or software reset and a channel is enabled in the
PSMR–SCC2 UART register, the channel is in transmit enable mode and starts polling
the first buffer descriptor in the table every eight transmit clocks. This command
disables the transmission of characters on the transmit channel and if it is received by
the SCC2 UART controller while a message is transmitting, the message is aborted.
The SCC2 UART controller finishes transmitting data that is already transferred to its
FIFO and then stops. The TBPTR is not incremented, as shown in
a programmable number of break sequences and starts transmitting idles. The number
of break sequences (which can be zero) should be written to the BRKCR before this
command is given to the SCC2 UART controller.
GRACEFUL STOP TRANSMIT—This command is used to stop transmitting smoothly,
rather than abruptly. It is similar to the way the STOP TRANSMIT command finishes. It
stops after the current buffer has completed transmission or immediately if there is no
buffer being transmitted. The GRA bit in the SCCE–UART register is set once this
transmission stops. Then the UART transmit parameters, including the buffer
descriptors, can be modified. The TBPTR points to the next TX buffer descriptor in the
table. Transmission begins once the R bit of the next buffer descriptor is set and the
RESTART TRANSMIT command is issued.
RESTART TRANSMIT—This command enables characters to be transmitted on the
transmit channel. The SCC2 UART controller expects this command after it disables
the channel in its PSMR–SCC2 UART register, after a STOP TRANSMIT command,
after a GRACEFUL STOP TRANSMIT command, or after a transmitter error. The
SCC2 in UART mode resumes transmission from the current TBPTR in the channel’s
TX buffer descriptor table.
INIT TX PARAMETERS—This command initializes all transmit parameters in the serial
channel’s parameter RAM to their reset state and should only be issued when the
transmitter is disabled. Notice that the INIT TX AND RX PARAMS command can be
used to reset both the transmit and receive parameters.
You can program the CPCR with the following commands to receive data.
ENTER HUNT MODE—After the hardware or software is reset and a channel is
descriptor in the table. This command forces the SCC2 UART controller to close the
current RX buffer descriptor if it is being used and enter hunt mode. The SCC2 UART
controller continues receiving the next buffer descriptor if a message is in progress. In
the multidrop hunt mode, the SCC2 UART controller continually scans the input
datastream for the address character. When it is not in multidrop mode, it waits for the
idle sequence (one character of idle) and does not lose any data that was in the receive
FIFO when this command was executed.