Hardware Reference
In-Depth Information
13.2 Overview of Controller Area Network
The controller area network (CAN) was initially created by the German automotive
system supplier Robert Bosch in the mid-1980s for automotive applications as a method for
enabling robust serial communication. The goal was to make automobiles more reliable, safe,
and fuel-efficient while at the same time decreasing wiring harness weight and complexity.
Since its inception, the CAN protocol has gained widespread use in industrial automation
and automotive/truck applications. The description of CAN in this chapter is based on the
CAN Specification 2.0 published in September 1991 by Bosch.
13.2.1 Layered Approach in CAN
The CAN protocol specified the lowest two layers of the ISO seven-layer model: data link
and physical layers. The data link layer is further divided into two sublayers: logical link con-
trol (LLC) layer and medium access control (MAC) layer.
The LLC sublayer deals with message acceptance filtering, overload notification,
and error recovery management.
The MAC sublayer presents incoming messages to the LLC sublayer and accepts
messages to be transmitted that are forwarded by the LLC sublayer. The MAC
sublayer is responsible for message framing, arbitration, acknowledgement, error
detection, and signaling. The MAC sublayer is supervised by a self-checking
mechanism, called fault confinement, which distinguishes short disturbances from
permanent failures.
The physical layer defines how signals are actually transmitted and deals with the descrip-
tion of bit timing, bit encoding, and synchronization. CAN bus driver/receiver characteristics
and the wiring and connectors are not specified in the CAN protocol. These two aspects are not
specified so that implementers can choose the most appropriate transmission medium and hence
optimize signal-level implementations for their applications. The system designer can choose
from multiple available media technologies including twisted pair, single wire, optical fiber, radio
frequency (RF), infrared (IR), and so on. The layered CAN protocol is shown in Figure 13.1.
13.2.2 General Characteristics of CAN
The CAN protocol was optimized for systems that need to transmit and receive relatively
small amounts of information (as compared to Ethernet or USB, which are designed to move
much larger blocks of data). The CAN protocol has the following features:
C ARRIER S ENSE M ULTIPLE A CCESS WITH C OLLISION D ETECTION
(CSMA/CD)
The CAN protocol is a CSMA/CD protocol. Every node on the network must monitor the
bus (carrier sense) for a period of no activity before trying to send a message on the bus. Once
this period of no activity occurs, every node on the bus has an equal opportunity to transmit
a message (multiple access). If two nodes happen to transmit at the same time, the nodes will
detect the collision and take the appropriate action. In the CAN protocol, a nondestructive
bitwise arbitration method is utilized. Messages remain intact after arbitration is completed
even if collisions are detected. Message arbitration will not delay higher priority messages.
To facilitate bus arbitration, the CAN protocol defines two bus states: dominant and recessive .
The dominant state is represented by logic 0 (low voltage), whereas the recessive state is repre-
sented by logic 1 (high voltage). The dominant state will win over the recessive state.
 
Search WWH ::




Custom Search