S32K144 I2C Recieve data

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

S32K144 I2C Recieve data

1,757 Views
玉敏111田
Contributor III

S32K144 MCU is connected to chip with I2C and S32K144 as master ,chip as slave.

Follow is write and read  format:

pastedImage_1.png

pastedImage_2.png

I have write data to the chip.so I want to read the data that i have writed to the chip.

Follow is my method:

uint8_t Register_Address[1] ={0x36};

uint8_t Rx_buf[1]={0};

uint32_t BytesRemaining;

LPI2C_DRV_MasterSendData(0,Register_Address,1,false);//send internal address

LPI2C_DRV_MasterGetTransferStatus(0,BytesRemaining);//wait ack

if(BytesRemaining == 0)

{

LPI2C_DRV_MasterReceiveData(0,Rx_buf,1, false);

}

But I can't get the data

Labels (1)
0 Kudos
3 Replies

1,249 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Do you monitor the bus with an a logic analyzer / oscilloscope?

Regards,

Daniel

0 Kudos

1,249 Views
玉敏111田
Contributor III

   when I send data ,i catch the timing .But I feel it very embarrassed.pastedImage_1.png

0 Kudos

1,249 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

It clearly sends 0x36.

The spikes could be just a measurement error or you have something wrong with the HW,

Does the slave on the bus return ACK and the data? 

Regards,

Daniel

0 Kudos