GD32W51x User Manual
642
Figure 19-15. Programming model for slave transmitting when SS=1
IDLE
Master generates START
condition
Master sends Address
Slave sends Acknowledge
Slave sends DATA(2)
Master sends Acknowledge
……
(
Data transmission
)
Slave sends DATA(N-2)
Master sends Acknowledge
Slave sends DATA(N-1)
Master sends Acknowledge
Master generates STOP
condition
I2C initialization
Set ADDSEND
read READDR and TR in
I2C_STAT, clear ADDSEND
Set TI
Set TI
Write DATA(2) to I2C_TDATA
Write DATA(x) to I2C_TDATA
Set TI
Write DATA(3) to I2C_TDATA
Write DATA(4) to I2C_TDATA
Write DATA(N) to I2C_TDATA
Set TI
I2C Line State
Hardware Action
Software Flow
Slave sends DATA(1)
Master sends Acknowledge
Write DATA(N+1) to I2C_TDATA
DATA(N+1) will not be sent
Clear STPDET
Write DATA(1) to I2C_TDATA
Set TI
Slave sends DATA(N)
Master don't send ACK
Set TI, TBE and NACK
Clear NACK
Set TBE
Slave receiver
When the I2C_RDATA is not empty, the RBNE bit in I2C_STAT register is set, and if the
RBNEIE bit in I2C_CTL0 register is set, an interrupt will be generated. When a STOP is
received, STPDET will be set in I2C_STAT register. If the STPDETIE bit in I2C_CTL0 register
is set, and an interrupt will be generated.
Содержание GD32W515 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32W51x Arm Cortex M33 32 bit MCU User Manual Revision 1 0 Nov 2021 ...
Страница 66: ...GD32W51x User Manual 66 Bits Fields Descriptions 31 0 UNIQUE_ID 95 64 Unique device ID ...
Страница 389: ...GD32W51x User Manual 389 The FWDGT timeout can be more accurate by calibrating the IRC32K ...
Страница 504: ...GD32W51x User Manual 504 ...
Страница 710: ...GD32W51x User Manual 710 ...