LPI2C master NACK Issue

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

LPI2C master NACK Issue

Jump to solution
483 Views
RehabSoliman
Contributor I

Hi, I'm trying to send Frame ID to the slave and then read request to read the data 

it sends the frame id but in the read I have an issue that the operation return received NACK and there is no data send to the master.

I couldn't know how to solve this issue 

that is the code:

enuRequestStatus = LPI2C_DRV_MasterSendDataBlocking(INST_LPI2C0,FrameID,1,false,OSIF_WAIT_FOREVER);
if( enuRequestStatus == STATUS_SUCCESS)
{
// send blocking read request (with STOP condition)
enuRequestStatus = LPI2C_DRV_MasterReceiveDataBlocking(INST_LPI2C0,pI2cData,u8DataSize, true,OSIF_WAIT_FOREVER);

could you help me in this issue please ?

0 Kudos
1 Solution
477 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

the code used should be right, so most probably there will be issue on slave side. Can you share screenshot of bus signal?
Who is a slave? Another S32K? Then what code is used?

BR, Petr

View solution in original post

0 Kudos
2 Replies
478 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

the code used should be right, so most probably there will be issue on slave side. Can you share screenshot of bus signal?
Who is a slave? Another S32K? Then what code is used?

BR, Petr

0 Kudos
451 Views
RehabSoliman
Contributor I

Hi 

yes, the problem on the testing way I used Aardvark as slave so it can't handle write and read together 

but when I use another S32K142 EVB It work well 

thanks for your support.

regards,

Rehab

0 Kudos