391
15.5 I
2
C Interrupts
15.5 I
2
C Interrupts
The I
2
C interface may generate an interrupt request when the data transfer is
completed, a bus error has occurred, or a timeout is detected.
I
Interrupt at Bus Error
When the following conditions are met, a bus error is assumed to have occurred and the I
2
C
interface is stopped.
1. When a stop condition is detected in master mode.
2. When a start or stop condition is detected when the first byte is being transmitted and
received.
3. When a start or stop condition is detected when data (excluding the first bit of start, stop, and
data) is being transmitted and received.
If the bus error interrupt request enable bit is enabled (IBCR: BEIE = 1) at this time, an interrupt
request is output to the CPU. Clear the interrupt request by writing "0" to the BER bit in the
interrupt processing routine.
If a bus error has occurred in spite of the BEIE bit value, the BER bit is set to "1".
I
Interrupt at Data Transfer Completion
When data transfer is completed and the transfer end interrupt request enable bit is enabled
(IBCR: INTE = 1), an interrupt request (IRQ9) is output to the CPU. Clear the interrupt request
by writing "0" to the INT bit in the interrupt processing routine.
If data transfer is completed in spite of the INTE bit value, the INT bit is set to "1".
I
Interrupt at Timeout Detection
If the specified timeout time has expired when the timeout detection function is enabled (ITCR:
TS0 to TS2 is other than "000"), a timeout interrupt is generated (IRQA). The timeout can be
checked with each interrupt request flag of the I
2
C bus status register (ITSR). When the timeout
detection extended bit (ITOR: EXT) is set, the bus is also monitored in a mode other than
master/slave mode.
I
Register and Vector Table Address Related to Interrupt of I
2
C
For interrupt operation, see Section 3.4.2 "Interrupt Processing.
Table 15.5-1 Register and Vector Table Address Related to Interrupt of I
2
C
Interrupt
name
Interrupt level setting register
Vector table address
Register
Bit to be set
Upper
Lower
IRQ9
ILR3 (007DH)
L91 (bit 3)
L90 (bit 2)
FFE8H
FFE9H
IRQA
ILR3 (007DH)
LA1 (bit 5)
LA0 (bit 4)
FFE6H
FFE7H