Hi John,
- You can try clear and set again I2Cx_C1[IICIE] bit. This will not reset registers to default values, but it should reset internal state machine to default state. Unfortunately I didn’t test it.
- In general, I would like to recommend do not use FACK, ALERTEN and SIICAEN features. These features have sense only in some cases and software workaround for rest situations brings additional overhead which could minimize benefit of these hardware solutions.
a) SLTF is for both modes. When this bit is set, master has to conclude that a defective device is holding the clock low indefinitely or slave has to conclude that master is intentionally trying to drive devices off of the bus. “LoValue” is name of value which you write into SLTH and SLTL registers. This name is used in calculations for SCL High Timeout Flags. The SMBus operating frequency range is 10 kHz to 100 kHz. Because a minimum speed needs to be maintained in this communication, a slave can hold SCL low for only a specified amount of time before the master times out and issues a stop condition. A slave can hold the clock low for 25ms before timeout occurs. After this time, the slave must be able to receive a new start condition within 35ms.
b) SHTF2 is for both modes. It indicates that bus is somehow locked and there isn’t possible communication.
c) I2Cx_SLTH and I2Cx_SLTL registers could be loaded with number of bus clocks = “LoValue” which defines timeout values.
d) Effectively, any down-up-down or up-down-up transition on the data line that occurs within the number of clock cycles programmed in this register is ignored by the I2C module. The programmer must specify the length of the glitch (in terms of bus clock cycles) for the filter to absorb and not pass. You can set 1-31 bus clock cycles (20-620ns for 50MHz bus clock) and value should be selected on base of noise analysis directly in your system
3. Unfortunately I do not know about any specific example code directly for this topic. I could recommend AN4771 SMBus Quick Start Guide:
http://www.freescale.com/files/32bit/doc/app_note/AN4471.pdf
AN4342 Using the Inter-Integrated Circuit on ColdFire+ and Kinetis
http://www.freescale.com/files/analog/doc/app_note/AN4342.pdf
http://www.freescale.com/files/analog/doc/app_note/AN4342.rar
and Freescale Power Management Bus (PMBus) Library
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=PMBUSLIB
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------