C Status Register 2 (I2C_Sr2) - ST STM32F100 Series Reference Manual

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

Advertisement

Inter-integrated circuit (I2C) interface
Bit 1 ADDR: Address sent (master mode)/matched (slave mode)
– Set by hardware as soon as the received slave address matched with the OAR registers
Note: In slave mode, it is recommended to perform the complete clearing sequence (READ
– For 10-bit addressing, the bit is set after the ACK of the 2nd byte.
– For 7-bit addressing, the bit is set after the ACK of the byte.
Note: ADDR is not set after a NACK reception
Bit 0 SB: Start bit (Master mode)
– Set when a Start condition generated.
– Cleared by software by reading the SR1 register followed by writing the DR register, or by
2
22.6.7
I

C Status register 2 (I2C_SR2)

Address offset: 0x18
Reset value: 0x0000
Note:
Reading I2C_SR2 after reading I2C_SR1 clears the ADDR flag, even if the ADDR flag was
set after reading I2C_SR1. Consequently, I2C_SR2 must be read only when ADDR is found
set in I2C_SR1 or when the STOPF bit is cleared.
15
14
13
12
r
r
r
Bits 15:8 PEC[7:0] Packet error checking register
Bit 7 DUALF: Dual flag (Slave mode)
– Cleared by hardware after a Stop condition or repeated Start condition, or when PE=0.
Bit 6 SMBHOST: SMBus host header (Slave mode)
– Cleared by hardware after a Stop condition or repeated Start condition, or when PE=0.
594/709
This bit is cleared by software reading SR1 register followed reading SR2, or by hardware
when PE=0.
Address matched (Slave)
0: Address mismatched or not received.
1: Received address matched.
content or a general call or a SMBus Device Default Address or SMBus Host or SMBus Alert
is recognized. (when enabled depending on configuration).
SR1 then READ SR2) after ADDR is set. Refer to
Address sent (Master)
0: No end of address transmission
1: End of address transmission
0: No Start condition
1: Start condition generated.
hardware when PE=0
11
10
9
PEC[7:0]
r
r
r
r
This register contains the internal PEC when ENPEC=1.
0: Received address matched with OAR1
1: Received address matched with OAR2
0: No SMBus Host address
1: SMBus Host address received when SMBTYPE=1 and ENARP=1.
8
7
6
5
SMB
SMBDE
DUALF
HOST
FAULT
r
r
r
r
RM0041 Rev 6
Figure
236.
4
3
2
1
GEN
TRA
BUSY
CALL
Res.
r
r
r
RM0041
0
MSL
r

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents