...the world's most energy friendly microcontrollers
2014-07-02 - Gecko Family - d0001_Rev1.30
181
www.silabs.com
After the address has been transmitted, a sequence of bytes can be read from or written to the slave,
depending on the value of the R/W bit (bit 0 in the address byte). If the bit was cleared, the master
has entered a master transmitter role, where it now transmits data to the slave. If the bit was set, it
has entered a master receiver role, where it now should receive data from the slave. In either case, an
unlimited number of bytes can be transferred in one direction during the transmission.
At the end of the transmission, the master either transmits a repeated START condition (Sr) if it wishes
to continue with another transfer, or transmits a STOP condition (P) if it wishes to release the bus.
15.3.7.1 Master State Machine
The master state machine is shown in Figure 15.10 (p. 181) . A master operation starts in the far
left of the state machine, and follows the solid lines through the state machine, ending the operation or
continuing with a new operation when arriving at the right side of the state machine.
Branches in the path through the state machine are the results of bus events and choices made by
software, either directly or indirectly. The dotted lines show where I
2
C-specific interrupt flags are set
along the path and the full-drawn circles show places where interaction may be required by software
to let the transmission proceed.
Figure 15.10. I
2
C Master State Machine
Wait ing
for idle
Idle/ busy
57
B3
9B
0
57
S
ADDR R
A
N
ADDR W
A
N
DATA
P
Sr
X
Arb. lost
1
97
D7
DF
9F
A
N
A
N
DATA
P
Sr
Arb. lost
ADDR R
Arb. lost , ADDR m at ch
ADDR W
Arb. lost , ADDR m at ch
ADDR X
Arb. lost , no m at ch
1
71
Mast er receiver
Mast er t ransm it t er
Arbit rat ion lost
Slave t ransm it t er
Slave receiver
0
57
1
93
0/ 1
Bus st at e/ event
Transm it t ed by self
Received from slave
START
condit ion
Int errupt flag set
Int eract ion required. Wait -
st at es insert ed unt il m anual
or aut om at ic int eract ion has
been perform ed
Go t o st at e
A
S
P
N
Sr
ACK
STOP
condit ion
NACK
Repeat ed START condit ion
ADDR R
ADDR W
Slave a read
(R/ W bit set )
Slave a writ e
(R/ W bit cleared)
Bus st at e (STATE)
73
0
P
Bus reset
Summary of Contents for EFM32G
Page 505: ......