CAN Bus
CAN Bus
#VTTZTUFNT
The CAN bus is used in various domains in • for gasoline engines or EDC for diesel
the motor vehicle. These domains differ in engines)
the requirements they demand of the net- • Electronic transmission control
work. Due to the fast processes involved in • Vehicle stabilization systems (e.g. ESP)
• Seat adjustment
CAN-C • Power-window unit
• Sliding-sunroof control
• Mirror adjuster
• Lighting system
Gate-
way • Control of the navigation system
high-speed bus
ECU 5 to ECU 11 ECU 9 ECU 10 ECU 11
On the CAN-B
low-speed bus
a V
0
a V
2.0 Differential
SVC0018E
signal
0
Bus systems | CAN bus 73
a V
CAN_L
5
3.6
Node 1 Node n
1.4 (max. 30)
CAN_H
0
recessive dominant recessive
Time t CAN_H
b V
CAN_H 120V CAN bus line 120V Fig. 4
3.5
a Voltage level of
2.5 CAN_L
CAN_L the low-speed CAN
1.5
SVC0019E
SVC0020E
(CAN-B)
b Voltage level of the
recessive dominant recessive
high-speed CAN
Time t
(CAN-C)
74 Bus systems | CAN bus
Physical layer
CAN 2.0 B). With 11 bits in the standard
format, it is possible to distinguish be-
tween 2,048 different CAN messages;
Bus systems | CAN bus 75
in the extended format, this number rises ority (lowest binary value of the identifier)
to over 536 million. is assigned first access, without any data
The advantage of this addressing loss or delay (non-destructive protocol).
method is that the network nodes do not The arbitration principle permits the
require any information about system dominant bits transmitted by a given sta-
configuration and are thus free to operate tion to overwrite the recessive bits of the
fully independently of each other. This re- other stations (Fig. 8). Each station outputs
sults in a highly flexible complete system, the identifier of its message onto the bus
which makes it easier to manage equip- bit by bit, with the most significant bit first.
ment variants. If one of the ECUs requires During this arbitration phase, each station
new information which is already on the wishing to send data compares the level
bus, all it needs to do is call it up from the present on the bus with the level it actually
bus. It is possible to integrate additional possesses. Each station that attempts to
stations into the system (provided they are send a recessive bit but encounters a dom-
receivers) without having to modify the inant bit loses the arbitration process.
existing stations. The station with the lowest identifier, i.e.
the highest priority, makes its way onto
Controlling bus access the bus without having to repeat the mes-
Arbitration phase sage (non-destructive access control).
If the bus is unoccupied (recessive state) The transmitters of lower-priority mes-
and messages are available for sending, sages automatically become recipients of
each station is free to initiate the sending the message just sent by another station.
of its message. The message begins with a They repeat their attempt to send as soon
dominant bit (start-of-frame bit), followed as the bus is free again.
by the identifier. When several stations Without this access control, bus colli-
start to transmit simultaneously, the sys- sions would result in faults. To guarantee
tem responds by employing “wired-and” unequivocal bus arbitration, therefore,
arbitration (arbiter = logical AND operator) it is not permissible for more than one
to resolve the resulting conflicts over bus node to send a message with the same
access. The message with the highest pri- identifier.
Station 1 Station 3
loses the loses the station 2)
arbitration arbitration
Bus
0 Dominant level
1 Recessive level
76 Bus systems | CAN bus
Message format
The message transfer on the CAN bus is 9 CAN message format
Error handling
If a CAN controller detects a fault or for-
mat error, it interrupts the current trans-
mission by sending an error frame com-
prising six successive dominant bits. This
breaks the stuffing rule that prohibits this
type of bit sequence. If the sender detects
that its message has been interrupted by
an error frame, it stops transmitting and
makes another attempt at a later time.
This effect prevents other stations from
accepting the erroneous message and
thereby ensures consistency of data
across the entire system.
80 Bus systems | CAN bus
Microcontroller Microcontroller
Output Input
buffer buffer
CAN
controller
Control
unit
System bus interface
Transmission Test for: Control
control unit acceptance, unit
faults
Transmit Receive
buffer buffer
Basic CAN
controller Transmission Test for:
Transmit Receive control unit acceptance,
buffer buffer faults
buffer to which the local computer (appli- Modules without local computer
cation software microcontroller) has ac- A further category of CAN module is one
cess (Fig. 10). Since the buffer capacity that is supplied without a local computer.
is limited, the computer must read the These SLIOs (Serial Linked Input/Output)
received data before new messages are are able to input and output data via ports.
received. Message filtering also takes They are therefore suitable for making
place in this computer. A part of the sensors and actuators bus-compatible at
computer's capacity is therefore used for low cost, but they do need a master that
CAN management. Since the computers controls them.
do not usually have sufficient processing
capacity, modules with basic CAN are pri- Transceiver
marily suitable for low bit rates, or for the The bit stream generated by the CAN con-
transmission of fewer messages but at troller is made up of binary signals. They
higher bit rates. do not yet correspond to the required volt-
The advantage of these modules, in com- age levels of the CAN bus. The CAN-bus in-
parison to modules with full CAN, is the terface module, or transceiver, generates
smaller chip surface and the lower manu- the differential signals CAN_H and CAN_L
facturing costs. and the reference voltage Uref from the
binary data stream.
Full CAN
Full CAN implementation is the protocol of Sleep mode
preference in cases where a station has to The CAN comfort bus must remain ready
manage several messages at high bit rates for operation even with the ignition
and the local computer has no free capac- switched off so that functions such as the
ity for communication tasks. They contain radio, power windows or parking lamp
several “communication objects”, each of may continue to operate. The bus sub-
which contains the identifier and the data scribers must therefore be supplied by
of a particular message. During the initial- terminal 30 (permanent positive). After
ization of the CAN module by the local terminal 15 has been switched off (ignition
computer, it is decided which messages off), a CAN node may enter sleep mode
the CAN controller should send and which (standby) to relieve the vehicle electrical
received messages it should process fur- system of as much load as possible. The
ther. Received messages are only accepted transmitter part of the transceiver module
(message filtering) if the identifier matches is switched off in this condition to mini-
one of the communication objects. mize the power consumption in this mode
CAN controllers with full-CAN imple- of operation. However, the receiver part
mentation relieve the burden on the local remains active and checks whether mes-
computer by performing all of the commu- sages are being sent on the bus. In this
nication including message filtering in the way, the CAN controller, which also enters
controller (Fig. 11). standby mode, is able to react to a wake-up
The CAN controller can be coupled to message and fully activate the CAN node.
the microcontroller in the electronic con-
trol unit as a stand-alone module by the
address/data bus. Powerful microcon-
trollers have the CAN controller integrated
on-chip. This type of bus coupling is the
more cost-effective and thus the more
common solution.
82 Bus systems | CAN bus
a b
Engine control unit ABS control unit Instrument cluster
Microcontroller Microcontroller Microcontroller
n n
Rev
counter
output
CAN
area n n
RX TX RX TX RX TX
Transceiver
SVC0024D
SVC0024E
CAN bus
Bus systems | CAN bus 83
station responds with an acknowledge CAN is also widely used in industrial auto-
(ACK check). mation. These applications are supported
At the second stage, or acceptance layer, by an alliance of companies in the “CAN in
the message undergoes message filtering. Automation” users group (CiA).
Each station checks whether the received Bosch has concluded contracts with its
identifier is addressed to the particular licensees that guarantee that any CAN im-
station and whether the message is re- plementations will be able to communicate
quired in the application software. If not, with each other. Users will be able to rely
the message is rejected. Otherwise, it on the interaction of any CAN modules.
makes its way to the receive buffer. A flag
notifies the application software that a Characteristics
new message is ready for processing. • Standardized in accordance with
The instrument cluster, for example, ISO 11898
calls up the available message, processes • Prioritized communication
lates triggering signals for the actuator of • Data capacity: up to 8 bytes per message
the rev counter. • Real-time response: the data protocol is
sufficient for the real-time requirements
Standardization in the motor vehicle
The International Organization for Stan- • Non-destructive bus-access method
dardization (ISO) and SAE (Society of Au- • Low power consumption
tomotive Engineers) have issued CAN stan- • Flexibility of configuration
dards for data exchange in automotive ap- • Simple and economical design with