imx53 i2c-1 busy ,

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

imx53 i2c-1 busy ,

跳至解决方案
2,118 次查看
潘紫东
Contributor III

hello everyone,i have a problem in i2c1 in  imx53.

when i operation i2c bus , i2sr_ibb   alway   is detect   ibb=1;   i do not why ?

i don't know this is a  software problem or hardware problem ?   i need help.

root@freescale ~$ hwclock -w
rtc-pcf8563 1-0051: pcf8563_set_datetime: secs=13, mins=11, hours=11, mday=1, mon=0, year=70, wday=4
i2c i2c-1: master_xfer[0] W, addr=0x51, len=2
i2c i2c-1: <i2c_imx_xfer>
i2c i2c-1: <i2c_imx_start>
i2c i2c-1: <i2c_imx_bus_busy>
i2c i2c-1: <i2c_imx_bus_busy> I2C bus is busy
i2c i2c-1: <i2c_imx_stop>
i2c i2c-1: <i2c_imx_bus_busy>
i2c i2c-1: <i2c_imx_xfer> exit with: error: -110
rtc-pcf8563 1-0051: pcf8563_set_datetime: err=-110 addr=02, data=13
hwclock: RTC_SET_TIME: Input/output error

i2c devices addr is  right,and    i use eim_d16  and  eim_eb2     as i2c-1   pin

MX53_PAD_EIM_D16__I2C2_SDA,

#define MX53_PAD_EIM_D16__I2C2_SDA              (_MX53_PAD_EIM_D16__I2C2_SDA | MUX_PAD_CTRL(MX53_I2C_PAD_CTRL_1))


#define _MX53_PAD_EIM_D16__I2C2_SDA                     IOMUX_PAD(0x460, 0x118, 5, 0x820, 1, 0)

  MX53_PAD_EIM_EB2__I2C2_SCL,


#define MX53_PAD_EIM_EB2__I2C2_SCL              (_MX53_PAD_EIM_EB2__I2C2_SCL | MUX_PAD_CTRL(MX53_I2C_PAD_CTRL_1))


#define _MX53_PAD_EIM_EB2__I2C2_SCL                     IOMUX_PAD(0x45C, 0x114, 5 | IOMUX_CONFIG_SION, 0x81C, 1, 0)

标签 (1)
0 项奖励
回复
1 解答
1,461 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Zidong,

      It seems that you connected a RTC IC on I2C2 bus, Please measure 32.768k crystal for RTC by oscilloscope, I feel this crystal doesn't work !

      if the waveform is OK, we can check others .

Regards,

Weidong

在原帖中查看解决方案

0 项奖励
回复
6 回复数
1,461 次查看
vipermania
Contributor I

Hi all,

I have a problem with I2C on imx6Solo.

Here is my environment: Processor: imx6Solo, OS: Windows embedded compact 2013. Board: Custom.

imx6solo is connected with a touch controller via I2C. When the device boots, everything seems ok but after first touch on the screen (which means after first I2C read or write operation) I2C hangs.(apparently, device hangs).

My observations are:

1. ) Interrupt coming from screen touch can be detected. I can see this fact on the console output. (Every touch IRQ is logged to serial trace)

2. )After single touch on the screen, read and write requests are seen periodically.

3.) The I2C protocol flow is here:

    Grant Bus Master -> change to receive mode -> Ensure the Start operation is DONE.


To ensure the start operation is done, check if IBB bit is set to 1(which means I2C is busy). The problem arised here. IBB bit is never set to 1!! in other words stucks at ZERO. I am checking this case several times and after a while gives such an error "I2C Generate Start can't launch".


4.) Second finding is SDA line. I probed the I2C lines and observed that when the device wake up, both I2C line states seem ok.(both stay high) but after first touch SDA stucks at ZERO!!! When the line is observed for a while, sometimes it gets high for a short time but then goes back to low which does not make sense.


I believe that the problem should not be too hard and i am missing a point. Could you all please help me for this issueWhat can the reason of this problem be?


Thanks in advanced,

Best regards

0 项奖励
回复
1,462 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Zidong,

      It seems that you connected a RTC IC on I2C2 bus, Please measure 32.768k crystal for RTC by oscilloscope, I feel this crystal doesn't work !

      if the waveform is OK, we can check others .

Regards,

Weidong

0 项奖励
回复
1,461 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Pan

     Did you resolve your quesions ?

Weidong

0 项奖励
回复
1,461 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello, Pan,

     How about your RTC ?

weidong

0 项奖励
回复
1,461 次查看
潘紫东
Contributor III

hello.weidong

in  imx53  , sometimes when android system boot up,   kernel hung up in mxcuart_rx_chars  function. ... don't why when irq function read uart rxd register ,linux kernel hung up.could you help me?

0 项奖励
回复
1,461 次查看
潘紫东
Contributor III

thank you,sir i had solve the problem.

0 项奖励
回复