logo资料库

LIN_Specification_Package_2.2A.pdf

第1页 / 共194页
第2页 / 共194页
第3页 / 共194页
第4页 / 共194页
第5页 / 共194页
第6页 / 共194页
第7页 / 共194页
第8页 / 共194页
资料共194页,剩余部分请下载后查看
Specification Package
Revision history
Table of contents
1.1 LIN
1.1.1 Scope
1.1.2 Features and possibilities
1.1.3 Work flow concept
1.1.4 Node concept
1.1.5 Concept of operation
1.1.5.1 Master and slave
1.1.5.2 Frames
1.1.5.3 Data transport
1.1.5.4 Schedule table
1.1.6 Document overview
1.1.7 History and background
1.1.7.1 Compatibility with LIN 1.3
1.1.7.2 Compatibility with LIN 2.0
1.1.7.3 Compatibility with LIN 2.1
1.1.7.4 Changes between LIN 1.3 and LIN 2.0
1.1.7.5 Changes between LIN 2.0 and LIN 2.1
1.1.7.6 Changes between LIN 2.1 and LIN 2.2
1.1.8 References
1.2 LIN Glossary
Protocol Specification
2.1 Introduction
2.2 Signal Management
2.2.1 Signal types
2.2.2 Signal consistency
2.2.3 Signal packing
2.2.4 Signal reception and transmission
2.3 Frame Transfer
2.3.1 Frame structure
2.3.1.1 Break field
2.3.1.2 Sync byte field
2.3.1.3 Protected identifier field
2.3.1.4 Data
2.3.1.5 Checksum
2.3.2 Frame length
2.3.3 Frame types
2.3.3.1 Unconditional frame
2.3.3.2 Event triggered frame
2.3.3.3 Sporadic frame
2.3.3.4 Diagnostic frames
2.3.3.5 Reserved frames
2.4 Schedule tables
2.4.1 Time definitions
2.4.2 frame Slot
2.4.3 Schedule table handling
2.5 Task Behavior Model
2.5.1 Master task state machine
2.5.2 Slave task state machine
2.5.2.1 Break/sync field sequence detector
2.5.2.2 Frame processor
2.6 Network Management
2.6.1 slave communication state diagram
2.6.2 Wake up
2.6.3 Go to sleep
2.7 Status Management
2.7.1 Concept
2.7.2 Event triggered frames
2.7.3 Reporting to the cluster
2.7.4 Reporting within own node
2.8 Appendices
2.8.1 Table of numerical properties
2.8.2 Table of valid frame identifiers
2.8.3 Example of checksum calculation
2.8.4 Syntax and mathematical symbols used in this standard
Transport Layer Specification
3.1 Introduction
3.2 Transport layer
3.2.1 PDU structure
3.2.1.1 Overview
3.2.1.2 NAD
3.2.1.3 PCI
3.2.1.4 LEN
3.2.1.5 SID
3.2.1.6 D1 to D6
3.2.2 Communication
3.2.2.1 Single Frame Transmission
3.2.2.2 Multiple Frame Transmission
3.2.3 Error Handling
3.2.4 Defined requests
3.2.5 timing constraints
Node configuration and Identification Specification
4.1 Introduction
4.2 Node configuration and identification
4.2.1 LIN product identification
4.2.1.1 Wildcards
4.2.2 Slave Node model
4.2.2.1 Initial NAD
4.2.3 PDU structure
4.2.3.1 Overview
4.2.3.2 NAD
4.2.3.3 PCI
4.2.3.4 SID
4.2.3.5 RSID
4.2.3.6 D1 to D5
4.2.4 Node configuration and identification
4.2.5 Node configuration services
4.2.5.1 Assign NAD
4.2.5.2 Conditional change NAD
4.2.5.3 Data dump
4.2.5.4 Save Configuration
4.2.5.5 Assign frame ID range
4.2.6 Identification
4.2.6.1 Read by identifier
Diagnostic specification
5.1 Introduction
5.1.1 using the transport layer
5.1.2 LIN master
5.1.3 slave nodes
5.2 Diagnostic classes
5.2.1 Diagnostic Class I
5.2.1.1 Transport protocol
5.2.1.2 Diagnostic services
5.2.2 Diagnostic Class II
5.2.2.1 Transport protocol
5.2.2.2 Diagnostic services
5.2.3 Diagnostic Class III
5.2.3.1 Addressing
5.2.3.2 Transport protocol
5.2.3.3 Diagnostic services
5.2.4 Summary of slave node classes
5.2.5 Master node requirements
5.2.5.1 Transport protocol
5.2.5.2 Fault management, sensor reading, I/O control
5.2.6 User defined diagnostics
5.3 Requirements for Signal based Diagnostics
5.4 Transport Protocol handling in LIN- master
5.4.1 Diagnostic master request schedule
5.4.2 Diagnostic slave response schedule
5.4.3 Diagnostic schedule execution
5.4.3.1 Diagnostics Interleaved Mode
5.4.3.2 Diagnostics Only Mode
5.4.4 Transmission handler requirements
5.4.4.1 Master node transmission handler
5.5 Slave node transmission handler
5.6 Slave diagnostic timing requirements
Physical Layer Specification
6.1 Introduction
6.2 Physical Layer Compatibility
6.3 Bit rate Tolerance
6.4 Timing Requirements
6.4.1 Bit Timing Requirements
6.4.2 Synchronization Procedure
6.4.3 Bit Sample Timing
6.5 Line Driver/Receiver
6.5.1 General Configuration
6.5.2 Definition of Supply Voltages for the Physical Interface
6.5.3 Signal Specification
6.5.4 Electrical DC parameters
6.5.4.1 Electrical AC Parameters
6.5.5 Line Characteristics
6.5.6 Performance in non-operation supply voltage range
6.5.7 Performance during fault modes
6.5.7.1 Loss of supply voltage connection or ground connection
6.5.7.2 Bus wiring short to battery or ground
6.5.8 ESD/EMI compliance
Application Program Interface Specification
7.1 Introduction
7.1.0.1 LIN cluster generation
7.1.1 Concept of operation
7.1.1.1 LIN core API
7.1.1.2 LIN node configuration and identification API
7.1.1.3 LIN transport layer API
7.2 Core API
7.2.1 Driver and cluster management
7.2.1.1 l_sys_init
7.2.2 Signal interaction
7.2.2.1 Signal types
7.2.2.2 Scalar signal read
7.2.2.3 Scalar signal write
7.2.2.4 Byte array read
7.2.2.5 Byte array write
7.2.3 Notification
7.2.3.1 l_flg_tst
7.2.3.2 l_flg_clr
7.2.4 Schedule management
7.2.4.1 l_sch_tick
7.2.4.2 l_sch_set
7.2.5 Interface management
7.2.5.1 l_ifc_init
7.2.5.2 l_ifc_goto_sleep
7.2.5.3 l_ifc_wake_up
7.2.5.4 l_ifc_ioctl
7.2.5.5 l_ifc_rx
7.2.5.6 l_ifc_tx
7.2.5.7 l_ifc_aux
7.2.5.8 l_ifc_read_status
7.2.6 User provided call-outs
7.2.6.1 l_sys_irq_disable
7.2.6.2 l_sys_irq_restore
7.3 Node configuration and identification
7.3.1 Node configuration
7.3.1.1 ld_is_ready
7.3.1.2 ld_check_response
7.3.1.3 ld_assign_frame_id_range
7.3.1.4 ld_assign_NAD
7.3.1.5 ld_save_configuration
7.3.1.6 ld_read_configuration
7.3.1.7 ld_set_configuration
7.3.2 ld_conditional_change_NAD
7.3.3 Identification
7.3.3.1 ld_read_by_id
7.3.3.2 ld_read_by_id_callout
7.4 Transport layer
7.4.1 Raw and Cooked API
7.4.2 Initialization
7.4.3 Raw API
7.4.3.1 ld_put_raw
7.4.3.2 ld_get_raw
7.4.3.3 ld_raw_tx_status
7.4.3.4 ld_raw_rx_status
7.4.4 Cooked API
7.4.4.1 ld_send_message
7.4.4.2 ld_receive_message
7.4.4.3 ld_tx_status
7.4.4.4 ld_rx_status
7.5 Examples
7.5.1 Master node example
7.5.2 Slave node example
Node Capability Language Specification
8.1 Introduction
8.1.1 Plug and play workflow
8.1.1.1 LIN cluster Generation
8.1.1.2 LIN cluster design
8.1.1.3 Debugging
8.2 Node capability file definition
8.2.1 Global definition
8.2.1.1 Node capability language version number definition
8.2.2 Node definition
8.2.3 General definition
8.2.3.1 LIN protocol version number definition
8.2.3.2 LIN Product Identification
8.2.3.3 Bit rate
8.2.3.4 Sends wake up signal
8.2.4 Diagnostic definition
8.2.5 Frame definition
8.2.5.1 Frame properties
8.2.5.2 Signal definition
8.2.5.3 Signal encoding type definition
8.2.6 Status management
8.2.7 Free text definition
8.3 Overview of Syntax
8.4 Example file
Configuration Language Specification
9.1 Introduction
9.2 LIN description file definition
9.2.1 Global definition
9.2.1.1 LIN protocol version number definition
9.2.1.2 LIN language version number definition
9.2.1.3 LIN speed definition
9.2.1.4 Channel postfix name definition
9.2.2 Node definition
9.2.2.1 Participating nodes
9.2.2.2 Node attributes
9.2.2.3 Node composition definition
9.2.3 Signal definition
9.2.3.1 Standard signals
9.2.3.2 Diagnostic signals
9.2.3.3 Signal groups
9.2.4 Frame definition
9.2.4.1 Unconditional frames
9.2.4.2 Sporadic frames
9.2.4.3 Event triggered frames
9.2.4.4 Diagnostic frames
9.2.5 Schedule table definition
9.2.6 Additional information
9.2.6.1 Signal encoding type definition
9.2.6.2 Signal representation definition
9.3 Overview of Syntax
9.4 Examples
9.4.1 LIN description file
LIN Specification Package Revision 2.2A December 31, 2010; Page 1 LIN Specification Package Revision 2.2A © LIN Consortium, 2010. This specification as released by the LIN Consortium is intended for the purpose of information only and is provided on an "AS IS" basis only and cannot be the basis for any claims. The LIN Consortium will not be liable for any use of this Specification. The unauthorized use, e.g. copying, displaying or other use of any content from this docu- ment is a violation of the law and intellectual property rights. LIN is a registered Trademark ®. All rights reserved. All distributions are registered. Website: www.lin-subbus.org
REVISION HISTORY Date descd Issue LIN 1.0 LIN 1.1 LIN 1.2 LIN 1.3 LIN 2.0 1999-07-01 2000-03-06 2000-11-17 2002-12-13 2003-09-16 LIN Specification Package Revision 2.2A December 31, 2010; Page 2 Remark Initial Version of the LIN Specification Major Revision Step LIN 2.1 2006-11-24 LIN 2.2 2010-12-31 Clarifications, configuration modified, transport layer enhanced and diagnostics added. Updated document according to LIN 2.1 Errata sheet 1.4 Softened bit sampling specification LIN 2.2A 2010-12-31 Corrected wakeup signal definition in chapter 2.6.2 Website: www.lin-subbus.org
LIN Specification Package Revision 2.2A December 31, 2010; Page 3 TABLE OF CONTENTS Specification Package 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5.1 1.1.5.2 1.1.5.3 1.1.5.4 1.1.6 1.1.7 1.1.7.1 1.1.7.2 1.1.7.3 1.1.7.4 1.1.7.5 1.1.7.6 1.1.8 1.2 LIN ....................................................................................................10 Scope ...........................................................................................10 Features and possibilities .............................................................10 Work flow concept ........................................................................11 Node concept ...............................................................................12 Concept of operation ....................................................................12 Master and slave ..........................................................................12 Frames .........................................................................................13 Data transport...............................................................................13 Schedule table..............................................................................14 Document overview ......................................................................14 History and background................................................................14 Compatibility with LIN 1.3 .............................................................15 Compatibility with LIN 2.0 .............................................................16 Compatibility with LIN 2.1 .............................................................16 Changes between LIN 1.3 and LIN 2.0 ........................................17 Changes between LIN 2.0 and LIN 2.1 ........................................17 Changes between LIN 2.1 and LIN 2.2 ........................................18 References ...................................................................................18 LIN Glossary .....................................................................................20 Protocol Specification 2.1 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.3 2.3.1 2.3.1.1 2.3.1.2 2.3.1.3 2.3.1.4 2.3.1.5 2.3.2 2.3.3 Introduction .......................................................................................25 Signal Management..........................................................................26 Signal types ..................................................................................26 Signal consistency........................................................................26 Signal packing ..............................................................................26 Signal reception and transmission................................................27 Frame Transfer .................................................................................29 Frame structure ............................................................................29 Break field.....................................................................................30 Sync byte field ..............................................................................30 Protected identifier field ................................................................31 Data ..............................................................................................31 Checksum.....................................................................................32 Frame length ................................................................................32 Frame types..................................................................................33 Website: www.lin-subbus.org
LIN Specification Package Revision 2.2A December 31, 2010; Page 4 2.3.3.1 2.3.3.2 2.3.3.3 2.3.3.4 2.3.3.5 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.5.2 2.5.2.1 2.5.2.2 2.6 2.6.1 2.6.2 2.6.3 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 Unconditional frame......................................................................33 Event triggered frame ...................................................................34 Sporadic frame .............................................................................36 Diagnostic frames.........................................................................37 Reserved frames ..........................................................................38 Schedule tables ................................................................................39 Time definitions ............................................................................39 frame Slot .....................................................................................39 Schedule table handling ...............................................................40 Task Behavior Model ........................................................................41 Master task state machine............................................................41 Slave task state machine..............................................................41 Break/sync field sequence detector..............................................41 Frame processor ..........................................................................42 Network Management.......................................................................45 slave communication state diagram .............................................45 Wake up .......................................................................................46 Go to sleep ...................................................................................47 Status Management..........................................................................49 Concept ........................................................................................49 Event triggered frames .................................................................49 Reporting to the cluster ................................................................49 Reporting within own node ...........................................................50 Appendices .......................................................................................52 Table of numerical properties .......................................................52 Table of valid frame identifiers......................................................53 Example of checksum calculation ................................................55 Syntax and mathematical symbols used in this standard.............56 Transport Layer Specification 3.1 3.2 3.2.1 3.2.1.1 3.2.1.2 3.2.1.3 3.2.1.4 3.2.1.5 3.2.1.6 3.2.2 3.2.2.1 Introduction .......................................................................................58 Transport layer..................................................................................59 PDU structure ...............................................................................59 Overview.......................................................................................60 NAD ..............................................................................................60 PCI................................................................................................60 LEN...............................................................................................61 SID................................................................................................61 D1 to D6 .......................................................................................61 Communication.............................................................................61 Single Frame Transmission..........................................................62 Website: www.lin-subbus.org
LIN Specification Package Revision 2.2A December 31, 2010; Page 5 3.2.2.2 3.2.3 3.2.4 3.2.5 Multiple Frame Transmission .......................................................62 Error Handling ..............................................................................62 Defined requests ..........................................................................63 timing constraints..........................................................................63 Node configuration and Identification Specification 4.1 4.2 4.2.1 4.2.1.1 4.2.2 4.2.2.1 4.2.3 4.2.3.1 4.2.3.2 4.2.3.3 4.2.3.4 4.2.3.5 4.2.3.6 4.2.4 4.2.5 4.2.5.1 4.2.5.2 4.2.5.3 4.2.5.4 4.2.5.5 4.2.6 4.2.6.1 Introduction .......................................................................................67 Node configuration and identification................................................68 LIN product identification ..............................................................68 Wildcards......................................................................................68 Slave Node model ........................................................................69 Initial NAD.....................................................................................70 PDU structure ...............................................................................71 Overview.......................................................................................72 NAD ..............................................................................................72 PCI................................................................................................72 SID................................................................................................73 RSID .............................................................................................73 D1 to D5 .......................................................................................73 Node configuration and identification ...........................................74 Node configuration services .........................................................74 Assign NAD ..................................................................................74 Conditional change NAD ..............................................................75 Data dump ....................................................................................76 Save Configuration .......................................................................76 Assign frame ID range..................................................................77 Identification .................................................................................78 Read by identifier..........................................................................78 Diagnostic specification 5.1 5.1.1 5.1.2 5.1.3 5.2 5.2.1 5.2.1.1 5.2.1.2 5.2.2 5.2.2.1 5.2.2.2 Introduction .......................................................................................81 using the transport layer ...............................................................81 LIN master ....................................................................................82 slave nodes ..................................................................................82 Diagnostic classes ............................................................................83 Diagnostic Class I.........................................................................83 Transport protocol ........................................................................83 Diagnostic services.......................................................................83 Diagnostic Class II........................................................................83 Transport protocol ........................................................................83 Diagnostic services.......................................................................84 Website: www.lin-subbus.org
LIN Specification Package Revision 2.2A December 31, 2010; Page 6 5.2.3 5.2.3.1 5.2.3.2 5.2.3.3 5.2.4 5.2.5 5.2.5.1 5.2.5.2 5.2.6 5.3 5.4 5.4.1 5.4.2 5.4.3 5.4.3.1 5.4.3.2 5.4.4 5.4.4.1 5.5 5.6 Diagnostic Class III.......................................................................84 Addressing....................................................................................84 Transport protocol ........................................................................84 Diagnostic services.......................................................................85 Summary of slave node classes...................................................85 Master node requirements............................................................86 Transport protocol ........................................................................86 Fault management, sensor reading, I/O control ...........................86 User defined diagnostics ..............................................................87 Requirements for Signal based Diagnostics.....................................88 Transport Protocol handling in LIN-master .......................................90 Diagnostic master request schedule ............................................90 Diagnostic slave response schedule ............................................91 Diagnostic schedule execution .....................................................92 Diagnostics Interleaved Mode ......................................................93 Diagnostics Only Mode.................................................................95 Transmission handler requirements .............................................97 Master node transmission handler ...............................................98 Slave node transmission handler....................................................103 Slave diagnostic timing requirements .............................................107 Physical Layer Specification 6.1 6.2 6.3 6.4 6.4.1 6.4.2 6.4.3 6.5 6.5.1 6.5.2 6.5.3 6.5.4 6.5.4.1 6.5.5 6.5.6 6.5.7 6.5.7.1 6.5.7.2 6.5.8 Introduction .....................................................................................110 Physical Layer Compatibility...........................................................111 Bit rate Tolerance ...........................................................................112 Timing Requirements......................................................................114 Bit Timing Requirements ............................................................114 Synchronization Procedure ........................................................114 Bit Sample Timing ......................................................................114 Line Driver/Receiver .......................................................................117 General Configuration ................................................................117 Definition of Supply Voltages for the Physical Interface .............117 Signal Specification ....................................................................119 Electrical DC parameters............................................................120 Electrical AC Parameters ...........................................................122 Line Characteristics ....................................................................124 Performance in non-operation supply voltage range..................125 Performance during fault modes ................................................125 Loss of supply voltage connection or ground connection...........125 Bus wiring short to battery or ground..........................................126 ESD/EMI compliance..................................................................126 Website: www.lin-subbus.org
LIN Specification Package Revision 2.2A December 31, 2010; Page 7 Application Program Interface Specification 7.1 7.1.0.1 7.1.1 7.1.1.1 7.1.1.2 7.1.1.3 7.2 7.2.1 7.2.1.1 7.2.2 7.2.2.1 7.2.2.2 7.2.2.3 7.2.2.4 7.2.2.5 7.2.3 7.2.3.1 7.2.3.2 7.2.4 7.2.4.1 7.2.4.2 7.2.5 7.2.5.1 7.2.5.2 7.2.5.3 7.2.5.4 7.2.5.5 7.2.5.6 7.2.5.7 7.2.5.8 7.2.6 7.2.6.1 7.2.6.2 7.3 7.3.1 7.3.1.1 7.3.1.2 7.3.1.3 7.3.1.4 7.3.1.5 Introduction .....................................................................................128 LIN cluster generation ................................................................128 Concept of operation ..................................................................128 LIN core API ...............................................................................128 LIN node configuration and identification API.............................129 LIN transport layer API ...............................................................129 Core API .........................................................................................130 Driver and cluster management .................................................130 l_sys_init.....................................................................................130 Signal interaction ........................................................................130 Signal types ................................................................................131 Scalar signal read.......................................................................131 Scalar signal write ......................................................................131 Byte array read ...........................................................................132 Byte array write...........................................................................132 Notification..................................................................................133 l_flg_tst .......................................................................................133 l_flg_clr .......................................................................................134 Schedule management...............................................................134 l_sch_tick....................................................................................134 l_sch_set ....................................................................................135 Interface management................................................................136 l_ifc_init.......................................................................................136 l_ifc_goto_sleep..........................................................................137 l_ifc_wake_up.............................................................................137 l_ifc_ioctl.....................................................................................138 l_ifc_rx ........................................................................................138 l_ifc_tx ........................................................................................139 l_ifc_aux .....................................................................................140 l_ifc_read_status ........................................................................140 User provided call-outs...............................................................143 l_sys_irq_disable ........................................................................143 l_sys_irq_restore ........................................................................144 Node configuration and identification..............................................145 Node configuration .....................................................................145 ld_is_ready .................................................................................145 ld_check_response.....................................................................146 ld_assign_frame_id_range .........................................................146 ld_assign_NAD...........................................................................147 ld_save_configuration.................................................................147 Website: www.lin-subbus.org
LIN Specification Package Revision 2.2A December 31, 2010; Page 8 7.3.1.6 7.3.1.7 7.3.2 7.3.3 7.3.3.1 7.3.3.2 7.4 7.4.1 7.4.2 7.4.3 7.4.3.1 7.4.3.2 7.4.3.3 7.4.3.4 7.4.4 7.4.4.1 7.4.4.2 7.4.4.3 7.4.4.4 7.5 7.5.1 7.5.2 ld_read_configuration .................................................................148 ld_set_configuration ...................................................................148 ld_conditional_change_NAD ......................................................149 Identification ...............................................................................150 ld_read_by_id .............................................................................150 ld_read_by_id_callout.................................................................151 Transport layer................................................................................152 Raw and Cooked API .................................................................152 Initialization.................................................................................152 Raw API......................................................................................153 ld_put_raw ..................................................................................153 ld_get_raw ..................................................................................153 ld_raw_tx_status.........................................................................154 ld_raw_rx_status ........................................................................154 Cooked API ................................................................................155 ld_send_message ......................................................................155 ld_receive_message...................................................................156 ld_tx_status ................................................................................157 ld_rx_status ................................................................................157 Examples ........................................................................................159 Master node example .................................................................159 Slave node example ...................................................................161 Node Capability Language Specification 8.1 8.1.1 8.1.1.1 8.1.1.2 8.1.1.3 8.2 8.2.1 8.2.1.1 8.2.2 8.2.3 8.2.3.1 8.2.3.2 8.2.3.3 8.2.3.4 8.2.4 8.2.5 8.2.5.1 Introduction .....................................................................................165 Plug and play workflow...............................................................165 LIN cluster Generation................................................................165 LIN cluster design.......................................................................166 Debugging ..................................................................................166 Node capability file definition ..........................................................167 Global definition..........................................................................167 Node capability language version number definition ..................167 Node definition............................................................................167 General definition .......................................................................167 LIN protocol version number definition .......................................168 LIN Product Identification ...........................................................168 Bit rate ........................................................................................168 Sends wake up signal.................................................................168 Diagnostic definition ...................................................................168 Frame definition..........................................................................169 Frame properties ........................................................................170 Website: www.lin-subbus.org
分享到:
收藏