I2C slave configuration

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

I2C slave configuration

Jump to solution
1,593 Views
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

Labels (1)
0 Kudos
1 Solution
1,573 Views
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.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
1,574 Views
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 Kudos