Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CAN.1
Reference Material
[1] CANPRES Version 2.0
Siemens Microelectronics, Inc.
October 98
[2] CAN Specification Version 2.0
Robert Bosch GmbH
1991
[3] CAN System Engineering
Wolfhard Lawrenz
Springer-Verlag 1997
[4] Embedded Networking with CAN and CANopen
Olaf Pfeiffer et al.
RTC Books, 2003
CAN.2
Reference Material
CAN.3
Introduction Car Functions
Air
Conditioning
Lightning
Engine Anti-lock Power
Control Brakes Locks
Dashboard
Transmission Active
Airbag
Control Suspension Power
Seats
Power
Windows
CAN.4
Introduction Early Days
Air
Conditioning
Lightning
Engine Anti-lock Power
Control Brakes Locks
Dashboard
Transmission Active
Power Airbag
Control Suspension
Seats
Power
Windows
CAN.5
Introduction With CAN
Air
Conditioning
Lightning
Engine Anti-lock Power
Control Brakes Locks
high-speed low-speed
Dashboard
CAN bus CAN bus
Transmission Active
Airbag
Control Suspension Power
Seats
Power
Windows
= CAN
CAN.6
CSMA/CD-AMP
Carrier Sense Multiple Access/Collision Detection
with Arbitration on Message Priority
CAN.7
CSMA/CD-AMP
Carrier Sense Multiple Access / Collision Detection
T1 Success
Node #0 Messages Retry
Node #1 T2 Success
Node #2 Messages Retry
time
CAN.8
CSMA/CD-AMP
CSMA/CD with Arbitration on Message Priority
Node #0
0 bit is dominant over the 1 bit => node 1 wins
Node #1
Network:
CAN.11
Wired-AND Implementation
A B C BUS
D D D D
D D R D
D R D D
D R R D
R D D D
R D R D
R R D D
R R R R CAN.10
CAN
Bus Arbitration
CAN is built on a Wired-AND bus similar to I2C
Node 1 Winner
Node 2
Node 3
Bus
0 : Dominant Bit
1 : Recessive bit node 2 node 3
miscompare miscompare CAN.15
CAN Physical Layer
Voltage Levels
CAN
Volts [V] High
Speed
ISO-IS
Recessive Dominant Recessive
5 11898
4 U_CAN_H
3.5V
3
2.5V
UDIFF
2
1.5V
1 U_CAN_L
CAN.29
CAN
The Identifier
El mecanismo:
Example:
CAN.13
OSI Layers
Example:
MCP2515/
MCP2510
Example:
MCP2551
CAN.14
CAN Basics
CAN.15
EE395A-CAN Modification
EE395 EE395
Lab MCP2510 MCP2551 MCP2551 MCP2510 Lab
Board Board
CAN
Transceiver
EE395 EE395
Lab MCP2510 MCP2551 MCP2551 MCP2510 Lab
Board Board
CAN
Display Controller Keyboard Host
Controller
EE395 EE395
Lab MCP2510 MCP2551 MCP2551 MCP2510 Lab
Board Board
CAN.16
Microchip Example
CAN.17
CAN Basics
CAN.18
Ken Tindell, Alan Burns, "Guaranteeing Message Latencies on Control Area Network (CAN)
CAN.19
CAN Physical Layer
Voltage Levels
0 open valve/
0 closed switch
3.5V
1.5V
0
open valve/
closed switch
CAN.21
CAN Physical Layer
Voltage Levels Closer Look
1 open switch/
1 closed valve
2.5V
2.5V
1 2.5V
open switch/
closed valve
CAN.22
Standardization Issues
Real-time capability
CAN.24
CAN Physical Layer
(ISO-IS 11898)
CAN
High
Speed
ISO-IS
Node 1 Node N 11898
CAN CAN
Bus Bus
Driver Driver
40 m / 130 ft 0.3 m / 1 ft
@ 1 Mbps @ 1 Mbps
CAN_H
120
120
CAN_L
CAN.24
Baud Rate versus Bus Length
From [1]
CAN.25
CAN Physical Layer
Voltage Levels What about the arbitration ?
3.5V
1.5V
CAN.26
CAN Physical Layer
Bit Stuffing
CAN.27
CAN Physical Layer
Bit Stuffing - Example
H H H H H H H H H H H H H L L L L L L L L L L L L L
H H H H H S H H H H H S H L L L L L L L S L L L L L S L L L
stuff bits
CAN.35
CAN Implementations
Basic CAN
Full CAN
From [1]
CAN.29
CAN Implementations
Basic CAN
Full CAN
From [1]
CAN.30
CAN Implementation Example
(2) (3)
to
CAN
transceiver
CAN.32
CAN Frame Formats
Data Frame
a CAN node wishes to transmit data
Remote Frame
a CAN node requests data from a
source node
Error Frame
Overload Frame
Interframe Space
CAN.33
CAN Frame Formats
Data or Message Frame (CAN 2.0A)
11 bit identifier
(lower number has a higher priority)
CAN.42
CAN Frame Formats
Remote Frame (CAN 2.0A)
A station can initiate the transmission of respective data by its source node by sending
a remote frame. It differs from the data in that the RTR is recessive and the data field is empty!
Example: If node A wants node B to send information concerning the oil pressure
(identifier 00010101111), it sends a remote frame with that identifier. As a
result, node B will try to send oil pressure information.
CAN.37
Overload Frame
This frame is transmitted by a node that becomes too busy.
It is primarily used to provide for an extra delay between
messages.
Up to two may be used
From [1]
CAN.39
CAN Data Link Layer
Error Handling Error Frame
From [1]
CAN.40
CAN Data Link Layer
Error Handling Error Frame
CAN.41
Error flag: 6 dominant bits Error delimiter: 8 recessive bits
CAN Data Link Layer
Error Handling Acknowledgement Check
Transmitter checks in the Acknowledge Field of a message
to determine if the Acknowledge Slot, which is sent out as a
recessive bit, contains a dominant bit.
If this is the case, at least one other node, (here node B) has
received the frame correctly.
If not, an Acknowledge Error has occurred and the message
has to be repeated. No Error Frame is generated, though.
From [1]
CAN.42
CAN Data Link Layer
Error Handling Frame Check
CAN.52
CAN Data Link Layer
Error Handling Bit Monitoring
CAN Bus
+
-
CAN.44
CAN Data Link Layer
Error Handling Bit Stuffing Error
H H H H H H S H H H H H S H L L L
CAN.54
CAN Data Link Layer
Error Handling Error Counters
CAN.46