
RM0008
Inter-integrated circuit (I
2
C) interface
Doc ID 13902 Rev 12
733/1096
Start condition
Setting the START bit causes the interface to generate a Start condition and to switch to
Master mode (M/SL bit set) when the BUSY bit is cleared.
Note:
In master mode, setting the START bit causes the interface to generate a ReStart condition
at the end of the current byte transfer.
Once the Start condition is sent:
●
The SB bit is set by hardware and an interrupt is generated if the ITEVFEN bit is set.
Then the master waits for a read of the SR1 register followed by a write in the DR register
with the Slave address (see
&
Transfer sequencing EV5).
Slave address transmission
Then the slave address is sent to the SDA line via the internal shift register.
●
In 10-bit addressing mode, sending the header sequence causes the following event:
–
The ADD10 bit is set by hardware and an interrupt is generated if the ITEVFEN bit
is set.
Then the master waits for a read of the SR1 register followed by a write in the DR
register with the second address byte (see
Transfer
sequencing).
–
The ADDR bit is set by hardware and an interrupt is generated if the ITEVFEN bit
is set.
Then the master waits for a read of the SR1 register followed by a read of the SR2
register (see
Transfer sequencing).
●
In 7-bit addressing mode, one address byte is sent.
As soon as the address byte is sent,
–
The ADDR bit is set by hardware and an interrupt is generated if the ITEVFEN bit
is set.
Then the master waits for a read of the SR1 register followed by a read of the SR2
register (see
Transfer sequencing).
The master can decide to enter Transmitter or Receiver mode depending on the LSB of the
slave address sent.
●
In 7-bit addressing mode,
–
To enter Transmitter mode, a master sends the slave address with LSB reset.
–
To enter Receiver mode, a master sends the slave address with LSB set.
●
In 10-bit addressing mode,
–
To enter Transmitter mode, a master sends the header (11110xx0) and then the
slave address, (where xx denotes the two most significant bits of the address).
–
To enter Receiver mode, a master sends the header (11110xx0) and then the
slave address. Then it should send a repeated Start condition followed by the
header (11110xx1), (where xx denotes the two most significant bits of the
address).
The TRA bit indicates whether the master is in Receiver or Transmitter mode.