How to set lower frequency of I2C bus on i.MX6DualLite

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set lower frequency of I2C bus on i.MX6DualLite

473 Views
linuxiano23
Contributor I
Hi,
we're developing an application (using YOCTO Linux) with the iMX6DL and we're having some issues trying to set the i2c clock-frequency under a certain value... Reading in the reference manual we understood that the root cause of the issue is the PER_CLK_ROOT which is set at 66MHz: our ahb_podf is 3, the ipg_pdf is 2 and the perclk_podf is 1. With the maximum value of the i2c prescaler (which is 3840) we get a minimum i2c frequency of 17KHz. Our ideal value would be around 5KHz. 
 
In the device tree we set "

&i2c2 {

status = “okay”;

clock-frequency = “<5000>”;

};"

but any value under 20000 is not working (although the kernel gets the correct value in /sys/class/i2c-dev/i2c-0/device/of_node/clock-frequency". 

We understand that there are many other peripheral connected to the PER_CLK_ROOT, like PWM and GPT but maybe there is a way to change it (maybe modifying the perclk_podf) that can prevent any other issues... 
Thanks!
0 Kudos
1 Reply

418 Views
b36401
NXP Employee
NXP Employee

Accordingly to table 36-3 "I2C_IFDR Register Field Values" of the Reference Manual maximum divider is 2048.

0 Kudos