I2C总线仲裁相关问题

I2C协议有如下一段话:

img

There is an undefined condition if the arbitration procedure is still in progress at the moment when one master sends a repeated START or a STOP condition while the other master is still sending data. In other words, the following combinations result in an undefined condition:
• Master 1 sends a repeated START condition and master 2 sends a data bit.
• Master 1 sends a STOP condition and master 2 sends a data bit.
• Master 1 sends a repeated START condition and master 2 sends a STOP condition.

如果出现了图中说的3种情况,I2C总线上实际发生了什么?

图片上的文字看的不是很清楚 你复制出来发给我看一下

如果多个设备同时占用总线,怎么判断谁先占用总线呢?所以就需要一种仲裁机制。I2C没有Arbiter直接的来处理仲裁,而是通过线与的逻辑实现仲裁。
仲裁过程:当主设备A准备占用2C时,需要在SCL为高时,将SDA拉高,再拉低,满足一个启动条件。当主设备A将SDA拉高后,需要检查SDA的电平:
1.如果此时SDA电平为高,说明主设备可以占用总线,然后主设备A会将SDA拉低,一次满足启动条件,开始传输;
2.如果此时SDA电平为低,说明总线已经被其他设备占用,主设备A会退出。
为什么SDA为低,就是被其他设备占用了呢?
因为线与逻辑的存在。只有总线上有其他的设备将SDA置为0,线与后,SDA线的电平为0。主设备A检查SDA线的电平时,会发现为低电平。所以仲裁时,哪个设备更早地将SDA线拉低,谁就抢占了优先权。