LPI2C master NACK Issue

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

LPI2C master NACK Issue

跳至解决方案
747 次查看
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 项奖励
回复
1 解答
741 次查看
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 项奖励
回复
2 回复数
742 次查看
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 项奖励
回复
715 次查看
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 项奖励
回复