0% found this document useful (0 votes)
85 views

Chapter-V Automotive Communication Protocols (1)

The document provides an overview of automotive communication protocols, focusing on the characteristics, constraints, and various networks used in vehicles. It covers the Controller Area Network (CAN) and FlexRay, detailing their structures, functionalities, and comparisons. Key topics include event-triggered vs. time-triggered communication, data frames, and the importance of effective communication in reducing costs and complexity in automotive systems.

Uploaded by

sanjanashiv04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views

Chapter-V Automotive Communication Protocols (1)

The document provides an overview of automotive communication protocols, focusing on the characteristics, constraints, and various networks used in vehicles. It covers the Controller Area Network (CAN) and FlexRay, detailing their structures, functionalities, and comparisons. Key topics include event-triggered vs. time-triggered communication, data frames, and the importance of effective communication in reducing costs and complexity in automotive systems.

Uploaded by

sanjanashiv04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 251

Automotive Communication

Protocols

1
4/13/20 School of ECE-Automotive Electronics
Automotive Communication Protocols

4/13/20 School of ECE-Automotive Electronics

2
Automotive Communication Protocols

Agenda
1.Introduction-
• Characteristics and Constraints,
• Different Networks for different Requirements,
• Event Triggered Vs Time Triggered

2.Controller Area Network


• Data Frame,
• Data Protection,
• Arbitration,
• Message filtering
3.FlexRay-
• FlexRay Node,
• FlexRay Controller,
• Frame format
• Cycle and Synchronisation
4.CAN and FlexRay Comparison

3
4/13/20 School of ECE-Automotive Electronics
Introduction

❖What is communication ? Why there is need for communication in a vehicle

• Communication is exchange of information or data.


• To reduce the cost.
• To reduce size.
• To reduce the complexity.
• To improve the performance.

4
Automotive Communication Protocols
Characteristics and Constraints

• From Point-to Point to Multiplexed Communication

• Car Domains and their Evolution

• Different Networks for Different Requirements

• Event Triggered Vs Time Triggered

5
Automotive Communication Protocols
Characteristics and Constraints

• From Point-to Point to Multiplexed Communication

• Car Domains and their Evolution

• Different Networks for Different Requirements

• Event Triggered Vs Time Triggered

6
7
Characteristics and Constraints

• From Point-to Point to Multiplexed Communication

• Car Domains and their Evolution

• Different Networks for Different Requirements

• Event Triggered Vs Time Triggered

8
9
10
Characteristics and Constraints

• From Point-to Point to Multiplexed Communication

• Car Domains and their Evolution

• Different Networks for Different Requirements

• Event Triggered Vs Time Triggered

11
12
Characteristics and Constraints

• From Point-to Point to Multiplexed Communication

• Car Domains and their Evolution

• Different Networks for Different Requirements

• Event Triggered Vs Time Triggered


 Event-driven method
 Any ECU can access an available bus at any time
 It is possible to control message traffic by assigning priorities
 Synchronization to sender

 Time-synchronous method
 Sending process is executed in cyclic time windows
 Time windows are allocated to the individual ECUs
 Synchronization to global clock
 global cycle

13
CAN (Controller Area Network) Fundamentals

14
15
CAN Agenda
▪ What is CAN ?

▪ Why CAN ?

▪ CAN Protocol

▪ CAN Layers

▪ CAN Applications

▪ CAN programming
Before CAN

16
4/8/20
With CAN

17
4/8/20
What is CAN?

▪ Controller Area Network


✓ Invented by Robert Bosch GmbH in 1980 for automotive applications
✓ Asynchronous Serial Bus
✓ Simple 2-wire differential bus
✓ Absence of node addressing
• Message identifier specifies contents and priority
• Lowest message identifier has highest priority
✓ Non-destructive arbitration system by CSMA with collision detection
✓ Multi-master / Broadcasting concept
✓ Sophisticated error detection & handling system

18
4/8/20
Why CAN?
▪ Mature Standard
✓ CAN protocol more than 16 years
✓ Numerous CAN products and tools on the market
▪ Hardware implementation of the protocol
✓ Combination of error handling and fault confinement with
high transmission speed (up to 1Mb/s)
▪ Simple Transmission Medium
✓ Twisted pair of wires is the standard, but also just one wire
will work
✓ Other links works too- Opto or radio links
▪ Excellent Error Handling
✓ CRC error detection mechanism
▪ Fault Confinement
✓ Built-in feature to prevent faulty node to block system
▪ Most used protocol in industrial and automotive world

19
4/8/20
20
Standard & Implementation

Reference model CAN Standards Implementation

2 LLC
Data Link CAN CAN
Layer MAC ISO 11898-1
Protocol Controller
PLS
1
Physical PMA CAN ISO 11898-2
Layer CAN Transceiver
MDI Physical Layer ISO 11898-3

 ISO 11898-1: CAN Protocol (Event triggered)

 ISO 11898-2: High-Speed Physical Layer (up to 1 MBaud)

 ISO 11898-3: Low-Speed Physical Layer (up to 125 KBaud)

21
Agenda
Standard & Implementation 3

> Physical Layer 5

Communication 12

Bus Access 15

Data Frame 20

Data Protection 32

Bit Timing & Synchronization 38

Miscellaneous 43

22
Physical Layer
High-Speed Physical Layer – Physical Signal Transmission

logical 1

logical 0

3,5 Volt
CAN_H

2,5 Volt

CAN_L
1,5 Volt

„one“ „zero“ „one“ t

23
Physical Layer
High-Speed Physical Layer – CAN Message

Logic “1” (recessive)


Voltage in V Logic “0” (dominant)
CAN_H
~ 3.5 V

~ 2.5 V

~ 1.5 V

CAN_L

CAN message

24
Physical Layer
High-Speed Physical Layer – Topology

HOST

Controller

Transceiver

CAN_H CAN_L

CAN CAN CAN


node node node

CAN_H
RT RT
CAN_L

25
Agenda
Standard & Implementation 3

Physical Layer 5

> Communication 12

Bus Access 15

Data Frame 20

Data Protection 32

Bit Timing & Synchronization 38

Miscellaneous 43

26
Communication
Architecture

CAN Node CAN Node


Event
Host Host

Filter
CAN Controller CAN Controller

CAN-
CAN Node CAN Node
CAN Node CAN Node
CAN Transceiver CANKnoten
Transceiver
Filter Filter

ID Data
CAN Bus

Filter Filter CAN Message

CAN Node CAN Node


CAN Node CAN Node

27
Communication
Broadcasting

CAN node 1 CAN message Sending

CAN node 2 CAN message CAN message

CAN node 3 CAN message

CAN bus CAN message CAN message CAN message CAN message t

CAN node 1 CAN message CAN message CAN message

CAN node 2 CAN message CAN message

CAN node 3 CAN message CAN message


Receiving

28
Agenda
Standard & Implementation 3

Physical Layer 5

Communication 12

> Bus Access 15

Data Frame 20

Data Protection 32

Bit Timing & Synchronization 38

Miscellaneous 43

29
Bus Access

Bitwise Arbitration

IDID
1010 IDID
9 9 IDID
8 8 IDID
7 7 IDID
6 6 IDID
5 5 IDID
44 IDID
3 3 IDID
2 2 IDID
1 1 IDID
00

SS Arbitrationbuslogik
Wired-AND logic
CAN
CAN node
nodeAAA
CANnode OO
FF
11 11 00 00 11 00 00 11 11 00 00

Node A
Transmitter Node
Bus B Bus level
Interpretation

0
0 0
0 0
Continue
SS
CAN
Bus bus
Bus Idle
Idle OO 00
11 11 00 ? 1 0 0
0 0 1 1
1 1 0 Error
0 0
FF
1
1 0
0 0
Stop

1
1 1
1 1
Continue

SS
CAN
CAN node
nodeBBB
CANnode OO 11 11 00 11 00Stop
00 sending
00 11 11 00 00
FF 0 = dominant
IDID
1010 IDID
9 9 IDID
8 8 IDID
7 7 IDID
6 6 IDID
5 5 IDID
44 IDID
3 3 IDID
2 2 IDID
1 1 IDID
00

CAN node switches from


Send state to Receive state

30
Bus Access
Prioritization of CAN messages

 Priority is inversely proportional to the Identifier


 The Identifier comprises 11 bits ( 2048 Identifiers)
 The larger the Identifier, the lower the priority
> The CAN message with the smallest Identifier (ID=0) has the highest
priority
> The CAN message with the largest Identifier (ID=2047) has the
lowest priority

Priority
Low

High
0 2047 ID

31
Bus Access
Example

CAN node 1 CAN node 2 CAN node 3

CAN message CAN message CAN message

ID=75 Data ID=250 Data ID=1000 Data

CAN

CAN message

CAN node 1 ID=75 Data


CAN message

CAN node 2 ID=250 ID=250 Data


CAN message

CAN node 3 ID=1000 ID=1000 ID=1000 Data


ITM ITM

Bus ID=75 Data ID=250 Data ID=1000 Data


Arbitration Arbitration Arbitration
phase phase phase t

32
33
Bus Access
Exercise 1

Draw the message sequence on the CAN bus for the communication
scenario shown!

CAN-Knoten A 5 5

CAN-Knoten B 7

CAN-Knoten C 3 3

CAN-Knoten D 6 6

CAN-Bus 5

34
Agenda
Standard & Implementation 3

Physical Layer 5

Communication 12

Bus Access 15

> Data Frame 20

Data Protection 32

Bit Timing & Synchronization 38

Miscellaneous 43

35
Data Frame
Structure

Data frame

Bus S R I I D A D
- O Identifier T D r DLC Data Field Checksum E C E EOF ITM
Idle F R E E L K L

1 11 Bits 1 1 1 4 Bits 0-8 Byte 15 Bits 1 1 1 7 Bits 3

Arbitration field Control field Data field Check field ACK field

 SOF Start Of Frame  DLC Data Length Code

 RTR Remote Transmission Request  ACK Acknowledgement

 IDE Identifier Extension  EOF End Of Frame

36
Data Frame
SOF and Identifier

Data frame

Bus S R I I D A D
O Identifier T D r DLC Data field Checksum E C E EOF ITM
Idle F R E E L K L

1 11 Bits 1 1 1 4 Bits 0-8 Byte 15 Bits 1 1 1 7 Bits 3

Arbitration field Control field Data field Check field ACK field

 SOF - Start Of Frame: Start and synchronization sequence


> The transition from recessive to dominant bus state marks the beginning of a message
transmission and serves to produce synchronous relationships

 Identifier (ID)
> Address of the data frame ( relevant to receiving process)
> Priority of the data frame ( relevant to sending process)

37
Data Frame
RTR

Data frame

Bus S R I I D A D
O Identifier T D r DLC Data field Checksum E C E EOF ITM
Idle F R E E L K L

1 11 Bits 1 1 1 4 Bits 0-8 Byte 15 Bits 1 1 1 7 Bits 3

Arbitration field Control field Data field Check field ACK field

 RTR – Remote Transmission Request

> RTR = dominant: Data frame


Remote frame

> RTR = recessive: Remote frame R I


T
R E

No Data field
RTR=1

38
Data Frame
IDE

Data frame

Bus S R I I D A D
O Identifier T D r DLC Data field Checksum E C E EOF ITM
Idle F R E E L K L

1 11 Bits 1 1 1 4 Bits 0-8 Byte 15 Bits 1 1 1 7 Bits 3

Arbitration field Control field Data field Check field ACK field

 IDE - Identifier Extension

> IDE = dominant: Standard Identifier (11 bits)  Standard CAN Protocol

> IDE = recessive: Extended Identifier (29 bits)  Extended CAN Protocol

39
Data Frame

Standard and Extended CAN Protocol

IDE=0:
S R I
Standard format
O ID T D r0 DLC
11-bit identifier
F R E

IDE=1:
S S I R
Extended format
O Basis-ID R D Extended-ID T r1 r0
29-bit identifier
F R E R

SRR: Substitute Remote Request


Is sent in place of the RTR (recessive)

40
Data Frame
Standard Identifiers and Extended Identifiers

S S I
CAN node A
Extended format
O
F
1 1 0 0 1 0 0 1 1 0 0 R D 1 1 1 0 1 1 0 0 1 …
R E

S R I
CAN node B …
Standard format
O
F
1 1 0 1 0 0 0 1 1 0 0 T D r
0
DLC Data
R E

S S I
CAN node C
Extended format
O
F
1 1 0 1 0 0 0 1 1 0 0 R D 1 0 1 0 1 1 1 0 1 …
R E

41
Data Frame
DLC and Data field

Data frame

Bus S R I I D A D
O Identifier T D r DLC Data field Checksum E C E EOF ITM
Idle F R E E L K L

1 11 Bits 1 1 1 4 Bits 0-8 Byte 15 Bits 1 1 1 7 Bits 3

Arbitration field Control field Data field Check field ACK field

 DLC – Data Length Code  Data field

> Number of data bytes > Space for max. 8 data bytes

> Valid DLC: 0-8

> DLC 9-15 unspecified

42
Data Frame
Check field

Data frame

Bus S R I I D A D
O Identifier T D r DLC Data field Checksum E C E EOF ITM
Idle F R E E L K L

1 11 Bits 1 1 1 4 Bits 0-8 Byte 15 Bits 1 1 1 7 Bits 3

Arbitration field Control field Data field Check field ACK field

 Checksum and Checksum Delimiter


> Improves reliability of transmission (Hamming distance = 6)
> Sender calculates checksum (using special algorithm) based on bits to be transmitted, and
sends this checksum  Sender checksum
> Each receiver calculates checksum (using special algorithm) based on received bits  Receiver
checksum
> Each receiver compares the sender‘s checksum to the receiver‘s checksum
> Evaluation of the result (message transmission correct or incorrect)

43
Data Frame
Acknowledgement

Data frame

Bus S R I I D A D
O Identifier T D r DLC Data field Checksum E C E EOF ITM
Idle F R E E L K L

1 11 Bits 1 1 1 4 Bits 0-8 Byte 15 Bits 1 1 1 7 Bits 3

Arbitration field Control field Data field Check field ACK field

 Acknowledgement (ACK Slot, ACK Delimiter)


> Principle: Checking of the checksum
A D
C
> ACK Slot and ACK Delimiter are sent recessively K
E
L
> Correct transmission  Receiver acknowledges positively
> Corrupt transmission  Receiver acknowledges negatively A D
C E
K L

44
Data Frame
EOF

Data Frame

Bus S R I I D A D
O Identifier T D r DLC Data Field Checksum E C E EOF ITM
Idle F R E E L K L

1 11 bits 1 1 1 4 bits 0-8 bytes 15 bits 1 1 1 7 bits 3

Arbitration field Control field Data field Check field ACK field

 EOF – End Of Frame


> Marks the end of a data frame

 ITM – Intermission
> Pause time that a bus must be idle
11 recessive bits
> CAN nodes recognize that the CAN bus is idle
Bus idle
after detecting 11 recessive bits

45
46
47
48
Data Frame
Bit Stuffing

Data-Frame

Bus S R I I D A D
O Identifier T D r DLC Data-Field Checksum E C E EOF ITM
Idle F R E E L K L

Bitstuffing area

Transmitter 1 2 1 2 3 4 5 6 1 2 1 1 2 3 4 5 1 2

CAN-Bus 1 2 1 2 3 4 5 S 6 1 2 1 1 2 3 4 5 S 1 2

Receiver 1 2 1 2 3 4 5 6 1 2 1 1 2 3 4 5 1 2

49
Miscellaneous
Solution to Exercise 1

CAN node A 5 5

CAN node B 7

CAN node C 3 3

CAN node D 6 6

CAN bus 5 3 6 3 5 6 7

50
Agenda
> Standard & Implementation 3

Physical Layer 5

Communication 12

Bus Access 15

Data Frame 20

Data Protection 32

Bit Timing & Synchronization 38

Miscellaneous 43

51
What is CAN ?
▪ Controller Area Network
✓ Invented by Robert Bosch GmbH in 1980 for automotive
applications
✓ Asynchronous Serial Bus
✓ Simple 2-wire differential bus
✓ Absence of node addressing
• Message identifier specifies contents and priority
• Lowest message identifier has highest priority
✓ Non-destructive arbitration system by CSMA with collision
detection
✓ Multi-master / Broadcasting concept
✓ Sophisticated error detection & handling system

52
4/8/20
What is CAN ?
▪ The CAN is an ISO standard (ISO 11898) for serial communication
▪ Today CAN has gained widespread use:
✓ Industrial Automation
✓ Automotive, …etc.
▪ The CAN standard includes:
✓ Physical layer
✓ Data-link layer
• Some message types
• Arbitration rules for bus access
• Methods for fault detection and fault confinement

53
4/8/20
Why CAN ?
▪ Mature Standard
✓ CAN protocol more than 16 years
✓ Numerous CAN products and tools on the market
▪ Hardware implementation of the protocol
✓ Combination of error handling and fault confinement with high
transmission speed (up to 1Mb/s)
▪ Simple Transmission Medium
✓ Twisted pair of wires is the standard, but also just one wire will
work
✓ Other links works, too: Opto - or radio links
▪ Excellent Error Handling
✓ CRC error detection mechanism
▪ Fault Confinement
✓ Built-in feature to prevent faulty node to block system
▪ Most used protocol in industrial and automotive world
54
4/8/20
55
56
57
58
59
60
61
62
63
64
65
66
FlexRay Communication Protocol

67
FlexRay Communication Protocol

68
FlexRay Communication Protocol

69
FlexRay Communication Protocol

70
FlexRay Communication Protocol
3 Network Topology(Communication Architecture)
• A FlexRay Communication System- FlexRay Cluster, is made up of
FlexRay Nodes and Physical transmission medium-FlexRay Bus

71
FlexRay Communication Protocol
3 Network Topology(Communication Architecture):
Physical Topologies: Passive Topologies

72
FlexRay Communication Protocol
3 Network Topology(Communication Architecture):
Physical Topologies: Active Topologies

73
FlexRay Communication Protocol
3 Communication Architecture:
FlexRay Node

74
FlexRay Communication Protocol
3 Communication Architecture:

75
FlexRay Communication Protocol
3 Communication Architecture:

76
FlexRay Communication Protocol
3 Communication Architecture:

77
FlexRay Communication Protocol
3 Communication Architecture:

78
FlexRay Communication Protocol
3 Communication Architecture:

79
FlexRay Communication Protocol
3 Communication Architecture:

80
FlexRay Communication Protocol
3 Communication Architecture:

81
FlexRay Communication Protocol
3 Communication Architecture:

82
FlexRay Communication Protocol
3 Communication Architecture:

83
FlexRay Communication Protocol
3 Communication Architecture:

84
FlexRay Communication Protocol
3 Communication Architecture:

85
FlexRay Communication Protocol
3 Communication Architecture:

86
FlexRay Communication Protocol
3 Communication Architecture:

87
FlexRay Communication Protocol
3 Communication Architecture:

88
FlexRay Communication Protocol
3 Communication Architecture:

89
FlexRay Communication Protocol
3 Communication Architecture:

90
FlexRay Communication Protocol
3 Communication Architecture:

91
FlexRay Communication Protocol
3 Communication Architecture:

92
FlexRay Communication Protocol
3 Communication Architecture:

93
FlexRay Communication Protocol
3 Communication Architecture:

94
FlexRay Communication Protocol
3 Communication Architecture:

95
FlexRay Communication Protocol
3 Communication Architecture:

96
FlexRay Communication Protocol
3 Communication Architecture:

97
FlexRay Communication Protocol
3 Communication Architecture:

98
FlexRay Communication Protocol
3 Communication Architecture:

99
FlexRay Communication Protocol
3 Communication Architecture:

100
FlexRay Communication Protocol
3 Communication Architecture:

101
FlexRay Communication Protocol
3 Communication Architecture:

102
FlexRay Communication Protocol

Flexray Communication protocol highlights

• High data rates (up to 10 Mbit/s)

• Time- and event-triggered behavior

• 2 wire

• Differential voltage bus concept

• Fault-tolerance

103
FlexRay Communication Protocol

104
Thank you for your attention…….

105
FlexRay Communication Protocol

106
Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

04/06/2025
LIN Agenda?

1. Introduction
2. Network Architecture
3. Communication
4. Message Structure
5. Message Types
6. Data Protection

10
04/06/2025 School of ECE 8
Intra-Vehicle
CAN
Network LIN

Flexray KWP200 MOST


0
What are protocols used intra-vehicle
networking?
CAN
It is a serial asynchronous
CAN Max bit rate of 1mbps LIN
Multi-master
Two wire

Flexray KWP200 MOST


0
What are protocols used intra-vehicle
LIN
networking?
LIN for low cost and non safety
critical applications
CAN Max bit rate of 20kbps
LIN is a single master and multiple
LIN
slave
Single wire

Flexray KWP200 MOST


0
What are protocols used intra-vehicle
networking?
Flexray
Used for high performance
CAN applications
Max bit rate 10mbps
LIN
Time- and event-triggered

Flexray KWP200 MOST


0
What are protocols used intra-vehicle
networking?
MOST
CAN Used for media oriented applications LIN

Flexray KWP200 MOST


0
What are protocols used intra-vehicle
networking?
KWP2000
bidirectional serial communication
The data rate is between 1.2 and 10.4
CAN kbps
LIN
Reserved for diagnostic communication
Max 255bytes can be sent in a frame

Flexray KWP200 MOST


0
Why LIN?

11
04/06/2025 School of ECE 5
1

Overhead bits

11
04/06/2025 School of ECE 7
2

Two wires

11
04/06/2025 School of ECE 8
3

Every time Arbitration

11
04/06/2025 School of ECE 9
4

No one to control the


BUS

12
04/06/2025 School of ECE 0
5

Costly

12
04/06/2025 School of ECE 1
6

Latency time

12
04/06/2025 School of ECE 2
7

Separate controller is
required

12
04/06/2025 School of ECE 3
LIN Consortium

BMW

Daimler- LIN Volvo


Chrysler Spec

VW AUDI
VCT
Automotive Body Network
Mirror

Lock Lock
Window Lift
Universal Light
CAN Light

Seat
Htng
Instruments
Htng Wiper
Power Train Central WHtg
Body Ctrl Roof Interior
ITS Light
Htng Trunk
Climate
x6
Seat
Light Seat
Htng
St-Wheel Panel CAN

Universal Motor
Lock Lock
1 backbone, 13 nodes
8 subnets, 1-8 local nodes Sub-Bus
Universal Panel
52 nodes total
Mirror

LIN Sub Bus


W. Specks, H.-C. Wense
Typical LIN Applications
Steering Wheel:
Roof: (very many controls are going to be positioned
(high amount of wiring) on the steering wheel)
Rain Sensor, Light Cruise Control, Wiper,
Sensor, Light Control, Sun Turning Light, …
Roof … Optional: Climate Control,
(Rain Sensor needs to be Radio, Telephone, etc.
interrogated every 10-20ms) Seat:
many Seat Position
Motors,
•Door/window/seat: Occupancy Sensor,
Mirror,Central Control Panel
Climate:
ECU, many Small Motors
Mirror, Switch, Window Control Panel
Lift,
Seat Control Switch,
Door Lock, etc.
What are the features of LIN?

12
04/06/2025 School of ECE 7
Low cost single-wire implementation

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

12
04/06/2025 School of ECE 9
Speed up to 20kbps

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

13
04/06/2025 School of ECE 0
– Single Master / Multiple Slave Concept

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

13
04/06/2025 School of ECE 1
– No arbitration necessary

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

13
04/06/2025 School of ECE 2
– based on common UART/SCI interface hardware

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

13
04/06/2025 School of ECE 3
– Almost any Microcontroller has necessary hardware on chip

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

13
04/06/2025 School of ECE 4
– Self synchronization without crystal or ceramics resonator in the slave nodes

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

13
04/06/2025 School of ECE 5
Guaranteed latency times for signal transmission (Predictability)

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

13
04/06/2025 School of ECE 6
Identifier denotes message content, not physical address

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

13
04/06/2025 School of ECE 7
How was the communication
before LIN?

13
04/06/2025 School of ECE 8
Conventional v/s LIN

13
04/06/2025 School of ECE 9
LIN WORK FLOW

14
04/06/2025 School of ECE 0
14
04/06/2025 School of ECE 1
14
04/06/2025 School of ECE 2
Time triggered

14
04/06/2025 School of ECE 3
Master / Slave Protocol

» Master Task
– Determines order and priority of messages.
– Monitors Data and check byte and controls the error handler.
– Serves as a reference with its clock base (stable clock necessary)
– Receives Wake- Up Break from slave nodes

» Slave Task
– Is one of 2-16 members on the bus
– Receives or transmits data when an appropriate ID is sent by the
master.
– The node serving as a master can be slave, too!
Master / Slave Protocol
» Master
– has control over the whole Bus and Protocol
The master controls which message at what time is to be transferred
over the bus.
To accomplish this the master
• sends Sync Break
• sends Sync Byte
• sends ID-Field
• monitors Data Bytes and Check Byte, and evaluates them on
consistance
• receives WakeUp Break from slave nodes when the bus is inactive
and they request some action.
Master/Slave Protocol
» Slave
– Is one of 2-16 Members on the Bus and receives or transmits Data
when an appropriate ID is sent by the master.
• Slave snoops for ID.
• According to ID, slave determines what to do.
– either receive data
– or transmit data
– or do nothing.
• When transmitting the slave
– sends 1, 2, 4, or 8 Data Bytes
– sends Check-Byte
• The node serving as a master can be slave, too!
LIN protocol offers message timing predictability
Time Triggered Approach
» Message Length is known
– Number of transmitted data bytes is known
® minimum length can be calculated
– Each Message has length budget of 140% of it’s minimum length
® maximum allowed length is known
® distance between beginning of two messages
Message Frame
» Synch Byte:
– Specific Pattern for Determination of Time Base
(Determination of the time between two rising edges)
– A Synch Byte precedes any Message Frame
» ID-Field:
– Message Identifier: Incorporates Information about the sender, the
receiver(s), the purpose, and the Data field length.
Length 6 Bit.
4 classes of 1/2/4/8 Data Bytes. The length coding is in the
2 LSB of the ID-Field. Each class has 16 Identifiers. A total of 64
Message Identifiers are possible.
– 2 Parity Bits protect this highly sensitive ID-Field.
Identifier
» The identifier field is sent by the master node to all LIN nodes
» This identifier normally contains one of 64 different values and
includes 2 parity bits in the 8 bit data
» The identifier is normally associated with a collection of signals
that are subsequently transmitted on the LIN bus
» In a specific case this can initiate SLEEP mode in the LIN slave
nodes – in this case no further data is transmitted on the LIN bus
message header

synch break synch field identifier


 13 bit
LIN frame structure

15
04/06/2025 School of ECE 1
15
04/06/2025 School of ECE 2
0x10

0x10

0x10

15
04/06/2025 School of ECE 3
LIN Communication - Data from
Slave to Master

Master Node identifier synch field synch break Slave Node


LIN Master Task Slave Task Rec
quartz

Slave Task Rec Slave Task Trans


data byte data byte checksum
Slave Task Trans

• Single-master / multi-slave protocol


• Time triggered, no arbitration
• Identifier denotes message content, not physical address
• Baud rate synchronization through protocol
• Power saving sleep mode
LIN Communication - Data from
Master to Slave(s)

Master Node Slave Node A


LIN Master Task Slave Task Rec
quartz

Slave Task Rec Slave Task Trans

Slave Task Trans


Slave Node B
Slave Task Rec

Slave Task Trans


LIN Communication - Data from
Slave to Slave

Master Node Slave Node A


LIN Master Task Slave Task Rec
quartz

Slave Task Rec Slave Task Trans

Slave Task Trans


Slave Node B
Slave Task Rec

Slave Task Trans


LIN Message Frame

message header message response

synch break synch field identifier 0 to 8 data fields checksum


 13 bit

Synchronisation Identifier byte


frame
Synchronisation field Message
» Calculate nominal and maximum THeader
,TResponse and TFrame, for transmitting
four bytes of data.

» Calculate nominal and maximum


THeader ,TResponse and TFrame, if LIN is
operating at 10Kbps baud rate and
reserved time is set to 30% for transmitting
two bytes of data.
16
04/06/2025 School of ECE 4
16
04/06/2025 School of ECE 6
16
04/06/2025 School of ECE 7
16
04/06/2025 School of ECE 8
16
04/06/2025 School of ECE 9
How PID is calculated?

17
04/06/2025 School of ECE 0
17
04/06/2025 School of ECE 1
How checksum is calculated?
1. Classic method
2. Enhanced method

17
04/06/2025 School of ECE 2
Classical Method?
 Only the useful data is protected.
 To retain downward compatibility, diagnostic frames are always
protected with the classic checksum.
 Checksum = INV (data byte 1 ⊕ data byte 2 ⊕ ... ⊕ data byte 8)

17
04/06/2025 School of ECE 3
Enhanced Method?
With the enhanced checksum, the useful data and the PID are protected.
The enhanced checksum is used for identifiers 0 to 59, effective with
Version 2.0 of the protocol. To retain downward compatibility, diagnostic
frames are always protected with the classic checksum.

17
04/06/2025 School of ECE 4
17
04/06/2025 School of ECE 5
Enhannced
Method

17
04/06/2025 School of ECE 6
17
04/06/2025 School of ECE 7
17
04/06/2025 School of ECE 8
17
04/06/2025 School of ECE 9
18
04/06/2025 School of ECE 0
18
04/06/2025 School of ECE 1
18
04/06/2025 School of ECE 2
» https://docs.google.com/forms/d/e/
1FAIpQLSeWYvCMxY1WZ7iORqbtaegw1Ii
urpTW0aK81pGKtUkrMNyB4Q/viewform?
usp=sf_link

18
04/06/2025 School of ECE 3
Types of frame formats
» Unconditional frame

18
04/06/2025 School of ECE 4
» The Standard Frame
» Unique Response
» No Collisions

18
04/06/2025 School of ECE 5
18
04/06/2025 School of ECE 6
Event triggered frame
» This message type is used to transmit event-
driven information, which needs to be sent by a
node as necessary.
» Essentially, an event triggered frame is
equivalent to a standardized
Unconditional Frame.
» The difference is that multiple slaves may send a
response to a header from the master.

18
04/06/2025 School of ECE 7
Sporadic Frame
» The master uses sporadic frames to send rarely
used information, i.e. sporadic information.
» The master transmits sporadic frames as
needed. If there is no need to send them, the
related slot is empty.
» The sporadic frame is basically an
Event Triggered Frame for the master.

18
04/06/2025 School of ECE 8
diagnostic frame
» The protocol defines two diagnostic frames: the
master request frame and the slave response
frame.
» A master request frame is usually used as a
diagnostic request or to configure slaves. A slave
response frame is used as a diagnostic
response.

18
04/06/2025 School of ECE 9
Error Detection & Handling

19
04/06/2025 School of ECE 0
19
04/06/2025 School of ECE 1
19
04/06/2025 School of ECE 2
19
04/06/2025 School of ECE 3
19
04/06/2025 School of ECE 4
19
04/06/2025 School of ECE 5
19
04/06/2025 School of ECE 6
How was the Communication earlier?
Gyro Sensor
Gyro
sensor sensor
1
Sensor
radar radar
2
Sensor
IR IR
3
Wheel Sensor
Wheel
speed speed
4

ECU ECU
1 3

What is
communication ?
ECU ECU
2 4
Gyro Gyro
sensor sensor
radar radar

IR IR
Wheel Wheel
Gyro
sensor
Sensor
radar
2

ECU ECU
1 3

What is
communication ?
ECU ECU
2 4

radar

IR
Wheel
EMS
ECU
ABS ECU

BMS
ECU

What is
communication ?

Steering
control ECU
Suspension
AIR BAG
Network became simple

CAN
BUS
Complexity reduced

CAN
BUS
But what is the problem?
SPEED

CAN
BUS
Inter vehicular
not supported

CAN
BUS
Error handling But not critical
is good and for media
critical for some devices

CAN
BUS
What is MOST?
Media Oriented System
Transport
Who is MOST?

CAR makers

Setmaker System
s Architect

Suppliers

Together they define and adopt a common multimedia network protocol and
application object model.
» It is a collaborative development work
» Initially every was cautious about the other
partner.
» Because it was a partnership between
competitors‘
Collaborations?

Network Management

Physical Layer
Collaborations?

Nod
e
Application Requirements Nod
e

Network Management
Nod
Nod
e
e

Physical Layer
Nod
Nod e
e

Nod
e
Why MOST?
Why these devices need
networking?
CASE -1

Muting music system when phone call is


received
CASE -2

Sharing the same dashboard by multiple


media devices like radio, navigation,
cameras
CASE -3

Traffic information transmitted over radio for


the efficient navigation
CASE -4

Activating rearview camera when reverse


gear is applied.
Why do media-oriented devices
need networking protocol?
» For reliable and real time networking is
must for safety critical applications
» Information/infotainment applications
requires fast, short-delay networking with
continuous bandwidth
Features of MOST
» It is network for distribution of infotainment
within vehicle
» Maximum of 64 devices can be networked
» Sample rates of 44.1 or 48khz
» support of asynchronous and synchronous
data transfer
» support of multiple masters
» low overhead due to embedded network
management
Low Implementation Cost

» low cost channel to distribute control


information without extra wiring
» zero data overhead to move synchronous
data after a connection is established
» synchronous channels eliminate the need
for buffering and sample rate conversion
» suitable for embedding in consumer devices
and peripherals
» cost-effective electrical and optical solutions
» inexpensive silicon from many suppliers
Asynchronous: This is transmission at any time, with arbitrary
delay between transmission of any two successive data items.

Synchronous: This is continuous transmission with no


gaps between transmission of successive data items.

Isochronous: This is transmission at regular intervals with a fixed


gap between the transmission of successive data items.
THANK YOU

You might also like