Hi Erich,
I doubled checked, and each task is only using 25-30% of its allocated stack, so I don't think its a memory/stack overflow.
The I2C buses are configured in the auto generated board.c/peripherals.c files.
As for the transmit receive operations, I'm using the I2C_RTOS_Transfer() API. I set up the transfer structure and then call the API function. The microcontroller is continuously polling various status parameters from the slave devices. I have the following code snippet repeated for the ~20 status parameters, then the task sleeps for 1 second and then polls again.
The communication does work for a few seconds then after a few minutes one of the two buses hangs.
// Make sure bus is not in use
i2cStatus = I2C_MasterGetStatusFlags(busId);
while (kI2C_BusBusyFlag & i2cStatus)
{
i2cStatus = I2C_MasterGetStatusFlags(busId);
}
// Set up Transfer Structure
masterXfer.direction = kI2C_Read;
masterXfer.subaddress = 0x8B;
masterXfer.data = (uint8_t*)&status;
masterXfer.dataSize = 2;
// Initiate Transfer
I2C_RTOS_Transfer(i2cX_RtosHandle, &masterXfer);