I am using linux based kits and I have a problem about changing i2c speed. Do you know how to change in linux which has the version 3.4.39
-
i2c speed on what device?drescherjm– drescherjm2019-04-05 12:59:54 +00:00Commented Apr 5, 2019 at 12:59
-
ARM-Embedded-S5P4418-Single-Board-ComputerM.Talha– M.Talha2019-04-05 13:05:00 +00:00Commented Apr 5, 2019 at 13:05
-
Maybe you should ask this question on Electronics SE..oguz ismail– oguz ismail2019-04-05 13:24:35 +00:00Commented Apr 5, 2019 at 13:24
-
ok, I will also ask in this platform.Thank you for suggestionM.Talha– M.Talha2019-04-05 14:14:30 +00:00Commented Apr 5, 2019 at 14:14
Add a comment
|
1 Answer
Since you are using ARM, you can define the I2C speed at boot time in the devicetree. I am making some assumptions here (eg. that you are using U-boot as bootloader), but embedded systems tend to look very similar.
- Locate your devicetree. It is specified during boot and probably located in /boot/ (You can also type printenv in U-boot shell and look for a variable called devicetree)
Disassemble your devicetree to dts-format (device-tree-source)
Change the i2c-speed parameter (Search for "i2c" and "clock-frequency" clock-frequency = < some_speed_in_HZ >;"
- Compile it back to *.dtb (device-tree-blob) and store it as a my_devicetree.dtb in /boot/
on the next reboot, in the bootloader menu choose my_devicetree.dtb as devicetree-file and it should work.
4 Comments
M.Talha
unfortunately in my /boot/ ,there is nothing and when I type prientenv there is no such as devicetree word.
Toto
what about dtb_file or something similar?
M.Talha
in boot ,there is no file . it is empty.What do you think is it possible that dtb file would be in different location.
Toto
It could be on another partition or another storage device. The easiest would be to analyse the "printenv"-output from uboot. There will be some information which file is being served the kernel as devicetree and where it is located.