LPI2C transmit problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPI2C transmit problem

跳至解决方案
7,605 次查看
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.

 

标签 (1)
0 项奖励
回复
1 解答
7,589 次查看
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 项奖励
回复
4 回复数
7,590 次查看
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 项奖励
回复
7,225 次查看
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 项奖励
回复
7,599 次查看
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 项奖励
回复
7,597 次查看
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 项奖励
回复