+ All Categories
Home > Documents > LIN Training

LIN Training

Date post: 03-Apr-2018
Category:
Upload: thiago-domingos
View: 219 times
Download: 0 times
Share this document with a friend

of 46

Transcript
  • 7/28/2019 LIN Training

    1/46

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

    Local Interconnect Network TrainingLocal 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

    Local Interconnect Network Training

    OverviewOverview

  • 7/28/2019 LIN Training

    2/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Time

    History and expectationHistory 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 specificationLIN Specification Package V1.2

    (Nov 17, 2000)

    Growth expectations:3 10 LIN nodes per vehicle

    1.2 billion LIN nodes per year world-wide

  • 7/28/2019 LIN Training

    3/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Typical example for LIN in automobiles (1)Typical example for LIN in automobiles (1)

  • 7/28/2019 LIN Training

    4/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Typical example for LIN in automobiles (2)Typical example for LIN in automobiles (2)

  • 7/28/2019 LIN Training

    5/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Comparison of automotive bus systemsComparison of automotive bus systems

  • 7/28/2019 LIN Training

    6/46

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

    Local Interconnect Network TrainingLocal 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

    Local Interconnect Network Training

    OverviewOverview

  • 7/28/2019 LIN Training

    7/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    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 oncommon 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)

  • 7/28/2019 LIN Training

    8/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    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/secMedium: 9.600 bit/secFast : 19.200 bit/sec

    Guaranteed latency times for signaltransmission

    Self-synchronization without quartz or

    ceramics resonators in the slave node (significant cost reduction of hardware platform)

    Hot plug-in / plug-out

  • 7/28/2019 LIN Training

    9/46

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

    Local Interconnect Network TrainingLocal 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

    Local Interconnect Network Training

    OverviewOverview

  • 7/28/2019 LIN Training

    10/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    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

    77

    66

    55

    44

    33

    22

    11

    All

    People

    Seem

    To

    Need

    Data

    Processing

  • 7/28/2019 LIN Training

    11/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    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

    77

    66

    55

    44

    33

    22

    11

    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

  • 7/28/2019 LIN Training

    12/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

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

    Physical Layer

    22

    11

    Data Link Layer

    LLC- Logical Link Control

    is concerning with MessageFiltering and RecoveryManagement

    MAC - Medium AccessControl

    is supervised by a managemententity 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

  • 7/28/2019 LIN Training

    13/46

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

    Local Interconnect Network TrainingLocal 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

    Local Interconnect Network Training

    OverviewOverview

  • 7/28/2019 LIN Training

    14/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    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-definedmessage formats and future LIN formats into the currentLIN protocol without violating the LIN specification

  • 7/28/2019 LIN Training

    15/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    01110001010100

    11110101010101

    01010101000111

    Frames (2)Frames (2)

    Frame Format

    Header Response

    Byte Field Format: transmission with LSB first

    0 18 Data Bits

    Start Bit Stop Bit

  • 7/28/2019 LIN Training

    16/46

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

    Local Interconnect Network TrainingLocal 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

    Local Interconnect Network Training

    OverviewOverview

  • 7/28/2019 LIN Training

    17/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Message Frames: Header (1)Message Frames: Header (1)

    Synchronization Break field

    Synch Break IDSynch

    identifies the start of a message frame

    consists of 2 parts:

    dominant bus level with a minimum duration ofTSYNBRK (13 bits)

    recessive bus level with a minimum duration ofTSYNDEL (1bit)

  • 7/28/2019 LIN Training

    18/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

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

    Synch Break IDSynch

    Synchronization field

    contains the information for clock synchronization

    consists of the pattern 0x55

  • 7/28/2019 LIN Training

    19/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

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

    0 1ID0 ID1 ID2 ID3 ID4 ID5 P0 P1

    Identifier bits

    Length control

    ID parity bits

    Synch Break IDSynch

    Identifier field (1)

    contains the identifier, length and parity of the frame

  • 7/28/2019 LIN Training

    20/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

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

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

    P0 - P1 are the parity check bits of identifier

    Identifier field (2)

  • 7/28/2019 LIN Training

    21/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Message Frames: ResponseMessage 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 sumacross all data bytes calculated using add with carry

    Response

  • 7/28/2019 LIN Training

    22/46

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

    Local Interconnect Network TrainingLocal 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

    Local Interconnect Network Training

    OverviewOverview

  • 7/28/2019 LIN Training

    23/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    LIN communication concept: Master task vs. Slave tasksLIN 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

  • 7/28/2019 LIN Training

    24/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    LIN communication concept: Frame timingLIN communication concept: Frame timing

    Master

    Task

    Slave

    Task

    Identifier Field1 byte

    Synch Field1 byte

    Synch Break13 bit (min)

    Data Field

    2, 4 or 8 bytes

    t

    t

    In-frame

    Space

    Checksum Field

    1 byte

    Inter-frame

    space / break

    nextSynch Break

  • 7/28/2019 LIN Training

    25/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

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

  • 7/28/2019 LIN Training

    26/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    LIN communication concept: Slave TaskLIN 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 Modeand it needs to transmit data

  • 7/28/2019 LIN Training

    27/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    History and introduction

    Technical features

    The ISO/OSI reference model and LIN

    FramesMessage 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

    OverviewOverview

  • 7/28/2019 LIN Training

    28/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Command FramesCommand 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)

  • 7/28/2019 LIN Training

    29/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Command Frames / Sleep Mode CommandCommand 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

  • 7/28/2019 LIN Training

    30/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Extended FramesExtended 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)

  • 7/28/2019 LIN Training

    31/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    History and introduction

    Technical features

    The ISO/OSI reference model and LIN

    FramesMessage 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

    OverviewOverview

  • 7/28/2019 LIN Training

    32/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Transition to and from Sleep ModeTransition 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 taskof any node by sending a Wake-Up Signal:

    TWUSIG

    Wake-up

    delimiter

    Bus

    Sleep

    TUDEL

  • 7/28/2019 LIN Training

    33/46

  • 7/28/2019 LIN Training

    34/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    History and introduction

    Technical features

    The ISO/OSI reference model and LIN

    FramesMessage 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

    OverviewOverview

    l I N k T i i

  • 7/28/2019 LIN Training

    35/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Error typesError types

    Possible error types

    Bit Error

    Checksum Error

    Identifier-Parity Error

    Slave-Not-Responding Error

    Inconsistent-Synch Field Error

    L l I t t N t k T i iL l I t t N t k T i i

  • 7/28/2019 LIN Training

    36/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Bit ErrorBit 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 confinementThis error is detected by:

    - the master task in the master node,

    - the slave task in the slave nodewhile reading back their own transmissions.

    L l I t t N t k T i iL l I t t N t k T i i

  • 7/28/2019 LIN Training

    37/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Checksum ErrorChecksum 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 bytesand 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

    Local Interconnect Net ork TrainingLocal Interconnect Network Training

  • 7/28/2019 LIN Training

    38/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Identifier-Parity ErrorIdentifier-Parity Error

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

    Method of detection

    Calculation of parity bits from received identifier andcomparation to received parity bits.

    Fault confinement This error is detected by:

    - the master task in the master node while reading backits own transmission,

    - the slave task in the slave node while reading from the bus.

    Identifier-Parity Error

    Local Interconnect Network TrainingLocal Interconnect Network Training

  • 7/28/2019 LIN Training

    39/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Slave-Not-Responding ErrorSlave-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 taskexpects 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.

    Slave-Not-Responding Error

    Local Interconnect Network TrainingLocal Interconnect Network Training

  • 7/28/2019 LIN Training

    40/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Inconsistent-Synch-Field ErrorInconsistent-Synch-Field Error

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

    Method of detection

    Slave task detects the edges of the Synch Fieldoutside the given tolerance.

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

    Inconsistent-Synch-Field Error

    Local Interconnect Network TrainingLocal Interconnect Network Training

  • 7/28/2019 LIN Training

    41/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    Error causesError causes

    Error causes

    Local disturbance of ground potential

    Local disturbance of supply voltage

    Global electric disturbance of the bus signal

    Unsynchronized time base

    Local Interconnect Network TrainingLocal Interconnect Network Training

  • 7/28/2019 LIN Training

    42/46

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

    Local Interconnect Network TrainingLocal Interconnect Network Training

    History and introduction

    Technical features

    The ISO/OSI reference model and LIN

    FramesMessage 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

    OverviewOverview

  • 7/28/2019 LIN Training

    43/46

    Local Interconnect Network TrainingLocal Interconnect Network Training

  • 7/28/2019 LIN Training

    44/46

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

    Local Interconnect Network Trainingg

    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

    Local Interconnect Network TrainingLocal Interconnect Network Training

  • 7/28/2019 LIN Training

    45/46

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

    gg

    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

    Local Interconnect Network TrainingLocal Interconnect Network Training

  • 7/28/2019 LIN Training

    46/46

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

    gg

    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


Recommended