S32K14x MCAL I2C I2c_SyncTransmit error

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

S32K14x MCAL I2C I2c_SyncTransmit error

366 Views
DELPHI_Eric
Contributor III

Snipaste_2023-07-03_14-12-59.pngSnipaste_2023-07-03_14-20-51.png

It could send slave device address OK, but slave device not response ACK, and the function

I2c_LPI2C_MasterSyncSend() first enter loop could run to section
I2c_LPI2C_au8CurrentIndex[u8Channel]++;                                                                                            but second loop run into function I2c_LPI2C_MasterErrorHandler()  
/* Log the error and it will be checked during the sync transfer or in the DMA transfer */ I2c_LPI2C_au8ErrorsFound[u8Channel] = 0x1U;  so cause the code ran at 
I2c_aeChannelStatus[s8LogicalChannel] = I2C_CH_ERROR_PRESENT;   return E_NOT_OK,break out.      Is there some MCAL IIC sample application demo can reference,and how to figure out the problem before. Thank you!

Tags (3)
0 Kudos
1 Reply

362 Views
DELPHI_Eric
Contributor III
In the function I2c_LPI2C_MasterSyncSend() , when the while(;;) first loop, the line 1601:u32IsrStatus = REG_READ32(LPI2C_MSR_ADDR32(u8Channel)); u32IsrStatus read value was 0x3000001;when the second loop, u32IsrStatus read value was 0x700
0 Kudos