SlideShare ist ein Scribd-Unternehmen logo
1 von 50
BY
ARAVINDKUMAR B
Distributed Systems in Vehicles
 CAN
 LIN
 MOST
 Byteflight
 D2B
 K-line
 FlexRay
Introduction to CANBUS
CANBUS or CAN bus – Controller Area Network bus
An automotive serial bus system developed to satisfy the following
requirements:
 Network multiple microcontrollers with 1 pair of wires.
 Allow microcontrollers communicate with each other.
 High speed, real-time communication.
 Provide noise immunity in an electrically noisy environment.
 Low cost
Who uses CANBUS?
 Designed specifically for automotive applications
 Today - industrial automation / medical equipment
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
Automotive Medical / Industrial
Markets
CANBUS Market Distribution
CANBUS History
 First idea - The idea of CAN was first conceived
by engineers at Robert Bosch Gmbh in Germany
in the early 1980s.
 Early focus - develop a communication system
between a number of ECUs (electronic control
units).
 New standard - none of the communication
protocols at that time met the specific
requirements for speed and reliability so the
engineers developed their own standard.
CANBUS Timeline
1983 : First CANBUS project at Bosch
1986 : CAN protocol introduced
1987 : First CAN controller chips sold
1991 : CAN 2.0A specification published
1992 : Mercedes-Benz used CAN network
1993 : ISO 11898 standard
1995 : ISO 11898 amendment
Present : The majority of vehicles use CAN bus.
CANBUS and the OSI Model
Application Areas of Distributed Systems in
Vehicles – Power Train
 Communicating units
 engine, brake, gear, ABS/ESP
 steering wheel position, steering booster
 light control, damper …
 High-speed and reliability are required
 running only when the ignition is on
 in future the technologies for X by wire will be applied
 Today standards
 CAN (high-speed)
 Byteflight
 Future: the FlexRay standard
Application Areas of Distributed Systems
in Vehicles – Comfort Functions
 Communicating units
 seat position control, mirrors control, windows control
 air condition, vehicle top,
 tires pressure control, parking assistant
 wiper control, door control …
 Lower-speed is enough
 Low-power mode is required
 units wake-up by data transmission
 running also when ignition is off
 Today standards
 CAN (low-speed)
 LIN
Application Areas of Distributed Systems in
Vehicles – Infotainment and Telematics
 Communicating units
 sound system, CD player, changer, tuner
 TV set, mobile phone, navigation
 inter-vehicle communication, traffic info reception …
 Different communication speeds
 low speed for control transfers
 high speed for user data transfers (audio, video)
 Low power mode required
 unit wake-up by data communication
 running if ignition is off
 Today standards
 CAN (low-speed)
 MOST
Application Areas of Distributed Systems in
Vehicles – Diagnostics
 Communicating units
 all (use their native interface) …
 Different interfaces
 today often so called K-line with diagnostics
protocols
 gateway unit often translates diagnostics protocols
of particular ECUs
 in future the wireless diagnostics is expected
 using bluetooth ??? …
 security is the issue
CAN and ISO-OSI Model
 Physical layer
 transmission line
parameters, signaling
levels, transmission speed,
…
 Link Layer = CAN
 medium access control
 frame coding and decoding
 addressing
 data security
 error states behavior
CAN and ISO-OSI Model
 Application layer
 defines the data content of link
layers frames
 defines when (under which
conditions) the frames are
transmitted
 in automotive industry there
are only company standards
 standards do exist for
diagnostics
 Application protocols are
defined e.g. in industrial
automation field (CANopen)
 effort to use them in vehicles
too
CAN and ISO-OSI Model
 Inter-layer communication
 each protocol layer adds some information that
allows the layer protocols to provide the required
service for the layer above
P1 P1
P2 P2
P3 P3
data
data
data
data
layer L1
layer L2
layer L3
layer L1
layer L2
layer L3
CAN – Physical Layer Requirements
 The basic requirement for the physical layer is to
provide so called wired OR functionality
 Two basic signaling levels
 recessive
 dominant
 available e.g. in fiber optics
Vcc Vcc
1 2 3
Bus
CAN – Link Layer, MAC and LLC
 MAC – Medium Access Control
 provides the physical channel access for the units, prevents
destructive collisions
 provides priority transmission
 implements the channel coding
 provides the data security by means of CRC check
 solves high error rate problem for particular nodes in network
 provides mechanism for acknowledgement of correctly
received frames
 LLC – Logical Link Control
 allows filtering of received frames
 solves the overload condition
CAN – Communication Principle
 All nodes within the systems are equal (from the
communication point of view) – peer to peer
 Frames, (sometimes called messages) are broadcasted into
the network and received by all nodes simultaneously
 There is no node oriented addressing
 frame always starts with identifier, which must provide a
unique frame content identification
 In case the frame is received correctly by receiving nodes,
the acknowledge is sent to the transmitting node
 In case there is an error detected during the transmission,
the error identification sequence is sent and frame has to
be transmitted again
Message Oriented Transmission Protocol
 Each node – receiver & transmitter
 A sender of information transmits to all devices on the bus
 All nodes read message, then decide if it is relevant to them
 All nodes verify reception was error-free
 All nodes acknowledge reception
Message Format
 Each message has an ID, Data and overhead.
 Data –8 bytes max
 Overhead – start, end, CRC, ACK
CAN – Medium Access Control
 Any node can start transmitting only if the bus idle state is
detected
 In case that more than one node start transmitting
simultaneously
 there is no physical contention on the bus, as the dominant bit
transmission „beats“ the recessive one
 Each node receives back the transmitted bit value
 if a node transmitting the recessive bit value receives back the
dominant bus state, it stops transmitting immediately
 This method is called CSMA/CR
 Carrier Sense Multiple Access with Collision Resolution
 sometimes it is also less correctly called CSMA/CA (…Collision
Avoidance)
CAN – Medium Access Control
 3 nodes start transmitting simultaneously
 Start of Frame (SOF) bit is always dominant
 11 bits of identifier follow
 identifier must be unique within the system
CAN – Frame Identifier
 Identifies the frame content
 It is not the sender nor the receiver address
 usually one node transmits frames with different
identifiers
 each node receives frames with identifiers it is interested
in
 Identifier must be unique within the system
 two different nodes are not allowed to transmit frame with
the same identifier (because of arbitration)
 In case the information source redundancy is required,
identifiers usually differ in low significant bit
 Identifier is transmitted from the most significant bit
 log. 0 is transmitted as a dominant state, log. 1 as a
recessive
 the lower identifier value, the higher frame priority
CAN – Frame Format
 Current standard version is CAN 2.0
 Bosch, 1990
 it defines only the link layer protocol
 there are two parts (variants) A and B
 CAN2.0A is backward compatible with older CAN
versions, it uses 11-bit identifier
 CAN2.0B defines two data frame types – standard and
extended
 standard frame offers 11-bit identifier
 extended frame offers 29-bit identifier
 Accepted as ISO11898-1 standard
 next standard parts define the physical layer
protocols too
CAN – Frame Format
 4 frame types are defined
 data frame
 used for data transfer
 variable length (0 – 8 data bytes)
 remote request frame
 used to request the data frame with the same identifier
 it contains no data
 error frame
 consists of six consequent dominant or recessive bits
 it is transmitted to indicate the error
 overload frame
 the same format like the error frame
 nodes transmit it to delay the next data frame transmission
CAN 2.0A – Data Frame Format
 bus idle – recessive state
 SOF – start of frame
 arbitration field (identifier + RTR bit)
 control field (dedicated bits + data length)
 Both dedicated bits have a dominant value
 data (0 – 8 bytes)
 CRC (15-bit CRC, 1 recessive bit as a delimiter)
 acknowledge (1 bit acknowledge, 1 bit delimiter)
 end of frame (7 recessive bits)
 inter-frame space (3 recessive bits)
frame
identifier
R
T
R
data
length
0 - 8 data bytes
Control
field CRC
Bus
idle
CRC
15 bits
E
R
C
S
O
F
Length: 1 11 1 1 41 0 - 64 15 1 1 1 7
end of
frame
A
C
K
A
C
D
3
R
0
Arbitration field Data field
R
1
Acknowledge
inter-frame
space
CAN 2.0B – Standard Data Frame Format
 In fact the same like CAN 2.0A frame format
 Only the formal difference
 bit r1 name changed to IDE (identifier extended)
 The IDE bit is always dominant in a standard data
frame
Arbitration
field Data field
S
O
F
frame
identifier
11 bits
R
T
R
Control
field
I
D
E
R
0
data
length
Bus
idle
CAN 2.0B – Extended Data Frame Format
 Allows higher number of frames in particular system
 RTR bit is replaced by SRR bit (substitute remote request)
 always recessive
 IDE bit is always recessive
 standard frame with the same first 11 bits of identifier has
higher priority
 Following 18 identifier bits are used for arbitration among
extended frames only
 CAN controllers provide either active or passive
compatibility with CAN2.0B
R
0
I
D
E
S
O
F
R
1
R
T
R
S
R
R
Data field
R
0
I
D
E
data
length
frame
identifier
11 bits
frame identifier
18 bits
R
1
R
T
R
S
R
R
Arbitration field
Control
field
Bus
idle
CAN 2.0A – RTR Frame Format
 RTR bit is always recessive
 RTR frame identifier is the same like the data frame
identifier which transmission is requested
 RTR frame has lower priority than the data frame with the
same identifier
 do you know WHY ???
 Data length is always 0
 Similarly it exists an extended RTR frame format according
to the CAN 2.0B
frame
identifier
R
T
R
data
length
Control
field CRC
Bus
idle
CRC
15 bits
E
R
C
S
O
F
Length: 1 11 1 1 41 15 1 1 1 7
end of
frame
A
C
K
A
C
D
3
R
0
Arbitration
field
R
1
Acknowledge field
inter-frame
space
CAN – Error Frame Format
 Error frame consists of six dominant or recessive bits
 it depends on error state of the node which transmits it
 It is transmitted by the node (-s) that detect (-s) any
communication error
 it result in an immediate transmission stop and its later
repetition
 this is all controlled by the controller (implemented in
silicon), not by application software
Error flag
Superpozition of error flags
Data frame or
error delimiter or
overload delimiter
Error frame
Error
delimiter
Inter-frame space
or
overload frame
CAN – Overload Frame Format
 Overload frame consists of six dominant bits
 Its transmission is requested by the receiver in order to
 delay the transmission of a next data frame
 indicate a detection of a dominant value in a last bit of the end
of frame field or in first two bits of inter-frame space
 Its occurrence does not mean an error
 previous frame is not retransmitted
 Today controllers do not use it to delay the next
transmission – they are fast enough
Overload flag
Superpozition of overload flags
Overload frame
Overload
frame delimiter
Inter-frame space
or
overload frame
Data frame or
error delimiter or
overload delimiter
CAN – Error Detection
Several simultaneously used mechanisms:
 Monitoring
 transmitter receives back the bus state and if it detects a
different value, its behavior is:
 in case it detects a dominant bus state within the arbitration
field while transmitting the recessive one, it stops
transmitting
 in case it detects a recessive bus state within the arbitration
field while transmitting the dominant one, or if it detects
anywhere else (excluding the ACK bit) opposite bus state
than that one it is currently transmitting, it sends the error
frame
 CRC (Cyclic Redundancy Check)
 in case the locally evaluated CRC is different from the received
one, the error frame is transmitted
CAN – Error Detection
 Bit stuffing
 transmitter transmits particular bits using NRZ (not
return to zero) coding
 if there is a sequence of 5 consecutive bits of the
same level, one bit of the opposite level is inserted
 during the reception an inverse process takes place,
it means after five received bits of the same level the
next bit must be of the opposite level (check) and it
is known it is an inserted bit – it is thus removed
CAN – Bit Stuffing
 Error frame transmission violates bit stuffing rule
 all nodes thus detect the error
 it is thus ensured that the frame is received either by all nodes
or by no node
 data consistency
CAN – Error Detection
 Frame format check
 some bits have predefined level
 CRC or ACK delimiters are always recessive
 end of frame field is whole recessive
 if there is a dominant bit detected, an error frame is sent
 data length field can contain value higher than 8
 length of 8 is expected
 error frame is not sent
 Frame receive acknowledge
 by the dominant level in the ACK bit
 if there is no acknowledge, transmitting node sends an error
frame
 data frame transmission is repeated
CAN – Node Error States
 One node encountering communication problems could
block complete communication within the system
 it detects an error in each received frame and transmits an
error frame
 it is necessary to limit this possibility
 There are two so called error counters in each CAN
controller (and thus in each network node)
 one for errors during transmission, one during reception
 at the beginning they are reset
 if there is an error during transmission, transmission error
counter value is increased, the same is tru for reception
 If the transmission or reception have passed without error,
the respective value is decremented (up to zero)
 According to the error counters values particular node is in
one of three error states
CAN – Node Error States
 Error active
 value of each of both error counters has to be lower than
128
 in case the error is detected during the frame
transmission or reception, an active error flag (6
consecutive dominant bits) is generated
 it breaks communication and all other nodes within the
system detect error as well
 the number the respective error counter is increased (0, 1
or 8) depends on the error context, it means the
situation and conditions of error detection
 if any of error counters reaches the value higher than 127,
the respective node goes into the error passive state
CAN – Node Error States
 Error passive
 the value of at least one error counter is higher than 127
 if the node detects communication error, it generates a
passive error flag (6 consecutive recessive bits)
 if the error passive node is the only one who detects error
(probably incorrectly), the communication is not broken
and can be finished and acknowledged by other nodes
 in case of successful reception the respective counter is
either decremented (if its value was lower than 128) or set
between 119 and 127 (if its value was higher 127)
 if the values of both counters fall under 128, the node goes
back to error active state
 if the value of transmission error counter gets over 255, the
controller enters bus-off state
CAN – Node Error States
 Bus-off state
 transmission error counter value is higher than 255
 reception error counter value has no influence on entering
into the bus-off state
 bus-off node is completely disconnected from the network
(logical not physical disconnect)
 it is not possible to transmit frames nor to influence the bus
communication by any way (no ACK, error frame..)
 reception is possible (depends on implementation)
 from the point of view of other nodes the bus-off node
disappears from the network (like switched off)
 to leave the bus-off state only the controller hardware or
software reset is available
 then after the detection of 128 recessive 11-bit sequences the
controller enters an error active state
 incorrect software implementation can make global
problems in communication
CAN – Error States Servicing
CAN controller Status register usually contains:
 Error warning flag
 set if any error counter reaches some limit
 usually 96
 sometimes this limit can be preset
 controller can generate an interrupt service request
 application software (node firmware) may or may not service
this event
 Error passive flag
 set by entering the error passive state
 interrupt service request possible
 Application software should také into account possible data
inconsistency within the local node and the rest of a network
 Bus-off flag
 controller reinitialization is necessary
CAN – Persisting communication problems
 It always depends on the error type, direction of
communication (reception, transmission) where it takes
place as well as the physical layer protocol version
 e.g. tolerance to some shorts
 Fatal errors (e.g. Short connection of both CAN lines to
ground) always finishes in bus-off state
 only in case the node tries to transmits
 The node which is alone in the network (or disconnected by
cable interrupt), enters after 16 unacknowledged frame
transmissions into an error passive state
 If the software service of error states is not correctly
implemented, serious communication problems may occur
 Under the standard conditions all nodes within the system
are in the error active state and there are no error frames
generated
CAN – Physical Layer Standards
 CAN standard (Bosch) defines the link layer protocol only
 It is also standardized by ISO as ISO11898-1
 Physical layers are defined in standards ISO11898-2
 high-speed CAN
 up to 1 Mbit/s
 and ISO11898-3
 low-speed CAN
 up to 125 kbit/s
 particular fault tolerance
 Both these physical standards are widely used in today
vehicles
 For trucks there are othe standards available with higher
degree of immunity
 They are all defined as SAE standards too
CAN – ISO11898-2 Physical Layer
 Bus structure with terminators
 Line impedance of 120 ohm
 Communication speed up to 1 Mbit/s
 Differential signaling (logical level defined by voltage
difference)
 CAN_H and CAN_L lines
CAN – ISO11898-2 Physical Layer
 The recessive level is provided by terminators and „wake“
voltage sources in transceivers
 CAN_H – CAN_L difference is near 0
 The dominant state is driven by the transceiver
 CAN_H – CAN_L difference is about 2 volts
CAN – ISO11898-2 Physical Layer
 The transceiver contains the temperature, short circuit and ESD
protection
 Low load in power off state
 Some offer low power states
CAN – ISO11898-3 Physical Layer
 Bus structure
 Sleep mode with remote wake-up by CAN communication
 Communication speed up to 125 kbit/s
 Differential signaling
CAN – ISO11898-3 Physical Layer
 Particular fault tolerance, transceiver enters so
called single wire mode
 CAN_H or CAN_L wire broken
 short connection of CAN_H or CAN_L to ground
 short connection of CAN_H or CAN_L to +5V
 short connection of CAN_H or CAN_L to +12V
 short connection of CAN_H to CAN_L
 Single wire mode is indicated by the transceiver
output
 after the fault is removed transceiver automatically
enters standard two wire mode
CAN – ISO11898-3 Physical Layer
 RTH and RTL resistors provide termination
 their values depend on number of nodes in system
 Transceiver supports node wake-up when the CAN activity is
examined, or by he local signal
 Sleep mode is controlled by the local microprocessor
 if the whole bus is in sleep (low power) mode, CAN_H voltage
is near 0 and CAN_L voltage is near the battery one
CAN – Immunity to External Disturbances
 Information is transferred by the voltage difference
 if both wires are close the induced disturbance is the same,
difference stays the same
 the absolute value of the induced disturbance can be further
decrease with utilization of twisted pair wire
CAN – Transmission Timing
 všechny uzly v síti musí mít nastavenu shodnou
nominální přenosovou rychlost
 skutečné rychlosti se mírně liší (tolerance
oscilátorů)
 vzhledem k faktu, že v průběhu arbitráže může
vysílat více uzlů najednou, že arbitráž probíhá bit
po bitu a že šíření informace z jednoho uzlu do
druhého je zatíženo zpožděním (budič – vedení –
přijímač), je třeba:
 kompenzace statických zpoždění
 průběžné synchronizace
 kvůli odchylkám oscilátorů
THANK YOU

Weitere ähnliche Inhalte

Was ist angesagt? (20)

CAN (Controller Area Network) Bus Protocol
CAN (Controller Area Network) Bus ProtocolCAN (Controller Area Network) Bus Protocol
CAN (Controller Area Network) Bus Protocol
 
Can bus
Can busCan bus
Can bus
 
Controller area network protocol
Controller area network protocolController area network protocol
Controller area network protocol
 
Controller Area Network(CAN)
Controller Area Network(CAN)Controller Area Network(CAN)
Controller Area Network(CAN)
 
Controller area network (CAN bus) ppt
Controller area network (CAN bus) pptController area network (CAN bus) ppt
Controller area network (CAN bus) ppt
 
Ca npp t
Ca npp tCa npp t
Ca npp t
 
A SEMINAR REPORT ON CAN BUS PROTOCOL
A SEMINAR REPORT ON CAN BUS PROTOCOLA SEMINAR REPORT ON CAN BUS PROTOCOL
A SEMINAR REPORT ON CAN BUS PROTOCOL
 
Can bus
Can busCan bus
Can bus
 
CAN Bus
CAN BusCAN Bus
CAN Bus
 
Canbus
CanbusCanbus
Canbus
 
Canbus presentation
Canbus presentationCanbus presentation
Canbus presentation
 
Controller area network
Controller area networkController area network
Controller area network
 
Controller area network
Controller area networkController area network
Controller area network
 
Can bus m.n.r
Can bus m.n.rCan bus m.n.r
Can bus m.n.r
 
CAN (Controller Area Network)
CAN (Controller Area Network)CAN (Controller Area Network)
CAN (Controller Area Network)
 
Can Bus communication Protocol
Can Bus communication ProtocolCan Bus communication Protocol
Can Bus communication Protocol
 
Lin bus
Lin busLin bus
Lin bus
 
What is AUTOSAR Communiation Stack
What is AUTOSAR Communiation StackWhat is AUTOSAR Communiation Stack
What is AUTOSAR Communiation Stack
 
CAN BUS.ppt
CAN BUS.pptCAN BUS.ppt
CAN BUS.ppt
 
Obd system quick guide
Obd system quick guideObd system quick guide
Obd system quick guide
 

Ähnlich wie Role of CAN BUS in automotives

Can network development using arm cortex m3
Can network development using arm cortex m3Can network development using arm cortex m3
Can network development using arm cortex m3Ankur Rastogi
 
Can network development using arm cortex m3
Can network development using arm cortex m3Can network development using arm cortex m3
Can network development using arm cortex m3Ankur Rastogi
 
Automotive Networks : A Review
Automotive Networks : A ReviewAutomotive Networks : A Review
Automotive Networks : A ReviewIJAEMSJORNAL
 
Can basics
Can basicsCan basics
Can basicscdackp
 
final_of_can_bus_ (1).ppt
final_of_can_bus_ (1).pptfinal_of_can_bus_ (1).ppt
final_of_can_bus_ (1).pptZiadAlfawadleh1
 
CAN Networks
CAN NetworksCAN Networks
CAN Networksjdholly
 
Controller Area Network (CAN) Different Types
Controller Area Network (CAN) Different TypesController Area Network (CAN) Different Types
Controller Area Network (CAN) Different TypesFebinShaji9
 
Accident avoidanve using controller area network protocol
Accident avoidanve using controller area network protocolAccident avoidanve using controller area network protocol
Accident avoidanve using controller area network protocolMadhuri Apar
 
Data link control & protocol concepts
Data link control & protocol conceptsData link control & protocol concepts
Data link control & protocol conceptsRaji Lakshmi
 
3. Wireless Local Area Networks WLAN.ppt
3. Wireless Local Area Networks WLAN.ppt3. Wireless Local Area Networks WLAN.ppt
3. Wireless Local Area Networks WLAN.pptKp Sharma
 
3. Introduction Wireless Local Area Networks.ppt
3. Introduction Wireless Local Area Networks.ppt3. Introduction Wireless Local Area Networks.ppt
3. Introduction Wireless Local Area Networks.pptKp Sharma
 

Ähnlich wie Role of CAN BUS in automotives (20)

Canbus
CanbusCanbus
Canbus
 
Can network development using arm cortex m3
Can network development using arm cortex m3Can network development using arm cortex m3
Can network development using arm cortex m3
 
Can network development using arm cortex m3
Can network development using arm cortex m3Can network development using arm cortex m3
Can network development using arm cortex m3
 
Shubham chakravarty ppt_wcan
Shubham chakravarty ppt_wcanShubham chakravarty ppt_wcan
Shubham chakravarty ppt_wcan
 
Automotive Networks : A Review
Automotive Networks : A ReviewAutomotive Networks : A Review
Automotive Networks : A Review
 
Can basics
Can basicsCan basics
Can basics
 
UNIT 2b.pptx
UNIT 2b.pptxUNIT 2b.pptx
UNIT 2b.pptx
 
final_of_can_bus_ (1).ppt
final_of_can_bus_ (1).pptfinal_of_can_bus_ (1).ppt
final_of_can_bus_ (1).ppt
 
CAN Networks
CAN NetworksCAN Networks
CAN Networks
 
11.chapters
11.chapters11.chapters
11.chapters
 
Controller Area Network (CAN) Different Types
Controller Area Network (CAN) Different TypesController Area Network (CAN) Different Types
Controller Area Network (CAN) Different Types
 
Accident avoidanve using controller area network protocol
Accident avoidanve using controller area network protocolAccident avoidanve using controller area network protocol
Accident avoidanve using controller area network protocol
 
Data link control & protocol concepts
Data link control & protocol conceptsData link control & protocol concepts
Data link control & protocol concepts
 
IJSTEV2I12120
IJSTEV2I12120IJSTEV2I12120
IJSTEV2I12120
 
can bus theory solution
can bus theory solutioncan bus theory solution
can bus theory solution
 
3. Wireless Local Area Networks WLAN.ppt
3. Wireless Local Area Networks WLAN.ppt3. Wireless Local Area Networks WLAN.ppt
3. Wireless Local Area Networks WLAN.ppt
 
3. Introduction Wireless Local Area Networks.ppt
3. Introduction Wireless Local Area Networks.ppt3. Introduction Wireless Local Area Networks.ppt
3. Introduction Wireless Local Area Networks.ppt
 
Unit 3 - Data Link Layer - Part A
Unit 3 - Data Link Layer - Part AUnit 3 - Data Link Layer - Part A
Unit 3 - Data Link Layer - Part A
 
Ethernet
EthernetEthernet
Ethernet
 
Project-Report
Project-ReportProject-Report
Project-Report
 

Mehr von Yuga Aravind Kumar

Industry 5.0 (Industrial revolution)
Industry 5.0 (Industrial revolution)Industry 5.0 (Industrial revolution)
Industry 5.0 (Industrial revolution)Yuga Aravind Kumar
 
Difference between Turbocharger vs supercharger
Difference between Turbocharger vs superchargerDifference between Turbocharger vs supercharger
Difference between Turbocharger vs superchargerYuga Aravind Kumar
 
Electronic control of automatic transmission
Electronic control of automatic transmissionElectronic control of automatic transmission
Electronic control of automatic transmissionYuga Aravind Kumar
 
Climate control system in Automotives
Climate control system in AutomotivesClimate control system in Automotives
Climate control system in AutomotivesYuga Aravind Kumar
 
Selection of grinding wheels and their conditioning
Selection of grinding wheels and  their conditioningSelection of grinding wheels and  their conditioning
Selection of grinding wheels and their conditioningYuga Aravind Kumar
 
Domains of mechatronics and their recent developments
Domains of mechatronics and their recent developmentsDomains of mechatronics and their recent developments
Domains of mechatronics and their recent developmentsYuga Aravind Kumar
 
Me8392 manufacturing technology-i part-a questions & answers-
Me8392 manufacturing technology-i  part-a questions & answers-Me8392 manufacturing technology-i  part-a questions & answers-
Me8392 manufacturing technology-i part-a questions & answers-Yuga Aravind Kumar
 
Steps involved in sand casting process
Steps involved in sand casting processSteps involved in sand casting process
Steps involved in sand casting processYuga Aravind Kumar
 
Disorders identified from ECG analysis
Disorders identified from ECG analysisDisorders identified from ECG analysis
Disorders identified from ECG analysisYuga Aravind Kumar
 
Blood pressure measurement by using photoelectric transducers
Blood pressure measurement by using photoelectric transducersBlood pressure measurement by using photoelectric transducers
Blood pressure measurement by using photoelectric transducersYuga Aravind Kumar
 
Action potential and resting potential
Action potential and resting potentialAction potential and resting potential
Action potential and resting potentialYuga Aravind Kumar
 
Electromagnetic blood flow meter
Electromagnetic blood flow meterElectromagnetic blood flow meter
Electromagnetic blood flow meterYuga Aravind Kumar
 

Mehr von Yuga Aravind Kumar (20)

Industry 5.0 (Industrial revolution)
Industry 5.0 (Industrial revolution)Industry 5.0 (Industrial revolution)
Industry 5.0 (Industrial revolution)
 
Difference between Turbocharger vs supercharger
Difference between Turbocharger vs superchargerDifference between Turbocharger vs supercharger
Difference between Turbocharger vs supercharger
 
Basics of strength of materials
Basics of strength of materialsBasics of strength of materials
Basics of strength of materials
 
Electronic control of automatic transmission
Electronic control of automatic transmissionElectronic control of automatic transmission
Electronic control of automatic transmission
 
Traction control system
Traction control systemTraction control system
Traction control system
 
Antilock braking system (abs)
Antilock braking system (abs)Antilock braking system (abs)
Antilock braking system (abs)
 
Climate control system in Automotives
Climate control system in AutomotivesClimate control system in Automotives
Climate control system in Automotives
 
Selection of grinding wheels and their conditioning
Selection of grinding wheels and  their conditioningSelection of grinding wheels and  their conditioning
Selection of grinding wheels and their conditioning
 
Domains of mechatronics and their recent developments
Domains of mechatronics and their recent developmentsDomains of mechatronics and their recent developments
Domains of mechatronics and their recent developments
 
Me8392 manufacturing technology-i part-a questions & answers-
Me8392 manufacturing technology-i  part-a questions & answers-Me8392 manufacturing technology-i  part-a questions & answers-
Me8392 manufacturing technology-i part-a questions & answers-
 
Metal forming process
Metal forming processMetal forming process
Metal forming process
 
Powder metallurgy
Powder metallurgyPowder metallurgy
Powder metallurgy
 
Steps involved in sand casting process
Steps involved in sand casting processSteps involved in sand casting process
Steps involved in sand casting process
 
Beam and its types
Beam and its typesBeam and its types
Beam and its types
 
Nanosensors
NanosensorsNanosensors
Nanosensors
 
Disorders identified from ECG analysis
Disorders identified from ECG analysisDisorders identified from ECG analysis
Disorders identified from ECG analysis
 
Blood pressure measurement by using photoelectric transducers
Blood pressure measurement by using photoelectric transducersBlood pressure measurement by using photoelectric transducers
Blood pressure measurement by using photoelectric transducers
 
Action potential and resting potential
Action potential and resting potentialAction potential and resting potential
Action potential and resting potential
 
Magnetic Resonance Imaging
Magnetic Resonance ImagingMagnetic Resonance Imaging
Magnetic Resonance Imaging
 
Electromagnetic blood flow meter
Electromagnetic blood flow meterElectromagnetic blood flow meter
Electromagnetic blood flow meter
 

Kürzlich hochgeladen

Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniquesugginaramesh
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 

Kürzlich hochgeladen (20)

Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniques
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 

Role of CAN BUS in automotives

  • 2. Distributed Systems in Vehicles  CAN  LIN  MOST  Byteflight  D2B  K-line  FlexRay
  • 3. Introduction to CANBUS CANBUS or CAN bus – Controller Area Network bus An automotive serial bus system developed to satisfy the following requirements:  Network multiple microcontrollers with 1 pair of wires.  Allow microcontrollers communicate with each other.  High speed, real-time communication.  Provide noise immunity in an electrically noisy environment.  Low cost
  • 4. Who uses CANBUS?  Designed specifically for automotive applications  Today - industrial automation / medical equipment 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Automotive Medical / Industrial Markets CANBUS Market Distribution
  • 5. CANBUS History  First idea - The idea of CAN was first conceived by engineers at Robert Bosch Gmbh in Germany in the early 1980s.  Early focus - develop a communication system between a number of ECUs (electronic control units).  New standard - none of the communication protocols at that time met the specific requirements for speed and reliability so the engineers developed their own standard.
  • 6. CANBUS Timeline 1983 : First CANBUS project at Bosch 1986 : CAN protocol introduced 1987 : First CAN controller chips sold 1991 : CAN 2.0A specification published 1992 : Mercedes-Benz used CAN network 1993 : ISO 11898 standard 1995 : ISO 11898 amendment Present : The majority of vehicles use CAN bus.
  • 7. CANBUS and the OSI Model
  • 8. Application Areas of Distributed Systems in Vehicles – Power Train  Communicating units  engine, brake, gear, ABS/ESP  steering wheel position, steering booster  light control, damper …  High-speed and reliability are required  running only when the ignition is on  in future the technologies for X by wire will be applied  Today standards  CAN (high-speed)  Byteflight  Future: the FlexRay standard
  • 9. Application Areas of Distributed Systems in Vehicles – Comfort Functions  Communicating units  seat position control, mirrors control, windows control  air condition, vehicle top,  tires pressure control, parking assistant  wiper control, door control …  Lower-speed is enough  Low-power mode is required  units wake-up by data transmission  running also when ignition is off  Today standards  CAN (low-speed)  LIN
  • 10. Application Areas of Distributed Systems in Vehicles – Infotainment and Telematics  Communicating units  sound system, CD player, changer, tuner  TV set, mobile phone, navigation  inter-vehicle communication, traffic info reception …  Different communication speeds  low speed for control transfers  high speed for user data transfers (audio, video)  Low power mode required  unit wake-up by data communication  running if ignition is off  Today standards  CAN (low-speed)  MOST
  • 11. Application Areas of Distributed Systems in Vehicles – Diagnostics  Communicating units  all (use their native interface) …  Different interfaces  today often so called K-line with diagnostics protocols  gateway unit often translates diagnostics protocols of particular ECUs  in future the wireless diagnostics is expected  using bluetooth ??? …  security is the issue
  • 12. CAN and ISO-OSI Model  Physical layer  transmission line parameters, signaling levels, transmission speed, …  Link Layer = CAN  medium access control  frame coding and decoding  addressing  data security  error states behavior
  • 13. CAN and ISO-OSI Model  Application layer  defines the data content of link layers frames  defines when (under which conditions) the frames are transmitted  in automotive industry there are only company standards  standards do exist for diagnostics  Application protocols are defined e.g. in industrial automation field (CANopen)  effort to use them in vehicles too
  • 14. CAN and ISO-OSI Model  Inter-layer communication  each protocol layer adds some information that allows the layer protocols to provide the required service for the layer above P1 P1 P2 P2 P3 P3 data data data data layer L1 layer L2 layer L3 layer L1 layer L2 layer L3
  • 15. CAN – Physical Layer Requirements  The basic requirement for the physical layer is to provide so called wired OR functionality  Two basic signaling levels  recessive  dominant  available e.g. in fiber optics Vcc Vcc 1 2 3 Bus
  • 16. CAN – Link Layer, MAC and LLC  MAC – Medium Access Control  provides the physical channel access for the units, prevents destructive collisions  provides priority transmission  implements the channel coding  provides the data security by means of CRC check  solves high error rate problem for particular nodes in network  provides mechanism for acknowledgement of correctly received frames  LLC – Logical Link Control  allows filtering of received frames  solves the overload condition
  • 17. CAN – Communication Principle  All nodes within the systems are equal (from the communication point of view) – peer to peer  Frames, (sometimes called messages) are broadcasted into the network and received by all nodes simultaneously  There is no node oriented addressing  frame always starts with identifier, which must provide a unique frame content identification  In case the frame is received correctly by receiving nodes, the acknowledge is sent to the transmitting node  In case there is an error detected during the transmission, the error identification sequence is sent and frame has to be transmitted again
  • 18. Message Oriented Transmission Protocol  Each node – receiver & transmitter  A sender of information transmits to all devices on the bus  All nodes read message, then decide if it is relevant to them  All nodes verify reception was error-free  All nodes acknowledge reception
  • 19. Message Format  Each message has an ID, Data and overhead.  Data –8 bytes max  Overhead – start, end, CRC, ACK
  • 20. CAN – Medium Access Control  Any node can start transmitting only if the bus idle state is detected  In case that more than one node start transmitting simultaneously  there is no physical contention on the bus, as the dominant bit transmission „beats“ the recessive one  Each node receives back the transmitted bit value  if a node transmitting the recessive bit value receives back the dominant bus state, it stops transmitting immediately  This method is called CSMA/CR  Carrier Sense Multiple Access with Collision Resolution  sometimes it is also less correctly called CSMA/CA (…Collision Avoidance)
  • 21. CAN – Medium Access Control  3 nodes start transmitting simultaneously  Start of Frame (SOF) bit is always dominant  11 bits of identifier follow  identifier must be unique within the system
  • 22. CAN – Frame Identifier  Identifies the frame content  It is not the sender nor the receiver address  usually one node transmits frames with different identifiers  each node receives frames with identifiers it is interested in  Identifier must be unique within the system  two different nodes are not allowed to transmit frame with the same identifier (because of arbitration)  In case the information source redundancy is required, identifiers usually differ in low significant bit  Identifier is transmitted from the most significant bit  log. 0 is transmitted as a dominant state, log. 1 as a recessive  the lower identifier value, the higher frame priority
  • 23. CAN – Frame Format  Current standard version is CAN 2.0  Bosch, 1990  it defines only the link layer protocol  there are two parts (variants) A and B  CAN2.0A is backward compatible with older CAN versions, it uses 11-bit identifier  CAN2.0B defines two data frame types – standard and extended  standard frame offers 11-bit identifier  extended frame offers 29-bit identifier  Accepted as ISO11898-1 standard  next standard parts define the physical layer protocols too
  • 24. CAN – Frame Format  4 frame types are defined  data frame  used for data transfer  variable length (0 – 8 data bytes)  remote request frame  used to request the data frame with the same identifier  it contains no data  error frame  consists of six consequent dominant or recessive bits  it is transmitted to indicate the error  overload frame  the same format like the error frame  nodes transmit it to delay the next data frame transmission
  • 25. CAN 2.0A – Data Frame Format  bus idle – recessive state  SOF – start of frame  arbitration field (identifier + RTR bit)  control field (dedicated bits + data length)  Both dedicated bits have a dominant value  data (0 – 8 bytes)  CRC (15-bit CRC, 1 recessive bit as a delimiter)  acknowledge (1 bit acknowledge, 1 bit delimiter)  end of frame (7 recessive bits)  inter-frame space (3 recessive bits) frame identifier R T R data length 0 - 8 data bytes Control field CRC Bus idle CRC 15 bits E R C S O F Length: 1 11 1 1 41 0 - 64 15 1 1 1 7 end of frame A C K A C D 3 R 0 Arbitration field Data field R 1 Acknowledge inter-frame space
  • 26. CAN 2.0B – Standard Data Frame Format  In fact the same like CAN 2.0A frame format  Only the formal difference  bit r1 name changed to IDE (identifier extended)  The IDE bit is always dominant in a standard data frame Arbitration field Data field S O F frame identifier 11 bits R T R Control field I D E R 0 data length Bus idle
  • 27. CAN 2.0B – Extended Data Frame Format  Allows higher number of frames in particular system  RTR bit is replaced by SRR bit (substitute remote request)  always recessive  IDE bit is always recessive  standard frame with the same first 11 bits of identifier has higher priority  Following 18 identifier bits are used for arbitration among extended frames only  CAN controllers provide either active or passive compatibility with CAN2.0B R 0 I D E S O F R 1 R T R S R R Data field R 0 I D E data length frame identifier 11 bits frame identifier 18 bits R 1 R T R S R R Arbitration field Control field Bus idle
  • 28. CAN 2.0A – RTR Frame Format  RTR bit is always recessive  RTR frame identifier is the same like the data frame identifier which transmission is requested  RTR frame has lower priority than the data frame with the same identifier  do you know WHY ???  Data length is always 0  Similarly it exists an extended RTR frame format according to the CAN 2.0B frame identifier R T R data length Control field CRC Bus idle CRC 15 bits E R C S O F Length: 1 11 1 1 41 15 1 1 1 7 end of frame A C K A C D 3 R 0 Arbitration field R 1 Acknowledge field inter-frame space
  • 29. CAN – Error Frame Format  Error frame consists of six dominant or recessive bits  it depends on error state of the node which transmits it  It is transmitted by the node (-s) that detect (-s) any communication error  it result in an immediate transmission stop and its later repetition  this is all controlled by the controller (implemented in silicon), not by application software Error flag Superpozition of error flags Data frame or error delimiter or overload delimiter Error frame Error delimiter Inter-frame space or overload frame
  • 30. CAN – Overload Frame Format  Overload frame consists of six dominant bits  Its transmission is requested by the receiver in order to  delay the transmission of a next data frame  indicate a detection of a dominant value in a last bit of the end of frame field or in first two bits of inter-frame space  Its occurrence does not mean an error  previous frame is not retransmitted  Today controllers do not use it to delay the next transmission – they are fast enough Overload flag Superpozition of overload flags Overload frame Overload frame delimiter Inter-frame space or overload frame Data frame or error delimiter or overload delimiter
  • 31. CAN – Error Detection Several simultaneously used mechanisms:  Monitoring  transmitter receives back the bus state and if it detects a different value, its behavior is:  in case it detects a dominant bus state within the arbitration field while transmitting the recessive one, it stops transmitting  in case it detects a recessive bus state within the arbitration field while transmitting the dominant one, or if it detects anywhere else (excluding the ACK bit) opposite bus state than that one it is currently transmitting, it sends the error frame  CRC (Cyclic Redundancy Check)  in case the locally evaluated CRC is different from the received one, the error frame is transmitted
  • 32. CAN – Error Detection  Bit stuffing  transmitter transmits particular bits using NRZ (not return to zero) coding  if there is a sequence of 5 consecutive bits of the same level, one bit of the opposite level is inserted  during the reception an inverse process takes place, it means after five received bits of the same level the next bit must be of the opposite level (check) and it is known it is an inserted bit – it is thus removed
  • 33. CAN – Bit Stuffing  Error frame transmission violates bit stuffing rule  all nodes thus detect the error  it is thus ensured that the frame is received either by all nodes or by no node  data consistency
  • 34. CAN – Error Detection  Frame format check  some bits have predefined level  CRC or ACK delimiters are always recessive  end of frame field is whole recessive  if there is a dominant bit detected, an error frame is sent  data length field can contain value higher than 8  length of 8 is expected  error frame is not sent  Frame receive acknowledge  by the dominant level in the ACK bit  if there is no acknowledge, transmitting node sends an error frame  data frame transmission is repeated
  • 35. CAN – Node Error States  One node encountering communication problems could block complete communication within the system  it detects an error in each received frame and transmits an error frame  it is necessary to limit this possibility  There are two so called error counters in each CAN controller (and thus in each network node)  one for errors during transmission, one during reception  at the beginning they are reset  if there is an error during transmission, transmission error counter value is increased, the same is tru for reception  If the transmission or reception have passed without error, the respective value is decremented (up to zero)  According to the error counters values particular node is in one of three error states
  • 36. CAN – Node Error States  Error active  value of each of both error counters has to be lower than 128  in case the error is detected during the frame transmission or reception, an active error flag (6 consecutive dominant bits) is generated  it breaks communication and all other nodes within the system detect error as well  the number the respective error counter is increased (0, 1 or 8) depends on the error context, it means the situation and conditions of error detection  if any of error counters reaches the value higher than 127, the respective node goes into the error passive state
  • 37. CAN – Node Error States  Error passive  the value of at least one error counter is higher than 127  if the node detects communication error, it generates a passive error flag (6 consecutive recessive bits)  if the error passive node is the only one who detects error (probably incorrectly), the communication is not broken and can be finished and acknowledged by other nodes  in case of successful reception the respective counter is either decremented (if its value was lower than 128) or set between 119 and 127 (if its value was higher 127)  if the values of both counters fall under 128, the node goes back to error active state  if the value of transmission error counter gets over 255, the controller enters bus-off state
  • 38. CAN – Node Error States  Bus-off state  transmission error counter value is higher than 255  reception error counter value has no influence on entering into the bus-off state  bus-off node is completely disconnected from the network (logical not physical disconnect)  it is not possible to transmit frames nor to influence the bus communication by any way (no ACK, error frame..)  reception is possible (depends on implementation)  from the point of view of other nodes the bus-off node disappears from the network (like switched off)  to leave the bus-off state only the controller hardware or software reset is available  then after the detection of 128 recessive 11-bit sequences the controller enters an error active state  incorrect software implementation can make global problems in communication
  • 39. CAN – Error States Servicing CAN controller Status register usually contains:  Error warning flag  set if any error counter reaches some limit  usually 96  sometimes this limit can be preset  controller can generate an interrupt service request  application software (node firmware) may or may not service this event  Error passive flag  set by entering the error passive state  interrupt service request possible  Application software should také into account possible data inconsistency within the local node and the rest of a network  Bus-off flag  controller reinitialization is necessary
  • 40. CAN – Persisting communication problems  It always depends on the error type, direction of communication (reception, transmission) where it takes place as well as the physical layer protocol version  e.g. tolerance to some shorts  Fatal errors (e.g. Short connection of both CAN lines to ground) always finishes in bus-off state  only in case the node tries to transmits  The node which is alone in the network (or disconnected by cable interrupt), enters after 16 unacknowledged frame transmissions into an error passive state  If the software service of error states is not correctly implemented, serious communication problems may occur  Under the standard conditions all nodes within the system are in the error active state and there are no error frames generated
  • 41. CAN – Physical Layer Standards  CAN standard (Bosch) defines the link layer protocol only  It is also standardized by ISO as ISO11898-1  Physical layers are defined in standards ISO11898-2  high-speed CAN  up to 1 Mbit/s  and ISO11898-3  low-speed CAN  up to 125 kbit/s  particular fault tolerance  Both these physical standards are widely used in today vehicles  For trucks there are othe standards available with higher degree of immunity  They are all defined as SAE standards too
  • 42. CAN – ISO11898-2 Physical Layer  Bus structure with terminators  Line impedance of 120 ohm  Communication speed up to 1 Mbit/s  Differential signaling (logical level defined by voltage difference)  CAN_H and CAN_L lines
  • 43. CAN – ISO11898-2 Physical Layer  The recessive level is provided by terminators and „wake“ voltage sources in transceivers  CAN_H – CAN_L difference is near 0  The dominant state is driven by the transceiver  CAN_H – CAN_L difference is about 2 volts
  • 44. CAN – ISO11898-2 Physical Layer  The transceiver contains the temperature, short circuit and ESD protection  Low load in power off state  Some offer low power states
  • 45. CAN – ISO11898-3 Physical Layer  Bus structure  Sleep mode with remote wake-up by CAN communication  Communication speed up to 125 kbit/s  Differential signaling
  • 46. CAN – ISO11898-3 Physical Layer  Particular fault tolerance, transceiver enters so called single wire mode  CAN_H or CAN_L wire broken  short connection of CAN_H or CAN_L to ground  short connection of CAN_H or CAN_L to +5V  short connection of CAN_H or CAN_L to +12V  short connection of CAN_H to CAN_L  Single wire mode is indicated by the transceiver output  after the fault is removed transceiver automatically enters standard two wire mode
  • 47. CAN – ISO11898-3 Physical Layer  RTH and RTL resistors provide termination  their values depend on number of nodes in system  Transceiver supports node wake-up when the CAN activity is examined, or by he local signal  Sleep mode is controlled by the local microprocessor  if the whole bus is in sleep (low power) mode, CAN_H voltage is near 0 and CAN_L voltage is near the battery one
  • 48. CAN – Immunity to External Disturbances  Information is transferred by the voltage difference  if both wires are close the induced disturbance is the same, difference stays the same  the absolute value of the induced disturbance can be further decrease with utilization of twisted pair wire
  • 49. CAN – Transmission Timing  všechny uzly v síti musí mít nastavenu shodnou nominální přenosovou rychlost  skutečné rychlosti se mírně liší (tolerance oscilátorů)  vzhledem k faktu, že v průběhu arbitráže může vysílat více uzlů najednou, že arbitráž probíhá bit po bitu a že šíření informace z jednoho uzlu do druhého je zatíženo zpožděním (budič – vedení – přijímač), je třeba:  kompenzace statických zpoždění  průběžné synchronizace  kvůli odchylkám oscilátorů