Go to previous topic
Go to next topic
Last Post 04 Feb 2014 09:40 AM by  steven.eckhoff
Slowing down the I2C bus speed
 2 Replies
Author Messages
Louie Earle
New Member
New Member
Posts:12


--
03 Feb 2014 08:50 AM

    Hello,

    I'm using a DM3730 Torpedo + Wireless SOM on a custom embedded board. I'm using the Linux BSP.

    I have 2 A2D converters on the same I2C bus, and neither are detected when I run i2cdetect. Dmesg shows the following on that bus:


    [    0.468933] omap_i2c omap_i2c.3: bus 3 rev4.0 at 400 kHz

     

    The A2D converters have some level-shifting circuitry on the  SCL and SDA lines, and I think it's not working properly at 400 kHz (oscope shows a signal with nothing close to square corners). I'd like to try lowering the clock frequency and see if that fixes the problem, but I am not having any luck figuring out how to change this. Can this be done once the kernel is up and running, or do I have to change a file and recompile the kernel?

    Thank you so much for any help you can offer.

     

    Louie Earle
    New Member
    New Member
    Posts:12


    --
    04 Feb 2014 09:30 AM
    SOLVED:

    I changed a value in the file /rpm/BUILD/linux-3.0/arch/arm/mach-omap2/board-omap3logic.c

    it had a line in it:

    ...
    omap_register_i2c_bus(3, 400, omap3logic_i2c3_boardinfo, ARRAY_SIZE(omap3logic_i2c3_boardinfo));
    ...

    Changing 400 to 100 worked like a charm, and now my I2C devices are detected on bus 3.
    steven.eckhoff
    Basic Member
    Basic Member
    Posts:192


    --
    04 Feb 2014 09:40 AM
    Great!

    Thanks Louie for posting the solution.


    ---