There are five types of CAN error can introduce on CAN-BUS by receiver and transmitter node-
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.
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.
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.
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.
As per CAN Frame Format, there are some fields of fixed length and format like CRC Delimeter, ACK Delimeter,
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-
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)
A CAN Node enters into Passive Error State when TEC<=127 or REC<=127. This state still has a chance to come back in
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.