SlideShare a Scribd company logo
Local interconnect
Main Features:
 Single master with multiple slaves concept.
 Self Synchronization.
 Single wire.
 Low baud rate.
 Low speed application (Less than 20kps).
 Max 40 m wire length
 The LIN is a SCI/UART-based serial
o The LIN protocol is byte oriented.
o data is sent one byte at a time.
o One byte field contains a start bit (dominant), 8 data bits and a stop bit
(recessive).
o The data bits are sent LSB first.
o In automotive application, the LIN bus is connected between
• smart sensor
• actuators
• Electronic Control Unit (ECU)
LIN characteristics :
o Broadcast type serial network.
o Single wire 12V bus connection.
o Has the synchronization mechanism that allows the clock
recovery by slave nodes.
o Only the master node will be using the oscillating device.
o Nodes can be added to the LIN network without requiring
HW/SW changes in other slave nodes.
LIN characteristics :
LIN History:
o In 1996, Volvo and Volcano Communication Technologies
(VCT) developed a UART based protocol for the Volvo S80
series, called Volcano Lite.
This protocol was an integral part of the vehicle communication system.
o In 1997, Motorola joined Volvo and VCT in improving the
Volcano Lite protocol .
• Self-synchronization of the slave
• Form an open standard
o In December 1998 , Audi, BMW,
DaimlerChrysler and VW joined
the activities and formed to set up
the LIN communication protocol.
o September , LIN API specification
draft was released (Rev. 0.1).
o In November 2002, LIN 1.3 was
released.
o The latest version LIN 2.0 released
in 2003.
Daimler-
Chrysler
AUDI
VW
Volvo
BMW
LIN
Spec
VCT
LIN History:
o The LIN bus is a single master device and multi slave devices.
o The master device contains both a master task and a slave task.
o Each slave device contains only a slave task.
o Communication over the LIN bus is controlled by master task.
Concept of Operation
0 to 8 data fields checksum
message response
synch break
 13 bit
synch field identifier
message header
Synchronisation
frame
Synchronisation field
Identifier byte
Message
LIN Message Frame
o The basic unit of transfer on the LIN bus is the frame.
o Divided into a header and a response.
synch break
 13 bit
synch field identifier
message header
Synchronisation
frame
Synchronisation field
Identifier
byte
LIN Message Frame
o Control over the whole Bus.
o Controls which message at what
time is to be transferred over the
bus.
o Send Header:
Sync Break, Sync Byte ,ID-Field.
Master Task:
synch break
 13 bit
synch field identifier
message header
Synchronisation
frame
Synchronisation field
Identifier
byte
LIN Message Frame
Master Task:
o Error handling.
• monitors Data Bytes and Check Byte,
and evaluates them on consistence
o Receives Wakeup Break from slave
nodes when the bus is inactive.
o Defines the transmission speed.
o Switching slave nodes to
sleep/wake up mode.
LIN Message Frame
0 to 8 data fields checksum
message response
Message
o One of 2-16 Members on the Bus.
o Receives or transmits Data when
appropriate ID is sent .
o Slave snoops for ID.
Slave Task:
LIN Message Frame
0 to 8 data fields checksum
message response
Message
Slave Task:
o According to ID, slave determines:
• receive data, transmit data ,do
nothing.
o When transmitting :
• sends 1, 2, 4, or 8 Data Bytes + Check-
Byte
o The node serving as a master can be
slave.
Master and Slave Communication
data byte data byte checksum
synch fieldidentifier synch break
Slave Node
Slave Task Trans
Slave Task Rec
Master Node
LIN Master Task
Slave Task Trans
Slave Task Rec
quartz
Master and Slave Communication
Master Node
LIN Master Task
Slave Task Trans
Slave Task Rec
quartz
Slave Node A
Slave Task Trans
Slave Task Rec
Slave Node B
Slave Task Trans
Slave Task Rec
Master and Slave Communication
Slave Node A
Slave Task Trans
Slave Task Rec
Slave Node B
Slave Task Trans
Slave Task Rec
Master Node
LIN Master Task
Slave Task Trans
Slave Task Rec
quartz
Master and Slave Communication
Structure of a Byte field:
o The LSB of the data is sent first and the MSB last.
o The start bit is encoded as a bit with value zero (dominant)
&the stop bit is encoded as a bit with value one (recessive).
Frame Structure
Frame Structure
Break
o The break symbol is used to signal the beginning of a new
frame.
o A break is always generated by the master task and it shall be
at least 13 bits of dominant value, including the start bit,
followed by a break delimiter
o Synch break ends with a “break delimiter” which should be at
least one recessive bit.
Synch Byte
o Synch is a byte field with the data value 0x55.
o A slave task shall always be able to detect the break/synch
symbol sequence.
o Synch byte is sent to decide the time between two falling edges
and thereby determine the transmission rate.
o The bit pattern is 0x55 (01010101, max number of edges).
Frame Structure
Frame Structure
Protected Identifier
1. Identifier:
o Six bits are reserved for the identifier (ID).
o Values in the range 0 to 63 can be used.
o The identifiers are split in four categories:
• Values 0 to 59 (0x3b) are used for signal•carrying frames.
• 60 (0x3c) and 61 (0x3d) are used to carry diagnostic data.
• 62 (0x3e) is reserved for user•defined extensions.
• 63 (0x3f) is reserved for future protocol enhancements.
Frame Structure
Protected Identifier
1. Identifier:
o Contains information about sender and receiver and the number of
bytes which is expected in the response.
Frame Structure
Protected Identifier
2. Parity:
o The parity is calculated on the identifier bits.
o P0 = ID0 .ID1 .ID2 .ID4
o P1 = •~(ID1 .ID3 .ID4 .ID5)
Frame Structure
Data
o A frame carries between one and eight bytes of data
o A data byte is transmitted in a byte field
o The data bytes field is transmitted by the slave task in the
response.
o Can be 2, 4 or 8 bytes long depending on the two MSB (Most
Significant Byte) of the identifier sent by the master.
o This ability came with LIN 2.0, older versions have a static
length of 8 bytes.
Frame Structure
Checksum:
o The LIN bus defines the use of one of two checksum
algorithms to calculate the value in the eight-bit checksum
field:
• Classic checksum is calculated by summing the data bytes
alone.(V1.3)
• Enhanced checksum is calculated by summing the data
bytes and the protected ID.(V2.0)
Frame Structure
LIN Bus Timing
tHeader_Nom = (NSync_Field + NSync_Byte + NPID_Byte) • tBit = 34 • tBit
tResponse_Nom = 10 • (NData + 1) • tBit
tFrame_Nom = tHeader_Nom + tResponse_Nom
LIN Bus Timing
o A time reserve of up to 40% is given for transmission of a LIN
message
tFrame_Max = tHeader_Max + tResponse_Max = 1.4 • tFrame_Nom
Schedule Table
o The master task (in the master node) transmits frame headers
based on a schedule table.
o The schedule table specifies the identifiers for each header and
the interval between the start of a frame and the start of the
following frame.
o The master application may use different schedule tables and
select among them.
Schedule Table
o The LIN Schedule is organized in Mini Slots
(tMini Slot = tTime-Base)
o An adequate number of Mini Slots must be
provided to guarantee transmission of a LIN
message
1.Unconditional Frame
o Characterized in that there is exactly one sender of the Message
Response.
Frame Types
2.Event-triggered frame
o Confirm the availability of an update to the value of a signal.
o Only slave nodes with updated signal values transmit
responses to the header.
o The transmission of responses by several slave nodes may lead
to a collision.
o When a collision occurs:
the master node sends requests for the confirmation of signal
values to all of the slave nodes via an unconditional frame.
Frame Types
2.Event-triggered frame
Frame Types
2.Event-triggered frame
Frame Types
o A typical use for the event triggered frame is to monitor the
door knobs in a four door central locking system.
• By using an event triggered frame to poll all four doors the
system shows good response times.
while still minimizing the bus load.
• In the rare occasion that multiple passengers press a knob
each
the system will not lose any of the pushes, but it will
take some additional time.
2.Event-triggered frame
A schedule table contains one event-triggered frame (ID=0x10).
Frame Types
3.Sporadic frames
o Used to inform all relevant slave nodes of the updating of a
signal value.
o Managed by the master node.
o Only the master node sends out a response to the header.
Frame Types
4.User-defined frames
o have an ID of 62.
o carry any type of information.
Frame Types
5.Diagnostic frames
o Eight data bytes in length
o Carry diagnostic or configuration data.
o Their IDs are :
• 60 for a master request frame.
• 61 for a slave response frame.
Frame Types
Frame Types
o The Diagnostic Schedule is used for diagnostics.
o It must contain two frame slots:
• The Master Request Frame (Diagnostic Request)
• LIN Master sends both the Message Header and the Message
Response.
• The Slave Response Frame (Diagnostic Response)
• LIN Master sends the Message Header, and a LIN Slave sends the
Message Response.
o The number of repeats depends on the diagnostic
implementation itself.
Diagnostic
o A diagnostic frame is called a PDU (Packet Data Unit) :
• Starts with a NAD :
 Addresses a certain node.
 The value ranges 1-127, 0 is reserved,128-255 are for free
usage.
• Follows a PCI (Protocol Control Information)
 Handles the flow control.
• A Service Identifier (SID) specifies the request and which
data bytes to follow.
Diagnostic
o If the PCI-type is a Single Frame (SF) the whole diagnostic
request command will fit into a single PDU.
Diagnostic
o If the PCI-type is First Frame (FF) the next byte (LEN) will
describe the number of bytes to come.
o The data bytes that do not fit into the first frame will be sent in
the following frames with the PCI-type of Continuation Frames
(CF).
Diagnostic
LIN Master sends both the Message Header and the Message Response.
Diagnostic
LIN Master sends the Message Header, and a LIN Slave sends the Message
Response.
Diagnostic
o Methods for diagnostics:
1. Signal based diagnostic.
2. User defined diagnostic.
3. Diagnostic transport layer.
Diagnostic
1. Signal based diagnostic:
o The simplest method and uses standard signals in ordinary frames
which represent:
 Low overhead in slave nodes.
 A standardized concept.
 Static with no flexibility.
2. User defined diagnostic:
o designed to fit the needs for a specific device.
o uses NADs in the range 128-255.
Diagnostic
Methods for diagnostics
3. Diagnostic transport layer:
o Useful for a LIN network which is built on a CAN-based
system where ISO diagnostics is used.
o NADs 1-127 are used.
o This method represents:
 Low load on the master device.
 Provides ISO diagnostics for LIN slaves.
 Intended for more complex and powerful LIN nodes.
Diagnostic
Methods for diagnostics
Physical properties
UART
Rx
Tx
master: 1k
slave: 30k
Bus
Example capacitances
master: 2.2nF
o The LIN-bus transceiver is a modified version of the transceiver
used by the ISO 9141 standard.
o The bus is bidirectional and connected to the node transceiver,
o Also via a termination resistor and a diode to Vbat .
Physical properties
o On the bus:
• Logical low level (0) is dominant
• Logical high level (1) is recessive.
o Voltage supply (Vsup) for an ECU should be between 7 V and
18 V.
VBAT
8...18V
GND
recessive
logic ‘1’
dominant
logic ‘0’
60%
40%
Bus Voltage
Time
controlled slope
~2V/µs
o Each LIN Slave monitors its operating state and creates a status
report.
o The status report is sent periodically to the LIN Master (LIN 2.0).
o Monitoring by error detection mechanisms
• Parity check
• Checksum
o LIN messages detected as corrupt are rejected
o Error handling is not part of the LIN specification and must be
defined separately
LIN Error Handling
LIN Power Management (V2.0)
o It contains "wake up" and "go-to sleep".
o All the slave nodes in an active LIN cluster can be changed
into sleep mode by:
 Sending a diagnostic master request frame with the first
data byte equal to zero.
 This special use of a diagnostic frame is called a go-to-
sleep-command.
o Slave nodes can automatically enter a sleep mode if the LIN
bus is inactive for more than 4 seconds.
o Any node in a sleeping LIN cluster can send a request for wake
up cluster.
o wakeup request is issued by forcing the bus dominant for 250 μs
to 5 ms.
o Every slave node can detect the wake-up request (a dominant
pulse longer than 150 ms) and be ready to listen to bus
commands within 100 ms, measured from the ending edge of
the dominant pulse.
LIN Power Management (V2.0)
o The master node can wake up .
o When the slave nodes are ready, start sending frame headers to
find out the cause of the wake up.
o If the master does not issue headers within 150 ms after
receiving the first wakeup request, then the slave requesting
wakeup may try issuing a second wakeup request (and waiting
for another 150 ms).
LIN Power Management (V2.0)
o If the master still does not respond, the slave issue the wakeup
request and wait 150 ms a third time.
o If there is still no response, the slave must wait for 1.5 seconds
before issuing a fourth wakeup request.
LIN Power Management (V2.0)
LIN Workflow
LIN Workflow
Software
Level
Hardware
Level
ToolsECU
(LIN relevant
functions only)
Operating System
Bus Transceiver
Application
Communication Manager
Vehicle Network
LIN API Specification
LIN Protocol Specification
LIN Physical Layer Spec.
LIN Config. Language
Signal Database
Manager (SDM/L)
Bus Analyzer
(LINSpector)
Network Configuration
Generator (LCFG)
LIN Physical Layer Spec.
LIN Config Language
LIN Conformance Test Specification
LIN Recommended Use of Messages and Identifiers
o The LIN bus connects a single master device (node) and one or
more slave devices (nodes) together in a LIN cluster.
o The behavior of each node is described by its own node
capability file(NCF).
o The node capability files are inputs to a system-defining tool
o It generates a LIN description file (LDF) that describes the
behavior of the entire cluster.
o The LDF is parsed by a system generator to automatically
generate the specified behavior in the desired nodes.
LIN Workflow
LIN Workflow
o A node interfaces to the physical
bus wire using a frame
transceiver.
o The frames are not accessed
directly by the application.
o A signal based interaction layer is
added in between.
o A diagnostic interface exist
between the application and the
frame handler, as depicted below.
References
www.vector.com
ESC automotive sessions
http://www.ixxat.com/introduction_lin_en.html
http://www.kvaser.com/zh/about-can/related-protocols-and-standards/46.html
http://www.eeherald.com/section/design-guide/esmod10.html

More Related Content

PPT
LIN protocol description
PDF
PPT
CAN (Controller Area Network) Bus Protocol
PDF
Multimeter basics
PPTX
Selective catalytic reduction (scr)
PPTX
UNIT TESTING PPT
PPTX
pptudsy.pptx
PPT
Controller area network (CAN bus) ppt
LIN protocol description
CAN (Controller Area Network) Bus Protocol
Multimeter basics
Selective catalytic reduction (scr)
UNIT TESTING PPT
pptudsy.pptx
Controller area network (CAN bus) ppt

What's hot (20)

PPTX
Controller Area Network(CAN)
PPTX
Controller area network -ppt
PPTX
Local Interconnect Network
PDF
Communication protocols - Embedded Systems
PPT
CAN- controlled area network
PDF
The Basics of Automotive Ethernet Webinar Slidedeck
PPTX
Ca npp t
PPTX
CAN Bus
ODP
Control Area Network
PPTX
AUTOSAR 403 CAN Stack
PPTX
Controller Area Network (Basic Level Presentation)
PPTX
Controller area network (can bus)
PPTX
PPTX
Communication stack
PPT
J1939 presentation by Simma Software
PPTX
Most Media Oriented System Transport
PPTX
Can Transport Protocol : UDS
PPTX
I2C Protocol
Controller Area Network(CAN)
Controller area network -ppt
Local Interconnect Network
Communication protocols - Embedded Systems
CAN- controlled area network
The Basics of Automotive Ethernet Webinar Slidedeck
Ca npp t
CAN Bus
Control Area Network
AUTOSAR 403 CAN Stack
Controller Area Network (Basic Level Presentation)
Controller area network (can bus)
Communication stack
J1939 presentation by Simma Software
Most Media Oriented System Transport
Can Transport Protocol : UDS
I2C Protocol
Ad

Viewers also liked (20)

PDF
Embedded Systems in Automotive
PPTX
Embedded Systems in Automobile
PPTX
Past simple tense
PPTX
Embedded system in automobile
PDF
Iso26262 component reuse_webinar
PPTX
EMBEDDED IN AUTOMOBILES
PPTX
Embedded system-in-automobile
PDF
Embedded System in Automobiles
PPTX
ppt on embedded system
PDF
Simple past tense: regular and irregular verbs
PPT
PAST SIMPLE POWER POINT
PPTX
Ppt on embedded systems
PDF
Regulamento concursoleituraconcelho ourem_aeco
PPTX
Kbox 101 1000 slide
PPTX
Montras com livros 2015
PDF
แบบโครงร่างโครงงานคอมพิวเตอร์
PDF
Montras com livros
PPTX
Bigalytics
PDF
สังคม
Embedded Systems in Automotive
Embedded Systems in Automobile
Past simple tense
Embedded system in automobile
Iso26262 component reuse_webinar
EMBEDDED IN AUTOMOBILES
Embedded system-in-automobile
Embedded System in Automobiles
ppt on embedded system
Simple past tense: regular and irregular verbs
PAST SIMPLE POWER POINT
Ppt on embedded systems
Regulamento concursoleituraconcelho ourem_aeco
Kbox 101 1000 slide
Montras com livros 2015
แบบโครงร่างโครงงานคอมพิวเตอร์
Montras com livros
Bigalytics
สังคม
Ad

Similar to Lin bus (20)

PDF
Automotive bus technologies
PDF
Can overview
PDF
SPI Design Report used in serial communication
PPTX
UNIT 2b.pptx
PPSX
Framing Protocols
PPTX
Different protocols for data communication networks
PDF
Digital logic-formula-notes-final-1
PPTX
7.MODBus and CANBus.pptx
PPTX
Computer Networks
PDF
One-Wire-Serial-Communication.pdf
PPTX
Can network development using arm cortex m3
PPTX
Can network development using arm cortex m3
PDF
Unit 4 data link layer
PPTX
Industrial Data Network-modbus-Protocol.pptx
PDF
64 bit sram memory: design paper
PPT
Real time-embedded-system-lec-06
PPTX
New framing-protocols
DOCX
Data link layer
PPTX
lec5_13.pptx
PPTX
Can bus
Automotive bus technologies
Can overview
SPI Design Report used in serial communication
UNIT 2b.pptx
Framing Protocols
Different protocols for data communication networks
Digital logic-formula-notes-final-1
7.MODBus and CANBus.pptx
Computer Networks
One-Wire-Serial-Communication.pdf
Can network development using arm cortex m3
Can network development using arm cortex m3
Unit 4 data link layer
Industrial Data Network-modbus-Protocol.pptx
64 bit sram memory: design paper
Real time-embedded-system-lec-06
New framing-protocols
Data link layer
lec5_13.pptx
Can bus

More from محمدعبد الحى (12)

PDF
Interfacing using ِAtmega16/32
PDF
MATLAB Programming
PDF
CPU Architecture
PDF
8 bit microcontroller
PDF
Matlab workshop
PDF
Micro controller

Recently uploaded (20)

PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PDF
Design Guidelines and solutions for Plastics parts
PPTX
Information Storage and Retrieval Techniques Unit III
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
PPT
Total quality management ppt for engineering students
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PPTX
Current and future trends in Computer Vision.pptx
PPTX
Module 8- Technological and Communication Skills.pptx
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
communication and presentation skills 01
PPTX
Artificial Intelligence
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PPT
Occupational Health and Safety Management System
PDF
Visual Aids for Exploratory Data Analysis.pdf
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
Design Guidelines and solutions for Plastics parts
Information Storage and Retrieval Techniques Unit III
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
Total quality management ppt for engineering students
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Current and future trends in Computer Vision.pptx
Module 8- Technological and Communication Skills.pptx
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
Automation-in-Manufacturing-Chapter-Introduction.pdf
communication and presentation skills 01
Artificial Intelligence
Fundamentals of safety and accident prevention -final (1).pptx
Occupational Health and Safety Management System
Visual Aids for Exploratory Data Analysis.pdf

Lin bus

  • 2. Main Features:  Single master with multiple slaves concept.  Self Synchronization.  Single wire.  Low baud rate.  Low speed application (Less than 20kps).  Max 40 m wire length  The LIN is a SCI/UART-based serial
  • 3. o The LIN protocol is byte oriented. o data is sent one byte at a time. o One byte field contains a start bit (dominant), 8 data bits and a stop bit (recessive). o The data bits are sent LSB first. o In automotive application, the LIN bus is connected between • smart sensor • actuators • Electronic Control Unit (ECU) LIN characteristics :
  • 4. o Broadcast type serial network. o Single wire 12V bus connection. o Has the synchronization mechanism that allows the clock recovery by slave nodes. o Only the master node will be using the oscillating device. o Nodes can be added to the LIN network without requiring HW/SW changes in other slave nodes. LIN characteristics :
  • 5. LIN History: o In 1996, Volvo and Volcano Communication Technologies (VCT) developed a UART based protocol for the Volvo S80 series, called Volcano Lite. This protocol was an integral part of the vehicle communication system. o In 1997, Motorola joined Volvo and VCT in improving the Volcano Lite protocol . • Self-synchronization of the slave • Form an open standard
  • 6. o In December 1998 , Audi, BMW, DaimlerChrysler and VW joined the activities and formed to set up the LIN communication protocol. o September , LIN API specification draft was released (Rev. 0.1). o In November 2002, LIN 1.3 was released. o The latest version LIN 2.0 released in 2003. Daimler- Chrysler AUDI VW Volvo BMW LIN Spec VCT LIN History:
  • 7. o The LIN bus is a single master device and multi slave devices. o The master device contains both a master task and a slave task. o Each slave device contains only a slave task. o Communication over the LIN bus is controlled by master task. Concept of Operation
  • 8. 0 to 8 data fields checksum message response synch break  13 bit synch field identifier message header Synchronisation frame Synchronisation field Identifier byte Message LIN Message Frame o The basic unit of transfer on the LIN bus is the frame. o Divided into a header and a response.
  • 9. synch break  13 bit synch field identifier message header Synchronisation frame Synchronisation field Identifier byte LIN Message Frame o Control over the whole Bus. o Controls which message at what time is to be transferred over the bus. o Send Header: Sync Break, Sync Byte ,ID-Field. Master Task:
  • 10. synch break  13 bit synch field identifier message header Synchronisation frame Synchronisation field Identifier byte LIN Message Frame Master Task: o Error handling. • monitors Data Bytes and Check Byte, and evaluates them on consistence o Receives Wakeup Break from slave nodes when the bus is inactive. o Defines the transmission speed. o Switching slave nodes to sleep/wake up mode.
  • 11. LIN Message Frame 0 to 8 data fields checksum message response Message o One of 2-16 Members on the Bus. o Receives or transmits Data when appropriate ID is sent . o Slave snoops for ID. Slave Task:
  • 12. LIN Message Frame 0 to 8 data fields checksum message response Message Slave Task: o According to ID, slave determines: • receive data, transmit data ,do nothing. o When transmitting : • sends 1, 2, 4, or 8 Data Bytes + Check- Byte o The node serving as a master can be slave.
  • 13. Master and Slave Communication
  • 14. data byte data byte checksum synch fieldidentifier synch break Slave Node Slave Task Trans Slave Task Rec Master Node LIN Master Task Slave Task Trans Slave Task Rec quartz Master and Slave Communication
  • 15. Master Node LIN Master Task Slave Task Trans Slave Task Rec quartz Slave Node A Slave Task Trans Slave Task Rec Slave Node B Slave Task Trans Slave Task Rec Master and Slave Communication
  • 16. Slave Node A Slave Task Trans Slave Task Rec Slave Node B Slave Task Trans Slave Task Rec Master Node LIN Master Task Slave Task Trans Slave Task Rec quartz Master and Slave Communication
  • 17. Structure of a Byte field: o The LSB of the data is sent first and the MSB last. o The start bit is encoded as a bit with value zero (dominant) &the stop bit is encoded as a bit with value one (recessive). Frame Structure
  • 18. Frame Structure Break o The break symbol is used to signal the beginning of a new frame. o A break is always generated by the master task and it shall be at least 13 bits of dominant value, including the start bit, followed by a break delimiter o Synch break ends with a “break delimiter” which should be at least one recessive bit.
  • 19. Synch Byte o Synch is a byte field with the data value 0x55. o A slave task shall always be able to detect the break/synch symbol sequence. o Synch byte is sent to decide the time between two falling edges and thereby determine the transmission rate. o The bit pattern is 0x55 (01010101, max number of edges). Frame Structure
  • 20. Frame Structure Protected Identifier 1. Identifier: o Six bits are reserved for the identifier (ID). o Values in the range 0 to 63 can be used. o The identifiers are split in four categories: • Values 0 to 59 (0x3b) are used for signal•carrying frames. • 60 (0x3c) and 61 (0x3d) are used to carry diagnostic data. • 62 (0x3e) is reserved for user•defined extensions. • 63 (0x3f) is reserved for future protocol enhancements.
  • 21. Frame Structure Protected Identifier 1. Identifier: o Contains information about sender and receiver and the number of bytes which is expected in the response.
  • 22. Frame Structure Protected Identifier 2. Parity: o The parity is calculated on the identifier bits. o P0 = ID0 .ID1 .ID2 .ID4 o P1 = •~(ID1 .ID3 .ID4 .ID5)
  • 23. Frame Structure Data o A frame carries between one and eight bytes of data o A data byte is transmitted in a byte field o The data bytes field is transmitted by the slave task in the response. o Can be 2, 4 or 8 bytes long depending on the two MSB (Most Significant Byte) of the identifier sent by the master. o This ability came with LIN 2.0, older versions have a static length of 8 bytes.
  • 24. Frame Structure Checksum: o The LIN bus defines the use of one of two checksum algorithms to calculate the value in the eight-bit checksum field: • Classic checksum is calculated by summing the data bytes alone.(V1.3) • Enhanced checksum is calculated by summing the data bytes and the protected ID.(V2.0)
  • 25. Frame Structure LIN Bus Timing tHeader_Nom = (NSync_Field + NSync_Byte + NPID_Byte) • tBit = 34 • tBit tResponse_Nom = 10 • (NData + 1) • tBit tFrame_Nom = tHeader_Nom + tResponse_Nom
  • 26. LIN Bus Timing o A time reserve of up to 40% is given for transmission of a LIN message tFrame_Max = tHeader_Max + tResponse_Max = 1.4 • tFrame_Nom
  • 27. Schedule Table o The master task (in the master node) transmits frame headers based on a schedule table. o The schedule table specifies the identifiers for each header and the interval between the start of a frame and the start of the following frame. o The master application may use different schedule tables and select among them.
  • 28. Schedule Table o The LIN Schedule is organized in Mini Slots (tMini Slot = tTime-Base) o An adequate number of Mini Slots must be provided to guarantee transmission of a LIN message
  • 29. 1.Unconditional Frame o Characterized in that there is exactly one sender of the Message Response. Frame Types
  • 30. 2.Event-triggered frame o Confirm the availability of an update to the value of a signal. o Only slave nodes with updated signal values transmit responses to the header. o The transmission of responses by several slave nodes may lead to a collision. o When a collision occurs: the master node sends requests for the confirmation of signal values to all of the slave nodes via an unconditional frame. Frame Types
  • 32. 2.Event-triggered frame Frame Types o A typical use for the event triggered frame is to monitor the door knobs in a four door central locking system. • By using an event triggered frame to poll all four doors the system shows good response times. while still minimizing the bus load. • In the rare occasion that multiple passengers press a knob each the system will not lose any of the pushes, but it will take some additional time.
  • 33. 2.Event-triggered frame A schedule table contains one event-triggered frame (ID=0x10). Frame Types
  • 34. 3.Sporadic frames o Used to inform all relevant slave nodes of the updating of a signal value. o Managed by the master node. o Only the master node sends out a response to the header. Frame Types
  • 35. 4.User-defined frames o have an ID of 62. o carry any type of information. Frame Types
  • 36. 5.Diagnostic frames o Eight data bytes in length o Carry diagnostic or configuration data. o Their IDs are : • 60 for a master request frame. • 61 for a slave response frame. Frame Types
  • 38. o The Diagnostic Schedule is used for diagnostics. o It must contain two frame slots: • The Master Request Frame (Diagnostic Request) • LIN Master sends both the Message Header and the Message Response. • The Slave Response Frame (Diagnostic Response) • LIN Master sends the Message Header, and a LIN Slave sends the Message Response. o The number of repeats depends on the diagnostic implementation itself. Diagnostic
  • 39. o A diagnostic frame is called a PDU (Packet Data Unit) : • Starts with a NAD :  Addresses a certain node.  The value ranges 1-127, 0 is reserved,128-255 are for free usage. • Follows a PCI (Protocol Control Information)  Handles the flow control. • A Service Identifier (SID) specifies the request and which data bytes to follow. Diagnostic
  • 40. o If the PCI-type is a Single Frame (SF) the whole diagnostic request command will fit into a single PDU. Diagnostic
  • 41. o If the PCI-type is First Frame (FF) the next byte (LEN) will describe the number of bytes to come. o The data bytes that do not fit into the first frame will be sent in the following frames with the PCI-type of Continuation Frames (CF). Diagnostic
  • 42. LIN Master sends both the Message Header and the Message Response. Diagnostic
  • 43. LIN Master sends the Message Header, and a LIN Slave sends the Message Response. Diagnostic
  • 44. o Methods for diagnostics: 1. Signal based diagnostic. 2. User defined diagnostic. 3. Diagnostic transport layer. Diagnostic
  • 45. 1. Signal based diagnostic: o The simplest method and uses standard signals in ordinary frames which represent:  Low overhead in slave nodes.  A standardized concept.  Static with no flexibility. 2. User defined diagnostic: o designed to fit the needs for a specific device. o uses NADs in the range 128-255. Diagnostic Methods for diagnostics
  • 46. 3. Diagnostic transport layer: o Useful for a LIN network which is built on a CAN-based system where ISO diagnostics is used. o NADs 1-127 are used. o This method represents:  Low load on the master device.  Provides ISO diagnostics for LIN slaves.  Intended for more complex and powerful LIN nodes. Diagnostic Methods for diagnostics
  • 47. Physical properties UART Rx Tx master: 1k slave: 30k Bus Example capacitances master: 2.2nF o The LIN-bus transceiver is a modified version of the transceiver used by the ISO 9141 standard. o The bus is bidirectional and connected to the node transceiver, o Also via a termination resistor and a diode to Vbat .
  • 48. Physical properties o On the bus: • Logical low level (0) is dominant • Logical high level (1) is recessive. o Voltage supply (Vsup) for an ECU should be between 7 V and 18 V. VBAT 8...18V GND recessive logic ‘1’ dominant logic ‘0’ 60% 40% Bus Voltage Time controlled slope ~2V/µs
  • 49. o Each LIN Slave monitors its operating state and creates a status report. o The status report is sent periodically to the LIN Master (LIN 2.0). o Monitoring by error detection mechanisms • Parity check • Checksum o LIN messages detected as corrupt are rejected o Error handling is not part of the LIN specification and must be defined separately LIN Error Handling
  • 50. LIN Power Management (V2.0) o It contains "wake up" and "go-to sleep". o All the slave nodes in an active LIN cluster can be changed into sleep mode by:  Sending a diagnostic master request frame with the first data byte equal to zero.  This special use of a diagnostic frame is called a go-to- sleep-command. o Slave nodes can automatically enter a sleep mode if the LIN bus is inactive for more than 4 seconds.
  • 51. o Any node in a sleeping LIN cluster can send a request for wake up cluster. o wakeup request is issued by forcing the bus dominant for 250 μs to 5 ms. o Every slave node can detect the wake-up request (a dominant pulse longer than 150 ms) and be ready to listen to bus commands within 100 ms, measured from the ending edge of the dominant pulse. LIN Power Management (V2.0)
  • 52. o The master node can wake up . o When the slave nodes are ready, start sending frame headers to find out the cause of the wake up. o If the master does not issue headers within 150 ms after receiving the first wakeup request, then the slave requesting wakeup may try issuing a second wakeup request (and waiting for another 150 ms). LIN Power Management (V2.0)
  • 53. o If the master still does not respond, the slave issue the wakeup request and wait 150 ms a third time. o If there is still no response, the slave must wait for 1.5 seconds before issuing a fourth wakeup request. LIN Power Management (V2.0)
  • 55. LIN Workflow Software Level Hardware Level ToolsECU (LIN relevant functions only) Operating System Bus Transceiver Application Communication Manager Vehicle Network LIN API Specification LIN Protocol Specification LIN Physical Layer Spec. LIN Config. Language Signal Database Manager (SDM/L) Bus Analyzer (LINSpector) Network Configuration Generator (LCFG) LIN Physical Layer Spec. LIN Config Language LIN Conformance Test Specification LIN Recommended Use of Messages and Identifiers
  • 56. o The LIN bus connects a single master device (node) and one or more slave devices (nodes) together in a LIN cluster. o The behavior of each node is described by its own node capability file(NCF). o The node capability files are inputs to a system-defining tool o It generates a LIN description file (LDF) that describes the behavior of the entire cluster. o The LDF is parsed by a system generator to automatically generate the specified behavior in the desired nodes. LIN Workflow
  • 57. LIN Workflow o A node interfaces to the physical bus wire using a frame transceiver. o The frames are not accessed directly by the application. o A signal based interaction layer is added in between. o A diagnostic interface exist between the application and the frame handler, as depicted below.