AnsweredAssumed Answered

S32K144 EVB: No data sent after receiving ACK in I2C

Question asked by Sri Harsha Pavuluri on Jun 26, 2018
Latest reply on Jun 28, 2018 by Sri Harsha Pavuluri



I am trying to interface the S32K144 EVB to the TC74 ( ) temperature sensor. This is my pin configuration:

This is my I2C config:



This is my code:

lpi2c_master_state_t lpi2c1MasterState;

uint8_t buffer[TRANSFER_SIZE];
uint8_t txbuffer;
uint8_t temp;

LPI2C_DRV_MasterInit(INST_LPI2C1, &lpi2c1_MasterConfig0, &lpi2c1MasterState);
txbuffer = 0x00;
LPI2C_DRV_MasterSendDataBlocking(INST_LPI2C1,&txbuffer, 1, false, OSIF_WAIT_FOREVER);
LPI2C_DRV_MasterReceiveDataBlocking(INST_LPI2C1, &temp, 1, true, OSIF_WAIT_FOREVER);


I disabled the internal pullup and I am using external pull-up resistors to pull to 3.3 V because my sensor doesn't operate at 5V. The code compiles fine and I see that the controller tries to send on the I2C lines but there is no ACK received from the sensor.


My SCL is connected to J1-03 and SDL to J1-01.


What am I doing wrong?

EDIT: I set the baudrate to 100 KHz (it was set to 40 KHz before) and I executed only transmit command without receive and I seem to receive ACK. However, no data is being transmitted after that. Still no clue what's wrong. Here is the scope reading:


Thank you,

Sri Harsha Pavuluri