HITACHI 394
13.4
SCI Interrupt Sources and the DMAC
The SCI has four interrupt sources in each channel: transmit-end (TEI), receive-error (ERI),
receive-data-full (RXI), and transmit-data-empty (TXI). Table 13.12 lists the interrupt sources and
indicates their priority. These interrupts can be enabled and disabled by the TIE, RIE, and TEIE
bits in the serial control register (SCR). Each interrupt request is sent separately to the interrupt
controller.
TXI is requested when the TDRE bit in the SSR is set to 1. TXI can start the direct memory access
controller (DMAC) to transfer data. TDRE is automatically cleared to 0 when the DMAC executes
the data transfer to the transmit data register (TDR).
RXI is requested when the RDRF bit in the SSR is set to 1. RXI can start the DMAC to transfer
data. RDRF is automatically cleared to 0 when the DMAC executes the data transfer to the receive
data register (RDR). ERI is requested when the ORER, PER, or FER bit in the SSR is set to 1. ERI
cannot start the DMAC.
TEI is requested when the TEND bit in the SSR is set to 1. TEI cannot start the DMAC. A TXI
interrupt indicates that transmit data writing is enabled. A TEI interrupt indicates that the transmit
operation is complete.
Table 13.12
SCI Interrupt Sources
Interrupt Source
Description
DMAC Availability
Priority
ERI
Receive error (ORER, PER, or FER)
No
High
RXI
Receive data full (RDRF)
Yes
↑
↓
TXI
Transmit data empty (TDRE)
Yes
TEND
Transmit end (TEND)
No
Low
13.5
Usage Notes
Note the following points when using the SCI.
TDR Write and TDRE Flags: The TDRE bit in the serial status register (SSR) is a status flag
indicating loading of transmit data from the TDR into the TSR. The SCI sets TDRE to 1 when it
transfers data from the TDR to the TSR. If new data is written in the TDR when TDRE is 0, the
old data stored in the TDR will be lost because these data have not yet been transferred to the
TSR. Before writing transmit data to the TDR, be sure to check that TDRE is set to 1.
Simultaneous Multiple Receive Errors: Table 13.13 indicates the state of the SSR status flags
when multiple receive errors occur simultaneously. When an overrun error occurs, the RSR
contents cannot be transferred to the RDR, so receive data is lost.