
Specification of LIN State Manager
AUTOSAR CP Release 4.4.0
1 of 54 Document ID 255: AUTOSAR_SWS_LIN_StateManager
- AUTOSAR Confidential -
Document Change History
Date
Release
Changed by
Change Description
2018-10-31
4.4.0
AUTOSAR
Release
Management
LIN Slave support (CONC_631)
Replaced references to Lin 2.1 by
ISO 17987:2016
Editorial changes
2017-12-08
4.3.1
AUTOSAR
Release
Management
LINSM_E_CONFIRMATION_TIME
OUT changed to Runtime Error
2016-11-30
4.3.0
AUTOSAR
Release
Management
Editorial changes
2015-07-31
4.2.2
AUTOSAR
Release
Management
Modified header file structure
Debugging support marked as
obsolete
Editorial changes
2014-10-31
4.2.1
AUTOSAR
Release
Management
Removed NULL pointer check
requirement and moved to BSW
General
Corrections in ECU parameter
configuration
2014-03-31
4.1.3
AUTOSAR
Release
Management
Editorial changes
2013-10-31
4.1.2
AUTOSAR
Release
Management
Minor bug fixes
Editorial changes
Removed chapter(s) on change
documentation
2013-03-15
4.1.1
AUTOSAR
Administration
LIN wakeup and sleep mode
handling corrected
Document Title
Specification of LIN State
Manager
Document Owner
AUTOSAR
Document Responsibility
AUTOSAR
Document Identification No
255
Document Status
Final
Part of AUTOSAR Standard
Classic Platform
Part of Standard Release
4.4.0

Specification of LIN State Manager
AUTOSAR CP Release 4.4.0
2 of 54 Document ID 255: AUTOSAR_SWS_LIN_StateManager
- AUTOSAR Confidential -
Document Change History
Date
Release
Changed by
Change Description
2011-12-22
4.0.3
AUTOSAR
Administration
Added post-build configuration
support
Added completion of Production
error concept in Com Stack
Removed local network index
2010-09-30
3.1.5
AUTOSAR
Administration
Post-build configuration variant
added
Module version check changed
according SRS_General
SRS_BSW_00004
TrcvModeType definition moved
from LinIf to LinTrcv
2010-02-02
3.1.4
AUTOSAR
Administration
Controlling of I-PDU groups has
been moved to the BSW Mode
Manager module
Interface to the LIN Transceiver
module has been introduced since
LIN Transceiver driver is a new
module in release 4.0
Legal disclaimer revised
2008-08-13
3.1.1
AUTOSAR
Administration
Legal disclaimer revised
2007-12-21
3.0.1
AUTOSAR
Administration
Initial Release

Specification of LIN State Manager
AUTOSAR CP Release 4.4.0
3 of 54 Document ID 255: AUTOSAR_SWS_LIN_StateManager
- AUTOSAR Confidential -
Disclaimer
This work (specification and/or software implementation) and the material contained
in it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR
and the companies that have contributed to it shall not be liable for any use of the
work.
The material contained in this work is protected by copyright and other types of
intellectual property rights. The commercial exploitation of the material contained in
this work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by
any means, for informational purposes only. For any other purpose, no part of the
work may be utilized or reproduced, in any form or by any means, without permission
in writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.

Specification of LIN State Manager
AUTOSAR CP Release 4.4.0
4 of 54 Document ID 255: AUTOSAR_SWS_LIN_StateManager
- AUTOSAR Confidential -
Table of Contents
1 Introduction and functional overview ................................................................... 6
1.1 Architectural overview .................................................................................. 6
1.2 Functional overview ...................................................................................... 7
2 Acronyms and abbreviations ............................................................................... 8
3 Related documentation........................................................................................ 9
3.1 Input documents ........................................................................................... 9
3.2 Related standards and norms ...................................................................... 9
3.3 Related specification .................................................................................. 10
4 Constraints and assumptions ............................................................................ 11
4.1 Limitations .................................................................................................. 11
4.2 Applicability to car domains ........................................................................ 11
5 Dependencies to other modules ........................................................................ 12
5.1 Relation to Upper layers ............................................................................. 13
5.1.1 Operating System ............................................................................... 13
5.1.2 Module DET (Default Error Tracer) ..................................................... 14
5.1.3 Module DEM (Diagnostic Event Manager) .......................................... 14
5.1.4 ComM ................................................................................................. 14
5.1.5 BSW Mode Manager ........................................................................... 14
5.2 Relation to Lower layers ............................................................................. 14
5.2.1 LinIf ..................................................................................................... 14
5.3 File structure .............................................................................................. 15
5.3.1 Code file structure ............................................................................... 15
5.3.2 Header File structure ........................................................................... 15
5.3.2.1 LinSM header files ........................................................................... 15
5.3.2.2 Included header files ....................................................................... 16
6 Requirements traceability .................................................................................. 17
7 Functional specification ..................................................................................... 20
7.1 States and transitions of the LinSM state machine .................................... 20
7.1.1 LINSM_UNINIT ................................................................................... 22
7.1.2 LINSM_INIT ........................................................................................ 23
7.1.3 LINSM_NO_COM ............................................................................... 23
7.1.4 LINSM_FULL_COM ............................................................................ 24
7.1.5 Goto sleep ........................................................................................... 25
7.1.5.1 Goto sleep specific for master node ................................................ 25
7.1.5.2 Goto sleep specific for slave node ................................................... 26
7.1.6 Changing schedule table (Master only) ............................................... 27
7.1.7 Wake up process ................................................................................ 27
7.1.8 Timeout of requests ............................................................................ 28
7.1.8.1 Wakeup repetition for slave nodes .................................................. 30
7.2 Handling multiple networks and drivers ...................................................... 30
7.2.1 Multiple networks ................................................................................ 30
7.3 Error classification ...................................................................................... 31
7.3.1 Development Errors ............................................................................ 31

Specification of LIN State Manager
AUTOSAR CP Release 4.4.0
5 of 54 Document ID 255: AUTOSAR_SWS_LIN_StateManager
- AUTOSAR Confidential -
7.3.2 Runtime Errors .................................................................................... 31
7.3.3 Transient Faults .................................................................................. 31
7.3.4 Production Errors ................................................................................ 31
7.3.5 Extended Production Errors ................................................................ 32
7.4 Error detection ............................................................................................ 32
7.5 Error notification ......................................................................................... 32
8 API specification ................................................................................................ 33
8.1 Imported types............................................................................................ 33
8.1.1 Standard types .................................................................................... 33
8.2 Type definitions .......................................................................................... 33
8.2.1 LinSM_ModeType ............................................................................... 33
8.2.2 LinSM_ConfigType .............................................................................. 33
8.3 LinSM API .................................................................................................. 34
8.3.1 LinSM_Init ........................................................................................... 34
8.3.2 LinSM_ScheduleRequest .................................................................... 34
8.3.3 LinSM_GetVersionInfo ........................................................................ 35
8.3.4 LinSM_GetCurrentComMode .............................................................. 36
8.3.5 LinSM_RequestComMode .................................................................. 37
8.4 Scheduled Functions .................................................................................. 38
8.4.1 LinSM_MainFunction .......................................................................... 38
8.5 LinSM callbacks ......................................................................................... 38
8.5.1 LinSM_ScheduleRequestConfirmation ............................................... 38
8.5.2 LinSM_GotoSleepIndication ................................................................ 39
8.5.3 LinSM_GotoSleepConfirmation ........................................................... 40
8.5.4 LinSM_WakeupConfirmation............................................................... 40
8.6 Mandatory Interfaces .................................................................................. 41
8.7 Optional Interfaces ..................................................................................... 42
8.8 Configurable Interfaces .............................................................................. 42
9 Sequence diagrams .......................................................................................... 43
9.1 Goto-sleep process .................................................................................... 44
9.1.1 Master ................................................................................................. 44
9.1.2 Slave ................................................................................................... 44
9.2 Internal wake up ......................................................................................... 46
9.3 Schedule switch (Master only).................................................................... 47
10 Configuration specification ............................................................................. 48
10.1 How to read this chapter ............................................................................ 48
10.2 Containers and configuration parameters .................................................. 48
10.2.1 Configuration Tool ............................................................................... 48
10.3 LinSM_Configuration .................................................................................. 48
10.3.1 LinSM .................................................................................................. 48
10.3.2 LinSMConfigSet .................................................................................. 49
10.3.3 LinSMChannel ..................................................................................... 49
10.3.4 LinSMGeneral ..................................................................................... 51
10.3.5 LinSMSchedule ................................................................................... 52
10.4 Published Information ................................................................................. 53
11 Not applicable requirements .......................................................................... 54