GD32A50x User Manual
513
20.3.3.
Noise filter
Analog noise filter and digital noise filter are integrated in I2C peripherals, the noise filters can
be configured before the I2C peripheral is enabled according to the actual requirements.
The analog noise filter is disabled by setting the ANOFF bit in I2C_CTL0 register and enabled
when ANOFF is 0. It can suppress spikes with a pulse width up to 50ns in fast mode and fast
mode plus.
The digital noise filter can be used by configuring the DNF[3:0] bit in I2C_CTL0 register. The
level of the SCL or the SDA will be changed if the level is stable for more than
DNF[3:0]×t
I2CCLK
. The length of spikes to be suppressed is configured by DNF[3:0].
20.3.4.
I2C timings configuration
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 20-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