0% found this document useful (0 votes)
60 views

AUTOSAR SWS CANNetworkManagement

Uploaded by

sathyanila0507
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

AUTOSAR SWS CANNetworkManagement

Uploaded by

sathyanila0507
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 117

Specification of CAN Network Management

AUTOSAR CP R21-11

Document Title Specification of CAN Network


Management
Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 13

Document Status published


Part of AUTOSAR Standard Classic Platform
Part of Standard Release R21-11

Document Change History


Date Release Changed by Change Description
2021-11-25 R21-11 AUTOSAR  Rework of Partial Networking
Release  Fixes for Partial Networking
Management extensions
2020-11-30 R20-11 AUTOSAR  Harmonizing error sections
Release  Partial Networking extensions
Management introduced
2019-11-28 R19-11 AUTOSAR  Clarification for CAN FD usage
Release  Extended Wait Bus Sleep Handling
Management  Changed Document Status from
Final to published
2018-10-31 4.4.0 AUTOSAR  Header File Cleanup
Release  Removed obsolete elements
Management  Fixed documentation structure
2017-12-08 4.3.1 AUTOSAR  Node Detection Configuration per
Release channel
Management  Runtime Errors introduced
2016-11-30 4.3.0 AUTOSAR  API Harmonizations
Release  Improved post-build parameter
Management support and dependencies
 Transmission of additional NM
message on NM Coordinator Ready
Sleep Bit change
 Introduction of Reliable TX
Confirmation

1 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Document Change History


Date Release Changed by Change Description
2015-07-31 4.2.2 AUTOSAR  Clarification NM message
Release transmission start
Management  Clarification of configuration
dependencies
 Clarification NM timers while
communication is disabled
2014-10-31 4.2.1 AUTOSAR  Removed obsolete configuration
Release parameters
Management  Partial Network Handling
Improvements
 Const usage in APIs reworked
2014-03-31 4.1.3 AUTOSAR  Rewording and improving Partial
Release Networking Algorithm Requirements
Management  Remote Sleep Indication Timeout
handling corrected
 Network Release handling during
communication control clarified
2013-10-31 4.1.2 AUTOSAR  Fixed Message Cycle Time Offset
Release Handling
Management  Corrected Active Wakeup Handling
 Editorial changes
 Removed chapter(s) on change
documentation
2013-03-15 4.1.1 AUTOSAR  Partial Network Handling corrected
Administration  Coordinator Support improved
 Start-up Handling from Prepare-Bus
Sleep clarified
2011-12-22 4.0.3 AUTOSAR  Support for Partial Networking
Administration  Support for Car Wakeup
 Immediate Transmission of NM-
PDUs
 Support of a coordinated shutdown
with multiple connected gateways
2009-12-18 4.0.1 AUTOSAR  Changed Signature of RxIndication
Administration and TriggerTransmit
 Faster NM wakeup

2 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Document Change History


Date Release Changed by Change Description
2010-02-02 3.1.4 AUTOSAR  Nm User Data accessible through
Administration PduR
 Changed PDU handle ID exchange
with CanIf
 No more instance specific CanNm
MainFunction() APIs
 Legal disclaimer revised
2008-08-13 3.1.1 AUTOSAR  Legal disclaimer revised
Administration
2008-02-01 3.0.2 AUTOSAR  Merge CAN NM and Generic NM
Administration  Document meta information
extended
 Small layout adaptations made
2007-01-24 2.1.15 AUTOSAR  Post build and link-time
Administration configuration variant introduced
 Configurable NMPDU format
introduced
 Passive mode introduced

 Legal disclaimer revised


 Release Notes added
 “Advice for users” revised
 “Revision Information” added
2005-05-31 1.0 AUTOSAR  Initial Release
Administration

3 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-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.

4 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Table of Contents
1 Introduction and Functional Overview ................................................................... 8
2 Acronyms and abbreviations.................................................................................. 9
3 Related documentation ........................................................................................ 10
3.1 Input documents ................................................................................................. 10
3.2 Related standards and norms ............................................................................ 10
3.3 Related specification ........................................................................................... 10
4 Constraints and assumptions............................................................................... 12
4.1 Limitations ........................................................................................................... 12
4.2 Applicability to car domains ................................................................................ 12
5 Dependencies to other modules .......................................................................... 13
5.1 File Structure....................................................................................................... 14
5.1.1 Code File Structure .................................................................................. 14
5.1.2 Header File Structure ............................................................................... 14
6 Requirements traceability .................................................................................... 15
7 Functional specification ........................................................................................ 22
7.1 Coordination algorithm........................................................................................ 22
7.2 Operational Modes ............................................................................................. 23
7.2.1 Network Mode .......................................................................................... 23
7.2.2 Prepare Bus-Sleep Mode ......................................................................... 26
7.2.3 Bus-Sleep Mode ....................................................................................... 28
7.3 Network states .................................................................................................... 29
7.4 Initialization ......................................................................................................... 29
7.5 Execution ............................................................................................................ 30
7.5.1 Processor architecture ............................................................................. 30
7.5.2 Timing parameters ................................................................................... 30
7.6 Network Management PDU Structure ................................................................ 31
7.7 Communication Scheduling ................................................................................ 33
7.7.1 Transmission ............................................................................................ 33
7.7.2 Reception ................................................................................................. 36
7.8 Bus Load Reduction Mechanism ........................................................................ 36
7.9 Additional features .............................................................................................. 37
7.9.1 Detection of Remote Sleep Indication ...................................................... 37
7.9.2 User Data ................................................................................................. 38
7.9.3 Passive Mode ........................................................................................... 39
7.9.4 Network Management PDU Rx Indication ............................................... 39
7.9.5 State change notification .......................................................................... 39
7.9.6 Communication Control ............................................................................ 39
7.9.7 Coordinator Synchronization Support ...................................................... 40
7.10 Car Wakeup ........................................................................................................ 41
7.10.1 Rx Path ..................................................................................................... 41
7.10.2 Tx Path ..................................................................................................... 41
7.11 Partial Networking ............................................................................................... 41
7.11.1 Rx Handling of NM PDUs ......................................................................... 41
7.11.2 Tx Handling of NM PDUs ......................................................................... 44
5 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

7.11.3 Handling of Internal Requested Partial Network Clusters ....................... 47


7.11.4 NM PDU Filter Algorithm (OBSOLETE) ................................................... 47
7.11.5 Aggregation of Internal and External Requested Partial Networks
(OBSOLETE) ............................................................................................ 48
7.11.6 Aggregation of External Requested Partial Networks (OBSOLETE) ...... 50
7.11.7 Spontaneous Transmission of NM PDUs via
CanNm_NetworkRequest......................................................................... 52
7.12 Transmission Error Handling .............................................................................. 52
7.13 Functional requirements on CanNm API ............................................................ 53
7.14 Error classification .............................................................................................. 54
7.14.1 Development Errors ................................................................................. 54
7.14.2 Runtime Errors ......................................................................................... 54
7.14.3 Transient Faults ........................................................................................ 55
7.14.4 Production Errors...................................................................................... 55
7.14.5 Extended Production Errors ..................................................................... 55
7.15 Scheduling of the main function ......................................................................... 55
7.16 Application notes................................................................................................. 55
7.16.1 Wakeup notification .................................................................................. 55
7.16.2 Coordination of coupled networks ............................................................ 55
7.17 Summary of CanNm Timing Requirements ....................................................... 55
7.18 UML State chart diagram .................................................................................... 57
8 API specification ................................................................................................... 58
8.1 Imported Types ................................................................................................... 58
8.2 Type Definitions .................................................................................................. 59
8.2.1 CanNm_ConfigType ................................................................................. 59
8.3 Function Definitions ............................................................................................ 60
8.3.1 CanNm_Init ............................................................................................... 60
8.3.2 CanNm_DeInit .......................................................................................... 60
8.3.3 CanNm_PassiveStartUp .......................................................................... 61
8.3.4 CanNm_NetworkRequest......................................................................... 62
8.3.5 CanNm_NetworkRelease ......................................................................... 62
8.3.6 CanNm_DisableCommunication .............................................................. 63
8.3.7 CanNm_EnableCommunication ............................................................... 64
8.3.8 CanNm_SetUserData............................................................................... 65
8.3.9 CanNm_GetUserData .............................................................................. 65
8.3.10 CanNm_Transmit ..................................................................................... 66
8.3.11 CanNm_GetNodeIdentifier ....................................................................... 67
8.3.12 CanNm_GetLocalNodeIdentifier .............................................................. 68
8.3.13 CanNm_RepeatMessageRequest ........................................................... 69
8.3.14 CanNm_GetPduData ............................................................................... 69
8.3.15 CanNm_GetState ..................................................................................... 70
8.3.16 CanNm_GetVersionInfo ........................................................................... 71
8.3.17 CanNm_RequestBusSynchronization ...................................................... 71
8.3.18 CanNm_CheckRemoteSleepIndication ................................................... 72
8.3.19 CanNm_SetSleepReadyBit ...................................................................... 73
8.3.20 CanNm_PnLearningRequest ................................................................... 74
8.3.21 CanNm_RequestSynchronizedPncShutdown ......................................... 75
8.4 Call-back Notifications ........................................................................................ 75
8.4.1 CanNm_TxConfirmation ........................................................................... 75
6 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

8.4.2 CanNm_RxIndication ............................................................................... 76


8.4.3 CanNm_ConfirmPnAvailability ................................................................. 77
8.4.4 CanNm_TriggerTransmit .......................................................................... 78
8.5 Scheduled Functions .......................................................................................... 80
8.5.1 CanNm_MainFunction.............................................................................. 80
8.6 Expected Interfaces ............................................................................................ 80
8.6.1 Mandatory Interfaces ................................................................................ 80
8.6.2 Optional Interfaces ................................................................................... 81
8.6.3 Configurable interfaces ............................................................................ 82
8.6.4 Job End Notification ................................................................................. 82
8.7 Service Interfaces ............................................................................................... 83
9 Sequence diagrams ............................................................................................. 84
9.1 CanNm Transmission ......................................................................................... 84
9.2 CanNm Reception .............................................................................................. 84
9.3 Nm Coordination ................................................................................................. 85
10 Configuration specification ................................................................................... 86
10.1 How to read this chapter ..................................................................................... 86
10.2 Containers and configuration parameters .......................................................... 86
10.2.1 CanNm Global Configuration Overview ................................................... 86
10.2.2 CanNm...................................................................................................... 88
10.2.3 CanNmGlobalConfig ................................................................................ 88
10.2.4 CanNm Channel Configuration Overview ................................................ 95
10.2.5 CanNmChannelConfig ............................................................................. 97
10.2.6 CanNmRxPdu......................................................................................... 110
10.2.7 CanNmTxPdu ......................................................................................... 110
10.2.8 CanNmUserDataTxPdu.......................................................................... 111
10.2.9 CanNmPnInfo ......................................................................................... 112
10.2.10 CanNmPnFilterMaskByte ....................................................................... 113
10.3 Published parameters ....................................................................................... 114
11 Examples............................................................................................................ 115
11.1 Example of periodic transmission mode with bus load reduction .................... 115
11.2 Example timing behavior for Network Management PDUs .............................. 115
12 Not applicable requirements .............................................................................. 117

7 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

1 Introduction and Functional Overview


This document describes the concept, core functionality, configurable features,
interfaces and configuration issues of the AUTOSAR CAN Network Management
(CanNm).

The AUTOSAR CAN Network Management is a hardware independent protocol that


can only be used on CAN1 (for limitations refer to chapter 4.1). Its main purpose is to
coordinate the transition between normal operation and bus-sleep mode of the
network.

In addition to the core functionality configurable features are provided e.g. to


implement a service to detect all present nodes or to detect if all other nodes are
ready to sleep.

The CAN Network Management (CanNm) function provides an adaptation between


Network Management Interface (NmIf) and CAN Interface (CanIf) module. For a
general understanding of the AUTOSAR Network Management functionality please
refer to [7].

1
This includes all in AUTOSAR specified CAN protocols like CAN 2.0, CAN FD or TT CAN.
8 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

2 Acronyms and abbreviations


The glossary below includes acronyms and abbreviations relevant to the CanNm
module that are not included in the AUTOSAR glossary.

Acronym/abb Description:
reviation:
CanIf Abbreviation for the CAN Interface
CanNm Abbreviation for CAN Network Management
CBV Control Bit Vector
CWU Car Wakeup
ERA External Request Array
EIRA External and Internal Request Array
NM Network Management
PNC Partial Network Cluster
PNI Partial Network Information
PNL Partial Network Learning
SNI Source Node Identifier

Term Description:
PDU This means that the Network Management PDU transmission has been disabled by
transmission the service CanNm_DisableCommunication.
ability is
disabled
Repeat CanNm_RxIndication finds the RptMsgRequest set in the Control Bit Vector of a
Message received Network Management PDU.
Request Bit
Indication
PN filter mask Vector of filter mask bytes defined by configuration container(s)
CanNmPnFilterMaskByte
Top-level PNC The top-level PNC coordinator is an ECU that acts as PNC gateway in the network
coordinator and that handles at least one PNC as actively coordinated on all assigned
channels. If synchronized PNC shutdown is enabled, the top-level PNC coordinator
triggers for these PNCs the shutdown, if no other ECU in the network request
them.
Intermediate An intermediate PNC coordinator is an ECU that acts as PNC gateway in the
PNC network and that handles at least one PNC as passively coordinated on at least
coordinator one assigned channel. If synchronized PNC shutdown is enabled, it forwards
received shutdown requests for these PNCs to the corresponding actively
coordinated channels and starts their shutdown accordingly.
PNC leaf node A PNC leaf node is an ECU that acts not as a PNC coordinator at all in the
network. It processes PN shutdown message as usual NM messages.
PN shutdown A top-level PNC coordinator transmit PN shutdown messages to indicate a
message synchronized PNC shutdown across the PN topology. A PN shutdown message is
as NM message which has PNSR bit in the control bit vector and all PNCs which
are indicated for a synchronized shutdown set to '1'.

9 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

3 Related documentation

3.1 Input documents

[1] General Requirements on Basic Software Modules


AUTOSAR_SRS_BSWGeneral.pdf

[2] Specification of the AUTOSAR Network Management Protocol


AUTOSAR_PRS_NetworkManagementProtocol.pdf

[3] Requirements on Network Management


AUTOSAR_RS_NetworkManagement.pdf

[4] Specification of CAN Interface


AUTOSAR_SWS_CANInterface.pdf

[5] Specification of Communication Stack Types


AUTOSAR_SWS_CommunicationStackTypes.pdf

[6] Specification of ECU Configuration


AUTOSAR_TPS_ECUConfiguration.pdf

[7] Specification of Generic Network Management Interface


AUTOSAR_SWS_NetworkManagementInterface.pdf

[8] Specification of Communication Manager


AUTOSAR_SWS_ComManager.pdf

[9] Specification of Standard Types


AUTOSAR_SWS_StandardTypes.pdf

[10] General Specification of Basic Software Modules


AUTOSAR_SWS_BSWGeneral.pdf

[11] Specification of SystemTemplate


AUTOSAR_TPS_SystemTemplate

3.2 Related standards and norms

Not available.

3.3 Related specification

AUTOSAR provides a General Specification on Basic Software modules [10] (SWS


BSW General), which is also valid for CAN Network Management.

10 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Thus, the specification SWS BSW General shall be considered as additional and
required specification for CAN Network Management.

11 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

4 Constraints and assumptions

4.1 Limitations

1. One channel of CanNm is associated with only one network management


cluster in one network. One network management cluster can have only one
channel of CanNm in one node.
2. One channel of CanNm is associated with only one network within the same
ECU.
3. CanNm is only applicable for CAN1 systems.

The Figure 4-1 presents an AUTOSAR Network Management stack within an


example ECU that contains at least one CanNm cluster.

«module»
:Nm

«module»
:CanNm

«module»
:CanIf

Figure 4-1 AUTOSAR NM Stack on CAN

4.2 Applicability to car domains

The CanNm module can be applied to any car domain under limitations provided
above.

12 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

5 Dependencies to other modules


CAN Network Management (CanNm) mainly uses services of CAN Interface (CanIf
[4]) and provides services to the Generic Network Management Interface (NmIf [7]).

«derived_generic_interface» «derived_generic_interface»
«derived_generic_interface» PduR_CanNmTxConfirmation PduR_CanNmRxIndication Det_ReportError
CanNm_Transmit «derived_generic_interface»
PduR_CanNmTriggerTransmit

CanNm «derived_generic_interface» CanNm_Types Nm_PrepareBusSleepMode Nm_Types Nm_CarWakeUpIndication


CanIf_Transmit «optional» «optional»
Nm_NetworkStartIndication «optional»
«optional»
«realize» «optional» «realize» «realize» «mandatory» «mandatory» «mandatory» «optional»

«module»
CanNm

Figure 5-1 Dependencies to other modules

13 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

5.1 File Structure

5.1.1 Code File Structure

Please refer to the chapter 5.1.6 Code file structure in “SWS_BSWGeneral” [10].

5.1.2 Header File Structure

Please refer to the chapter 5.1.7 Header file structure in “SWS_BSWGeneral” [10].

[SWS_CanNm_00305] ⌈ ComStack_Types.h shall be included.


Note: The following header files are indirectly included by ComStack_Types.h
 Std_Types.h (for AUTOSAR standard types )
 Platform_Types.h (for platform specific types)
 Compiler.h (for compiler specific language extensions)⌋
(SRS_BSW_00348, SRS_BSW_00353, SRS_BSW_00361,
SRS_BSW_00301)
[SWS_CanNm_00307] {OBSOLETE} ⌈ Nm.h shall be included for CanNm callbacks
to the Generic Network Management Interface.⌋(SRS_BSW_00301)
[SWS_CanNm_00308] ⌈ Det.h shall be included for interfacing the Default Error
Tracer.⌋(SRS_BSW_00301)
[SWS_CanNm_00309] ⌈ NmStack_Types.h shall be included for common network
management types.⌋(SRS_BSW_00301)
[SWS_CanNm_00312] ⌈ CanIf.h shall be included for interfacing the CanIf.⌋
(SRS_BSW_00301)
[SWS_CanNm_00326] ⌈PduR_CanNm.h shall be included if COM user data support
is enabled.⌋ (SRS_BSW_00301)

14 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

6 Requirements traceability

Requirement Description Satisfied by


RS_Nm_00043 NM shall not prohibit bus SWS_CanNm_NA_00008
traffic with NM not being
initialized
RS_Nm_00044 The NM shall be applicable SWS_CanNm_NA_00008
to different types of
communication systems
which are in the scope of
Autosar and support a bus
sleep mode.
RS_Nm_00045 NM shall provide services to SWS_CanNm_00104, SWS_CanNm_00105
coordinate shutdown of
NM-clusters independently
of each other
RS_Nm_00046 It shall be possible to trigger SWS_CanNm_00129
the startup of all Nodes at
any Point in Time
RS_Nm_00047 NM shall provide a service SWS_CanNm_00103, SWS_CanNm_00104,
to request to keep the bus SWS_CanNm_00105, SWS_CanNm_00106,
awake and a service to SWS_CanNm_00110, SWS_CanNm_00118
cancel this request.
RS_Nm_00048 NM shall put the SWS_CanNm_NA_00008
communication controller
into sleep mode if there is
no bus communication
RS_Nm_00050 The NM shall provide the SWS_CanNm_00091
current state of NM
RS_Nm_00051 NM shall inform application SWS_CanNm_00097, SWS_CanNm_00114,
when NM state changes SWS_CanNm_00115, SWS_CanNm_00126,
occur. SWS_CanNm_00166
RS_Nm_00052 The NM interface shall SWS_CanNm_00150, SWS_CanNm_00153
signal to the application that
all other ECUs are ready to
sleep.
RS_Nm_00054 There shall be a SWS_CanNm_00088
deterministic time from the
point where all nodes agree
to go to bus sleep to the
point where bus is switched
off.
RS_Nm_00137 NM shall perform SWS_CanNm_00064, SWS_CanNm_00065,
communication system SWS_CanNm_00066, SWS_CanNm_00193,
error handling for errors that SWS_CanNm_00194, SWS_CanNm_00446
have impact on the NM
behavior.
RS_Nm_00142 NM shall provide a SWS_CanNm_00052, SWS_CanNm_00069,
mechanism to limit its bus SWS_CanNm_00071, SWS_CanNm_00156,
load. SWS_CanNm_00157
RS_Nm_00145 On a properly configured SWS_CanNm_NA_00008
15 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

node, NM shall tolerate a


loss of a predefined number
of NM messages
RS_Nm_00146 The NM shall tolerate a time SWS_CanNm_NA_00008
jitter of NM messages in
one or more ECUs
RS_Nm_00149 The timing of NM shall be SWS_CanNm_00088
configurable.
RS_Nm_00150 Specific features of the SWS_CanNm_NA_00008
Network Management shall
be configurable
RS_Nm_00151 The Network Management SWS_CanNm_00099, SWS_CanNm_00124,
algorithm shall allow any SWS_CanNm_00127
node to integrate into an
already running NM cluster
RS_Nm_00153 The Network Management SWS_CanNm_00014, SWS_CanNm_00111,
shall optionally provide a SWS_CanNm_00112, SWS_CanNm_00113,
possibility to detect present SWS_CanNm_00119, SWS_CanNm_00120,
nodes SWS_CanNm_00121
RS_Nm_00154 The Network Management SWS_CanNm_NA_00008
API shall be independent
from the communication
bus
RS_Nm_02503 The NM API shall optionally SWS_CanNm_00013, SWS_CanNm_00159,
give the possibility to send SWS_CanNm_00328, SWS_CanNm_00350,
user data SWS_CanNm_00351, SWS_CanNm_00510
RS_Nm_02504 The NM API shall optionally SWS_CanNm_00160
give the possibility to get
user data
RS_Nm_02505 The NM shall optionally set SWS_CanNm_00074
the local node identifier to
the NM-message
RS_Nm_02506 The NM API shall give the SWS_CanNm_00132
possibility to read the
source node identifier of the
sender
RS_Nm_02508 Every node shall have a SWS_CanNm_00133
node identifier associated
with it that is unique in the
NM-cluster.
RS_Nm_02509 The NM interface shall SWS_CanNm_00151, SWS_CanNm_00152,
signal to the application that SWS_CanNm_00153
at least one ECU is not
ready to sleep anymore.
RS_Nm_02511 It shall be possible to SWS_CanNm_00072, SWS_CanNm_00161
configure the Network
Management of a node so
that it does not contribute to
the cluster shutdown
decision.
RS_Nm_02512 The NM shall give the SWS_CanNm_00170, SWS_CanNm_00173,
possibility to enable or SWS_CanNm_00176, SWS_CanNm_00178

16 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

disable the network


management related
communication configured
for an active NM node
RS_Nm_02513 NM shall provide SWS_CanNm_00104, SWS_CanNm_00105
functionality which enables
upper layers to control the
sleep mode.
RS_Nm_02514 It shall be possible to group SWS_CanNm_NA_00008
networks into NM
Coordination Clusters
RS_Nm_02515 NM shall offer a generic SWS_CanNm_NA_00008
possibility to run other NMs
than the AUTOSAR-NMs
RS_Nm_02516 All AUTOSAR NM SWS_CanNm_00130, SWS_CanNm_00187,
instances shall support the SWS_CanNm_00226, SWS_CanNm_00280
NM Coordinator
functionality including Bus
synchronization on demand
RS_Nm_02517 CanNm shall support Partial SWS_CanNm_00403, SWS_CanNm_00404,
Networking on CAN SWS_CanNm_00409, SWS_CanNm_00410,
SWS_CanNm_00411, SWS_CanNm_00412,
SWS_CanNm_00413, SWS_CanNm_00414,
SWS_CanNm_00415, SWS_CanNm_00416,
SWS_CanNm_00417, SWS_CanNm_00419,
SWS_CanNm_00420, SWS_CanNm_00421,
SWS_CanNm_00424, SWS_CanNm_00426,
SWS_CanNm_00427, SWS_CanNm_00428,
SWS_CanNm_00429, SWS_CanNm_00431,
SWS_CanNm_00432, SWS_CanNm_00435,
SWS_CanNm_00437, SWS_CanNm_00438,
SWS_CanNm_00439, SWS_CanNm_00442,
SWS_CanNm_00443, SWS_CanNm_00444,
SWS_CanNm_00445, SWS_CanNm_00502,
SWS_CanNm_00503, SWS_CanNm_00505,
SWS_CanNm_00508
RS_Nm_02519 The NM Control Bit Vector SWS_CanNm_00045, SWS_CanNm_00413,
shall contain a PNI (Partial SWS_CanNm_00414, SWS_CanNm_00505,
Network Information) bit. SWS_CanNm_00508
RS_Nm_02527 Nm shall implement a filter SWS_CanNm_00333, SWS_CanNm_00403,
algorithm dropping all NM SWS_CanNm_00404, SWS_CanNm_00410,
messages that are not SWS_CanNm_00411, SWS_CanNm_00412,
relevant for the ECU SWS_CanNm_00415, SWS_CanNm_00417,
SWS_CanNm_00419, SWS_CanNm_00420,
SWS_CanNm_00421, SWS_CanNm_00502,
SWS_CanNm_00503
RS_Nm_02528 Nm shall provide a service SWS_CanNm_00444
which allows for
instantaneous sending of
NM messages.
RS_Nm_02535 The NM coordination shall SWS_CanNm_NA_00008
support the coordination of
nested sub-buses
RS_Nm_02536 NM shall provide SWS_CanNm_00128
functionality to start-up
17 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

without requesting the


network.
RS_Nm_02537 The NM Coordinator shall SWS_CanNm_NA_00008
be able to abort the
coordinated shutdown
RS_Nm_02540 The NM Control Bit Vector SWS_CanNm_00045, SWS_CanNm_00463,
shall contain a PN SWS_CanNm_00506
shutdown request bit.
RS_Nm_02542 The NM of the top-level SWS_CanNm_00463
PNC coordinator shall set
the PN shutdown request
bit if a least one PNC is
released
RS_Nm_02543 NM shall forward requests SWS_CanNm_00466, SWS_CanNm_00467
for synchronized PNC
shutdown
RS_Nm_02545 NM shall handle requests SWS_CanNm_00460, SWS_CanNm_00462,
for synchronized PNC SWS_CanNm_00463, SWS_CanNm_00464,
shutdown SWS_CanNm_00465, SWS_CanNm_00468,
SWS_CanNm_00469, SWS_CanNm_00470,
SWS_CanNm_00471, SWS_CanNm_00472,
SWS_CanNm_00506, SWS_CanNm_00509,
SWS_CanNm_91003
RS_Nm_02547 Nm shall be able to SWS_CanNm_00045
propagate and evaluate the
need for Partial Networking
Learning (optional)
RS_Nm_02548 Nm shall be able to SWS_CanNm_00045, SWS_CanNm_00461
propagate and evaluate the
need for synchronized PNC
shutdown in the role of a
top-level PNC coordinator
or intermediate PNC
coordinator (optional)
RS_Nm_02549 Nm shall offer interfaces to SWS_CanNm_00045, SWS_CanNm_00111,
Request and indicate SWS_CanNm_00112, SWS_CanNm_00113,
Repeat Message Request SWS_CanNm_00119, SWS_CanNm_00120,
(optional) SWS_CanNm_00121
SRS_BSW_00005 Modules of the µC SWS_CanNm_NA_00001
Abstraction Layer (MCAL)
may not have hard coded
horizontal interfaces
SRS_BSW_00010 The memory consumption SWS_CanNm_NA_00008
of all Basic SW Modules
shall be documented for a
defined configuration for all
supported platforms.
SRS_BSW_00160 Configuration files of SWS_CanNm_NA_00008
AUTOSAR Basic SW
module shall be readable
for human beings
SRS_BSW_00161 The AUTOSAR Basic SWS_CanNm_NA_00001
Software shall provide a

18 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

microcontroller abstraction
layer which provides a
standardized interface to
higher software layers
SRS_BSW_00162 The AUTOSAR Basic SWS_CanNm_NA_00001
Software shall provide a
hardware abstraction layer
SRS_BSW_00164 The Implementation of SWS_CanNm_NA_00001
interrupt service routines
shall be done by the
Operating System, complex
drivers or modules
SRS_BSW_00168 SW components shall be SWS_CanNm_NA_00000
tested by a function defined
in a common API in the
Basis-SW
SRS_BSW_00170 The AUTOSAR SW SWS_CanNm_NA_00000
Components shall provide
information about their
dependency from faults,
signal qualities, driver
demands
SRS_BSW_00172 The scheduling strategy SWS_CanNm_NA_00008
that is built inside the Basic
Software Modules shall be
compatible with the strategy
used in the system
SRS_BSW_00301 All AUTOSAR Basic SWS_CanNm_00305, SWS_CanNm_00307,
Software Modules shall only SWS_CanNm_00308, SWS_CanNm_00309,
import the necessary SWS_CanNm_00312, SWS_CanNm_00326
information
SRS_BSW_00314 All internal driver modules SWS_CanNm_NA_00001
shall separate the interrupt
frame definition from the
service routine
SRS_BSW_00323 All AUTOSAR Basic SWS_CanNm_00244
Software Modules shall
check passed API
parameters for validity
SRS_BSW_00325 The runtime of interrupt SWS_CanNm_NA_00001
service routines and
functions that are running in
interrupt context shall be
kept short
SRS_BSW_00334 All Basic Software Modules SWS_CanNm_NA_00008
shall provide an XML file
that contains the meta data
SRS_BSW_00336 Basic SW module shall be SWS_CanNm_91002, SWS_CanNm_NA_00006
able to shutdown
SRS_BSW_00341 Module documentation shall SWS_CanNm_NA_00008
contains all needed
informations
SRS_BSW_00347 A Naming seperation of SWS_CanNm_NA_00001
19 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

different instances of BSW


drivers shall be in place
SRS_BSW_00348 All AUTOSAR standard SWS_CanNm_00305
types and constants shall
be placed and organized in
a standard type header file
SRS_BSW_00353 All integer type definitions SWS_CanNm_00305
of target and compiler
specific scope shall be
placed and organized in a
single type header
SRS_BSW_00361 All mappings of not SWS_CanNm_00305
standardized keywords of
compiler specific scope
shall be placed and
organized in a compiler
specific type and keyword
header
SRS_BSW_00369 All AUTOSAR Basic SWS_CanNm_00352
Software Modules shall not
return specific development
error codes via the API
SRS_BSW_00375 Basic Software Modules SWS_CanNm_NA_00001
shall report wake-up
reasons
SRS_BSW_00413 An index-based accessing SWS_CanNm_NA_00001
of the instances of BSW
modules shall be done
SRS_BSW_00416 The sequence of modules SWS_CanNm_NA_00002
to be initialized shall be
configurable
SRS_BSW_00417 Software which is not part SWS_CanNm_NA_00007
of the SW-C shall report
error events only after the
DEM is fully operational.
SRS_BSW_00423 BSW modules with SWS_CanNm_NA_00000
AUTOSAR interfaces shall
be describable with the
means of the SW-C
Template
SRS_BSW_00424 BSW module main SWS_CanNm_NA_00001
processing functions shall
not be allowed to enter a
wait state
SRS_BSW_00425 The BSW module SWS_CanNm_NA_00003
description template shall
provide means to model the
defined trigger conditions of
schedulable objects
SRS_BSW_00426 BSW Modules shall ensure SWS_CanNm_NA_00004
data consistency of data
which is shared between
BSW modules

20 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

SRS_BSW_00427 ISR functions shall be SWS_CanNm_NA_00003


defined and documented in
the BSW module
description template
SRS_BSW_00429 Access to OS is restricted SWS_CanNm_NA_00001
SRS_BSW_00432 Modules should have SWS_CanNm_NA_00005
separate main processing
functions for read/receive
and write/transmit data path

Details about the SRS Requirements can be found in AUTOSAR General


Requirements on Basic Software Modules [1] and AUTOSAR Requirements on Basic
Software, Module NM [3].

21 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

7 Functional specification

7.1 Coordination algorithm

The AUTOSAR CanNm is based on decentralized direct network management


strategy, which means that every network node performs activities self-sufficient
depending on the Network Management PDUs only that are received or transmitted
within the communication system.

The AUTOSAR CanNm algorithm is based on periodic Network Management PDUs,


which are received by all nodes in the cluster via broadcast transmission. Reception
of Network Management PDUs indicates that sending nodes want to keep the
network management cluster awake. If any node is ready to go to the Bus-Sleep
Mode, it stops sending Network Management PDUs, but as long as Network
Management PDUs from other nodes are received, it postpones transition to the Bus-
Sleep Mode. Finally, if a dedicated timer elapses because no Network Management
PDUs are received anymore, every node initiates transition to the Bus-Sleep Mode.

If any node in the network management cluster requires bus-communication, it can


wake-up the network management cluster from the Bus-Sleep Mode by transmitting
Network Management PDUs. For more details concerning wakeup procedure itself
please refer to the AUTOSAR SWS ComM [8].

The main concept of the AUTOSAR CanNm algorithm can be defined by the
following two key-requirements:

[SWS_CanNm_00087] ⌈Every network node in a CanNm cluster shall transmit


periodic Network Management PDUs as long as it requires bus-communication;
otherwise it shall transmit no Network Management PDUs.⌋()

[SWS_CanNm_00088] ⌈If CanNmStayInPbsEnabled is disabled and bus


communication in a CanNm cluster is released and there are no Network
Management PDUs on the bus for a configurable amount of time determined by
CanNmTimeoutTime + CanNmWaitBusSleepTime (both configuration parameters)
transition into the Bus-Sleep Mode shall be performed.⌋(RS_Nm_00054,
RS_Nm_00149)

The overall state machine of the AUTOSAR CanNm algorithm can be defined as
follows:

[SWS_CanNm_00089] ⌈The AUTOSAR CanNm state machine shall contain states,


transitions and triggers required for the AUTOSAR CanNm algorithm seen from point
of view of one single node in the network management cluster.⌋()

Note: State transitions have to be performed latest within the next main function.

Note: An UML state chart of the AUTOSAR CanNm state machine from point of view
of one single node in the network management cluster can be found in detail in the
API specification chapter 8).
22 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

7.2 Operational Modes

In the following chapter operational modes of the AUTOSAR CanNm algorithm are
described in detail.

[SWS_CanNm_00092] ⌈The AUTOSAR CanNm shall contain three operational


modes visible at the module’s interface:
 Network Mode
 Prepare Bus-Sleep Mode
 Bus-Sleep Mode⌋()

[SWS_CanNm_00093] ⌈Changes of the AUTOSAR CanNm operational modes shall


be notified to the upper layer by means of callback functions.⌋()

[SWS_CanNm_00091] ⌈When CanNm_GetState is called CanNm shall return the


current NM state and mode.⌋(RS_Nm_00050)

7.2.1 Network Mode

[SWS_CanNm_00094] ⌈The Network Mode shall consist of three internal states:


 Repeat Message State
 Normal Operation State
 Ready Sleep State⌋()

[SWS_CanNm_00314] ⌈When the Network Mode is entered from Bus-Sleep, by


default, the CanNm module shall enter the Repeat Message State.⌋()

[SWS_CanNm_00315] ⌈When the Network Mode is entered from Prepare Bus-Sleep


Mode, by default, the CanNm module shall enter the Repeat Message State.⌋()

[SWS_CanNm_00096] ⌈When the Network Mode is entered, the CanNm module


shall start the NM-Timeout Timer.⌋()

[SWS_CanNm_00097] ⌈When the Network Mode is entered, CanNm shall notify the
upper layer of the new current operational mode by calling the callback function
Nm_NetworkMode.⌋ (RS_Nm_00051)

[SWS_CanNm_00098] ⌈At successful reception of a Network Management PDU


(call of CanNm_RxIndication) in the Network Mode, the CanNm module shall restart
the NM-Timeout Timer if PDU transmission ability is enabled.⌋()

[SWS_CanNm_00099] ⌈At successful transmission of a Network Management PDU


(call of CanNm_TxConfirmation with E_OK) in the Network Mode, the CanNm module
shall restart the NM-Timeout Timer.⌋(RS_Nm_00151)

23 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Note: If CanNmImmediateTxConfEnabled is enabled it is assumed that each Network


Management PDU transmission request results in a successful Network
Management PDU transmission.

[SWS_CanNm_00206] ⌈The CAN NM module shall reset the NM-Timeout Timer


every time it is started or restarted.⌋()

[SWS_CanNm_00147] ⌈If CanNm_PassiveStartUp is called in the Network Mode, the


CanNm module shall not execute this service and shall return E_NOT_OK.⌋()

[SWS_CanNm_00380] {DRAFT} ⌈If function CanNm_PnLearningRequest is called on a


channel where CanNmDynamicPncToChannelMappingEnabled is set to TRUE and
CanNm is in the Network Mode the CanNm module shall set the Repeat Message Bit
and the Partial Network Learning Bit in the CBV to 1 on this channel and change to
or restart the Repeat Message State.⌋()

[SWS_CanNm_00381] {DRAFT} ⌈If the bits Partial Network Learning and Repeat
Message Request both are received with value 1 on a channel where
CanNmDynamicPncToChannelMappingEnabled is set to TRUE and CanNm is in the
Network Mode, then CanNm shall set the Partial Network Learning Bit in the CBV to
1 on this channel and change to or restart the Repeat Message State.⌋()

Note: Restart in [SWS_CanNm_00380] or [SWS_CanNm_00381] means that


CanNm is already in Repeat Message State and then a complete re-entry of the
Repeat Message State has to be performed once.

7.2.1.1 Repeat Message State

For nodes that are not in passive mode (refer to chapter 7.9.3) the Repeat Message
State ensures, that any transition from Bus-Sleep or Prepare Bus-Sleep to the
Network Mode becomes visible to the other nodes on the network. Additionally, it
ensures that any node stays active for a minimum amount of time. It can be used for
detection of present nodes.

[SWS_CanNm_00100] ⌈When the Repeat Message State is entered the CanNm


module shall (re-)start transmission of Network Management PDUs unless passive
mode is enabled and/or communication is disabled.⌋ ()

[SWS_CanNm_00101] ⌈When the NM-Timeout Timer expires in the Repeat


Message State, the CanNm module shall (re-)start the NM-Timeout Timer.⌋()

[SWS_CanNm_00193] ⌈When the NM-Timeout Timer expires in the Repeat


Message State the CanNm module shall report CANNM_E_NETWORK_TIMEOUT to the
DET.⌋ (RS_Nm_00137)

[SWS_CanNm_00102] ⌈The network management state machine shall stay in the


Repeat Message State for a configurable amount of time determined by the
CanNmRepeatMessageTime (configuration parameter); after that time the CanNm
module shall leave the Repeat Message State.⌋()
24 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00103] ⌈When Repeat Message State is left and if the network has
been requested (see SWS_CanNm_00104), the CanNm module shall enter the
Normal Operation State.⌋(RS_Nm_00047)

[SWS_CanNm_00106] ⌈When Repeat Message State is left and if the network has
been released (see SWS_CanNm_00105), the CanNm module shall enter the Ready
Sleep State.⌋(RS_Nm_00047)

[SWS_CanNm_00107] ⌈If CanNmNodeDetectionEnabled is set to TRUE CanNm shall


clear the Repeat Message Bit when leaving the Repeat Message State.⌋()

[SWS_CanNm_00137] ⌈If the service CanNm_RepeatMessageRequest is called in


Repeat Message State, Prepare Bus-Sleep Mode or Bus-Sleep Mode, the CanNm
module shall not execute the service and return E_NOT_OK.⌋()

[SWS_CanNm_00382] {DRAFT} ⌈If CanNmDynamicPncToChannelMappingEnabled is


set to TRUE CanNm shall clear the Partial Network Learning Bit when leaving the
Repeat Message State.⌋()

7.2.1.2 Normal Operation State

The Normal Operation State ensures that any node can keep the network
management cluster awake as long as the network is requested.

[SWS_CanNm_00116] ⌈When the Normal Operation State is entered from Ready


Sleep State, the CanNm module shall start transmission of Network Management
PDUs.⌋()

Note: If passive mode is enabled or the Network Management PDU transmission


ability has been disabled no NM PDUs are transmitted, therefore no action is
required.

[SWS_CanNm_00117] ⌈When the NM-Timeout Timer expires in the Normal


Operation State, the CanNm module shall (re-)start the NM-Timeout Timer.⌋()

[SWS_CanNm_00194] ⌈When the NM-Timeout Timer expires in the Normal


Operation State the CanNm module shall report CANNM_E_NETWORK_TIMEOUT to the
DET. ⌋ (RS_Nm_00137)

[SWS_CanNm_00118] ⌈When the network is released and the current state is


Normal Operation State, the CanNm module shall enter the Ready Sleep state (refer
to SWS_CanNm_00105).⌋(RS_Nm_00047)

[SWS_CanNm_00119] ⌈If CanNmNodeDetectionEnabled is set to TRUE and Repeat


Message Request Bit is received in the Normal Operation State, the CanNm module
shall enter the Repeat Message State.⌋(RS_Nm_00153, RS_Nm_02549)

25 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00120] ⌈If CanNmNodeDetectionEnabled is set to TRUE and function


CanNm_RepeatMessageRequest is called in the Normal Operation State, the CanNm
module shall enter the Repeat Message State.⌋(RS_Nm_00153, RS_Nm_02549)

[SWS_CanNm_00121] ⌈If CanNmNodeDetectionEnabled is set to TRUE and function


CanNm_RepeatMessageRequest is called in the Normal Operation State the CanNm
module shall set the Repeat Message Bit.⌋(RS_Nm_00153, RS_Nm_02549)

7.2.1.3 Ready Sleep State

The Ready Sleep State ensures that any node in the network management cluster
waits with transition to the Prepare Bus-Sleep Mode as long as any other node keeps
the network management cluster awake.

[SWS_CanNm_00108] ⌈When the Ready Sleep State is entered from Repeat


Message State or Normal Operation State, the CanNm module shall stop
transmission of Network Management PDUs.⌋()

Note: If passive mode is enabled no NM PDUs are transmitted, therefore no action is


required.

Note: If passive mode is disabled in some cases NM PDUs have to be transmitted in


Ready Sleep State to grant a synchronized shutdown in the network, e.g. re-
transmission of PN shutdown messages.

[SWS_CanNm_00109] ⌈When the NM-Timeout Timer expires in the Ready Sleep


State, the CanNm module shall enter the Prepare Bus-Sleep Mode.⌋ ()

[SWS_CanNm_00110] ⌈When the network is requested and the current state is the
Ready Sleep State, the CanNm module shall enter Normal Operation State (refer to
SWS_CanNm_00104).⌋ (RS_Nm_00047)

[SWS_CanNm_00111] ⌈If CanNmNodeDetectionEnabled is set to TRUE and Repeat


Message Request Bit is received in the Ready Sleep State, the CanNm module shall
enter the Repeat Message State.⌋(RS_Nm_00153, RS_Nm_02549)

[SWS_CanNm_00112] ⌈If CanNmNodeDetectionEnabled is set to TRUE and function


CanNm_RepeatMessageRequest is called in the Ready Sleep State, the CanNm
module shall enter the Repeat Message State.⌋(RS_Nm_00153, RS_Nm_02549)

[SWS_CanNm_00113] ⌈If CanNmNodeDetectionEnabled is set to TRUE and function


CanNm_RepeatMessageRequest is called in Ready Sleep State the CanNm module
shall set the Repeat Message Bit.⌋(RS_Nm_00153, RS_Nm_02549)

7.2.2 Prepare Bus-Sleep Mode

26 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

The purpose of the Prepare Bus-Sleep Mode is to ensure that all nodes have time to
stop their network activity before the Bus-Sleep Mode is entered. In Prepare Bus-
Sleep Mode the bus activity is calmed down (i.e. queued messages are transmitted
in order to make all Tx-buffers empty) and finally there is no activity on the bus in the
Prepare Bus-Sleep Mode.

[SWS_CanNm_00114] ⌈When Prepare Bus-Sleep Mode is entered, the CanNm


module shall notify the upper layer by calling
Nm_PrepareBusSleepMode.⌋(RS_Nm_00051)

[SWS_CanNm_00115] ⌈If CanNmStayInPbsEnabled is disabled CanNm shall stay in


the Prepare Bus-Sleep Mode for a configurable amount of time determined by the
CanNmWaitBusSleepTime (configuration parameter); after that time the Prepare Bus-
Sleep Mode shall be left and the Bus-Sleep Mode shall be entered.⌋(RS_Nm_00051)

Note: This requirement implicitly contains that if CanNmStayInPbsEnabled is enabled


CanNm will never be left due to a timeout, i.e. CanNm will stay in Prepare Bus-Sleep
Mode until either ECU goes to Power Off or any restart reason applies (e.g. see
following requirements).

[SWS_CanNm_00124] ⌈At successful reception of a Network Management PDU in


the Prepare Bus-Sleep Mode, the CanNm Module shall enter the Network Mode; by
default the CanNm Module shall enter the Repeat Message State (refer to
SWS_CanNm_00315).⌋(RS_Nm_00151)

[SWS_CanNm_00123] ⌈When the network is requested in the Prepare Bus-Sleep


Mode, the CanNm module shall enter the Network Mode; by default the CanNm
Module shall enter the Repeat Message State (refer to SWS_CanNm_00315).⌋()

[SWS_CanNm_00122] ⌈When the network has been requested (see


SWS_CanNm_00104) in the Prepare Bus-Sleep Mode and the CanNm module has
entered Network Mode and if CanNmImmediateRestartEnabled (configuration
parameter) is set to TRUE, the CanNm module shall transmit a Network
Management PDU.⌋()

Rationale: Other nodes in the cluster are still in Prepare Bus-Sleep Mode; in the
exceptional situation described above transition into the Bus-Sleep Mode shall be
avoided and bus-communication shall be restored as fast as possible.
Caused by the transmission offset for Network Management PDUs in CanNm, the
transmission of the first Network Management PDU in Repeat Message State can be
delayed significantly. In order to avoid a delayed re-start of the network the
transmission of a Network Management PDU can be requested immediately.

Note: If CanNmImmediateRestartEnabled is set to TRUE and a wake-up line is used, a


burst of Network Management PDUs occurs if all network nodes get a network
request in Prepare Bus-Sleep Mode.

27 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

7.2.3 Bus-Sleep Mode

The purpose of the Bus-Sleep Mode is to reduce power consumption in the node
when no messages are to be exchanged. The communication controller is switched
into the sleep mode, respective wakeup mechanisms are activated and finally power
consumption is reduced to the adequate level in the Bus-Sleep Mode.

If CanNmStayInPbsEnabled is disabled and a configurable amount of time


determined by the CanNmTimeoutTime + CanNmWaitBusSleepTime (both configuration
parameters) is identically configured for all nodes in the network management
cluster, all nodes in the network management cluster that are coordinated with use of
the AUTOSAR NM algorithm perform the transition into the Bus-Sleep Mode at
approximately the same time.

Note: The parameters CanNmTimeoutTime and CanNmWaitBusSleepTime should


have the same values within all network nodes of the network management cluster.
Depending on the specific implementation, transition into the Bus-Sleep Mode takes
place exactly or approximately at the same time; time jitter for this transition depends
on the following factors:
 internal clock precision (oscillator’s drift),
 NM-task cycle time (if tasks are not synchronized with a global time),
 Network Management PDU waiting time in the Tx-queue (if transmission
confirmation is made immediately after transmit request).

In the best case only oscillator’s drift should be taken into account for a configurable
amount of time determined by the value CanNmTimeoutTime +
CanNmWaitBusSleepTime (both configuration parameters).

[SWS_CanNm_00126] ⌈When Bus-Sleep Mode is entered, except by default at


initialization, the CanNm module shall notify the upper layer by calling the callback
function Nm_BusSleepMode.⌋(RS_Nm_00051)

[SWS_CanNm_00127] ⌈When the CanNm module successfully receives a Network


Management PDU (call of CanNm_RxIndication) in the Bus-Sleep Mode, the CanNm
module shall notify the upper layer by calling the callback function
Nm_NetworkStartIndication.⌋ (RS_Nm_00151)

Rationale: To avoid race conditions and state inconsistencies between Network and
Mode Management, CanNm will not automatically perform the transition from Bus-
Sleep Mode to Network Mode. CanNm will only inform the upper layers which have
to make the wake-up decision. Network Management PDU reception in Bus-Sleep
Mode must be handled depending on the current state of the ECU shutdown/startup
process.

[SWS_CanNm_00336] ⌈When the CanNm module successfully receives a Network


Management PDU (call of CanNm_RxIndication) in the Bus-Sleep Mode, the CanNm
module shall report the error CANNM_E_NET_START_IND to the DET.⌋()

28 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00128] ⌈If CanNm_PassiveStartUp is called in the Bus-Sleep Mode or


Prepare Bus-Sleep Mode, the CanNm module shall enter the Network Mode; by
default the CanNm module shall enter the Repeat Message State (refer to
SWS_CanNm_00314 and SWS_CanNm_00315).⌋ (RS_Nm_02536)

Note: In the Prepare Bus-Sleep Mode and Bus-Sleep Mode is assumed that the
network is released, unless bus communication is explicitly requested.

[SWS_CanNm_00129] ⌈When the network is requested in Bus-Sleep Mode, the


CanNm module shall enter the Network Mode; by default the CanNm module shall
enter the Repeat Message State (refer to SWS_CanNm_00314 and
SWS_CanNm_00104).⌋(RS_Nm_00046)

7.3 Network states

Network states (i.e. ‘requested’ and ‘released’) are two additional states of the
AUTOSAR CanNm state machine that exist in parallel to the state machine. Network
states denote, whether the software components need to communicate on the bus
(the network state is then ‘requested’); or whether the software components don’t
have to communicate on the bus (the bus network state is then ‘released’); note that
if the network is released an ECU may still communicate because some other ECU
still request the network.

[SWS_CanNm_00104] ⌈The function call CanNm_NetworkRequest shall request the


network. I.e. the CanNm module shall change network state to ‘requested’.⌋
(RS_Nm_00045, RS_Nm_00047, RS_Nm_02513)

[SWS_CanNm_00105] ⌈The function call CanNm_NetworkRelease shall release the


network. I.e. the CanNm module shall change network state to ‘released’.⌋
(RS_Nm_00045, RS_Nm_00047, RS_Nm_02513)

7.4 Initialization

[SWS_CanNm_00141] ⌈If the initialization of the CanNm module (CanNm_Init) is


successful, the CanNm module shall set the Network Management State to Bus-
Sleep Mode.⌋()

Note: The CanNm module should be initialized after CanIf is initialized and before
any other network management service is called.

[SWS_CanNm_00143] ⌈When initialized, by default, the CanNm module shall set the
network state to ‘released’⌋()

[SWS_CanNm_00144] ⌈When initialized, by default, the CanNm module shall enter


the Bus-Sleep Mode.⌋()
29 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00060] ⌈The function CanNm_Init shall select the active


configuration set by means of a configuration pointer parameter being passed (see
8.3.1).⌋()

[SWS_CanNm_00061] ⌈If CanNmGlobalPnSupport is set to TRUE and CanNm is


initialized (call of CanNm_Init) then CanNm shall stop the NM Message Tx Timeout
Timer.⌋()

[SWS_CanNm_00023] ⌈During initialization the CanNm module shall deactivate the


bus load reduction.⌋()

[SWS_CanNm_00033] ⌈ After initialization the CanNm module shall stop the


transmission of Network Management PDUs by stopping the Message Cycle
Timer.⌋()

Note: If CanNmPassiveModeEnabled is set to TRUE the CanNm Message Cycle is not


needed, because no Network Management PDUs are transmitted by such nodes.

[SWS_CanNm_00025] ⌈During initialization the CanNm module shall set each byte
of the user data to 0xFF.⌋()

[SWS_CanNm_00085] ⌈During initialization the CanNm module shall set the Control
Bit Vector to 0x00.⌋()

[SWS_CanNm_00500]{DRAFT}⌈During initialization and if CanNmPnEnabled is TRUE,


the CanNm module shall set each byte of the PNC bit vector to 0x00.⌋()

7.5 Execution

7.5.1 Processor architecture

[SWS_CanNm_00146] ⌈The AUTOSAR CanNm algorithm shall be processor


independent, which means; it shall not rely on any processor specific hardware
support and thus shall be realizable on any processor architecture that is in the
scope of AUTOSAR.⌋()

7.5.2 Timing parameters

[SWS_CanNm_00246] ⌈The configuration parameter CanNmTimeoutTime shall


determine the AUTOSAR CanNm timing parameter NM-Timeout Time.⌋()

[SWS_CanNm_00247] ⌈The configuration parameter CanNmRepeatMessageTime


shall determine the AUTOSAR CanNm timing parameter Repeat Message Time.⌋()

30 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00248] ⌈The configuration parameter CanNmWaitBusSleepTime shall


determine the AUTOSAR CanNm timing parameter Wait Bus-Sleep Time.⌋()

[SWS_CanNm_00249] ⌈The configuration parameter CanNmRemoteSleepIndTime


shall determine the AUTOSAR CanNm timing parameter Remote Sleep Indication
Time.⌋()

7.6 Network Management PDU Structure

The figure below shows the format of the Network Management PDU for an example
with 8 bytes where Source Node Identifier (SNI) is located in the first byte and the
Control Bit Vector (CBV) at the second byte, user data is used and partial network is
enabled. User data range is located between the system bytes and the PNC bit
vector:

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0


Byte 7 PNC bit vector - byte 3
Byte 6 PNC bit vector - byte 2
Byte 5 PNC bit vector - byte 1
Byte 4 PNC bit vector - byte 0
Byte 3 User data 1
Byte 2 User data 0
Byte 1 Control Bit Vector
Byte 0 Source Node Identifier
Figure 7-1 Network Management PDU Format Example

[SWS_CanNm_00074] ⌈The location of the Source Node Identifier shall be


configurable by means of CanNmPduNidPosition to Byte 0, Byte 1, or off.⌋
(RS_Nm_02505)

Note: Setting the CanNmPduNidPosition to off means that in the NM PDU no space is
occupied by the Source Node Identifier. Hence one more byte is available for user
data or PNC bit vector.

[SWS_CanNm_00075] ⌈The location of the Control Bit Vector shall be configurable


by means of CanNmPduCbvPosition to Byte 0, Byte 1, or off.⌋()

Note:
 Setting the CanNmPduCbvPosition to off means that in the NM PDU no space is
occupied by the CBV. Hence one more byte is available for user data.
 The location of the PNC bit vector is configurable by means of
NmPncBitVectorOffset and NmPncBitVectorLength of the corresponding NM-
channel. The location of the PNC bit vector is placed after the system bytes
(CBV and SNI) and within the PduLength of the NM-PDU.

[SWS_CanNm_00501]{DRAFT}⌈The remaining bytes not assigned to Nm System


Bytes or PNC bit vector shall be available for User Data.⌋()

31 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Note: According to [11] (TPS_SYST_03069, TPS_SYST_03070, TPS_SYST_03071,


TPS_SYST_03072) the use and location of user data is configurable. If user data is
used, the user data is placed within the PduLength of the NM-PDU and does not
overlap with the range of system bytes or PNC bit vector. If partial network
functionaliy is enabled (CanNmPnEnabled is set to TRUE) and user data is used, the
user data range is exclusively located either between the system bytes and the PNC
bit vector or between the PNC bit vector and the end of the NM-PDU. The length of
user data range has to be calculated according to the following restrictions:
- If the user data range resides between the system bytes and the PNC bit
vector, then the length of the user data range is determined by the difference
of the PNC bit vector offset and the length of the system bytes.
- If the user data range resides between the PNC bit vector and the end of the
NM-PDU, then the length of the user data range is determined by the
difference of the NM-PDU length and the position/index of the last byte of the
PNC bit vector (defined by PNC bit offset + PNC bit vector length)
If partial network functionaliy is disabled (CanNmPnEnabled is set to FALSE) and user
data is used, the user data range is determined by the difference of NM-PDU length
and the length of the system bytes.

Note: The length of the Network Management PDU is defined by the PduLength
parameter in the "global" ECUC module ([EcuC003_Conf], see Ecu Configuration
specification).

The figure below describes the format of the Control Bit Vector:
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Partial Partial NM PN
Active Repeat
Reserv Network Network Coordinat Shutdown
CBV Wakeup Reserved Message
ed Informat Learnin or Sleep Request
Bit Request
ion Bit g Bit Ready Bit Bit
Figure 7-2 Control Bit Vector
Note: Bits 1 and 2 were used in R3.2 as NM Coordinator ID (Low Bit)

[SWS_CanNm_00045] {DRAFT} ⌈The Control Bit Vector shall consist of


Bit 0: Repeat Message Request Bit
0: Repeat Message State not requested
1: Repeat Message State requested
Bit 1: PN Shutdown Request Bit (PNSR)
0: NM message does not contain synchronized Partial Network shutdown
request
1: NM message does contain synchronized Partial Network shutdown request
for at least one PNC
Bit 3: NM Coordinator Sleep Bit
0: Start of synchronized shutdown is not requested by main coordinator
1: Start of synchronized shutdown is requested by main coordinator
Bit 4 Active Wakeup Bit
0: Node has not woken up the network (passive wakeup)
1: Node has woken up the network (active Wakeup)
Bit 5 Partial Network Learning Bit (PNL)
0: PNC Learning is not requested
1: PNC Learning is requested
32 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Bit 6 Partial Network Information Bit (PNI)


0: NM PDU contains no Partial Network request information
1: NM PDU contains Partial Network request information
Bit 2 and 7 are reserved for future extensions
0: Disabled / Reserved for future usage⌋ (RS_Nm_02519, RS_Nm_02540,
RS_Nm_02547, RS_Nm_02548, RS_Nm_02549)

Note: The CBV is initialized with 0x00 during initialization (also refer to
SWS_CanNm_00085).

[SWS_CanNm_00013] ⌈The CanNm module shall set the Source Node Identifier
with the configuration parameter CanNmNodeId unless CanNmPduNidPosition is set to
off.⌋ (RS_Nm_02503)

[SWS_CanNm_00401] ⌈If the CanNm performs a state change from Bus Sleep
Mode or Prepare Bus Sleep Mode to Network Mode due to a call to
CanNm_NetworkRequest (i.e. due to an active wakeup) and
CanNmActiveWakeupBitEnabled is TRUE, the CanNm shall set the ActiveWakeupBit in
the CBV.⌋()

[SWS_CanNm_00402] ⌈If the CanNm module leaves the Network Mode and
CanNmActiveWakeupBitEnabled is TRUE, the CanNm module shall clear the
ActiveWakeupBit in the CBV.⌋()

7.7 Communication Scheduling

7.7.1 Transmission

Note: The transmission mechanisms described in this chapter are only relevant if the
Network Management PDU transmission ability is enabled.

[SWS_CanNm_00072] ⌈The Network Management PDUs transmission capability


shall be configurable by means of CanNmPassiveModeEnabled (see chapter 10.2).⌋
(RS_Nm_02511)

Note: The transmission mechanisms described in this chapter are only relevant if
CanNmPassiveModeEnabled is FALSE.

[SWS_CanNm_00237] ⌈The CanNm module shall provide the periodic transmission


mode. In this transmission mode the CanNm module shall send Network
Management PDUs periodically.⌋ ()

[SWS_CanNm_00238] ⌈The CanNm module shall optionally provide the periodic


transmission mode with bus load reduction. In this transmission mode the CanNm
module shall transmit Network Management PDUs due to a specific algorithm.⌋()

33 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

The periodic transmission mode is used in "Repeat Message State" and "Normal
Operation State". Periodic transmission mode with bus load reduction is only
available in "Normal Operation State"

Note: The periodic transmission mode is used in the "Repeat Message State" and
"Normal Operation State" if the bus load reduction mechanism is disabled.
The periodic transmission mode with bus load reduction is only used, in the "Normal
Operation State" if the bus load reduction mechanism is enabled.

[SWS_CanNm_00071] ⌈The immediate transmission confirmation mechanism shall


be configurable by means of the CanNmImmediateTxConfEnabled (see 10.2).⌋
(RS_Nm_00142)

Note: The immediate transmission confirmation mechanism is used for systems


which don't want to use the actual confirmation from the CanIf.

Rationale: If the bus access is completely regulated through an offline system design
tool, the actual transmit confirmation to inform the Nm about a successful
transmission can be regarded as redundant. Since the maximum arbitration time is
known it is acceptable to immediately raise the confirmation at the transmission
request time.
Moreover, implementation of superfluous actual transmission confirmation in such a
system only for one NM message would mean a significant performance loss
regarding the execution time of the overall CAN Interface/Driver layer making the
calculated time schedule inefficient.

[SWS_CanNm_00005] ⌈If the Repeat Message State is not entered via


CanNm_NetworkRequest OR CanNmImmediateNmTransmissions is zero the
transmission of NM PDU shall be delayed by CanNmMsgCycleOffset after entering the
repeat message state.⌋()

[SWS_CanNm_00334] ⌈When entering the Repeat Message State from Bus Sleep
Mode or Prepare Bus Sleep Mode because of CanNm_NetworkRequest() (active
wakeup) and if CanNmImmediateNmTransmissions is greater zero, the NM PDUs shall
be transmitted using CanNmImmediateNmCycleTime as cycle time. The transmission
of the first NM PDU shall be triggered as soon as possible. After the transmission the
Message Cycle Timer shall be reloaded with CanNmImmediateNmCycleTime. The
CanNmMsgCycleOffset shall not be applied in this case.⌋ ()

[SWS_CanNm_00006] ⌈If Normal Operation State is entered from Ready Sleep


State the transmission of NM PDUs shall be started immediately.⌋()

[SWS_CanNm_00454] ⌈If CanNmPnHandleMultipleNetworkRequests is set to TRUE


CanNm_NetworkRequest shall trigger a state transition from Network Mode to Repeat
Message state. If PDU transmission ability is enabled the NM PDUs shall be
transmitted using CanNmImmediateNmCycleTime as cycle time. The transmission of
the first NM PDU shall be triggered as soon as possible. After the transmission the
Message Cycle Timer shall be reloaded with CanNmImmediateNmCycleTime. The
CanNmMsgCycleOffset shall not be applied in this case.⌋ ()
34 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Note: CanNmImmediateNmTransmissions has to be greater zero in this case due to


ECUC_CanNm_00056.

[SWS_CanNm_00335] ⌈If NM PDUs shall be transmitted with CanNmImmediate-


NmCycleTime (See [SWS_CanNm_00334] and [SWS_CanNm_00454]), CanNm
shall ensure that CanNmImmediateNmTransmissions (including first immediate
transmission) with this timing are requested succesfully. If a transmission request to
CanIf fails (E_NOT_OK is returned), CanNm shall retry the transmission request in the
next main function.
Afterwards CanNm shall continue transmitting NM PDUs using the
CanNmMsgCycleTime.⌋ ()

Note: While transmitting NM PDUs using the CanNmImmediateNmCycleTime no other


Nm PDUs shall be transmitted (i.e. the CanNmMsgCycleTime transmission cycle is
stopped).

[SWS_CanNm_00032] {DRAFT} ⌈ If transmission of Network Management PDUs


has been started, the CanNm Message Cycle Timer expires and when
CanNmSynchronizedPncShutdownEnabled is set to either FALSE or if set to TRUE and
additionally no request for a synchronized PNC shutdown is pending, then the
CanNm module shall transmit a Network Management PDU by calling
CanIf_Transmit.⌋ ()

Note: If the function call of CanIf_Transmit fails the Transmission Error handling
described in chapter 7.12 informs the CanNm module.

[SWS_CanNm_00460] {DRAFT} ⌈If transmission of NM PDUs has been started, the


CanNm Message Cycle Timer expires and when
CanNmSynchronizedPncShutdownEnabled is set to TRUE and requests for synchronized
PNC shutdown are pending, the transmission of the NM PDU shall be postponed to
the next CanNm_Mainfunction call.⌋(RS_Nm_02545)

Note:
- The synchronized PNC shutdown has to be sent immediately and therefore
processing of cylic NM messages transmitted with CanNmMsgCycleTime has to
be delayed. In rare cases this could lead to a delay of more than one main
function cycle time.
- The NM timing has to consider that an NM message transmitted with
CanNmMsgCycleTime may be delayed for more than one main function cycle
time. Therefore, the following condition has to be fulfilled to tolerate multiple
delays of those NM Messages:
(CanNmPnResetTime – CanNmMsgCycleTime) > n * CanNmMainFunctionPeriod,
where n denotes the number of tolerated delays before the PnResetTime
expires, if no NM message is received.

[SWS_CanNm_00040] ⌈If the CanNm Message Cycle Timer expires the CanNm
module shall restart with CanNmMsgCycleTime.⌋ ()
35 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00051] ⌈If transmission of Network Management PDUs has been


stopped the CanNm module shall cancel the Message Cycle Timer.⌋ ()

7.7.2 Reception

If a NM PDU has been successfully received, the CanIf module will call the callback
function CanNm_RxIndication.

[SWS_CanNm_00035] ⌈On the call of the callback function CanNm_RxIndication, the


CanNm module shall copy the data of the Network Management PDU referenced in
the function parameter to an internal buffer.⌋ ()

7.8 Bus Load Reduction Mechanism

The transmission period of Network Management PDUs is usually determined by the


timing parameter CanNmMsgCycleTime. This parameter has to be equal for all NM
nodes which belong to a network management cluster. Without any action this would
lead to a bus load which depends on the amount of members of the network
management cluster. Even if bursts are prevented through a node specific timing
parameter called CanNmMsgCycleOffset a mechanism is necessary which reduces the
bus load independently of the size of the network management cluster.

In order to achieve that the following two aspects have to be considered:

1. If a Network Management PDU is received the CanNm Message Cycle Timer is


reloaded with the node specific timing parameter CanNmMsgReducedTime.
The node specific time CanNmMsgReducedTime should be greater than ½
CanNmMsgCycleTime and less than CanNmMsgCycleTime.

2. If a Network Management PDU is been transmitted the CanNm Message Cycle


Timer is reloaded with the network management cluster specific timing parameter
CanNmMsgCycleTime.

This leads to the following behavior:


Only the two nodes with the smallest CanNmMsgReducedTime time transmit
alternating Network Management PDUs on the network. If one of the nodes stops
transmission, the node with the next smallest CanNmMsgReducedTime time will start to
transmit Network Management PDUs. If there is only one node on the network that
requires bus communication, one Network Management PDU per
CanNmMsgCycleTime is transmitted.

The algorithm ensures that the bus load is limited to a maximum two Network
Management PDUs per CanNmMsgCycleTime.

36 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

An example can be found in chapter 11.

[SWS_CanNm_00052] ⌈The bus load reduction mechanism shall be statically


configurable by means of the CanNmBusLoadReductionEnabled parameter (see
10.2).⌋(RS_Nm_00142)

[SWS_CanNm_00156] ⌈When the Repeat Message State is entered from Bus-


Sleep Mode, Prepare Bus-Sleep Mode, Normal Operation or Ready Sleep State the
CanNm module shall deactivate the busload reduction.⌋(RS_Nm_00142)

[SWS_CanNm_00157] ⌈When the Normal Operation State is entered from Repeat


Message State or Ready Sleep State and CanNmBusLoadReductionEnabled is TRUE
the CanNm module shall activate the busload reduction.⌋(RS_Nm_00142)

[SWS_CanNm_00069] ⌈If the bus load reduction mechanism is globally enabled


(CanNmBusLoadReductionEnabled is TRUE), for a particular network activated, PDU
transmission ability is enabled and the function CanNm_RxIndication is called for this
network, the CanNm module shall restart the CanNm Message Cycle Timer with the
node specific time CanNmMsgReducedTime.⌋(RS_Nm_00142)

7.9 Additional features

7.9.1 Detection of Remote Sleep Indication

The “Remote Sleep Indication” denotes a situation, where a node in Normal


Operations States finds all other nodes in the cluster are ready to sleep (in Ready-
Seep State). The node in Normal Operation State will still keep the bus awake.

[SWS_CanNm_00149] ⌈Detection of remote sleep indication shall be statically


configurable with use of the CanNmRemoteSleepIndEnabled switch (configuration
parameter).⌋()

[SWS_CanNm_00150] ⌈If the CanNm module receives no Network Management


PDUs in the Normal Operation State for a configurable amount of time determined by
CanNmRemoteSleepIndTime (configuration parameter), the CanNm module shall call
the callback function Nm_RemoteSleepIndication.⌋(RS_Nm_00052)

With a call of Nm_RemoteSleepIndication CanNm notifies the module Nm that all


nodes in the cluster are ready to sleep (the so-called ‘Remote Sleep Indication’).

[SWS_CanNm_00151] ⌈If Remote Sleep Indication has been previously detected


and if a Network Management PDU is received in the Normal Operation State or
Ready Sleep State again, the module CanNm shall call the callback function
Nm_RemoteSleepCancellation.⌋(RS_Nm_02509)

[SWS_CanNm_00152] ⌈If Remote Sleep Indication has been previously detected


and if Repeat Message State is entered from Normal Operation State or Ready
37 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Sleep State, the module CanNm shall call the callback function
Nm_RemoteSleepCancellation.⌋(RS_Nm_02509)

With a call of Nm_RemoteSleepCancellation CanNm notifies the module Nm that some


nodes in the cluster are not ready to sleep anymore (the so-called ‘Remote Sleep
Cancellation’).

[SWS_CanNm_00154] ⌈When the service CanNm_CheckRemoteSleepIndication is


called and the state is Bus-Sleep Mode, Prepare Bus-Sleep Mode or Repeat
Message State the CanNm module shall not execute the service and shall return
E_NOT_OK.⌋()

7.9.2 User Data

[SWS_CanNm_00158] ⌈Support of NM user data shall be statically configurable


with use of the CanNmUserDataEnabled switch (configuration parameter).⌋()

[SWS_CanNm_00159] ⌈When CanNm_SetUserData is called the CanNm module


shall set the Network Management user data for the Network Management PDUs
transmitted next on the bus.⌋ (RS_Nm_02503)

[SWS_CanNm_00160] ⌈When CanNm_GetUserData is called CanNm module shall


return the Network Management user data of the most recently received Network
Management PDU.⌋(RS_Nm_02504)

Note: If user data is configured it will be sent for sure in Repeat Message State. In
Normal Operation State it depends on the configuration of busload reduction whether
user data is sent. In Ready Sleep State user data will not be sent.

7.9.2.1 COM User Data


Alternatively to the usage of the CanNm APIs to set and get user data, CanNm may
use the COM to retrieve its user data.

[SWS_CanNm_00327] ⌈ If CanNmComUserDataSupport is enabled the API


CanNm_SetUserData shall not be available.⌋()

[SWS_CanNm_00328] ⌈If CanNmComUserDataSupport is enabled and NM-PDU is


not configured for triggered transmission in CanIf (CanIfTxPduTriggerTransmit set to
FALSE) CanNm shall collect the NM User Data from the referenced NM I-PDU by
calling PduR_CanNmTriggerTransmit and combine the user data with the further NM
bytes each time before it requests the transmission of the corresponding NM PDU.⌋
(RS_Nm_02503)

Note: In case of triggered transmission no data is needed at the transmission


request, just the length is needed. The data will be collected within
CanNm_TriggerTransmit (see chapter 8.4.4 CanNm_TriggerTransmit).

38 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00450] ⌈If CanNmComUserDataSupport is enabled and


PduR_CanNmTriggerTransmit returns E_NOT_OK, the NM shall use the last
transmitted value for NmUserData.⌋()

Note: The transmission of outdated NM data can be avoided by not stopping the IPdu
in COM used for NmUserData transmission.

[SWS_CanNm_00329] ⌈If CanNmComUserDataSupport is enabled and


CanNm_TxConfirmation is called CanNm shall forward the transmission confirmation
result to PduR by calling PduR_CanNmTxConfirmation.⌋()

[SWS_CanNm_00332] ⌈If CanNmComUserDataSupport is enabled and the number of


available user data bytes does not match to the length of the referenced I-PDU an
error shall be reported at generation time.⌋()

7.9.3 Passive Mode

In the Passive Mode the node is only receiving Network Management PDUs but not
transmitting any Network Management PDUs.

[SWS_CanNm_00161] ⌈Passive Mode shall be statically configurable with use of


the CanNmPassiveModeEnabled switch (configuration parameter).⌋ (RS_Nm_02511)

Note: Passive Mode has to be either enabled or disabled for all NM networks within
one ECU.

7.9.4 Network Management PDU Rx Indication

[SWS_CanNm_00037] ⌈On the call of the callback function CanNm_RxIndication, the


CanNm module shall call the Nm callback function Nm_PduRxIndication, if and only if
CanNmPduRxIndicationEnabled (configuration parameter) is set to TRUE.⌋()

7.9.5 State change notification

[SWS_CanNm_00166] ⌈All changes of the AUTOSAR CanNm states shall be


notified to the upper layer by calling Nm_StateChangeNotification if the callback
Nm_StateChangeNotification is enabled (configuration parameter
CanNmStateChangeIndEnabled is TRUE).⌋(RS_Nm_00051)

7.9.6 Communication Control

Note: Communication Control is statically configurable by the configuration


parameter CanNmComControlEnabled.

39 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00170] ⌈If the service CanNm_DisableCommunication is called the


CanNm module shall disable the Network Management PDU transmission ability.⌋
(RS_Nm_02512)

Note: This behavior shall also be applied in Repeat Message State. Communication
Control feature does not influence the duration of the Repeat Message State.

[SWS_CanNm_00173] ⌈When the Network Management PDU transmission ability is


disabled, the CanNm module shall stop the CanNm Message Cycle Timer in order to
stop the transmission of Network Management PDUs.⌋ (RS_Nm_02512)

[SWS_CanNm_00174] ⌈When the Network Management PDU transmission ability is


disabled, the CanNm module shall stop the NM-Timeout Timer.⌋()

[SWS_CanNm_00175] ⌈When the Network Management PDU transmission ability is


disabled, the CanNm module shall stop the Remote Sleep Indication Detection.⌋()

[SWS_CanNm_00178] ⌈When the Network Management PDU transmission ability is


enabled, the transmission of NM PDUs shall be started latest within the next NM
main function.⌋ (RS_Nm_02512)

[SWS_CanNm_00179] ⌈When the Network Management PDU transmission ability is


enabled, the CanNm module shall restart the NM-Timeout Timer.⌋()

[SWS_CanNm_00180] ⌈If CanNmRemoteSleepIndEnabled is TRUE and the Network


Management PDU transmission ability is enabled, the CanNm module shall re-start
the Remote Sleep Indication Detection.⌋()

[SWS_CanNm_00181] ⌈The service CanNm_RequestBusSynchronization shall return


E_NOT_OK if the Network Management PDU transmission ability is disabled.⌋()

7.9.7 Coordinator Synchronization Support

When having more than one coordinator connected to the same bus a special bit in
the CBV, the NmCoordinatorSleepReady bit is used to indicate that the main
coordinator requests to start shutdown sequence. The main functionality of the
algorithm is described in the Nm module.

[SWS_CanNm_00341] ⌈If CanNmCoordinatorSyncSupport is set to TRUE and CanNm


has entered Network Mode or called Nm_CoordReadyToSleepCancellation before it
shall notify the Nm by calling Nm_CoordReadyToSleepIndication on the first reception
of a NM PDU with the NmCoordinatorSleepReady bit (see CBV) set to 1. ⌋ ()

[SWS_CanNm_00348] ⌈If CanNmCoordinatorSyncSupport is set to TRUE and CanNm


called Nm_CoordReadyToSleepIndication and is still in Network Mode it shall notify the
Nm by calling Nm_CoordReadyToSleepCancellation on the first reception of a NM PDU
with the NmCoordinatorSleepReady bit (see CBV) set to 0.⌋ ()

40 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00342] ⌈If CanNmCoordinatorSyncSupport is set to TRUE and the API


CanNm_SetSleepReadyBit is called CanNm shall set the “NM Coordinator Sleep ready
Bit” to the passed value and trigger a single Network Management PDU.⌋ ()

7.10 Car Wakeup

[SWS_CanNm_00405] ⌈The position of the Car Wakeup bit in the NM-PDU is


defined by the configuration parameters CanNmCarWakeUpBytePosition and
CanNmCarWakeUpBitPosition.⌋()

7.10.1 Rx Path

[SWS_CanNm_00406] ⌈If the Car Wakeup bit within any received NM-PDU is 1,
CanNmCarWakeUpRxEnabled is TRUE, and CanNmCarWakeUpFilterEnabled is FALSE
CanNm shall call Nm_CarWakeUpIndication and perform the standard Rx indication
handling.⌋()

[SWS_CanNm_00407] ⌈If CanNm_GetPduData is called in the context of


Nm_CarWakeUpIndication and if CannNmNodeDetectionEnabled or
CanNmUserDataEnabled or CanNmNodeIdEnabled is set to TRUE CanNm shall return
the PDU data of the PDU that causes the call of Nm_CarWakeUpIndication.⌋()

Note: This is required to enable the ECU to identify detail about the sender of the Car
Wakeup request.

[SWS_CanNm_00408] ⌈If CanNmCarWakeUpFilterEnabled is TRUE, the Car Wakeup


bit within any received NM-PDU is 1, CanNmCarWakeUpRxEnabled is TRUE and the
Node ID in the received NM-PDU is equal to CanNmCarWakeUpFilterNodeId the
CanNm module shall call Nm_CarWakeUpIndication and perform the standard Rx
Indication handling.⌋()

Note: The Car Wakeup filter is necessary to realize sub gateways that only consider
the Car Wakeup of the central Gateway to avoid wrong wakeups.

7.10.2 Tx Path

The transmission of the Car Wakeup bit shall be handled by the application using the
NM user data mechanism provided by the CanNm module.

7.11 Partial Networking

7.11.1 Rx Handling of NM PDUs

41 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00409] ⌈If the CanNmPnEnabled is FALSE, the CanNm shall not drop
NM PDUs from further Rx Indication handling and the partial networking extensions
shall be disabled.⌋ (RS_Nm_02517)

[SWS_CanNm_00410] ⌈If CanNmPnEnabled is TRUE, the PNI bit in the received NM-
PDU is 0 and CanNmAllNmMessagesKeepAwake is TRUE, the CanNm module shall not
drop NM PDUs from further Rx Indication handling omitting the extensions for partial
networking.⌋ (RS_Nm_02517, RS_Nm_02527)

Note: This is required to enable the Gateway to stay awake on any kind of NM-PDU.

[SWS_CanNm_00411] ⌈If CanNmPnEnabled is TRUE, the PNI bit in the received NM-
PDU is 0 and CanNmAllNmMessagesKeepAwake is FALSE, the CanNm module shall
ignore the received NM-PDU.⌋ (RS_Nm_02517, RS_Nm_02527)

[SWS_CanNm_00412] {OBSOLETE, replaced by SWS_CanNm_00502} ⌈If


CanNmPnEnabled is TRUE and the PNI bit in the received NM-PDU is 1, CanNm
module shall process the Partial Networking Information of the NM-PDU as described
in chapter 7.11.4 NM PDU Filter Algorithm.⌋ (RS_Nm_02517, RS_Nm_02527)

[SWS_CanNm_00502] {DRAFT} ⌈If CanNmPnEnabled is set to TRUE, the PNI bit in


the received NM-PDU is set to 1 and the PNSR bit is set to 0, CanNm module shall
extract the PNC bit vector from the received NM-PDU according to the partial
network configuration (NmPncBitVectorOffset and NmPncBitVectorLength of the
corresponding NM-channel) and forward the PNC bit vector by calling
Nm_PncBitVectorRxIndication.⌋(RS_Nm_02517, RS_Nm_02527)

[SWS_CanNm_00503] {DRAFT} ⌈If CanNmPnEnabled is set to TRUE and


Nm_PncBitVectorRxIndication was called, a received NM PDU shall only be
considered for further processing under the following conditions:
 CanNmAllNmMessagesKeepAwake is set to TRUE OR
 CanNm_ConfirmPnAvailability has not been called yet OR
 the output value of RelevantPncRequestDetectedPtr is set to TRUE
⌋(RS_Nm_02517, RS_Nm_02527)

Note:
 CanNmAllNmMessagesKeepAwake is required to enable a gateway to stay
awake on any kind of NM-PDU.
 If PN availability was not confirmed by CanSM, all PNC requests are
considered as relevant and therefore the Nm restarts the NM-Timeout Timer
when receiving a NM-PDU. This is required to allow a malfunctioning partial
network depending hardware (e.g. PN capable CAN transceiver) to shut down
synchronously with the remaining network.
 As consequence of [SWS_CanNm_00503], a NM PDU is not considered for
further processing if not all messages shall keep the ECU awake and the PN
availability was confirmed but no relevant PN information was detected.

Example:
- CanNmPduCbvPosition =0
42 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

- CanNmPduNidPosition =1
- NmPncBitVectorOffset =4
- NmPncBitVectorLength = 4
- Calculated length of user data range =2

Byte 2 and Byte 3 of the NM PDU contain user data and


Byte 4 to Byte 7 of the NM PDU contain the PNC bit vector:

Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7


CBV NID User Data PNC bit vector
0x40 0x00 0xFF 0xFF 0x12 0x8E 0x80 0x01
Figure 7-3 Example NM PDU containing relevant PN information
For this example, four NmPnFilterMaskBytes are defined. The values of the PN filter
mask are used according to the partial network design e.g:
- NmPnFilterMaskByteIndex = 0 with NmPnFilterMaskByteValue = 0x01
- NmPnFilterMaskByteIndex = 1 with NmPnFilterMaskByteValue = 0x97
- NmPnFilterMaskByteIndex = 2 with NmPnFilterMaskByteValue = 0x00
- NmPnFilterMaskByteIndex = 3 with NmPnFilterMaskByteValue = 0x00

Note: The offset for the PNC bit vector is derived from the Nm module
(NmPncBitVectorOffset). The PNC bit vector length is derived form the Nm module
per NM-channel (NmPncBitVectorLength). The PN filter mask
(NmPnFilterMaskByteIndex and NmPnFilterMaskByteValue) is located and used in
the Nm module.

[SWS_CanNm_00461] {DRAFT} ⌈If CanNmSynchronizedPncShutdownEnabled is set to


TRUE, when a NM PDU is received where PNI bit and PNSR bit are 1 and the
corresponding ComMChannel configured via CanNmComMNetworkHandleRef is
actively coordinated (ComMPncGatewayType set to COMM_GATEWAY_TYPE_ACTIVE),
CanNm module shall ignore the received NM-PDU. Additionally, CanNm shall
 report the runtime error CANNM_E_INVALID_PN_SYNC_SHUTDOWN_REQUEST to
DET
 request transmission of a NM PDU (with current PN information) latest in the
the next main function call, if CanNmPnSyncShutdownErrorReactionEnabled is
set to TRUE.
⌋(RS_Nm_02548)
[SWS_CanNm_00504] {DRAFT} ⌈ If CanNmSynchronizedPncShutdownEnabled is
TRUE, the PNI bit in the received NM-PDU is set to 1 and the PNSR bit is set to 1,
CanNm module shall extract the PNC bit vector from the received NM-PDU
according to the partial network configuration (NmPncBitVectorOffset and
NmPncBitVectorLength of the corresponding NM-channel) and forward the PNC bit
vector by calling Nm_ForwardSynchronizedPncShutdown.⌋()

Note: PNSR Bit set to 1 is only possible if a synchronized PNC shutdown is


requested. A synchronized PNC shutdown should be handled across the PN
topology. Therefore, it is assumed that either all coordinators have the synchronized
PNC shutdown enabled or all coordinators have the synchronized PNC shutdown
disabled. A mixture of both would lead to an unsynchronized PNC shutdown, which
has to be avoided.
43 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

7.11.2 Tx Handling of NM PDUs

[SWS_CanNm_00413] ⌈If CanNmPnEnabled is TRUE the CanNm module shall set the
value of the transmitted PNI bit to 1.⌋ (RS_Nm_02517, RS_Nm_02519)

Note: The usage of the CBV is mandatory in case Partial Networking is used.

[SWS_CanNm_00414] ⌈If CanNmPnEnabled is FALSE the CanNm module shall set the
value of the transmitted PNI bit always to 0.⌋ (RS_Nm_02517, RS_Nm_02519)

[SWS_CanNm_00505] {DRAFT} ⌈ If CanNmPnEnabled is TRUE, the NM-PDU is not


configured for triggered transmission in CanIf (CanIfTxPduTriggerTransmit set to
FALSE), no requests for synchronized PNC shutdown are pending and a NM-PDU
has to be transmitted, the CanNm module shall perform the following actions in the
given order:
- Call Nm_PncBitVectorTxIndication(<NM-channel>, <buffer to store the unfiltered
PNC bit vector of aggregated internal PNC requests>) to indicate the
transmission request and to retrieve internal PNC requests.
- Copy the received PNC bit vector for internal PNC requests to the NM-PDU by
considering NmPncBitVectorOffset and NmPncBitVectorLength of the
corresponding NM-channel
- If user data is enabled, fetch the available data (either from Com if
CanNmComUserDataSupport is enabled or from internal storage) and copy the
data in the user data range of the NM-PDU.
- Trigger transmission of the NM-PDU by calling CanIf_Transmit
⌋(RS_Nm_02517, RS_Nm_02519)

[SWS_CanNm_00462] {DRAFT} ⌈If CanNmSynchronizedPncShutdownEnabled is set to


TRUE and the service CanNm_RequestSynchronizedPncShutdown is called the CanNm
module shall store the given PNC (pncId) per given NM-Channel (nmChannelHandle)
as a pending request for a synchronized PNC shutdown.⌋ (RS_Nm_02545)

Note: The aggregation of all PNCs which are requested for a synchronized PNC
shutdown and the transmission as PN shutdown message (set the PNSR bit in the
CBV to 1) is done asynchronously in the context of CanNm_Mainfunction.

[SWS_CanNm_00463] {OBSOLETE, replaced by SWS_CanNm_00506} ⌈If


CanNmSynchronizedPncShutdownEnabled is set to TRUE, requests for synchronized
PNC shutdown are pending and no transmission confirmation (indicated via
CanNm_TxConfirmation) of a previous call is pending, then the CanNm module shall
request in the next main function call a transmission of a NM message by calling
CanIf_Transmit. In case the NM-PDU is not configured for triggered transmission in
CanIf (CanIfTxPduTriggerTransmit set to FALSE), CanNm shall set for this message
additionally the following data beneath the normal data:
 Set the PNSR bit in the CBV to 1
 Overwrite the PN information in the user data (after NM User Data has been
fetched, if CanNmComUserDataSupport is enabled) by setting bits that

44 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

corresponds to PNC IDs stored as pending request for a synchronized PNC


shutdown to 1 and all other bits to 0.
⌋ (RS_Nm_02540, RS_Nm_02542, RS_Nm_02545)

[SWS_CanNm_00506] {DRAFT} ⌈If CanNmSynchronizedPncShutdownEnabled is set to


TRUE, requests for synchronized PNC shutdown are pending and no transmission
confirmation (indicated via CanNm_TxConfirmation) of a previous call is pending, then
the CanNm module shall request in the next main function call a transmission of a
NM-PDU as PN shutdown message by calling CanIf_Transmit. In case the NM-PDU
is not configured for triggered transmission in CanIf (CanIfTxPduTriggerTransmit set to
FALSE), CanNm shall set for this message additionally the following data beneath the
normal data:
 Set the PNSR bit in the CBV to 1
 If user data is enabled, fetch the available data (either from Com if
CanNmComUserDataSupport is enabled or from internal storage) and copy the
data in the user data range of the NM-PDU
 Write the PNC bit vector with respect to NmPncBitVectorOffset and
NmPncBitVectorLength of the corresponding NM-channel by setting bits that
corresponds to PNC IDs stored as pending request for a synchronized PNC
shutdown to 1 and all other bits to 0
⌋(RS_Nm_02540, RS_Nm_02545)

Note: The CanNm modul has to aggregate all PNCs which were indicated for a
synchronized PNC shutdown and transfer the pncId’s to a byte array (PN Info range).
Each bit (PN bit) of the PN Info range represent a particular PNC. The byteIndex and
bitindex within the PN Info range of PN bit can be determined as follows:
 byteIndex = (PncId div 8)
 bitIndex = (PncId mod 8)

[SWS_CanNm_00468] {DRAFT} ⌈ If
CanNmPnShutdownMessageRetransmissionDuration is configured and transmission of a
PN shutdown message is requested (refer to [SWS_CanNm_00506]) for the first
time, then the corresponding retransmission timer for PN shutdown messages shall
be started with CanNmPnShutdownMessageRetransmissionDuration on all affected NM-
channels.⌋(RS_Nm_02545)

[SWS_CanNm_00464] {DRAFT} ⌈If CanNmSynchronizedPncShutdownEnabled is set to


TRUE, the CanNm module has requested a transmission due to synchronized PNC
shutdown (see [SWS_CanNm_00463]) and CanNm_TxConfirmation is called with
result E_OK, the CanNm shall consider those PNC IDs stored as pending request for
a synchronized PNC shutdown of the corresponding NM-channel as completed and
remove them from storage. Additionally, if
CanNmPnShutdownMessageRetransmissionDuration is configured, then CanNm shall
cancel the retransmission timer for PN shutdown messages of the affected NM-
channel.⌋ (RS_Nm_02545)

Note: CanNm has to ensure that new request for a synchronized PNC shutdown
(indicated via CanNm_RequestSynchronizedPncShutdown) are not lost, during an
ongoing transmission of a PN shutdown NM frame.

45 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00465] {DRAFT} ⌈If CanNmSynchronizedPncShutdownEnabled is set to


TRUE, CanNmPnShutdownMessageRetransmissionDuration is configured, the CanNm
module has requested a transmission due to synchronized PNC shutdown (see
[SWS_CanNm_00463]), CanNm_TxConfirmation is called with result E_NOT_OK or the
transmission request for this PN shutdown message was not accepted
(CanIf_Transmit returned E_NOT_OK), then the CanNm shall keep those PNC IDs
stored as pending request for a synchronized PNC shutdown and perform a
retransmission in the next main function.⌋ (RS_Nm_02545)

Note:
- CanNm has to perform a retry transmission handling for PN shutdown
messages in the context of the main function calls, if transmission of the PN
shutdown message was not accepted or not confirmed by the lower layer. The
retry transmission requests should cover error cases, where the lower layer
cannot transmit the Nm messages. In the worst case this collides with a post
poned NM message transmitted with CanNmMsgCycleTime (see
[SWS_CanNm_00460]). But in any case, if the capability to transmitted NM
messages is not re-covered within the PN reset time (EIRA), the PNCs will
shutdown not synchronized, which migth lead to timeout errors on application
level.
- The dependency to a pending transmission confirmation indicated by the lower
layer, should support reliable communication, e.g., ensure PN shutdown
message was transmitted on the bus or avoid transmissions of outdated PN
shutdown messages, if for example queueing in the lower layer is configured.

[SWS_CanNm_00470] {DRAFT} ⌈ If CanNmSynchronizedPncShutdownEnabled is set


to TRUE and the CanNm module has stored PNC IDs as pending request for a
synchronized PNC shutdown, then the CanNm shall remove those PNC IDs from
storage which are either externally or internally requested again:
 CanNm shall check on reception of an NM-message, if externally requested
PNCs are received
 CanNm shall check up front to each transmission of an PN shutdown message
if internal PNC requests are available by deriving the internal PNC requests
from the corresponding ComPdu (see ECUC_CanNm_00046 : )
⌋(RS_Nm_02545)

[SWS_CanNm_00471] {DRAFT} ⌈ If CanNmSynchronizedPncShutdownEnabled is set


to TRUE, CanNmPnShutdownMessageRetransmissionDuration is not configured, the
CanNm module has requested a transmission due to synchronized PNC shutdown
(see [SWS_CanNm_00463]), CanNm_TxConfirmation is called with result E_NOT_OK
or the transmissions request for this PN shutdown message was not accepted
(CanIf_Transmit returned E_NOT_OK), then the CanNm shall remove the PNC IDs
stored as pending request for a synchronized PNC shutdown of the corresponding
NM-channel and report the runtime error
CANNM_E_TRANSMISSION_OF_PN_SHUTDOWN_MESSAGE_FAILED to
DET.⌋(RS_Nm_02545)

[SWS_CanNm_00472] {DRAFT} ⌈ If CanNmSynchronizedPncShutdownEnabled is set


to TRUE and a retransmission timer for a PN shutdown message (see
ECUC_CanNm_00098 : ) expires, then CanNm shall remove the pending request for
46 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

a synchronized PNC shutdown of the corresponding NM-channel from the storage


and report the runtime error
CANNM_E_TRANSMISSION_OF_PN_SHUTDOWN_MESSAGE_FAILED to
DET.⌋(RS_Nm_02545)

7.11.3 Handling of Internal Requested Partial Network Clusters

All internal PNC requests are maintained by ComM. ComM forwards the aggregated
internal PNC requests per channel as PNC bit vector to NmIf. This PNC bit vector
carries the so-called “Internal Request Array”. The CanNm has to retrieve the latest
IRA from NmIf every time an NM PDU is transmitted. NmIf provides the IRA
information to CanNm and updates the PNC reset timer (each time a relevant PNC
is transmitted, the PNC reset timer is re-started).

Note: For all configured NM-channel where CanNmPnEnabled is set TRUE, the CanNm
will call Nm_PncBitVectorTxIndication(<NM-channel>, < buffer to store the unfiltered
PNC bit vector of aggregated internal PNC requests>) (see [SWS_CanNm_00505] and
[SWS_CanNm_00508]) to indicate the transmission and to retrieve the current
internal PNC requests as PNC bit vector with respect to the configured
NmPncBitVectorLength. The CanNm will copy received internal PNC requests to the
PNC bit vector bytes of the NM-PDU.

7.11.4 NM PDU Filter Algorithm (OBSOLETE)

The intention of the NM-PDU filter algorithm is to drop all received NM-PDUs that are
not relevant for the ECU. If there is no NM-PDU on the network, that is relevant for
the receiving ECU, the NM Timeout Timer is no longer restarted and the CanNm
module changes to Prepare Bus Sleep Mode during active bus communication.
In order to distinguish between NM-PDUs that are relevant for the ECU and PDUs
that are not relevant, the CanNm evaluates the NM User Data that contains the PN
requests provided by requesting ECU. Every bit of the PN request information
represents one PN.
It is statically configured if the ECU (CanNm) is part of one specific partial network or
not. The NM-PDUs are ignored if the ECU is not part of the requested partial
networks.

[SWS_CanNm_00403] {OBSOLETE} ⌈During initialization CanNm shall disable the


NM-PDU filter algorithm on all networks where CanNmPnEnabled is TRUE.⌋
(RS_Nm_02517, RS_Nm_02527)

[SWS_CanNm_00404] {OBSOLETE} ⌈If the CanSm calls


CanNm_ConfirmPnAvailability the NM-PDU filter algorithm shall be enabled on the
indicated channel.⌋ (RS_Nm_02517, RS_Nm_02527)

Rationale: This is required to allow a malfunctioning PN transceiver to shut down


synchronously with the remaining network.

Note: If the NM-PDU filter algorithm is not enabled (e.g. due to malfunctioning PN
transceiver) the CanNm restarts the NM-Timeout Timer when receiving a NM-PDU.
Therefore normal shutdown behavior is performed.
47 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00415] {OBSOLETE} ⌈⌈The NM-PDU filter algorithm shall evaluate


the bytes of the received NM-PDU defined by CanNmPnInfoOffset (in bytes) starting
from byte 0 and CanNmPnInfoLength (in bytes). This range is called PN Info Range.⌋
(RS_Nm_02517, RS_Nm_02527)

[SWS_CanNm_00416] {OBSOLETE} ⌈ ⌈Every bit of the PN Info Range represents


one Partial Network. If the bit is set to 1 the Partial Network is requested. If the bit is
set to 0 there is no request for this PN.⌋ (RS_Nm_02517)

[SWS_CanNm_00417] {OBSOLETE} ⌈ ⌈The filter algorithm shall compare (bitwise


AND) the received PN information with the PN filter mask to detect if a relevant PN is
requested or not. Each bit of the PN filter mask shall have the following meaning:
0 The PN request is irrelevant for the ECU. The communication stack of the ECU
is not kept awake if this bit is set in a received NM-PDU.
1 The PN request is relevant for the ECU. The communication stack of the ECU
is kept awake if this bit is set in a received NM-PDU.⌋ (RS_Nm_02517,
RS_Nm_02527)

[SWS_CanNm_00419] {OBSOLETE replaced by SWS_CanNm_00503} ⌈If at least


one relevant PN is requested in the received NM-PDU the PDU shall not be dropped
from further Rx Indication handling.⌋ (RS_Nm_02517, RS_Nm_02527)

[SWS_CanNm_00420] {OBSOLETE replaced by SWS_CanNm_00503} ⌈⌈If no


relevant PN is requested in the received NM-PDU and
CanNmAllNmMessagesKeepAwake is FALSE the PDU shall be dropped from further
processing.⌋ (RS_Nm_02517, RS_Nm_02527)

[SWS_CanNm_00421] {OBSOLETE replaced by SWS_CanNm_00503} ⌈⌈If no


relevant PN is requested in the received NM-PDU and
CanNmAllNmMessagesKeepAwake is TRUE the PDU shall not be dropped from further
Rx Indication handling.⌋ (RS_Nm_02517, RS_Nm_02527)

7.11.5 Aggregation of Internal and External Requested Partial Networks


(OBSOLETE)

Note: This feature is used by every ECU that has to switch I-PDU-Groups because of
the activity of partial networks. (e.g. to prevent false timeouts) I-PDU-Groups shall be
switched on if the corresponding PN is requested internally or externally. I-PDU-
Groups shall be switched off not until all internal and external requests for the
corresponding PN are released.
The logic for switching the IPDU-Groups is implemented by ComM. The CanNm only
provides the information if a PN is requested or not. The COM module is used to
transfer the data to the upper layers.
To switch the I-PDU-Groups synchronously on all direct connected ECUs, CanNm
shall provide the information of a request change to the upper layer at (almost) the
same time on every ECU. This is why the reset timer is restarted on every received
and every sent NM PDU (see below).
The aggregated state of the internal/external requested PNs is called External
48 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Internal Request Array (EIRA).

[SWS_CanNm_00424] {OBSOLETE} ⌈If CanNmPnEiraCalcEnabled is TRUE CanNm


shall provide the possibility to store external and internal requested PNs combined
over all relevant channels (all CanNm channels where CanNmPnEnabled is TRUE). At
initialization the values of all PNs shall be set to 0 (not requested).⌋ (RS_Nm_02517)

[SWS_CanNm_00426] {OBSOLETE} ⌈If


 CanNmPnEiraCalcEnabled is TRUE
 and a NM-PDU is received
 and PNs are requested within this message (bits set to 1)
 and the requested PNs are set to 1 within the configured PN filter mask
 then CanNm shall store the request information (value 1) for these PNs.⌋
(RS_Nm_02517)

[SWS_CanNm_00427] {OBSOLETE} ⌈If


 CanNmPnEiraCalcEnabled is TRUE
 and NM-PDU is beeing requested to send by CanNm
 and PNs are requested within this message (bits set to 1)
 and the requested PNs are set to 1 within the configured PN filter mask
 then CanNm shall store the request information (value 1) for these PNs.⌋
(RS_Nm_02517)

[SWS_CanNm_00428] {OBSOLETE} ⌈If CanNmPnEiraCalcEnabled is TRUE CanNm


shall provide a possibility to monitor for each PN if this PN is still externally or
internally requested on at least one of the relevant channels.⌋ (RS_Nm_02517)

Note: This means, only one timer is required to handle one PN on multiple connected
physical channels. For example: only 8 EIRA reset timers are required to handle the
requests of a Gateway with 6 physical channels and 8 partial networks.
This is possible because the switch of PN PDU-Groups is done global for the ECU
and not dependent of the physical channel.

[SWS_CanNm_00429] {OBSOLETE} ⌈If CanNmPnEiraCalcEnabled is TRUE and a PN


is requested by message reception or sending (see SWS_CanNm_00426 and
SWS_CanNm_00427) the monitoring for this PN shall be restarted with respect to
the CanNmPnResetTime.⌋ (RS_Nm_02517)

Note: CanNmPnResetTime has to be configured to a value greater than


CanNmMsgCycleTime. If CanNmPnResetTime is configured to a value smaller than
CanNmMsgCycleTime and only one ECU requests the PN, the request state toggles in
the EIRA because request state is rested before the requesting ECU is able to send
the next NM PDU.

Note: CanNmPnResetTime has to be configured to a value smaller than


CanNmTimeoutTime to avoid that the timer could elapse after NM already changed to
Prepare Bus Sleep.

49 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00431] {OBSOLETE} ⌈If CanNmPnEiraCalcEnabled is TRUE and a PN


is not requested again within CanNmPnResetTime the corresponding stored value for
this PN shall be set to not requested (value 0).⌋ (RS_Nm_02517)

[SWS_CanNm_00432] {OBSOLETE} ⌈If CanNmPnEiraCalcEnabled is TRUE and the


stored value for a PN is set to requested or back to not requested (see
SWS_CanNm_00426, SWS_CanNm_00427 and SWS_CanNm_00429) CanNm
shall inform the upper layers by calling PduR_CanNmRxIndication() for the
configured EIRA PDU (i.e. changed EIRA information shall be passed to COM).⌋
(RS_Nm_02517)

Note: If a PN shutdown message is received (PNSR is set to 1), no special handling


is needed, because the according PNC state machines need to stay in
COMM_PNC_READY_SLEEP. Only the ERA PDU is handled in a different way (see
[SWS_CanNm_00466])

7.11.6 Aggregation of External Requested Partial Networks (OBSOLETE)

Note: This feature is used by the Gateways to collect only the external PN requests.
The external PN requests are mirrored back to the requesting bus and provided to
other (required) physical channels of a central gateway. In case of a sub gateway the
requests bit must not be mirrored back to the requesting physical channel in order to
avoid static waking between central- and sub gateways. This logic shall be
implemented by the ComM. The CanNm module provides the information if the PN is
externally requested or not. The COM module is used for data transmission to the
upper layer.
The aggregated state of the external requested PNs is called “External Request
Array” (ERA).

[SWS_CanNm_00435] {OBSOLETE} ⌈If CanNmPnEraCalcEnabled is TRUE CanNm


shall provide the possibility to store external requested PNs on each relevant
channel. At initialization the values of all PNs shall be set to 0 (not requested).⌋
(RS_Nm_02517, RS_Nm_02517)

[SWS_CanNm_00437] {OBSOLETE} ⌈If


 CanNmPnEraCalcEnabled is TRUE
 and a NM-PDU is received
 and PNSR bit is 0
 and PNs are requested within this message (bits set to 1)
 and the requested PNs are set to 1 within the configured PN filter mask
 then CanNm shall store the request information (value 1) for these PNs. ⌋
(RS_Nm_02517)

Note: PNSR Bit set to 1 is only possible if a synchronized PNC shutdown is


requested. A synchronized PNC shutdown should be handled across the PN
topology. Therefore, it is assumed that either all coordinators have the synchronized
PNC shutdown enabled or all coordinators have the synchronized PNC shutdown
50 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

disabled. A mixture of both would lead to an unsynchronized PNC shutdown, which


has to be avoided.

[SWS_CanNm_00438] {OBSOLETE} ⌈If CanNmPnEraCalcEnabled is TRUE CanNm


shall provide a possibility to monitor on each relevant channel and for each PN if this
PN is still externally requested.⌋ (RS_Nm_02517)

Note: This means, a separate timer is required to handle one PN on multiple physical
channels.
For example: 48 ERA reset timers are required to handle the requests of a gateway
with 6 physical channels and 8 partial networks. It is not possible to combine the
reset timer like EIRA timers, because the external request mustn’t be mirrored back
to the requesting bus by a sub gateway. Thus it is required to detect the physical
channel that is the source of the request bit.

[SWS_CanNm_00439] {OBSOLETE} ⌈If CanNmPnEraCalcEnabled is TRUE and a PN


is requested by message reception (see SWS_CanNm_00437) the monitoring for this
PN shall be restarted with respect to the CanNmPnResetTime. ⌋ (RS_Nm_02517)

Note: CanNmPnResetTime has to be configured to a value greater than


CanNmMsgCycleTime. If CanNmPnResetTime is configured to a value smaller than
CanNmMsgCycleTime and only one ECU requests the PN, the request state toggles in
the ERA because request state is rested before the requesting ECU is able to send
the next NM-PDU.

Note: CanNmPnResetTime has to be configured to a value smaller than


CanNmTimeoutTime to avoid that the timer could elapse after NM already changed to
Prepare Bus Sleep.

[SWS_CanNm_00442] {OBSOLETE} ⌈If CanNmPnEraCalcEnabled is TRUE and a PN


is not requested again within CanNmPnResetTime the corresponding stored value for
this PN shall be set to not requested (value 0).⌋ (RS_Nm_02517)

[SWS_CanNm_00443] {OBSOLETE} ⌈If CanNmPnEraCalcEnabled is TRUE and the


stored value for a PN changes to requested or back to not requested (see
SWS_CanNm_00437 and SWS_CanNm_00442) CanNm shall inform the upper layers
by calling PduR_CanNmRxIndication() for the configured ERA PDU (i.e. changed ERA
information shall be passed to COM).⌋ (RS_Nm_02517)

[SWS_CanNm_00445] {OBSOLETE} ⌈If CanNmPnEiraCalcEnabled is TRUE and


CanNmPnEraCalcEnabled is TRUE , the PN status information has to be stored
separately for both, the EIRA and ERA information (compare SWS_CanNm_00435
and SWS_CanNm_00424).⌋ (RS_Nm_02517)

[SWS_CanNm_00466] {OBSOLETE, replaced by SWS_CanNm_504} ⌈If


CanNmSynchronizedPncShutdownEnabled is TRUE and the PNSR bit is set to 1 of the
received NM PDU, the CanNm module shall set the bits in the ERA PDU to 0 of the
corresponding bits which are set to 1 in the received PN info range, stop the
51 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

according monitoring for these externally requested PNs (see


[SWS_CanNm_00439]) and inform the upper layers in the given order:
 call PduR_CanNmRxIndication() for the configured ERA PDU
 call Nm_ForwardSynchronizedPncShutdown() with the configured
NetworkHandle (CanNmComMNetworkHandleRef)
⌋ (RS_Nm_02543)

Note: The PN information of a received PN shutdown message shall be used to


release the PNCs for a synchronized shutdown and pass this ERA information to the
ComM module by writing the corresponding ERA PDU. The synchronized PNC
shutdown has to be handled as fast as possible. Therefore, the Nm module is
informed immediately.

7.11.7 Spontaneous Transmission of NM PDUs via CanNm_NetworkRequest

[SWS_CanNm_00444] ⌈If CanNm_NetworkRequest is called,


CanNmPnHandleMultipleNetworkRequests is TRUE and CanNm is inReady Sleep State,
Normal Operation State or Repeat Message State, CanNm shall change to or restart
the Repeat Message State.⌋ (RS_Nm_02517, RS_Nm_02528)

Note: If CanNmPnHandleMultipleNetworkRequests is set to TRUE the CanNm feature


‘Immediate Transmission’ is mandatory.

Note: The PNC Control Module (e.g. ComM) is responsible to call


CanNm_NetworkRequest if the PNC request bits changes.

7.12 Transmission Error Handling

Depending on configuration the CanNm will evaluate the confirmation function that a
Network Management PDU has been successfully transmitted or not. CanNm will
monitor these confirmations and alarm the upper layers if a transmission confirmation
is received with result E_NOT_OK or not received within a specific amount of time.
Timeout Monitoring is required for Partial Networking to ensure that the first message
gets acknowledged when all ECUs on the network use Partial Network transceivers.
Otherwise CanSM is informed and will restart CAN Driver (see also SWS CanSM).

[SWS_CanNm_00073] ⌈If CanNmPassiveModeEnabled is set to TRUE (see


SWS_CanNm_00072) or CanNmImmediateTxConfEnabled is set to TRUE CanNm shall
not perform transmission error handling and omit the requirements
SWS_CanNm_00061, SWS_CanNm_00064, SWS_CanNm_00065,
SWS_CanNm_00066 and SWS_CanNm_00446. ⌋ ()

Rationale: Transmission error handling makes only sense if a node is allowed to


transmit Network Management PDUs and the real confirmation from the CanIf is
evaluated.

[SWS_CanNm_00064] ⌈If CanNmGlobalPnSupport is set to TRUE and


CanNmMsgTimeoutTime is defined and CanNm requests the transmission of a NM PDU
52 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

(call of CanIf_Transmit) then CanNm shall start the NM Message Tx Timeout Timer
with CanNmMsgTimeoutTime.⌋ (RS_Nm_00137)

[SWS_CanNm_00065] ⌈If CanNmGlobalPnSupport is set to TRUE and


CanNmMsgTimeoutTime is defined and CanNm_TxConfirmation is called then CanNm
shall stop the NM Message Tx Timeout Timer.⌋ (RS_Nm_00137)

[SWS_CanNm_00066] ⌈If CanNm_TxConfirmation is called with result E_NOT_OK or if


CanNmGlobalPnSupport is set to TRUE and NM Message Tx Timeout Timer has expired
then CanNm shall call the function Nm_TxTimeoutException.⌋ (RS_Nm_00137)

[SWS_CanNm_00446] ⌈If CanNmGlobalPnSupport is set to TRUE and NM Message Tx


Timeout Timer has expired then CanNm shall call the function
CanSM_TxTimeoutException.⌋(RS_Nm_00137)

7.13 Functional requirements on CanNm API

[SWS_CanNm_00014] {DRAFT} ⌈If CanNmRepeatMsgIndEnabled is set to TRUE and


the Repeat Message Request bit is received CanNm module shall call the callout
function Nm_RepeatMessageIndication only the first time until Repeat Message State
has been left again. In case the Partial Network Learning Bit is also received with
value 1 and CanNmDynamicPncToChannelMappingEnabled is set to TRUE the
parameter pnLearningBitSet shall be set to TRUE in this function call, otherwise to
FALSE.⌋ (RS_Nm_00153)

Note: When Repeat Message Bit is received NM will enter or restart Repeat
Message State, but the bits will still be received as requestor will send until he leaves
Repeat Message State to be fault-tolerant regarding possible loss of messages.
State Change and callout are only needed once the first time the node received it.

[SWS_CanNm_00086] ⌈If CanNmUserDataEnabled is enabled but no user data bytes


are available, the CanNm module shall raise an error during configuration or
compilation time.⌋()

53 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

7.14 Error classification

Section 7.x "Error Handling" of the document "General Specification of Basic


Software Modules" [1] describes the error handling of the Basic Software in detail.
Above all, it constitutes a classification scheme consisting of five error types which
may occur in BSW modules.

Based on this foundation, the following section specifies particular errors arranged in
the respective subsections below.

7.14.1 Development Errors

The following development errors shall be detectable by the CanNm.

[SWS_CanNm_00316]⌈
Error
Type of error Related error code
value

API service used without module initialization CANNM_E_UNINIT 0x01

CANNM_E_INVALID_
API service called with wrong channel handle 0x02
CHANNEL

CANNM_E_INVALID_
API service called with wrong PDU-ID 0x03
PDUID

CanNm initialization has failed, e.g. selected configuration


CANNM_E_INIT_FAILED 0x05
set doesn't exist.

CANNM_E_PARAM_
Null pointer has been passed as an argument 0x12
POINTER

DeInit API service called when not all CAN networks are CANNM_E_NOT_IN_BUS_
0x13
in Bus Sleep mode SLEEP

⌋()

7.14.2 Runtime Errors

[SWS_CanNm_00317]⌈
Error
Type of error Related error code
value

CANNM_E_NET_
Reception of NM PDUs in Bus-Sleep Mode. 0x04
START_IND

NM-Timeout Timer has abnormally expired outside of the


Ready Sleep State; it may happen: (1) because of Bus-Off
state,(2)if some ECU requests bus communication or node CANNM_E_NETWORK_
0x11
detection shortly before the NM-Timeout Timer expires so that TIMEOUT
a Network Management PDU can not be transmitted in time;
this race condition applies to event-triggered systems

A NM message with PN Shutdown Request Bit was received CANNM_E_INVALID_ 0x20

54 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

on a channel that is actively coordinated by the ComM PNC PN_SYNC_


Gateway. SHUTDOWN_REQUEST

CANNM_E_
Retransmission timer for a PN shutdown message has expired,
TRANSMISSION_OF_
because a PN shutdown message could not be Transmitted on 0x21
PN_SHUTDOWN_
the network within the configured duration of re-transmission.
MESSAGE_FAILED

⌋()

7.14.3 Transient Faults

There are no transient faults.

7.14.4 Production Errors

There are no production errors.

7.14.5 Extended Production Errors

There are no extended production errors.

7.15 Scheduling of the main function


For details refer to the chapter 8.5 “Scheduled functions” in SWS_BSWGeneral [10].

7.16 Application notes

7.16.1 Wakeup notification

Wakeup notification is defined in detail in the ECU State Manager specification.

7.16.2 Coordination of coupled networks

[SWS_CanNm_00185] ⌈Support of bus synchronization on demand shall be


statically configurable with use of the CanNmBusSynchronizationEnabled switch
(configuration parameter).⌋()

Note: Since the shutdown of CanNm can be done at any time, the call of the API
Nm_SynchronizationPoint is not supported.

7.17 Summary of CanNm Timing Requirements

This section gives a summary of the CanNm timing requirements. Please note that
this chapter is a summary only and does not replace or act as requirement. Moreover
this section does not require any specific way of implementation
55 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Type of timing Requirements


Nm timeout related SWS_CanNm_00061 SWS_CanNm_00096 SWS_CanNm_00098
SWS_CanNm_00099 SWS_CanNm_00101 SWS_CanNm_00109
SWS_CanNm_00117 SWS_CanNm_00174 SWS_CanNm_00179
SWS_CanNm_00193 SWS_CanNm_00194 SWS_CanNm_00206
Tx confirmation SWS_CanNm_00064 SWS_CanNm_00065 SWS_CanNm_00066
timeout related
NmPdu transmission SWS_CanNm_00005 SWS_CanNm_00032 SWS_CanNm_00040
related SWS_CanNm_00051 SWS_CanNm_00061 SWS_CanNm_00069
SWS_CanNm_00173 SWS_CanNm_00178
Remote sleep SWS_CanNm_00175 SWS_CanNm_00180
indication related

56 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

7.18 UML State chart diagram

The following figure shows an UML state diagram with respect to the API
specification. Mode change related transitions are denoted in green, error handling
related transitions in red and optional node detection / Dynamic PNC-to-channel-
mapping related transitions in blue.
PowerOn CanNm_Init() PowerOff
/Initialization
of CanNm
PowerOff
CanNm_DeInit()

Bus-Sleep Mode Wait Bus-Sleep Timer has Prepare Bus-Sleep Mode


expired
/ Nm_BusSleepMode();

CanNm_RxIndication();
CanNm_PassiveStartup();
CanNm_NetworkRequest();
CanNm_RxIndication(); CanNm_PassiveStartUp();
/Nm_NetworkStartIndication(); Network
Mode

CanNm_NetworkRequest();
/ Start NM-Timeout Timer;
Start Repeat Message Timer;
NM-Timeout Timer has
Nm_NetworkMode();
CanNm_RxIndication(); CanNm_TxConfirmation(Result: E_OK); expired
/ Start NM-Timeout / Start NM-Timeout Timer; / Start NM-Timeout Timer; / Start Wait Bus-Sleep Timer;
Timer; Start Repeat Message Timer; Nm_PrepareBusSleepMode();
Nm_NetworkMode();

Network Mode CanNm_NetworkRequest()


Partial Network Learning + Repeat Message Bit [CanNmPnHandleMultipleNetworkRequests ==
Received || CanNm_PnLearningRequest; TRUE]
/Start Repeat Message Timer; /Start Repeat Message Timer

Repeat Message State


NM-Timeout Timer has expired Tx Timeout Timer has
/ Start NM-Timeout Timer; entry / Stop Bus Load Reduction expired
/Nm_TxTimeoutException();

Repeat Message
Timer has
expired;

Repeat Message Bit Received || Repeat Repeat Message Bit received ||


CanNm_RepeatMessageRequest(); Message CanNm_RepeatMessageRequest();
/Start Repeat Message Timer; /Start Repeat Message Timer;

[Network Requested] [Network Released]

NM-Timeout Timer has Tx Timeout Timer has


expired expired
/ Start NM-Timeout /Nm_TxTimeoutException();
Timer;
CanNm_NetworkRequest();
[CanNmPnHandleMultipleNetworkRequests ==
FALSE]
Normal Operation State Ready Sleep State

entry / Start Bus Load Reduction

CanNm_NetworkRelease();

Figure 7-4 CanNm Algorithm

57 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

8 API specification
[SWS_CanNm_00189] ⌈The CanNm module shall not return development errors by
API functions; in case of a development error, the execution of the respective API
function shall be aborted and E_NOT_OK shall be returned, if applicable.⌋()

[SWS_CanNm_00190] ⌈The CanNm module shall not return production errors by


API functions; in case of a production error, the execution of the respective API
function shall be aborted and E_NOT_OK shall be returned, if applicable.⌋()

[SWS_CanNm_00192] ⌈When a CanNm service with an invalid network handle is


called, the called function shall not be executed and it shall return E_NOT_OK to the
calling function if applicable. If development error detection is enabled
(CanNmDevErrorDetect is set to TRUE) the corresponding error
CANNM_E_INVALID_CHANNEL shall be reported to DET.⌋()

Note: The network handle is invalid if it is different from allowed configured values.

[SWS_CanNm_00507] {DRAFT} ⌈ When a Null pointer has been passed to a


CanNm service, the called function shall not be executed and it shall return
E_NOT_OK to the calling function if applicable. If development error detection is
enabled (CanNmDevErrorDetect is set to TRUE) the corresponding error
CANNM_E_PARAM_POINTER shall be reported to DET.⌋()

[SWS_CanNm_00195] ⌈When a CanNm service with an invalid PDU ID is called, the


called function shall not be executed and it shall return E_NOT_OK to the calling
function if applicable. If development error detection is enabled
(CanNmDevErrorDetect is set to TRUE) the corresponding error
CANNM_E_INVALID_PDUID shall be reported to DET.⌋()

[SWS_CanNm_00244] ⌈The CanNm module shall reject the execution of a service


called with an invalid parameter and shall inform the DET.⌋(SRS_BSW_00323)

AUTOSAR CanNm API consists of services, which are CAN specific and can be
called whenever they are required; each service apart from CanNm_Init refers to one
NM channel only.

8.1 Imported Types

In this chapter all types included from the following modules are listed:

[SWS_CanNm_00245]⌈
Module Header File Imported Type

ComStack_Types.h NetworkHandleType

ComStack_Types ComStack_Types.h PNCHandleType

ComStack_Types.h PduIdType

58 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

ComStack_Types.h PduInfoType

ComStack_Types.h PduLengthType

NmStack_types.h Nm_ModeType
Nm
NmStack_types.h Nm_StateType

Std_Types.h Std_ReturnType
Std
Std_Types.h Std_VersionInfoType

⌋()
For further details of these types refer to the according specifications [5], [7] and [9].

8.2 Type Definitions

8.2.1 CanNm_ConfigType
[SWS_CanNm_00447]⌈
Name CanNm_ConfigType

Kind Structure

implementation specific

Elements Type --

Comment --

This type shall contain at least all parameters that are post-build able according to
Description
chapter 10.

Available
CanNm.h
via

⌋()

59 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

8.3 Function Definitions

8.3.1 CanNm_Init

[SWS_CanNm_00208]⌈
Service Name CanNm_Init

void CanNm_Init (
Syntax const CanNm_ConfigType* cannmConfigPtr
)

Service ID [hex] 0x00

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters (in) cannmConfigPtr Pointer to a selected configuration structure

Parameters (inout) None

Parameters (out) None

Return value None

Description Initialize the CanNm module.

Available via CanNm.h

⌋()

[SWS_CanNm_00253] ⌈Caveats of CanNm_Init: The function CanNm_Init has to be


called after initialization of the CanIf.⌋()

8.3.2 CanNm_DeInit

[SWS_CanNm_91002]⌈
Service Name CanNm_DeInit

void CanNm_DeInit (
Syntax void
)

Service ID [hex] 0x10

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters (in) None

Parameters (inout) None

Parameters (out) None

60 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Return value None

Description De-initializes the CanNm module.

Available via CanNm.h

⌋(SRS_BSW_00336)

Note: General behavior and constraints on de-initialization functions are specified by


[SWS_BSW_00152], [SWS_BSW_00072], [SWS_BSW_00232],
[SWS_BSW_00233].

Caveat: Caller of the CanNm_DeInit function has to ensure all CAN networks are in
the Bus Sleep mode.

[SWS_CanNm_00352] ⌈ If development error detection for the CanNm module is


enabled: The function CanNm_DeInit shall raise the error
CANNM_E_NOT_IN_BUS_SLEEP if not all CAN networks are in Bus Sleep
mode.⌋(SRS_BSW_00369)

8.3.3 CanNm_PassiveStartUp

[SWS_CanNm_00211]⌈
Service Name CanNm_PassiveStartUp

Std_ReturnType CanNm_PassiveStartUp (
Syntax NetworkHandleType nmChannelHandle
)

Service ID
0x01
[hex]

Sync/Async Asynchronous

Reentrancy Reentrant (but not for the same NM-Channel)

Parameters
nmChannelHandle Identification of the NM-channel
(in)

Parameters
None
(inout)

Parameters
None
(out)

E_OK: No error
Return value Std_ReturnType E_NOT_OK: Passive startup of network management has
failed

Passive startup of the AUTOSAR CAN NM. It triggers the transition from Bus-Sleep
Description Mode or Prepare Bus Sleep Mode to the Network Mode in Repeat Message State.
Caveats: CanNm is initialized correctly.

Available via CanNm.h

61 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

⌋()
[SWS_CanNm_00254] ⌈Caveats of CanNm_PassiveStartUp: The CanNm module is
initialized correctly.⌋()

8.3.4 CanNm_NetworkRequest

[SWS_CanNm_00213]⌈
Service Name CanNm_NetworkRequest

Std_ReturnType CanNm_NetworkRequest (
Syntax NetworkHandleType nmChannelHandle
)

Service ID [hex] 0x02

Sync/Async Asynchronous

Reentrancy Reentrant (but not for the same NM-channel)

Parameters (in) nmChannelHandle Identification of the NM-channel

Parameters (inout) None

Parameters (out) None

E_OK: No error
Return value Std_ReturnType
E_NOT_OK: Requesting of network has failed

Description Request the network, since ECU needs to communicate on the bus.

Available via CanNm.h

⌋()⌋()

[SWS_CanNm_00255] ⌈The function CanNm_NetworkRequest shall change the


Network state to ‘requested’.⌋()

[SWS_CanNm_00256] ⌈Caveats of CanNm_NetworkRequest: The CanNm module is


initialized correctly.⌋()

[SWS_CanNm_00257] ⌈Configuration of CanNm_NetworkRequest: Optional (Only


available if CanNmPassiveModeEnabled is not defined).⌋()

8.3.5 CanNm_NetworkRelease

[SWS_CanNm_00214]⌈
Service Name CanNm_NetworkRelease

Std_ReturnType CanNm_NetworkRelease (
Syntax NetworkHandleType nmChannelHandle
)

62 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Service ID [hex] 0x03

Sync/Async Asynchronous

Reentrancy Reentrant (but not for the same NM-Channel)

Parameters (in) nmChannelHandle Identification of the NM-channel

Parameters (inout) None

Parameters (out) None

E_OK: No error
Return value Std_ReturnType
E_NOT_OK: Releasing of network has failed

Description Release the network, since ECU doesn't have to communicate on the bus.

Available via CanNm.h

⌋()
[SWS_CanNm_00259] ⌈Caveats of CanNm_NetworkRelease: The CanNm module is
initialized correctly.⌋()

[SWS_CanNm_00260] ⌈Configuration of CanNm_NetworkRelease: Optional (Only


available if CanNmPassiveModeEnabled is not defined)⌋()

8.3.6 CanNm_DisableCommunication

[SWS_CanNm_00215]⌈
Service Name CanNm_DisableCommunication

Std_ReturnType CanNm_DisableCommunication (
Syntax NetworkHandleType nmChannelHandle
)

Service ID [hex] 0x0c

Sync/Async Asynchronous

Reentrancy Reentrant (but not for the same NM-channel)

Parameters (in) nmChannelHandle Identification of the NM-channel

Parameters
None
(inout)

Parameters (out) None

E_OK: No error
Return value Std_ReturnType E_NOT_OK: Disabling of NM PDU transmission ability has
failed

Disable the NM PDU transmission ability due to a ISO14229 Communication


Description
Control (28hex) service

Available via CanNm.h

63 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

⌋()
[SWS_CanNm_00261] ⌈Caveats of CanNm_DisableCommunication: The CanNm
module is initialized correctly.⌋()

[SWS_CanNm_00262] ⌈Configuration of CanNm_DisableCommunication: Optional


(Only available if CanNmComControlEnabled is set to TRUE)⌋()

[SWS_CanNm_00172] ⌈The service CanNm_DisableCommunication shall return


E_NOT_OK, if the current mode is not Network Mode.⌋()

8.3.7 CanNm_EnableCommunication

[SWS_CanNm_00216]⌈
Service Name CanNm_EnableCommunication

Std_ReturnType CanNm_EnableCommunication (
Syntax NetworkHandleType nmChannelHandle
)

Service ID [hex] 0x0d

Sync/Async Asynchronous

Reentrancy Reentrant (but not for the same NM-channel)

Parameters (in) nmChannelHandle Identification of the NM-channel

Parameters
None
(inout)

Parameters (out) None

E_OK: No error
Return value Std_ReturnType E_NOT_OK: Enabling of NM PDU transmission ability has
failed

Enable the NM PDU transmission ability due to a ISO14229 Communication


Description
Control (28hex) service

Available via CanNm.h

⌋()
[SWS_CanNm_00176] ⌈The service CanNm_EnableCommunication shall enable the
Network Management PDU transmission ability if the Network Management PDU
transmission ability is disabled.⌋ (RS_Nm_02512)

[SWS_CanNm_00177] ⌈The service CanNm_EnableCommunication shall return


E_NOT_OK if the Network Management PDU transmission ability is enabled.⌋()

[SWS_CanNm_00295] ⌈The service CanNm_EnableCommunication shall return


E_NOT_OK, if the current mode is not Network Mode.⌋()

64 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00263] ⌈Caveats of CanNm_EnableCommunication: The CanNm


module is initialized correctly.⌋()

[SWS_CanNm_00264] ⌈Configuration of CanNm_EnableCommunication: Optional


(Only available if CanNmComControlEnabled is set to TRUE).⌋()

8.3.8 CanNm_SetUserData

[SWS_CanNm_00217]⌈
Service Name CanNm_SetUserData

Std_ReturnType CanNm_SetUserData (
NetworkHandleType nmChannelHandle,
Syntax
const uint8* nmUserDataPtr
)

Service ID [hex] 0x04

Sync/Async Synchronous

Reentrancy Reentrant (but not for the same NM-channel)

nmChannel
Identification of the NM-channel
Handle
Parameters (in)
Pointer where the user data for the next transmitted NM PDU
nmUserDataPtr
shall be copied from

Parameters
None
(inout)

Parameters
None
(out)

Std_Return- E_OK: No error


Return value
Type E_NOT_OK: Setting of user data has failed

Description Set user data for NM PDUs transmitted next on the bus.

Available via CanNm.h

⌋()
[SWS_CanNm_00265] ⌈Caveats of CanNm_SetUserData: The CanNm module is
initialized correctly.⌋()

[SWS_CanNm_00266] ⌈Configuration of CanNm_SetUserData: Optional (Only


available if CanNmUserDataEnabled is set to TRUE and CanNmPassiveModeEnabled is
not defined)⌋()

8.3.9 CanNm_GetUserData

[SWS_CanNm_00218]⌈
Service Name CanNm_GetUserData

65 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Std_ReturnType CanNm_GetUserData (
NetworkHandleType nmChannelHandle,
Syntax
uint8* nmUserDataPtr
)

Service ID [hex] 0x05

Sync/Async Synchronous

Reentrancy Reentrant

nmChannel
Parameters (in) Identification of the NM-channel
Handle

Parameters
None
(inout)

Parameters Pointer where user data out of the most recently received NM
nmUserDataPtr
(out) PDU shall be copied to

Std_Return- E_OK: No error


Return value
Type E_NOT_OK: Getting of user data has failed

Description Get user data out of the most recently received NM PDU.

Available via CanNm.h

⌋()
[SWS_CanNm_00267] ⌈Caveats of CanNm_GetUserData: The CanNm module is
initialized correctly.⌋()

[SWS_CanNm_00268] ⌈Configuration of CanNm_GetUserData: Optional (Only


available if CanNmUserDataEnabled is set to TRUE).⌋()

8.3.10 CanNm_Transmit

[SWS_CanNm_00331]⌈
Service Name CanNm_Transmit

Std_ReturnType CanNm_Transmit (
PduIdType TxPduId,
Syntax
const PduInfoType* PduInfoPtr
)

Service ID [hex] 0x49

Sync/Async Synchronous

Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.

TxPduId Identifier of the PDU to be transmitted


Parameters (in)
Length of and pointer to the PDU data and pointer to Meta
PduInfoPtr
Data.

Parameters None

66 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

(inout)

Parameters (out) None

Std_Return- E_OK: Transmit request has been accepted.


Return value
Type E_NOT_OK: Transmit request has not been accepted.

Description Requests transmission of a PDU.

Available via CanNm.h

⌋()
[SWS_CanNm_00330] ⌈If CanNmComUserDataSupport or CanNmGlobalPnSupport is
enabled the CanNm implementation shall provide an API CanNm_Transmit.⌋()

[SWS_CanNm_00333] ⌈ If CanNmComUserDataSupport is enabled and if CanNm is in


RepeatMessage state or NormalOperation state and if CanNm_Transmit() is called
CanNm shall request an additional transmission of the NM PDU with the current user
data.⌋ (RS_Nm_02527)

Note: The call of CanNm_Transmit request to transmit a NM PDU between the


periodic transmissions with the current data (e.g., system bytes, user data and PNC
bit vector)

8.3.11 CanNm_GetNodeIdentifier

[SWS_CanNm_00219]⌈
Service Name CanNm_GetNodeIdentifier

Std_ReturnType CanNm_GetNodeIdentifier (
NetworkHandleType nmChannelHandle,
Syntax
uint8* nmNodeIdPtr
)

Service ID
0x06
[hex]

Sync/Async Synchronous

Reentrancy Reentrant

Parameters nmChannel
Identification of the NM-channel
(in) Handle

Parameters
None
(inout)

Parameters nmNodeId Pointer where node identifier out of the most recently received NM
(out) Ptr PDU shall be copied to

E_OK: No error
Std_Return- E_NOT_OK: Getting of the node identifier out of the most recently
Return value
Type received NM PDU has failed or is not configured for this network
handle.

67 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Description Get node identifier out of the most recently received NM PDU.

Available via CanNm.h

⌋()
[SWS_CanNm_00132] ⌈The service call CanNm_GetNodeIdentifier shall provide the
node identifier out of the most recently received Network Management PDU if
CanNmNodeIdEnabled is set to TRUE.⌋ (RS_Nm_02506)

[SWS_CanNm_00269] ⌈Caveats of CanNm_GetNodeIdentifier: The CanNm module is


initialized correctly.⌋()

8.3.12 CanNm_GetLocalNodeIdentifier

[SWS_CanNm_00220]⌈
Service Name CanNm_GetLocalNodeIdentifier

Std_ReturnType CanNm_GetLocalNodeIdentifier (
NetworkHandleType nmChannelHandle,
Syntax
uint8* nmNodeIdPtr
)

Service ID
0x07
[hex]

Sync/Async Synchronous

Reentrancy Reentrant

nmChannel
Parameters (in) Identification of the NM-channel
Handle

Parameters
None
(inout)

Parameters
nmNodeIdPtr Pointer where node identifier of the local node shall be copied to
(out)

E_OK: No error
Std_Return-
Return value E_NOT_OK: Getting of the node identifier of the local node has
Type
failed or is not configured for this network handle.

Description Get node identifier configured for the local node.

Available via CanNm.h

⌋()
[SWS_CanNm_00133] ⌈The service call CanNm_GetLocalNodeIdentifier shall provide
the node identifier configured for the local host node if CanNmNodeIdEnabled is set to
TRUE.⌋(RS_Nm_02508)

[SWS_CanNm_00271] ⌈Caveats of CanNm_GetLocalNodeIdentifier: The CanNm


module is initialized correctly.⌋()
68 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

8.3.13 CanNm_RepeatMessageRequest

[SWS_CanNm_00221]⌈
Service Name CanNm_RepeatMessageRequest

Std_ReturnType CanNm_RepeatMessageRequest (
Syntax NetworkHandleType nmChannelHandle
)

Service ID
0x08
[hex]

Sync/Async Asynchronous

Reentrancy Reentrant (but not for the same NM-channel)

nmChannel
Parameters (in) Identification of the NM-channel
Handle

Parameters
None
(inout)

Parameters
None
(out)

E_OK: No error
Std_Return-
Return value E_NOT_OK: Setting of Repeat Message Request Bit has failed or
Type
is not configured for this network handle.

Description Set Repeat Message Request Bit for NM PDUs transmitted next on the bus.

Available via CanNm.h

⌋()

[SWS_CanNm_00273] ⌈Caveats of CanNm_RepeatMessageRequest: The CanNm


module is initialized correctly.⌋()

8.3.14 CanNm_GetPduData

[SWS_CanNm_00222]⌈
Service Name CanNm_GetPduData

Std_ReturnType CanNm_GetPduData (
NetworkHandleType nmChannelHandle,
Syntax
uint8* nmPduDataPtr
)

Service ID [hex] 0x0a

Sync/Async Synchronous

Reentrancy Reentrant

Parameters (in) nmChannel Identification of the NM-channel

69 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Handle

Parameters
None
(inout)

Parameters
nmPduDataPtr Pointer where NM PDU shall be copied to
(out)

E_OK: No error
Std_Return-
Return value E_NOT_OK: Getting of NM PDU Data has failed or is not
Type
configured for this network handle.

Description Get the whole PDU data out of the most recently received NM PDU.

Available via CanNm.h

⌋()
[SWS_CanNm_00275] ⌈Caveats of CanNm_GetPduData: The CanNm module is
initialized correctly.⌋()

[SWS_CanNm_00138] ⌈The service call CanNm_GetPduData shall provide whole


PDU data (Node ID, Control Bit Vector and User Data) of the most recently received
Network Management PDU if CanNmNodeDetectionEnabled or
CannNmUserDataEnabled or CanNmNodeIdEnabled is set to TRUE.⌋()

8.3.15 CanNm_GetState

[SWS_CanNm_00223]⌈
Service Name CanNm_GetState

Std_ReturnType CanNm_GetState (
NetworkHandleType nmChannelHandle,
Syntax Nm_StateType* nmStatePtr,
Nm_ModeType* nmModePtr
)

Service ID [hex] 0x0b

Sync/Async Synchronous

Reentrancy Reentrant

nmChannel
Parameters (in) Identification of the NM-channel
Handle

Parameters
None
(inout)

Pointer where state of the network management shall be


nmStatePtr
copied to
Parameters (out)
Pointer where the mode of the network management shall be
nmModePtr
copied to

E_OK: No error
Return value Std_ReturnType
E_NOT_OK: Getting of NM state has failed
70 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Description Returns the state and the mode of the network management.

Available via CanNm.h

⌋()
[SWS_CanNm_00277] ⌈Caveats of CanNm_GetState: The CanNm module is
initialized correctly.⌋()

8.3.16 CanNm_GetVersionInfo

[SWS_CanNm_00224]⌈
Service Name CanNm_GetVersionInfo

void CanNm_GetVersionInfo (
Syntax Std_VersionInfoType* versioninfo
)

Service ID [hex] 0xf1

Sync/Async Synchronous

Reentrancy Reentrant

Parameters (in) None

Parameters (inout) None

Parameters (out) versioninfo Pointer to where to store the version information of this module

Return value None

Description This service returns the version information of this module.

Available via CanNm.h

⌋()

8.3.17 CanNm_RequestBusSynchronization

[SWS_CanNm_00226]⌈
Service Name CanNm_RequestBusSynchronization

Std_ReturnType CanNm_RequestBusSynchronization (
Syntax NetworkHandleType nmChannelHandle
)

Service ID [hex] 0xc0

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters (in) nmChannelHandle Identification of the NM-channel

Parameters (inout) None

71 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Parameters (out) None

E_OK: No error
Return value Std_ReturnType
E_NOT_OK: Requesting of bus synchronization has failed

Description Request bus synchronization.

Available via CanNm.h

⌋(RS_Nm_02516)
[SWS_CanNm_00279] ⌈Caveats of CanNm_RequestBusSynchronization: The CanNm
module is initialized correctly.⌋()

[SWS_CanNm_00280] ⌈Configuration of CanNm_RequestBusSynchronization:


Optional (Only available if CanNmBusSynchronizationEnabled is set to TRUE) and
CanNmPassiveModeEnabled is not defined.⌋(RS_Nm_02516)

[SWS_CanNm_00130] ⌈The service call CanNm_RequestBusSynchronization shall


trigger transmission of a single Network Management PDU if
CanNmPassiveModeEnabled (configuration parameter) is not defined.⌋(RS_Nm_02516)

Rationale: This service is typically used for supporting the NM gateway extensions.

[SWS_CanNm_00187] ⌈If CanNm_RequestBusSynchronization is called in Bus-Sleep


Mode and Prepare Bus-Sleep Mode the CanNm module shall not execute the service
and shall return E_NOT_OK.⌋(RS_Nm_02516)

8.3.18 CanNm_CheckRemoteSleepIndication

[SWS_CanNm_00227]⌈
Service Name CanNm_CheckRemoteSleepIndication

Std_ReturnType CanNm_CheckRemoteSleepIndication (
NetworkHandleType nmChannelHandle,
Syntax
boolean* nmRemoteSleepIndPtr
)

Service ID [hex] 0xd0

Sync/Async Synchronous

Reentrancy Reentrant

Parameters (in) nmChannelHandle Identification of the NM-channel

Parameters
None
(inout)

nmRemoteSleep Pointer where check result of remote sleep indication shall


Parameters (out)
IndPtr be copied to

E_OK: No error
Return value Std_ReturnType
E_NOT_OK: Checking of remote sleep indication bits has

72 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

failed

Description Check if remote sleep indication takes place or not.

Available via CanNm.h

⌋()
[SWS_CanNm_00153] ⌈Service call CanNm_CheckRemoteSleepIndication shall
provide the information about current status of Remote Sleep Indication (i.e. already
detected or not).⌋(RS_Nm_00052, RS_Nm_02509)

[SWS_CanNm_00281] ⌈Caveats of CanNm_CheckRemoteSleepIndication: The


CanNm module is initialized correctly.⌋()

[SWS_CanNm_00282] ⌈Configuration of CanNm_CheckRemoteSleepIndication:


Optional (Only available if CanNmRemoteSleepIndEnabled is set to TRUE).⌋()

8.3.19 CanNm_SetSleepReadyBit

[SWS_CanNm_00338]⌈
Service Name CanNm_SetSleepReadyBit

Std_ReturnType CanNm_SetSleepReadyBit (
NetworkHandleType nmChannelHandle,
Syntax
boolean nmSleepReadyBit
)

Service ID [hex] 0x17

Sync/Async Synchronous

Reentrancy Reentrant (but not for the same NM-channel)

nmChannel
Identification of the NM-channel
Handle
Parameters (in)
nmSleepReadyBit Value written to ReadySleep Bit in CBV

Parameters
None
(inout)

Parameters (out) None

E_OK: No error
Return value Std_ReturnType E_NOT_OK: Writing of remote sleep indication bit has
failed

Description Set the NM Coordinator Sleep Ready bit in the Control Bit Vector

Available via CanNm.h

⌋()

73 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00339] ⌈ Caveats of CanNm_SetSleepReadyBit: The CanNm module


is initialized correctly.⌋ ()

[SWS_CanNm_00340] ⌈ Configuration of CanNm_SetSleepReadyBit: Optional (Only


available if CanNmCoordinatorSyncSupport is set to TRUE).⌋ ()

8.3.20 CanNm_PnLearningRequest

[SWS_CanNm_91004]{DRAFT} ⌈
Service
CanNm_PnLearningRequest (draft)
Name

Std_ReturnType CanNm_PnLearningRequest (
Syntax NetworkHandleType nmChannelHandle
)

Service ID
0xf2
[hex]

Sync/Async Asynchronous

Reentrancy Reentrant (but not for the same NM-channel)

Parameters nmChannel
Identification of the NM-channel
(in) Handle

Parameters
None
(inout)

Parameters
None
(out)

E_OK: No error
Return value Std_ReturnType E_NOT_OK: PN Learning Requesthas failed or is not
configured for this network handle.

Set Repeat Message Request Bit and Partial Network Learning Bit for NM
messages transmitted next on the bus. This will force all nodes to enter the PNC
Description Learning Phase. This is needed for the optional Dynamic PNC-to-channel-mapping
feature.
Tags: atp.Status=draft

Available via CanNm.h

⌋()

[SWS_CanNm_00384] {DRAFT} ⌈If the function CanNm_PnLearningRequest is called


in Prepare Bus-Sleep Mode or Bus Sleep Mode no functionality shall be executed
and E_NOT_OK shall be returned.⌋()

[SWS_CanNm_00385] {DRAFT} ⌈The function CanNm_PnLearningRequest shall only


be available if CanNmDynamicPncToChannelMappingSupport is set to TRUE. ⌋()

74 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

8.3.21 CanNm_RequestSynchronizedPncShutdown

[SWS_CanNm_91003]{DRAFT} ⌈
Service Name CanNm_RequestSynchronizedPncShutdown (draft)

Std_ReturnType CanNm_RequestSynchronizedPncShutdown (
NetworkHandleType nmChannelHandle,
Syntax
PNCHandleType pncId
)

Service ID [hex] 0xf3

Sync/Async Synchronous

Reentrant for different nmChannelHandle. Non reentrant for the same nmChannel
Reentrancy
Handle.

nmChannel Identifier of the NM-Channel where the given PNC (pncId) is


Handle assigned to.
Parameters (in)
Identifier of the PNC which is requested for a synchronized
pncId
shutdown across the PN topology

Parameters
None
(inout)

Parameters
None
(out)

Std_Return- E_OK:Request has been accepted.


Return value
Type E_NOT_OK: Request has not been accepted.

Requests transmission of a NM-PDU with PNSR bit set to 1 (PN shutdown


Description message)
Tags: atp.Status=draft

Available via CanNm.h

⌋(RS_Nm_02545)

[SWS_CanNm_00467] {DRAFT} ⌈If CanNmSynchronizedPncShutdownEnabled


is set to TRUE the CanNm implementation shall provide the API
CanNm_RequestSynchronizedPncShutdown.⌋ (RS_Nm_02543)

8.4 Call-back Notifications

8.4.1 CanNm_TxConfirmation

[SWS_CanNm_00228]⌈
Service Name CanNm_TxConfirmation

void CanNm_TxConfirmation (
PduIdType TxPduId,
Syntax
Std_ReturnType result
)
75 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Service ID [hex] 0x40

Sync/Async Synchronous

Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.

TxPduId ID of the PDU that has been transmitted.


Parameters (in)
E_OK: The PDU was transmitted. E_NOT_OK: Transmission of the
result
PDU failed.

Parameters
None
(inout)

Parameters
None
(out)

Return value None

The lower layer communication interface module confirms the transmission of a


Description
PDU, or the failure to transmit a PDU.

Available via CanNm.h

⌋()
[SWS_CanNm_00283] ⌈Caveats of CanNm_TxConfirmation:
 The call context is either on interrupt level (interrupt mode) or on task level
(polling mode). This callback service is re-entrant for multiple CAN controller
usage.
 The CanNm module is initialized correctly.⌋()

[SWS_CanNm_00284] ⌈Configuration of CanNm_TxConfirmation: Optional (Only


available if CanNmPassiveModeEnabled and CanNmImmediateTxConfEnabled are set to
FALSE).⌋ ()

8.4.2 CanNm_RxIndication

[SWS_CanNm_00231]⌈
Service Name CanNm_RxIndication

void CanNm_RxIndication (
PduIdType RxPduId,
Syntax
const PduInfoType* PduInfoPtr
)

Service ID
0x42
[hex]

Sync/Async Synchronous

Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.

Parameters RxPdu
ID of the received PDU.
(in) Id

76 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Contains the length (SduLength) of the received PDU, a pointer to a


Pdu
buffer (SduDataPtr) containing the PDU, and the MetaData related to this
InfoPtr
PDU.

Parameters
None
(inout)

Parameters
None
(out)

Return value None

Description Indication of a received PDU from a lower layer communication interface module.

Available via CanNm.h

⌋()
Note: The callback function CanNm_RxIndication called by the CAN Interface and
implemented by the CanNm module. It is called in case of a receive indication event
of the CAN Driver.

[SWS_CanNm_00285] ⌈Caveats of CanNm_RxIndication:


 Until this service returns the CAN Interface will not access canSduPtr. The
canSduPtr is only valid and can be used by upper layers until the indication
returns. CAN Interface guarantees that the number of configured bytes for this
canNmRxPduId is valid. The call context is either on interrupt level (interrupt
mode) or on task level (polling mode). This callback service is re-entrant for
multiple CAN controller usage.
 The CanNm module is initialized correctly.⌋()

8.4.3 CanNm_ConfirmPnAvailability

[SWS_CanNm_00344]⌈
Service Name CanNm_ConfirmPnAvailability

void CanNm_ConfirmPnAvailability (
Syntax NetworkHandleType nmChannelHandle
)

Service ID
0x16
[hex]

Sync/Async Synchronous

Reentrancy Reentrant (but not for the same NM-channel)

Parameters
nmChannelHandle Identification of the NM-channel
(in)

Parameters
None
(inout)

Parameters
None
(out)

77 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Return value None

Enables the PN filter functionality on the indicated NM channel. Availability: The


Description
API is only available if CanNmGlobalPnSupport is TRUE.

Available via CanNm.h

⌋()
[SWS_CanNm_00345] ⌈ Caveats of CanNm_ConfirmPnAvailability: The CanNm
module is initialized correctly.⌋ ()

[SWS_CanNm_00346] ⌈ Configuration of CanNm_ConfirmPnAvailability: Optional


(Only available if CanNmGlobalPnSupport is set to TRUE).⌋ ()

8.4.4 CanNm_TriggerTransmit

[SWS_CanNm_91001]⌈
Service
CanNm_TriggerTransmit
Name

Std_ReturnType CanNm_TriggerTransmit (
PduIdType TxPduId,
Syntax
PduInfoType* PduInfoPtr
)

Service ID
0x41
[hex]

Sync/Async Synchronous

Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.

Parameters
TxPduId ID of the SDU that is requested to be transmitted.
(in)

Contains a pointer to a buffer (SduDataPtr) to where the SDU data shall


Parameters
PduInfoPtr be copied, and the available buffer size in SduLengh. On return, the
(inout)
service will indicate the length of the copied SDU data in SduLength.

Parameters
None
(out)

E_OK: SDU has been copied and SduLength indicates the number of
Std_-
copied bytes.
Return value Return-
E_NOT_OK: No SDU data has been copied. PduInfoPtr must not be
Type
used since it may contain a NULL pointer or point to invalid data.

Within this API, the upper layer module (called module) shall check whether the
available data fits into the buffer size reported by PduInfoPtr->SduLength. If it fits, it
Description shall copy its data into the buffer provided by PduInfoPtr->SduDataPtr and update
the length of the actual copied data in PduInfoPtr->SduLength. If not, it returns E_
NOT_OK without changing PduInfoPtr.

Available via CanNm.h

⌋()
78 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00350] {OBSOLETE, replaced by SWS_CanNm_0510} ⌈If


CanNmComUserDataSupport is enabled CanNm shall collect the NM User Data from
the referenced NM I-PDU by calling PduR_CanNmTriggerTransmit and combine the
user data with the further NM bytes within the call of
CanNm_TriggerTransmit.⌋(RS_Nm_02503)

[SWS_CanNm_00508] {DRAFT} ⌈If CanNmPnEnabled is TRUE, and either


CanNmSynchronizedPncShutdownEnabled is set to TRUE and no requests for
synchronized PNC shutdown are pending or CanNmSynchronizedPncShutdownEnabled
is set to FALSE, then the CanNm module shall perform the following actions in the
given order within the call of CanNm_TriggerTransmit:
- Call Nm_PncBitVectorTxIndication(<NM-channel>, <buffer to store the unfiltered
PNC bit vector of aggregated internal PNC requests>) to indicate the
transmission request and to retrieve internal PNC requests
- Copy the received PNC bit vector for internal PNC requests to the NM-PDU by
considering NmPncBitVectorOffset and NmPncBitVectorLength of the
corresponding NM-channel
- If user data is enabled, fetch the available data (either from Com if
CanNmComUserDataSupport is enabled or from internal storage) and copy the
data in the user data range of the NM-PDU
⌋(RS_Nm_02517, RS_Nm_02519)

[SWS_CanNm_00469] {OBSOLETE, replaced by SWS_CanNm_00509} ⌈If


CanNmSynchronizedPncShutdownEnabled is set to TRUE and requests for synchronized
PNC shutdown are pending, then the CanNm module shall set for this message
additionally the following data beneath the normal data within the call of
CanNm_TriggerTransmit:
- Set the PNSR bit in the CBV to 1
- Overwrite the PN information in the user data (after NM User Data has been
fetched, if CanNmComUserDataSupport is enabled) by setting bits that
correspond to PNC IDs stored as pending request for a synchronized PNC
shutdown to 1 and all other bits to 0."
⌋ (RS_Nm_02545)

[SWS_CanNm_00509] {DRAFT} ⌈If CanNmSynchronizedPncShutdownEnabled is set to


TRUE and requests for synchronized PNC shutdown are pending, then the CanNm
module shall set for this message additionally the following data beneath the normal
data within the call of CanNm_TriggerTransmit:
- Set the PNSR bit in the CBV to 1
- If user data is enabled, fetch the available data (either from Com if
CanNmComUserDataSupport is enabled or from internal storage) and copy the
data in the user data range of the NM-PDU
- Write the PNC bit vector with respect to NmPncBitVectorOffset and
NmPncBitVectorLength of the corresponding NM-channel by setting bits that
corresponds to PNC IDs stored as pending request for a synchronized PNC
shutdown to 1 and all other bits to 0
⌋(RS_Nm_02545)

79 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Note: The CanNm modul has to aggregate all PNCs which were indicated for a
synchronized PNC shutdown and transfer the pncId’s to a byte array (PN Info range).
Each bit (PN bit) of the PN Info range represent a particular PNC. The byteIndex and
bitindex within the PN Info range of PN bit shall be determined as follows:
 byteIndex = (PncId div 8)
 bitIndex = (PncId mod 8)

[SWS_CanNm_00510] {DRAFT} ⌈If CanNm_TriggerTransmit is called and


CanNmComUserDataSupport is enabled, CanNm shall collect the NM User Data from
the referenced NM I-PDU by calling PduR_CanNmTriggerTransmit and copy the data to
the user data range of the NM-PDU.⌋(RS_Nm_02503)

[SWS_CanNm_00351] ⌈The function CanNm_TriggerTransmit shall copy the NM


PDU data of the according NM PDU requested by TxPduId⌋(RS_Nm_02503)

Note: The function CanNm_TriggerTransmit might be called by the CanIf in an


interrupt context.

8.5 Scheduled Functions

8.5.1 CanNm_MainFunction

[SWS_CanNm_00234]⌈
Service Name CanNm_MainFunction

void CanNm_MainFunction (
Syntax void
)

Service ID
0x13
[hex]

Main function of the CanNm which processes the algorithm describes in that
Description
document.

Available via SchM_CanNm.h

⌋()

Note that as requirement SWS_BSW_00037 specifies, CanNm_MainFunction will


return without executing any functionality if the module is not initialized.

8.6 Expected Interfaces

In this chapter all interfaces required from other modules are listed.

8.6.1 Mandatory Interfaces

This chapter defines all interfaces which are required to fulfill the core functionality of
the module.
80 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

[SWS_CanNm_00324]⌈
Header
API Function Description
File

Det_Report- Service to report runtime errors. If a callout has been configured then
Det.h
RuntimeError this callout shall be called.

Nm_BusSleep- Notification that the network management has entered Bus-Sleep


Nm.h
Mode Mode.

Nm_Network-
Nm.h Notification that the network management has entered Network Mode.
Mode

Notification that a NM-message has been received in the Bus-Sleep


Nm_Network-
Nm.h Mode, what indicates that some nodes in the network have already
StartIndication
entered the Network Mode.

Nm_Prepare- Notification that the network management has entered Prepare Bus-
Nm.h
BusSleepMode Sleep Mode.

⌋()

8.6.2 Optional Interfaces

This chapter defines all interfaces which are required to fulfill an optional functionality
of the module.

[SWS_CanNm_00325]⌈
Header
API Function Description
File

CanIf_Transmit CanIf.h Requests transmission of a PDU.

This function shall notify the CanSM module, that the CanNm has
CanSM_Tx- CanSM_ detected for the affected partial CAN network a tx timeout exception,
TimeoutException CanIf.h which shall be recovered within the respective network state machine
of the CanSM module.

Det_ReportError Det.h Service to report development errors.

Nm_CarWakeUp- This function is called by a <Bus>Nm to indicate reception of a CWU


Nm.h
Indication request.

Nm_CoordReady-
Cancels an indication, when the NM Coordinator Sleep Ready bit in
ToSleep- Nm.h
the Control Bit Vector is set back to 0.
Cancellation

Nm_CoordReady- Sets an indication, when the NM Coordinator Sleep Ready bit in the
Nm.h
ToSleepIndication Control Bit Vector is set

Nm_Forward- Notification that the network management has received a PN


SynchronizedPnc- Nm.h shutdown message on a particular NM-channel. This is used to grant
Shutdown a nearly synchronized PNC shutdown across the entire PN topology.

Nm_PduRx-
Nm.h Notification that a NM message has been received.
Indication

81 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Indication that a bus specific network management has received a


NM message on a particular NM-channel that contain a PNC bit
vector. This is used to aggregate the external PNC requests. The
function evaluate if a relevant PNC request (PNC bit set to '1') is
available in the given PNC bit vector. If a relevant PNC request is
Nm_PncBit-
available (PNC bit passes the PNC bit vector filter), then the
VectorRx- Nm.h
RelevantPncRequestDetectedPtr refers to a boolean with value set
Indication (draft)
to TRUE. Otherwise refer to booelan with value set to FALSE.
RelevantPncRequestDetectedPtr is evaluated by the callee
<Bus>Nm module to qualify the further processing of the received
NM-PDU.
Tags: atp.Status=draft

Nm_PncBit- Function called by <Bus>Nms to request the aggregated internal


VectorTx- Nm.h PNC requests for transmission within the Nm message.
Indication (draft) Tags: atp.Status=draft

Notification that the network management has detected that not all
Nm_Remote-
Nm.h other nodes on the network are longer ready to enter Bus-Sleep
SleepCancellation
Mode.

Nm_Remote- Notification that the network management has detected that all other
Nm.h
SleepIndication nodes on the network are ready to enter Bus-Sleep Mode.

Nm_Repeat- Service to indicate that an NM message with set Repeat Message


Message- Nm.h Re- quest Bit has been received. This is needed for node detection
Indication and the Dynamic PNC-to-channel-mapping feature.

Nm_State-
Change- Nm.h Notification that the state of the lower layer <BusNm> has changed.
Notification

Nm_TxTimeout-
Nm.h Service to indicate that an attempt to send an NM message failed.
Exception

PduR_
PduR_CanNmRx- Indication of a received PDU from a lower layer communication
Can
Indication interface module.
Nm.h

Within this API, the upper layer module (called module) shall check
whether the available data fits into the buffer size reported by Pdu
PduR_
PduR_CanNm- InfoPtr->SduLength. If it fits, it shall copy its data into the buffer
Can
TriggerTransmit provided by PduInfoPtr->SduDataPtr and update the length of the
Nm.h
actual copied data in PduInfoPtr->SduLength. If not, it returns E_
NOT_OK without changing PduInfoPtr.

PduR_
PduR_CanNmTx- The lower layer communication interface module confirms the
Can
Confirmation transmission of a PDU, or the failure to transmit a PDU.
Nm.h

⌋()
8.6.3 Configurable interfaces

CanNm does not provide any configurable interfaces.

8.6.4 Job End Notification

82 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

CanNm does not provide any job end notifications.

8.7 Service Interfaces

CanNm does not provide any service interfaces.

83 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

9 Sequence diagrams

9.1 CanNm Transmission


«module» Message Cycle Message Timeout «module»
CanNm Timer Timer CanIf

loop Repeated for every Transmission

TimerExpired()

CanIf_Transmit(Std_ReturnType, PduIdType, const PduInfoType*)

CanIf_Transmit()

StartTimer(CANNM_MSG_CYCLE_TIME)

StartTimer(CANNM_MSG_TIMEOUT_TIME)

CanNm_TxConfirmation(PduIdType, E_OK)

CanNm_TxConfirmation()

StopTimer()

Status: Proposed (CanNm 1.8.0), changes due


to CAN NM merge by UH9
Comments:

9.2 CanNm Reception


«module» Message Cycle Message Timeout «module»
CanNm Timer Timer CanIf

loop Repeated for every Reception

CanNm_RxIndication(PduIdType, PduInfoType*)

opt CANNM_BUS_LOAD_REDUCTION_ENABLED = ON

StartTimer(CANNM_MSG_TIMEOUT_TIME)

StartTimer(CANNM_MSG_REDUCED_TIME)

CanNm_RxIndication
()

Status: Proposed (CanNm 1.8.0), changes due


to CAN NM merge by UH9
Comments:

84 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

9.3 Nm Coordination
«module» «module» «module» «module» «module» «module»
ComM Nm FrNm CanNm FrSm CanSM

Network Mode Network Mode


Normal Operation Normal Operation

Nm_NetworkRelease(Std_ReturnType,
NetworkHandleType)

Nm_RemoteSleepIndication(NetworkHandleType)
The NM Coordinator ECU
"ready to sleep" but cluster
Nm_RemoteSleepIndication(NetworkHandleType)
to be coordinated is not.
Thus NM must not "release
bus communication" yet.
Repetition cycle
boundary()
Nm_SynchronizationPoint(NetworkHandleType)

Start shutdown
timers()

par synchronous NM shutdown Shutdown timer expires()


[FlexRay]

FrNm_RequestBusSynchronization(Std_ReturnType,
NetworkHandleType)
FrNm_NetworkRelease(Std_ReturnType,
NetworkHandleType)

Repetition cycle
boundary()

Network Mode
Ready Sleep

Last repetition
Nm_BusSleepMode(NetworkHandleType) cycle finished()

ComM_Nm_BusSleepMode Bus Sleep Mode


(NetworkHandleType) No
Communication
FrSM_RequestComMode(ComM_ModeType,
NetworkHandleType)

[CAN]
Shutdown timer expires()

CanNm_RequestBusSynchronization(Std_ReturnType,
NetworkHandleType)
CanNm_NetworkRelease(Std_ReturnType,
NetworkHandleType)
Network Mode
Ready Sleep

Timer expires
()
Nm_PrepareBusSleepMode(NetworkHandleType)

ComM_Nm_PrepareBusSleepMode Prepare Bus-Sleep Mode


(NetworkHandleType)
Silent Communication
CanSM_RequestComMode(Std_ReturnType, NetworkHandleType,
ComM_ModeType)
Timer expires
()

Nm_BusSleepMode(NetworkHandleType)
ComM_Nm_BusSleepMode
(NetworkHandleType) Bus-Sleep Mode
No Communication
CanSM_RequestComMode(Std_ReturnType, NetworkHandleType,
ComM_ModeType)

85 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

10 Configuration specification
In general, this chapter defines configuration parameters and their clustering into
containers. In order to support the specification chapter 10.1 describes fundamentals.
It also specifies a template (table) you shall use for the parameter specification. We
intend to leave chapter 10.1 in the specification to guarantee comprehension.

Chapter 10.2 specifies the structure (containers) and the parameters of the module
CanNm.

Chapter 10.3 specifies published information of the module CanNm.

10.1 How to read this chapter

For details refer to the chapter 10.1 “Introduction to configuration specification” in


SWS_BSWGeneral [10].
Additionally it is highly recommended to read the document Specification of ECU
Configuration [6]. This document describes the AUTOSAR configuration
methodology and the AUTOSAR configuration meta model in detail.

10.2 Containers and configuration parameters

The following chapters summarize all configuration parameters. The detailed


meanings of the parameters are described in the chapters 7 and 7.17.

The configuration parameters as defined in this chapter are used to create a data
model for an AUTOSAR tool chain. The realization in the code is implementation
specific.

The configuration parameters as defined in this chapter are used to create a data
model for an AUTOSAR tool chain. The realization in the code is implementation
specific.

The configuration parameters are divided in parameters which are used to enable
features, parameters which affect all channels of the CanNm and parameters which
affect the respective channels of the CanNm.

10.2.1 CanNm Global Configuration Overview

CanNm: EcucModuleDef CanNmGlobalConfig: CanNmChannelConfig:


+container EcucParamConfContainerDef +subContainer EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 1 upperMultiplicity = *
lowerMultiplicity = 1

Figure 10-1 CanNm top level configuration overview

86 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

CanNmDevErrorDetect: EcucBooleanParamDef
+parameter
CanNmGlobalConfig:
EcucParamConfContainerDef defaultValue = false

+parameter CanNmVersionInfoApi: EcucBooleanParamDef

defaultValue = false

+parameter CanNmUserDataEnabled:
EcucBooleanParamDef

+parameter CanNmRemoteSleepIndEnabled:
EcucBooleanParamDef

+parameter CanNmBusSynchronizationEnabled:
EcucBooleanParamDef

CanNmGlobalPnSupport:
+parameter
EcucBooleanParamDef

defaultValue = false

+parameter CanNmBusLoadReductionEnabled:
EcucBooleanParamDef

+parameter CanNmImmediateRestartEnabled:
EcucBooleanParamDef

+parameter CanNmPassiveModeEnabled:
EcucBooleanParamDef

+parameter CanNmPduRxIndicationEnabled:
EcucBooleanParamDef

+parameter CanNmStateChangeIndEnabled:
EcucBooleanParamDef

+parameter CanNmComControlEnabled:
EcucBooleanParamDef
CanNmMainFunctionPeriod:
+parameter EcucFloatParamDef

+parameter CanNmImmediateTxconfEnabled: max = INF


min = 0
EcucBooleanParamDef

+parameter CanNmComUserDataSupport:
EcucBooleanParamDef

+parameter CanNmCoordinatorSyncSupport:
EcucBooleanParamDef
CanNmChannelConfig:
+subContainer EcucParamConfContainerDef

upperMultiplicity = *
lowerMultiplicity = 1

+parameter CanNmPnSyncShutdownErrorReactionEnabled:
EcucBooleanParamDef

+parameter CanNmDynamicPncToChannelMappingSupport:
EcucBooleanParamDef

CanNmPnShutdownMessageRetransmissionDuration:
+parameter EcucFloatParamDef

min = 0.001
max = 65.535
lowerMultiplicity = 0
upperMultiplicity = 1

Figure 10-2 Parameters of CanNm global configuration

87 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

10.2.2 CanNm
SWS Item ECUC_CanNm_00087 :
Module Name CanNm
Module Description Configuration Parameters for the Can Nm module.
Post-Build Variant Support true
Supported Config Variants VARIANT-LINK-TIME, VARIANT-POST-BUILD, VARIANT-PRE-COMPILE

Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the global configuration parameter of
the CanNm. The parameters and the parameters of the sub
CanNmGlobalConfig 1 containers shall be mapped to the C data type
CanNm_ConfigType (for parameters where it is possible)
which is passed to the CanNm_Init function.

10.2.3 CanNmGlobalConfig
SWS Item ECUC_CanNm_00001 :
Container Name CanNmGlobalConfig
Parent Container CanNm
This container contains the global configuration parameter of the CanNm.
The parameters and the parameters of the sub containers shall be mapped
Description
to the C data type CanNm_ConfigType (for parameters where it is
possible) which is passed to the CanNm_Init function.
Configuration Parameters

SWS Item ECUC_CanNm_00040 :


Name CanNmBusLoadReductionEnabled
Parent Container CanNmGlobalConfig
Description Pre-processor switch for enabling busload reduction support.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
dependency: CanNmBusLoadReductionEnabled = false if
CanNmPassiveModeEnabled == true or CanNmGlobalPnSupport == true

SWS Item ECUC_CanNm_00006 :


Name CanNmBusSynchronizationEnabled
Parent Container CanNmGlobalConfig
Description Pre-processor switch for enabling bus synchronization support. This
feature is required for gateway nodes only.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU
dependency: calculationFormula = If (CanNmPassiveModeEnabled ==
88 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

False) then Equal(NmBusSynchronizationEnabled) else Equal(False)

SWS Item ECUC_CanNm_00013 :


Name CanNmComControlEnabled
Parent Container CanNmGlobalConfig
Description Pre-processor switch for enabling the Communication Control support.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU
dependency: If (CanNmPassiveModeEnabled == False) then
Equal(NmComControlEnabled) else Equal(False)

SWS Item ECUC_CanNm_00044 :


Name CanNmComUserDataSupport
Parent Container CanNmGlobalConfig
Description Preprocessor switch for enabling the Tx path of Com User Data.
Use case: Setting of NMUserData via SWC.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU
dependency: If CanNmPassiveModeEnabled == True OR
if all bytes of the NM PDU are used for NM System Bytes and for the PNC
bit vector and no space is left for user data, then
CanNmComUserDataSupport shall be set to False.

SWS Item ECUC_CanNm_00080 :


Name CanNmCoordinatorSyncSupport
Parent Container CanNmGlobalConfig
Description Enables/disables the coordinator synchronization support.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU
dependency: CanNmCoordinatorSyncSupport has to be set to FALSE if
CanNmPassiveModeEnabled is set to TRUE.

SWS Item ECUC_CanNm_00002 :


Name CanNmDevErrorDetect
Parent Container CanNmGlobalConfig
Description Switches the development error detection and notification on or off.

 true: detection and notification is enabled.


89 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

 false: detection and notification is disabled.

Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_CanNm_00094 :


Name CanNmDynamicPncToChannelMappingSupport
Parent Container CanNmGlobalConfig
Description Precompile time switch to enable the dynamic PNC-to-channel-mapping
handling.
False: Dynamic PNC-to-channel-mapping is disabled
True: Dynamic PNC-to-channel-mapping is enabled
Tags:
atp.Status=draft
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU
dependency: CanNmDynamicPncToChannelMappingSupport == TRUE
only allowed if CanNmGlobalPnSupport == TRUE and
CanNmPassiveModeEnabled == FALSE

SWS Item ECUC_CanNm_00086 :


Name CanNmGlobalPnSupport
Parent Container CanNmGlobalConfig
Description Pre-processor switch for enabling partial networking support globally.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_CanNm_00009 :


Name CanNmImmediateRestartEnabled
Parent Container CanNmGlobalConfig
Description Pre-processor switch for enabling the immediate transmission of a NM
PDU upon bus-communication request in Prepare-Bus-Sleep mode.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
90 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Post-build time --
Scope / Dependency scope: local
dependency: Must not be defined if CanNmPassiveModeEnabled==true

SWS Item ECUC_CanNm_00041 :


Name CanNmImmediateTxconfEnabled
Parent Container CanNmGlobalConfig
Description Enable/disable the immediate tx confirmation.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU
dependency: CanNmImmediateTxconfEnabled shall not be enabled if
CanNmPasiveModeEnabled is enabled.

SWS Item ECUC_CanNm_00032 :


Name CanNmMainFunctionPeriod
Parent Container CanNmGlobalConfig
Description Call cycle in seconds of CanNm_MainFunction.
Multiplicity 1
Type EcucFloatParamDef
Range ]0 .. INF[
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_CanNm_00010 :


Name CanNmPassiveModeEnabled
Parent Container CanNmGlobalConfig
Description Pre-processor switch for enabling support of the Passive Mode.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU

SWS Item ECUC_CanNm_00011 :


Name CanNmPduRxIndicationEnabled
Parent Container CanNmGlobalConfig
Description Pre-processor switch for enabling the PDU Rx Indication.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
91 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Link time --
Post-build time --
Scope / Dependency scope: ECU
dependency: calculationFormula = Equal(NmPduRxIndicationEnabled)

SWS Item ECUC_CanNm_00070 : (Obsolete)


Name CanNmPnEiraCalcEnabled
Parent Container CanNmGlobalConfig
Description Specifies if CanNm calculates the PN request information for internal an
external requests. (EIRA)
true: PN request are calculated
false: PN request are not calculated
Tags:
atp.Status=obsolete
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity ConfigurationPre-compile time X All Variants
Class Link time --
Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
dependency: only valid if CanNmGlobalPnSupport == true

SWS Item ECUC_CanNm_00059 : (Obsolete)


Name CanNmPnResetTime
Parent Container CanNmGlobalConfig
Description Specifies the runtime of the reset timer in seconds. This reset time is valid
for the reset of PN requests in the EIRA and in the ERA. The value shall
be the same for every channel. Thus it is a global config parameter.
Tags:
atp.Status=obsolete
Multiplicity 0..1
Type EcucFloatParamDef
Range [0.001 .. 65.535]
Default value --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: only valid if CanNmGlobalPnSupport == true.
CanNmPnResetTime > CanNmMsgCycleTime
CanNmPnResetTime < CanNmTimeoutTime

92 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

SWS Item ECUC_CanNm_00098 :


Name CanNmPnShutdownMessageRetransmissionDuration
Parent Container CanNmGlobalConfig
Description Specifies the duration in seconds of the retransmission phase of a PN
shutdown message. A retransmission shall be performed per affected NM
channel, as long as the PN shutdown message could not be successfully
sent and the retransmission timer is running. The value shall be a multiple
integral of CanNmMainFunctionPeriod.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0.001 .. 65.535]
Default value --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: * Only valid if CanNmSynchronizedPncShutdownEnabled ==
TRUE
* CanNmPnShutdownMessageRetransmissionDuration ≤
CanNmPnResetTime

SWS Item ECUC_CanNm_00096 :


Name CanNmPnSyncShutdownErrorReactionEnabled
Parent Container CanNmGlobalConfig
Description Pre-processor switch for enabling reaction, if a top-level PNC coordinator
received a PN shutdown message on a NM-channel which refer to a
ComM channel that is actively coordinated by a PNC gateway.
Tags:
atp.Status=draft
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
dependency: This parameter shall only be set to TRUE if
CanNmSynchronizedPncShutdownEnabled is set to TRUE on at least one
channel.

SWS Item ECUC_CanNm_00055 :


Name CanNmRemoteSleepIndEnabled
Parent Container CanNmGlobalConfig
Description Pre-processor switch for enabling remote sleep indication support. This
feature is required for gateway nodes only.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
93 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Post-Build Variant Value false


Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
dependency: calculationFormula = If (CanNmPassiveModeEnabled ==
False) then Equal(NmRemoteSleepIndEnabled) else Equal(False)

SWS Item ECUC_CanNm_00012 :


Name CanNmStateChangeIndEnabled
Parent Container CanNmGlobalConfig
Description Pre-processor switch for enabling the CAN NM state change notification.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU
dependency: calculationFormula = Equal(NmStateChangeIdEnabled)

SWS Item ECUC_CanNm_00004 :


Name CanNmUserDataEnabled
Parent Container CanNmGlobalConfig
Description Pre-processor switch for enabling user data support.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU
dependency: CanNmUserDataEnabled shall be set to FALSE, if all bytes
of the NM PDU are used for NM System Bytes and for the PNC bit vector
and no space is left for user data. Otherwise the parameter shall be set
according the following formular: calculationFormula
=Equal(NmUserDataEnabled).

SWS Item ECUC_CanNm_00003 :


Name CanNmVersionInfoApi
Parent Container CanNmGlobalConfig
Description Pre-processor switch for enabling version info API support.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU

SWS Item ECUC_CanNm_00072 : (Obsolete)


Name CanNmPnEiraRxNSduRef
Parent Container CanNmGlobalConfig
94 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Description Reference to a Pdu in the COM-Stack.


Only one SduRef is required for CanNm because the EIRA is the
aggregation over all Can Channels.
Tags:
atp.Status=obsolete
Multiplicity 0..1
Type Reference to [ Pdu ]
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: only valid if CanNmPnEiraCalcEnabled == true

Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the channel specific configuration
CanNmChannelConfig 1..*
parameter of the CanNm.
PN information configuration
CanNmPnInfo 0..1 Tags:
atp.Status=obsolete

10.2.4 CanNm Channel Configuration Overview

[SWS_CanNm_00202] ⌈The container CanNmChannelConfig specifies configuration


parameter that shall be located in a data structure of type CanNm_ConfigType.⌋()

[SWS_CanNm_00203] ⌈Runtime configurable parameters listed below shall be


configurable for each network management cluster separately.⌋()

95 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

CanNmBusLoadReductionActive:
CanNmChannelConfig: +parameter EcucBooleanParamDef
EcucParamConfContainerDef
CanNmCarWakeUpRxEnabled:
upperMultiplicity = * EcucBooleanParamDef
lowerMultiplicity = 1 +parameter
defaultValue = false

CanNmTimeoutTime:
+parameter EcucFloatParamDef
CanNmCarWakeUpBitPosition:
max = 65.535 EcucIntegerParamDef
min = 0.002
+parameter
max = 7
min = 0
CanNmWaitBusSleepTime: lowerMultiplicity = 0
EcucFloatParamDef upperMultiplicity = 1
+parameter
min = 0.001
max = 65.535
lowerMultiplicity = 0
upperMultiplicity = 1 CanNmCarWakeUpBytePosition:
+parameter
EcucIntegerParamDef

CanNmRepeatMessageTime: min = 0
+parameter EcucFloatParamDef max = 7
lowerMultiplicity = 0
max = 65.535 upperMultiplicity = 1
min = 0
+parameter
CanNmCarWakeUpFilterEnabled:
CanNmRemoteSleepIndTime: EcucBooleanParamDef
EcucFloatParamDef
+parameter defaultValue = false
min = 0.001 lowerMultiplicity = 0
max = 65.535 upperMultiplicity = 1
lowerMultiplicity = 0
upperMultiplicity = 1

CanNmCarWakeUpFilterNodeId:
CanNmMsgCycleTime:
EcucIntegerParamDef
+parameter EcucFloatParamDef
max = 255
max = 65.535
min = 0.001 min = 0
lowerMultiplicity = 0
+parameter upperMultiplicity = 1

+literal CANNM_PDU_BYTE_1:
EcucEnumerationLiteralDef
CanNmPduNidPosition:
+parameter +literal
EcucEnumerationParamDef
CANNM_PDU_OFF:
EcucEnumerationLiteralDef
+literal

CANNM_PDU_BYTE_0:
CanNmPduCbvPosition: EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef +literal

CANNM_PDU_BYTE_1:
EcucEnumerationLiteralDef
+literal

CanNmMsgCycleOffset: CANNM_PDU_BYTE_0:
+parameter EcucFloatParamDef EcucEnumerationLiteralDef
+literal
max = 65.535
CANNM_PDU_OFF:
min = 0
EcucEnumerationLiteralDef

CanNmMsgReducedTime:
+parameter EcucFloatParamDef
CanNmActiveWakeupBitEnabled:
max = 65.535
EcucBooleanParamDef
min = 0.001
+parameter
defaultValue = false
lowerMultiplicity = 0
CanNmMsgTimeoutTime: upperMultiplicity = 1
EcucFloatParamDef
+parameter
min = 0.001
max = 65.535
lowerMultiplicity = 0
upperMultiplicity = 1
CanNmNodeId: EcucIntegerParamDef
+parameter
max = 255
min = 0
CanNmImmediateNmTransmissions:
+parameter EcucIntegerParamDef

min = 0
max = 255 CanNmImmediateNmCycleTime:
EcucFloatParamDef
+parameter
min = 0.0010
max = 65.535
lowerMultiplicity = 0
upperMultiplicity = 1

CanNmTxPdu:
+subContainer EcucParamConfContainerDef CanNmTxPduRef: EcucReferenceDef
+reference
lowerMultiplicity = 0 lowerMultiplicity = 1
upperMultiplicity = 1 upperMultiplicity = 1

CanNmRxPdu:
+subContainer EcucParamConfContainerDef CanNmRxPduRef: EcucReferenceDef
+reference
lowerMultiplicity = 1 lowerMultiplicity = 1
upperMultiplicity = * upperMultiplicity = 1

+parameter CanNmNodeDetectionEnabled:
EcucBooleanParamDef
+parameter CanNmStayInPbsEnabled:
EcucBooleanParamDef

+parameter CanNmRepeatMsgIndEnabled: defaultValue = false


EcucBooleanParamDef lowerMultiplicity = 1
upperMultiplicity = 1

+parameter CanNmNodeIdEnabled:
EcucBooleanParamDef

ComMChannel:
CanNmComMNetworkHandleRef:
+reference
EcucReferenceDef +destination EcucParamConfContainerDef
lowerMultiplicity = 1
requiresSymbolicNameValue = true upperMultiplicity = 256

+parameter
CanNmSynchronizedPncShutdownEnabled:
EcucBooleanParamDef

defaultValue = false
+parameter CanNmDynamicPncToChannelMappingEnabled: lowerMultiplicity = 0
EcucBooleanParamDef
upperMultiplicity = 1
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1

96 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Figure 10-3 CanNm Channel Configuration Overview

10.2.5 CanNmChannelConfig
SWS Item ECUC_CanNm_00017 :
Container Name CanNmChannelConfig
Parent Container CanNmGlobalConfig
This container contains the channel specific configuration parameter of the
Description
CanNm.
Post-Build Variant
true
Multiplicity
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE, VARIANT-
Class LINK-TIME, VARIANT-POST-BUILD
Link time --
Post-build time --
Configuration Parameters

SWS Item ECUC_CanNm_00084 :


Name CanNmActiveWakeupBitEnabled
Parent Container CanNmChannelConfig
Description Enables/Disables the handling of the Active Wakeup Bit in the CanNm
module.
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: This parameter is only valid if CanNmPassiveModeEnabled
is False.

SWS Item ECUC_CanNm_00068 :


Name CanNmAllNmMessagesKeepAwake
Parent Container CanNmChannelConfig
Description Specifies if CanNm drops irrelevant NM PDUs.
false: Only NM PDUs with a PNI bit = true and containing a PN request for
this ECU triggers the standard RX indication handling
true: Every NM PDU triggers the standard RX indication handling
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
97 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE


Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: (DRAFT) only valid if NmPnEiraCalcEnabled == true or
NmPnEraCalcEnabled == true

(OBSOLETE) only valid if CanNmPnEiraCalcEnabled == true or


CanNmPnEraCalcEnabled == true.

SWS Item ECUC_CanNm_00042 :


Name CanNmBusLoadReductionActive
Parent Container CanNmChannelConfig
Description This parameter defines if bus load reduction for the respective NM channel
is active or not.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: CanNmBusLoadReductionActive = false if
CanNmBusLoadReductionEnabled == false

SWS Item ECUC_CanNm_00075 :


Name CanNmCarWakeUpBitPosition
Parent Container CanNmChannelConfig
Description Specifies the Bit position of the CWU within the NM PDU.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 7
Default value --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: only available if CanNmCarWakeUpRxEnabled == TRUE

SWS Item ECUC_CanNm_00076 :


Name CanNmCarWakeUpBytePosition
Parent Container CanNmChannelConfig
Description Specifies the Byte position of the CWU within the NM PDU.
Multiplicity 0..1
Type EcucIntegerParamDef

98 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Range 0 .. 7
Default value --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: only available if CanNmCarWakeUpRxEnabled == TRUE
CanNmCarWakeupBytePosition ≥ number of enabled system bytes (CBV,
NID)

SWS Item ECUC_CanNm_00077 :


Name CanNmCarWakeUpFilterEnabled
Parent Container CanNmChannelConfig
Description If CWU filtering is supported, only the CWU bit within the NM PDU with
source node identifier CanNmCarWakeUpFilterNodeId is considered as
CWU request.
FALSE - CWU filtering is not supported
TRUE - CWU filtering is supported
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: only available if CanNmCarWakeUpRxEnabled == TRUE

SWS Item ECUC_CanNm_00078 :


Name CanNmCarWakeUpFilterNodeId
Parent Container CanNmChannelConfig
Description Source node identifier for CWU filtering. If CWU filtering is supported, only
the CWU bit within the NM PDU with source node identifier
CanNmCarWakeUpFilterNodeId is considered as CWU request.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 255
Default value --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
99 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Class Link time X VARIANT-LINK-TIME, VARIANT-POST-


BUILD
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: only available if CanNmCarWakeUpFilterEnabled == TRUE

SWS Item ECUC_CanNm_00074 :


Name CanNmCarWakeUpRxEnabled
Parent Container CanNmChannelConfig
Description Enables or disables support of CarWakeUp bit evaluation in received NM
PDUs.
FALSE - CarWakeUp not supported
TRUE - CarWakeUp supported
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: ECU

SWS Item ECUC_CanNm_00093 :


Name CanNmDynamicPncToChannelMappingEnabled
Parent Container CanNmChannelConfig
Description Channel-specific parameter to enable the dynamic PNC-to-channel-
mapping feature.
False: Dynamic PNC-to-channel-mapping is disabled
True: Dynamic PNC-to-channel-mapping is enabled
Tags:
atp.Status=draft
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: ECU
dependency: Shall only be TRUE if
CanNmDynamicPncToChannelMappingSupport is TRUE

SWS Item ECUC_CanNm_00057 :


Name CanNmImmediateNmCycleTime
Parent Container CanNmChannelConfig
Description Defines the immediate NM PDU cycle time in seconds which is used for
CanNmImmediateNmTransmissions NM PDU transmissions.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0.001 .. 65.535]
Default value --
100 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: This parameter is only valid if
CanNmImmediateNmTransmissions is greater one.

SWS Item ECUC_CanNm_00056 :


Name CanNmImmediateNmTransmissions
Parent Container CanNmChannelConfig
Description Defines the number of immediate NM PDUs which shall be transmitted. If
the value is zero no immediate NM PDUs are transmitted. The cycle time
of immeditate NM PDUs is defined by CanNmImmediateNmCycleTime.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 255
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: If CanNmImmediateRestartEnabled = true then
CanNmImmediateNmTransmissions = 0
If CanNmPnHandleMultipleNetworkRequests == True" then
"CanNmImmediateNmTransmissions > 0

SWS Item ECUC_CanNm_00029 :


Name CanNmMsgCycleOffset
Parent Container CanNmChannelConfig
Description Time offset in the periodic transmission node. It determines the start delay
of the transmission. Specified in seconds.
Multiplicity 1
Type EcucFloatParamDef
Range [0 .. 65.535]
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: Parameter value < CanNmMsgCycleTime
This parameter is only valid if CanNmPassiveModeEnabled is False.

SWS Item ECUC_CanNm_00028 :


Name CanNmMsgCycleTime
Parent Container CanNmChannelConfig
101 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Description Period of a NM PDU in seconds. It determines the periodic rate in the


"periodic transmission mode with bus load reduction" and is the basis for
transmit scheduling in the "periodic transmission mode without bus load
reduction".
Multiplicity 1
Type EcucFloatParamDef
Range [0.001 .. 65.535]
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: ECU
dependency: This parameter is only valid if CanNmPassiveModeEnabled
is False.

SWS Item ECUC_CanNm_00043 :


Name CanNmMsgReducedTime
Parent Container CanNmChannelConfig
Description Node specific bus cycle time in the periodic transmission mode with bus
load reduction. Specified in seconds.
Multiplicity 1
Type EcucFloatParamDef
Range [0.001 .. 65.535]
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: 0,5 * CanNmMsgCycleTime ≤ CanNmMsgReducedTime <
CanNmMsgCycleTime

This parameter is only valid if


CanNmBusLoadReductionEnabled == True and
CanNmBusLoadReductionActive == True and
CanNmPassiveModeEnabled == False

Otherwise this parameter is notused.

SWS Item ECUC_CanNm_00030 :


Name CanNmMsgTimeoutTime
Parent Container CanNmChannelConfig
Description When using Partial Network and this timeout is defined then CanNm
monitors that a NM-PDU is transmitted successfully within this
Transmission Timeout Time and provides an error notification otherwise.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0.001 .. 65.535]
Default value --
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME, VARIANT-POST-
102 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

BUILD
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: CanNmMsgTimeoutTime < CanNmMsgCycleTime

This parameter is only valid if CanNmPassiveModeEnabled and


CanNmImmediateTxConfEnabled are set to FALSE and
CanNmPnEnabled is set to TRUE.

SWS Item ECUC_CanNm_00088 :


Name CanNmNodeDetectionEnabled
Parent Container CanNmChannelConfig
Description Precompile time switch to enable the node detection feature.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: ECU
dependency: Only valid if CanNmNodeIdEnabled is set to TRUE
If CanNmPassiveModeEnabled == True then CanNmNodeDetection =
False

SWS Item ECUC_CanNm_00031 :


Name CanNmNodeId
Parent Container CanNmChannelConfig
Description Node identifier of local node.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 255
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
dependency: This parameter is only valid if CanNmNodeIdEnabled ==
True

SWS Item ECUC_CanNm_00090 :


Name CanNmNodeIdEnabled
Parent Container CanNmChannelConfig
Description Pre-processor switch for enabling the source node identifier.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-

103 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

BUILD
Post-build time --
Scope / Dependency scope: ECU
dependency: calculationFormula = Equal(NmNodeIdEnabled)

SWS Item ECUC_CanNm_00026 :


Name CanNmPduCbvPosition
Parent Container CanNmChannelConfig
Description Defines the position of the control bit vector within the NM PDU.
The value of the parameter represents the location of the Control Bit Vector in the
NM PDU (CanNmPduByte0 means byte 0, CanNmPduByte1 means byte 1,
CanNmPduOff means source node identifier is not part of the NM PDU)

ImplementationType: CanNm_PduPositionType
Multiplicity 1
Type EcucEnumerationParamDef
Range CANNM_PDU_BYTE_0 Byte 0 is used
CANNM_PDU_BYTE_1 Byte 1 is used
CANNM_PDU_OFF Control Bit Vector is not used
Post-Build Variant
false
Value
Value Pre-compile time X VARIANT-PRE-COMPILE
Configuration Link time X VARIANT-LINK-TIME, VARIANT-
Class POST-BUILD
Post-build time --
Scope / scope: ECU
Dependency dependency: CanNmPduNidPosition; If CanNmNodeDetectionEnabled == true
then CanNmPduCbvPosition != CANNM_PDU_OFF

if(CanNmPduCbvPosition != CANNM_PDU_OFF && CanNmPduNidPosition !=


CANNM_PDU_OFF) then CanNmPduCbvPosition != CanNmPduNidPosition

if(CanNmPduCbvPosition != CANNM_PDU_OFF && CanNmPduNidPosition ==


CANNM_PDU_OFF) then CanNmPduCbvPosition = CANNM_PDU_BYTE0

SWS Item ECUC_CanNm_00025 :


Name CanNmPduNidPosition
Parent Container CanNmChannelConfig
Description Defines the position of the source node identifier within the NM PDU.
The value of the parameter represents the location of the source node identifier in
the NM PDU (CANNM_PDU_BYTE_0 means byte 0, CANNM_PDU_BYTE_1
means byte 1, CANNM_PDU_OFF means source node identifier is not part of the
NM PDU)

ImplementationType: CanNm_PduPositionType
Multiplicity 1
Type EcucEnumerationParamDef
Range CANNM_PDU_BYTE_0 Byte 0 is used
CANNM_PDU_BYTE_1 Byte 1 is used
CANNM_PDU_OFF Node Identification is not used
Post-Build Variant
false
Value
Value Pre-compile time X VARIANT-PRE-COMPILE
Configuration Link time X VARIANT-LINK-TIME, VARIANT-
Class POST-BUILD
Post-build time --
Scope / scope: ECU

104 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Dependency dependency: CanNmPduCbvPosition; If CanNmNodeIdEnabled == true then


CanNmPduNidPosition != CANNM_PDU_OFF

if(CanNmPduNidPosition != CANNM_PDU_OFF && CanNmPduCbvPosition !=


CANNM_PDU_OFF) then CanNmPduNidPosition != CanNmPduCbvPosition

if(CanNmPduNidPosition != CANNM_PDU_OFF && CanNmPduCbvPosition ==


CANNM_PDU_OFF) then CanNmPduNidPosition = CANNM_PDU_BYTE0

SWS Item ECUC_CanNm_00066 :


Name CanNmPnEnabled
Parent Container CanNmChannelConfig
Description Enables or disables support of partial networking.
false: Partial networking Range not supported
true: Partial networking supported
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU
dependency: only valid if CanNmGlobalPnSupport == true

SWS Item ECUC_CanNm_00067 : (Obsolete)


Name CanNmPnEraCalcEnabled
Parent Container CanNmChannelConfig
Description Specifies if CanNm calculates the PN request information for external
requests. (ERA)
false: PN request are not calculated
true: PN request are calculated
Tags:
atp.Status=obsolete
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: only valid if CanNmGlobalPnSupport == true

SWS Item ECUC_CanNm_00073 :


105 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Name CanNmPnHandleMultipleNetworkRequests
Parent Container CanNmChannelConfig
Description Specifies if CanNm performs an additional transition from Network Mode to
Repeat Message State (true) or not (false).
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: only valid if CanNmGlobalPnSupport == true

SWS Item ECUC_CanNm_00023 :


Name CanNmRemoteSleepIndTime
Parent Container CanNmChannelConfig
Description Timeout for Remote Sleep Indication.
It defines the time in seconds how long it shall take to recognize that all
other nodes are ready to sleep.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0.001 .. 65.535]
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: CanNmRemoteSleepIndTime ≥ CanNmMsgCycleTime
CanNmRemoteSleepIndTime is only required if
CanNmRemoteSleepIndEnabled = true

SWS Item ECUC_CanNm_00022 :


Name CanNmRepeatMessageTime
Parent Container CanNmChannelConfig
Description Timeout for Repeat Message State.
It defines the time in seconds how long the NM shall stay in the Repeat
Message State.
Multiplicity 1
Type EcucFloatParamDef
Range [0 .. 65.535]
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
106 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

dependency: CanNmRepeatMessageTime = n * CanNmMsgCycleTime;


CanNmRepeatMessageTime > CanNmImmediateNmTransmissions *
CanNmImmediateNmCycleTime

Typically it should be equal to: n * CanNmMsgCycleTime, where n denotes


the number of NM PDUs that are normally sent in the Repeat Message
State.
The value of n decremented by one determines the amount of lost NM
PDUs that can be tolerated by the node detection procedure.
The value 0 denotes that no Repeat Message State is configured. It means
that Repeat Message State is transient what implicates that it is left
immediately after entrance and in result no start-up stability is guaranteed
and no node detection procedure is possible.

SWS Item ECUC_CanNm_00089 :


Name CanNmRepeatMsgIndEnabled
Parent Container CanNmChannelConfig
Description Enable/disable the notification that a RepeatMessageRequest bit has been
received.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: ECU
dependency: CanNmRepeatMsgIndEnabled = FALSE if
CanNmPassiveModeEnabled == TRUE or (CanNmNodeDetectionEnabled
== FALSE && CanNmDynamicPncToChannelMappingEnabled ==
FALSE).
CanNmRepeatMsgIndEnabled = TRUE if
CanNmDynamicPncToChannelMappingEnabled == TRUE.

SWS Item ECUC_CanNm_00092 :


Name CanNmStayInPbsEnabled
Parent Container CanNmChannelConfig
Description If this parameter is disabled Prepare Bus-Sleep Mode is left after
CanNmWaitBusSleepTime. If this parameter is enabled Prepare Bus-
Sleep Mode can only be left if ECU is powered off or any restart reason
applies.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_CanNm_00097 :


Name CanNmSynchronizedPncShutdownEnabled
Parent Container CanNmChannelConfig
Description Specifies if CanNm handle PN shutdown messages to support a
synchronized PNC shutdown across a PN topology. This is only used for

107 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

ECUs in the role of a top-level PNC coordinator or intermediate PNC


coordinator. Thus, the PNC gateway functionality is enabled and therefore
ERA calculation is used.
FALSE: synchronized PNC shutdown is disabled

TRUE: synchronized PNC shutdown is enabled


Tags:
atp.Status=draft
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: (OBSOLETE: Only available if CanNmPnEnabled == TRUE
and CanNmPnEraCalcEnabled == TRUE. )

DRAFT:
Only available if CanNmPnEnabled == TRUE and NmPnEraCalcEnabled
== TRUE.

SWS Item ECUC_CanNm_00020 :


Name CanNmTimeoutTime
Parent Container CanNmChannelConfig
Description Network Timeout for NM PDUs.
It denotes the time in seconds how long the NM shall stay in the Ready
Sleep State before
transition into the Prepare Bus-Sleep Mode is initiated.
Multiplicity 1
Type EcucFloatParamDef
Range [0.002 .. 65.535]
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: ECU
dependency: CanNmTimeoutTime > CanNmMsgCycleTime

It shall be equal for all nodes in the cluster.


It shall be greater than CanNmMsgCycleTime.

SWS Item ECUC_CanNm_00021 :


Name CanNmWaitBusSleepTime
Parent Container CanNmChannelConfig
Description Timeout for bus calm down phase.
It denotes the time in seconds how long the NM shall stay in the Prepare
Bus-Sleep Mode before transition into Bus-Sleep Mode shall take place.
Multiplicity 0..1

108 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Type EcucFloatParamDef
Range [0.001 .. 65.535]
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: It shall be equal for all nodes in the cluster.
It shall be long enough to make all Tx-buffer empty.
In case CanNmStayInPbsEnabled is disabled this parameter shall be
mandatory.

SWS Item ECUC_CanNm_00018 :


Name CanNmComMNetworkHandleRef
Parent Container CanNmChannelConfig
Description This reference points to the unique channel defined by the ComMChannel
and provides access to the unique channel index value in
ComMChannelId.
Multiplicity 1
Type Symbolic name reference to [ ComMChannel ]
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_CanNm_00079 : (Obsolete)


Name CanNmPnEraRxNSduRef
Parent Container CanNmChannelConfig
Description Reference to a Pdu in the COM-Stack. The SduRef is required for every
CanNm Channel, because ERA is reported per channel.
Tags:
atp.Status=obsolete
Multiplicity 0..1
Type Reference to [ Pdu ]
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: only valid if CanNmPnEraCalcEnabled == true

Included Containers
Container Name Multiplicity Scope / Dependency
This container is used to configure the Rx PDU properties that
CanNmRxPdu 1..*
are used for the CanNm Channel.
CanNmTxPdu 0..1 This container contains the CanNmTxConfirmationPduId and
109 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

the CanNmTxPduRef.
This optional container is used to configure the UserNm PDU.
CanNmUserDataTxPdu 0..1 This container is only available if
CanNmComUserDataSupport is enabled.

10.2.6 CanNmRxPdu
SWS Item ECUC_CanNm_00038 :
Container Name CanNmRxPdu
Parent Container CanNmChannelConfig
This container is used to configure the Rx PDU properties that are used for
Description
the CanNm Channel.
Configuration Parameters

SWS Item ECUC_CanNm_00054 :


Name CanNmRxPduId
Parent Container CanNmRxPdu
Description This parameter defines the Rx PDU ID of the CanIf L-PDU range that is
associated with this CanNm channel.
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 65535
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU

SWS Item ECUC_CanNm_00039 :


Name CanNmRxPduRef
Parent Container CanNmRxPdu
Description Reference to the global PDU that is used by this CanNm channel.
Multiplicity 1
Type Reference to [ Pdu ]
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

10.2.7 CanNmTxPdu
SWS Item ECUC_CanNm_00036 :
Container Name CanNmTxPdu
Parent Container CanNmChannelConfig
This container contains the CanNmTxConfirmationPduId and the
Description
CanNmTxPduRef.
Configuration Parameters

SWS Item ECUC_CanNm_00048 :


Name CanNmTxConfirmationPduId
Parent Container CanNmTxPdu
110 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Description Handle Id to be used by the Lower Layer to confirm the transmission of the
CanNmTxPdu to the LowerLayer.
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 65535
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU

SWS Item ECUC_CanNm_00037 :


Name CanNmTxPduRef
Parent Container CanNmTxPdu
Description The reference to the common PDU structure.
Multiplicity 1
Type Reference to [ Pdu ]
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

10.2.8 CanNmUserDataTxPdu
SWS Item ECUC_CanNm_00045 :
Container Name CanNmUserDataTxPdu
Parent Container CanNmChannelConfig
This optional container is used to configure the UserNm PDU. This
Description
container is only available if CanNmComUserDataSupport is enabled.
Configuration Parameters

SWS Item ECUC_CanNm_00047 :


Name CanNmTxUserDataPduId
Parent Container CanNmUserDataTxPdu
Description This parameter defines the Handle ID of the NM User Data I-PDU.
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 65535
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU

SWS Item ECUC_CanNm_00046 :


Name CanNmTxUserDataPduRef
Parent Container CanNmUserDataTxPdu
Description Reference to the NM User Data I-PDU in the global PDU collection.
Multiplicity 1
Type Reference to [ Pdu ]

111 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

Post-Build Variant Value true


Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

10.2.9 CanNmPnInfo
SWS Item ECUC_CanNm_00071 : (Obsolete)
Container Name CanNmPnInfo
Parent Container CanNmGlobalConfig
PN information configuration
Description Tags:
atp.Status=obsolete
Configuration Parameters

SWS Item ECUC_CanNm_00061 : (Obsolete)


Name CanNmPnInfoLength
Parent Container CanNmPnInfo
Description Specifies the length of the PN request information in the NM PDU.
Tags:
atp.Status=obsolete
Multiplicity 1
Type EcucIntegerParamDef
Range 1 .. 63
Default value 1
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: only valid if CanNmGlobalPnSupport == true

SWS Item ECUC_CanNm_00060 : (Obsolete)


Name CanNmPnInfoOffset
Parent Container CanNmPnInfo
Description Specifies the offset of the PN request information in the NM PDU.
Tags:
atp.Status=obsolete
Multiplicity 1
Type EcucIntegerParamDef
Range 1 .. 63
Default value 1
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: only valid if CanNmGlobalPnSupport == true

Included Containers
Container Name Multiplicity Scope / Dependency
112 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

PN information configuration
CanNmPnFilterMaskByte 1..63 Tags:
atp.Status=obsolete

10.2.10 CanNmPnFilterMaskByte
SWS Item ECUC_CanNm_00069 : (Obsolete)
Container Name CanNmPnFilterMaskByte
Parent Container CanNmPnInfo
PN information configuration
Description Tags:
atp.Status=obsolete
Configuration Parameters

SWS Item ECUC_CanNm_00063 : (Obsolete)


Name CanNmPnFilterMaskByteIndex
Parent Container CanNmPnFilterMaskByte
Description Index of the filter mask byte. Specifies the position within the filter mask
byte array.
Tags:
atp.Status=obsolete
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 62
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
dependency: only valid if CanNmGlobalPnSupport == true;
CanNmPnFilterMaskByteIndex < CanNmPnInfoLength

SWS Item ECUC_CanNm_00064 : (Obsolete)


Name CanNmPnFilterMaskByteValue
Parent Container CanNmPnFilterMaskByte
Description Parameter to configure the filter mask byte.
Tags:
atp.Status=obsolete
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 255
Default value 0
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
dependency: only valid if CanNmGlobalPnSupport == true

No Included Containers

113 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

10.3 Published parameters


For details refer to the chapter 10.3 “Published Information” in SWS_BSWGeneral
[10].

114 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

11 Examples

11.1 Example of periodic transmission mode with bus load


reduction

Three nodes are connected to the bus and are in “normal operation” state. The
nodes (Node 1 and Node 2) with the smallest CanNmMsgReducedTime are sending
alternating their Network Management PDUs. After a while node 1 goes into “ready
sleep” state. Now node 2 and node 3 are sending alternating Network Management
PDU. After a while also node 2 goes into “ready sleep” state. Since node 3 is the last
node on the bus only node 3 is sending messages with CanNmMsgCycleTime.

Figure 11-1Example for Bus Load Reduction

11.2 Example timing behavior for Network Management PDUs

Assume an example network of three nodes 1, 2, 3 (see also Figure 11-2). Nodes
specific cycle offsets are equal respectively to t1 < t2 < t3 < T. NM cycle time is equal
to T (see Figure 11-3).
Network Management PDUs sent on the bus within the Repeat Message State are
presented in the Figure 11-4, and within the Normal Operation / Ready Sleep State in
Figure 11-5. Each dot in Figure 11-5 denotes restart of the NM-Timeout Timer.

Figure 11-2 Example for 3 ECUs connected to a network


115 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement
Specification of CAN Network Management
AUTOSAR CP R21-11

Figure 11-3 Example for NM Transmission Start of different ECUs

Figure 11-4 Example for NM Transmission Handling of multiple ECUs

Figure 11-5 Example for NM Timeout Handling

116 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement


Specification of CAN Network Management
AUTOSAR CP R21-11

12 Not applicable requirements


[SWS_CanNm_NA_00000] ⌈This specification item references requirements that are
not applicable, because CanNm has no interdepencies to SW Components.⌋
(SRS_BSW_00170, SRS_BSW_00168, SRS_BSW_00423)

[SWS_CanNm_NA_00001] ⌈This specification item references requirements that are


not applicable, because CanNm does not implement any interrupts, is not a driver or
MCAL abstraction layer or has any direct access to OS.⌋ (SRS_BSW_00375,
SRS_BSW_00424, SRS_BSW_00429, SRS_BSW_00161, SRS_BSW_00162,
SRS_BSW_00005, SRS_BSW_00164, SRS_BSW_00325, SRS_BSW_00413,
SRS_BSW_00347, SRS_BSW_00314)

[SWS_CanNm_NA_00002] ⌈This specification item references requirements that are


not applicable, because CanNm does not influence sequence of module
initialization.⌋ (SRS_BSW_00416)

[SWS_CanNm_NA_00003] ⌈This specification item references requirements that are


not applicable, because BSW module description template is not part of the CanNm
SWS.⌋ (SRS_BSW_00425, SRS_BSW_00427)

[SWS_CanNm_NA_00004] ⌈This specification item references requirements that are


not applicable, because CanNm does not share any data with other BSW.⌋
(SRS_BSW_00426)

[SWS_CanNm_NA_00005] ⌈This specification item references requirements that are


not applicable, because CanNm does not propagate data through different layers.⌋
(SRS_BSW_00432)

[SWS_CanNm_NA_00006] ⌈This specification item references requirements that are


not applicable, because CanNm does not have any shutdown functionality.⌋
(SRS_BSW_00336)

[SWS_CanNm_NA_00007] ⌈This specification item references requirements that are


not applicable, because CanNm does not report any DEM errors⌋
(SRS_BSW_00417)

[SWS_CanNm_NA_00008] ⌈This specification item references requirements that are


not applicable, because it is no requirement against CanNm SWS or only against
ECUC elements.⌋ (SRS_BSW_00160, SRS_BSW_00172, SRS_BSW_00010,
SRS_BSW_00341, SRS_BSW_00334, RS_Nm_00043, RS_Nm_00044,
RS_Nm_00048, RS_Nm_00145, RS_Nm_00146, RS_Nm_00150, RS_Nm_00154,
RS_Nm_02514, RS_Nm_02515, RS_Nm_02535, RS_Nm_02537)

117 of 117 Document ID 13: AUTOSAR_SWS_CANNetworkManagement

You might also like