AnsweredAssumed Answered

iMX28 I2C 400kHz clock settings

Question asked by Matthew Hilder on Apr 24, 2013
Latest reply on Oct 14, 2013 by Matthew Hilder
Branched to a new discussion



I've just been scoping the I2C clock line on my board and have noticed the following.

If HW_I2C_TIMING0 and HW_I2C_TIMING1 are set to 0x000f0007 and 0x001f000f for 400kHz operation as per page 1756 of the reference manual then the clock rate is 436kHz.


After reading the description I tried 0x0018000c in HW_I2C_TIMING0 to get a 1us clock high time, i.e. 24 clocks of 24MHz.  I put 0x00240010 in HW_I2C_TIMING1 to get 1.5us clock low.  2.5us -> 400kHz.

Unfortunately this gave me 348kHz.


Trial and error gave me 400kHz by putting the following values in the registers:

0x0010000c -> HW_I2C_TIMING0 which scopes out as 1us clock high.

0x00230010 -> HW_I2C_TIMING1 which scopes out as 1.5us clock low.


Hope this is helpful.