I am trying to interface the S32K144 EVB to the TC74 (http://www.mouser.com/ds/2/268/21462c-73653.pdf ) temperature sensor. This is my pin configuration:
This is my I2C config:
This is my code:
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:
Sri Harsha Pavuluri