Communication Processor Module
16-234
MPC823 USER’S MANUAL
MOTOROLA
SCC2
COMMUNICATION
16
PROCESSOR
MODULE
You can program the CPM command register with the following commands to receive data.
ENTER HUNT MODE—After the hardware or software is reset and the channel is
enabled in the PSMR–HDLC register, the channel is in receive enable mode and uses
the first buffer descriptor in the table. The ENTER HUNT MODE command is generally
used to force the HDLC receiver to stop receiving the current frame and enter hunt
mode. In hunt mode, the SCC2 HDLC controller continually scans the input datastream
for the flag sequence. After receiving the command, the current receive buffer is closed
and the CRC is reset. Further frame reception uses the next buffer descriptor.
CLOSE RX BD—This command should not be used in the HDLC protocol.
INIT RX PARAMETERS—This command initializes all the receive parameters in this
serial channel parameter RAM to their reset state and should only be issued when the
receiver is disabled. The INIT TX AND RX PARAMS command can be used to reset
the receive and transmit parameters.
16.9.16.7 SCC2 HDLC CONTROLLER ERRORS.The SCC2 HDLC controller reports
frame reception and transmission error conditions using the channel buffer descriptors, error
counters, and SCCE–HDLC register. The following transmission errors can be detected by
the SCC2 HDLC controller.
Transmitter Underrun Error
—When this error occurs, the channel terminates buffer
transmission, closes the buffer, sets the UN bit in the buffer descriptor, and generates
the TXE interrupt if it is enabled. The channel continues transmitting after it receives the
RESTART TRANSMIT command. The transmit FIFO size is 32 bytes for the serial
communication controller.
CTS Lost During Frame Transmission Error
—When this error occurs, the channel
terminates buffer transmission, closes the buffer, sets the CT bit in the buffer descriptor,
and generates the TXE interrupt if it is enabled. The channel continues transmitting
after it receives the RESTART TRANSMIT command. If this error occurs on the first or
second buffer of the frame and the RTE bit in the PSMR–HDLC is set, the channel
retransmits the frame when the CTS signal becomes active again. When you are
working in SCC2 HDLC mode with the possibility of a collision, in order to ensure the
retransmission method functions properly, the first and second data buffers should
contain more than 36 bytes of data and 20 bytes of data if multiple buffers per frame are
used. The channel also increments the retransmission counter. This requirement does
not apply to small frames that consist of a single buffer.