0% found this document useful (0 votes)
9 views88 pages

Local Interconnect Network: Course: Automotive Electronics Faculties In-Charge: Nalini C Iyer

The document outlines the Automotive Electronics course, focusing on the Local Interconnect Network (LIN) protocol, its architecture, communication methods, and message structures. It highlights the advantages of LIN over CAN, including cost-effectiveness, single-master/multiple-slave configurations, and predictable latency. Additionally, it details various frame types, error handling, and checksum calculations relevant to LIN communication.

Uploaded by

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

Local Interconnect Network: Course: Automotive Electronics Faculties In-Charge: Nalini C Iyer

The document outlines the Automotive Electronics course, focusing on the Local Interconnect Network (LIN) protocol, its architecture, communication methods, and message structures. It highlights the advantages of LIN over CAN, including cost-effectiveness, single-master/multiple-slave configurations, and predictable latency. Additionally, it details various frame types, error handling, and checksum calculations relevant to LIN communication.

Uploaded by

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

Course: Automotive Electronics

Faculties In-charge: Nalini C Iyer Slave Slave

Master
Local Interconnect Network

* Slave Slave Slave


Course: Automotive Electronics

Course: Automotive Electronics


Faculties In-charge: Nalini C Iyer
Slave Slave
Faculties In-charge: Nalini C Iyer
Slave Slave

Master Local Interconnect Network


Master

*
Slave Slave Slave
LIN Agenda?

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

* School of ECE 3
Why LIN?

* School of ECE 4
What are the limitations of CAN?
• Maximum 8 bytes of data can be sent
• Speed is limited by 1mbps
• No redundant channel available
• Latency time
• Costly
• No peer-peer communication
• Overhead bits are more
• No master to control the BUS
1

Overhead bits

* School of ECE 6
2

Two wires

* School of ECE 7
3

Every time Arbitration

* School of ECE 8
4

No one to control the BUS

* School of ECE 9
5

Costly

* School of ECE 10
6

Latency time

* School of ECE 11
7

Separate controller is required

* School of ECE 12
LIN Consortium

BM
W

Daiml
LIN Volv
er-
o
Chrysl Spec
er

VW AUD
I
VCT
What are the features of LIN?

* School of ECE 14
– Low cost single-wire implementation (enhanced ISO 9141)
– Speed up to 20Kbit/s (limited for EMI-reasons)
– Single Master / Multiple Slave Concept
– No arbitration necessary
– Low cost silicon implementation based on common UART/SCI
interface hardware
– Almost any Microcontroller has necessary hardware on chip
– Self synchronization without crystal or ceramics resonator in the
slave nodes
– Significant cost reduction of hardware platform
– Guaranteed latency times for signal transmission (Predictability)
– Identifier denotes message content, not physical address
Low cost single-wire implementation

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

* School of ECE 16
Speed up to 20kbps

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

* School of ECE 17
– Single Master / Multiple Slave Concept

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

* School of ECE 18
– No arbitration necessary

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

* School of ECE 19
– based on common UART/SCI interface hardware

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

* School of ECE 20
– Almost any Microcontroller has necessary hardware on chip

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

* School of ECE 21
– Self synchronization without crystal or ceramics resonator in the slave nodes

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

* School of ECE 22
– Guaranteed latency times for signal transmission (Predictability)

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

* School of ECE 23
– Identifier denotes message content, not physical address

Slave Slave

Master
Local Interconnect Network

Slave Slave Slave

* School of ECE 24
How was the communication
before LIN?

* School of ECE 25
Conventional v/s LIN

* School of ECE 26
* School of ECE 27
* School of ECE 28
* School of ECE 29
* School of ECE 30
Unconditional
FRAME TYPES frame
Unconditional frames always carry signals and their identifiers are in the range 0 to 59(0x3b).
Event triggered frame
The purpose of an event triggered frame is to increase the responsitivity of the LIN
cluster without assigning too much of the bus bandwidth to the polling of multiple slave
nodes with seldom occurring events

Sporadic frame
The purpose of sporadic frames is to blend some dynamic behavior into the deterministic and real-
time focused schedule table without loosing the determinism in the rest of the schedule table.
Diagnostic frames
Diagnostic frames always carry diagnostic or configuration data and they always contain
eight data bytes. The identifier is either 60 (0x3c), called master request frame, or
61 (0x3d), called slave response frame
User-defined frames
User-defined frames carry any kind of information. Their identifier is 62 (0x3e). The header of a
user-defined frame is always transmitted when a frame slot allocated to the frame is processed.
Reserved frames
Reserved frames shall not be used in a LIN 2.0 cluster. Their identifier is 63 (0x3f).
* School of ECE 32
* School of ECE 33
0x10

0x10

* School of ECE 34
Automotive Body Network

LIN Sub Bus


W. Specks, H.-C. Wense
Typical LIN Applications
Roof: Steering Wheel:
(high amount of wiring) (very many controls are going to
be positioned on the steering
Rain Sensor, Light wheel)
Sensor, Light Control, Cruise Control, Wiper,
Sun Roof … Turning Light, …
(Rain Sensor needs to Optional: Climate Control,
be interrogated every Seat:Telephone, etc.
Radio,
10-20ms) many Seat Position
• Door/window/ Motors,
Occupancy Sensor,
seat: Control Panel
Mirror,Central ECU,
Climate:
many Small
Mirror, Switch,
Motors
Window Lift,
Control Panel
Seat Control
Switch,
Door Lock, etc.
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.
• serves as a reference with it’s clock base (stable clock necessary)
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
Data Transmission

13 bit
Brea Next 13 bit break
$5
k 5
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 Communication - Data from Slave
to Master
Master Node identifier synch field synch break Slave Node
LIN Master Slave Task
Task Rec
quartz

Slave Task Slave Task


Rec 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
• Multicast messages
• Baud rate synchronization through protocol
• Power saving sleep mode
LIN Communication - Data from
Master to Slave(s)
Master Node Slave Node A
LIN Master Slave Task
Task Rec
quartz

Slave Task Slave Task


Rec 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 Slave Task
Task Rec
quartz

Slave Task Slave Task


Rec 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

Synchronisati
Identifier byte
on
frame
Synchronisation Message
field
LIN Physical Interface
Electronic Control Unit Bus Voltage

VBAT
8...18V recessive
master: 1kΩ logic ‘1’
slave: 60%
R 30kΩ controlled slope
UART x Bu 40% ~2V/µs
Tx s dominant
logic ‘0’
GN
Time
Example capacitances D
master: 2.2nF Note:
slave: 220pF The LIN specification refers to the ECU connector voltages !
* School of ECE 57
* School of ECE 58
* School of ECE 59
* School of ECE 60
How PID is calculated?

* School of ECE 61
* School of ECE 62
How checksum is calculated?
1. Classic method
2. Enhanced method

With the classic checksum, only the useful data is protected. 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.

* School of ECE 63
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)

* School of ECE 64
Classical Method?
1. Classic method
2. Enhanced method

With the classic checksum, only the useful data is protected. 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.

* School of ECE 65
* School of ECE 66
Enhannced
Method

* School of ECE 67
* School of ECE 68
* School of ECE 69
* School of ECE 70
* School of ECE 71
* School of ECE 72
* School of ECE 73
Types of frame formats
• Unconditional frame

* School of ECE 74
• The Standard Frame
• Unique Response
• No Collisions

* School of ECE 75
* School of ECE 76
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.
* School of ECE 77
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.
* School of ECE 78
diagnostic frame
• The protocol defines two diagnostic frames: the
master request frame and the slave response frame.
• They are defined based on the ISO 15765-2
transport and on uniform diagnostic services (UDS)
in accordance with ISO 14229.
• 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.
* School of ECE 79
Error Detection & Handling

* School of ECE 80
* School of ECE 81
* School of ECE 82
* School of ECE 83
* School of ECE 84
* School of ECE 85
* School of ECE 86
* School of ECE 87
* School of ECE 88

You might also like