top of page

Error Detection Mechanism in CAN Communication

Updated: Mar 21



ree

CAN Error Handling & Message Retransmission šŸš—šŸ“”


In a CAN network, error detection and handling are crucial to ensure data integrity. If a node does not receive an ACK, the message is retransmitted. Let’s dive into how errors are detected and managed.


āø»


1ļøāƒ£ Error Detection Mechanisms in CAN


CAN uses multiple error detection techniques:

1. Bit Error:

• Each node monitors the bus while transmitting.

• If it sends a dominant bit (0) but detects a recessive bit (1), an error is detected.

2. Stuff Error:

• To maintain synchronization, after 5 consecutive bits of the same value, an opposite bit is inserted (bit stuffing).

• If a node detects more than 5 consecutive bits of the same value, an error is

triggered.

3. CRC Error (Cyclic Redundancy Check):

• The sender adds a CRC checksum to the message.

• The receiver recalculates the CRC; if it doesn’t match, a CRC error occurs.

4. Frame Error:

• Certain fields in the CAN frame must always be recessive (1) (e.g., ACK delimiter).

• If a dominant bit is detected in these fields, a frame error occurs.

5. ACK Error:

• If no receiver sends an ACK bit (dominant state), the transmitter detects an ACK

error.


āø»


2ļøāƒ£ Error Handling in CAN


When an error is detected, the node follows these steps:


āœ”ļø Error Frame Transmission

• The node sends an error frame (6 dominant bits) to notify all other nodes.

• This forces all nodes to discard the erroneous message.


āœ”ļø Automatic Message Retransmission

• The sender automatically retries sending the message after detecting an error.

• The retransmission happens immediately after the bus is free (unless the node enters

a critical error state).


āœ”ļø Error Counters & Bus-Off State

• Each node maintains Transmit Error Counter (TEC) & Receive Error Counter (REC).

• If TEC > 127, the node goes into Error Passive Mode (still communicates but doesn’t

actively disturb the bus).

• If TEC > 255, the node enters Bus-Off Mode, meaning it stops transmitting

completely.

• To recover from Bus-Off mode, the node needs to wait and then reinitialize

communication.


āø»


3ļøāƒ£ What Happens If a CAN Node Keeps Failing?


šŸ”“ If no receiver sends an ACK, or the message is repeatedly corrupted, the sender will continuously retransmit the message until it enters Bus-Off Mode.

šŸ”“ This prevents a faulty node from disrupting the entire network.


āø»


4ļøāƒ£ Summary


āœ… CAN has robust error detection (Bit Error, CRC, Stuffing, ACK errors, etc.).

āœ… If an error occurs, the message is discarded, and the sender retransmits it.

āœ… A node can enter Bus-Off Mode if it continuously fails, preventing it from disturbing the network.


Comments


CONTACTUS

AutoEConnect Limited

AutoEConnect Limited

Tel. +44 - 750 819 6789​

    +44- 73490 29529

 1 Parker Close, Rugby
Warwickshire, United Kingdom

CV21 1NY

​

AutoEConnect India

Tel. +91 - 950 520 1250​

 Vaibhav Complex, Second Floor,

Near Reliance Mart,

 Ramachandrapuram

Andhra Pradesh, India 533255

​

Social Media Links
  • LinkedIn
  • Facebook
  • YouTube

AutoEConnect
Website Traffic Data

TELLUS

AutoEConnect.com: Suggestions & Feedbacks help us stay motivated and to do better. We would love to hear from you.

AutoEConnect Limited: For collaborations or enquiries on our services, please connect with us using the form below.

 

Thanks for contacting us. We will get back to you shortly!

©2025  AutoEConnect.com

bottom of page