Datasheet
www.tektronix.com/oscilloscopes 21
Debugging Serial Buses in Embedded System Designs
Overload frames are initiated by receiving devices to indicate
they are not ready to receive data yet. Data frames are used
to transmit data while Remote frames request data. Data and
Remote frames are controlled by start and stop bits at the
beginning and end of each frame and include the following
fields: Arbitration field, Control field, Data field, CRC field and
an ACK field as shown Figure 29.
SOF - The frame begins with a start of frame (SOF) bit
Arbitration - The Arbitration field includes an Identifier
(address) and the Remote Transmission Request (RTR)
bit used to distinguish between a data frame and a data
request frame, also called a remote frame. The identifier
can either be standard format (11 bits - version 2.0A) or
extended format (29 bits - version 2.0B).
Control - The Control Field consists of six bits including the
Identifier Extension (IDE) bit which distinguishes between a
CAN 2.0A (11 bit identifier) standard frame and a CAN 2.0B
(29 bit identifier) extended frame. The Control Field also
includes the Data Length Code (DLC). The DLC is a four bit
indication of the number of bytes in the data field of a Data
frame or the number of bytes being requested by a Remote
frame.
Data – The data field consists of zero to eight bytes of data.
CRC - A fifteen bit cyclic redundancy check code and a
recessive delimiter bit.
ACK - The Acknowledge field is two bits long. The first is
the slot bit, transmitted as recessive, but then overwritten
by dominant bits transmitted from any node that success-
fully receives the transmitted message. The second bit is a
recessive delimiter bit.
EOF - Seven recessive bits indicate the end of frame (EOF).
CAN
Background
The Controller Area Network (CAN) was originally developed
in the 1980s by the Robert Bosch GmbH as a low cost
communications bus between devices in electrically noisy
environments. Mercedes-Benz became the first automobile
manufacturer in 1992 to employ CAN in their automotive
systems. Today, almost every automotive manufacturer uses
CAN controllers and networks to control a variety of devices
in the automobile. A newer and even lower cost bus called
LIN (discussed next) was developed to address applications
where the cost, versatility, and speed of CAN were overkill. LIN
has displaced CAN in a number of applications, but CAN is
still the primary bus used for engine timing controls, anti-lock
braking systems and power train controls to name a few. And
due to its electrical noise tolerance, minimal wiring, excellent
error detection capabilities and high speed data transfer, CAN
is rapidly expanding into other applications such as industrial
control, marine, medical, aerospace, and more.
How It Works
The CAN bus is a balanced (differential) 2-wire interface
running over a Shielded Twisted Pair (STP), Un-shielded
Twisted Pair (UTP), or ribbon cable. Each node uses a male
9-pin D connector. Non Return to Zero (NRZ) bit encoding
is used with bit stuffing to ensure compact messages with
a minimum number of transitions and high noise immunity.
The CAN bus interface uses an asynchronous transmission
scheme where any node may begin transmitting anytime
the bus is free. Messages are broadcast to all nodes on the
network.
In cases where multiple nodes initiate messages at the same
time, bitwise arbitration is used to determine which message
is higher priority. Messages can be one of four types: Data
Frame, Remote Transmission Request (RTR) Frame, Error
Frame, or Overload Frame. Any node on the bus that detects
an error transmits an error frame which causes all nodes on
the bus to view the current message as incomplete and the
transmitting node to resend the message.
Figure 29. CAN Data/Remote Frame.
Arbitration Field
11 bits (Std ID)
29 bits (Ext 1D)
Control
Field
6 bits
Data
Field
0-8 bytes
CRC
Field
16 bits
ACK
2 bits
EOF
7 bits
INT
3 bits
SOF
1 bit