1

The quote below is from a document by Texas Instruments.

The error frame is a special message that violates the formatting rules of a CAN message. It is transmitted when a node detects an error in a message, and causes all other nodes in the network to send an error frame as well. The original transmitter then automatically retransmits the message. An elaborate system of error counters in the CAN controller ensures that a node cannot tie up a bus by repeatedly transmitting error frames.

Also, this wikipedia page provides more information on error frames.

As mentioned in several answers (link1, link2), CAN bus is half-duplex, that is, the nodes cannot transmit and receive data at the same time.

In general, a modern car contains more than 50 ECUs (nodes) on a CAN network. In case of an error, " if " the nodes would send error frames one after another, the CAN BUS would be occupied for a quite long time.

So, what do I miss here? Do the nodes send their error frames at the same time/ simultaneously and the hardware solves that issue? What happens if a node transmitted a different or corrupted error frame?

Xfce4
  • 557
  • 5
  • 28
  • 1
    The whole magic with bus arbitration and collision avoidance is that multiple nodes can send at the same time, as long as they are sending same message. Error frames contain no identifiers, so if multiple nodes detect the same error at the same time, they will all send the same error frame at the same time. Note however that error frames typically are the result of serious hardware problems, so if they appear, the error frames themselves screwing up bus load is the least of one's problems. – Lundin Feb 18 '22 at 15:28
  • @Lundin Cool, would you consider improving this comment a little bit and posting it as an answer? – Xfce4 Feb 21 '22 at 07:16

2 Answers2

2

The other nodes will not send error-frames one after the other in most cases. If there is an error on the bus, then it is very very likely that all nodes will perceive the error. They will all then send their error-frames at (close to) the same time. As they all expect to see "their" error-frame, it does not matter who gets there first.

In the (unusual case) of an error only being noted by one node (perhaps some transient within the ECU) it will transmit an error-frame. The other ECUs will react to this error-frame (which is "simply" a violation of the stuffing rules) with their own error-frames. But again, they will all see it at the same time and so the case described above applies. They will all transmit their "own" error-frame at about the same time.

As noted by @Lundin in the question comments, error-frames are very unusual, so the impact on the bus-loading is not of major concern.

I do not understand this part of your question:

What happens if a node transmitted a different or corrupted error frame?

A node "cannot" transmit a different error-frame - it would not be an error-frame. An error-frame being corrupted is very unlikely as it is a string of dominant bits, which are driven hard, and usually by several to many ECUs at a time. If it were to happen, I think (but would have to check the spec) the ECUs would notice this as another error and transmit another error-frame.

Martin Thompson
  • 16,395
  • 1
  • 38
  • 56
1

A node that repeatedly sends active error frames first goes into the "Warning" state and then later into the "Bus Off" state. This prevents a broken node from becoming a "bubbling idiot".

See Bosch CAN specification page 63

Joe7575
  • 21
  • 4
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Pankwood Feb 23 '22 at 15:13