Welcome to the Sitara™ ARM® Microprocessors Section of the TI E2E Support Community. Ask questions, share knowledge, explore ideas, and help solve problems with fellow engineers. To post a question, click on the forum tab then "New Post".
Hi,everyone,I am using am335x evm board. (Boardname: AM33BONE, Boardversion: 00A3)I want to use the i2c-1 controller, but I always get message "omap_i2c omap_i2c.2: controller timed out".
The linux kernel from http://arago-project.org/git/projects/?p=linux-am33x.git;a=summary . And I modify file board-am335xevm.c like this:
static struct evm_dev_cfg beaglebone_dev_cfg[] = { {lcdc_init, DEV_ON_BASEBOARD, PROFILE_NONE},// added, it works ! {mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {i2c1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, // added, never work ! {NULL, 0, 0},};
When i operate i2c-1 (/dev/i2c-2), there is not any signal(include address signal) on CON-17 & CON-18, and get message
"omap_i2c omap_i2c.2: controller timed out", but the i2c-0(/dev/i2c-1) is OK.
Anyone can help me? Now I don't modify any other kernel code, and I don't know if need to modify/add code.
Thanks!
http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/791/p/addpost.aspx
A wild guess. From what I can tell, that is all you have to do in the kernel. Pinmux is handled. I assume that SCL and SDA are coming out on a expansion connector at CON-17 and CON-18. Do you have pullup resistors on those pins?
thank you.
there is not pullup resistor, so the inner pullup resistor was used. but it doesn't work.the problem may comes from hardware.
Ooops. I did not notice that internal resistors on I2C1 are enabled. The pinmux mode for the I2C1 lines are defined in board-am335xevm.c as:
OMAP_MUX_MODE2 | AM33XX_SLEWCTRL_SLOW | AM33XX_PULL_ENBL | AM33XX_INPUT_EN
I think that means the a pulldown is enabled. I am guessing that you need to add the pullup flag. Something like this:
OMAP_MUX_MODE2 | AM33XX_SLEWCTRL_SLOW | AM33XX_PULL_ENBL | AM33XX_INPUT_EN | AM33XX_PULL_UP
From what I can see in the datasheet, the pullup current at 3.3V is relatively weak and has a wide variance 31uA to 243uA. You should see a signal but it may not be square.
Yes , I added this flag, but it didn't work. So I posted this subject.
Tomorrow I will request the hardware engineer to add external pullup resistors, and then I'll try again.
Thank you!
ok
Hi,
I changed the pin-mux as below and i2c1 is working for me
static struct pinmux_config i2c1_pin_mux[] = { {"spi0_d1.i2c1_sda", OMAP_MUX_MODE2 | AM33XX_SLEWCTRL_SLOW |+ AM33XX_PIN_INPUT_PULLUP}, {"spi0_cs0.i2c1_scl", OMAP_MUX_MODE2 | AM33XX_SLEWCTRL_SLOW |+ AM33XX_PIN_INPUT_PULLUP}, {NULL, 0}, };
on linux
root@arago-armv7:~# i2cdetect -r 2
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-2 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] Y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
kindly test at your end and let me know.
Regards
Gururaja
Does this help with your question? If not, please send back more information. If it answers your question, please click the Verify Answer button.