17.3.9.4 Slave Receiver
A slave receiver operation is started in the same way as a slave transmitter operation, with the exception that the address transmitted
by the master has the R/W bit cleared (W), indicating that the master wishes to write to the slave. The slave then goes into slave receiv-
er mode.
To receive data from the master, the slave should respond to the address with an ACK and make sure space is available in the receive
buffer. Transmission will then continue, and the slave will receive a byte from the master.
If a NACK is sent without a CONT, the transmission is ended for the slave, and it goes idle. If the slave issues both the NACK and
CONT commands and has space available in the receive buffer, it will be open for continuing reception from the master.
When a byte has been received from the master, the slave must ACK or NACK the byte. The responses here are the same as for the
reception of the address byte.
The master ends the transmission by sending a STOP or a repeated START. The SSTOP interrupt flag is set when the master transmits
a STOP condition. If the transmission is ended with a repeated START, then the SSTOP interrupt flag in I2Cn_IF is not set.
Note:
The SSTOP interrupt flag in I2Cn_IF will be set regardless of whether the slave is participating in the transmission or not, as long as
SLAVE in I2Cn_CTRL is set and a STOP condition is detected
If arbitration is lost at any time during transmission, the ARBLOST interrupt flag in I2Cn_IF is set, the bus is released and the slave
goes idle.
See
Table 17.8 I2C - Slave Receiver on page 499
for more information.
Table 17.8. I2C - Slave Receiver
I2Cn_STATE
Description
I2Cn_IF
Required in-
teraction
Response
-
Repeated START re-
ceived
RSTART interrupt flag
(BUSHOLD interrupt
flag)
RXDATA
Receive and compare address
0x71
ADDR + W received
ADDR interrupt flag
RXDATA interrupt flag
(BUSHOLD interrupt
flag)
ACK +
RXDATA
ACK will be sent and data will be received
NACK
NACK will be sent, slave goes idle
NACK +
CONT +
RXDATA
NACK will be sent and DATA will be received.
0xB1
Data received
RXDATA interrupt flag
(BUSHOLD interrupt
flag)
ACK +
RXDATA
ACK will be sent and data will be received
NACK
NACK will be sent and slave will go idle
NACK +
CONT +
RXDATA
NACK will be sent and data will be received
-
Stop received
SSTOP interrupt flag
None
The slave goes idle
START
START will be sent when bus becomes idle
-
Arbitration lost
ARBLOST interrupt flag None
The slave goes idle
START
START will be sent when the bus becomes idle
17.3.10 Transfer Automation
The I
2
C can be set up to complete transfers with a minimal amount of interaction.
Reference Manual
I2C - Inter-Integrated Circuit Interface
silabs.com
| Building a more connected world.
Rev. 1.1 | 499