GD32W51x User Manual
635
Table 19-2. Data setup time and data hold time
Sym bol
Param eter
Standard
m ode
Fast m ode
Fast m ode
plus
SMBus
Unit
Min
Max
Min
Max
Min
Max
Min
Max
t
HD;DAT
Data hold time
0
-
0
-
0
-
0.3
-
us
t
VD;DAT
Data valid time
-
3.45
-
0.9
-
0.45
-
-
t
SU;DAT
Data setup time
250
-
100
-
50
-
250
-
ns
t
r
Rising time of
SCL and SDA
-
1000
-
300
-
120
-
1000
t
f
falling time of
SCL and SDA
-
300
-
300
-
120
-
300
19.3.5.
Software reset
A software reset can be performed by clearing the I2CEN bit in the I2C_CTL0 register. When
a software reset is generated, the SCL and SDA are released. The communication control
bits and status bits come back to the reset value. Software reset have no effect on
configuration registers. The impacted register bits are START, STOP, NACKEN in I2C_CTL1
register, I2CBSY, TBE, TI, RBNE, ADDSEND, NACK, TCR, TC, STPDET, BERR, LOSTARB
and OUERR in I2C_STAT register. Additionally, when the SMBus is supported, PECTRANS
in I2C_CTL1 register, PECERR, TIMEOUT and SMBALT in I2C_STAT are also impacted.
In order to perform the software reset, I2CEN must be kept low during at least 3 APB clock
cycles. This is ensured by writing software sequence as follows:
Write I2CEN = 0
Check I2CEN = 0
Write I2CEN = 1
19.3.6.
Data transfer
The data transfer is managed through data registers and shift register.
Data Transmission
If the I2C_TDATA register is not empty, that is, TBE=0, its content is moved to the shift register
after the 9th SCL pulse (Acknowledge pulse). The shift register content is shifted out on SDA
line. If TBE=1 means that no data is written to I2C_TDATA, SCL line is stretched low until
I2C_TDATA is written. The stretch is done after the 9th SCL pulse.