Other Parts Discussed in Thread: ISO1540, SW-TM4C
Hi,
I have a question about the I2C of TM4C1294. My TivaWare version is 2.1.0.12573, CCS 5.4, Compiler is TI v5.0.4.
My question as below picture, the upper image is capture from a logic analyzer, and the bottom picture is capture from a scope. The speed of I2C is 100KHz. You can see the 4th clock of the second byte is missing, only remain a very short pulse. It doesn't happen every time I2C transmission, but the opportunity is very high, 10% may be.
There are two components on the TM4C1294's I2C channel, a optical sensor (slave device), and a I2C isolator (TI ISO1540, SCL and SDA both bi-direction). The SCL pin of the optical sensor is a simple input pin, it doesn't have I2C clock stretching feature.
The yellow channel on the scope is the waveform between the TM4C and the isolator, and the green channel is the waveform between the isolator and the optical sensor.
I did not enable the glitch filter of TM4C1294 I2C channel, and I set I2CMCLKOCNT to 0xFF, I tried other value doesn't change this issue.
Now I have three solutions can fix this issue: (1) TM4C enables the glitch filter, (2) to reduce the pull up resistor on the optical sensor from 10K Ohm to 1K Ohm, make the rising edge better, (3) Add a little capacitor (e.g. 100pF) on the SCL of the optical sensor.
But I don't understand why this clock pulse missing, if the isolator pull low at that moment and TM4C clock stretching is working, why there only 8 clock pulse? Why glitch filer can fix this issue?
[ my I2C initialization code ]
Thank you,
Snaku