Hallo,
maybe this question is very basic, but unfortunately I was not able to find a solution, neither in this forum, nor elsewhere.
My goal is: to let the I2C working on the EVK and on our custom board with iMX23.
I have configured ltib in such a way to support I2C as master.
After correctly booting from SD:
1) modprobe i2c-dev:
>>>>> i2c /dev entries driver
2) echo "a" > /dev/i2c-0
and all that i get is that the SCK line toggles correctly while the SDA still remain pulled up to VDDIO.
The same behaviour appear also if i run this simple program:
int fds;
char buf[2];
fds = open("/dev/i2c-0", O_RDWR);
ioctl(fds,I2C_SLAVE,0x29);
buf[0] = 0xAA; buf[1] = 0xBB;
write(fds,buf,2);
Could anyone can help me to understand what I miss to do or to find an error?
Thanks in advance,
Fabio
Dear,
thanks for your answers.
The electrical connection were ok (pull-up added, and pins configured correctly). The drive strength 4mA was enough for 4.7k pullup. Anyway I tried also to increase it.
I've definetively checked on the EVK board, using the pin as GPIO, and with the memtool (in the imx test), drive them directy. Unfortunatly the SDA pin was broken. On another board (and on my custom board), everything were ok.
Thanks again for your kind answers.
Fabio
Hi Fabio,
Check if your pullup resistor values are correct. You may also try increasing the drive strength of the I2C Lines.
Regards,
Balaji
maybe you should change the i2c from DMA mode to poll mode