Part Number: CC2640R2F
Tool/software: TI-RTOS
I am having an issue trying to perform multiple I2C transfers while also using the UART in a build derived from the simple peripheral example in simplelink_cc2640r2_sdk_1_30_00_25. An additional task was added that interacts with an external piece of HW via TI UART driver. Meanwhile, the main app task is using the TI I2C driver to periodically perform multiple I2C devices. Both the UART and I2C accesses work fine individually. However, a problem occurs when the UART performs a blocking read in the one task. If there is a switch to the app task to perform I2C transfers, only the first transfer succeeds. All subsequent accesses fail until the UART is closed. The way the code is currently written, each I2C_transfer() is enclosed within an I2C_open() & I2C_close() pair. This problem persists until UART_read either completes or times-out, at which point the first I2C access will succeed, but any that immediately follow fail. This condition repeats (with sufficient time between the multiple transfer set) as long as the UART is open. If I add a small amount of delay (3 msec) between each I2C transfer, they will all succeed. When the UART is closed, all I2C transfers succeed with or without delay between them. This problem occurs with different types of I2C devices, so I do not think it has anything to do with a particular slave device.
I started logging the MSTAT register after I2C_open and before I2C_close, and found that for transfers that succeeded, MSTAT == 0x20 at open and close. For the transfers that fail, MSTAT == 0x60 at open and close. So for some reason the BUSBSY bit is stuck ON. I tried writing a 0 to MCTRL after I2C_open() to see if that any effect, but it did not. Based on another forum thread, I also tried temporarily disabling standby and idle while performing the transfers, but that did not seem to have an effect either (especially standby, since that was disabled by the UART read anyway)..
Any ideas? Is this an expected result based on underlying CC26xx HW interactions that I missed?
Thanks for your help.
dave