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.

MSPM0G3507: Confirmation on Method to Clear I2C Bus

Part Number: MSPM0G3507

Hello,

I have a couple quick question on clearing the I2C bus with an MSPM0 as the controller. 

Q: What built-in methods are there for clearing the I2C bus? Is there a command to send 9 clock pulses in the case of SDA being held low, or is clearing the I2C bus via SW reset the recommended way? (In the case of SCL being held low, I'm aware that a reset is necessary.)

Q: In the case of target device hangup, does the controller I2C peripheral SW reset solve this issue or is a HW reset necessary on the target device? The reason that the 9-clock pulse reset method from the previous question is desired is to handle issues on the target side.

I have read the I2C chapter 24 of the TRM and could only find a passage on SW resetting the I2C peripheral, or performing a HW reset. Therefore, those seem like the only methods, but I would greatly appreciate confirmation and/or insights available. 

 

Thank you!

Michael

  • Q1: As far as I know there is no way to ask the I2C unit (or DriverLib) to perform the "9-clocks trick". Nor is there a way to directly manipulate the SCL pin through the I2C unit. You'll have to switch SCL's IOMUX to PF=1 (GPIO) and wiggle the pin using the GPIO registers.

    Q2: If it's the target side hanging the bus, resetting the controller-side I2C unit won't (in general) clear it. If the 9-clocks trick doesn't clear the condition, you'll need to reset the target device.

    In most cases, discerning which side is actually causing the trouble is not easy. It's probably most productive to just reset both sides: (a) Try the 9-clocks trick; if that doesn't work (b) reset the target device And the controller I2C unit.