0% found this document useful (0 votes)
69 views14 pages

CAN Errors

CAN errors occur when there is a problem communicating data between nodes on a CAN network. There are two types of CAN errors - transmitter (Tx) errors detected by the transmitting node, and receiver (Rx) errors detected by the receiving node. The five types of CAN errors are bit errors, acknowledgement errors, CRC errors, stuff errors, and form errors. When any node detects an error, it transmits an error flag to destroy the erroneous data frame.

Uploaded by

chinu sahu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views14 pages

CAN Errors

CAN errors occur when there is a problem communicating data between nodes on a CAN network. There are two types of CAN errors - transmitter (Tx) errors detected by the transmitting node, and receiver (Rx) errors detected by the receiving node. The five types of CAN errors are bit errors, acknowledgement errors, CRC errors, stuff errors, and form errors. When any node detects an error, it transmits an error flag to destroy the erroneous data frame.

Uploaded by

chinu sahu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

CAN Errors

AGENDA

What is CAN Error


Reaction to CAN error
Types of CAN error
Understanding each type
What are Tx and Rx errors
Various scenarios and exceptions Shyam Bhat
VicharaVandana
What is CAN Error
 Purpose of CAN: Communicate data from one node to other nodes in a
network.

 The data to be communicated is clubbed with frame related fields and


communicated serially bit by bit

 All the Rx nodes must receive the same information which the Tx application is
intended. If some problem happens in this then we call as CAN error.

 The problem may happen in Tx node, or CAN bus or Rx node. CAN protocol has
capability to detect any such problem and raise an error flag.

 So Depending on which node detects an error we have Tx errors and Rx errors


Reaction to CAN Error
 When a node (Tx or Rx) detects a CAN error it starts sending the error flag on
the bus immediately.

 This Error flag is designed in a way that it destroys the data frame currently
present on the bus.

 Depending on this error flag other nodes also may put its own error flags on
CAN bus.

 All Error flags and delimiters together forms the error frame on the bus.

 Depending on the node which raised the error flag, will increment its error
counter value to keep track and manage CAN error states.
CAN Errors
There are 5 types of CAN errors
 Bit Error
 Acknowledgement Error
 CRC Error
 Stuff Error
 Form Error

Bit Error and Ack Error are called Transmitter errors


These decide the TEC counter increments

CRC, Stuff and form errors are called Receiver errors


These decide the REC counter increments
Bit Error
When the transmitter node monitors a different bit value than the value it
transmitted in that bit, then its called as a bit error

Tx bit 0 1 1 0 0 0 1 0
Sequence
Bit Error
Bit Monitoring

CAN Bus 0 1 1 0 1 0 1 0
Bit Error Exceptions
Use cases:
1. Tx puts Dominant (0) bit but finds a Recessive(1) bit on the bus
2. Tx puts Recessive (1) bit but finds a Dominant (0) bit on the bus
Exceptions:
1) During Arbitration, Tx puts a Recessive bit but finds a Dominant Bit then this
means Lost in Arbitration and not Bit Error.
Note: During Arbitration if Tx node puts a Dominant bit but finds a Recessive bit on the bus,
then this is a Bit Error only.

2) During Acknowledgement Slot, Tx node puts a Recessive bit but finds a


Dominant Bit then this means Acknowledgement Received and not Bit Error.

3) After Ack slot, 11 consecutive Recessive bit is transmitted. In that fixed frame
if a dominant bit is monitored then it will be a form error and ot Bit error.
Acknowledgement Error
When the transmitter node monitors a Recessive bit value in Ack Slot, then it
means it did not get a Acknowledgement. This is Acknowledgement Error

CRC Error
When the Reciever Node has not given acknowledgement but still monitors a
dominant bt in ACK slot, then it’s a CRC Error.

Tx Node Rx Node 1 Rx Node 2

CAN BUS
Case 1: No Error
A
C A
C EOF
D D
K

Tx Node 1 1 1 1 1 1 1 1 1 1

Rx Node 1 x 0 x x x x x x x x

Rx Node 2 x 0 x x x x x x x x

CAN Bus 1 0 1 1 1 1 1 1 1 1
Case 2: Acknowledgement Error
A
C A
C EOF
D D
K

Tx Node 1 1 ACK Error

Rx Node 1 x 1 x x x x x x x x

Rx Node 2 x 1 x x x x x x x x

CAN Bus 1 1 Error Frame


Case 3: CRC Error
A
C A
C EOF
D D
K

Tx Node 1 1 1 Frame Destroyed

Rx Node 1 x 0 x x x x x x x x

Rx Node 2 x 1 x CRC Error

CAN Bus 1 0 1 Error Frame


Stuff Error
When a receiver receives at-least 6 consecutive bits of same polarity,
then it means the bit stuffing rule is violated. This is Stuff Error.

In CAN protocol, if frame has consecutive 5 bits of same polarity then a
complimentary bit is inserted after that called Stuff bit. This helps in better
synchronization between Rx and Tx nodes.

Bit Stuffing is applied from SOF to Checksum field. So the scope of stuff error
also is the same.

The moment the Stuff error is detected, the Rx node raises an error flag the
very next bit, hence destroying the current data frame on the CAN Bus.
Form Error
When the Fixed form of the CAN data frame (CD + AD + EOF) is altered then
Form error occurs.
Points to Remember
 When a node Detects a error, it raises the error flag on the bus and destroys that data
frame which is erroneous.

 If the error is detected by a Tx node then they are called Tx Errors. Bit and Ack errors

 If the error is detected by a Rx node they are Rx Errors. CRC, Form and Stuff errors

 For Ack, Bit, Form and Stuff error, The error flag is raised as on the very next bit when the
error was detected, For CRC error, error flag is raised after 1 bit gap(AD) when error is
detected.

 Tx error results in increments of TEC and Rx errors result in REC within a node.

 Error frame format for all CAN error are same. Depending on at which part of data frame
the error is raised, we can know which error is it.

You might also like