• No results found

Local Interconnect Network Training. Local Interconnect Network Training. Overview

N/A
N/A
Protected

Academic year: 2022

Share "Local Interconnect Network Training. Local Interconnect Network Training. Overview"

Copied!
46
0
0

Loading.... (view fulltext now)

Full text

(1)

Ø 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

Local Interconnect Network Training

Overview

Overview

(2)

Time

History and expectation History and expectation

2000

1998

200x

1999 LIN Consortium initiated

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

First specification draft released

Current specification

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

Growth expectations:

3 … 10 LIN nodes per vehicle

1.2 billion LIN nodes per year world-wide

(3)

Typical example for LIN in automobiles (1)

Typical example for LIN in automobiles (1)

(4)

Typical example for LIN in automobiles (2)

Typical example for LIN in automobiles (2)

(5)

Comparison of automotive bus systems

Comparison of automotive bus systems

(6)

Ø 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

Local Interconnect Network Training

Overview

Overview

(7)

Ø Low-cost single-wire implementation

(less expensive than CAN but not as reliable as CAN)

Ø Single-master / Multiple-slave concept

(no arbitration is necessary)

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

(almost any microcontroller has necessary hardware on chip)

Ø Sub-bus as an extension to CAN to provide connection to local network clusters

Technical features (1)

Technical features (1)

(8)

Technical features (2) Technical features (2)

Ø Data rates of up to 20 kbit/sec

(limited by the EMI of single-wire transmission) Recommended Bit Rates:

Slow : 2.400 bit/sec Medium: 9.600 bit/sec Fast : 19.200 bit/sec

Ø Guaranteed latency times for signal transmission

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

(significant cost reduction of hardware platform)

Ø Hot plug-in / plug-out

(9)

Ø 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

Local Interconnect Network Training

Overview

Overview

(10)

The ISO/OSI reference model (1) The ISO/OSI reference model (1)

Application Layer Presentation Layer

Session Layer

Network Layer Transport Layer

Data Link Layer Physical Layer 7 7

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

All People

Seem To Need

Data

Processing

(11)

The ISO/OSI reference model (2) The ISO/OSI reference model (2)

Application Layer Presentation Layer

Session Layer

Network Layer Transport Layer

Data Link Layer Physical Layer 7 7

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

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

(12)

The ISO/OSI reference model and LIN The ISO/OSI reference model and LIN

Physical Layer 2 2

1 1

Data Link Layer LLC-

Logical Link Control

is concerning with Message Filtering and Recovery

Management

MAC -

Medium Access Control

is supervised by a management entity called Fault Confinement

Bit Timing, Bit synchronization, Line Driver / Receiver

Acceptance Filtering, Recovery Management,

Time Base Synchronization, Message Validation

Data Encapsulation /

Decapsulation, Error Detection, Error Signaling,

Serialization / Deserialization

(13)

Ø 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

Local Interconnect Network Training

Overview

Overview

(14)

01110001010100 11110101010101 01010101000111

Frames (1) Frames (1)

Ø 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

(15)

01110001010100 11110101010101 01010101000111

Frames (2) Frames (2)

Ø Frame Format

Header Response

Ø Byte Field Format: transmission with LSB first

0 8 Data Bits 1

Start Bit Stop Bit

(16)

Ø 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

Local Interconnect Network Training

Overview

Overview

(17)

Message Frames: Header (1) 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)

(18)

Message Frames: Header (2) Message Frames: Header (2)

Synch Break Synch ID

Synchronization field

Ø contains the information for clock synchronization

Ø consists of the pattern 0x55

(19)

Message Frames: Header (3) Message Frames: Header (3)

0 ID0 ID1 ID2 ID3 ID4 ID5 P0 P1 1

Identifier bits ID parity bits

Synch Break Synch ID

Identifier field (1)

Ø contains the identifier, length and parity of the frame

(20)

Message Frames: Header (4) Message Frames: Header (4)

Ø ID0 - ID5 Þ Þ Þ Þ 64 (2

6

) identifiers divided into

4 subsets of 16 identifiers with 2, 4 or 8 data bytes

Ø P0 - P1 are the parity check bits of identifier

Identifier field (2)

(21)

Message Frames: Response Message Frames: 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”

Response

(22)

Ø 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

Local Interconnect Network Training

Overview

Overview

(23)

LIN communication concept: Master task vs. Slave tasks LIN communication concept: Master task vs. Slave tasks

slave task master task

master control unit

slave task

slave control unit

slave task

slave control unit

LIN bus

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

Master task vs. Slave tasks

(24)

LIN communication concept: Frame timing LIN communication concept: Frame timing

Master Task

Slave Task

Identifier Field 1 byte Synch Field

1 byte Synch Break

13 bit (min)

Data Field 2, 4 or 8 bytes

t

t

In-frame Space

Checksum Field 1 byte

Inter-frame space / break

next Synch Break

(25)

LIN communication concept: Master Task 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

(26)

LIN communication concept: Slave Task 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

(27)

Ø 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

Local Interconnect Network Training

Overview

Overview

(28)

Command Frames Command Frames

Ø 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

Command Frames (1)

(29)

Command Frames / Sleep Mode Command Command Frames / Sleep Mode Command

Ø 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:

Command Frames (2)

¦

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

(30)

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:

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

Extended Frames

¦ User-defined extended frame (ID-Field = 0xFE)

¦ Frame reserved for future LIN extension (ID-Field = 0xBF)

(31)

Ø 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

Local Interconnect Network Training

Overview

Overview

(32)

Transition to and from Sleep Mode Transition to and from Sleep Mode

Ø Slave nodes go to Sleep Mode after:

Transition to and from Sleep Mode

¦ 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:

T

WUSIG

Wake-up Bus

Sleep

T

UDEL

(33)

Wake-up procedure Wake-up procedure

Wake-up procedure

Sleep Mode

slave task sends wake-up signal

Waiting for frame from master task

time-out

T

TOBRK

è è è

è slave task repeats wake-up signal

max. 2 times

master task sends first frame

Bus Awake

no response to 3 wake-up signals

Transmission of wake-up signals suspended for

T

(34)

Ø 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

Local Interconnect Network Training

Overview

Overview

(35)

Error types Error types

Possible error types

Ø Bit Error

Ø Checksum Error

Ø Identifier-Parity Error

Ø Slave-Not-Responding Error

Ø Inconsistent-Synch Field Error

(36)

Bit Error 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.

(37)

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.

Checksum Error

(38)

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.

Identifier-Parity Error

(39)

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

Slave-Not-Responding Error

(40)

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.

Inconsistent-Synch-Field Error

(41)

Error causes Error causes

Error causes

Ø Local disturbance of ground potential Ø Local disturbance of supply voltage

Ø Global electric disturbance of the bus signal

Ø Unsynchronized time base

(42)

Ø 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

Local Interconnect Network Training

Overview

Overview

(43)

LIN

“low-cost CAN” !!!

Warning

Warning

(44)

CAN vs. LIN (1) CAN vs. LIN (1)

Data rate max. 1 MBaud max. 20 kBaud

Master/Slave multi-master master/slave Data security CRC code simple checksum

Acknowledgement yes no

Node number up to 100 up to 16

(45)

CAN vs. LIN (2) CAN vs. LIN (2)

Latency time not guaranteed deterministic

Frame scheduling no yes

Tx on event yes no

Error correction retransmission none

Error prevention bus-off mechanism none

(46)

CAN vs. LIN (3) CAN vs. LIN (3)

Upper SW layers e.g. OSEK COM LIN API

Protocol in HW yes no

Bus length max. 1000m max. 40m

Number of wires 2 (or 1) 1

ISO standard ISO 11898 / 11519 no

References

Related documents

Check of short to power supply, short to earth, and open circuit in SR+ line between ETACS-ECU connector and sunroof motor assembly connector.. Q: Is the check

Description Clear data buffer, setting reception format, response reception start Arguments Uint8_t data_length Receive data length.. Returned value None Table

Power Window Main Switch LIN Communication Circuit ETACS- ECU INTERFACE CIRCUIT LIN DRIVE CIRCUIT CPU POWER WINDOW MAIN SWITCH JOINT CONNECTOR (2) AC708950BR C-129 (BR) C-102

Check ETACS-ECU connector C-301 and power window main switch connector E-19 for loose, corroded or damaged terminals, or terminals pushed back in

The components of the subnet communications wiring are the controller, power supply, control buses, slave address selectors, and slave bus interconnect cable as illustrated in

[r]

To interconnect a competitive local exchange carrier’s (“CLEC”) network to Verizon’s wireline local exchange network, the CLEC establishes a point of interconnection with

After the Master sends a START condition and the slave address byte, the CAT5191 monitors the bus and responds with an acknowledge (on the SDA line) when its address matches