Figure 220. Transfer Sequence Diagram For Master Transmitter - ST STM32F207 Series Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32F207 Series:
Table of Contents

Advertisement

RM0033

Figure 220. Transfer sequence diagram for master transmitter

7-bit master transmitter
S
Address
A
EV5
EV6 EV8_1
10-bit master transmitter
S
Header
A
EV5
EV9
Legend: S= Start, S
= Repeated Start, P= Stop, A= Acknowledge,
r
EVx= Event (with interrupt if ITEVFEN = 1)
EV5: SB=1, cleared by reading SR1 register followed by writing DR register with Address.
EV6: ADDR=1, cleared by reading SR1 register followed by reading SR2.
EV8_1: TxE=1, shift register empty, data register empty, write Data1 in DR.
EV8: TxE=1, shift register not empty, data register empty, cleared by writing DR register
EV8_2: TxE=1, BTF = 1, Program Stop request. TxE and BTF are cleared by hardware by the Stop condition
EV9: ADD10=1, cleared by reading SR1 register followed by writing DR register.
1. The EV5, EV6, EV9, EV8_1 and EV8_2 events stretch SCL low until the end of the corresponding software sequence.
2. The EV8 event stretches SCL low if the software sequence is not complete before the end of the next byte transmission.
Master receiver
Following the address transmission and after clearing ADDR, the I
Master Receiver mode. In this mode the interface receives bytes from the SDA line into the
DR register via the internal shift register. After each byte the interface generates in
sequence:
1.
An acknowledge pulse if the ACK bit is set
2.
The RxNE bit is set and an interrupt is generated if the ITEVFEN and ITBUFEN bits are
set (see
If the RxNE bit is set and the data in the DR register is not read before the end of the last
data reception, the BTF bit is set by hardware and the interface waits until BTF is cleared by
a read in the DR register, stretching SCL low.
Closing the communication
The master sends a NACK for the last byte received from the slave. After receiving this
NACK, the slave releases the control of the SCL and SDA lines. Then the master can send
a Stop/Restart condition.
1.
To generate the nonacknowledge pulse after the last received data byte, the ACK bit
must be cleared just after reading the second last data byte (after second last RxNE
event).
2.
In order to generate the Stop/Restart condition, software must set the STOP/START bit
after reading the second last data byte (after the second last RxNE event).
3.
In case a single byte has to be received, the Acknowledge disable is made during EV6
(before ADDR flag is cleared) and the STOP condition generation is made after EV6.
After the Stop condition generation, the interface goes automatically back to slave mode
(MSL bit cleared).
Data1
A
Data2
EV8
EV8
Address
A
EV6
EV8_1
.
Figure 221
Transfer sequencing EV7).
RM0033 Rev 9
Inter-integrated circuit (I2C) interface
A
.....
EV8
Data1
A
.....
EV8
EV8
DataN
A
P
EV8_2
DataN
A
P
EV8_2
2
C interface enters
ai18210
607/1381
629

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F207 Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents