You are on page 1of 2

CAN

17 January 2019 10:45 AM

Introduction
• serial, multi-master, multicast protocol
○ when the bus is free, any node can send a message (multi-master)
○ all nodes may receive and act on the message (multicast)
• ISO 11898
○ ISO 11898-1 - data link layer
○ ISO 11898-2 - CAN physical layer for high-speed CAN - 512 Kbps
 linear bus terminated at each end with 120 Ω resistors
 CAN high wire towards 5 V and the CAN low wire towards 0 V when transmitting a
dominant (0)
 does not drive either wire when transmitting a recessive (1)
 dominant differential voltage is a nominal 2 V
○ ISO 11898-3 - CAN physical layer for low-speed, fault-tolerant CAN - 128 Kbps
 linear bus, star bus or multiple star buses connected by a linear bus
• allow microcontrollers and devices to communicate with each other in applications without a host
computer
• message-based protocol
• multi-master serial bus
• Two part specification
○ part A - standard format - 11-bit identifier - CAN 2.0A
○ part B - extended format - 29-bit identifier - CAN 2.0B
• CAN FD - Flexible Data Rate - compatible with existing CAN 2.0
• Messages are assigned static priorities, and a transmitting node will remain a transmitter until the
bus becomes idle or until it is superseded by a node with a higher priority message through a
process called arbitration
• does not include tasks of application layer protocols, such as flow control, device addressing, and
transportation of data blocks larger than one message, and above all, application data
• Security
○ low-level protocol and does not support any security features intrinsically - open to man-in-
the-middle packet interception
○ applications are expected to deploy their own security mechanisms
Frames
• 4 types of frames
○ Data frame: a frame containing node data for transmission
○ Remote frame: a frame requesting the transmission of a specific identifier
○ Error frame: a frame transmitted by any node detecting an error
○ Overload frame: a frame to inject a delay between data or remote frame
• Data frame - only frame for actual data transmission
○ composed of seven fields - Start of frame (SOF), arbitration, control, data, cyclical
redundancy check (CRC), acknowledge (ACK) and end of frame (EOF)
○ The most significant bit (MSB) of a data byte is sent first
Arbitration
• arbitration scheme determines which of the nodes attempting to transmit will actually control the
bus
• arbitration field of the CAN message consists of an 11- or 29-bit identifier and a remote
transmission (RTR) bit
• carrier sense multiple access with collision detection - CSMA/CD
• assures that the highest priority message is broadcast

Protocols Page 1
• assures that the highest priority message is broadcast
• Message priority is determined by the numerical value of the identifier in the arbitration field,
with the lowest numerical value having the highest priority
• Non-destructive, bit-wise arbitration resolves conflicts among competing transmitters
• Every transmitting node always reads back the bus value for each bit transmitted. If a node
transmits a recessive bit and reads back a dominant bit, it immediately stops transmitting
Error Handling
• five levels of error detection
○ message level - cyclic redundancy checks, frame checks and acknowledgment checks
○ Bit level - monitoring and stuffing
Bus Loading
• message latency is non-determinant (due to the existence of Error Frames, Overload Frames and
retransmissions)
• latency increases with the amount of traffic on the bus
• bus utilization should not exceed 30% of the bus capacity to assure that low priority messages do
not experience unacceptable delay

Protocols Page 2

You might also like