3.
Interrupts and continuous transmission/reception
SCI3 can carry out continuous reception using RXI and continuous transmission using TXI. These
interrupts are shown in table 10-10.
Table 10-10 Transmit/Receive Interrupts
Interrupt Flags
Interrupt Request Conditions
Notes
RXI
RDRF
When serial reception is performed The RXI interrupt routine reads the
RIE
normally and receive data is
receive data transferred to RDR and
transferred from RSR to RDR, bit
clears bit RDRF to 0. Continuous
RDRF is set to 1, and if bit RIE is
reception can be performed by repeating
set to 1 at this time, RXI is enabled
the above operations until reception of
and an interrupt is requested.
the next RSR data is completed.
(See figure 10-2 (a).)
TXI
TDRE
When TSR is found to be empty
The TXI interrupt routine writes the next
TIE
(on completion of the previous
transmit data to TDR and clears bit TDRE
transmission) and the transmit data to 0. Continuous transmission can be
placed in TDR is transferred to TSR, performed by repeating the above
bit TDRE is set to 1. If bit TIE is set operations until the data transferred to
to 1 at this time, TXI is enabled and TSR has been transmitted.
an interrupt is requested.
(See figure 10-2 (b).)
TEI
TEND
When the last bit of the character in TEI indicates that the next transmit data
TEIE
TSR is transmitted, if bit TDRE is set has not been written to TDR when the
to 1, bit TEND is set to 1. If bit TEIE last bit of the transmit character in TSR
is set to 1 at this time, TEI is
is sent.
enabled and an interrupt is
requested. (See figure 10-2 (c).)
273