Part Number: CC2650
Tool/software: TI-RTOS
Is multi-master still unsupported in the current I2C drivers?
If it isn't, can anyone possibly point me in the right direction for a solution?
Thanks.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: CC2650
Tool/software: TI-RTOS
Is multi-master still unsupported in the current I2C drivers?
If it isn't, can anyone possibly point me in the right direction for a solution?
Thanks.
Hi,
as far as I see in the API documentation of the I2C driver, it is not supported, but it shouldn't be hard to enable it:
/* Some sort of error happened! */
object->mode = I2CCC26XX_ERROR;
if (errStatus & I2C_MASTER_ERR_ARB_LOST) {
SwiP_post(&(object->swi));
}
else {
/* Try to send a STOP bit to end all I2C communications immediately */
/*
* I2C_MASTER_CMD_BURST_SEND_ERROR_STOP -and-
* I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP
* have the same values
*/
I2CMasterControl(hwAttrs->baseAddr,
I2C_MASTER_CMD_BURST_SEND_ERROR_STOP);
/* Do not post SWI here to avoid subsequent transfers being stopped.
Wait till the stop condition interrupt to post SWI */
}
Now I would assume that you need to add some logic into the driver to restart arbitration certain times before giving up. Does that make sense?
Nicholas Nicou said:So based on your statement, and what I am seeing in the current driver, is that driver does check to see if the bus is occupied, flags the arbitration error bit if it is, the above section checks the error, and terminates communication.
All that is missing is the logic to reschedule to check if the bus is occupied and restart arbitration.
From what I can see and how I understand the existing driver, yes.