Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

1.

The CAN-bus protocol

1.1 Introduction In addition to ID and data bytes,


each frame contains additional bits,
e.g. to control bus traffic and for the
A complete message on the CAN-
automatic checking of transmission
bus is called a data frame that can
errors. However, these are normally
be compared with a sentence of a
invisible to the bus user, as the
human language.
measuring devices for observing the
A data frame consists of several
bus only show the ID and data
socalled fields and each field has a
content. This is more or less
certain number of bits.
comparable to a telephone
conversation, which can be
A bit is the smallest piece of
conducted without constantly
information a computer can work
measuring the voltage on the lines.
with, the same as the capitals of
the alphabet. Different from the 26
different capitals in the alfabet, the
bits only have the value 0 or 1, or
Yes or No.
Eight bits make up one Byte.

The different fields can be compared


with the words in a sentence and
the bits can be compared with the
letters of each word.

Each frame has its own “identifier”,


or ID. This identifier first tells the
receivers of a frame whether they
have to assess the incoming data
and specifies with which priority the
data is to be sent on the CAN-bus.
If two control units want to send
data at precisely the same time, the
lowest identifier is transmitted first.

1
Ep1190

Data frame
Start of frame

1. Start of frame.
The start of frame or start field
2. Status field.
indicates to the receiver(s) that a
3. Check field.
message (information) is on its way.
4. 1 bit not used.
This field always exists of one
5. Data field.
dominant bit.
6. Second check field.
7. Acknowledged (ACK) field.
8. End of frame (EOF).

Ep1197

1. Start of frame.

2
Status field

The status field contains a code


(identifier) to organise the priority.
When several control units have the
intention to send a message, the
most important message has
priority.

Ep1198

2. Status field.

This priority is organised based on


the size of an identifier, the lower
the identifier (the more zeroes) the
higher the priority.

The Traction Control Torque


Request frame from the ABS/TC
Control Module has Identifier $140,
whereas the Engine Temperature
frame from the ECM has identifier
$510. The Transmission General
Status from the TCM has identifier
$320.

This indicates that the Traction


Control Torque Request frame has
a much higher priority than the
Transmission General Status which
in its turn has a higher priority than
the Engine Temperature frame.

3
Check field The Traction Control Torque
Request frame contains, among
The amount of data is registered in other signals, the Traction Control
the check field, which allows a Torque Request signal (16 bits), the
check for the receiver if all the data Actual Vehicle Acceleration signal
has been received. (12 bits) and the Brake Pedal Driver
Applied Pressure signal (8 bits).
These three signals use 36 bits of
the possible 64, so there are 28 bits
left over for other information.

The signals, the amount of bits and


the meaning of the data is fixed and
is written down in all the control
Ep1199
units and in the Data Dictionary.

3. Check field.

Data field

The data field contains the actual


message and determines the size of
the data frame. This frame can
contain 8, 16, 24,32, 40, 48, 56 or
64 bits.

Ep1200

5. Data field.

4
Second check field, confirmation
field and end of frame field

The other three fields have the task


to identify interference (Cyclic
redundancy code-field or Second
check field), to acknowledge that
the message has (not) been
received successfully
(Acknowledged or Confirmation field)
and to indicate the end of the
message (End of frame field).

Ep1201

6. Second check field


7. Confirmation field
8. End of frame field

5
1.2 Dominant and Recessive

In principle, two distinct states must


be defined on a serial data line; 'high'
and 'low'. Each is represented by
specified voltage ranges. With CAN-
bus one of these states must be
dominant (higher-order), the other
recessive (lower-order).

In the first scope picture the voltage


on both CAN-bus lines is measured
to vehicle ground (dual scope input
measurement).

1. Dominant
2. Recessive

In the second scope picture the


voltage difference over both CAN-
bus lines is measered (single scope
input measurement).

HSCAN & MSCAN LSCAN Value


Recessive -500 mV ⎯ +50 mV 0 ⎯ 0.5 V 1
(Nominal) (0 V) (0 V)
Dominant 1.5 ⎯ 3.5 V 3.5 ⎯ 4.55 V 0
(Nominal) (2 V) (4 V)

6
1.3 Prioritising As already mentioned, the status
field contains an identifier to
organise the priority. The bits, which
In the CAN protocol it is nessesary
represent this identifier, are
to assign a specific priority to the
arranged such that the identifier
individual data frames.
with the highest priority has the
• If an important data frame has
most dominant / higher-order bits (0)
to be transmitted, this is done
at the beginning. Consequently the
immediately after the end of the
identifier with the highest priority is
transmission of the current data
always to be transmitted earliest.
frame. Less important data has
to wait.
Example:
• If, however, a less important
data frame is ready for
transmission and the bus Priority Data protocol Status field
becomes free, this is sent 1 ABS 00110100000
immediately. 2 Engine 01010000000
• Only if really important data 3 AT transmission 10001000000
frame is present there is a
waiting time.

If two or more control units attempt


to output different states
simultaneously at their bus outputs,
the one with the highest order state
always prevails.

Each control unit must also


supervise the bus at all times during
transmission. It therefore ‘speaks’
and ‘listens’ at the same time. If it
hears exactly what it is saying,
everything is in order - it has full
control over the bus and may
continue to speak. However, if it
hears a higher-order bus state,
although it is sending a lower-order
one, it has clearly been overruled by
another control unit.

A. Recessive 1. TCM looses


B. Dominant 2. ECM looses

7
All three control units begin sending After the ABS/TC control unit has
their data frame simultaneously. At finished sending its data protocol,
the same time they compare bit for the others again try to send their
bit on the data bus line. If a control data protocols.
unit sends a recessive (lower-order)
bit and detects a dominant (higher- Naturally the capacity of the bus is
order) one, it stops sending and dimensioned so that low-priority
starts receiving. data frames are not permanently
excluded from transmission. The
First bit: “bus load” must not reach 100% for
• Control unit for ABS/TC sends a long periods of time; the
dominant bit. recommended average is 40%.
• Control unit for the Engine also In addition, a minimum waiting time
sends a dominant bit. is always observed between the
• Control unit for Automatic individual data frames for the same
Transmission sends a recessive data frame during which
bit and detects a dominant bit lower-priority data frames also get a
on the data bus line. It therefore look-in.
loses its allocation and becomes
a receiver.

Second bit:
• Control unit for ABS/TC sends a
dominant bit.
• Control unit for the Engine sends
a recessive bit and detects a
dominant bit on the data bus
line. It therefore loses its
allocation and becomes a
receiver.

Third bit:
• Control unit for ABS/TC is the
only unit transmitting, it
completes its message.

8
1.4 Error Processing 1.5 Wake-up methods

During normal CAN-bus The control units on the LSCAN ‘go


communication, it can happen that to sleep’ if no linked operations are
errors occur. Errors in the required of them. This means that
transmission of data can be caused the communication of these control
by loose contacts, short-circuits or units on the bus may stop under
external electromagnetic fields. certain conditions.
These errors result in the incorrect This differs between the HSCAN
interpretation of data frames or even and MSCAN; there all
individual bits. The CAN protocol communication stops after the
includes mechanisms for error ignition is switched OFF.
detection which detect and To enable the control units to ‘wake
compensate for many errors without up’ when necessary, a wake up
the control units noticing. Only method is implemented. The wake
frequently occurring errors have an up method of the HSCAN/ MSCAN
effect. More about error processing and the LSCAN differ significantly.
is discussed in chapter 6 Diagnosis.
1.5.1 Wake-up of HSCAN and
MSCAN

The control units on the HSCAN


and MSCAN stop communicating
when the ignition is switched OFF.
Immediately all control units on
these busses stop CAN-
communication.

For the control units of the HSCAN


and MSCAN, switching the ignition
ON (terminal 15) wakes up all
control units on the bus.
This means the wake-up signal is
not delivered via the CAN-bus but
via the normal 15 terminals of the
control units.
The 15 terminal is divided and
supplied by the REC, UEC and the
IPBEC.

9
1.5.2 Wake-up of LSCAN

The LSCAN is the only CAN-bus


that is able to communicate with
ignition OFF. This is necessary
because systems like e.g. CDLS
and ATWS are connected to the
LSCAN and would otherwise not be
able to function once the ignition is
switched OFF.

The control units on the LSCAN are


kept awake by a specific signal on
the bus. This signal to stay awake
can be a request for all control units
or for only a select group/ system.

An example are the control units


that make up the CDLS:
12 V pulse to wake up all control
• BCM
• CIM units on the LSCAN.
• DDM
• PDM
• REC Subsequently only the control units
(More about this system in chapter 5 of the CDLS are requested (in this
Functional Systems) example by the BCM) to remain
awake and the rest of the LSCAN
As long as the CDLS needs to be will go back to sleep after approx. 8
active, all these control units are seconds.
requested by the BCM (Master of This way, communication between
the CDLS) to stay awake while active control units is possible
other control units on the LSCAN without keeping other “sleeping”
might already be asleep. When the control units awake.
awake signal stops, the addressed
control units are allowed to go to
sleep.

If the control units of CDLS are


asleep and e.g. the unlock button of
the remote control key is activated,
the CDLS system needs to wake
up and unlock the driver’s door.
The Master control unit of the
system (in this example the BCM)
will transmit a 12 V pulse on the
LSCAN bus and wakes up all the
control units connected to the
LSCAN bus.

10

You might also like