AnsweredAssumed Answered

S32K144 EVB lpi2c slave issue

Question asked by Eason Chen on Mar 6, 2019
Latest reply on Mar 11, 2019 by Eason Chen

Hi,

I want to let s32k144 become slave but it can't work normally.

 

My configuration is as below, 

LPI2C_Set_SlaveAddrConfig(DRV_LPI2C_TYPE, LPI2C_SLAVE_ADDR_MATCH_0_7BIT);

LPI2C_Set_SlaveAddr0(DRV_LPI2C_TYPE,  lpi2cInit.slaveAddr); 

LPI2C_Set_SlaveIgnoreNACK(DRV_LPI2C_TYPE, LPI2C_SLAVE_NACK_END_TRANSFER);
LPI2C_Set_SlaveTransmitNACK(DRV_LPI2C_TYPE, LPI2C_SLAVE_TRANSMIT_ACK);
LPI2C_Set_SlaveACKStall(DRV_LPI2C_TYPE, false);
LPI2C_Set_SlaveTXDStall(DRV_LPI2C_TYPE, true);
LPI2C_Set_SlaveRXStall(DRV_LPI2C_TYPE, true);
LPI2C_Set_SlaveAddrStall(DRV_LPI2C_TYPE, true);

LPI2C_Set_SlaveHighSpeedModeDetect(DRV_LPI2C_TYPE, false);

LPI2C_Set_SlaveInt(DRV_LPI2C_TYPE, LPI2C_SLAVE_BIT_ERROR_INT | LPI2C_SLAVE_FIFO_ERROR_INT | 
      LPI2C_SLAVE_STOP_DETECT_INT | LPI2C_SLAVE_REPEATED_START_INT |
      LPI2C_SLAVE_ADDRESS_VALID_INT | LPI2C_SLAVE_RECEIVE_DATA_INT |
      LPI2C_SLAVE_TRANSMIT_DATA_INT, true);
INT_SYS_InstallHandler(DRV_LPI2C_SLAVE_ISR, LPI2C0_Slave_IRQHandler, (isr_t *)0);
INT_SYS_EnableIRQ(DRV_LPI2C_SLAVE_ISR);

LPI2C_Set_SlaveEnable(DRV_LPI2C_TYPE, true);

 

Is there any configuration missing or wrong?

Thanks.

 

BR,

Eason

Outcomes