Jump to content
Ethan_Lin

How to set I2C Speed --- Android 11

Recommended Posts

I've looked at other articles, but there's nothing about the settings for the Android version here.

The current specifications I've gathered for I2C range from 100k to 400k, and it's also mentioned that it can be 1M, but I haven't found how to set it. I'd like to know what its minimum can be.

image.png

Share this post


Link to post
Share on other sites
1 hour ago, tooz said:

hello @Ethan_Lin

to change the i2c speed in android 11 is similar to debian:


adb root
adb remount
adb pull /dtoverlay/config.txt (#uncomment intf:i2c6=on, and add overlay=i2c6_100k)
adb push i2c6_100K.dtbo config.txt /dtoverlay/

the dtbo file can be downloaded here: https://www.asuswebstorage.com/navigate/a/#/s/258BFBD7E61045C9BECB7DA044378A844

I'm trying what you mentioned. I've also seen the same approach in other articles, but in my experiments,

I couldn't verify that it has successfully changed the speed. On Android, "i2cspeed.sh" doesn't seem to execute.

How can I change 100K to 400K or any other value?

Share this post


Link to post
Share on other sites
58 minutes ago, tooz said:

hello  @tooz

"Thank you for your response and help. I'm trying the methods you mentioned but still encountering some issues:
1. I don't have the 'clock-frequency' file on 'i2cspeed.sh'.
2. I attempted to change the path on 'i2cspeed.sh' to point to each file with 'clock-frequency', but none showed as being modified to 100k.
3. How can I modify 'i2c6_100K.dtbo' to experiment with higher and lower settings for comparison?"

 

 

 

螢幕擷取畫面 2023-12-19 110328.png螢幕擷取畫面 2023-12-19 110224.png螢幕擷取畫面 2023-12-19 110045.png

Share this post


Link to post
Share on other sites

hello @Ethan_Lin

you can ls to check whether clock-frequency is there or not with ls:

Yu5xzHy.png

 

3 hours ago, Ethan_Lin said:

I attempted to change the path on 'i2cspeed.sh' to point to each file with 'clock-frequency', but none showed as being modified to 100k

to check if the changes have been applied:jfxiekP.png

if you have peripherals, you can connect them and test out different speed settings using mraa library:  Developer Guide · TinkerBoard/TinkerBoard Wiki (github.com)

Share this post


Link to post
Share on other sites

hello @Ethan_Lin

i suspect that the overlay didn't come effectvie. will it be possible for us to have console logs for checking?

 

Share this post


Link to post
Share on other sites

hello @Ethan_Lin

there was a small mistake i made in the previous post, the dtbo should be pushed into /dtoverlay/overlays instead of /dtoverlay

adb push i2c6_100K.dtbo config.txt /dtoverlay/overlays

 

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...