Electronic – Does the STOP condition have any meaning on a single master I2C system

i2cmulti-masterpic

I'm currently working on rewriting some of the code on my I2C driver, and I'm trying to figure out the exact purpose of the STOP condition.

I believe that on a multi-master system, once a START condition has happened, the other masters can't/shouldn't drive the bus until a STOP has happened.

  • But what about on a single master system?
  • Does the STOP condition have any function? What exactly does it do?
  • Because the I2C bus works DC-x Hz, couldn't you just keep doing start
    conditions and re-start conditions any time you need to send data?
  • What does doing the STOP at the end give you?

Best Answer

The STOP is an indication to the slave device that communications are complete. It's ingrained in the protocol and spec-compliant slave devices expect to see it, so you simply can't wish it away.

For instance, if you're doing a page-write to a 24AA04 serial EEPROM (up to 16 bytes of data), the EEPROM will stop buffering data and start writing to flash upon receipt of the STOP from the master. You're not obligated to send a full page, so you need the STOP as a clear indication that there are no more bytes coming. (Some EEPROMs will throw away pending transactions if a STOP is not received at an expected/appropriate time, which can lead to some head-scratching debugging problems.)

Some devices also use the STOP to enter a reduced-power-consumption mode, drawing less power until the next START wakes them up.