LPI2C transmit problem

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

LPI2C transmit problem

Jump to solution
4,022 Views
netscream
Contributor II

I have a IMXRT1062 and I am trying to use AD_B1_07 and AD_B1_06 pins on LPI2C3. I've setup 100Khz I2C Clock and when I scope it then it is 100Khz, the problem is when I try to transfer any data. 

It will generate the startbit but the address is always 0x00 unless I set the address to 0x7F then it will be 0x7F.

I am using 4.1K pullup on the lines.

 

Labels (1)
0 Kudos
Reply
1 Solution
4,006 Views
netscream
Contributor II

For anyone having the same problem, it is all about the Pin setup for me it was AD_B1_06 and AD_B1_07, the other problem was that always when I configured the pins correctly then the Slave device had gone into fault mode and nothing happened on the line, so remember to hook up the reset line also if you can.

View solution in original post

0 Kudos
Reply
4 Replies
4,007 Views
netscream
Contributor II

For anyone having the same problem, it is all about the Pin setup for me it was AD_B1_06 and AD_B1_07, the other problem was that always when I configured the pins correctly then the Slave device had gone into fault mode and nothing happened on the line, so remember to hook up the reset line also if you can.

0 Kudos
Reply
3,642 Views
j_alex
Contributor I

Hello, can you share please more details on how you have solved the problem. I am having the same issue with the same nxp and the same sdk example. 

best regards, 

0 Kudos
Reply
4,016 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @netscream 

 When you use the I2c3, you are using it as master or slave?

  Do you check this code?

SDK_2_10_0_EVK-MIMXRT1060\boards\evkmimxrt1060\driver_examples\lpi2c\interrupt

This code use I2C1 as master, I2C3 as slave, if you use the I2C3 as master, you can change the code and test it directly, whether you can reproduce the issues or not? You can change the LPI2C_MASTER_SLAVE_ADDR_7BIT to your own defined data. Please note, this is the 7 bit address, you need to set the data in the range of 7bit.

 

If you still have issues, just kindly let me know.

Best Regards,

Kerry

 

0 Kudos
Reply
4,014 Views
netscream
Contributor II

This is the example I am using to test the I2C on my IMXRT1062.

The unit I am using is Teensy 4.0. On arduino the I2C works fine, but as soon as I use NXP provided example then it stops working. 

I know the clock is correct, otherwise, the SCL would not provide a 100Khz clock. I was just wondering if the setup of I2C3 was different from I2C1 or there is something I am forgetting.

I was also wondering if anyone else had this issue.

0 Kudos
Reply