GD32W51x User Manual
631
Figure 19-3. START and STOP condition
SDA
SCL
SDA
SCL
START
STOP
Each I2C device is recognized by a unique address (whether it is a microcontroller, LCD driver,
memory or keyboard interface) and can operate as either a transmitter or receiver, depending
on the function of the device. It operates in slave mode by default. When it generates a START
condition, the interface automatically switches from slave to master. If an arbitration loss or a
STOP generation occurs, then the interface switches from master to slave, allowing
multimaster capability.
An I2C slave will continue to detect addresses after a START condition on I2C bus and
compare the detected address with its slave address which is programmable by software.
Once the two addresses match, the I2C slave will send an ACK to the I2C bus and responses
to the following command on I2C bus: transmitting or receiving the desired data. Additionally,
if General Call is enabled by software, the I2C slave always responses to a General Call
Address (0x00). The I2C block support both 7-bit and 10-bit address modes.
Data and addresses are transferred as 8-bit bytes, MSB first. The first byte(s) following the
START condition contain the address (one in 7-bit mode, two in 10-bit mode). The address is
always transmitted in master mode.
A 9th clock pulse follows the 8 clock cycles of byte transmission, during which the receiver
must send an acknowledge bit to the transmitter. Acknowledge can be enabled or disabled
by software.
An I2C master always initiates or end a transfer using START or STOP condition and it
’
s also
responsible for SCL clock generation.
In master mode, if AUTOEND=1, the STOP condition is generated automatically by hardware.
If AUTOEND=0, the STOP condition generated by software, or the master can generate a
RESTART condition to start a new transfer.
Figure 19-4. I2C communication flow with 10-bit address (Master Transmit)
Start
Slave address byte2
W(0)
ACK
DATA0
ACK
DATAN
ACK
Stop
……
data transfer (N+1 bytes)
From master to slave
From slave to master
Slave address byte1
(header)
ACK
1 1 1 1 0 x x
write
Содержание 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 ...