GD32W51x User Manual
633
19.3.3.
Noise filter
The noise filters must be configured before setting the I2CEN bit in I2C_CTL0 register if it is
necessary. The analog noise filter is present on the SDA and SCL inputs by default. The
analog filter requires the suppression of spikes with a pulse width up to 50ns in fast mode and
fast mode plus. The analog filter can be disabled by setting the ANOFF bit in I2C_CTL0
register.
The digital filter can be used by configuring the DNF[3:0] bit in I2C_CTL0 register. When the
digital filter is enabled, the level of the SCL or the SDA line is internally changed only if it
remains stable for more than DNF[3:0] x t
I2CCLK
. This allows to suppress spikes with a
programmable length of 1 to 15 of t
I2CCLK
.
19.3.4.
I2C timings
The PSC[3:0], SCLDELY[3:0] and SDADELY[3:0] bits in the I2C_TIMING register must be
configured in order to guarantee a correct data hold and setup time used in I2C
communication.
If the data is already available in I2C_TDATA register, the data will be sent on SDA after the
SDADELY delay. As is shown in
.
Figure 19-9. Data hold time
SDA
SCL
SDADELY
SDA output delay
SCL falling edge
internally detected
t
SYNC1
t
HD;DAT
The SCLDELY counter starts when the data is sent on SDA output. As is shown in