![ARTERY AT32WB415 Series Reference Manual Download Page 129](http://html1.mh-extra.com/html/artery/at32wb415-series/at32wb415-series_reference-manual_2977599129.webp)
AT32WB415
Series Reference Manual
2022.04.13
Page 129
Ver 2.00
0: Disabled
1: Enabled
SMBus host: response to host address 0001000x
SMBus slave: response to default device address
0001100x
Bit 3
SMBMODE
0x0
rw
SMBus device mode
0: SMBus slave
1: SMBus host
Bit 2
Reserved
0x0
resd
Forced to be 0 by hardware.
Bit 1
PERMODE
0x0
rw
I
2
C peripheral mode
0: I
2
C mode
1: SMBus mode
Bit 0
I2CEN
0x0
rw
I
2
C peripheral enable
0: Disabled
1: Enabled
All bits are cleared as I2CEN
=
0 at the end of the
communication.
In master mode, this bit must not be cleared before the end
of the communication.
Note: When the GENSTART, GENSTP or PECTEN bit is set, the I2C_CTRL1 cannot be written by
software until the corresponding bit has been cleared by hardware,otherwise, a second GENSTART,
GENSTP or PECTEN request may be set.
11.5.2 Control register2 (I2C_CTRL2)
Bit
Register
Reset value
Type
Description
Bit 15: 13 Reserved
0x0
resd
Forced to be 0 by hardware.
Bit 12
DMAEND
0x0
rw
End of DMA transfer
0: The next DMA transfer is no the last one.
1: The next DMA transfer is the last one.
Bit 11
DMAEN
0x0
rw
DMA transfer enable
0: Disabled
1: Enabled
Bit 10
DATAIEN
0x0
rw
Data transfer interrupt enable
An interrupt is generated when TDBE =1 or RDBF=1.
0: Disabled
1: Enabled
Bit 9
EVTIEN
0x0
rw
Event interrupt enable
0: Disabled
1: Enabled
An interrupt is generated in the following conditions:
– STARTF = 1 (Master mode)
– ADDR7F = 1 (Master/slave mode)
– ADDRHF= 1 (Master mode)
– STOPF = 1 (Slave mode)
– TDC = 1, but no TDBE or RDBF event
– If DATAIEN = 1, the TDBE event is 1.
– If DATAIEN = 1, the RDBF event is 1.
Bit 8
ERRIEN
0x0
rw
Error interrupt enable
0: Disabled
1: Enabled
An interrupt is generated in the following conditions:
– BUSERR = 1
– ARLOST = 1
– ACKFAIL = 1