Sei sulla pagina 1di 46

Local Interconnect Network Training

Overview

Local Interconnect Network Training


History and introduction Technical features The ISO/OSI reference model and LIN Frames Message Frames Communication concept of LIN Command Frames and Extended Frames Sleep mode and wake-up signal Error and exception handling CAN vs. LIN

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

History and expectation


Time

200x

Growth expectations:
3 10 LIN nodes per vehicle 1.2 billion LIN nodes per year world-wide

Current specification
LIN Specification Package V1.2 (Nov 17, 2000)

2000 1999 1998 First specification draft released

LIN Consortium initiated


(5 car manufacturers, 1 semiconductor supplier, 1 tool provider) http://www.lin-subbus.org

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Typical example for LIN in automobiles (1)

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Typical example for LIN in automobiles (2)

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Comparison of automotive bus systems

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Overview

Local Interconnect Network Training


History and introduction Technical features The ISO/OSI reference model and LIN Frames Message Frames Communication concept of LIN Command Frames and Extended Frames Sleep mode and wake-up signal Error and exception handling CAN vs. LIN

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Technical features (1)

Sub-bus as an extension to CAN to provide connection to local network clusters Low-cost single-wire implementation
(less expensive than CAN but not as reliable as CAN)

Low-cost silicon implementation based on common UART/SCI interface hardware


(almost any microcontroller has necessary hardware on chip)

Single-master / Multiple-slave concept


(no arbitration is necessary)

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Technical features (2)

Self-synchronization without quartz or ceramics resonators in the slave node


(significant cost reduction of hardware platform)

Data rates of up to 20 kbit/sec


Recommended Bit Rates: Slow : 2.400 bit/sec Medium: 9.600 bit/sec Fast : 19.200 bit/sec

(limited by the EMI of single-wire transmission)

Guaranteed latency times for signal transmission Hot plug-in / plug-out

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Overview

Local Interconnect Network Training


History and introduction Technical features The ISO/OSI reference model and LIN Frames Message Frames Communication concept of LIN Command Frames and Extended Frames Sleep mode and wake-up signal Error and exception handling CAN vs. LIN

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

The ISO/OSI reference model (1)

7 6 5 4 3 2 1

Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer

All People Seem To Need Data Processing

C CE SW B / Oliver Bremicker / 23 Aug 2002

Training: Local Interconnect Network (LIN)

Local Interconnect Network Training

The ISO/OSI reference model (2)

7 Application Layer 6 Presentation Layer 5 4 3 2 1 Session Layer Transport Layer Network Layer Data Link Layer Physical Layer

Applications, operating system

Conversion of data formats Task synchronization, buffers, connection setup and monitoring, access rights control Address conversion, routing, segmentation Setup of logical connection, transport protocol Transmission security, frame setup, error management Electrical / mechanical characteristics: Transmission medium, wiring, connectors, encoding, signals

Training: Local Interconnect Network (LIN)

C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

The ISO/OSI reference model and LIN

Data Link Layer LLC- Logical Link Control


is concerning with Message Filtering and Recovery Management Acceptance Filtering, Recovery Management, Time Base Synchronization, Message Validation Data Encapsulation / Decapsulation, Error Detection, Error Signaling, Serialization / Deserialization Bit Timing, Bit synchronization, Line Driver / Receiver

MAC - Medium Access


Control
is supervised by a management entity called Fault Confinement

Physical Layer

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Overview

Local Interconnect Network Training


History and introduction Technical features The ISO/OSI reference model and LIN Frames Message Frames Communication concept of LIN Command Frames and Extended Frames Sleep mode and wake-up signal Error and exception handling CAN vs. LIN

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Frames (1)

01110001010100 11110101010101 01010101000111

Frame: Envelope for transmission data 3 different frame types :


Message Frame: used for transmission of regular data Command Frame: used for software updates,
network configuration and diagnostic purposes

Extended Frame: allows the embedding of user-defined


message formats and future LIN formats into the current LIN protocol without violating the LIN specification

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Frames (2)

01110001010100 11110101010101 01010101000111

Frame Format

Header

Response

Byte Field Format: transmission with LSB first

0
Start Bit

8 Data Bits

1
Stop Bit

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Overview

Local Interconnect Network Training


History and introduction Technical features The ISO/OSI reference model and LIN Frames Message Frames Communication concept of LIN Command Frames and Extended Frames Sleep mode and wake-up signal Error and exception handling CAN vs. LIN

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Message Frames: Header (1)

Synchronization Break field

Synch Break

Synch

ID

identifies the start of a message frame consists of 2 parts:


dominant bus level with a minimum duration of TSYNBRK (13 bits) recessive bus level with a minimum duration of TSYNDEL (1bit)

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Message Frames: Header (2)

Synchronization field

Synch Break

Synch

ID

contains the information for clock synchronization consists of the pattern 0x55

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Message Frames: Header (3)

Identifier field (1)

Synch Break

Synch

ID

contains the identifier, length and parity of the frame


0 ID0 ID1 ID2 ID3 ID4 ID5 P0 P1 1

Identifier bits

ID parity bits Length control

Training: Local Interconnect Network (LIN)

C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Message Frames: Header (4)

Identifier field (2)


ID0 - ID5 64 (26) identifiers divided into 4 subsets of 16 identifiers with 2, 4 or 8 data bytes

P0 - P1 are the parity check bits of identifier

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Message Frames: Response

Response

Response

contains the data field and the checksum


data field consists of 2, 4 or 8 bytes checksum field (1 byte) contains the inverted modulo-256 sum across all data bytes calculated using add with carry

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Overview

Local Interconnect Network Training


History and introduction Technical features The ISO/OSI reference model and LIN Frames Message Frames Communication concept of LIN Command Frames and Extended Frames Sleep mode and wake-up signal Error and exception handling CAN vs. LIN

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

LIN communication concept: Master task vs. Slave tasks

Master task vs. Slave tasks


master control unit
master task slave task slave task slave task

slave control unit

slave control unit

LIN bus

only the master control unit contains a master task slave tasks are contained in all control units

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

LIN communication concept: Frame timing

Synch Break 13 bit (min)

Identifier Field 1 byte next Synch Break

Synch Field 1 byte

Master Task In-frame Space Checksum Field 1 byte Data Field 2, 4 or 8 bytes Inter-frame space / break

Slave Task

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

LIN communication concept: Master Task

Master Task
has the control over the whole bus communication serves as the reference for synchronization sets the schedule sends the header of each message monitors the data bytes and the checksum byte receives the wake-up signal from a slave node when the bus is in Sleep Mode

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

LIN communication concept: Slave Task

Slave Task
waits for the Synch Break Field synchronizes on the Synch Field depending on ID sent by the Master Task, sends response (publisher), receives response (subscriber), or does none of both sends wake-up signal when bus is in Sleep Mode and it needs to transmit data

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Overview

Local Interconnect Network Training


History and introduction Technical features The ISO/OSI reference model and LIN Frames Message Frames Communication concept of LIN Command Frames and Extended Frames Sleep mode and wake-up signal Error and exception handling CAN vs. LIN

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Command Frames

Command Frames (1)


are regular 8-byte Message Frames are used to broadcast general command requests for service purposes from the master to all bus participants 2 types of Command Frames:
Master request frame (ID-Field = 0x3C): to send commands and data from the master to the slave node Slave response frame (ID-Field = 0x7D): to trigger one slave node to send data to the master node

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Command Frames / Sleep Mode Command

Command Frames (2)


type of command is specified in the first data byte of a command frame values of 0x00 to 0x7F for command type are reserved Example:
Sleep Mode Command (command type 0x00): Master Request Frame which is used to broadcast the request for transition to sleep mode to all bus nodes

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Extended Frames

Extended Frames
allow the embedding of user-defined message formats and future LIN formats into the LIN protocol without violating the current LIN specification 2 types of extended frames:
User-defined extended frame (ID-Field = 0xFE) Frame reserved for future LIN extension (ID-Field = 0xBF)

the identifier can be followed by an arbitrary number of LIN bytes fields

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Overview

Local Interconnect Network Training


History and introduction Technical features The ISO/OSI reference model and LIN Frames Message Frames Communication concept of LIN Command Frames and Extended Frames Sleep mode and wake-up signal Error and exception handling CAN vs. LIN

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Transition to and from Sleep Mode

Transition to and from Sleep Mode


Slave nodes go to Sleep Mode after:
reception of a Sleep Mode Command from the master node or a time-out (TTIME_OUT = 25000 TBIT) in the case that the sleep command message was corrupted

Sleep mode can be terminated by the slave task of any node by sending a Wake-Up Signal:

TWUSIG
Bus Sleep
Training: Local Interconnect Network (LIN)

TUDEL
Wake-up delimiter

C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Wake-up procedure

Wake-up procedure
Sleep Mode slave task sends wake-up signal Waiting for frame from master task master task sends first frame time-out TTOBRK slave task repeats wake-up signal max. 2 times

no response to 3 wake-up signals Transmission of wake-up signals suspended for TT3BRK

C CE SW B / Oliver Bremicker / 23 Aug 2002

Bus Awake

Training: Local Interconnect Network (LIN)

Local Interconnect Network Training

Overview

Local Interconnect Network Training


History and introduction Technical features The ISO/OSI reference model and LIN Frames Message Frames Communication concept of LIN Command Frames and Extended Frames Sleep mode and wake-up signal Error and exception handling CAN vs. LIN

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Error types

Possible error types


Bit Error

Checksum Error Identifier-Parity Error Slave-Not-Responding Error Inconsistent-Synch Field Error

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Bit Error

Bit Error
Error description
The bit on the bus is different from the one that was transmitted.

Method of detection
Sending unit monitors the bus while transmitting.

Fault confinement
This error is detected by: - the master task in the master node, - the slave task in the slave node while reading back their own transmissions.

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Checksum Error

Checksum Error
Error description
The checksum calculated over all received data bytes does not match the received checksum byte.

Method of detection
The sum of the inverted modulo-256 sum over all received data bytes and the checksum byte does not result in 0xFF.

Fault confinement
This error is detected by: - the slave task in the master node when reading data from the bus, - the slave task in the slave node while reading data from the bus.

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Identifier-Parity Error

Identifier-Parity Error
Error description
The parity identifier bits do not match the calculated values.

Method of detection
Calculation of parity bits from received identifier and comparation to received parity bits.

Fault confinement
This error is detected by: - the master task in the master node while reading back its own transmission, - the slave task in the slave node while reading from the bus.

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Slave-Not-Responding Error

Slave-Not-Responding Error
Error description
The transmission of a LIN frame is not fully completed within the time frame specified in the schedule.

Method of detection
This error is detected while reading from the bus when a slave task expects data to be transmitted.

Fault confinement
This error is detected by: - the slave task in the master node when expecting or reading data from the bus, - the slave task in the slave node while reading from the bus only when this slave expects a message from another slave.

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Inconsistent-Synch-Field Error

Inconsistent-Synch-Field Error
Error description
Synch field is different from the pattern 0x55.

Method of detection
Slave task detects the edges of the Synch Field outside the given tolerance.

Fault confinement
This error can only be detected by the slave task in the slave node.

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Error causes

Error causes
Local disturbance of ground potential Local disturbance of supply voltage Global electric disturbance of the bus signal Unsynchronized time base

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Overview

Local Interconnect Network Training


History and introduction Technical features The ISO/OSI reference model and LIN Frames Message Frames Communication concept of LIN Command Frames and Extended Frames Sleep mode and wake-up signal Error and exception handling CAN vs. LIN

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

Warning

LIN low-cost CAN !!!

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

CAN vs. LIN (1)

Data rate Master/Slave Data security Acknowledgement Node number

max. 1 MBaud multi-master CRC code yes up to 100

max. 20 kBaud master/slave simple checksum no up to 16

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

CAN vs. LIN (2)

Latency time Frame scheduling Tx on event Error correction Error prevention

not guaranteed no yes retransmission bus-off mechanism

deterministic yes no none none

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Local Interconnect Network Training

CAN vs. LIN (3)

Upper SW layers Protocol in HW Bus length Number of wires ISO standard

e.g. OSEK COM yes max. 1000m 2 (or 1) ISO 11898 / 11519

LIN API no max. 40m 1 no

Training: Local Interconnect Network (LIN) C CE SW B / Oliver Bremicker / 23 Aug 2002

Potrebbero piacerti anche