Tool/software:
When an i2c combined transaction (write 1 byte + read 1 byte) is followed by a write transaction (write 2 bytes), the i2c driver of the SDK never detects the end of the write transaction causing the following transactions to never be executed.
I use the i2c in non-blocking mode. Diving into the sdk i2c driver I've discovered that the cause of the i2c driver not detecting the end of the write transaction is that the I2C_IRQSTATUS register never asserts the BF nor the ARDY bits.
I've also discovered that the I2C_IRQSTATUS_RAW register does assert the BF bit, but the sdk driver does not check it because the iteration of the loop in the I2C_hwiFxnController function in which it's asserted the value of I2C_IRQSTATUS register is 0, causing the loop to end not reading the I2C_IRQSTATUS_RAW register.
Replacing the line 642 of the i2c_v0.c file of the sdk with the following lines, would solve the problem?
rawStat = I2CControllerIntRawStatus(object->baseAddr);
if (((0U == stat) && (0 == rawStat)) || (isrLoopCount > I2C_MAX_CONSECUTIVE_ISRS))
Using MCU PLUS SDK AM64x 09.01.00.41