
21 I2C Slave (I2CS)
21-12
EPSON
S1C17602 TECHNICAL MANUAL
5. RXOVF: set to 1 when the next data has been received before the received data is read (the received data is
overwritten) (when the clock stretch function is disabled)
RXOVF: Receive Data Overflow Bit in the I2C Slave Status (I2CS_STAT) Register (D5/0x4368)
6. BFREQ: set to 1 when a bus free request is accepted
BFREQ: Bus Free Request Bit in the I2C Slave Status (I2CS_STAT) Register (D4/0x4368)
7. DA_STOP: set to 1 if a STOP condition is detected while this module is selected as the slave device
DA_STOP: Stop Condition Detect Bit in the I2C Slave Status (I2CS_STAT) Register (D0/0x4368)
When one of the bits shown above is set to 1, BSTAT (D7/I2CS_STAT register) is set to 1 and an interrupt
signal is output to the ITC. This interrupt can be used to perform an error or terminate handling.
BSTAT: Bus Status Transition Bit in the I2C Slave Status (I2CS_STAT) Register (D7/0x4368)
Set BSTAT_IEN (D2/I2CS_ICTL register) to 1 when using this interrupt. If BSTAT_IEN is set to 0 (default),
an interrupt request by this cause will not be sent to the ITC.
BSTAT_IEN: Bus Status Interrupt Enable Bit in the I2C Slave Interrupt Control (I2CS_ICTL) Register
(D2/0x436c)
ITC registers for I2C slave interrupts
When a cause of interrupt that has been enabled occurs, the I2C slave module asserts the interrupt signal sent
to the ITC. To generate an I2C slave interrupt, set the interrupt level and enable the interrupt using the ITC
registers. Table 21.6.1 shows the control bits for the I2C slave interrupt in the ITC.
Table 21.6.1 ITC Registers
Cause of interrupt
Interrupt level setup bits
Bus status/Transmit/receive
ILV13[2:0] (D[10:8]/ITC_ILV6)
ITC_ILV6 register (0x4312)
When the I2C slave module outputs an interrupt signal, the corresponding interrupt flag is set to 1.
If the interrupt enable bit corresponding to that interrupt flag has been set to 1, the ITC sends an interrupt
request to the S1C17 Core. To disable the timer interrupt, set the interrupt enable bit to 0.
The interrupt flag is always set to 1 by the I2C slave interrupt signal, regardless of how the interrupt enable bit
is set (even when set to 0).
The interrupt level setup bits set the interrupt level (0 to 7) of the timer interrupt. If the same interrupt level is
set, the transmit/receive interrupt has highest priority and the bus status interrupt has lowest priority.
An interrupt request to the S1C17 Core is accepted only when all the conditions described below are met.
The interrupt enable bit is set to 1.
The IE (Interrupt Enable) bit of the PSR (Processor Status Register) in the S1C17 Core is set to 1.
The I2C slave interrupt has a higher interrupt level than the value that is set in the IL field of the PSR.
No other cause of interrupt having higher priority, such as NMI, has occurred.
For details on these interrupt control registers, as well as the device operation when an interrupt has occurred,
see “6. Interrupt Controller (ITC).”
Interrupt vector
The following shows the vector number and vector address for the I2C slave interrupt:
Table 21.6.2 I2C Slave Interrupt Vectors
Cause of interrupt
Vector number
Vector address
Bus status/Transmit/receive
17 (0x11)
TTBR + 0x44