AUTOSAR FO PRS NetworkManagementProtocol
AUTOSAR FO PRS NetworkManagementProtocol
Management Protocol
AUTOSAR FO R23-11
4
AUTOSAR
2018-10-31 1.5.0 Release • Initial release
Management
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 intel-
lectual 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.
Contents
1 Introduction and overview 6
1.1 Protocol purpose and objectives . . . . . . . . . . . . . . . . . . . . . . . 6
1.2 Applicability of the protocol . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.1 Constraints and assumptions . . . . . . . . . . . . . . . . . . . 7
1.2.2 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.1 Dependencies to other protocol layers . . . . . . . . . . . . . . 7
1.3.2 Dependencies to other standards and norms . . . . . . . . . . 7
1.3.3 Dependencies to the Application Layer . . . . . . . . . . . . . 7
2 Use Cases 8
3 Protocol Requirements 9
3.1 Requirements Traceability . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4 Definition of terms and acronyms 10
4.1 Acronyms and abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2 Definition of terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5 Protocol specification 13
5.1 NM message format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.1.1 Source Node Identifier . . . . . . . . . . . . . . . . . . . . . . . 14
5.1.2 Control Bit Vector . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.1.3 User Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.2 Partial Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.2.1 Handling of Rx NM messages . . . . . . . . . . . . . . . . . . 16
5.2.2 Handling of Tx NM messages . . . . . . . . . . . . . . . . . . 17
5.3 Timing behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.3.1 Sending NM message . . . . . . . . . . . . . . . . . . . . . . . 18
5.3.2 Transition to Bus-Sleep Mode . . . . . . . . . . . . . . . . . . . 18
5.4 Networks specifics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.4.1 CAN and Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.4.2 FlexRay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.5 Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.5.1 Communication request . . . . . . . . . . . . . . . . . . . . . . 22
5.5.2 Communication release . . . . . . . . . . . . . . . . . . . . . . 23
6 Configuration parameters 24
6.1 NM Message Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.2 Timeout Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.3 NM local configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7 Protocol usage and guidelines 26
8 References 27
If any node in the NM cluster requires bus-communication, it can keep the NM cluster
awake by transmitting NM messages.
There may exist NM nodes in the network which follow the protocol without ever actively
sending NM messages (called NM passive nodes).
1.2.2 Limitations
1. One NM instance is associated with only one NM cluster in one network. One
NM cluster can have only one instance of Nm in one node.
2. The maximum size of the NM message is limited by the used communication bus.
3. The NM Coordinator is only used in the AUTOSAR Classic Platform. Details can
be found in [1].
1.3 Dependencies
N/A
Upper layer (e.g. application) uses NM services to request or release a network i.e. to
activate or deactivate sending of NM messages.
In addition, the upper layer/module may use the possibility to get informed about
changes of the NM operational modes.
2 Use Cases
The Use Cases for PRS Network Management Protocol are listed and described in the
chapter "Use Cases" of RS Adaptive Network Management [2]
3 Protocol Requirements
Term Description
Network Mode In this state the network is requested or active.
Prepare Bus-Sleep Mode In this state the network is released or inactive.
Bus-Sleep Mode In this state the network is released or inactive. In this state no NM
message is sent
FlexRay communication cycle Part of FlexRay communication schedule consisting of time slots
(static or dynamic). Each FlexRay message is assigned to a spe-
cific time slot in one communication cycle.
NM cluster Set of NM nodes coordinated with the use of the NM algorithm.
NM Message Refers to the payload transmitted on the bus. It contains the User
Data as well as the Control Bit Vector and may contain the Source
Node Identifier.
Normal Operation In this state the node is sending periodic NM messages in order to
keep a NM cluster awake
Repeat Message State This state ensures that transition, through a repetitive transmission
of NM messages, to normal operation is visible for other nodes on
the bus
Repeat Message Request Request (received internally or externally via an NM message) to
transition back to the Repeat Message State
NM Node A ECU (electornic controll unit) which is connected to one or more
NM clusters
NM instance A NM instance represents the current status of one NM cluster in-
side one NM node
External Request Communication request via received NM message
Internal Request Communication request via a NM node internal (request by appli-
cation / uppler layer)
Passive wakeup A wakeup triggered by an external request
Active wakeup A wakeup triggered by an internal request
PNC Bit Vector Represent the Partial Network information in a NM frame
PNC Bit Vector Length Represent the length of a Partial Network information in bytes
PNC bit One bit with represent a particular Partial Network in the Partial
Network Bit Vector Length
Term Description
Top-level PNC coordinator An ECU acts as top-level PNC coordinator for those PNCs which
are actively coordinated on all assigned channels. This ECU has
the PNC gateway functionality enabled. The top-level PNC coordi-
nator triggers for those PNCs a synchronized PNC shutdown, if no
other ECU in the network requests them and if the synchronized
PNC shutdown is enabled. Note: For different PNCs it is possible
to have different top-level PNC coordinators. But for the same PNC
only one top-level coordinator is supported.
Intermediate PNC coordinator An ECU acts as intermediate PNC coordinator for those PNCs
which are passively coordinated on at least one channel. This ECU
has the PNC gateway functionality enabled. The intermediate PNC
coordinator forwards a synchronized PNC shutdown to active coor-
dinated channels for PNCs which are passively coordinated, if the
synchronized PNC shutdown is enabled.
PNC leaf node A PNC leaf node is an ECU that act neither as top-level PNC coor-
dinator nor as an intermediate PNC coordinator. It act as an ECU
without a PNC gateway in the network and process PN shutdown
message as usual NM messages.
PN shutdown message A top-level PNC coordinator transmits the PN shutdown messages
to indicate a synchronized PNC shutdown across the PN topology.
A PN shutdown message is an NM message where the PNSR bit
(resides in the control bit vector) and all PNC bits (reside in the
PNC Bit Vector) which are indicated for a synchronized shutdown
set to ’1’.
An intermediate PNC coordinator which receives a PN shutdown
message forwards the PNC Bit Vector as a PN shutdown message
on the affected channels.
Term Description
Passive coordinated channel A PNC gateway has communication channels which must be co-
ordinated regarding the PNC requests. A PNC gateway collects
PNC requests from all of its passive coordinated channels, ag-
gregates them and forwards it to all active coordinated channels.
Passive coordinated channels are remotely kept awake by another
PNC gateway, which is connected to the same channel and actively
coordinates this channel.
5 Protocol specification
[PRS_Nm_00505] dThe length of an NM message shall not exceed the MTU of the
underlying physical transport layer.
c(RS_Nm_02541)
[PRS_Nm_00077] dThe length (in bytes) of the NM message shall be configured by [
NmMessageLength].c(RS_Nm_02541)
Note: The length of the user data can be calculated from the NmMessageLength -
(amount of used system bytes).
[PRS_Nm_00075] dThe location of the Control Bit Vector shall be configurable to po-
sition Byte 0 or Byte 1 or Off (default: Byte 0). For FlexRay the Control Bit Vector shall
be non-configurable and always be set to position Byte 0.c(RS_Nm_00150)
[PRS_Nm_00045] dThe Control Bit Vector shall consist of:
• Bit 0: Repeat Message Request
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 re-
quest for at least one PNC
• Bit 3: NM Coordinator Sleep Ready 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
• Bit 6: Partial Network Information Bit (PNI)
0: NM message contains no Partial Network request information
Note: For FlexRay bit 7 is used as the Vote bit in certain schedule variants.
Note: Bit 1 and 2 were used in R3.2 as NM Coordinator ID (Low Bit)
User Data is considered all data not being part of CBV and NID.
[PRS_Nm_00158] dIt shall be possible to enable or disable the support of NM user
data (NM user data is optional).c(RS_Nm_00150, RS_Nm_02503, RS_Nm_02504)
case, where an intermediate PNC coordinator or PNC leaf node sets the PNSR
bit within the Nm message by accident.
• PNI bit ="’1"’ and PNSR = "‘1"’ (received by an intermediate PNC coordinator):
All the Partial Network were the corresponding PNC bits in the PNC Bit Vector
are set to 1 are indicated to be released. The remaining Partial Network (the
corresponding PNC bits are set to 0) are not affected.
• PNI bit ="’1"’ and PNSR = "‘1"’ (received by a PNC leaf node): same as if PNI bit
="’1"’ and PNSR = "‘0"’
Note: Each bit (PNC bit) of the PNC Bit Vector represent a particular PNC. The
byteIndex and bitIndex within the PNC Bit Vector of a PNC bit can be determined as
follows: byteIndex = (PncId div 8); bitIndex = (PncId mod 8).
[PRS_Nm_00328] dIf PN support is disabled, then its NM shall ignore any partial net-
working information contained in the received message.c(RS_Nm_00150, RS_Nm_-
02517, RS_Nm_02519)
[PRS_Nm_00329] dIf the PN support is enabled, and the PNI bit in the received NM
message is 0, the node’s NM shall ignore the partial networking information bytes of
the message.c(RS_Nm_02519)
[PRS_Nm_00331] dIf the PN support is enabled, the PNI bit is set to 1 and the PNSR
bit is set to 0 in the received NM message, NM shall process the Partial Networking
Information of the NM message.c(RS_Nm_02519)
[PRS_Nm_00409] dIf synchronized PNC shutdown is enabled, a NM message is re-
ceived in the role of a top-level PNC/intermediate PNC coordinator on an active coordi-
nated channel and PNI bit and PNSR bit are set to 1, then NM shall ignore the PNSR bit
and handle the message as a usual NM message.c(RS_Nm_02519, RS_Nm_02548)
Note: A PN shutdown message (PNI bit = 1 and PNSR bit = 1) should never be re-
ceived by a top-level/intermediate PNC coordinator on an active coordinated channel,
because only a top-level PNC coordinator of a dedicated PNC could initiate a PN
shutdown message. This is an error case where an intermediate PNC coordinator
transmits a PN shutdown message by accident on an active coordinated channel. A
receiving top-level/intermediate PNC coordinator should handle this message as a
usual NM message.
[PRS_Nm_00410] dIf the PN synchronized shutdown error reaction is enabled and the
received NM message is discarded due to [PRS_Nm_00409], then the top-level PNC
coordinator shall immediately transmit an NM message with all "‘internally requested"’
and "‘externally requested"’ PNCs as Partial Network Information.c(RS_Nm_02519)
[PRS_Nm_00411] dIf synchronized PNC shutdown is enabled, an NM message is re-
ceived in the role of an intermediate PNC coordinator on a passive coordinated channel
and PNI bit and PNSR bit are set to 1, then NM shall release the indicated PNCs (PNC
bits which are set to 1 within the PNC bit vector), reset the PN reset timer and forward
the received NM message with PNI bit and PNSR bit set to 1 and the according PNCs
set to 1 to all subordinated ECUs.c(RS_Nm_02519, RS_Nm_02548)
Note:
[PRS_Nm_00332] dIf the PN support is enabled, its NM shall set the value of the
transmitted PNI bit in the CBV to 1.c(RS_Nm_02517)
[PRS_Nm_00333] dIf the PN support is disabled, its NM shall set the value of the
transmitted PNI bit in the CBV to 0.c(RS_Nm_02517)
[PRS_Nm_00341] dIf the PN support is enabled, for PNCs that are "internally re-
quested" the corresponding bit in the PNC Request Bit Vector shall be set to 1 before
sending the NM message.c(RS_Nm_02517)
Constraint: The usage of the CBV is mandatory in case Partial Networking is used.
This must be ensured by configuration in the respective platform.
[PRS_Nm_00412] dIf the PN support is enabled, for PNCs that are "‘internally re-
quested"’ or "‘externally requested"’ the corresponding bit in the PNC Request Bit Vec-
tor shall be set to 1 before sending the NM message in the role of a top-level PNC
coordinator or an intermediate PNC coordinator.c(RS_Nm_02517, RS_Nm_02548)
[PRS_Nm_00413] dIf synchronized PNC shutdown is enabled and NM detect an tran-
sition of PNCs from "‘requested"’ to "‘released"’ (independent if externally or internally
requested), the corresponding bit of those released PNCs shall be set to 1, the remain-
ing shall be set 0 and the PNSR bit in CBV shall be set to 1 before sending the PN
shutdown message.c(RS_Nm_02517, RS_Nm_02548)
If communication on the bus is needed i.e. requested, NM messages are sent out. If
no communication is needed i.e. released, sending of NM messages is stopped.
[PRS_Nm_00237] dNM messages shall be sent periodically in states "Repeat Mes-
sage" and "Normal Operation" using configured NM Message Cycle Time (NmMsgCy-
cleTime).c(RS_Nm_00047)
[PRS_Nm_00005] dIf the "Repeat Message" state is not entered beacuse of network
request OR NM transmissions is zero (see NmImmediateNmTransmissions) the
transmission of NM messages shall be delayed by NM Cycle Offset (see NmMsgCy-
cleOffset) after entering the "Repeat Message" state.c()
[PRS_Nm_00334] dWhen the "Repeat Message" state is entered because of network
request or repeat message request and configured number of immediate NM transmis-
sions is greater than zero (see NmImmediateNmTransmissions), these immediate
NM messages shall be transmitted using Immediate NM Cycle Time (see NmImmedi-
ateNmCycleTime). NM Cycle Offset (see NmMsgCycleOffset) shall not be applied
in this case.c()
When a NM node does not need the communication on a bus, it will not immediately
shut down i.e. switch to Bus-Sleep Mode. Instead, it will first change to the so called
Ready Sleep state. This state ensures that any NM node in the NM cluster waits to
transition to the Bus-Sleep Mode as long as any other node keeps the NM cluster
awake.
[PRS_Nm_00103] dIf bus communication is released, the NM algorithm shall perform
transition to the Bus-Sleep Mode after a configurable amount of Ready Sleep Time has
expired and no new communication request occurs in between and no NM Message
has been received.c(RS_Nm_00048, RS_Nm_00054)
Note: The Ready Sleep Time depends on the used network, refer to 5.4.
On the transition path from Network to Bus-Sleep Mode, CAN NM and UDP NM intro-
duce Prepare Bus Sleep Mode. The purpose of this state is to ensure that all nodes
have time to stop their network activity before the Bus Sleep state is entered.
[PRS_Nm_00506]{DRAFT} dIf NmStayInPbsEnabled is disabled and bus communi-
cation in a NM cluster is released, and there are no Network Management PDUs on the
bus for a configurable amount of time determined by NM Timeout Time (NmTimeOut-
Time) + Wait Bus-Sleep Time (NmWaitBusSleepTime) transition into the BusSleep
Mode shall be performed.c()
[PRS_Nm_00115] dIf NmStayInPbsEnabled is disabled the NM shall stay in the Pre-
pare Bus-Sleep Mode for an amount of time determined by the Wait Bus-Sleep Time.
After this time has expired, the Prepare Bus-Sleep Mode shall be left, and the Bus-
Sleep Mode shall be entered.c(RS_Nm_00048, RS_Nm_00054)
Note: Thus the Ready Sleep Time is extended by Wait Bus-Sleep Time (NmWaitBus-
SleepTime). The Ready Sleep Time on CAN and Ethernet starts when bus commu-
nication is released and it ends NM Timeout Time (NmTimeOutTime) after last NM
messages was transmitted or received on the bus.
[PRS_Nm_00504]{DRAFT} dWhen in Prepare Bus-Sleep Mode, and an NM message
is received, or the NM is requested for communication, than NM shall enter Network
Mode.c(RS_Nm_00047)
The following requirements concerns early shutdown. It does only apply to CAN and
Ethernet, since on FlexRay always all messages have to be considered (FlexRay can-
not shutdown earlier nodes):
[PRS_Nm_00503]{DRAFT} dIt shall be possible to enable or disable All Nm Messages
Keep Awake functionality.c()
[PRS_Nm_00337] dIf PN support is enabled, and All Nm Messages Keep Awake func-
tionality is disabled, the NM algorithm shall only process messages if they contain at
least one bit set to 1 in the PNC Request Bit Vector, that corresponds to a PNC which
is relevant for the ECU.c()
5.4.2 FlexRay
In addition to NM message containing data (see Figure 5.1), the FlexRay NM specifies
so-called NM-Vote messages.
In fact, the FlexRay NM algorithm is based on periodic NM-Vote messages received by
all nodes in the cluster. Reception of a NM-Vote message indicates that the sending
node wants to keep the NM cluster awake.
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Byte 0 Vote Set to "0"
[PRS_Nm_00116] dThe NM-Vote message format shall contain a Voting Bit (Vote) with
the following meaning:
0 - vote against keeping awake
1 - vote for keeping awake
c()
[PRS_Nm_00117] dThe FlexRay NM shall be able to separately transmit NM-Data and
NM-Vote, or to combine them within one NM message (in either static or dynamic slot).
Transmission format shall be configurable (Schedule Variant).c()
When the NM-Vote and NM-Data are combined (by Bit OR-ing) within one NM mes-
sage, the content of the NM-Vote will be combined with the content of the Control Bit
Vector Byte.
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Byte 0 Vote Partial Partial Active NM Co- Reserved Reserved Repeat
Network Network Wakeup ordinator Message
Informa- Learning Sleep Request
tion Ready
Each ECU, which participates in the FlexRay NM, is synchronized to a global time
based on periodic repetition of the FlexRay communication cycle. To assure syn-
chronous behaviour of all ECUs in a NM cluster, the FlexRay NM aligns the state
changes to a NM Repetition Cycle, which is aligned to a FlexRay communication cycle.
Every transition is bound to repetition cycles (refer to configuration parameter NmRep-
etitionCycle). Therefore the Ready Sleep Time is defined as the time that starts when
a new repetition cycle starts after bus communication has been released and ends
NmReadySleepCnt+1 repetition cycles without any NM-Vote.
[PRS_Nm_00118] dThe FlexRay NM shall specify the following cycle configuration
parameters:
5.5 Sequences
6 Configuration parameters
This chapter lists all parameters the NM protocol uses.
Parameter Description
NmNidPosition Defines the position of the source node identifier (if used) within
the NM message
NodeId Node identifier of local node
NmCbvPosition Defines the position of the Control Bit Vector (if used) within the
NM message
UserDataEnabled Enables/disables user data support
NmMessageLength Specifies the length (in bytes) of the NM message
PnEnabled Enables/disables support of partial networking
PnInfoOffset Offset of the PN request information in the NM message. The
offset to the PNC data can only be configured to either be directly
after the system bytes or after the user data.
PnInfoLength Length of the PN request information in the NM message
Parameter Description
NmTimeOutTime The time for a node between the reception of the last NM mes-
sage keeping it awake to the transition to Bus Sleep
NmMsgCycleTime The transmission periodicity of an NM message by a node
NmMsgCycleOffset The start delay of a transmission of Nm messages in Repeat
Message State
NmRepeatMessageTime The time for a node to remain in Repeat Message State
NmWaitBusSleepTime Timeout for bus calm down phase. It denotes the time in sec-
onds how long the NM shall stay in the Prepare Bus-Sleep Mode
before transition into Bus-Sleep Mode (CAN NM, UDP NM only).
NmReadySleepCnt Ready sleep counter. After NmReadySleepCnt+1 repetition cy-
cles without any NM-Vote, NM enters Bus-Sleep (FR NM only).
NmImmediateNmCycleTime Defines the immediate NM message cycle time in seconds used
in Repeat Message state (CAN NM, UDP NM only)
NmImmediateNmTransmissions Number of immediate NM messages which shall be transmitted
in Repeat Message state (CAN NM, UDP NM only)
NmDataCycle Number of FlexRay Schedule Cycles needed to transmit NM-
Data of all ECUs (FR NM only)
NmVotingCycle Number of FlexRay Schedule Cycles needed to transmit NM-Vote
of all ECUs (FR NM only)
NmRepetitionCycle Number of NM voting cycles where no change of voting behavior
is possible (FR NM only)
NmScheduleVariant Defines the transmission scheduling variant for sending NM-Vote
and NM-Data
PnResetTime Time a PNC is considered reqested externally after the last mes-
sage containing the corresponding bit set to one has been re-
ceived
Parameter Description
SynchronizedPncShutdownEnabled Enable/Disable a synchronized PNC shutdown
NmStayInPbsEnabled If this parameter is disabled Prepare Bus-Sleep Mode is
left after NmWaitBusSleep Time. If this parameter is en-
abled Prepare Bus-Sleep Mode can only be left if ECU is
powered off or any restart reason applies.
8 References
Number Heading
[PRS_Nm_00005]
[PRS_Nm_00505]
[PRS_Nm_00506]
Table A.1: Added Specification Items in R23-11
Number Heading
[PRS_Nm_00115]
[PRS_Nm_00334]
Table A.2: Changed Specification Items in R23-11
none