今天又发现了一个问题,前几天也是在21IC的论坛上看见有这样一条帖子,上面说如果有2个节点具有相同的ID,同时向总线上发送不同的数据帧,那么这两个节点将会继续仲裁数据场,只到有一方退出。开始我也是这样认为的,但是下午在看到CAN-bus规范V2.0上,关于应答场(ACK)部分的时候,想到了, 如果真是如上所述,就会出现一种比较奇怪的现象:
因此,以上说法是不成立的,其实由CAN-bus规范V2.0的P8页上有如下语句:
Arbitration
Whenever the bus is free, any unit may start to transmit a message. If 2 or more units
start transmitting messages at the same time, the bus access conflict is resolved by
bitwise arbitration using the IDENTIFIER. The mechanism of arbitration guarantees that
neither information nor time is lost. If a DATA and a REMOTE with the
same IDENTIFIER are initiated at the same time, the DATA prevails over the
REMOTE . During arbitration every transmitter compares the level of the bit
transmitted with the level that is monitored on the bus. If these levels are equal the unit
may continue to send. When a ’recessive’ level is sent and a ’dominant’ level is
monitored (see Bus Values), the unit has lost arbitration and must withdraw without
sending one more bit.
推荐阅读最新更新时间:2024-05-02 23:57