Hi,
We are having a query regarding multimaster mode in I2C communication. We are using MSP430F5358 in our project as a multimaster in one USCI I2C module (where the other multimaster is Rfsoc) and as a slave in another module. We have the following queries :
1. Is there any changes in the basic initialization configuration of I2C multi-master? If so, could you please provide some example codes regarding that. For single master, we have used the following code for the I2C master initialization :
/*
* I2C INITIALIZATION
*/
void I2c_init()
{
GPIO_setAsPeripheralModuleFunctionInputPin(
GPIO_PORT_P3,
GPIO_PIN0 + GPIO_PIN1);
USCI_B_I2C_initMasterParam i2c_params_24FC256 = { 0 };
i2c_params_24FC256.selectClockSource = USCI_B_I2C_CLOCKSOURCE_SMCLK;
i2c_params_24FC256.i2cClk = UCS_getSMCLK();
i2c_params_24FC256.dataRate = USCI_B_I2C_SET_DATA_RATE_400KBPS;
/* Initializing I2C Master to SMCLK at 100khz with no autostop */
USCI_B_I2C_initMaster(USCI_B0_BASE, &i2c_params_24FC256);
}
2. From the information we gathered online, we understood that we have to do an isI2cBusBusy check, before doing any I2C transaction to avoid conflicts. Is there any additional parameters to be considered?
It would be helpful if you could provide any information regarding this.