I2C Slave Callback not being called...

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

I2C Slave Callback not being called...

272 Views
jwoo124
Contributor II

Hi, this is based on the k3x4evb-t172 board.

I'm trying to use this board as a slave device in order to test transmitting/receiving from this end.

Using channel LPI2C0 as Master and LPI2C1 as the Slave device. I've already tested as the Master device with an EEPROM before this and now using it as a slave device instead.

After searching, I've just made a simple MasterSendData to show the regular transmission between the Master and Slave. I created a SlaveCallback function and added events so that they can be triggered during interrupts. I've used interrupt handler and everything else.

When running the debugger, it doesn't seem to leave the MasterSendData/GetTransfer loop to even hit the callback. 

I was wondering if I was approaching this correctly? I feel like something is always missing..

I thought that approaching this with coding the callback would help me understand how the transmission between the 2 worked, but maybe I'm going about this wrong?

Tags (2)
0 Kudos
Reply
3 Replies

232 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Which version of S32K3 RTD did you install?
I installed RTD 4.0.0 in S32DS v3.5, and the I2c_Ip_Example_S32K344 project has configured LPI2C1 as interrupt mode and set a Callback (I2c_SlaveCallback). It is recommended to refer to this example.


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
Reply

214 Views
jwoo124
Contributor II

Hi Robin,

I am currently using both S32DS 3.4 and 3.5, RTD 2.0.0 for 3.4 and RTD 2.0.3 for 3.5.

I tried to install RTD 4.0.0 for 3.5 like you suggested; however, after doing so, I still could not find the folder for 4.0.0. It still shows as before. For the I2C_Ip_example you are talking about, is it the one that uses MCAL with the callback function that doesn't specify a Slave Callback, but uses a callback in general?

0 Kudos
Reply

194 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Please check whether it meet your needs. I am using S32DS v3.5 + S32K3 RTD 4.0.0. 

I2c_Ip_Example_S32K344_RTD400 Slave callback function I2c_SlaveCallback.pngI2c_Ip_Example_S32K344_RTD400 I2c_SlaveCallback.png

If you want to install S32K3 RTD 4.0.0, please refer to the discussion in RTD 4.0 with Design Studio 3.5.

Unfortunately, there is no current way to install multiple RTD packages in the same instance, as a workaround, you can install multiple instances for S32DS like:
C:\NXP\S32DS.3.5_RTD300\
C:\NXP\S32DS.3.5_RTD400\
and then install specific RTD to each instance.

0 Kudos
Reply