Reputation: 864
So, we have a CAN installation, with some repeater/router in it.
Basically, I suspect that two node are sending the same message, and that in a part of our installation which is just a cable with a router on each end, both routers are trying to send that message with the same ID. Because they send a message with the same ID and payload at the same time, they believe they both are sending and none of them send an ACK. They then both get into bus off error mode and reboot.
I can't find it in the standards, but I've always believed that in this case, there should be an random delay before a node try to send the message again. Is there ?
Upvotes: 0
Views: 211
Reputation: 3
I agree with Lundin, 2 CAN nodes sending data frames with same ID & Data at the same time will not cause any issue since all other nodes will see just 1 frame in the CAN Bus. However if the 2 data are different, this will result in errors like bit error & CRC error.
Upvotes: 0
Reputation: 213892
There is no such random delay since a CAN bus designed correctly is supposed to be collision free (CSMA/CA). There's just an end of frame delay for a fixed number of bit lengths and then every node on the bus is free to attempt to send again.
Having multiple nodes on the same bus, sending the same identifier at the same time but with different payloads is a bus design error. The person who designed the bus should never have allowed this situation to happen. It can be fixed by using different identifiers or different time slots.
When two nodes attempt to send at once and there's a content difference in the arbitration field, the node which failed to pull the bus signal to its desired level (recessive state, binary 1) gracefully stops its attempt to send and the node which pulled the bus signal to the dominant state (binary 0) gets to send. There are no errors and the node which failed to send will attempt it again automatically after the end of frame field of the current frame.
But if there is a content difference beyond the arbitration field, where one transmitting node fails to pull the bus as desired, it is regarded as a bit error. This node will then tear down the whole frame by pulling it to the dominant state for 6 bit lengths - an active error frame. Data is lost since this is essentially a collision.
Upon error, nodes will attempt to send again, but now their error counters are ticking and they will eventually go into passive error mode - meaning they only create error frames by pulling the bus to the recessive state for 6 bit lengths, which will not tear down any traffic. But if errors keep happening, the node eventually go "bus off" and stop sending anything at all.
Upvotes: 1