LPI2C configuration for s32k324

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

LPI2C configuration for s32k324

2,077 Views
semiconductor_user
Contributor III

hello nxp community

i'm trying to do i2C communiction with sensor but when i am calling Lpi2c_Ip_MasterSendDataBlocking() API my code is stucking so i have doubt in my configuration which i shared below  as well as code with detaile of hardware. 

MCU = s32k324

RTD version = 3.0.0

I2C Clock freq = 40MHZ

i2c instance 0 = PTD13/PTD14

Slave address = 0x1E

 

 

0 Kudos
Reply
1 Reply

2,047 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @semiconductor_user 

The configuration seems correct, I just have few observations, first you have configured the I2C Asynchronous Method as LPI2C_USING_INTERRUPTS but you have not enabled LPI2C0_IRQn and and therefore there is no handler (LPI2C0_Master_Slave_IRQHandler) assignment in the Interrupt Controler (IntCtrl_Ip).

Also, about Lpi2c_Ip_MasterSendDataBlocking() function when you asiggne "&reg" as the value of uint8 * TxBuff you are assigning the address of the data instead of the data, so use just "reg" instead of "&reg".

 

BR, VaneB

0 Kudos
Reply