S32K144 MCU is connected to chip with I2C and S32K144 as master ,chip as slave.
Follow is write and read format:
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
Hi,
Do you monitor the bus with an a logic analyzer / oscilloscope?
Regards,
Daniel
when I send data ,i catch the timing .But I feel it very embarrassed.
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