Can't get the I2C LPCOpen example to work (LPC812)

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

Can't get the I2C LPCOpen example to work (LPC812)

632 Views
zzzmqp
Contributor III

Hello,

sorry about such a basic question, but I can't get the LPCOpen I2C example to run out of the box.

It compiles and runs fine, but *nothing* happens on the I2C bus. (I have an oscilloscope hooked up to the I2C lines)

Environment:

  • MCUXpresso IDE v10.3.1 [Build 2233] [2019-02-20]
  • "periph_i2cm_interrupt" example from "lpcopen_2_19_lpcxpresso_nxp_lpcxpresso_812.zip" (came with IDE)
  • LPCXpresso LPC812 REV A board

I also tried the other I2C examples (i2cm_polling, i2cm_rom), but the result is the same. Neither I2C line will ever see any signal change.

I must be missing some super basic setting. Any ideas?

Thank you!

Labels (3)
Tags (2)
0 Kudos
1 Reply

518 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello,

I have replicated what you want to do and I am able to see the signal in the oscilloscope.

This what I did:

I used the example periph_12cm_interrupt from the LPCOpen just as you did. I am also using the same version of MCUXpresso. 

I ran the project on the board and here we know its running properly as the LED indicates the I2C is transferring data. 

I tested on two different places for the I2C on the oscilloscope:

From the code itself we know they are using PIO_10/11 for SDC and SCLpastedImage_1.png

So I used the pins from two different headers that the LPCXpresso812 has.

pastedImage_2.png

When you are checking on the oscilloscope the led should still be blinking, if at any point the led turns off or stays turned on. I would recommend to restart the project.

In addition some points to double check:

- Check that your oscilloscope probes are working properly

- Check all your connections (specially GND of your oscilloscope to your board)

If you'd like me to share the oscilloscope configurations that I used (such as the time scale and voltage scale as well as the trigger), please let me know.

Hope this information is useful, let me know if you have any other observations or questions.

Have a great day!

Sabina