Home/Support/Support Forum/Why is IBB never set on I2C1 on MX53?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Why is IBB never set on I2C1 on MX53?

0 votes
I'm trying to set up my iMX53 I2C1 as master using EIM_D21 as SCL and EIM_D28 as SDA. There's only a MCP79410 RTC on the bus, so the mx53 will be the I2C master, and the RTC the I2C slave. EIM_D21 and D28 are of course configured as ALT5 with open-drain, 22k ohm pull up, HYS enable, and low drive strength.

I try to communicate with the RTC from user space using ioctl(), and debug the I2C code via the IMX I2C kernel module and a scope which is connected to both SCL and SDA. I verify with the scope that both SCL and SDA are high before i2c_imx_xfer() and i2c_imx_start() is called, but the code times out in i2c_imx_bus_busy(), because IBB is always 0. When I call the ioctl(), I see that SDA is pulled low (the I2C START signal), followed by SCL pulled low approximately 5 µs afterwards.

i2c i2c-0: ioctl, cmd=0x707, arg=0x7eecfcf0
i2c i2c-0: master_xfer[0] R, addr=0x57, len=1
i2c i2c-0: master_xfer[1] R, addr=0x6f, len=1
i2c i2c-0: <i2c_imx_xfer>
i2c i2c-0: <i2c_imx_start>
i2c i2c-0: <i2c_imx_bus_busy>
i2c i2c-0: <i2c_imx_bus_busy> CONTROL: IEN=1, IIEN=0, MSTA=1, MTX=0, TXAK=0, RSTA=0
i2c i2c-0: <i2c_imx_bus_busy> STATUS: ICF=1, IAAS=0, IBB=0, IAL=0, SRW=0, IIF=0, RXAK=1
i2c i2c-0: <i2c_imx_bus_busy> I2C bus is busy
i2c i2c-0: <i2c_imx_stop>
asked May 17, 2017 in Linux by erlendaasland New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
Please take a look at this example:
does this help?
Also similar problem here:
ended up being a hw issue so perhap try another board.
answered Jun 4, 2017 by LeonidM Veteran of the Digi Community (3,245 points)