I am using the Flow-Chart of Typical I2C Interrupt Routine on MPC5606s Controller. We can write multiple bytes successfully. The problem is when we try to send a read command.
We send the slave and the register address that we want to read, then we generate a repeated START and we send the (slave address + Read bit), the slave send us the value of the register, after that the Arbitration Lost bit (IBAL) is set. We try to clear this bit on the Interrupt function but when we are outside this bit is set again. So we can only read 1 byte and then we cannot have access on I2C bus.
Any help will be appreciated.