I2C slave configuration

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

I2C slave configuration

跳至解决方案
1,617 次查看
soniyajchand
Contributor II

Hi,

I am trying to perform a loopback I2C communication between I2C1 and I2C0. Here I2C0 is configured in slave mode. Trying to generate I2C clock from I2C1 master, which is not happening. I checked the status of MTDR register by updating it with slave address and the command to to perform repeated start. I found the register not getting updated with the bit values. Not able to figure out what possibly could be the reason. What areas should I check to debug this issue?

Another doubt it, do I have to configure CGC, PCS and PR of PCC register for I2C0 which is acting as a slave or for slave these fields shouldn't be configured as master controls the clock? Master code to STARTMaster code to STARTPCC configuration  for I2C slavePCC configuration for I2C slave

Thanks in advance.

Regards,

Soniya Chandran

标签 (1)
标记 (1)
0 项奖励
1 解答
1,597 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Soniya Chandran,

Since you are using S32 Design Studio for ARM Version 2.2, please refer the lpi2c_master_s32k148 and lpi2c_slave_s32k148 example in S32SDK S32K1xx RTM v3.0.0 Example Projects.

lpi2c_master_s32k148 lpi2c_slave_s32k148.png

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
1 回复
1,598 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Soniya Chandran,

Since you are using S32 Design Studio for ARM Version 2.2, please refer the lpi2c_master_s32k148 and lpi2c_slave_s32k148 example in S32SDK S32K1xx RTM v3.0.0 Example Projects.

lpi2c_master_s32k148 lpi2c_slave_s32k148.png

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励