![ARTERY AT32F435 Series Скачать руководство пользователя страница 186](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592186.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 186
Rev 2.03
SMBus master transmission flow
Figure 11-14 SMBus master transmission flow
Master initialization
I2C_STS_TDIS=1?
No
Set I2C_CTRL2_CNT = N+1
I2C_CT RL1_PE CEN=1
I2C_CT RL2_PE CTEN=1
Configure slave address
GENSTART = 1
I2C_STS_ACKFAIL=1?
Wait I2C_STS_STOPF=1
Set I2C_CLR_STOPC=1
I2C_CLR_ACKFAILC=1
Yes
Yes
No
Write I2C_TXDT_DT
N Bytes
Transmitted?
ASTOPEN = 0 ?
No
Yes
No
(ASTOPEN = 1)
Yes
(ASTOPEN = 0)
Set I2C_CTRL2_GENSTOP = 1
Wait I2C_STS_STOPF=1
Set I2C_CLR_STOPC=1
Restart ?
Configure CNT and slave address
GENSTART = 1
No
Yes
I2C_STS_TDC = 1 ?
Wait I2C_STS_STOPF=1
Set I2C_CLR_STOPC=1
No
Yes