Philips Semiconductors User Guide
SCN68562/
SCN26562
Dual universal serial communications controller (DUSCC)
45
b. When a character with a tagged EOM status bit is loaded into the
FIFO (BISYNC or BOP) regardless of RxFIFO full condition.
c. When the counter/timer is programmed to count received
characters and the character which causes it to reach zero count
is loaded into the FIFO (ICTSR[6]).
d. When the beginning of break is detected in ASYNC mode
regardless of the RxFIFO full condition.
If it is not reset by the CPU, RxRDY remains asserted until the FIFO
becomes empty, at which time it is automatically negated. If it is
reset by the CPU, it will remain negated regardless of the current
state of the receive FIFO, until it is asserted again due to one of the
above conditions.
The assertion of RxRDY causes an interrupt to be generated if
IER[4] and the channel’s master interrupt enable (ICR[0] or ICR[1])
are asserted.
When DMA operation is programmed, the RxRDY status bit is
routed to the DMA control circuitry for use as the channel receiver
DMA request. Assertion of RxRDY results in assertion of
RTxDRQN output.
Several status bits are appended to each character in the RxFIFO.
When the FIFO is read, causing it to be ‘popped’, the status bits
associated with the new character at the top of the RxFIFO are
logically ORed into the RSR. Therefore, the user should read RSR
before reading the RxFIFO in response to RxRDY activation. If
character-by character status is desired, the RSR should be read
and cleared each time a new character is received. The user may
elect to accumulate status over several characters or over a frame
by clearing RSR at appropriate times. This mode would normally
also be used when operating in DMA mode. If the RxFIFO is empty
when a read is attempted, and wait mode as specified in CMR2[5:3],
is not being used, a H‘FF’ is output on the data bus.
In all modes, the DUSCC protects the contents of the FIFO and the
RxSR from overrun. If a character is received while in FIFO is full
and a character is already in the RxSR waiting to be transferred into
the FIFO, the overrunning character is discarded and the
OVERRUN status bit (RSR[5]) is asserted. If the overruning
character is an end-of-message character, the character is lost but
the FIFOed EOM status bit will be asserted when the character in
the RxSR is loaded into the FIFO.
Operation of the receiver is controlled by the enable receiver
command. When this command is issued, the DUSCC goes into the
search for start bit state (ASYNC), search for SYN state (COP
modes), or search for FLAG state (BOP modes). When the disable
receiver command is issued, the receiver ceases operation
immediately. The RxFIFO is cleared on master reset, or by a rest
receiver command. However, disabling the receiver does not affect
the RxFIFO, RxRDY, or DMA request operation.
Receiver DCD and RTS Controls
If DCD enable Rx, RPR[2], is asserted, the DCD input must be
asserted and the sampling circuit detects that the DCD input has
been negated, the receiver ceases operation immediately.
Operation resumes when the sampled DCD is asserted again. A
change of state detector is provided on the DCD input of each
channel. The required duration of the DCD level change is
described in the discussion of ICTSR[5]. The user may program a
change of state to cause an interrupt to be generated (master
interrupt enable ICR[0] or [1] and IER[7] must be set) so that
appropriate action can be taken.
In ASYNC mode, RPR[4] can be programmed to control the
deactivation of the RTSN output by the receiver. RTSN can be
manually asserted and negated by writing to OMR[0]. However, the
assertion of RPR[4] causes RTS to be negated automatically upon
receipt of a valid start bit if the channel’s receive FIFO is already full.
When this occurs, the RTSN negated status bit, RSR[6], is set. This
may be used as a flow control feature to prevent overrun in the
receiver by using the RTSN output signal to control the CTSN input
of the remote transmitter. The new character will be assembled in
the RxSR, but its transfer to the FIFO will be delayed until the CPU
reads the FIFO, making the FIFO position available for the new
character.
Once enabled, receiver operation depends on channel protocol
mode. The following describes the receiver operation for the various
protocols.
RxASYNC Mode
When first enabled, the receiver goes into the search for start bit
state, looking for a High-to-Low (mark-to-space) transition of the
start bit on the RxD input. If a transition is detected, the state of the
RxD pin is sampled again each 16X clock for 71/2 clocks (16X clock
mode) or at the next rising edge of the bit time clock (1X clock
mode). If RxD is sampled High, the start bit is invalid and the
search for a valid start bit begins again.
If RxD is still Low, a valid start bit assumed and the receiver
continues to sample the input at one bit time intervals (16 periods of
the 16X Rx clock; one period of the 1X Rx clock) at the theoretical
center of the bit, until the proper number of data bits and the parity
bit (if specified) have been assembled, and the first stop bit has
been detected.
The assembled character is then transferred to the RxFIFO with
appended parity error (if parity is specified) and framing error status
bits. The DUSCC can be programmed to compare this character to
the contents of S1R. The appended character compare status bit,
RSR[7], is set if the data matches and there is no parity error.
After the stop bit is sampled, the receiver will immediately look for
the next start bit. However, if a non-zero character was received
without a stop bit (i.e., framing error) and RxD remains Low for
one-half of the bit period after the stop bit was sampled, then the
receiver operates as if a new start bit transition had been detected
at that point (one-half bit time after the stop bit was sampled).
If a break condition is detected (RxD Low for entire character time
including optional parity and first stop bit), only one character
consisting of all zeros will be loaded into the RxFIFO and break start
detect, RSR[2], will be set. The RxD input must return to a High
condition for at least one half of a bit time (16X clock mode) or for
one bit time (1X clock mode) before the break condition is
terminated and the search for the next start bit begins. At that time,
the break end detect condition, RSR[3], is set. Note that the
maximum speed in the receiver when in asynchronous mode must
not exceed 2Mbs.
Rx COP Modes
When the receiver is enabled in COP modes, it first goes into the
SYN hunt phase, testing the received data each bit time for receipt
of the appropriate SYN bit pattern, Plus parity if specified, to
establish character boundaries. Receipt of the SYN bit pattern
terminates hunt phase and places the receive in the data phase, in
which all leading SYNs are stripped and the RxFIFO begins to load
starting with the first non-SYN character. In COP single SYN
protocol mode, S1R contains the SYN character required to
establish character synchronization. In COP dual SYN and BISYNC
protocol modes, S1R and S2R contain the first and second SYN