Sorry Alice, but I dont understand what you mean!
The ISR that I am using is the I2C0_IRQHandler, not I2C_DRV_IRQHandler.
Anyway, I think I'm not being understood too. My goal was a mm8451q accel driver using the KSDK. The communication with the accel (write/read his registers) is made with i2c protocol. For this, I create a high level driver for i2c that uses the KSDK i2c driver. My driver was made for projects with or without the FreeRTOS, using macros for this.
The two most importants methods from my i2c driver are:
uint8_t i2c_MasterWrite( const uint8_t * regAddr,
uint32_t regAddrSize,
const uint8_t * data,
uint32_t dataSize,
i2c_block_t block);
That function write a block of data in specific register of slave device. If using RTOS, the current task are blocked if block == i2cBLOCKED.
The idea is the same for the function that reads from i2c:
uint8_t i2c_MasterRead( const uint8_t * regAddr,
uint32_t regAddrSize,
uint8_t * data,
uint32_t dataSize,
i2c_block_t block);
A issue occurs when I using the FreeRTOS. When entering in the i2c_MasterRead the current task (the only one from my test), take the bus acess through a mutex as shown in figure below, and receives bytes block from i2c bus through I2C_DRV_MasterReceiveData from KSDK. Soon after, the function is blocked by a semaphore , waiting for a signal indicating that all block have been received.

The i2c_TaskWaitBusTransaction corresponds to a macro:

Such signal must be indicated by I2C ISR , as shown in the figure below.

However I was suspected that the interrupt was not triggered only when all the block was sent. So I created a conditional inside the i2c_MasterRead function.

The goal of this conditional is to indicate through the KSDK API if all bytes were really sent. However, during debugging, my program enters inside the conditional and the actual state of i2c module is Indicated in the figure below.

Therefore, the ISR is called even when the bus is busy, ie the block was not sent yet!
My project is attached!
Solutions???