The I2C controller specification v2.1 specifies the filtering out of glitches spanning a maximum of 50 ns on the SDA and SCL lines in the fast mode of operation.
The I2C controller in Zynq-7000 SoCs PS7 does not implement the circuitry to filter these glitches.
A glitch on the SDA or SCL line can cause a momentary false trigger on the signal line.
A glitch on SDA could result in an incorrect START condition or an incorrect STOP condition being recognized, thus breaking the bus protocol.
A glitch on SCL could result in incorrect data transfer, also breaking bus protocol.
In both cases, data transfer is corrupted and the bus could hang.
In order to avoid this situation, the user needs to implement a circuitry to filter out glitches from SDA and SCL lines.
The user needs to implement circuitry to filter out the glitch on SCL and SDA externally before interfacing the signals with the controller.
The user can implement the following workaround in the Programmable Logic portion of Zynq or in an external programmable device like CPLD.
The glitch filter circuitry is composed of metastability flops and debouncer logic on SDA and SCL signals.
The logic works on a faster clock domain which is capable of sampling the glitch occurring on SDA and SCL signals.
SDA and SCL signals are passed through a three stage synchronizer to eliminate metastability.
The logic requires a faster clock to filter out the glitch and the frequency of the clock should be at least 40 MHz.
However using a faster frequency clock source eliminates the possibility of extending the glitch to be filtered significantly due to the presence of the metastability flops.
The recommended clock frequency is 100 MHz.
The procedure for glitch filtering is:
The user needs to implement independent glitch filtering circuitry for SDA and SCL.
Note: Both SCL and SDA signals need to be debounced by 50 ns so that the timing relationship between SCL and SDA remains unchanged.
The user can refer to the attached code snippet which serves as an example.
All Zynq devices using the I2C controller as a master.
Device Revision(s) Affected:
All, no plan to fix.
Refer to (Xilinx Answer 47916) - Zynq-7000 SoC Silicon Revision Differences
This is a third-party errata; this will not be fixed.