imx6 solo I2C SCL and SDA stay low.

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

imx6 solo I2C SCL and SDA stay low.

1,191 次查看
hailiu
Contributor IV

Dear friends,

I am verifing I2C functionally of the imx 6 solo processor. The I2C1 has only one device connected. I use the following code to verify the function:

BW_I2C_I2CR_IEN(port, 0);
BW_I2C_IFDR_IC(port, icValue);
BW_I2C_IADR_ADR(port, IMX6_DEFAULT_SLAVE_ID);

regValue=HW_I2C_I2SR_RD(port);
HW_I2C_I2SR_WR(port, 0);
regValue=HW_I2C_I2SR_RD(port);
BW_I2C_I2CR_IEN(port, 1);

at the first regValue=HW_I2C_I2SR_RD(port) line, regValue is 0x81, at the second regValue=HW_I2C_I2SR_RD(port), the value is still 0x81.

I placed a scope on this bus, After I set the MSTA bit, the start condition looks fine, but there is no clock following that, both the clock and data lines stay low, even if I change the MSTA bit to 0, no STOP condition generated. only if I reset the I2C (IEN=0), the data line and clock line goto high. The IBB bit never goes to 1 . Attached is the plot I got, green plot is SDA waveform, yellow one is the SCL waveform, Is the clock setting not correct or the pin setting not correct?

I also configured both pins as GPIO pins and I can change both pins level, so the hardware connection is OK.

thank you,

Hai

0 项奖励
回复
1 回复

1,176 次查看
hailiu
Contributor IV

Finally found the reason, the sion bit of PAD control register must be set to 1.

0 项奖励
回复