...the world's most energy friendly microcontrollers
2014-07-02 - Tiny Gecko Family - d0034_Rev1.20
149
www.silabs.com
14.3.1.4 10-bit Addressing
To address a slave using a 10-bit address, two bytes are required to specify the address instead of
one. The seven first bits of the first byte must then be 1111 0XX, where XX are the two most significant
bits of the 10-bit address. As with 7-bit addresses, the eight bit of the first byte determines whether the
master wishes to read from or write to the slave. The second byte contains the eight least significant
bits of the slave address.
When a slave receives a 10-bit address, it must acknowledge both the address bytes if they match the
address of the slave.
When performing a master transmitter operation, the master transmits the two address bytes and then
the remaining data, as shown in Figure 14.8 (p. 149) .
Figure 14.8. I
2
C Master Transmitter/Slave Receiver with 10-bit Address
W
S
A
A
DATA
A
P
Addr (2nd byt e)
ADDR (1st 7 bit s)
When performing a master receiver operation however, the master first transmits the two address bytes
in a master transmitter operation, then sends a repeated START followed by the first address byte and
then receives data from the addressed slave. The slave addressed by the 10-bit address in the first two
address bytes must remember that it was addressed, and respond with data if the address transmitted
after the repeated start matches its own address. An example of this (with one byte transmitted) is shown
in Figure 14.9 (p. 149) .
Figure 14.9. I
2
C Master Receiver/Slave Transmitter with 10-bit Address
R
Sr
DATA
A
N
P
W
S
A
A
ADDR (1st 7 bit s)
Addr (2nd byt e)
ADDR (1st 7 bit s)
14.3.1.5 Arbitration, Clock Synchronization, Clock Stretching
Arbitration and clock synchronization are features aimed at allowing multi-master buses. Arbitration
occurs when two devices try to drive the bus at the same time. If one device drives it low, while the
other drives it high, the one attempting to drive it high will not be able to do so due to the open-drain
bus configuration. Both devices sample the bus, and the one that was unable to drive the bus in the
desired direction detects the collision and backs off, letting the other device continue communication
on the bus undisturbed.
Clock synchronization is a means of synchronizing the clock outputs from several masters driving the
bus at once, and is a requirement for effective arbitration.
Slaves on the bus are allowed to force the clock output on the bus low in order to pause the
communication on the bus and give themselves time to process data or perform any real-time tasks they
might have. This is called clock stretching.
Arbitration is supported by the I
2
C module for both masters and slaves. Clock synchronization and clock
stretching is also supported.
14.3.2 Enable and Reset
The I
2
C is enabled by setting the EN bit in the I2Cn_CTRL register. Whenever this bit is cleared, the
internal state of the I
2
C is reset, terminating any ongoing transfers.
Note
When re-enabling the I
2
C, the ABORT command or the Bus Idle Timeout feature must be
applied prior to use even if the BUSY flag is not set.
Summary of Contents for EFM32TG
Page 543: ......