Hi
We are using I2C communication. Earlier we were using Master1(UCB1SCL, UCB1SDA) which was working fine. Now we are trying to use Master0 (UCB0SCL, UCB0SDA) at P3.0, 3.1 with one slave. In the code, in the case of a timeout before the slave responds, STOP is sent to the slave. We wait until bus is free and then return. The bus is busy for a long time before eventually getting released.
UCB0CTL1 |= UCTXSTP;
while (UCB0STAT & UCBBUSY){}; //getting stuck here for a long time
return I2C_TIMEOUT;
Could you let me know why the bus might be busy? Is there a difference in configuration for the two masters that needs to be done?
(This is the first time I'm posting a question on this forum. Pardon me for any mistakes, and let me know if more information is needed).