evkcmimxrt1060_lpi2c_interrupt Not working

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

evkcmimxrt1060_lpi2c_interrupt Not working

280 Views
seandutoit
Contributor II

Good day

I am trying to run evkcmimxrt1060_lpi2c_interrupt on a MIMXRT1060-EVKB development board.

The connections on the board is as per instuctions in the reag.me file:

Board settings

============

To make lpi2c example work, connections needed to be as follows:

 

LPI2C1 SCL(J33-6) --> LPI2C3 SCL(J16-1)

LPI2C1 SDA(J33-5) --> LPI2C3 SDA(J16-2)

 

I downloaded the project by using MCUXpresso IDE "Import SDK examples " function.

The project compiles perfectly and I can debug it on the development board.

The only problem is that the software does not run as expected.

 

In the debug terminal I only see:

 


LPI2C example -- MasterFunctionalInterrupt_SlaveFunctionalInterrupt.
Master will send data :
0x 0 0x 1 0x 2 0x 3 0x 4 0x 5 0x 6 0x 7
0x 8 0x 9 0x a 0x b 0x c 0x d 0x e 0x f
0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f

 

When measuring with a oscilloscope on the CLK line of the I2C bus, there are no clocks.

 

When I import the project , it automatically chooses the latest installed SDK Version 24.12.00.

 

Can someone please help me solve this problem.

0 Kudos
Reply
4 Replies

254 Views
mayliu1
NXP Employee
NXP Employee

Hi @seandutoit ,

Thank you so much for your interest in our products and for using our community.

I did a test for you, the demo runs ok, Please following what I did.

I use MIMXRT1060-EVKB board, I import SDK demo "evkbmimxrt1060_lpi2c_interrupt".

I connect 

LPI2C1 SCL(J33-6) --> LPI2C3 SCL(J16-1)

LPI2C1 SDA(J33-5) --> LPI2C3 SDA(J16-2)

Please double check you really connected these two pins.

Please check if the wiring harness connection is correct, or replace it with a new one.

mayliu1_0-1742201295573.pngmayliu1_1-1742201513869.png

If you are sure the connection is ok, Please use MCUXPresso IDE debug the project, and check whether something unusual.

 

Wish it helps you.
If you still have question about it, please kindly let me know.

Wish you a nice day!

Best Regards
MayLiu 

 

0 Kudos
Reply

219 Views
seandutoit
Contributor II

Good day

 

I rechecked my cables and after powering on the dev board, I still received the same error.

I then proceeded to debug the software and received error 900 at line 294 in lpi2c_interrupt.c

reVal = LPI2C_MasterStart(EXAMPLE_LPI2C_MASTER_BASEADDR, LPI2C_MASTER_SLAVE_ADDR_7BIT, kLPI2C_Read);

if (reVal != kStatus_Success)

{

return -1;

}

reVal was 900 here.

 

After a couple of tried it suddenly started to give me a value of 0 and got

to the breakpoint in the interrupt routine at line 51.


 

seandutoit_1-1742230810699.png

 

I was expecting the interrupt to be triggered again but it did not.

 

I then stopped debugging and power cycled the board a couple of times( about 10 - 12)

when it suddenly started working.

 

I ran the debugger and the code worked.

 

Now I am just wondering why it suddenly started working.

 

Is there a list of what an error code means?

 

Tags (1)
0 Kudos
Reply

176 Views
seandutoit
Contributor II

Good Day

I have the Sample code working on the Development kit.

I then ran the same code on my custom board. The only changes I made is to use LPI2C4( Pins H1 and G3) as they are free on my custom PCB.

The program does not run as expected or as on the Development PCB.

When running debug mode, the Master interrupt does trigger once.

When looking at the oscilloscope, I get clock pulses on the CLK line but only a Start Condition( SDA High to Low) but no other data is being transmitted.

The current SDK is SDK_2x_MIMXRT1060-EVKC version 24.12.00.

The Processor on the Custom PCB is the MIMXRT106S.

I tried loading SDK_2x_MIMXRT106SxxxxA Version 2.8 but that did not change the behaviour.

 

Is there anything I may have missed?

 

0 Kudos
Reply

120 Views
mayliu1
NXP Employee
NXP Employee

Hi @seandutoit ,

 

Thanks for your updated information.

Please check next points:

Hardware:  The SDA and SCL lines of the I2C bus need to be connected to pull-up resistors to ensure that the lines are in a high-level state when no device is driving them.

Software: Please double check I2C config, especially  Software Input On and Open drain need set Enable. Please refer to SDK demo I2C Config.

mayliu1_0-1742781995396.png

Wish it helps you.
If you still have question about it, please kindly let me know.

Wish you a nice day!

Best Regards
MayLiu

0 Kudos
Reply