CAN Bus Signaling and Bit Representation

John P

Joined Oct 14, 2008
2,063
I suppose you could say that if two nodes send exactly the same message at exactly the same time, and neither interferes with the other, the message will be picked up by recipients and treated as valid, because it simply is valid. Presumably, the system requires that particular message to be acceptable from any of those nodes, so there's no problem. I bet it never really happens though.
 

panic mode

Joined Oct 10, 2011
5,003
message contains CRC check....

if two nodes send exactly the same message, exactly at the same time, there is no interference since sent messages are identical. if there is a node on the bus with correct address it will reply.

if the two messages overlap but are not exactly the same, the dominant (low) it will win. in the end resulting message on the bus is either identical to message sent by one of two nodes or it will be corrupted. if the message is not corrupted, addressed slave will respond. if the message is corrupted because some of bits have been reset, checksum will no longer match and although slaves will see the message, they will not respond because checksum does not match. since default state is high i padded the message with extra set bits:

the low bit dominant can be viewed as bitwise AND operation.

111001011001101000111001111 master1 message
111001010001110000110111111 master2 message
-------------------------------------------------
111001010001100000110001111 resulting message (if both were sent at the exact same time)

or if they are not sent at the same time (master2 starts sending after master1 already sent two bits).
:
111001011001101000111001111 master1 message
111110010100011100001101111 master2 message
-------------------------------------------------
111000010000001000001001111 resulting message (if both were not sent at the exact same time)

it is easy to see that result would be message with more zeroes regardless if two masters are sending at the same time or not.

now, if the two nodes are talking at same time, is it possible that corrupted bit sequence happen to be the just so right that checksum is valid? perhaps but even if that is possible, that would be very rare. so even the very next message would no longer match. moreover nothing stops master to monitor message on the bus with own message. this would easily tell it if there was any interference. in that case node could resort to some other mechanism to resolve the problem, such as wait (random delay) plus until bus is quiet.
 
Top