Introduction to. LIN (Local Interconnect Network)



Similar documents
LIN (Local Interconnect Network):

In-Vehicle Networking

Local Interconnect Network Training. Local Interconnect Network Training. Overview

Introduction to RACE FUELS Hans-Christian von der Wense Munich, Germany

Microcomputer Protocol Implementation at Local Interconnect Network Georgi Krastev

LOCAL INTERCONNECT NETWORK (LIN)

Introduction to LIN. Webinar

LIN. Specification Package. Revision 2.0. This specification is provided on an "AS IS" basis only and cannot be the basis for any claims.

Bluetooth in Automotive Applications Lars-Berno Fredriksson, KVASER AB

LIN (Local Interconnected Network)

In-Vehicular Communication Networking Protocol

Comparison of FlexRay and CAN-bus for Real-Time Communication

Process Control and Automation using Modbus Protocol

LOCAL INTERCONNECT NETWORK (LIN)

LOW COST AUTOMOTIVE NETWORKS. Local Interconnect Network (LIN)

Distributed Real-Time Systems (TI-DRTS) Track 2. CAN-BUS Introduction. Version Ref. VECTOR application note & Motorola note

LOCAL INTERCONNECT NETWORK (LIN)

Vorlesung Kommunikationsnetze Fieldbus Systems

Welcome to the Introduction to Controller Area Network web seminar My name is William Stuart, and I am a Applications Engineer for the Automotive

LOCAL INTERCONNECT NETWORK (LIN)

Road Vehicles - Diagnostic Systems

TD-03011E. Identifier Usage in CANopen Networks

OSI Layers in Automotive Networks

Tutorial Introduction

Data Exchange On The CAN Bus I

CAN Specification 2.0, Part B page 1 PART B. CAN in Automation, Am Weichselgarten 26, D Erlangen

How to Hack Your Mini Cooper: Reverse Engineering CAN Messages on Passenger Automobiles

In-Vehicle Networking

UART-based LIN-bus Support for Linux with SocketCAN Interface

K-line Communication Description

MOST Technology MOST Multimedia Network Data Transport Optical Bus... 6 Optical Transmitter... 6 Optical Receiver...

LOCAL INTERCONNECT NETWORK (LIN)

Protocols for Wired and Wireless Networks in Vehicle Systems

DeviceNet Communication Manual

Tutorial.

Automotive electronics CAN and LIN buses. Copyright 2006 Matrix Multimedia Limited

FlexRay A Communications Network for Automotive Control Systems

Elettronica dei Sistemi Digitali Costantino Giaconia SERIAL I/O COMMON PROTOCOLS

Industrial Networks & Databases

Serial Communications / Protocol in AirTest Products

Bluetooth Audio Data Transfer between Bluetooth chipset (PMB6752&PMB6625) and TriCore Host TC1920

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction

Vehicle data acquisition using CAN By Henning Olsson, OptimumG

2 Basic Concepts. Contents

Understanding SAE J1939. by Simma Software, Inc.

ISO11783 a Standardized Tractor Implement Interface

AUTOMOTIVE FIELDBUS TECHNOLOGY: DEVELOPMENT TOOLS AND ELECTRONIC EQUIPMENT FOR LABORATORY PRACTICES

CSE331: Introduction to Networks and Security. Lecture 6 Fall 2006

A Security Evaluation and Internal Penetration Testing Of the CAN-bus

Serial Communications

Bus Data Acquisition and Remote Monitoring System Using Gsm & Can

Adaptive Cruise Control System Overview

Automotive Communication Network Trends

2.1 CAN Bit Structure The Nominal Bit Rate of the network is uniform throughout the network and is given by:

Multiplexed Networks for Embedded Systems. CAN, LIN, FlexRay, Safe-by- Wire...

Radio sensor powered by a mini solar cell the EnOcean STM 110 now functions with even less light

Implementing MOD bus and CAN bus Protocol Conversion Interface

Ring Local Area Network. Ring LANs

Serial Communications

Remote PLC system using GSM network with application to home security system

Industrial Networks & Databases

New protocol concept for wireless MIDI connections via Bluetooth

The SAE J1939 Communications Network

Serial Bus Systems in the Automobile

Brunata Optuna W (171)

Ethernet. Ethernet Frame Structure. Ethernet Frame Structure (more) Ethernet: uses CSMA/CD

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

Dolphin In-Circuit programming Updating Firmware in the field

How To Communicate With A Token Ring Network (Dihon)

Real-Time Systems Hermann Härtig Real-Time Communication (following Kopetz, Liu, Schönberg, Löser)

Modbus Protocol. PDF format version of the MODBUS Protocol. The original was found at:

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

AVL DISCAN Handheld-Scantool for multifunctional fields of application Faultcode-reader with integrated Informationsystem and Oscilloscope

NOQ_NQ-9121 Z-Wave Data Logger for Gas Meters Firmware Version : 2.55

EE4367 Telecom. Switching & Transmission. Prof. Murat Torlak

Fiber Distributed Data Interface

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

SPI I2C LIN Ethernet. u Today: Wired embedded networks. u Next lecture: CAN bus u Then: wireless embedded network

Basic Networking Concepts. 1. Introduction 2. Protocols 3. Protocol Layers 4. Network Interconnection/Internet

Multiple clock domains

Positioning Controllers. Communication Guide. Document ID: rel4054

Modicon Modbus Protocol Reference Guide. PI MBUS 300 Rev. J

SMS based remote control system

Implementation of Wireless Gateway for Smart Home

Technical Information. HART Communications. Part 4 Communications

General description. This chapter provides a general description of the product MVB Virtual Terminal and PCNode:

WBAN Beaconing for Efficient Resource Sharing. in Wireless Wearable Computer Networks

Single channel data transceiver module WIZ2-434

EBERSPÄCHER ELECTRONICS automotive bus systems. solutions for network analysis

MDM192 MULTI-DROPS DIGITAL MODEM FOR PRIVATE LINE. USER GUIDE Document reference :

1 Which network type is a specifically designed configuration of computers and other devices located within a confined area? A Peer-to-peer network

Implementing the J1850 Protocol

In-Vehicle Networking freescale.com/automotive

Zigbee-Based Wireless Distance Measuring Sensor System

Data Link Layer(1) Principal service: Transferring data from the network layer of the source machine to the one of the destination machine

WIFI OBD GPS Tracker T356 User Manual

Network Categories. Network Types for the Local Range. Ethernet. Carrier Sense Multiple Access

Network Design. Yiannos Mylonas

Transcription:

Introduction to LIN (Local Interconnect Network) Stéphane REY Revision 1.0 - ay 13 th, 2003

Table of content 1 INTRODUCTION...3 1.1 PURPOSE OF THE DOCUENT...3 1.2 ACRONYOUS...3 1.3 RELATED DOCUENTS...3 1.4 REFERENCE DOCUENTS...3 2 OVERVIEW...4 2.1 INTRODUCTION...4 2.2 AIN FEATURES...4 2.3 TOPOLOGY...5 2.4 EXAPLE OF LIN IPLEENTATION...6 2.5 LIN ADVANTAGES...6 3 PROTOCOL...7 3.1 STRUCTURE OF A ESSAGE...7 3.1.1 Synchronization break...7 3.1.2 Synchronization byte...8 3.1.3 Identifier byte...8 3.1.4 Data byte...9 3.1.5 Cheksum byte...9 3.2 WAKE-UP / SLEEP ODES...9 3.2.1 Sleep mode conditions...10 3.2.2 Wake-up conditions...10 3.3 ERRORS DETECTION...11 3.3.1 aster error detection...11 3.3.2 Slave error detection...11

1 INTRODUCTION 1.1 Purpose of the document This document is intended to give a general introduction to the LIN. It s a compilation of informations from the lin specifications. It describes the features and highlights the main advantages of this communication bus. 1.2 Acronymous CRC CAN CPLD ECU ISO LIN LSB SB OSI SCI UART Cyclic Redundant Code Control Area Network Complex Programmable Logic Device Electronic Control Unit International Standard Organisation Local Interconnect Network Lower Significant Bit ost Significant Bit Open Systems Interconnections Serial Communication Interface Universal Asynchronous Receiver Transmitter 1.3 Related documents LIN consortium steering committee : http://www.lin-subbus.org/ 1.4 Reference documents LIN specification package revision 1.3 december 12 th, 2002 LIN consortium Page 3/11

2 OVERVIEW 2.1 Introduction LIN was designed by the LIN consortium and the first specification has been published in 1999. The consortium members are mainly European cars constructors : Audi AG, BW AG, Daimler Chrysler AG, Volkswagen AG, Volvo Cars Corporation AB, otorola and Volcano Communications Technologies. any car constructors are currently implementing LIN in their vehicles like PSA. It was particularly designed for low-cost communication between smart sensors and actuators in automotive applications. It's intended to be used when high bitrates communications as CAN bus are not needed. It can be based on the UART/SCI hardware interface, software UART or state-machine. Applications may be Instrument cluster, air conditioning, seats, mirrors, rain sensors, light sensors, door locking, windows,... Bitrates (bits/s) LIN vs others Automotive bus protocols 25 2 TTx,Flexray Time triggered 2x2 wires Fault tolerant D2B,OST Token ring Optical bus 1 125K 20K LIN aster-slave Single wire No crystal J1850 CAN-C ulti-master Two wires CAN-B ulti-master Two wires Fault tolerant Bluetooth Wireless 1 2 5 10 Cost index per node 2.2 ain features ono-master, up to 15 slaves 1 wire bus Bitrates from 1 to 20 Kbits/s : 2.4, 9.6 and 19.2 Kbits are usually used in automotive applications ulticast (broadcast) messages Page 4/11

Self-synchronization of the slave (only the master has an accurate clock as crystal) essages with 2,4 or 8 data bytes, 3 control bytes Error detection by 8 bits checksum and 2 parity bits in identifier Physical layer : ISO9141 Sleep / wake-up capability The LIN allows to implement a serial communication in state-machine, small microcontrollers or CPLDs. A slave ECU doesn t need an accurate clock and crystals or resonators could be replaced by RC cell. This is a way to design some smart actuators or sensors, or smart connectors very cost effective. The specifications describes 3 of the 7 layers of the OSI model : physical layer, data link and application layers. 2.3 Topology A LIN network consists of a LIN master and one or several LIN slaves. Usually in automotive application, the LIN bus is connected between smart sensor or actuators and an Electronic Control Unit (ECU) which is often a gateway with CAN bus. You may find several LIN busses not interconnected between them as shown in the figure below. This is a major difference with other low-cost busses as K-line which was intended to link all the ECUs to an external analyse tool for diagnosis purpose. Page 5/11

A LIN bus length is limited to 40 meters and up to 16 ECUs could be connected. aster Slave Slave Slave LIN 2.4 Example of LIN implementation Source : Infineon Technologies CAN bus CAN bus Door odule Universal panel LIN Universal panel Turn signal Flap X axis Y axis Door lock Power window Deadbolt Turn signal Flap X axis Y axis Door lock Deadbolt Power window 2.5 LIN advantages Easy to use, Components available, Cheaper than CAN and other communications busses, Harness reduction, ore reliable vehicles, Extension easy to implement. Page 6/11

3 PROTOCOL The LIN master knows the sequential order of all data to be transmitted and sends requests to slaves. These requests are achieved by sending a header. 3.1 Structure of a message The recessive and dominant level are defined like this : The bus is in recessive level when not busy. A message contains the following fields : Synchronization break, Synchronization byte, Identifier byte, Data bytes, Ckecksum byte. The data are INTEL coded which means that LSB are sent first. BREAK IDENT. DATA 2, 4 or 8 S CHECK. Header from master data from master or slave 3.1.1 Synchronization break A slave can detect a synchronization break by measuring the low phase duration which is higher than a databyte length. BREAK FIELD FIELD = T SYNBRK T SYNDEL BREAK FIELD LEVEL NAE IN [T ] NO [T ] AX [T ] Synch. Br eak low phase dominant T SYNBRK 13 a - Synch. Break delimiter recessive T SYNDEL 1 a - Synch. Break threshold slave Dominant T SBRKTS 10 b Clock timing from : (a) master, (b) slave with crystal or resonator, (c) slave without crystal or resonator 9 c Page 7/11

3.1.2 Synchronization byte The synchronization byte is only sent by the master. It s used for slave selfsynchronization. FIELD 8 T 2 T 2 T 2 T 2 T START 0 LSB 1 2 3 4 5 6 7 SB STOP A slave defines a bit duration by measuring the 8 bits length and dividing by 8. This defines the baudrate. 3.1.3 Identifier byte The identifier byte defines the containt and length of the following data. There is 64 identifiers sorted in 4 groups of 16 messages. IDENTIFIER FIELD Identifier bits Parity bits START ID0 LSB ID1 ID2 ID3 ID4 ID5 P0 ID [0...3] = message number P1 SB STOP This is the message identifier. There is identifiers from the specification which covers the LIN protocol. Some identifiers are reserved for future extension and custom messages. ID [4...5] = data length This is the length of the following data bytes. ID4 ID5 data length 0 0 2 bytes 0 1 2 bytes 1 0 4 bytes 1 1 8 bytes P [0...1] = parity bits The parity is computed on the identifier bits only. P0 is the even parity bit, P1 is the odd parity bit. Page 8/11

P0 = not (ID1 ID3 ID4 ID5) P1 = ID0 ID1 ID2 ID4 3.1.4 Data byte The data length is defined by ID5 and ID6 from the identifier field. It can be 2, 4 or bytes. The data can be transmitted either by the master or the slave. DATA FIELD START D0 LSB D1 D2 D3 D4 D5 D6 D7 SB STOP 3.1.5 Cheksum byte The checksum (CRC) is computed only on the data field. All other fields are not included. CHECKSU FIELD START C0 LSB C1 C2 C3 C4 C5 C6 C7 SB The value of the checksum is equal to the inverted modulo 256 sum. This means : Checksum = (1 - data ) mod 256. The carry of the previous addition is added to the LSB of the next addition. STOP 3.2 Wake-up / Sleep modes The LIN protocol allows to be in sleep mode to be compliant with the standards and the environmental constraints. When the vehicle isn t used, the consumption of the whole vehicle have to be less than a few milliamps in order to not discharge the battery. So, each ECU has to enter in sleep mode. Thus, strategies have been implemented to manage the sleep/wake-up modes on the communication busses. Page 9/11

3.2.1 Sleep mode conditions 3.2.1.1 Request from the master The master has to send three times the sleep mode request : identifier 0x3C and data byte 0x00. The slaves have to enter in sleep mode in less than 25000 BitTime and then the bus remains to the recessive level. DATA 2, 4 or 8 S CHECK. SLEEP CD SLEEP CD SLEEP CD T sleep Previous message Sleep mode request from master Sleep mode The time between the first sleep command and the effective sleep mode is below 30ms+T sleep. 3.2.1.2 Bus inactivity When the bus remains in the recessive level during a specified time, the ECUs have to enter in sleep mode. 3.2.2 Wake-up conditions 3.2.2.1 message from the slave after an event If an event occurs, a slave can awake the master and the communication will start again. It will use the wake-up identifier 0x80. The master has to manage a bad wakeup signal. When the bus becomes dominant, it s a wake-up condition. However, the master has to check the wake-up message validity to start again the normal operation. WAKE-UP CD WAKE-UP CD WAKE-UP CD BREAK IDENT. Sleep mode Wake-up request from a slave Header from master 3.2.2.2 message from the master The master can awake the slaves by sending the wake-up message 0x80. Once the request has been sent, the master starts again its normal communication. WAKE-UP CD BREAK IDENT. Sleep mode Wake-up request from master Header from master Page 10/11

3.3 Errors detection There is no error diagnosis thru the LIN. This means that the detected errors are not sent on the LIN. However, the following errors have to be managed by the ECUs : - bit error : the monitored output bit is different from the transmitted one, - checksum error, - identifier parity error, - slave no answer, - bad synchronization frame, - inactive bus = sleep mode. The master has to manage most of the errors recovering. It means that it has to apply a specified faliure mode when needed. 3.3.1 aster error detection 3.3.1.1 During transmission During transmission the master has to detect the following errors : - bit error, - identifier parity error. 3.3.1.2 During reception When receiving messages from slaves, the master has to detect : - checksum errors, - no slave answer. 3.3.2 Slave error detection 3.3.2.1 During transmission When transmitting a message, the slave has to monitor the follwing error : - bit error 3.3.2.2 During reception When receiving, the slave has to detect : - identifier parity errors, - checksum errors, - no slave answer, - bad synchronisation frame. - End Of Document - Page 11/11