Communication Protocol and Frames

You might also like

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

Basic Technology Series

"Vehicle Mounted Multiplex Communication CAN Basics"


3rd Session: Communication Protocol and Frames
In this session, in addition to CAN basics, a detailed explanation of signal structure will be provided to facilitate an
understanding of CAN communication protocol (communication regulations.)

1 COMMUNICATION PROTOCOL (COMMUNICATION REGULATIONS)


1-1 Outline
Communication protocol is a set of regulations necessary for communication. Communication can be
likened to delivering a package to someone with a delivery service. Think of the data desired to be sent as
the contents of a package. The contents of a package are wrapped to prevent damage and destruction. At
the same time, a package without an address cannot be delivered, so a tag with the recipient's name is
attached. The wrapping and name tag can be likened to protocol (regulations.)
Since packages are sent in accordance to pre-determined regulations, not only can a large number of
senders and recipients be handled, but packages can reach the correct recipients. In the same fashion,
since data is sent in accordance with pre-determined protocol, data will be correctly delivered, regardless of
the node (a component connected to the bus.)

Sender
Sender A
A (Node)
(Node) Recipient
Recipient A
A (Node)
(Node)

Delivery Network
Contents Wrapped and Tagged (Communication Bus) Wrapped Package Contents Unwrapped
(Data) (Protocol) (Protocol) (Data)

Sender
Sender B
B Recipient
Recipient B
B

Sender
Sender C
C Recipient
Recipient C
C

Additionally, when a package is late, lost and/or damaged, the delivery company tracks and warranties the
item. Similarly, if communication data is late or damaged, an error is detected, and the data is sent again.

9 SERVICE TECH Vol.490 07-6


Basic Technology Series
"Vehicle Mounted Multiplex Communication CAN Basics"
1-2 CAN Communication Protocol
The CAN communication system uses a Time Division Multiple Access (TDMA), bi-directional system. All
ECUs and sensors that comprise the system use a pair of communication lines (a bus) to transmit and
receive data in a time-staggered fashion. Communication is performed in accordance with common
communication protocol (communication regulations) such that data transmission/reception occurs
smoothly and accurately.
CAN uses the Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) system in
communication protocol. The CSMA/CA system establishes regulations for sending data to communication
lines such that a pair of communication lines can be shared while permission to begin transmitting data to
each ECU and sensor is being granted.

2 CAN COMMUNICATION FRAMES


2-1 Outline
One signal used for transmission is known as a frame. Signals flow on the CAN bus using the frame unit.
An actual signal waveform example is given below. The diagram to the left shows overall communication
conditions, allowing the flow of multiple frames on the bus to be understood. The diagram to the right shows
an enlarged view of the waveform for a single frame.

<Overall View of Communications> <One Enlarged Frame>


0.5V/div 1000 sec 0.5V/div 100 sec
Enlargement
One Frame *1
CAN-High CAN-High

2.0V 2.0V

2.5V
CAN-Low 2.5V CAN-Low

0 1 2 3 4 5 6 7 8 9 10 100 200 300 400 500 600 700 800


*1: With ACK signals, since all nodes reply, output accumulates, and voltage increases.

Frames used in CAN communication can be divided into the four types listed at the bottom of the page. In
addition, to separate the (1) data frame, and (2) remote frame from the preceding frames, a space called the
inter-frame space is placed before both (1) and (2). Each of the following frame types will be explained on
the proceeding page.

(1) Data Frame


(2) Remote Frame
(3) Error Frame
(4) Overload Frame

SERVICE TECH Vol.490 07-6


10
Basic Technology Series
"Vehicle Mounted Multiplex Communication CAN Basics"
2-2 Frame Structure
(1) Data frame
The data frame is the most basic type of frame, used to send data from a transmission node to a reception
node. A data frame consists of the following seven fields.

Signal Type Actual Data Error Detection Use Dominant (Logical Value: 0)
Recessive (Logical Value: 1)
Ex.) Coolant Temperature Data Ex.) 80°C Calculation Value
Dominant/Recessive
* Numeric values show
the number of bits. ACK Slot
SOF RTR IDE r0 CRC Delimiter ACK Delimiter

Identifier DLC Data CRC EOF

1 11 1 1 1 4 0-64 15 1 1 1 7

1 Start Of Frame 2 Arbitration 3 Control 4 Data 5 CRC 6 ACK 7 End Of Frame

Each Field Meaning


1 Start Of Frame (SOF) Displays the start of a data frame. Consists of one dominant bit.
2 Arbitration Displays messages in prioritized order. Acquires transmission authority from the longest continuously dominant node.
3 Control Displays data (number of bytes) length (zero to eight bytes.)
4 Data Can store zero to eight bytes using actual data.
5 Cyclic Redundancy Check (CRC) Detects incorrect frame transmissions.
6 Acknowledge (ACK) Used for correct recipient verification. Normally, the reception node transmits a dominant signal to the ACK slot.
7 End Of Frame Displays the end of a frame. Consists of seven recessive bits.

(2) Remote frame


The remote frame requests data transmission from other nodes. Compared to the data frame, the remote
frame has no data fields.

* Numeric values show the number of bits.


ACK Slot
SOF RTR IDE r0 CRC Delimiter ACK Delimiter

Identifier DLC CRC EOF

1 11 1 1 1 4 15 1 1 1 7

1 Start Of Frame 2 Arbitration 3 Control 4 CRC 5 ACK 6 End Of Frame

(3) Error frame Error Flag


The error frame is used to notify that a node has detected Error Delimiter
an error. The error flag displays the status of an error.
6 0-6 8

Maximum 12 bits when errors are overlapping.

Overload Flag
(4) Overload frame
Overload Delimiter
When a reception node reports that reception preparations
are not complete, the overload node makes transmission 6 0-6 8
from each node wait.

Maximum 12 bits when overloads are overlapping.

11 SERVICE TECH Vol.490 07-6


Basic Technology Series
"Vehicle Mounted Multiplex Communication CAN Basics"

3 ERROR DETECTION
CAN communication has the following five error detection functions.

Error Detection
Error Detection Description Detection Node
Function

Bit Error Detects when values for transmission data and data on the bus differ.
Transmission Side,
Detects when six or more equivalent bit levels have continued without Reception Side Node
Staff Error
following bit staff regulations.

Detects when the delivered CRC and the CRC calculated for the
CRC Error
reception side do not match. Reception Side Node
Form Error Detects an incorrect bit (dominant) detection in a fixed bit field.

ACK Error Detects when dominant has not been detected in the ACK slot. Transmission Side Node

* Numeric values show the number of bits. ACK Slot


SOF RTR IDE r0 CRC Delimiter ACK Delimiter

Identifier DLC Data CRC EOF

1 11 1 1 1 4 0-64 15 1 1 1 7

Error
Bit Error
Detection
Locations Staff Error Form Error
CRC Error ACK Error
Form Error

A node that has detected an error using one of the error detection functions outputs an error frame, and
notifies other nodes of an abnormality. Each node is controlled according to the detected error, such that the
error frame continues to be output to prevent the bus from being completely monopolized. There are the
following three types of error states.

Error State Control


Bus Off State Corresponds to a red signal. Cannot participate in communication.
Error Passive State Corresponds to a blinking red signal. Restricted participation in communication is possible.
Error Active State Corresponds to a green signal. Communication is possible without limitation.

Error Passive Error Active


Bus Off (Red Signal)
(Blinking Red Signal) (Green Signal)

Cover Picture: Lake Louise (Canada, Banff National Park)


The Banff National Park, located in the heart of the city of Banff, is the largest tourist point of Canadian Rockies,
and plays home to a number of lakes and mountains. One of the most famous lakes, Lake Louise, draws tourists
from around the world. The name Louise is taken from Princess Louise, daughter of Queen Victoria. Lake Louise
is often described by visitors "Glorious!"

SERVICE TECH Vol.490 07-6


12

You might also like