coolzc 发表于 2012-1-8 15:57:02

请教一个I2C的问题,在官方文档中提到的仲裁时没有定义的情况

在一个i2c最新的英文文档下有这么一段描述:
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.

现在问题是这样的,有两个主机同时寻址一个从器件,两个主机都没有被仲裁出结果,接着又发送了一个同样的数据,这两个主机仍旧没有被仲裁出来。问题来了,接下去A主机发送重复起始位(需要改变此时的传输方向),B主机发送下一个数据,那么在总线上,A发送的这个起始位和B发送的数据位就会同时出现,这时候总该怎么处理呢。因为重复起始位是一个高电平到低电平的过程,而数据则是稳定的低电平或者高电平,这样子应该没法仲裁吧?

本人需要写FPGA的IP core,但是i2c协议又没有对这种情况的出现做出具体的解决方案,该怎么处理呢。不同主机发送的重复起始位,数据位,停止位,同时出现在总线上到底该如何处理呢,求解啊~~~~~~~~~我快郁闷了一个月了。

coolzc 发表于 2012-1-9 22:44:28

有没有朋友碰到过类似情况呀?

superluan 发表于 2012-1-13 17:30:14

这就是无定义的条件,所以没法仲裁了。所有的master操作都无效。
对了,你是指slave该如何动作?我没有太理解。
页: [1]
查看完整版本: 请教一个I2C的问题,在官方文档中提到的仲裁时没有定义的情况