I2C Configuration

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C Configuration

Jump to solution
2,079 Views
riz1231
Contributor I

Hi,


We are having issues getting I2C to transfer any data on SDA line.  We do following configuration for its most basic function to transfer a byte:

Enable I2C module: Clear I2Cx_IBCR_MDIS bit

Generate START condition: Set (I2Cx_IBCR_MSSL | I2Cx_IBCR_TXRX)     i.e   I2Cx_IBCR has value 0x30

After this point voltage on both SCL and SDA lines is pulled low when START condition is generated.

Load Data Register: I2Cx_IBDR = 0x30 (for TX to a slave at 0x18 address )

But no activity happens at this point, voltage on both lines remains pulled low and I can’t do anything further. I am connected to Aardvark slave and Beagle analyzer shows 0 bytes. No data shows up on line.

What could be possibly wrong with this fairly simple setup to try transfer a byte? I am doing following IOMUX settings:

IOMUXC_PTB14 = 0x002011A3

IOMUXC_PTB15 = 0x002011A3

Clock enable: CCM_CCGR4_CG6 = 1

Kindly let us know correct GPIO/ baud rate setting (to configure I2C for 100 or 400KHz data from 66MHz IPS clock) if they have got anything to do with this issue or anything else that might help resolve this issue.


Thanks,

Rizwan


0 Kudos
1 Solution
1,618 Views
anthony_huereca
NXP Employee
NXP Employee

Hi,

  Try using the attached code as an example. This was used with a demo with the TWR-LCD-RGB to talk to the CRTouch chip via I2C. Hope it helps!

View solution in original post

0 Kudos
1 Reply
1,619 Views
anthony_huereca
NXP Employee
NXP Employee

Hi,

  Try using the attached code as an example. This was used with a demo with the TWR-LCD-RGB to talk to the CRTouch chip via I2C. Hope it helps!

0 Kudos