Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1294NCPDT: TM4C1294NPDT: I2C master-slave machine experiences SDA pull low abnormality, and cannot be used normally in the future

Part Number: TM4C1294NCPDT

Tool/software:

Background:
1. In the current project, I used the I2C module, and we simultaneously used the I2C master and I2C slave.
2. Two I2C modules (both with master-slave functionality) were used in the project
3. For the convenience of testing, two I2C modules are docked, one as the master and other as the slave for testing
4. There is no problem with normal communication, and there is no problem with continuously lowering CLK or SDA.


Exception:
1. Artificially creating anomalies, constantly touching SDA with GND, and attempting around 10-30 time, it is highly likely that the I2C slave will be set as abnormal, and SDA will remain low at this time. The MCS status of the slave is generally 0X60
Current processing:

        1. Check the datasheet and say that you want to send a STOP

        2. Attempted to send STOP, multiple attempts failed to resolve the exception
        3. Turn off the slave AF GPIO mapping (level goes high), attempt to send a STOP, and then turn on and turn off the slave AF GPIO mapping. After multiple transmissions, it can be contacted and restored to normal


2. Artificially creating anomalies, constantly touching SCK with GND, attempting around 20-50, is likely to cause I2C slave or host to enter an anomaly,
   a) The Slaver MCS status of the slave is 0X60 (SDA remains low at this time). Follow the above steps to handle the exception, but it cannot be eliminated. Only restarting the MCU can eliminate it
    b)The Master MCS status is 0X60/0x70 (SDA remains low at this time), and following the above exception handling can eliminate the exception and restore normal operation
    c)The  Master MCS  status is 0X41 (at this time, the SDA SCK level is high), and data cannot be sent again. According to the above processing, the exception cannot be eliminated, and only restarting the MCU can eliminate it

Regarding the  a)&b) issue, according to the description in the datasheet, it states that the I2C module can be reset. However, if I simply turn off and then turn on   the I2C peripheral, it will not work. Re initialization also has no effect.
Please help to identify the problem, handle it, and how to correctly reset a single I2C peripheral

  • Hi,

      I think the problem is that both the master and the slave lose synchronization to each other.  When you artificially create noise onto the bus, it may have created extra clock edge to the slave. In this case, the slave thinks that it has received N+1 clocks while the master has only sent out N clocks. This loss of synchronization is normally not recoverable by issuing a reset on the master side because the master has no idea that the slave has mistakenly received more clocks than it has sent out. You could reset both the master and the slave devices, not just one of them. Another solution is to use SCL as a digital I/O and bit-bang it low/high until the slave releases SDA. Here is some information on I2C that you may find helpful. Also Check the SCL and SDA lines. If the slave is holding SDA low, the only way to get the slave out of this state is with edges on SCL. Since the I2C module sees this as a different master holding the bus, it will not attempt to drive SCL. Bit banging is the only solution I know. Resetting the module, or time-out of the master does not change the state of the slave. 

    https://www.ti.com/lit/an/slva704/slva704.pdf

    https://www.ti.com/lit/an/slyt770/slyt770.pdf