MC68336/376
QUEUED SERIAL MODULE
MOTOROLA
USER’S MANUAL
Rev. 15 Oct 2000
9-30
9.4.3.6 Receiver Operation
The RE bit in SCCR1 enables (RE = 1) and disables (RE = 0) the receiver. The
receiver contains a receive serial shifter and a parallel receive data register (RDR)
located in the SCI data register (SCDR). The serial shifter cannot be directly accessed
by the CPU32. The receiver is double-buffered, allowing data to be held in the RDR
while other data is shifted in.
Receiver bit processor logic drives a state machine that determines the logic level for
each bit-time. This state machine controls when the bit processor logic is to sample
the RXD pin and also controls when data is to be passed to the receive serial shifter.
A receive time clock is used to control sampling and synchronization. Data is shifted
into the receive serial shifter according to the most recent synchronization of the
receive time clock with the incoming data stream. From this point on, data movement
is synchronized with the MCU system clock. Operation of the receiver state machine
is detailed in the QSM Reference Manual (QSMRM/AD).
The number of bits shifted in by the receiver depends on the serial format. However,
all frames must end with at least one stop bit. When the stop bit is received, the frame
is considered to be complete, and the received data in the serial shifter is transferred
to the RDR. The receiver data register flag (RDRF) is set when the data is transferred.
Noise errors, parity errors, and framing errors can be detected while a data stream is
being received. Although error conditions are detected as bits are received, the noise
flag (NF), the parity flag (PF), and the framing error (FE) flag in SCSR are not set until
data is transferred from the serial shifter to the RDR.
RDRF must be cleared before the next transfer from the shifter can take place. If
RDRF is set when the shifter is full, transfers are inhibited and the overrun error (OR)
flag in SCSR is set. OR indicates that the RDR needs to be serviced faster. When OR
is set, the data in the RDR is preserved, but the data in the serial shifter is lost.
Because framing, noise, and parity errors are detected while data is in the serial
shifter, FE, NF, and PF cannot occur at the same time as OR.
When the CPU32 reads SCSR and SCDR in sequence, it acquires status and data,
and also clears the status flags. Reading SCSR acquires status and arms the clearing
mechanism. Reading SCDR acquires data and clears SCSR.
When RIE in SCCR1 is set, an interrupt request is generated whenever RDRF is set.
Because receiver status flags are set at the same time as RDRF, they do not have sep-
arate interrupt enables.
9.4.3.7 Idle-Line Detection
During a typical serial transmission, frames are transmitted isochronally and no idle
time occurs between frames. Even when all the data bits in a frame are logic ones, the
start bit provides one logic zero bit-time during the frame. An idle line is a sequence of
contiguous ones equal to the current frame size. Frame size is determined by the state
of the M bit in SCCR1.