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.

Is it possible to issue start command from OMAP to restore the I2C lines?

Other Parts Discussed in Thread: OMAP3530

Hi All,

I am using OMAP34x processor with Linux kernel 2.6.22.18 for development. The setup I am using has OMAP as master and a few slave devices connected to it via the I2C bus.

Due to some reason, the SDA line is held low and I2C becomes unstable. In this scenario is it possible for OMAP to issue a start command to restore the I2C lines (as master)?

Please advice.
Thanks,
Ruchi Sirauthiya
  • Hi Ruchi,

    In case one of your I2C slaves becomes unstable and decides to hold low the SDA line for ever, the OMAP being I2C-master can't do anything against it. The I2C-bus is an open-collector bus, and in case one slave device decides to hold down one line for ever (due to whatever reason), you are basically just stuck :-)

    You therefore need to figure out why the device goes haywire and fix this situation up front. Alternatively a reset of the device (if you have such one connected to an OMAP GPIO ball) should be able to fix the situation as well...

    In case it's the OMAP itself, which decides to hold down SDA forever (due to a yet unknown bug), you can of cause reset the I2C IP-core in OMAP and start over, but as I read your request I assume the problem is caused by one of the attached slaves and not the OMAP - Correct?...

    Good luck
      Søren

  • Thanks Søren,

    Søren Steen Christensen said:
    > In case it's the OMAP itself, which decides to hold down SDA forever (due to 
    > a yet unknown bug), you can of cause reset the I2C IP-core in OMAP and start 
    > over, but as I read your request I assume the problem is caused by one of 
    > the attached slaves and not the OMAP - Correct?... 

    As you told, if a slave device is holding the line we cannot do much from the OMAP side, we should reset the slave to recover from I2C time out. In most cases resetting the slave device will help in I2C bus recovery. In some very rare cases, it just displays the message "I2C time out waiting for bus ready" and never recovers. In this case even after resetting the slave, SDA line does not come up. 

    In this specific case what could be the issue? Will resetting I2C bus from the OMAP side help? How do I initiate a I2C IP-core reset in OMAP and start over? 

    Thanks, 

    Ruchi

  • Hi Ruchi,

    In case it isn't any of the slaves it must be the OMAP holding down the line - I agree:-)

    That being said I have not seen any HW-related problems with the OMAP I2C module in the newer OMAPs. The OMAP15xx chips had a few strange bugs, but this is fixed a long time ago. Checking the errata (http://focus.ti.com/lit/er/sprz278d/sprz278d.pdf) advisory 3.1.1.15 might though be interesting. I don't know if this is incorporated in the Linux I2C code?

    An "OMAP I2C IP-block reset" will restart the I2C block (and remove the hanging), but I unfortunately don't know how to do this (if it's possible to be done) in a controlled manner from Linux, since I have never had the need to do this...

    You can find information about the I2C IP block details in the OMAP3530 TRM (spruf98d.pdf) chapter 18...

    Good luck
      Søren

    PS: For further replies please only use one of the channels (this one of the BeagleBoard list).