
CH32V003
Reference Manual
V1.3
155
byte.
For 7-bit addressing, the bit is set after the
ACK of the byte.
0
:
No end of address transmission.
In Slave mode:
1
:
Received address matched.
0
:
Address mismatched or not received.
0
SB
RO
Start bit.
Cleared by software by reading the SR1
register followed by writing the DR register, or by
hardware when PE=0
1
:
Start condition generated.
0
:
No Start condition.
0
13.11.7 I2C Status register 2(I2C_STAR2)
Offset address: 0x18
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
PEC[7:0]
DUA
LF
Reserved
GEN
CAL
L
Reser
ved TRA
BUS
Y
MSL
Bit
Name
Access
Description
Reset value
[15:8] PEC
RO
Packet error checking bit.
When PEC is enabled
(ENPEC is set), this field holds the value of PEC.
0
7
DUALF
RO
Dual flag.
Cleared by hardware after a Stop
condition or repeated Start condition, or when
PE=0.
1
:
Received address matched with OAR2.
0
:
Received address matched with OAR1.
0
[6:5]
Reserved
RO Reserved
0
4
GENCALL
RO
General call address bit.
Cleared by hardware
after a Stop condition or repeated Start condition,
or when PE=0.
1
:
General Call Address received when
ENGC=1.
0
:
No General Call.
0
3
Reserved
RO Reserved
0
2
TRA
RO
Transmitter/receiver bit.
It is cleared by hardware
after detection of Stop condition (STOPF=1),
repeated Start condition, loss of bus arbitration
(ARLO=1), or when PE=0.
1
:
Data bytes transmitted.
0
:
Data bytes received.
This bit is set depending on the R/W bit of the
address byte.
0
1
BUSY
RO
Bus busy bit.
Cleared by hardware on detection of
a Stop condition.
This information is still updated
when the interface is disabled (PE=0).
1
:
Communication ongoing on the bus: low level
present in SDA or SCL.
0
:
No communication on the bus.
0
0
MSL
RO
Master/slave bit.
Set by hardware as soon as the
interface is in Master mode (SB=1).
Cleared by
hardware after detecting a Stop condition on the
bus or a loss of arbitration (ARLO=1), or by
hardware when PE=0.
0