AnsweredAssumed Answered

[imx6qp] i2c clock setting

Question asked by Taro Yamamoto on Jun 8, 2016
Latest reply on Jun 12, 2016 by Taro Yamamoto

Hi team,

 

I tried to change the i2C clock to 100KHz.

 

i2c_imx says following, in my understanding is 24000000 / 240 = 100000.

  <i2c_imx_set_clk> I2C_CLK=24000000, REQ DIV=240

  <i2c_imx_set_clk> IFDR[IC]=0xf, REAL DIV=240

*clock source is "clk24m"

 

But,I checked the SCL line using oscilloscope, I can see about 255KHz.....

 

If source clock changed to "ipg"(66MHz), i2c_imx says,

  <i2c_imx_set_clk> I2C_CLK=66000000, REQ DIV=660

  <i2c_imx_set_clk> IFDR[IC]=0x39, REAL DIV=768

calculated clock value is 66000000 / 768 = 85937.5, and I can see about 86KHz on the SCL line(probably correct).

 

So , I wanted to check the value of IFDR register, but the memtool returned "Bus error".

 

[Question]

1. When the clock source is a 24MHz, why correct setting is not performed?

2. Why memtool returned "Bus Error" ?

 

regards,

Taro.

Outcomes