CAN Overview

Controller Area Network (CAN) is a very reliable, multi-drop asynchronous serial network technology that was originally designed for automotive communications, but has also become a popular bus for industrial automation, as well as other applications.

The typical medium is a twisted pair of wires and the maximum network length depends on the network speed chosen (longer distances are achievable at lower speeds) for example:

  • 40m @ 1Mbps
  • 500m @ 125kbps


There are a variety of CAN node configuration possibilities, however, all nodes contain a CAN Transceiver, a CAN Controller and an Application Controller (MCU) as shown:

twisted-pair-2.png


Microchip offers a variety of CAN Transceivers, CAN Controllers, and MCUs with Built-In CAN Controllers to enable these common CAN node configurations.

CAN Applications

CAN's main advantages as a serial bus lie in the reduction of expensive wiring, as well as increased performance by enabling a distributed processing system. CAN has been used in the following applications:

  • Passenger Cars
  • Building Automation
  • Trucks and Buses
  • Industrial Machine Control
  • Lifts and Escalators
  • Trains
  • Maritime Electronic Systems
  • Aircraft & Aerospace Electronics
can-applications.png

CAN Variants

Originally, there was what is now referred to as the "Classical" CAN data link layer protocol, originally developed by Bosch as CAN 2.0A/B. This was standardized in the ISO11898 series standards beginning in 1993.

In order to address bandwidth limitations as well as end-of-line manufacturing delays in programming ECUs in cars, Bosch in 2012 updated the protocol to what is now known as CAN FD (Flexible Data Rate).

Both data link layer protocols are now internationally standardized in ISO11898-1:2015

CAN FD data frames are transmitted with 2 different bit-rates. The arbitration phase is transmitted at up to 1Mbps (compatible with Classical CAN), however in the data phase, since only 1 node is transmitting, the bit rate is limited only by the transceiver characteristics, and approaches 8Mbps. Additionally, CAN FD extends the maximum number of data bytes in the payload from 8 to 64 bytes as shown:

classic-fd-2.png

CAN FD controllers are able to operate in Classic CAN systems, while Classic CAN controllers will generate errors in a CAN FD system.

Kvaser have published a useful guide outlining the impact to various stakeholders of switching to a CAN FD design.

Network Basics

CAN is a multi-master network, so each node may send its data at any time. Collisions get resolved by priority, through an automatic arbitration process occurring at the physical layer. Messages contain a 11/29-bit Message Identifier. The message with the lowest message ID value wins the arbitration process and gets through.

Custom application layer software or other Higher-Layer Protocols (such as J1939, CANopen etc) must ensure the uniqueness of the CAN message IDs by assigning/reserving certain IDs for certain functions/purposes.


Messages are broadcast to all nodes, however, multi-casting capability is built into the system by hardware Message ID Filters which are available in the CAN controller at each node.

A Cyclic Redundancy Checksum (CRC) is included in each packet, and is checked by CAN hardware on each node of the bus. If a single node reports a CRC error, all other nodes discard the message and it automatically gets re-transmitted.

Signalling Basics

CAN signaling differs from other communications protocols, in that a logic "0" level is referred to as the dominant bit and is encoded as a differential signal on the bus of ~2 volts, while a logic "1" level is referred to as the recessive bit and is encoded as a differential signal of ~0 volts, as shown:

an228-fig4.png

Higher Layer Protocols (HLPs)

Many network protocols are described using the seven layer Open System Interconnection (OSI) Model, as depicted here:

osi-model.png


The CAN protocol (ISO11898) defines the Data Link Layer and part of the Physical Layer in the OSI model. The remaining physical layer (and all of the higher layers) are not defined by the CAN specification. These other layers can either be defined by the system designer (a "Home Grown" stack), or they can be implemented using existing non-proprietary Higher Layer Protocols (HLPs) such as CANopen or DeviceNet.

What Can HLPs Provide?

A HLP can provide additional functionality on top of the basic CAN protocol:

hlps.png

  • Provides flow control and the ability to transfer data units larger than 8 bytes
  • Coordinates installations of additional nodes
  • Network Management (Start up behavior, Sleep behavior, Status reporting within the CAN network system)
  • Can Guarantee that the information reached the correct node
  • Can define how to distribute message identifiers among the different nodes in a system
  • Can define how to translate the contents of the data frames
  • Development Environment and Tool support
© 2017 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.