www.panelsoft.com

 

 

 

Home

Training

Reading

PanelSoft

User Interfaces and Usability for Embedded Systems


Feedback to "A Short Trip on the CAN Bus"- Murphy's Law, Sept 2003

Read the original artilce at A Short Trip on the CAN Bus

return to Murphy's Law


Mike Caufmann helps to clarify the error handling issues in the CAN protocol

Niall,

It's possible the following statement in your article might lead some readers to a mistaken conclusion about the robustness of the CAN bus:

"Because there are many receivers, it's possible that one node will be affected by a local failure, while other nodes have successfully received the message." While a variety of circumstances could corrupt a message within a module after successful reception by the CAN controller, it is extremely unlikely that one CAN controller would reject a locally corrupted copy of a message while other controllers on the same bus receive the same message correctly.

The CAN protocol is so robust in part because it is based on the principle that all nodes will receive the identical message concurrently, or none will receive it. This is satisfied by requiring any node receiving a corrupted message to transmit an error frame within the message, thereby corrupting the message for all receivers. The transmitter detects the error frame, and retries the message. Only when a node is so overwhelmed by local interference that it has rejected many successive messages will it silently reject a message while other nodes receive it successfully. At this point, the affected CAN controller will have made the module aware of its CAN problems so an appropriate action can be taken.

Mike Coffman
Engineering Specialist
Caterpillar Inc.

Niall's response:

Thanks for your e-mail - it does point out a very important feature of the CAN protocol, which I did not explain in my article. However the advice I give that CAN messages can be repeated still holds - though it is far less likely than implied by the description in my artile, where I simplified it far too much.

In most cases, as you suggest, errors are globalised and so everyone knows if one node treats a packet as an error. However, if a transmitter sees a local disturbance in the last-but-one bit of the End-Of-Frome(EOF) byte, then the transmitter will interpret that as a failed send and retransmit. It is also possible that the disturbance in the last bit of the EOF is caused by a local failure in one of the receiving nodes.

My original article implied that the repeated message would happen for all local failures of receivers, which is not the case.


A comment from Mike LaPointe, who correctly points out that I got my priorities backwards:

In the above-named article, it seems to me the statement that follows is incorrect:
"The winning node will always be the one with the arbitration field of the highest value, because it's the one that will transmit a dominant bit first, while the other nodes are transmitting recessive bits."

Since dominant bits are 0, isn't the correct statement as follows?

"The winning node will always be the one with the arbitration field of the lowest value, because it's the one that will transmit a dominant bit first, while the other nodes are transmitting recessive bits."


Niall Murphy

One other reason for using the CAN bus is for liability protection. When asked why a particular bus was picked it is hard to beat answering, "Because it is safe enough for automobile breaks and drive train".

Of course this is only a concern if the product the bus is used in could potentially harm someone. We make robot floor cleaning machines and have a saying, "A half ton scrub bot running amuck gives new meaning to the term fatal crash". Like your articles, they are of practical help to working engineers.

William Crolley
Senior Engineer
Robo Vac Systems Inc.

 


[PanelSoft Home | Training Courses ]