Unable to get I2C to work on LPC54628 Flexcomm7

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

Unable to get I2C to work on LPC54628 Flexcomm7

482 Views
anealca
Contributor II

I am unable to get Flexcomm 7 to run as an I2C Master on the LPC54628 (OM13098 dev board)

Here is the gist of my MCUxpresso S/W:

1) Enable pins P12 (FC7 Data) and P13 (FC7 SCL)

2) Route 12MHz clock to FC7 and start it (SYSCON->AHBCLKCTRLSET)

3) Config FC7 for I2C (FLEXCOMM7->PSELID->PERSEL = 3)

4) Config as master (CFG = 1)

5) Set clock for 400kHz (CLKDIV = 5, MSTTIME=0x11)

6) Write data (MSTDAT=0xC0, MSTCTL=0x2)

 

Data is not written out to pins?

I see no errors in either status reg (STAT or INTSTAT)

NOTE: I did a similar thing on FC9 for SPI and it works correctly...

Thoughts?

0 Kudos
1 Reply

439 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Adrian,

As you know that the I2C interface requires acknowledge signal for both address and data transfer, the acknowledge signal is driven by slave I2C after master has sent the address or data.

Do you connect the I2C of LPC54628 to slave I2C device for SCL and SDA signals and program it with the address the master send?

If you have connected the spi slave device, pls post your project here so that we can have a review.

BR

XiangJun rong

0 Kudos