Autosar Srs Lin
Autosar Srs Lin
AUTOSAR CP R20-11
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.
Table of Contents
Note: The ISO 17987 specifications cover ISO 14229-7 [8] and the behavior of
previous versions of LIN specifications: LIN 2.2, LIN 2.1, LIN 2.0 and LIN 1.3 by LIN
Consortium. See Annex B of ISO 17987-3 [7] for compatibility information.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted. Note that the requirement level of the document in
which they are used modifies the force of these words.
MUST: This word, or the terms "REQUIRED" or "SHALL", mean that the
definition is an absolute requirement of the specification.
MUST NOT: This phrase, or the phrase „SHALL NOT“, means that the
definition is an absolute prohibition of the specification.
SHOULD: This word, or the adjective "RECOMMENDED", mean that there
may exist valid reasons in particular circumstances to ignore a particular item,
but the full implications must be understood and carefully weighed before
choosing a different course.
SHOULD NOT: This phrase, or the phrase "NOT RECOMMENDED" mean
that there may exist valid reasons in particular circumstances when the
particular behavior is acceptable or even useful, but the full implications
should be understood and the case carefully weighed before implementing
any behavior described with this label.
MAY: This word, or the adjective „OPTIONAL“, means that an item is truly
optional. One vendor may choose to include the item because a particular
marketplace requires it or because the vendor feels that it enhances the
product while another vendor may omit the same item. An implementation,
which does not include a particular option, MUST be prepared to interoperate
with another implementation, which does include the option, though perhaps
with reduced functionality. In the same vein an implementation, which does
include a particular option, MUST be prepared to interoperate with another
implementation, which does not include the option (except, of course, for the
feature the option provides.)
Each module specific chapter contains a short functional description of the Basic
Software Module. Requirements of the same kind within each chapter are grouped
under the following headlines (where applicable):
The subchapters are only applied, if they are needed. See following structure.
- Non-functional requirements
- Functional requirements
- Configuration
- Initialization
- Normal Operation
- Fault Operation
- Shutdown Operations
Acronym: Description:
LIN-PDU LIN Protocol Data Unit is the LIN header and the LIN response, i.e.
Break, synch, PID, Data (1-8) and checksum
In the ISO 17987 specifications, this is called just frame. LIN_PDU is
more precise and omits confusion.
LIN-SDU LIN Service Data Unit. The data-part of the LIN response.
Schedule Table A Schedule Table determines the traffic on a LIN bus (one channel).
One LIN bus could have more than one Schedule Table.
Schedule Table Handler The Schedule Table Handler is placed at the LIN Interface of a LIN
master node. It will initiate LIN-PDU’s and confirm/indicate LIN-PDU’s. It
will be called by upper layers.
Schedule Table Manager Keeps track of all available schedule and processes the active schedule
table in a LIN master node.
LIN Driver Module name Lin. Describes the Software Driver.
LIN Interface Module name LinIf. LIN Interface, describes the ISO 17987 protocol
communication stack.
Sleep-mode In the ISO 17987 specifications the term stand-by and sleep-mode is
used in similar manner. To be consequent here only sleep-mode is
used.
Abbreviation: Description:
LIN Local Interconnect Network
FF First Frame
CF Consecutive Frames
SF Single Frames
N_PDU Network Protocol Data Unit
PDUR Protocol Data Unit Router
N_SDU Network Service Data Unit
N_TA Extended Addressing Mode Connection
UART Universal Asynchronous Receiver Transmitter. Dear children have many
names, it is also known as SCI and ESCI.
MRF Master Request Frame
SRF Slave Response Frame
4 Requirements Specification
4.1 Functional requirements
The remaining chapters in the ISO 17987 specifications will not be reused
as is. Refer to the corresponding LIN Driver and Interface sections for the
exact details.
There are optional functionality in the ISO 17987 specifications (e.g. in the
configuration):
- All other optional functionality is decided by the design.
The usage of nodes with previous LIN versions is already covered with the
ISO 17987 specifications.
Each ISO 17987 LIN Master will support both models to assign LIN IDs (
"2.0" and "2.1 or later" ), the enhanced checksum for LIN 2.x/ISO 17987
and the classic checksum for LIN 1.x slaves and diagnostic messages (see
ISO 17987-3 [7] clause 5.2.2.7 Checksum)
The checksum models (classic and enhanced) will be configurable for each
LIN ID, except for the reserved LIN ID’s (MRF and SRF)
Use Case: --
Dependencies: [SRS_Lin_01577], [SRS_Lin_01578], [SRS_Lin_01579]
Supporting Material: ISO 17987 specifications
⌋(RS_BRF_01768)
Rationale: Modelling and implementation of LIN slave nodes according to LIN 1.3, LIN
2.0, LIN2.1, LIN2.2 and ISO 17987.
Use Case: --
Dependencies: --
Supporting Material: Concept 631 “LIN Slave Support”
⌋( RS_BRF_01768)
4.1.1.1.4 [SRS_Lin_01594] LIN slave shall support the node configuration and
identification services for slave nodes.
⌈
Type: Valid
Description: This requirement is only applicable to LIN slave nodes.
LIN slave nodes shall support the mandatory node configuration and
identification services to assign frame IDs and to retrieve the node
identification information. LIN slave nodes shall also support the assign
10 of 35 Document ID 42: AUTOSAR_SRS_LIN
Requirements on LIN
AUTOSAR CP R20-11
4.1.1.2 Initialization
4.1.1.2.1 [SRS_Lin_01590] The node configuration of LIN slaves shall only be done via
defined schedule table(s) in master nodes.
⌈
Type: Valid
Description: The AUTOSAR LIN should cover the “normal” behavior to do the
configuration (assign Ids, NADs, …) of LIN slaves.
The data from the LIN Driver shall be copied consistently to the upper
layers after reception.
The consistent coping includes the payload (data) and the flags.
Rationale: Basic functionality. Guarantee 100% message LIN-SDU consistency for
transmission and reception.
⌈
Type: Valid
Description: If a wakeup occurs during transition to sleep-mode, the affected channels
shall go back to the running mode. The upper layer shall be notified.
In detail:
If an upper layer wake-up is received during Stop:
Stop process should be completed, and network affected LIN cluster
started afterwards.
If a bus wake-up is received during Stop:
Stop operation should be cancelled, and upper layer notified.
Rationale: Safe wakeup and sleep handling.
Use Case: The following use-cases shall be detected for LIN master nodes:
If the master is processing the go-to-sleep command and the upper layer
requests a wakeup.
None
4.1.2.1.2 [SRS_Lin_01551] One LIN Interface shall support one or more LIN Drivers.
⌈
Type: Valid
Description: There shall only be one instance of the LIN Interface in each ECU.
One ECU might contain more than one LIN channel. Thus the LIN Interface
shall support one or more LIN Drivers.
Rationale: Devices, which use more than one LIN channels, exist on the market.
Use Case: --
Dependencies: --
Supporting Material: --
⌋( RS_BRF_01768)
4.1.2.2 Initialization
4.1.2.2.1 [SRS_Lin_01569] The LIN Interface shall support initialization of each LIN
channel separately
⌈
13 of 35 Document ID 42: AUTOSAR_SRS_LIN
Requirements on LIN
AUTOSAR CP R20-11
Type: Valid
Description: The LIN Interface shall support initialization of each LIN channel
separately.
The selection of at least one static configuration set shall be done by a
parameter.
Rationale: --
Use Case: If there are more than one LIN channels, than there exist more than one
LDF-files.
Dependencies: --
Supporting Material: Comparing with the ISO 17987 specifications’ APIs, the LIN Interface init
will do both work of l_ifc_init and l_sys_init
⌋( RS_BRF_01768, RS_BRF_01136,RS_BRF_01096)
The selection of the appropriate configuration set itself as well as the way
to incorporate the configuration sets into the ECU (Post-Build, Pre-
Compile) is not affected by this requirement.
Rationale: Support of different configurations during runtime
Use Case: --
Dependencies: --
Supporting Material: --
⌋( RS_BRF_01768,RS_BRF_01136)
The schedule table manager will keep schedule table to execute. The
schedule table manager shall:
Be able to receive requests from an upper layer which schedule
table to execute
Keep a list of schedule table
Execute a schedule table once or continuously
4.1.2.3.2 [SRS_Lin_01546] The LIN Interface shall contain a Schedule Table Handler
for LIN master nodes.
⌈
Type: Valid
Description: This requirement is only applicable to LIN master nodes.
The schedule table handler will handle the transmission and reception of
the LIN-PDUs on the LIN bus. It will query the Schedule table manager
when active schedule table has reached the point to start transmission or
reception of the LIN-PDU (i.e. when a schedule entry is due). The schedule
table handler shall notify the upper layer about a successful / erroneous
LIN-PDU transfer / reception through callbacks.
The ISO 17987 specifications define that the change of a schedule table
occur at the end of a timeslot.
The recommendation:
A schedule table change from a “continuously execution schedule table" to
a "execution one time schedule table” should occur at the next timeslot.
A schedule table change from a "execution one time schedule table” to a
“continuously execution schedule table" or other "execution one time
schedule table” should occur at the end of the current schedule table.
Rationale: --
Use Case: --
Dependencies: [SRS_Lin_01564]
Supporting Material: ISO/TR 17987-5 [9], clause 4.3.6.1 (LIN API l_sch_tick)
⌋( RS_BRF_01768, RS_BRF_01592)
4.1.2.3.3 [SRS_Lin_01561] The LIN Interface shall define a main function per channel
⌈
Type: Valid
Description: For LIN master nodes, the main function is responsible for executing the
schedule table handler for the corresponding channel.
For LIN slave nodes, the main function is responsible for timeout
observation for the corresponding channel.
15 of 35 Document ID 42: AUTOSAR_SRS_LIN
Requirements on LIN
AUTOSAR CP R20-11
Rationale: --
Use Case: If an ECU is connected to three LIN buses there are three main functions
that execute corresponding schedule table for each channel.
Dependencies: [SRS_Lin_01546]
Supporting Material: --
⌋( RS_BRF_01768, RS_BRF_01056)
4.1.2.3.4 [SRS_Lin_01549] The LIN Interface needs to use a timer service for
scheduling for LIN master nodes
⌈
Type: Valid
Description: This requirement is only applicable to LIN master nodes.
The LIN Interface needs to use a timer service for scheduling. The LIN-
PDU transmission and reception must be transported at the right time.
The main function is taking care of the schedule handler, so it means that
this function must be called with a given period.
Rationale: To uphold normal communication.
Use Case: --
Dependencies: [SRS_Lin_01561]
Supporting Material: This is adequate to the “time base” that is defined in the ISO 17987-2 [6],
clause 12 LIN description file (LDF).
⌋( RS_BRF_01768, RS_BRF_01592)
For LIN master nodes, this service allows an upper layer to request the LIN
interface for a Sporadic LIN-PDU transmission.
For LIN slave nodes, this service allows an upper layer to request the LIN
interface for an unconditional LIN response transmission that is allocated to
an event-triggered frame.
The LIN Interface transmits the LIN response after the LIN header of the
event-triggered frame (to which the LIN-PDU is allocated to) was received.
Rationale: To enable the Sporadic and Event-triggered LIN-PDU behavior in
AUTOSAR
Use Case: --
Dependencies: --
Supporting Material: ISO 17987-3 [7], clause 5.2.4.3 Event-triggered frame and clause 5.2.4.4
Sporadic frame
⌋( RS_BRF_01768, RS_BRF_01592,RS_BRF_01544)
4.1.2.3.6 [SRS_Lin_01514] The LIN Interface shall inform an upper layer about wake-
up events
16 of 35 Document ID 42: AUTOSAR_SRS_LIN
Requirements on LIN
AUTOSAR CP R20-11
⌈
Type: Valid
Description: The LIN Interface shall inform an upper layer if a wake-up request was
notified by the underlying LIN Driver.
Rationale: Basic functionality
Use Case: Wakeup of ECU by LIN. Inform upper layer (ECU State Manager) about the
wakeup reason
Dependencies: --
Supporting Material: ECU state manager
⌋( RS_BRF_01768, RS_BRF_01104, RS_BRF_01064)
4.1.2.3.7 [SRS_Lin_01515] The LIN Interface shall provide an API to wake-up a LIN
channel cluster
⌈
Type: Valid
Description: The LIN Interface shall provide an API to wake-up a LIN channel cluster.
The LIN Interface shall support that each LIN channel cluster can be woken
up separately.
Rationale: Wake-up of LIN by upper layer.
Use Case: --
Dependencies: --
Supporting Material: ISO/TR 17987-5 [9], clause 4.3.7.4 (LIN API l_ifc_wake_up) and ISO
17987-3 [7], clause 5.3 Wake up
⌋( RS_BRF_01768, RS_BRF_01104)
4.1.2.3.8 [SRS_Lin_01502] The LIN Interface shall support an API for RX/TX
notifications.
⌈
Type: Valid
Description: The PDU router provides APIs for RX notification and TX confirmation. The
LIN Interface shall use this API.
Rationale: This allows a clear interface to the upper layers (PDU router).
Use Case: LIN node implementation with e.g. gateway to other bus systems.
Dependencies: --
Supporting Material: --
⌋( RS_BRF_01768,RS_BRF_01064,RS_BRF_01544)
4.1.2.3.9 [SRS_Lin_01558] The LIN Interface shall check for successful data transfer
for LIN master nodes
⌈
Type: Valid
Description: This requirement is only applicable to LIN master nodes.
The LIN Interface shall query the LIN driver if the last message is
successful transmitted or received on the LIN bus. This check shall be
done by the schedule table handler.
The schedule table handler may also check if the LIN-PDU violates the
maximum frame length. It is however not recommended since the overhead
is too big and that all nodes in a LIN channel cluster shall conform to the
ISO 17987-6 [10] (Data Link Layer (DLL), Network Management and Node
Configuration (NMNC) test specification).
4.1.2.3.10 [SRS_Lin_01595] The LIN Interface shall support the setting and clearing of
the response error signal for LIN slave nodes.
⌈
Type: Valid
Description: This requirement is only applicable to LIN slave nodes.
For LIN slave nodes, the LIN interface shall set and clear the response
error signal according to the conditions described by the LIN standard.
Rationale: Implementation of the LIN standard.
Use Case: Basic functionality and support of LIN conformance test.
The LIN master node shall be informed about communication errors
detected by the slave node.
Dependencies: --
Supporting Material: ISO17987-3 [7] specification
⌋( RS_BRF_01768)
LIN Master nodes send a go-to-sleep command when entering sleep state.
Rationale: Basic functionality
Use Case: --
Dependencies: --
Supporting Material: ISO 17987 specifications
⌋( RS_BRF_01768, RS_BRF_01104)
4.1.2.4.2 [SRS_Lin_01596] The LIN Interface shall provide bus idle condition
observation for slave nodes.
18 of 35 Document ID 42: AUTOSAR_SRS_LIN
Requirements on LIN
AUTOSAR CP R20-11
⌈
Type: Valid
Description: This requirement is only applicable to LIN slave nodes.
For LIN slave nodes, the LIN interface shall observe each LIN bus for
communication. If no communication occurs for a configurable time, the LIN
interface shall inform the upper layer about the sleep state of the LIN bus.
Rationale: Implementation of the LIN standard.
Use Case: Basic functionality and support of LIN conformance test.
If communication with the master node is not possible anymore, e.g. due to
a defect master node or disturbed or broken bus line, the slave node shall
transit to sleep state.
Dependencies: --
Supporting Material: ISO17987-2 [6] specification
⌋( RS_BRF_01768, RS_BRF_01104)
none
If a LIN Hardware (e.g. LIN controller) is used, parts of the Task Behavior
Model runs in hardware
Dependencies: --
Supporting Material: ISO 17987-3 [7]
⌋( RS_BRF_01768)
4.1.3.1.2 [SRS_Lin_01553] The LIN Driver shall fulfill the general SPAL requirements
for Basic Software Modules.
⌈
Type: Valid
Description: The LIN Driver shall fulfill the general SPAL requirements for Software
Modules as specified in AUTOSAR_SRS_SPAL_General.SRS
Rationale: Re-use of requirements valid for all low level Drivers
Use Case: LIN Driver is in the same layer as the SPAL Drivers (e.g.: SPI, ADC).
19 of 35 Document ID 42: AUTOSAR_SRS_LIN
Requirements on LIN
AUTOSAR CP R20-11
4.1.3.1.4 [SRS_Lin_01503] An API shall exist that enables the LIN driver to directly
copy up to 8 byte directly from/to the frame buffers.
⌈
Type: Valid
Description: AUTOSAR COM creates the frames to be sent via CAN, LIN and other
busses. The frames are transferred “as a block” to the lower layer. The
CAN/LIN layers have therefore a need for an efficient read/write access of
whole frame buffers (1 to 8 bytes).
Rationale: Same behavior for AUTOSAR COM independently if
reception/transmission is CAN or LIN based.
Use Case: --
Dependencies: --
Supporting Material: --
⌋( RS_BRF_01768)
4.1.3.1.5 [SRS_Lin_01555] The LIN driver shall have an interface to retrieve transmit /
receive notifications.
⌈
Type: Valid
Description: For LIN master nodes, the LIN Interface shall be able to poll the LIN Driver
for transmit/receive notifications.
4.1.3.1.6 [SRS_Lin_01547] The LIN Driver shall support standard UART and LIN
optimized HW
⌈
Type: Valid
Description: The LIN Driver is responsible to handle the frame according to the
hardware.
It should be possible to support the complete the range of hardware from
implementation using an UART to a complex LIN hardware controller.
Using SW UART’s is out of the scope.
Rationale: Implement a common driver interface.
The LIN Driver will process the complete frame by it self.
Use Case: --
Dependencies: --
Supporting Material: --
⌋( RS_BRF_01768)
4.1.3.2 Initialization
4.1.3.2.1 [SRS_Lin_01572] The LIN Driver shall support the initialization of each LIN
channel separately
⌈
Type: Valid
Description: The LIN Driver shall support the initialization of each LIN channel
separately.
The selection of at least one static configuration set shall be done by a
parameter.
Rationale: Hardware specific initialization of the UART, LIN controller. Initiation of
variables used in the LIN driver.
Use Case: If there are e.g. 2 LIN channels than there are also 2 different configuration
files.
Dependencies: --
Supporting Material: --
⌋( RS_BRF_01056, RS_BRF_01136)
The selection of the appropriate configuration set itself as well as the way
to incorporate the configuration sets into the ECU (Post-Build, Pre-
Compile) is not affected by this requirement.
Rationale: Support of different configurations during runtime
Use Case: --
Dependencies: --
Supporting Material: --
⌋( RS_BRF_01152)
4.1.3.3.2 [SRS_Lin_01556] One LIN driver shall be able to handle more than one LIN
channel
⌈
Type: Valid
Description: One LIN driver shall able to handle more than one LIN channel if the
underlying hardware is equipped with more than one identical LIN
controllers.
Rationale: Portability
Use Case: If an ECU uses two channels and it contains two identical UART hardware
modules there is only one LIN driver interfacing both UARTs
Dependencies: --
Supporting Material: --
⌋( RS_BRF_01768)
4.1.3.4.2 [SRS_Lin_01524] The LIN Driver shall be able to put the LIN hardware to a
reduced power operation mode if needed
⌈
Type: Valid
Description: When going to sleep-mode mode, the LIN Driver shall put the
corresponding LIN hardware to a reduced power operation mode if
supported by hardware.
This command shall be possible to be activated for each channel
independently.
This requirement does not conflict to [SRS_Lin_01566]. This requirement
[SRS_Lin_01524] enables the Power Mode in the LIN hardware the other
requirement [SRS_Lin_01566] sets the LIN driver in sleep-mode mode.
Rationale: Power saving
Use Case: --
Dependencies: [SRS_Lin_01566]
Supporting Material: --
⌋( RS_BRF_01768,RS_BRF_01104)
4.1.3.5.1 [SRS_Lin_01526] The LIN Driver shall provide a status for error events on
the bus.
⌈
Type: Valid
Description: The LIN driver shall provide an API that returns the errors detected in the
LIN communication. When the call is made the error-flags shall be reset.
Each LIN channel shall be capable to notify its errors separately to the LIN
interface
Rationale: Bus error handling
Use Case: --
Dependencies: --
Supporting Material: Similar to the l_ifc_read_status function (ISO/TR 17987-5 [9], clause
4.3.7.9)
⌋( RS_BRF_01768)
4.1.4.2 Configuration
4.1.4.2.1 [SRS_Lin_01580] The LIN Transceiver Driver shall support separate
configuration parameters per bus
⌈
Type: Valid
Description: The bus transceiver driver shall offer configuration parameters that are
needed to configure the driver for a given bus and the supported
notifications
Typical parameters are:
- Wakeup by bus
- Transceiver control via SPI or port pin
- Call context of the notification functions (ISR, polling) to enable detection
of necessary data consistency mechanisms during configuration time
Please refer to the corresponding software specification for a more detailed
view
Rationale: Basic functionality for transceiver configuration.
Use Case: --
Dependencies: --
Supporting Material: --
⌋( RS_BRF_01768)
4.1.4.2.2 [SRS_Lin_01581] The LIN transceiver driver shall support the configuration
for more than one channel
⌈
Type: Valid
Description: The driver shall be able to support multiple LIN busses on the ECU.
It must be possible to configure the used transceiver type independently for
each bus. Only Pre-Compile-Time configuration shall be possible
4.1.4.3 Initialization
4.1.4.3.1 [SRS_Lin_01583] The LIN Transceiver Driver shall provide an API for
initialization.
⌈
Type: Valid
Description: The bus transceiver driver shall provide an API to initialize the driver
internally and set then all attached transceivers in their pre-selected
operation modes
The driver must be initialized during the power-up/reset sequence of the
ECU.
Depending on the used drivers to control the transceivers (e.g. DIO, SPI),
they must be already available and working when the transceiver driver is
initialized.
The wakeup reason has to be detected and stored during the execution of
the driver initialization, too
Rationale: Set bus transceivers and driver in a pre-defined and known state
Use Case: Basic functionality for transceiver control.
Dependencies: [SRS_Lin_01588]
The bus transceiver driver setup information must provide the necessary
configuration data to enable the generation tool to select the appropriate
control mechanism (e.g. SPI, I/O ports) and to guarantee the correct
allocation of the necessary communication resources and initialization
sequences.
Supporting Material: --
⌋( RS_BRF_01768,RS_BRF_01136)
This will ease up the implementation of wakeup and sleep concepts within
the AUTOSAR BSW stack
Rationale: Better usage of transceiver functionality in the complex AUTOSAR BSW
environment.
Use Case: Atomic transition to other operation mode; easier and better abstraction for
upper layers like the ECU state manager or ComManager.
Improved testability compared to asynchronous handling.
Dependencies: ECU state manager, NM. SPAL in case a transceiver is connected via SPI
Supporting Material: --
⌋( RS_BRF_01768)
4.1.4.4.2 [SRS_Lin_01584] The bus transceiver driver shall support an API to send the
addressed transceiver into its Standby mode.
⌈
Type: Valid
Description: Many transceivers support the transition to the Sleep mode only via the
transition to Standby mode. In addition, some power concepts have the
need to set the transceiver to Standby only instead of Sleep mode.
Not all transceivers will support such a state. If this is true for a given
device, the driver shall confirm the state transition with success
Rationale: Implementation of ECU low power modes with wakeup via bus and internal.
25 of 35 Document ID 42: AUTOSAR_SRS_LIN
Requirements on LIN
AUTOSAR CP R20-11
Use Case: The upper service layers agreed together with other nodes to set the bus
into the sleep mode. The transceiver shall be switched now to a state
where the wakeup via bus is supported and the power consumption is as
low as possible for the current state of the ECU.
Dependencies: [SRS_Lin_01585]
Supporting Material: --
⌋( RS_BRF_01768, RS_BRF_01104)
4.1.4.4.3 [SRS_Lin_01585] The bus transceiver driver shall support an API to send the
addressed transceiver into its Sleep mode.
⌈
Type: Valid
Description: The transition to sleep mode will be requested with this API.
Not all transceivers will support such a state. If this is true for a given
device, the drive shall confirm the state transition with success
Rationale: Implementation of ECU low power modes with wakeup via bus and internal.
Use Case: The upper service layers agreed together with other nodes to set the bus
into the sleep mode. The transceiver is already in StandBy and shall be
switched to Sleep with lowest power consumption.
Please note that the state sleep of the transceiver is often similar to the
state “unpowered” of the ECU.
Dependencies: [SRS_Lin_01584]
Supporting Material: --
⌋( RS_BRF_01768,RS_BRF_01104)
4.1.4.4.4 [SRS_Lin_01586] The bus transceiver driver shall support an API to send the
addressed transceiver into its Normal mode.
⌈
Type: Valid
Description: All transceivers support this state due to it’s the “working state”
Rationale: Communication!
Use Case: All communication must be enable to communicate.
Dependencies: --
Supporting Material: --
⌋( RS_BRF_01768,RS_BRF_01104)
4.1.4.4.5 [SRS_Lin_01587] The LIN Transceiver Driver shall support an API to read out
the current operation mode.
⌈
Type: Valid
Description: The bus transceiver driver shall support an API to read out the current
operation mode of the transceiver of a specified bus within the ECU.
The current operation mode of the transceiver will be necessary for upper
layers (e.g. diagnostics). The API shall always return the current state seen
by the transceiver driver (this may be a locally stored state, too)
Rationale: State access to transceiver driver
Use Case: Check for current operational mode during development and via diagnostic
command.
Dependencies: --
Supporting Material: --
26 of 35 Document ID 42: AUTOSAR_SRS_LIN
Requirements on LIN
AUTOSAR CP R20-11
⌋( RS_BRF_01768)
4.1.4.4.6 [SRS_Lin_01588] The LIN Transceiver Driver shall support an API to read out
the the reason of the last wakeup.
⌈
Type: Valid
Description: The bus transceiver driver shall support an API to read out the reason of
the last wakeup of a specified bus within the ECU.
The transceiver driver shall be able to store the local view “who has
requested the wakeup: bus or internally”.
- Bus: The bus has caused the wakeup.
- Internally: The wakeup has been caused by software
- Sleep: The transceiver is in operation mode sleep and no wakeup has
been occurred.
- Wake pin: An edge on the wake pin of the transceiver (if present) has
caused the wakeup.
The wakeup reason should be “sleep” when the operation mode is not
Normal and no wakeup has been occurred.
When a wakeup has occurred, the API shall always return the first detected
wakeup reason (e.g. if a wakeup by bus occurs and than nearly at the
same time an internal wakeup, the wakeup reason is “bus”.).
After leaving the operation mode Normal, the wakeup reason shall be set to
“sleep” again
Rationale: Detection of wakeup reason during development and via diagnostic
command. May also be used by the NM or ECU state manager.
Use Case: --
Dependencies: --
Supporting Material: --
⌋( RS_BRF_01768,RS_BRF_01104)
4.1.4.4.7 [SRS_Lin_01589] The bus transceiver driver shall support an API to enable
and disable the wakeup notification for each bus separately.
⌈
Type: Valid
Description: To enable upper layers to command the bus transceiver safe into its
standby and/or sleep state, an additional API to disable and enable the
wakeup notification is necessary.
If the notification is disabled, driver shall not perform the notification but
store the event internally until the notification is enabled again. The
notification shall then be processed immediately.
It shall be possible to clear a pending wakeup event. If no further wakeup
event occurs, no notification shall be performed after enabling the
notification again. If a further wakeup event occurs it shall be notified
Rationale: Safe wakeup and sleep handling.
Use Case: All busses with a wakeup by bus are affected.
Dependencies: --
Supporting Material: --
⌋( RS_BRF_01768,RS_BRF_01104)
4.1.5.1 Configuration
None
None
4.2.3 Driver
None
Dependencies: --
Supporting Material: ISO 17987-2 [6]
ISO 17987-3 [7]
ISO 14229-7 [8]
⌋( RS_BRF_01768)
4.2.4.2 Initialization
4.2.4.2.1 [SRS_Lin_01540] The LIN Transport Layer shall provide an API for
initialization.
⌈
Type: Valid
Description: The LIN Transport Layer shall support an API for initialization.
This service shall initialize all global variables of the module and set all
transport protocol connections in a default state. If there is an ongoing TP
session it shall be immediately stopped.
Rationale: --
Use Case: --
Dependencies: --
Supporting Material: --
⌋( RS_BRF_01768,RS_BRF_01136)
4.2.4.2.2 [SRS_Lin_01545] The LIN Transport Layer services shall not be operational
before initializing the module.
⌈
Type: Valid
Description: Before using the transmission capabilities of the LIN Transport Layer, It
shall be initialized. If it is not the case, the services have to return an error.
Rationale: To avoid usage of the module without a complete initialization this could
cause the transmission of corrupted frames.
Use Case: --
Dependencies: --
Supporting Material: --
⌋( RS_BRF_01768,RS_BRF_01096)
4.2.4.3.2 [SRS_Lin_01592] The AUTOSAR LIN Transport Layer shall support the
transmission of functional requests at any time for master nodes.
⌈
Type: Valid
Description: This requirement is only applicable to LIN master nodes.
4.2.4.3.5 [SRS_Lin_01591] The LIN Interface shall take care of the behavior of the
master node transmission handler for master nodes.
⌈
Type: Valid
Description: This requirement is only applicable to LIN master nodes.
Rationale: The LIN Transport layer module shall have the specified needed
information to manage a transport connection.
Use Case: This information can be used at generation time to check the network
configuration with a TP point of view.
Dependencies: --
Supporting Material: ISO 17987-2 [6], clause 9.6 and 9.7.2
⌋( RS_BRF_01768)
4.2.4.3.6 [SRS_Lin_01597] The Lin Interface shall take care of the behavior of the
slavenode transmission handler for slave nodes.
⌈
Type: Valid
Description: This requirement is only applicable to LIN slave nodes.
Type: Valid
Description: In case of reception of unexpected N_PDU it shall respect the behavior
defined in clause 7.6.4 (unexpected arrival of N_PDU) of the ISO 17987-2
[6]. For others errors, just aborts the segmentation session.
Rationale: This is an extension to the LIN specification since it does not describe how
to handle error situations occurred during transportation of a TP message.
Dependencies: --
Supporting Material: ISO 17987-2 [6], clause 7.6.4.
⌋( RS_BRF_01768)
4.3 References
[6] ISO 17987-2:2016 Road vehicles – Local Interconnect Network (LIN) – Part 2:
Transport protocol and network layer services
[7] ISO 17987-3:2016 Road vehicles – Local Interconnect Network (LIN) – Part 3:
Protocol specification
[8] ISO 14229-7:2015 Road vehicles – Unified diagnostic services (UDS) – Part 7:
UDS on local interconnect network (UDSonLIN)
[9] ISO/TR 17987-5:2016 Road vehicles – Local Interconnect Network (LIN) – Part 5:
Application programmers interface (API)
[10] ISO 17987-6:2016 Road vehicles – Local Interconnect Network (LIN) – Part 6:
Protocol conformance test specification
Note: Non-ISO LIN specifications (LIN 2.2A and LIN 2.1 by LIN Consortium) are
available at <https://www.lin-cia.org/standards/>, even after closure of the LIN
Consortium.
5 Requirements Tracing
Requirement Description Satisfied by
RS_BRF_01000 AUTOSAR architecture SRS_Lin_01552, SRS_Lin_01553, SRS_Lin_01568
shall organize the BSW in
a hardware independent
and a hardware
dependent layer
RS_BRF_01056 AUTOSAR BSW modules SRS_Lin_01561, SRS_Lin_01572
shall provide standardized
interfaces
RS_BRF_01064 AUTOSAR BSW shall SRS_Lin_01502, SRS_Lin_01514, SRS_Lin_01563
provide callback functions
in order to access upper
layer modules
RS_BRF_01096 AUTOSAR shall support SRS_Lin_01545, SRS_Lin_01569
start-up and shutdown of
ECUs
RS_BRF_01104 AUTOSAR shall support SRS_Lin_01514, SRS_Lin_01515, SRS_Lin_01523,
sleep and wake-up of SRS_Lin_01524, SRS_Lin_01560, SRS_Lin_01563,
ECUs and buses SRS_Lin_01566, SRS_Lin_01584, SRS_Lin_01585,
SRS_Lin_01586, SRS_Lin_01588, SRS_Lin_01589,
SRS_Lin_01596
RS_BRF_01136 AUTOSAR shall support SRS_Lin_01540, SRS_Lin_01569, SRS_Lin_01570,
variants of configured SRS_Lin_01572, SRS_Lin_01583
BSW data resolved after
system start-up
RS_BRF_01152 AUTOSAR shall support SRS_Lin_01573
limited dynamic
reconfiguration
RS_BRF_01544 AUTOSAR communication SRS_Lin_01502, SRS_Lin_01555, SRS_Lin_01571
shall define transmission
and reception of
communication data
RS_BRF_01592 AUTOSAR communication SRS_Lin_01546, SRS_Lin_01549, SRS_Lin_01564,
shall offer data transfer on SRS_Lin_01571
user request, time based,
and requested via the
underlying bus
RS_BRF_01600 AUTOSAR communication SRS_Lin_01593
shall support time-out
handling
RS_BRF_01768 AUTOSAR communication SRS_Lin_01502, SRS_Lin_01503, SRS_Lin_01504,
shall support LIN SRS_Lin_01514, SRS_Lin_01515, SRS_Lin_01522,
SRS_Lin_01523, SRS_Lin_01524, SRS_Lin_01526,
SRS_Lin_01534, SRS_Lin_01539, SRS_Lin_01540,
SRS_Lin_01544, SRS_Lin_01545, SRS_Lin_01546,
SRS_Lin_01547, SRS_Lin_01549, SRS_Lin_01551,
SRS_Lin_01555, SRS_Lin_01556, SRS_Lin_01558,
SRS_Lin_01560, SRS_Lin_01561, SRS_Lin_01564,
SRS_Lin_01566, SRS_Lin_01568, SRS_Lin_01569,
SRS_Lin_01570, SRS_Lin_01571, SRS_Lin_01574,