• admin@embedclogic.com

CAN Introduction

CAN  stands for Controller Area network. It is an Asynchronous serial communication protocol introduced in 1986 by Robert Bosch.CAN protocol is a message based protocol not address based means transmitted data is available for all nodes and its receiver’s choice to receive data or not.

CAN nodes are connected on two wire(CAN_H and CAN_L) twisted pair cable(termed as CAN bus) terminated with 120Ω resistance to prevent the reflection.


CAN nodes connected on the CAN bu
s in line BUS Topology

CAN is basically designed to replace the conventional wiring used in old days in the automobile for communication between ECUs.

In modern Automobile system, there are many ECUs for various subsystems like engine control unit, steering, suspension, ADAS etc. interconnection between each other is essential which would be very costly and complex through conventional wiring while CAN provide an economic and appropriate solution.

CAN Applications

Originally CAN was developed by Bosch for in-Vehicle communication in passenger Cars but now a days due to its enrich features it is used in many industry.Some of the applicaton areas as follows-

    1. In transportation system (rail vehicle, aircraft, marine, etc.)
    2. In home and building automation (e.g. HVAC, elevators)
    3. In industrial machine control systems.
    4. In mobile machines (construction and agriculture equipment)
    5. In medical devices and laboratory automation

Apart from these, day by day CAN protocol is used any many embedded applications.

Need of CAN:

In course of time, many more features and functionalities are added in the automobiles, as a result of this number of ECUs increased. These ECUs are connected with each other to share the information between them. this conventional wiring is very complex and very tough to handle.

To overcome this complexity of conventional wiring and increase the data transfer rate Bosch started to develop a serial protocol in 1983 and introduced by SAE in 1986 known as Controller Area Network.

Convention VS CAN Network Arrangement

Features of CAN Protocol

CAN protocol is very enrich in features which motivates one should use for data communication-

Flexibility in Configuration -All nodes are connected on a differential cable terminated with a register. Any node can be connected or disconnected without disturbing other nodes on the network.

CAN is Message-Based Protocol– Any node can broadcast message on CAN Bus and all other nodes can listen to this broadcasted message including transmitter but its receiver’s choice to receive the message or not i.e it’s not address based protocol which is used for peer to peer transmission.

CAN offer Multi-master Communication – As we discussed above any node can transmit/receive any time means anyone can drive the CAN -bus and start communication and this feature makes CAN more adaptive in the automotive industry because there is much safety critical ECUs like power-train etc and the messages from these ECUs need immediate action.

CAN Offers Message Prioritization- In a vehicle, many ECUs are very safety critical so there message would be processed at a higher priority and CAN protocol do it by assigning lower identifier value.So manufacture can decide the message priority by assigning them Identifier value(Lower the Identifier highr the Priority)

CAN have inbuilt CSMA/CA and CSMA/CD feature – Carrier sense multiple access collision avoidanc is used to check bus status and if it is free then the node will transmit data or it would wait for idle status. CSMA/CD is collision detection means it would direct for the stop transmission if data is corrupted on CAN bus(means data is mixed up with other Node data i.e collision).This way transmitter save its time and retransmit it’s data when bus is idle.

Error Detection and Fault Confinement feature – Every CAN node has self-error diagnostic and recovery state. Every node has TEC(Transmit error Counter) and REC(Receive Error Counter) to categories its error state(error Active, Passive, Bus off). If CAN node reaches in Bus-OFF state then it will disconnect itself from CAN Network without disturbing other nodes. This feature makes CAN protocol very reliable. for more about Error detection and Correction go through this article.

CAN Offer good speed with noise reduction feature – CAN protocol offers Maximum speed up to 1 Mbps for 40 m CAN-Bus length.CAN bus uses a differential cable which reduces cross-talk(noise) and Electromagnetic Interference. For more detail about the physical layer,visit this article.

Apart from these CAN protocol have other powerful features. It offers the in-built features in CAN controller like synchronization of nodes,Frame Integrity check through CRC mechanism,Acceptance filtering etc. because of all these features offered at h/w level lots of software coding overhead reduced.

CAN architecture and standard at OSI Layer

CAN Network architecture is like below image :

As shown in above figure CAN network is basically made of Node and CAN Bus terminated with 120ohm. Every Node have basically three components to accomplish Data transmission over CAN :

1. Host Controller: MCU which is host controller and decides how to deal with received or transmit data. It process data from the Application layer to the network layer and vice versa.

2.CAN Controller: take care of the message reception and transmission, error detection and handling etc.

3.CAN Transceiver: convert the CAN controller data into bus level before sending on CAN Bus and vice-versa.

ISO mapped the CAN protocol specification with the OSI model according to above architecture. CAN protocol basically works on three OSI layers: Physical layer, Data Link Layer and Transport Layer.

OSI Layer AND Applicable ISO Standard

As shown in the above diagram, the OSI Model has 7 layers. CAN protocol ISO Specification is applicable for Physical layer and Data link layer. In 1993, ISO release specification for CAN protocol handling at Data link layer and physical layer –

Physical layer(CAN-Transceiver)

1. High Speed CAN codify in ISO-11898(2)

2. Low Speed CAN codify in ISO-11898(3)

Data Link Layer

ISO-11898(1) for message Transmission/reception, Error handling, CRC check etc.

In 1986 Bosch release CAN protocol Specification for two types of CAN frame architecture-

PART A(CAN2.0A) -Spec for the 11-bit identifier CAN(classical/Standard CAN)

PART B(CAN2.0B) -Spec for the 29-bit identifier CAN(Extended CAN).

Please follow next articles for more detail about classical and extended CAN.