Hi,
I am currently working on an I2C interface (student project). The normal arbitration process seems to be clear for me but in some specific cases I have some problems. They are all related to the situation in which no one has won the arbitration after several bytes and one likes to generate a RESTART or a STOP while the other likes to continue to transmit.
- Assume that two masters access the bus at the same time, they start a write access to the same slave (no conflict detected) and they write the same data byte (no conflict detected). Now one master likes to STOP keeping SDA low and the other one likes to write a byte with MSB high. For sure, the second master detects a conflict but by standard, this master can continue to generate the clock until the end of the byte. When this master drives the clock line low before the master released SDA to generate the STOP, there will be no STOP on the bus. In worst case, the accessed slave will generate the ACK but gets no falling edge as the first master stops generating the clock after the transmitted byte.
Do you have any idea how to solve this?
- Assume that two masters access the bus at the same time, they start a write access to the same slave (no conflict detected) and they write the same data byte (no conflict detected). After that, master 1 likes to generate a RESTART while master 2 likes to continue by transmitting a data byte with MSB high.
It seems to me that also in this case, especially at the falling clock edge, problems can occur
Thanks for some hints, Kris