
If the
RD_REQ
and/or
TX_ABRT
interrupts have been masked, then clearing of the
IC_RAW_INTR_STAT
register will have already been performed when either the
R_RD_REQ
or
R_TX_ABRT
bit has been read
as 1. †
7. The I
2
C controller transmits the byte. †
8. The master may hold the I
2
C bus by issuing a RESTART condition or release the bus by issuing a STOP
condition. †
Slave-Receiver Operation for a Single Byte
When another I
2
C master device on the bus addresses the I
2
C controller and is sending data, the I
2
C controller
acts as a slave-receiver and the following steps occur:†
1. The other I
2
C master device initiates an I
2
C transfer with an address that matches the I
2
C controller's
slave address in the
IC_SAR
register. †
2. The I
2
C controller acknowledges the sent address and recognizes the direction of the transfer to indicate
that the I
2
C controller is acting as a slave-receiver. †
3. I
2
C controller receives the transmitted byte and places it in the receive buffer. †
If the RX FIFO is completely filled with data when a byte is pushed, then an overflow occurs and
the I
2
C controller continues with subsequent I
2
C transfers. Because a NACK is not generated,
Note:
software must recognize the overflow when indicated by the I
2
C controller (by the
R_RX_OVER
bit in the
IC_INTR_STAT
register) and take appropriate actions to recover from lost data. Hence,
there is a real time constraint on software to service the RX FIFO before the latter overflow as
there is no way to reapply pressure to the remote transmitting master. †
4. I
2
C controller asserts the
RX_FULL
interrupt (
IC_RAW_INTR_STAT[2]
register). †
If the
RX_FULL
interrupt has been masked, due to setting
IC_INTR_MASK[2]
register to 0 or setting
IC_TX_TL
to a value larger than 0, then it is recommended that the CPU does periodic reads of the
IC_STATUS
register. Reads of the
IC_STATUS
register, with bit 3 (
RFNE
) set at 1, must then be treated
by software as the equivalent of the
RX_FULL
interrupt being asserted. †
5. Software may read the byte from the
IC_DATA_CMD
register (bits 7:0). †
6. The other master device may hold the I
2
C bus by issuing a RESTART condition or release the bus by
issuing a STOP condition. †
Slave-Transfer Operation for Bulk Transfers
In the standard I
2
C protocol, all transactions are single byte transactions and the programmer responds to
a remote master read request by writing one byte into the slave's TX FIFO. When a slave (slave-transmitter)
is issued with a read request (
RD_REQ
) from the remote master (master-receiver), at a minimum there
should be at least one entry placed into the slave-transmitter's TX FIFO. The I
2
C controller is designed to
handle more data in the TX FIFO so that subsequent read requests can receive that data without raising an
interrupt to request more data. Ultimately, this eliminates the possibility of significant latencies being incurred
between raising the interrupt for data each time had there been a restriction of having only one entry placed
in the TX FIFO. †
This mode only occurs when I
2
C controller is acting as a slave-transmitter. If the remote master acknowledges
the data sent by the slave-transmitter and there is no data in the slave's TX FIFO, the I
2
C controller raises
the read request interrupt (
RD_REQ
) and waits for data to be written into the TX FIFO before it can be sent
to the remote master. †
If the
RD_REQ
interrupt is masked, due to bit 5 (
M_RD_REQ
) of the
IC_INTR_STAT
register being set to
0, then it is recommended that the CPU does periodic reads of the
IC_RAW_INTR_STAT
register. Reads
Altera Corporation
I2C Controller
20-15
Slave-Receiver Operation for a Single Byte
cv_54020
2013.12.30