Jump to content
Jens

I2C Speed

Recommended Posts

 

Hello everyone,

Can anyone guide me on how to adjust the speed for the two
 i2c busses on my Tinker Board 2 running Linux?

Thanks in advance,
Jens

 

 

Share this post


Link to post
Share on other sites

hello @Jens

you can set the speed to 40k or 10k (it's 40k by default). to change the speed to 10k using overlay:

1. download the dtbo files and i2cspeed.sh from: https://www.asuswebstorage.com/navigate/a/#/s/258BFBD7E61045C9BECB7DA044378A844

2. move i2c6_10k.dtbo & i2c7_10k.dtbo to /boot/overlays

3.

sudo vim /boot/config.txt

modify the last line in config.txt 

overlay=i2c6_10K

(if you're using i2c7, then the last line should be overlay=i2c7_10k)

4. save and reboot tinker board 2s

5. to verify the change comes effective using i2cspeed.sh

sudo chmod +x i2cspeed.sh
./i2cspeed.sh

the script then prints the i2c clock frequency 

tinker board 2s: i2c overlay

Share this post


Link to post
Share on other sites

hello @Jens

you can set the speed to 40k or 10k (it's 40k by default). to change the speed to 10k using overlay:

1. download the dtbo files and i2cspeed.sh from: https://www.asuswebstorage.com/navigate/a/#/s/258BFBD7E61045C9BECB7DA044378A844

2. move i2c6_10k.dtbo & i2c7_10k.dtbo to /boot/overlays

3.

sudo vim /boot/config.txt

modify the last line in config.txt 

overlay=i2c6_10K

(if you're using i2c7, then the last line should be overlay=i2c7_10k)

4. save and reboot tinker board 2s

5. to verify the change comes effective using i2cspeed.sh

sudo chmod +x i2cspeed.sh
./i2cspeed.sh

the script then prints the i2c clock frequency 

tinker board 2s: i2c overlay

Share this post


Link to post
Share on other sites

 

Thank you for the quick and very comprehensive response. I can now change either i2c-bus 6 or 7 to 10k but how do I change both? 

Thanks in advance,
Jens

 

Edited by Jens

Share this post


Link to post
Share on other sites

Another question: Is there any way to change the speed to 100k ? If I interpret the specs for the RK3399 correctly it should be capable of speeds up to 400k.

Jens

Share this post


Link to post
Share on other sites

hello @Jens

sorry for not making it clear, the 10k in the config.txt = 100khz, so if you wanna change both i2c6 & i2c7 to 100k:

overlay=i2c6_10k i2c7_10k

(separate the variants with space instead of comma)

the speed is 400k by default, if you want to change them back to 400k, just remove the line overlay=i2c6_10k i2c7_10k 

Share this post


Link to post
Share on other sites

Thanks again for the great answer. I guess that solves my initial problem.

Excelent support!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...