MCCIRM Freescale Semiconductor / Motorola, MCCIRM Datasheet - Page 66

no-image

MCCIRM

Manufacturer Part Number
MCCIRM
Description
MCCIRM Multi-Channel Communications Interface Reference Manual
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
SCI Submodule
5.7.2 Status Flags and Interrupts
Reference Manual
66
Two status flags are associated with the SCI transmitter. These flags are
read (polled) by software to tell when the corresponding condition exists.
Alternately, an interrupt-enable bit can be set to enable each of these
status conditions to generate interrupt requests when the corresponding
condition is present. Status flags are automatically set by hardware logic
conditions, but software clears these flags, providing an interlock
mechanism for logic to know when software has noticed the status
indication. The software clearing sequence for these flags consists of
steps that normally are performed in response to the flags.
When the transmitter is first enabled, the TDRE and TC flags are
normally already set. To prevent an immediate interrupt from occurring
from these sources, read the SCSR and then write to the SCDR before
enabling the transmitter. This procedure clears the TDRE and TC flags.
The TDRE flag indicates that there is room in the transmit queue to store
another data character in the TDR. The TIE bit is the interrupt-enable bit
for TDRE. When TIE equals 0, TDRE must be polled; when TIE equals
1, an interrupt is requested whenever TDRE is set.
The TC flag indicates that the transmitter has finished transmitting
everything in its queue, including any idle preamble or break character
that has been queued. The TCIE bit is the interrupt-enable bit for the TC.
When TCIE equals 0, TC must be polled; when TCIE equals 1, an
interrupt is requested whenever TC is set.
The TC bit is useful in systems in which the SCI is driving a modem.
When TC is set at the end of a transmission, the modem can be
disabled. In older SCI systems, the TDRE status bit was the only
indication that a transmission was near completion. Since TDRE only
indicated that the last character had transferred to the transmit shift
register, software had to delay an amount of time greater than or equal
to the time it took for this last character to finish transmitting serially.
Since the delay time depended on the baud rate, it was difficult to know
when it was safe to disable the modem. The TC bit offers a more
convenient way to tell when the transmitter has completed the
transmission.
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
SCI Submodule
Multichannel Communication Interface — Rev. 1.0
MOTOROLA

Related parts for MCCIRM