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.

I2C

 

 Hello.

 

 Is there any good primer or user guide that can give me enough insight on how the I2C peripheral works? I have read the complete documentation many times and looked to several examples, but still some of the information is confusing. For example, sometimes when I configure the module as a receiver the MST bit changes from 1 to 0, though AL is unaffected. Also, it has happened to me that the module goes into a numb state and it does not respond to an IRS reset; only a power cycle will clear it. It seems it is very sensitive to the order of operations.

 

 Regards.

  • The only documentation regarding the I2C is the reference guide at the following link:

    http://focus.ti.com/general/docs/techdocsabstract.tsp?abstractName=spru721a

    Besides this you can perform a Google search for I2C and find several tutorials for the peripheral. One good link for learning about I2C is the following:

    http://www.i2c-bus.org/

    You can also look at the I2C example code provided with the Header File and Peripheral Examples software packages. These are available at the following links:

    http://focus.ti.com/docs/toolsw/folders/print/sprc191.html

    http://focus.ti.com/docs/toolsw/folders/print/sprc530.html

    Regards,

    Tim Love

  • When I was speaking about the order of operations I was referring to the sequence of commands to issue in order to use the module. I am pretty acquainted with I2C (I have worked with a lot of I2C devices and even have implemented I2C masters and slaves in software and Verilog). However, this is the first time I am trying to use I2C in the C2000. What I am seeing is that MST changes from 1 to 0 when trying to receive data, but I don't see this explained in the documentation. I am using the module as master and I am not losing arbitration. Also, the examples I have seen have wait loops in certain places and use other flags than the recommended in the documentation to detect conditions (eg using STP instead of SCD, etc.). And finally, if I assert and deassert IRS, shouldn't that reset the module and clear flags to their default values? My module clock is enabled and set to 10Mhz, and I don't see flags going to their defaults when I do that

    Well, I think I should continue trying with my trial and error ;-)

    Regards.