Part Number: TMS320F28386D
Tool/software:
Hello,
I am working with the TMS320F28386D (referred to as "DSP" below), which is configured as an I2C slave on a shared bus. The Connectivity Manager (CM) receives commands via I2C (CM-I2C), while the C28x cores are running a control loop for an inverter (PWM).
Issue:
When the inverter is running, noise is introduced into the environment. This noise sometimes couples onto the I2C bus. While the noise levels are not very high, if a noise spike coincides with the rising edge of the clock (SCL), it can create false clock edges. These false edges are occasionally recognized as erroneous packets, which my software detects and reports to the master, allowing normal operation to continue.
However, sometimes the I2C peripheral in the CM becomes stuck, holding the SDA line low. When this happens, the system cannot recover without resetting the DSP.
My question:
How can I recover the I2C peripheral from this stuck state without resetting the device?
What I have tried:
-
Sending 9 clock pulses on SCL (as is kind of standard for releasing stuck slaves) did not recover the bus.
-
Using the debugger (XDS110 and CCS), I toggled the Master Enabled and Slave Enabled bits in the I2C peripheral, but this did not release the lines.
-
Changing the GPIO Mux configurations for pins 104 and 105 to their default function released the SDA line, but switching them back to I2C-CM caused SDA to be held low again, confirming the peripheral is the source of the problem.
-
Enabling the Master mode on the I2C peripheral and setting the anti-glitch filter to 8 clocks appeared to prevent the issue in my current tests, but I am concerned this is not a robust solution if the environment get noisier in the final product.
Enabling Master mode allows me to monitor the busy bit or the status of SDA/SCL and implement a watchdog as a workaround, but don't know how to reset the peripheral if the supposed watchdog triggers.
Attached is a logic analyzer trace:
-
The blue rectangle highlights a zoomed-in area with the glitch.
-
The top trace is the digital capture; the bottom is the analog capture.
-
After the glitch, SDA remains stuck low. Multiple subsequent clock edges do not cause the CM (slave) to release the SDA line.

Thanks in Advance
Let me know if you need more information or measurements.
Kind Regards
Agustin J. Gomez
