Re: I2C trick?




"Stefan Reuther" <stefan.news@xxxxxxxx> wrote in message
news:fl655s.mk.1@xxxxxxxxxxxxxxxxxxxxxxxx
Vladimir Vassilevsky wrote:

So far nobody suggested a
valid reason why exactly it is a bad idea to swap the SCL and SDA to
separate the I2C slaves.

If I see that correctly, the line-swapped device will see a start
condition whenever the master sends a '1' bit followed by a '0'; it will
see a '0' bit during a direction swap (between master releasing SDA
after the last bit and slave pulling SDA for acknowledge), and a '1' bit
during inactive periods (between a stop condition and a start
condition). This means, it is possible to construct a valid transaction
that is seen as, say, a start condition plus 8 data bits by the
line-swapped device. That device may now start pulling its SDA (i.e. the
current SCL) to low as an acknowledge, and thus lock up the bus.

I thought for a little about what you suggested, still I can't see how this
is possible. Would you please give an example.

Sure it's unlikely. But I've already seen devices lock up I2C even when
doing protocol, so I would avoid that trick if I can. Who knows what
goofs lurk in this world's I2C implementations.

This is certainly true. However I emphasise that nothing in the I2C
standard precludes from doing the tricks like that. There are no unfounded
assumptions. Everything behaves exactly as described.

Vladimir Vassilevsky
DSP and Mixed Signal Consultant
www.abvolt.com





.



Relevant Pages

  • Re: Clitches oder =?ISO-8859-1?Q?St=F6rungen_beim_Atmel_AT?= =?ISO-8859-1?Q?89C4051_
    ... Setzt Du die betreffenden Ports vor jeder Abfrage neu auf "1"? ... (Schon gar nicht bei SCL.) ... verwendest Du mehrere Master, oder nur einen und dazu mehrere Slaves? ...
    (de.sci.electronics)
  • Re: I2C trick?
    ... see a '0' bit during a direction swap (between master releasing SDA ... current SCL) to low as an acknowledge, and thus lock up the bus. ... Seen by line-swapped device: ...
    (comp.arch.embedded)
  • Re: Clitches oder =?ISO-8859-15?Q?St=F6rungen_beim_Atmel_A?= =?ISO-8859-15?Q?T89C405
    ... allerdings nur noch 3 lose Litzen mit GND, SCL und SDA. ... Ich habe viele Glitches beseitigen koennen, indem ich den Master SDA erst unmittelbar vor SCL=1 setzen lasse. ...
    (de.sci.electronics)
  • Re: Probleme mit I2C-Verbindung
    ... Den kann es nur geben wenn ein zweiter Master auf den Bus zugreift. ... The data on the SDA line must be stable during the HIGH period of the ... The HIGH or LOW state of the data line can only change when ...
    (de.sci.electronics)
  • Re: i2c interface
    ... i want to change the data on SDA line at every falling ... on changing data on SDA line at exact falling edge of the SCL, ... You didn't show any code running on the system clock. ...
    (comp.arch.fpga)