日期:2014-05-16  浏览次数:20579 次

freescale imx51 u-boot中i2c驱动 mxc_i2c.c
我通过u-boot自带命令i2c 对eeprom 进行读写工作 
  具体eeprom挂载地址是0x50
BBG U-Boot > i2c md 0x50 0x00 0x12 2
i2c_read chip: 0x50 addr: 0x0000 alen: 1 len: 16
i2c_addr:chip address cycle fail(a1)
i2c_addr failed
Error reading the chip.
i2c_read chip: 0x50 addr: 0x0000 alen: 1 len: 2
i2c_addr:chip address cycle fail(a1)
i2c_addr failed
Error reading the chip.
出现以上错误、 编写程序直接用mxc_i2c.c中的i2c_read 或者 i2c_write也出现同样的错误.是不是i2c驱动mxc_i2c.c的问题。请大家给点建议。求关注、 有解决方案分全给/

------解决方案--------------------
你可以先在uboot中用i2c probe查看一下有没有0x50这个addr。
还有一个就是mx51的uboot默认只支持i2c1这条线,如果你的0x50是挂在i2c2上的话你要修改一个参数。。。对你来说应该很好找,呵呵,还有问题就keep in touch with me!!