This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I2C Busy Busy detection

Hello,
I'm implementing I2C Multi-Master/Slave mode handling in the LPC2132 chip. I have few queries about the LPC213x's I2C controller operations.

The user manual says that if the is SI bit (serial interrupt) is cleared or if the I2CSTAT is 0xF8, then there is no activity in the bus.

1. Should the master be polling for this status before initiating a start condition and before every other transaction?

2. Should the software implement an explicit locking mechanism to ensure that the transaction is not interleaved? For instance there could be delays between two bytes (induced by software) in a particular I2C transaction by a master and this should not be interpreted as a 'no serial transaction' by another master. This would allow the other master to snoop the bus while a transaction is already proceeding.

3. If explicit locking must be done in software, how could the controller being in Master mode sense the START/STOP condition driven by other masters?

Thanks in advance.

Parents
  • Hi,
    here you find some infos on I2C: www.i2c-bus.org/.../.
    1. yes, you will have to do this - look to the link
    2. you will not have to block the bus, because another I2C master will have to wait for stop condition in order to start a new transaction - so you must be sure, that all masters are multi-master-able
    3. this is not allowed - look to the link

Reply
  • Hi,
    here you find some infos on I2C: www.i2c-bus.org/.../.
    1. yes, you will have to do this - look to the link
    2. you will not have to block the bus, because another I2C master will have to wait for stop condition in order to start a new transaction - so you must be sure, that all masters are multi-master-able
    3. this is not allowed - look to the link

Children