I'm trying to communicate with FXO8700CQ sensor on my frdm-k22f board and it has been succesful but it wasn't untill i looked into someones code and added I2C_wait function .I'm not really sure why do i have to wait for interrupt flag and clear it even when i'm not using I2C interrupts(it's not working without it). I thought RXAK bit would be better as a "hold" condition to make sure we got response from slave device. Could u please clear that out?
static inline void I2C_wait(I2C_Type *base)
while((base->S & I2C_S_IICIF_MASK)==0);
base->S |= I2C_S_IICIF_MASK;