• admin@embedclogic.com

CAN Error Detection And Fault Confinement

Error Detection

There are five types of CAN error can introduce on CAN-BUS by receiver and transmitter node-

  1. Bit error
  2. Stuff error
  3. CRC error
  4. Acknowledgment error
  5. Form Error

Bit Error(Introduce By Transmitter)

As I discussed in Bit Monitoring chapter, Every transmitter node reads back its transmitted bit from CAN line along with other ECUs But if it will not get read bit same as it transmitted then transmitted node stop the further transmission and introduce an error frame on CAN line. This error is known as bit error.

Bit Error Situation


  1. If bit mismatch detected during Arbitration field or ACK then transmitter neither looks it as bit error nor introduce any error frame because as per the CAN standard these fields has defined functionality.
  2. CRC Delimeter, ACK and EOF are also fixed length fields in CAN frame so it will also not be the part of bit error frame execution if more than five consecutive bits found.

Stuff Error(Introduce By Receiver)

As I discussed in Bit Stuffing chapter, More than 5 consecutive bits of the same polarity in CAN frame between the start of Frame(SOF) to CRC field is considered as a faulty frame on CAN Bus and it signaled as stuff error on CAN line.

Stuff error Frame Introduction after 5 consecutive recessive bits

CRC Error(Introduce By Receiver)

The transmitter transmits CRC of transmitted data at CRC field of CAN frame and receivers also calculate CRC on received data. If the receiver found Calculated CRC is different from received CRC at CRC field then receiver signaled it as CRC error and introduce an error frame on CAN line.

ACK Error(Introduce By Transmitter)

After Transmission of CRC field of CAN frame Transmitter send ACK (a recessive bit) and receiver makes it dominant as a part of acknowledgment to the transmitter. During readback, transmitter found the dominant bit and consider it as receiver acknowledgment and if it reads a recessive bit then transmitter signaled it as ACK error and introduce an error frame.

Receiver Acked to transmitter By recessive to Dominant transition of ACK bit

Form Error(Introduce By Receiver)

As per CAN Frame Format, there are some fields of fixed length and format like CRC Delimeter, ACK Delimeter, EOF ,InterFrame Spaceand if it is detected corrupted at receiver side then it signaled as Form Error and Node will introduce an error frame on CAN line.

Error Confinement Mechanism

In CAN network Every node is very honest. if any node transmits/receive continuous faulty frame then it will disconnect itself from CAN network after a threshold limit if fault not recovered. To decide this threshold every Node has two error counters: Transmit error Counter(TEC) and Receive Error Counter(REC) to keep the track of error generated because of above-discussed situations. On the basis of these counter, Nodes are categories in three error state-

  1. Active Error state(When TEC<=127 and REC<=127)
  2. Passive Error state( When TEC>127 or REC>127 )
  3. Bus-Off State(When TEC>255)
CAN Error States

Active Error State

A CAN Node enters into Active Error State when TEC<=127 and REC<=127 In This State Node can participate in all CAN activity like –

A node can Transmit all type of Frames like Data Frame, Remote Frame, Overload Frame, and active Error Frame(6-12 Dominant bit)

Passive Error State

A CAN Node enters into Passive Error State when TEC<=127 or REC<=127. This state still has a chance to come back in error-free state.In This State a Node still can participate in all CAN activity like –

  1. A node can Transmit all type of Frames like Data Frame, Remote Frame, Overload Frame, but Passive Error Frame(6-12 Recessive bit)
  2. A node can come back to in error active state if it starts transmission of the correct frames and its counter value comes under 127.

Bus-Off State

A CAN Node enters into Bus-Off State When TEC>255 . In this state CAN node will be removed from CAN network and now it will no longer available on CAN network to participate in any CAN activity.