1
votes

I understand the concept of TEC and REC counters in CAN. Will the error active node send active error frames upon detection of error?

Once the TEC count is above 127 then the error active node will become error passive. Does this mean it will start transmitting passive error frames?

Also, when other nodes detect that a node is transmitting active error frames, do they automatically transmit passive error frames? Can these nodes be referred to as error passive nodes?

This is my confusion which needs clarity.

1

1 Answers

2
votes

Yes, it will stop sending out so-called active error frames with dominant bit sequences, and switch to recessive. Other nodes will not respond but increase their REC counter. Once the active error frame is sent, bus arbitration re-starts as usual, with the highest priority frame winning.

Quoting an article from CAN-CiA:

Fault confinement

The CAN data link layers detect all communication errors with a very high probability. A node detecting an error condition sends an Error Flag and discards the currently transmitted frame. All nodes receiving an Error Flag discard the message, too. In case of local failures, all other nodes recognize the Error Frame sent by the node(s) that detected it and sent by themselves a second time, which results in an eventually overlapping Error Frame. The active Error Frame is made of six dominant bits and an 8-bit recessive delimiter followed by the IMF. This local error globalization method guarantees network-wide data consistency, an important feature in distributed control systems.

If all errors are detected with a very high probability, permanent errors may lead to an unacceptable delay in transmitting messages. In the worst-case, all communication is aborted by means of Error Frames. In order to avoid this, the CAN protocol introduces two error counters: one for received messages (REC) and one for transmitted messages (TEC). They are increased and decreased according to the rules as specified in ISO 11898-1, the standard of the CAN data link layer protocols.

If one of the counters reaches 127, the node transits to error passive state. In this state, the node transmits passive Error Flags made of six recessive bits. This flag is overwritten by dominant bits of a transmitting node. This means that an error passive node can’t inform the other nodes about an incorrectly received frame. This is a critical situation from the viewpoint of the system. If a transmitting node permanently produces Error Flags, this would also delay and in the worst-case (high-prior message) block the other communication. Therefore, the node is forced into bus-off state, if the TEC reaches 256. In bus-off state, the node transmits only recessive bit-level. To transit to the error active state requires two conditions: a reset and the occurrence of 128 by 11 bit-times. This means that the remaining nodes are able to transmit 128 data frames before the node in bus-off recovers and integrates itself again as an error active node into the network.