0% found this document useful (0 votes)
91 views115 pages

Autosar CP Sws Canstatemanager

Uploaded by

sathyanila0507
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views115 pages

Autosar CP Sws Canstatemanager

Uploaded by

sathyanila0507
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 115

Specification of CAN State Manager

AUTOSAR CP R23-11

Specification of CAN State


Document Title Manager
Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 253

Document Status published


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

Document Change History


Date Release Changed by Description
• Support for selective WakeUp via
CAN-Controller

AUTOSAR • Clarification of "Available via:


Release Configurable"
2023-11-23 R23-11
Management • Added SWS IDs for "mandatory
interfaces" & "optional interfaces

• Editorial changes
AUTOSAR
• ComTxModeTimePeriodFactor replaced
2022-11-24 R22-11 Release
with ComTxModeTimePeriod
Management
• Note added for
CanSM_TransceiverModeIndication()

AUTOSAR • Communication mode notification to


2021-11-25 R21-11 Release ComM after initialization clarified
Management
• Clean-up in CANSM_BSM regarding
REPEAT_MAX / No Never-Give-Up
Strategy
AUTOSAR • Pretended Networking removed
2020-11-30 R20-11 Release
Management • Editorial changes
5

1 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
• Fixed Change_Baudrate-Statemachine
for NoCom

• Added GetPduMode-Interface to list


AUTOSAR
2019-11-28 R19-11 Release • Inconsistent behavior due to
Management REPEAT_MAX / No Never-Give-Up
Strategy fixed

• Changed Document Status from Final to


published
AUTOSAR • Reclassification of some errors
2018-30-31 4.4.0 Release
Management • Editorial changes
AUTOSAR • Moved
2017-12-08 4.3.1 Release CANSM_E_MODE_REQUEST_TIMEOUT
Management to Runtime Error
• Provide DeInit-API
AUTOSAR
2016-11-30 4.3.0 Release • ECU passive mode clarified and fixed
Management
• Editorial changes
• Development Error Tracer replaced with
Default Error Tracer
AUTOSAR
• Bus-off recovery time dependencies
2015-07-31 4.2.2 Release
specified more precisely
Management
• Optional interface to check and to
change baudrate removed
• API for ECU passive mode activation

• Baudrate change without reinitialisation,


AUTOSAR if possible
2014-10-31 4.2.1 Release • Interface handling to CanIf module
Management improved

• Interface handling to ComM module


improved
5

2 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
• Introduction of random delays

• Re-Request of ComMode
AUTOSAR
2014-03-31 4.1.3 Release • WakeupValidation to avoid race
Management conditions

• Adapt Bus Off Recovery and NM state


synchronization
• Dependency to DCM module removed

• Mileading timing row removed in


AUTOSAR CanSM_MainFunction
2013-10-31 4.1.2 Release
Management • Editorial changes

• Removed chapter(s) on change


documentation
• Support Pretended Networking mode
handling

• Changed concept to setup baudrate

• Initialization Sequence between ComM


AUTOSAR
2013-03-15 4.1.1 and CanSM
Administration
• Do not send WUF as First Message on
the Bus after BusOff

• CanSm_TxTimeoutExeption in case of
BusOff
• Added new handling to support partial
networking

• Changed handling for bus deinitialisation


according to AR3.x behaviour

• New API and handling to change the


baudrate of a CAN network

AUTOSAR • Changed handling for bus-off recovery


2011-12-22 4.0.3
Administration and related production error report

• Comprehensive revision of all state


machine diagrams and SWS-ID-items

• Changed classification of production


errors and development errors

• Solve conflicts of SWS-ID items with the


conformance test specification
5

3 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
• Configurable Bus-Off revovery with CAN
TX confirmation instead of time based
AUTOSAR recovery
2009-12-18 4.0.1
Administration • Control of PDU channel modes
completely shifted from CanIf to CanSM
module
• VMM/AMM Concept related changes
(PDU group control shifted to BswM)

• Asynchronous handling of CAN network


mode transitions (consideration of CAN
Transceiver and CAN controller mode
notifications)
AUTOSAR
2010-02-02 3.1.4
Administration • Solution of Document Improvement
issues reported by TO (e. g. split up of
non atomic software requirements,
textual requirements instead of only a
state diagram)

• Legal disclaimer revised


AUTOSAR
2008-08-13 3.1.1 • Legal disclaimer revised
Administration
AUTOSAR
2007-12-21 3.0.1 • Initial Release
Administration

4 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-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 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.

5 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

Contents
1 Introduction and functional overview 9

2 Acronyms and Abbreviations 10

3 Related documentation 11
3.1 Input documents & related standards and norms . . . . . . . . . . . . 11
3.2 Related specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 Constraints and assumptions 12
4.1 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2 Applicability to car domains . . . . . . . . . . . . . . . . . . . . . . . . 12
5 Dependencies to other modules 13
5.1 ECU State Manager (EcuM) . . . . . . . . . . . . . . . . . . . . . . . . 13
5.2 BSW Scheduler (SchM, part of RTE) . . . . . . . . . . . . . . . . . . . 13
5.3 Communication Manager (ComM) . . . . . . . . . . . . . . . . . . . . . 14
5.4 CAN Interface (CanIf) . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.5 Diagnostic Event Manager (DEM) . . . . . . . . . . . . . . . . . . . . . 14
5.6 Basic Software Mode Manager (BswM) . . . . . . . . . . . . . . . . . . 14
5.7 CAN Network Management (CanNm) . . . . . . . . . . . . . . . . . . . 14
5.8 Default Error Tracer (DET) . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.9 File structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.9.1 Code file structure . . . . . . . . . . . . . . . . . . . . . . . . 15
5.9.2 Header file structure . . . . . . . . . . . . . . . . . . . . . . . 15
5.9.3 Version check . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6 Requirements Tracing 16

7 Functional specification 39
7.1 General requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7.2 State machine for each CAN network . . . . . . . . . . . . . . . . . . . 42
7.2.1 Trigger: PowerOn . . . . . . . . . . . . . . . . . . . . . . . . 42
7.2.2 Trigger: CanSM_Init . . . . . . . . . . . . . . . . . . . . . . . 42
7.2.3 Trigger: CanSM_DeInit . . . . . . . . . . . . . . . . . . . . . 42
7.2.4 Trigger: T_START_WAKEUP_SOURCE . . . . . . . . . . . . 43
7.2.5 Trigger: T_STOP_WAKEUP_SOURCE . . . . . . . . . . . . 43
7.2.6 Trigger: T_FULL_COM_MODE_REQUEST . . . . . . . . . . 43
7.2.7 Trigger: T_SILENT_COM_MODE_REQUEST . . . . . . . . 43
7.2.8 Trigger: T_NO_COM_MODE_REQUEST . . . . . . . . . . . 43
7.2.9 Trigger: T_BUS_OFF . . . . . . . . . . . . . . . . . . . . . . 44
7.2.10 Guarding condition: G_FULL_COM_MODE_REQUESTED . 44
7.2.11 Guarding condition: G_SILENT_COM_MODE_REQUESTED 44
7.2.12 Effect: E_PRE_NOCOM . . . . . . . . . . . . . . . . . . . . 44
7.2.13 Effect: E_NOCOM . . . . . . . . . . . . . . . . . . . . . . . . 45
7.2.14 Effect: E_FULL_COM . . . . . . . . . . . . . . . . . . . . . . 45

6 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.15 Effect: E_FULL_TO_SILENT_COM . . . . . . . . . . . . . . 46


7.2.16 Effect: E_BR_END_FULL_COM . . . . . . . . . . . . . . . . 46
7.2.17 Effect: E_BR_END_SILENT_COM . . . . . . . . . . . . . . . 46
7.2.18 Effect: E_SILENT_TO_FULL_COM . . . . . . . . . . . . . . 46
7.2.19 Sub state machine CANSM_BSM_WUVALIDATION . . . . . 47
7.2.20 Sub state machine: CANSM_BSM_S_PRE_NOCOM . . . . 50
7.2.21 Sub state machine: CANSM_BSM_S_SILENTCOM_BOR . 62
7.2.22 Sub state machine: CANSM_BSM_S_PRE_FULLCOM . . . 64
7.2.23 Sub state machine CANSM_BSM_S_FULLCOM . . . . . . . 68
7.2.24 Sub state machine: CANSM_BSM_S_CHANGE_BAUDRATE 75
7.3 Error Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.3.1 Development Errors . . . . . . . . . . . . . . . . . . . . . . . 79
7.3.2 Runtime Errors . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.3.3 Transient Faults . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.3.4 Production Errors . . . . . . . . . . . . . . . . . . . . . . . . 79
7.3.5 Extended Production Errors . . . . . . . . . . . . . . . . . . . 80
7.4 ECU online active / passive mode . . . . . . . . . . . . . . . . . . . . . 80
7.5 Non-functional design rules . . . . . . . . . . . . . . . . . . . . . . . . 81
8 API specification 82
8.1 Imported types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
8.2 Type definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
8.2.1 CanSM_ConfigType . . . . . . . . . . . . . . . . . . . . . . . 82
8.2.2 CanSM_BswMCurrentStateType . . . . . . . . . . . . . . . . 83
8.3 Function definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
8.3.1 CanSM_Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
8.3.2 CanSM_DeInit . . . . . . . . . . . . . . . . . . . . . . . . . . 84
8.3.3 CanSM_RequestComMode . . . . . . . . . . . . . . . . . . . 84
8.3.4 CanSM_GetCurrentComMode . . . . . . . . . . . . . . . . . 85
8.3.5 CanSM_StartWakeupSource . . . . . . . . . . . . . . . . . . 87
8.3.6 CanSM_StopWakeupSource . . . . . . . . . . . . . . . . . . 88
8.3.7 Optional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
8.4 Call-back notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
8.4.1 CanSM_ControllerBusOff . . . . . . . . . . . . . . . . . . . . 91
8.4.2 CanSM_ControllerModeIndication . . . . . . . . . . . . . . . 92
8.4.3 CanSM_TransceiverModeIndication . . . . . . . . . . . . . . 93
8.4.4 CanSM_TxTimeoutException . . . . . . . . . . . . . . . . . . 94
8.4.5 CanSM_ClearTrcvWufFlagIndication . . . . . . . . . . . . . . 95
8.4.6 CanSM_CheckTransceiverWakeFlagIndication . . . . . . . . 95
8.4.7 CanSM_ConfirmPnAvailability . . . . . . . . . . . . . . . . . 96
8.4.8 CanSM_ConfirmCtrlPnAvailability . . . . . . . . . . . . . . . 97
8.5 Scheduled functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
8.5.1 CanSM_MainFunction . . . . . . . . . . . . . . . . . . . . . . 98
8.6 Expected interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
8.6.1 Mandatory Interfaces . . . . . . . . . . . . . . . . . . . . . . 98
8.6.2 Optional Interfaces . . . . . . . . . . . . . . . . . . . . . . . . 99

7 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

8.6.3 Configurable Interfaces . . . . . . . . . . . . . . . . . . . . . 100


9 Sequence diagrams 101
9.1 Sequence diagram CanSm_StartCanController . . . . . . . . . . . . . 101
9.2 Sequence diagram CanSm_StopCanController . . . . . . . . . . . . . 102
10 Configuration specification 103
10.1 How to read this chapter . . . . . . . . . . . . . . . . . . . . . . . . . . 103
10.2 Containers and configuration parameters . . . . . . . . . . . . . . . . . 103
10.2.1 CanSM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
10.2.2 CanSMConfiguration . . . . . . . . . . . . . . . . . . . . . . 104
10.2.3 CanSMGeneral . . . . . . . . . . . . . . . . . . . . . . . . . 105
10.2.4 CanSMManagerNetwork . . . . . . . . . . . . . . . . . . . . 108
10.2.5 CanSMDemEventParameterRefs . . . . . . . . . . . . . . . 111
10.3 Published Information . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
A Not applicable requirements 113

8 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

1 Introduction and functional overview


This specification describes the functionality, API and the configuration for the
AUTOSAR Basic Software module CAN State Manager.
The AUTOSAR BSW stack specifies for each communication bus a bus specific state
manager. This module shall implement the control flow for the respective bus. Like
shown in the figure below, the CAN State Manager (CanSM) is a member of the Com-
munication Service Layer. It interacts with the Communication Hardware Abstraction
Layer and the System Service Layer.

Figure 1.1: Layered Software Architecture from CanSM point of view

9 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

2 Acronyms and Abbreviations


The glossary below includes acronyms and abbreviations relevant to the CAN State
Manager module that are not included in the [1, AUTOSAR Glossary].

Abbreviation / Acronym: Description:


API Application Program Interface
BSW Basic Software
CAN Controller Area Network
CanIf CAN Interface
CanSM CAN State Manager
ComM Communication Manager
DEM Diagnostic Event Manager
DET Default Error Tracer
EcuM ECU State Manager
PDU Protocol Data Unit
RX Receive
TX Transmit
SchM BSW Scheduler
SWC Software Component
BswM Basic Software Mode Manager

Table 2.1: Acronyms and abbreviations used in the scope of this Document

10 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

3 Related documentation

3.1 Input documents & related standards and norms

[1] Glossary
AUTOSAR_FO_TR_Glossary
[2] General Specification of Basic Software Modules
AUTOSAR_CP_SWS_BSWGeneral
[3] Specification of ECU State Manager
AUTOSAR_CP_SWS_ECUStateManager
[4] Specification of RTE Software
AUTOSAR_CP_SWS_RTE
[5] Specification of Communication Manager
AUTOSAR_CP_SWS_COMManager
[6] Specification of CAN Interface
AUTOSAR_CP_SWS_CANInterface
[7] Specification of Diagnostic Event Manager
AUTOSAR_CP_SWS_DiagnosticEventManager
[8] Specification of Basic Software Mode Manager
AUTOSAR_CP_SWS_BSWModeManager
[9] Specification of CAN Network Management
AUTOSAR_CP_SWS_CANNetworkManagement
[10] Specification of Default Error Tracer
AUTOSAR_CP_SWS_DefaultErrorTracer
[11] Specification of CAN Transceiver Driver
AUTOSAR_CP_SWS_CANTransceiverDriver
[12] General Requirements on Basic Software Modules
AUTOSAR_CP_SRS_BSWGeneral

3.2 Related specification


AUTOSAR provides a General Specification on Basic Software modules [2, SWS BSW
General], which is also valid for CAN State Manager.
Thus, the specification SWS BSW General shall be considered as additional and re-
quired specification for CAN State Manager.

11 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4 Constraints and assumptions

4.1 Limitations
The CanSM module can be used for CAN communication only. Its task is to operate
with the CanIf module to control one or multiple underlying CAN Controllers and CAN
Transceiver Drivers. Other protocols than CAN (i.e. LIN or FlexRay) are not supported.

4.2 Applicability to car domains


The CAN State Manager module can be used for all domain applications whenever the
CAN protocol is used.

12 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

5 Dependencies to other modules


The next sections give a brief description of configuration information and services the
CanSM module requires from other modules.
«module» «module» «module» «module» «module» «module»
ComM EcuM SchM BswM Dem Det

«realize» «mandatory»

«realize»
«realize»
«use» «realize»
ComM_BusSM_ModeIndication «optional»
CanSM_EcuMWakeUpValidation
Dem_SetEventStatus

CanSM_ComM CanSM_Init CanSM BswM_CanSM_CurrentState Det_ReportError


«mandatory» «realize»
«mandatory»
«realize»
«realize» «realize» «mandatory» «optional»

«module»
CanSM

«mandatory» «realize» «mandatory» «realize»

CanSM_TxTimeoutException
CanSM_Cbk

CanIf_CanSm «optional» CanNm_ConfirmPnAvailability

«realize» «realize» «optional»

«module» «module»
CanIf CanNm

Figure 5.1: Module dependencies of the CanSM module

5.1 ECU State Manager (EcuM)


The EcuM module initializes the CanSM module and interacts with the CanSM module
for the CAN wakeup validation (refer to [3, Specification of ECU State Manager] for a
detailed specification of this module).

5.2 BSW Scheduler (SchM, part of RTE)


The BSW Scheduler module calls the main function of the CanSM module, which is
necessary for the cyclic processes of the CanSM module. Refer to [4, Specification of
RTE Software] for a detailed specification of this module.

13 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

5.3 Communication Manager (ComM)


The ComM module uses the API of the CanSM module to request communication
modes of CAN networks, which are identified with unique network handles (refer to [5,
Specification of Communication Manager] for a detailed specification of this module).
The CanSM module notifies the current communication mode of its CAN networks to
the ComM module.

5.4 CAN Interface (CanIf)


The CanSM module uses the API of the CanIf module to control the operating modes
of the CAN controllers and CAN transceivers assigned to the CAN networks (refer to
[6, Specification of CAN Interface] for a detailed specification of this module).
The CanIf module notifies the CanSM module about peripheral events.

5.5 Diagnostic Event Manager (DEM)


The CanSM module reports bus specific production errors to the DEM module (refer
to [7, Specification of Diagnostic Event Manager] for a detailed specification of this
module).

5.6 Basic Software Mode Manager (BswM)


The CanSM need to notify bus specific mode changes to the BswM module (refer to
[8, Specification of Basic Software Mode Manager] for a detailed specification of this
module).

5.7 CAN Network Management (CanNm)


The CanSM module needs to notify the partial network availability to the CanNm mod-
ule and shall handle notified CanNm timeout exceptions in case of partial networking
(refer to [9, Specification of CAN Network Management] for a detailed specification of
this module).

5.8 Default Error Tracer (DET)


The CanSM module reports development and runtime errors to the DET module.
Development Errors are only reported if development error handling is switched on by

14 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

configuration (refer to [10, Specification of Default Error Tracer] for a detailed specifi-
cation of this module).

5.9 File structure

5.9.1 Code file structure

For details refer to the chapter 5.1.6 "Code file structure" in [2, SWS BSW General].

5.9.2 Header file structure

[SWS_CanSM_00008] dThe header file CanSM.h shall export CanSM module spe-
cific types and the APIs CanSM_GetVersionInfo and CanSM_Init.c(SRS_BSW_-
00447)

5.9.3 Version check

For details refer to the chapter 5.1.8 "Version Check" in [2, SWS BSW General].

15 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

6 Requirements Tracing
The following tables reference the requirements specified in <CITA-
TIONS_OF_CONTRIBUTED_DOCUMENTS> and links to the fulfillment of these.
Please note that if column “Satisfied by” is empty for a specific requirement this means
that this requirement is not fulfilled by this document.
Requirement Description Satisfied by
[SRS_BSW_00003] All software modules shall provide [SWS_CanSM_00024] [SWS_CanSM_00374]
version and identification information
[SRS_BSW_00004] All Basic SW Modules shall perform a [SWS_CanSM_00652]
pre-processor check of the versions
of all imported include files
[SRS_BSW_00005] Modules of the µC Abstraction Layer [SWS_CanSM_00652]
(MCAL) may not have hard coded
horizontal interfaces
[SRS_BSW_00006] The source code of software modules [SWS_CanSM_00652]
above the µC Abstraction Layer
(MCAL) shall not be processor and
compiler dependent.
[SRS_BSW_00007] All Basic SW Modules written in C [SWS_CanSM_00652]
language shall conform to the MISRA
C 2012 Standard.
[SRS_BSW_00009] All Basic SW Modules shall be [SWS_CanSM_00652]
documented according to a common
standard.
[SRS_BSW_00010] The memory consumption of all Basic [SWS_CanSM_00652]
SW Modules shall be documented for
a defined configuration for all
supported platforms.
[SRS_BSW_00101] The Basic Software Module shall be [SWS_CanSM_00023]
able to initialize variables and
hardware in a separate initialization
function
[SRS_BSW_00159] All modules of the AUTOSAR Basic [SWS_CanSM_00652]
Software shall support a tool based
configuration
[SRS_BSW_00160] Configuration files of AUTOSAR [SWS_CanSM_00652]
Basic SW module shall be readable
for human beings
[SRS_BSW_00161] The AUTOSAR Basic Software shall [SWS_CanSM_00652]
provide a microcontroller abstraction
layer which provides a standardized
interface to higher software layers
[SRS_BSW_00162] The AUTOSAR Basic Software shall [SWS_CanSM_00652]
provide a hardware abstraction layer
[SRS_BSW_00164] The Implementation of interrupt [SWS_CanSM_00652]
service routines shall be done by the
Operating System, complex drivers or
modules
[SRS_BSW_00167] All AUTOSAR Basic Software [SWS_CanSM_00652]
Modules shall provide configuration
rules and constraints to enable
plausibility checks
[SRS_BSW_00168] SW components shall be tested by a [SWS_CanSM_00652]
function defined in a common API in
the Basis-SW
5

16 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_BSW_00170] The AUTOSAR SW Components [SWS_CanSM_00652]
shall provide information about their
dependency from faults, signal
qualities, driver demands
[SRS_BSW_00172] The scheduling strategy that is built [SWS_CanSM_00652]
inside the Basic Software Modules
shall be compatible with the strategy
used in the system
[SRS_BSW_00300] All AUTOSAR Basic Software [SWS_CanSM_00652]
Modules shall be identified by an
unambiguous name
[SRS_BSW_00301] All AUTOSAR Basic Software [SWS_CanSM_00652]
Modules shall only import the
necessary information
[SRS_BSW_00302] All AUTOSAR Basic Software [SWS_CanSM_00652]
Modules shall only export information
needed by other modules
[SRS_BSW_00305] Data types naming convention [SWS_CanSM_00652]
[SRS_BSW_00306] AUTOSAR Basic Software Modules [SWS_CanSM_00652]
shall be compiler and platform
independent
[SRS_BSW_00307] Global variables naming convention [SWS_CanSM_00652]
[SRS_BSW_00308] AUTOSAR Basic Software Modules [SWS_CanSM_00652]
shall not define global data in their
header files, but in the C file
[SRS_BSW_00309] All AUTOSAR Basic Software [SWS_CanSM_00652]
Modules shall indicate all global data
with read-only purposes by explicitly
assigning the const keyword
[SRS_BSW_00310] API naming convention [SWS_CanSM_00652]
[SRS_BSW_00312] Shared code shall be reentrant [SWS_CanSM_00652]
[SRS_BSW_00314] All internal driver modules shall [SWS_CanSM_00652]
separate the interrupt frame definition
from the service routine
[SRS_BSW_00318] Each AUTOSAR Basic Software [SWS_CanSM_00652]
Module file shall provide version
numbers in the header file
[SRS_BSW_00321] The version numbers of AUTOSAR [SWS_CanSM_00652]
Basic Software Modules shall be
enumerated according specific rules
[SRS_BSW_00323] All AUTOSAR Basic Software [SWS_CanSM_00652]
Modules shall check passed API
parameters for validity
[SRS_BSW_00325] The runtime of interrupt service [SWS_CanSM_00652]
routines and functions that are
running in interrupt context shall be
kept short
[SRS_BSW_00327] Error values naming convention [SWS_CanSM_00652]
[SRS_BSW_00328] All AUTOSAR Basic Software [SWS_CanSM_00652]
Modules shall avoid the duplication of
code
[SRS_BSW_00330] It shall be allowed to use macros [SWS_CanSM_00652]
instead of functions where source
code is used and runtime is critical
5

17 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_BSW_00331] All Basic Software Modules shall [SWS_CanSM_00652]
strictly separate error and status
information
[SRS_BSW_00333] For each callback function it shall be [SWS_CanSM_00064] [SWS_CanSM_00189]
specified if it is called from interrupt [SWS_CanSM_00190] [SWS_CanSM_00235]
context or not
[SRS_BSW_00334] All Basic Software Modules shall [SWS_CanSM_00652]
provide an XML file that contains the
meta data
[SRS_BSW_00335] Status values naming convention [SWS_CanSM_00652]
[SRS_BSW_00336] Basic SW module shall be able to [SWS_CanSM_00652] [SWS_CanSM_91001]
shutdown
[SRS_BSW_00337] Classification of development errors [SWS_CanSM_00654]
[SRS_BSW_00339] Reporting of production relevant error [SWS_CanSM_00652]
status
[SRS_BSW_00341] Module documentation shall contains [SWS_CanSM_00652]
all needed informations
[SRS_BSW_00342] It shall be possible to create an [SWS_CanSM_00652]
AUTOSAR ECU out of modules
provided as source code and
modules provided as object code,
even mixed
[SRS_BSW_00343] The unit of time for specification and [SWS_CanSM_00652]
configuration of Basic SW modules
shall be preferably in physical time
unit
[SRS_BSW_00346] All AUTOSAR Basic Software [SWS_CanSM_00652]
Modules shall provide at least a basic
set of module files
[SRS_BSW_00347] A Naming seperation of different [SWS_CanSM_00652]
instances of BSW drivers shall be in
place
[SRS_BSW_00348] All AUTOSAR standard types and [SWS_CanSM_00652]
constants shall be placed and
organized in a standard type header
file
[SRS_BSW_00350] All AUTOSAR Basic Software [SWS_CanSM_00652]
Modules shall allow the enabling/
disabling of detection and reporting of
development errors.
[SRS_BSW_00353] All integer type definitions of target [SWS_CanSM_00652]
and compiler specific scope shall be
placed and organized in a single type
header
[SRS_BSW_00357] For success/failure of an API call a [SWS_CanSM_00652]
standard return type shall be defined
[SRS_BSW_00358] The return type of init() functions [SWS_CanSM_00023]
implemented by AUTOSAR Basic
Software Modules shall be void
[SRS_BSW_00359] All AUTOSAR Basic Software [SWS_CanSM_00064] [SWS_CanSM_00189]
Modules callback functions shall [SWS_CanSM_00190] [SWS_CanSM_00235]
avoid return types other than void if
possible
[SRS_BSW_00360] AUTOSAR Basic Software Modules [SWS_CanSM_00652] [SWS_CanSM_00652]
callback functions are allowed to
have parameters
5

18 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_BSW_00369] All AUTOSAR Basic Software [SWS_CanSM_00652] [SWS_CanSM_00660]
Modules shall not return specific
development error codes via the API
[SRS_BSW_00373] The main processing function of each [SWS_CanSM_00652]
AUTOSAR Basic Software Module
shall be named according the defined
convention
[SRS_BSW_00374] All Basic Software Modules shall [SWS_CanSM_00652]
provide a readable module vendor
identification
[SRS_BSW_00375] Basic Software Modules shall report [SWS_CanSM_00652]
wake-up reasons
[SRS_BSW_00377] A Basic Software Module can return [SWS_CanSM_00652]
a module specific types
[SRS_BSW_00378] AUTOSAR shall provide a boolean [SWS_CanSM_00652]
type
[SRS_BSW_00379] All software modules shall provide a [SWS_CanSM_00652]
module identifier in the header file
and in the module XML description
file.
[SRS_BSW_00380] Configuration parameters being [SWS_CanSM_00652]
stored in memory shall be placed into
separate c-files
[SRS_BSW_00383] The Basic Software Module [SWS_CanSM_00652]
specifications shall specify which
other configuration files from other
modules they use at least in the
description
[SRS_BSW_00384] The Basic Software Module [SWS_CanSM_00652]
specifications shall specify at least in
the description which other modules
they require
[SRS_BSW_00385] List possible error notifications [SWS_CanSM_00652]
[SRS_BSW_00386] The BSW shall specify the [SWS_CanSM_00652]
configuration and conditions for
detecting an error
[SRS_BSW_00388] Containers shall be used to group [SWS_CanSM_00652]
configuration parameters that are
defined for the same object
[SRS_BSW_00389] Containers shall have names [SWS_CanSM_00652]
[SRS_BSW_00390] Parameter content shall be unique [SWS_CanSM_00652]
within the module
[SRS_BSW_00392] Parameters shall have a type [SWS_CanSM_00652]
[SRS_BSW_00393] Parameters shall have a range [SWS_CanSM_00652]
[SRS_BSW_00394] The Basic Software Module [SWS_CanSM_00652]
specifications shall specify the scope
of the configuration parameters
[SRS_BSW_00395] The Basic Software Module [SWS_CanSM_00652]
specifications shall list all
configuration parameter
dependencies
5

19 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_BSW_00396] The Basic Software Module [SWS_CanSM_00652]
specifications shall specify the
supported configuration classes for
changing values and multiplicities for
each parameter/container
[SRS_BSW_00397] The configuration parameters in [SWS_CanSM_00652]
pre-compile time are fixed before
compilation starts
[SRS_BSW_00398] The link-time configuration is [SWS_CanSM_00652]
achieved on object code basis in the
stage after compiling and before
linking
[SRS_BSW_00399] Parameter-sets shall be located in a [SWS_CanSM_00652]
separate segment and shall be
loaded after the code
[SRS_BSW_00400] Parameter shall be selected from [SWS_CanSM_00023] [SWS_CanSM_00597]
multiple sets of parameters after code [SWS_CanSM_00652]
has been loaded and started
[SRS_BSW_00401] Documentation of multiple instances [SWS_CanSM_00652]
of configuration parameters shall be
available
[SRS_BSW_00402] Each module shall provide version [SWS_CanSM_00652]
information
[SRS_BSW_00404] BSW Modules shall support [SWS_CanSM_00023]
post-build configuration
[SRS_BSW_00405] BSW Modules shall support multiple [SWS_CanSM_00023]
configuration sets
[SRS_BSW_00406] A static status variable denoting if a [SWS_CanSM_00023] [SWS_CanSM_00184]
BSW module is initialized shall be
initialized with value 0 before any
APIs of the BSW module is called
[SRS_BSW_00407] Each BSW module shall provide a [SWS_CanSM_00024] [SWS_CanSM_00374]
function to read out the version
information of a dedicated module
implementation
[SRS_BSW_00408] All AUTOSAR Basic Software [SWS_CanSM_00652]
Modules configuration parameters
shall be named according to a
specific naming rule
[SRS_BSW_00409] All production code error ID symbols [SWS_CanSM_00652]
are defined by the Dem module and
shall be retrieved by the other BSW
modules from Dem configuration
[SRS_BSW_00410] Compiler switches shall have defined [SWS_CanSM_00652]
values
[SRS_BSW_00411] All AUTOSAR Basic Software [SWS_CanSM_00652]
Modules shall apply a naming rule for
enabling/disabling the existence of
the API
[SRS_BSW_00413] An index-based accessing of the [SWS_CanSM_00652]
instances of BSW modules shall be
done
[SRS_BSW_00414] Init functions shall have a pointer to a [SWS_CanSM_00023]
configuration structure as single
parameter
5

20 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_BSW_00415] Interfaces which are provided [SWS_CanSM_00652]
exclusively for one module shall be
separated into a dedicated header file
[SRS_BSW_00416] The sequence of modules to be [SWS_CanSM_00652]
initialized shall be configurable
[SRS_BSW_00417] Software which is not part of the [SWS_CanSM_00652]
SW-C shall report error events only
after the Dem is fully operational.
[SRS_BSW_00419] If a pre-compile time configuration [SWS_CanSM_00652]
parameter is implemented as const
it should be placed into a separate
c-file
[SRS_BSW_00422] Pre-de-bouncing of error status [SWS_CanSM_00498] [SWS_CanSM_00522]
information is done within the Dem [SWS_CanSM_00605] [SWS_CanSM_00652]
[SRS_BSW_00423] BSW modules with AUTOSAR [SWS_CanSM_00652]
interfaces shall be describable with
the means of the SW-C Template
[SRS_BSW_00424] BSW module main processing [SWS_CanSM_00065] [SWS_CanSM_00167]
functions shall not be allowed to enter
a wait state
[SRS_BSW_00425] The BSW module description [SWS_CanSM_00065] [SWS_CanSM_00167]
template shall provide means to
model the defined trigger conditions
of schedulable objects
[SRS_BSW_00426] BSW Modules shall ensure data [SWS_CanSM_00652]
consistency of data which is shared
between BSW modules
[SRS_BSW_00427] ISR functions shall be defined and [SWS_CanSM_00652]
documented in the BSW module
description template
[SRS_BSW_00428] A BSW module shall state if its main [SWS_CanSM_00652]
processing function(s) has to be
executed in a specific order or
sequence
[SRS_BSW_00429] Access to OS is restricted [SWS_CanSM_00652]
[SRS_BSW_00432] Modules should have separate main [SWS_CanSM_00652]
processing functions for read/receive
and write/transmit data path
[SRS_BSW_00433] Main processing functions are only [SWS_CanSM_00652]
allowed to be called from task bodies
provided by the BSW Scheduler
[SRS_BSW_00437] Memory mapping shall provide the [SWS_CanSM_00652]
possibility to define RAM segments
which are not to be initialized during
startup
[SRS_BSW_00438] Configuration data shall be defined in [SWS_CanSM_00023] [SWS_CanSM_00597]
a structure [SWS_CanSM_00652]
[SRS_BSW_00439] Enable BSW modules to handle [SWS_CanSM_00652]
interrupts
[SRS_BSW_00440] The callback function invocation by [SWS_CanSM_00652]
the BSW module shall follow the
signature provided by RTE to invoke
servers via Rte_Call API
[SRS_BSW_00441] Naming convention for type, macro [SWS_CanSM_00652]
and function
5

21 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_BSW_00447] Standardizing Include file structure of [SWS_CanSM_00008]
BSW Modules Implementing Autosar
Service
[SRS_BSW_00448] Module SWS shall not contain [SWS_CanSM_00652]
requirements from other modules
[SRS_BSW_00449] BSW Service APIs used by Autosar [SWS_CanSM_00652]
Application Software shall return a
Std_ReturnType
[SRS_BSW_00450] A Main function of a un-initialized [SWS_CanSM_00652]
module shall return immediately
[SRS_BSW_00451] Hardware registers shall be protected [SWS_CanSM_00652]
if concurrent access to these
registers occur
[SRS_BSW_00452] Classification of runtime errors [SWS_CanSM_00652]
[SRS_BSW_00453] BSW Modules shall be harmonized [SWS_CanSM_00652]
[SRS_BSW_00454] An alternative interface without a [SWS_CanSM_00652]
parameter of category DATA_
REFERENCE shall be available.
[SRS_BSW_00456] A Header file shall be defined in order [SWS_CanSM_00652]
to harmonize BSW Modules
[SRS_BSW_00457] Callback functions of Application [SWS_CanSM_00652]
software components shall be
invoked by the Basis SW
[SRS_BSW_00458] Classification of production errors [SWS_CanSM_00652]
[SRS_BSW_00459] It shall be possible to concurrently [SWS_CanSM_00652]
execute a service offered by a BSW
module in different partitions
[SRS_BSW_00460] Reentrancy Levels [SWS_CanSM_00652]
[SRS_BSW_00461] Modules called by generic modules [SWS_CanSM_00652]
shall satisfy all interfaces requested
by the generic module
[SRS_BSW_00462] All Standardized Autosar Interfaces [SWS_CanSM_00652]
shall have unique requirement Id /
number
[SRS_BSW_00463] Naming convention of callout [SWS_CanSM_00652]
prototypes
[SRS_BSW_00465] It shall not be allowed to name any [SWS_CanSM_00652]
two files so that they only differ by the
cases of their letters
[SRS_BSW_00466] Classification of extended production [SWS_CanSM_00652] [SWS_CanSM_00664]
errors
[SRS_BSW_00467] The init / deinit services shall only be [SWS_CanSM_00652]
called by BswM or EcuM
[SRS_BSW_00469] Fault detection and healing of [SWS_CanSM_00652]
production errors and extended
production errors
[SRS_BSW_00470] Execution frequency of production [SWS_CanSM_00652]
error detection
[SRS_BSW_00471] Do not cause dead-locks on detection [SWS_CanSM_00652]
of production errors - the ability to
heal from previously detected
production errors
[SRS_BSW_00472] Avoid detection of two production [SWS_CanSM_00652]
errors with the same root cause.
5

22 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_Can_01001] The CAN Interface implementation [SWS_CanSM_00652]
and interface shall be independent
from underlying CAN Controller and
CAN Transceiver
[SRS_Can_01002] The CAN Interface shall be [SWS_CanSM_00652]
responsible for the dispatching of the
received PDUs
[SRS_Can_01003] The appropriate higher [SWS_CanSM_00652]
communication stack shall be notified
by the CAN Interface about an
occurred reception
[SRS_Can_01004] Software filtering shall be [SWS_CanSM_00652]
implemented by the CAN Interface
[SRS_Can_01005] The CAN Interface shall perform a [SWS_CanSM_00652]
check for correct DLC of received
PDUs
[SRS_Can_01006] The CAN Interface shall provide a [SWS_CanSM_00652]
service to enable/disable L-PDU
reception per CAN Controller
[SRS_Can_01007] The CAN Interface shall dispatch the [SWS_CanSM_00652]
transmission request by an upper
layer module to the desired CAN
controller
[SRS_Can_01008] The CAN Interface shall provide a [SWS_CanSM_00652]
transmission request service
[SRS_Can_01009] The CAN Interface shall provide a [SWS_CanSM_00652]
transmission confirmation dispatcher
[SRS_Can_01011] The CAN Interface shall provide a [SWS_CanSM_00652]
transmit buffer
[SRS_Can_01013] The CAN Interface shall provide a [SWS_CanSM_00652]
Tx-L-PDU enable/disable service per
CAN Controller
[SRS_Can_01014] The CAN State Manager shall offer a [SWS_CanSM_00652]
network configuration independent
interface for upper layers
[SRS_Can_01015] The CAN Interface configuration shall [SWS_CanSM_00652]
be able to import information from
CAN communication matrix.
[SRS_Can_01016] The CAN Interface shall have an [SWS_CanSM_00652]
interface to the static configuration
information of the CAN Driver
[SRS_Can_01018] The CAN Interface shall have an [SWS_CanSM_00652]
interface to the static configuration
information of the CAN Driver
[SRS_Can_01020] The TX-Buffer shall be statically [SWS_CanSM_00652]
configurable
[SRS_Can_01021] CAN The CAN Interface shall [SWS_CanSM_00652]
implement an interface for
initialization
[SRS_Can_01022] The CAN Interface shall support the [SWS_CanSM_00652]
selection of configuration sets
[SRS_Can_01023] The CAN Interface shall be initialized [SWS_CanSM_00652]
in a defined way.
[SRS_Can_01027] The CAN Interface shall provide a [SWS_CanSM_00652]
service to change the CAN Controller
mode.
5

23 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_Can_01028] The CAN Interface shall provide a [SWS_CanSM_00652]
service to query the CAN controller
state
[SRS_Can_01029] The CAN Interface shall report [SWS_CanSM_00652]
bus-off state of a device to an upper
layer
[SRS_Can_01032] The CAN Interface shall report a [SWS_CanSM_00652]
wake-up notification to the ECU State
Manager
[SRS_Can_01033] The CAN Driver shall fulfill the [SWS_CanSM_00652]
general requirements for Basic
Software Modules as specified in
AUTOSAR_SRS_SPAL
[SRS_Can_01034] The CAN Driver shall offer a [SWS_CanSM_00652]
Hardware independent interface.
[SRS_Can_01035] The CAN Driver shall support multiple [SWS_CanSM_00652]
CAN controllers of the same CAN
hardware unit
[SRS_Can_01036] The Can Driver shall support [SWS_CanSM_00652]
Standard Identifier and Extended
Identifier
[SRS_Can_01037] The CAN driver shall allow the static [SWS_CanSM_00652]
configuration of the hardware
reception filter
[SRS_Can_01038] The bit timing of each CAN Controller [SWS_CanSM_00652]
shall be configurable
[SRS_Can_01039] Hardware Object Handles shall be [SWS_CanSM_00652]
provided for the CAN Interface in the
static configuration file.
[SRS_Can_01041] The CAN Driver shall implement an [SWS_CanSM_00652]
interface for initialization
[SRS_Can_01042] The CAN Driver shall support [SWS_CanSM_00652]
dynamic selection of configuration
sets
[SRS_Can_01043] The CAN Driver shall provide a [SWS_CanSM_00652]
service to enable/disable interrupts of
the CAN Controller.
[SRS_Can_01045] The CAN Driver shall offer a [SWS_CanSM_00652]
reception indication service.
[SRS_Can_01049] The CAN Driver shall provide a [SWS_CanSM_00652]
dynamic transmission request service
[SRS_Can_01051] The CAN Driver shall provide a [SWS_CanSM_00652]
transmission confirmation service
[SRS_Can_01053] The CAN Driver shall provide a [SWS_CanSM_00652]
service to change the CAN controller
mode.
[SRS_Can_01054] The CAN Driver shall provide a [SWS_CanSM_00652]
notification for controller wake-up
events
[SRS_Can_01055] CAN Driver shall provide a [SWS_CanSM_00652]
notification for bus-off state
[SRS_Can_01058] shall be configurable whether [SWS_CanSM_00652]
Multiplex Transmission is used
[SRS_Can_01059] The CAN Driver shall guarantee data [SWS_CanSM_00652]
consistency of received L-PDUs
5

24 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_Can_01060] The CAN driver shall not recover from [SWS_CanSM_00652]
bus-off automatically
[SRS_Can_01061] The CAN Interface shall provide [SWS_CanSM_00652]
dynamic TX Handles
[SRS_Can_01062] Each event for each CAN Controller [SWS_CanSM_00652]
shall be configurable to be detected
by polling or by an interrupt
[SRS_Can_01065] The AUTOSAR CAN Transport Layer [SWS_CanSM_00652]
shall be based on ISO 15765-2 and
15765-4 specifications
[SRS_Can_01066] The AUTOSAR CAN Transport Layer [SWS_CanSM_00652]
shall be statically configurable to
support either single or multiple
connections in an optimizing way
[SRS_Can_01068] The CAN Transport Layer shall [SWS_CanSM_00652]
identify each N-SDU with a unique
identifier.
[SRS_Can_01069] CAN address information and N-SDU [SWS_CanSM_00652]
identifier mapping
[SRS_Can_01071] The CAN Transport Layer shall [SWS_CanSM_00652]
identify each N-PDU (also called
L-SDU) with a unique identifier
[SRS_Can_01073] The CAN Transport Layer shall be [SWS_CanSM_00652]
statically configured to pad unused
bytes of PDU
[SRS_Can_01074] The Transport connection properties [SWS_CanSM_00652]
shall be statically configured
[SRS_Can_01075] The CAN Transport Layer shall [SWS_CanSM_00652]
implement an interface for
initialization
[SRS_Can_01076] The CAN Transport Layer services [SWS_CanSM_00652]
shall not be operational before
initializing the module
[SRS_Can_01078] The AUTOSAR CAN Transport Layer [SWS_CanSM_00652]
shall support the ISO 15765-2
addressing formats
[SRS_Can_01079] The CAN Transport Layer shall be [SWS_CanSM_00652]
compliant with the CAN Interface
module notifications
[SRS_Can_01081] The value of CAN Transport protocol [SWS_CanSM_00652]
timeouts shall be statically
configurable for each connection
[SRS_Can_01082] Error handling [SWS_CanSM_00652]
[SRS_Can_01086] Data padding value of unused bytes [SWS_CanSM_00652]
[SRS_Can_01090] The bus transceiver driver package [SWS_CanSM_00652]
shall offer configuration parameters
that are needed to configure the
driver for a given bus and the
supported notifications
[SRS_Can_01091] The CAN bus transceiver driver shall [SWS_CanSM_00652]
support the configuration for more
than one bus
5

25 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_Can_01095] The bus transceiver driver shall [SWS_CanSM_00652]
support the compile time
configuration of one notification to an
upper layer for change notification for
"wakeup by bus" events
[SRS_Can_01096] The bus transceiver driver shall [SWS_CanSM_00652]
provide an API to initialize the driver
internally
[SRS_Can_01097] CAN Bus Transceiver driver API shall [SWS_CanSM_00652]
be synchronous
[SRS_Can_01098] The bus transceiver driver shall [SWS_CanSM_00652]
support an API to send the addressed
transceiver into its Standby mode
[SRS_Can_01099] The bus transceiver driver shall [SWS_CanSM_00652]
support an API to send the addressed
transceiver into its Sleep mode
[SRS_Can_01100] The bus transceiver driver shall [SWS_CanSM_00652]
support an API to send the addressed
transceiver into its Normal mode
[SRS_Can_01101] The bus transceiver driver shall [SWS_CanSM_00652]
support an API to read out the current
operation mode of the transceiver of
a specified bus within the ECU
[SRS_Can_01103] The bus transceiver driver shall [SWS_CanSM_00652]
support an API to read out the reason
of the last wakeup of a specified bus
within the ECU
[SRS_Can_01107] The CAN Transceiver Driver shall [SWS_CanSM_00652]
support the situation where a wakeup
by bus occurs during the same time
the transition to standby/sleep is in
progress
[SRS_Can_01108] The bus transceiver driver shall [SWS_CanSM_00652]
support the AUTOSAR ECU state
manager in a way that a safe system
startup and shutdown is possible
[SRS_Can_01109] The bus transceiver driver shall check [SWS_CanSM_00652]
the control communication to the
transceiver and the reaction of the
transceiver for correctness
[SRS_Can_01110] CAN Bus Transceiver driver shall [SWS_CanSM_00652]
handle the transceiver specific timing
requirements internally
[SRS_Can_01111] The CAN Transport Layer shall be the [SWS_CanSM_00652]
interface layer between PDU Router
and CAN Interface for CAN
messages needing transport protocol
functionalities
[SRS_Can_01112] The CAN Transport Layer interface [SWS_CanSM_00652]
shall be independent of its internal
communication configuration
[SRS_Can_01114] Data Consistency of L-PDUs to [SWS_CanSM_00652]
transmit shall be guaranteed
[SRS_Can_01115] The bus transceiver driver shall [SWS_CanSM_00652]
support an API to enable and disable
the wakeup notification for each bus
separately
5

26 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_Can_01116] The AUTOSAR CAN Transport Layer [SWS_CanSM_00652]
shall be able to manage both normal
and extended modes in parallel
[SRS_Can_01121] CAN Interface shall be the interface [SWS_CanSM_00652]
layer between the underlying CAN
Driver(s) and CAN transceiver
Driver(s) and Upper Layers
[SRS_Can_01122] The CAN driver shall support the [SWS_CanSM_00652]
situation where a wakeup by bus
occurs during the same time the
transition to standby/sleep is in
progress
[SRS_Can_01125] The CAN stack shall ensure not to [SWS_CanSM_00652]
lose messages in receive direction
[SRS_Can_01126] The CAN stack shall be able to [SWS_CanSM_00652]
produce 100% bus load
[SRS_Can_01129] The CAN Interface module shall [SWS_CanSM_00652]
provide a procedural interface to read
out data of single CAN messages by
upper layers (Polling mechanism)
[SRS_Can_01130] Receive Status Interface of CAN [SWS_CanSM_00652]
Interface
[SRS_Can_01131] The CAN Interface module shall [SWS_CanSM_00652]
provide the possibility to have polling
and callback notification mechanism
in parallel
[SRS_Can_01132] The CAN driver shall be able to [SWS_CanSM_00652]
detect notification events message
object specific by CAN-Interrupt and
polling
[SRS_Can_01134] The CAN Driver shall support [SWS_CanSM_00652]
multiplexed transmission
[SRS_Can_01135] It shall be possible to configure one [SWS_CanSM_00652]
or several TX Hardware Objects
[SRS_Can_01136] The CAN Interface module shall [SWS_CanSM_00652]
provide a service to check for
validation of a CAN wake-up event
[SRS_Can_01138] The CAN Bus Transceiver Driver shall [SWS_CanSM_00652]
provide one callback function for
lower layer ICU Driver for wake up by
bus events
[SRS_Can_01139] The CAN Interface and Driver shall [SWS_CanSM_00652]
offer a CAN Controller specific
interface for initialization
[SRS_Can_01140] The CAN Interface shall support both [SWS_CanSM_00652]
Standard (11bit) and Extended (29bit)
Identifiers
[SRS_Can_01141] The CAN Interface shall support both [SWS_CanSM_00652]
Standard (11bit) and Extended (29bit)
Identifiers at same time on one
network
5

27 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_Can_01142] The CAN State Manager shall offer a [SWS_CanSM_00062] [SWS_CanSM_00065]
network abstract API to upper layer [SWS_CanSM_00167] [SWS_CanSM_00182]
[SWS_CanSM_00183] [SWS_CanSM_00186]
[SWS_CanSM_00187] [SWS_CanSM_00188]
[SWS_CanSM_00266] [SWS_CanSM_00278]
[SWS_CanSM_00282] [SWS_CanSM_00284]
[SWS_CanSM_00360] [SWS_CanSM_00369]
[SWS_CanSM_00370] [SWS_CanSM_00371]
[SWS_CanSM_00372] [SWS_CanSM_00385]
[SWS_CanSM_00399] [SWS_CanSM_00410]
[SWS_CanSM_00422] [SWS_CanSM_00423]
[SWS_CanSM_00425] [SWS_CanSM_00426]
[SWS_CanSM_00427] [SWS_CanSM_00428]
[SWS_CanSM_00429] [SWS_CanSM_00430]
[SWS_CanSM_00431] [SWS_CanSM_00432]
[SWS_CanSM_00433] [SWS_CanSM_00434]
[SWS_CanSM_00436] [SWS_CanSM_00437]
[SWS_CanSM_00438] [SWS_CanSM_00439]
[SWS_CanSM_00440] [SWS_CanSM_00441]
[SWS_CanSM_00442] [SWS_CanSM_00443]
[SWS_CanSM_00444] [SWS_CanSM_00445]
[SWS_CanSM_00446] [SWS_CanSM_00447]
[SWS_CanSM_00448] [SWS_CanSM_00449]
[SWS_CanSM_00450] [SWS_CanSM_00451]
[SWS_CanSM_00452] [SWS_CanSM_00453]
[SWS_CanSM_00454] [SWS_CanSM_00455]
[SWS_CanSM_00456] [SWS_CanSM_00457]
[SWS_CanSM_00458] [SWS_CanSM_00459]
[SWS_CanSM_00460] [SWS_CanSM_00461]
[SWS_CanSM_00462] [SWS_CanSM_00464]
[SWS_CanSM_00465] [SWS_CanSM_00466]
[SWS_CanSM_00467] [SWS_CanSM_00468]
[SWS_CanSM_00469] [SWS_CanSM_00470]
[SWS_CanSM_00471] [SWS_CanSM_00472]
[SWS_CanSM_00473] [SWS_CanSM_00474]
[SWS_CanSM_00475] [SWS_CanSM_00476]
[SWS_CanSM_00477] [SWS_CanSM_00478]
[SWS_CanSM_00479] [SWS_CanSM_00483]
[SWS_CanSM_00484] [SWS_CanSM_00485]
[SWS_CanSM_00486] [SWS_CanSM_00487]
[SWS_CanSM_00488] [SWS_CanSM_00489]
[SWS_CanSM_00490] [SWS_CanSM_00491]
[SWS_CanSM_00492] [SWS_CanSM_00493]
[SWS_CanSM_00494] [SWS_CanSM_00496]
[SWS_CanSM_00497] [SWS_CanSM_00499]
[SWS_CanSM_00500] [SWS_CanSM_00502]
[SWS_CanSM_00503] [SWS_CanSM_00504]
[SWS_CanSM_00505] [SWS_CanSM_00506]
[SWS_CanSM_00507] [SWS_CanSM_00508]
[SWS_CanSM_00509] [SWS_CanSM_00510]
[SWS_CanSM_00511] [SWS_CanSM_00512]
[SWS_CanSM_00514] [SWS_CanSM_00515]
[SWS_CanSM_00517] [SWS_CanSM_00518]
[SWS_CanSM_00521] [SWS_CanSM_00524]
[SWS_CanSM_00525] [SWS_CanSM_00526]
[SWS_CanSM_00527] [SWS_CanSM_00528]
[SWS_CanSM_00529] [SWS_CanSM_00530]
[SWS_CanSM_00531] [SWS_CanSM_00532]
[SWS_CanSM_00533] [SWS_CanSM_00534]
[SWS_CanSM_00535] [SWS_CanSM_00538]
[SWS_CanSM_00540] [SWS_CanSM_00541]
[SWS_CanSM_00542] [SWS_CanSM_00543]
[SWS_CanSM_00550] [SWS_CanSM_00555]
5

28 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
4
[SWS_CanSM_00556] [SWS_CanSM_00557]
[SWS_CanSM_00558] [SWS_CanSM_00561]
[SWS_CanSM_00569] [SWS_CanSM_00570]
[SWS_CanSM_00576] [SWS_CanSM_00577]
[SWS_CanSM_00578] [SWS_CanSM_00579]
[SWS_CanSM_00580] [SWS_CanSM_00581]
[SWS_CanSM_00582] [SWS_CanSM_00584]
[SWS_CanSM_00600] [SWS_CanSM_00602]
[SWS_CanSM_00603] [SWS_CanSM_00604]
[SWS_CanSM_00607] [SWS_CanSM_00608]
[SWS_CanSM_00623] [SWS_CanSM_00624]
[SWS_CanSM_00625] [SWS_CanSM_00626]
[SWS_CanSM_00627] [SWS_CanSM_00628]
[SWS_CanSM_00629] [SWS_CanSM_00630]
[SWS_CanSM_00631] [SWS_CanSM_00632]
[SWS_CanSM_00633] [SWS_CanSM_00634]
[SWS_CanSM_00635] [SWS_CanSM_00636]
[SWS_CanSM_00639] [SWS_CanSM_00641]
[SWS_CanSM_00642] [SWS_CanSM_00651]
[SWS_CanSM_00653] [SWS_CanSM_00667]
[SRS_Can_01143] The CAN State Manager shall [SWS_CanSM_00652]
support a configurable BusOff
recovery time
[SRS_Can_01144] The CAN State Manager shall [SWS_CanSM_00600] [SWS_CanSM_00602]
implement an interface for [SWS_CanSM_00603] [SWS_CanSM_00604]
initialization. [SWS_CanSM_00606] [SWS_CanSM_00637]
[SRS_Can_01145] The CAN State Manager shall control [SWS_CanSM_00062] [SWS_CanSM_00065]
the assigned CAN Devices [SWS_CanSM_00167] [SWS_CanSM_00182]
[SWS_CanSM_00183] [SWS_CanSM_00369]
[SWS_CanSM_00370] [SWS_CanSM_00396]
[SWS_CanSM_00397] [SWS_CanSM_00398]
[SWS_CanSM_00399] [SWS_CanSM_00400]
[SWS_CanSM_00401] [SWS_CanSM_00410]
[SWS_CanSM_00411] [SWS_CanSM_00412]
[SWS_CanSM_00413] [SWS_CanSM_00414]
[SWS_CanSM_00415] [SWS_CanSM_00416]
[SWS_CanSM_00417] [SWS_CanSM_00418]
[SWS_CanSM_00419] [SWS_CanSM_00420]
[SWS_CanSM_00421] [SWS_CanSM_00423]
[SWS_CanSM_00425] [SWS_CanSM_00426]
[SWS_CanSM_00427] [SWS_CanSM_00428]
[SWS_CanSM_00429] [SWS_CanSM_00430]
[SWS_CanSM_00431] [SWS_CanSM_00432]
[SWS_CanSM_00433] [SWS_CanSM_00434]
[SWS_CanSM_00436] [SWS_CanSM_00437]
[SWS_CanSM_00438] [SWS_CanSM_00439]
[SWS_CanSM_00440] [SWS_CanSM_00441]
[SWS_CanSM_00442] [SWS_CanSM_00443]
[SWS_CanSM_00444] [SWS_CanSM_00445]
[SWS_CanSM_00446] [SWS_CanSM_00447]
[SWS_CanSM_00448] [SWS_CanSM_00449]
[SWS_CanSM_00450] [SWS_CanSM_00451]
[SWS_CanSM_00452] [SWS_CanSM_00453]
[SWS_CanSM_00454] [SWS_CanSM_00455]
[SWS_CanSM_00456] [SWS_CanSM_00457]
[SWS_CanSM_00458] [SWS_CanSM_00459]
[SWS_CanSM_00460] [SWS_CanSM_00461]
[SWS_CanSM_00462] [SWS_CanSM_00464]
[SWS_CanSM_00465] [SWS_CanSM_00466]
[SWS_CanSM_00467] [SWS_CanSM_00468]
5

29 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
4
[SWS_CanSM_00469] [SWS_CanSM_00470]
[SWS_CanSM_00471] [SWS_CanSM_00472]
[SWS_CanSM_00473] [SWS_CanSM_00474]
[SWS_CanSM_00475] [SWS_CanSM_00476]
[SWS_CanSM_00477] [SWS_CanSM_00478]
[SWS_CanSM_00479] [SWS_CanSM_00483]
[SWS_CanSM_00484] [SWS_CanSM_00485]
[SWS_CanSM_00486] [SWS_CanSM_00487]
[SWS_CanSM_00488] [SWS_CanSM_00489]
[SWS_CanSM_00490] [SWS_CanSM_00491]
[SWS_CanSM_00492] [SWS_CanSM_00493]
[SWS_CanSM_00494] [SWS_CanSM_00496]
[SWS_CanSM_00497] [SWS_CanSM_00499]
[SWS_CanSM_00500] [SWS_CanSM_00507]
[SWS_CanSM_00508] [SWS_CanSM_00509]
[SWS_CanSM_00510] [SWS_CanSM_00511]
[SWS_CanSM_00512] [SWS_CanSM_00514]
[SWS_CanSM_00515] [SWS_CanSM_00517]
[SWS_CanSM_00518] [SWS_CanSM_00521]
[SWS_CanSM_00524] [SWS_CanSM_00525]
[SWS_CanSM_00526] [SWS_CanSM_00527]
[SWS_CanSM_00528] [SWS_CanSM_00529]
[SWS_CanSM_00531] [SWS_CanSM_00532]
[SWS_CanSM_00533] [SWS_CanSM_00534]
[SWS_CanSM_00535] [SWS_CanSM_00538]
[SWS_CanSM_00540] [SWS_CanSM_00541]
[SWS_CanSM_00542] [SWS_CanSM_00543]
[SWS_CanSM_00546] [SWS_CanSM_00550]
[SWS_CanSM_00555] [SWS_CanSM_00556]
[SWS_CanSM_00557] [SWS_CanSM_00558]
[SWS_CanSM_00560] [SWS_CanSM_00576]
[SWS_CanSM_00577] [SWS_CanSM_00578]
[SWS_CanSM_00579] [SWS_CanSM_00580]
[SWS_CanSM_00581] [SWS_CanSM_00582]
[SWS_CanSM_00584] [SWS_CanSM_00600]
[SWS_CanSM_00602] [SWS_CanSM_00603]
[SWS_CanSM_00604] [SWS_CanSM_00607]
[SWS_CanSM_00608] [SWS_CanSM_00609]
[SWS_CanSM_00610] [SWS_CanSM_00611]
[SWS_CanSM_00612] [SWS_CanSM_00613]
[SWS_CanSM_00616] [SWS_CanSM_00617]
[SWS_CanSM_00618] [SWS_CanSM_00619]
[SWS_CanSM_00620] [SWS_CanSM_00621]
[SWS_CanSM_00622] [SWS_CanSM_00623]
[SWS_CanSM_00624] [SWS_CanSM_00625]
[SWS_CanSM_00626] [SWS_CanSM_00627]
[SWS_CanSM_00628] [SWS_CanSM_00629]
[SWS_CanSM_00630] [SWS_CanSM_00631]
[SWS_CanSM_00632] [SWS_CanSM_00633]
[SWS_CanSM_00634] [SWS_CanSM_00636]
[SWS_CanSM_00638] [SWS_CanSM_00639]
[SWS_CanSM_00641] [SWS_CanSM_00642]
[SWS_CanSM_00651] [SWS_CanSM_00653]
[SWS_CanSM_00668] [SWS_CanSM_00669]
[SWS_CanSM_00670] [SWS_CanSM_91004]
[SRS_Can_01146] The CAN State Manager shall contain [SWS_CanSM_00600] [SWS_CanSM_00602]
a CAN BusOff recovery algorithm for [SWS_CanSM_00603] [SWS_CanSM_00604]
each used CAN Controller [SWS_CanSM_00606] [SWS_CanSM_00637]
[SRS_Can_01147] The CAN Driver shall not support [SWS_CanSM_00652]
remote frames
5

30 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_Can_01148] The AUTOSAR CAN Transport Layer [SWS_CanSM_00652]
shall provide a service to enable
dynamic setting of protocol
parameters
[SRS_Can_01149] The CAN Transport Layer shall [SWS_CanSM_00652]
support full-duplex communication for
TP channels
[SRS_Can_01151] The CAN Interface shall provide a [SWS_CanSM_00652]
service to check for a CAN Wake-up
event.
[SRS_Can_01153] The Tx-Filter shall ensure, that the [SWS_CanSM_00652]
first message which is sent on the
bus is a Wakeup Frame (WUF) in the
case of partial networking
[SRS_Can_01154] The bus transceiver driver package [SWS_CanSM_00652]
shall offer configuration parameters
that are required to configure the
driver for partial networking
[SRS_Can_01155] The bus transceiver driver shall [SWS_CanSM_00652]
support the selection of configuration
sets
[SRS_Can_01156] The bus transceiver driver shall [SWS_CanSM_00652]
support wake up events by a Remote
Wake-up Pattern (RWUP) or Remote
Wake-up Frame (RWUF) if partial
networking is supported by the
tranceiver hardware
[SRS_Can_01157] The bus transceiver driver shall [SWS_CanSM_00652]
provide an API for clearing the WUF
bit in the tranceiver hardware
[SRS_Can_01158] The CAN stack shall provide a TX [SWS_CanSM_00435] [SWS_CanSM_00516]
offline active mode for ECU passive [SWS_CanSM_00539] [SWS_CanSM_00644]
mode [SWS_CanSM_00645] [SWS_CanSM_00646]
[SWS_CanSM_00647] [SWS_CanSM_00648]
[SWS_CanSM_00649] [SWS_CanSM_00650]
[SWS_CanSM_00656]
[SRS_Can_01159] The CAN Interface shall provide [SWS_CanSM_00652]
dynamic RX Handles
[SRS_Can_01160] Padding of bytes due to discrete CAN [SWS_CanSM_00652]
FD DLC
[SRS_Can_01161] The CAN Driver shall not support [SWS_CanSM_00652]
remote frames
[SRS_Can_01162] CAN Interface shall support classic [SWS_CanSM_00652]
CAN and CAN FD frames
[SRS_Can_01163] The AUTOSAR CAN Transport Layer [SWS_CanSM_00652]
shall support classic CAN and CAN
FD communication as specified by
ISO 15765-2
[SRS_Can_01164] The CAN State Manager shall [SWS_CanSM_00658] [SWS_CanSM_91001]
implement an interface for
de-initialization.
[SRS_ModeMgm_- The Communication Manager shall [SWS_CanSM_00652]
00049] initiate the wake-up and keep awake
physical channels
[SRS_ModeMgm_- The number and names of main [SWS_CanSM_00652]
09001] states and the transitions between
main states shall be standardized.
5

31 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_ModeMgm_- The ECU State Manager shall [SWS_CanSM_00652]
09009] provide the ability to execute external,
statically-configured code at each
transition between ECU states
[SRS_ModeMgm_- The ECU State Manager shall [SWS_CanSM_00652]
09017] provide an API to query the current
ECU state
[SRS_ModeMgm_- The Watchdog Manager shall support [SWS_CanSM_00652]
09028] multiple watchdog instances
[SRS_ModeMgm_- It shall be possible to limit [SWS_CanSM_00652]
09071] communication modes independently
for each physical channel
[SRS_ModeMgm_- ECU shutdown shall be forced [SWS_CanSM_00652]
09072]
[SRS_ModeMgm_- The Communication Manager shall [SWS_CanSM_00652]
09078] coordinate multiple communication
requests
[SRS_ModeMgm_- Each physical channel shall be [SWS_CanSM_00652]
09080] controlled by an independent
communication mode
[SRS_ModeMgm_- The Communication Manager shall [SWS_CanSM_00652]
09081] provide an API allowing collecting
communication requests
[SRS_ModeMgm_- The Communication Manager shall [SWS_CanSM_00652]
09083] support two communication modes
for each physical channel
[SRS_ModeMgm_- The Communication Manager shall [SWS_CanSM_00063] [SWS_CanSM_00652]
09084] provide an API which allows
application to query the current
communication mode
[SRS_ModeMgm_- The Communication Manager shall [SWS_CanSM_00652]
09085] provide an indication of
communication mode changes
[SRS_ModeMgm_- The Minimum duration of [SWS_CanSM_00652]
09087] communication request after wakeup
shall be configurable
[SRS_ModeMgm_- The Communication Manager shall [SWS_CanSM_00652]
09089] be able to prevent waking up physical
channels
[SRS_ModeMgm_- Relationship between users and [SWS_CanSM_00652]
09090] physical channels shall be
configurable at pre compile time
[SRS_ModeMgm_- The ECU State Manager module [SWS_CanSM_00652]
09097] shall start a timeout after receiving a
wake-up indication
[SRS_ModeMgm_- Storing the wake-up reasons shall be [SWS_CanSM_00652]
09098] available
[SRS_ModeMgm_- Selection of wake-up sources shall [SWS_CanSM_00652]
09100] be configurable
[SRS_ModeMgm_- An API to query the reset reason [SWS_CanSM_00652]
09101] shall be provided
[SRS_ModeMgm_- API for selecting the sleep mode shall [SWS_CanSM_00652]
09102] be provided
[SRS_ModeMgm_- ECU State Manager shall take over [SWS_CanSM_00652]
09104] control after OS shutdown
5

32 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_ModeMgm_- The list of entities supervised by the [SWS_CanSM_00652]
09106] Watchdog Manager shall be
configurable at pre-compile time
[SRS_ModeMgm_- The Watchdog Manager shall provide [SWS_CanSM_00652]
09107] an initialization service
[SRS_ModeMgm_- It shall be possible to prohibit the [SWS_CanSM_00652]
09109] disabling of watchdog
[SRS_ModeMgm_- The watchdog Manager shall provide [SWS_CanSM_00652]
09110] a service interface, to select a mode
of the Watchdog Manager
[SRS_ModeMgm_- The Watchdog Manager shall [SWS_CanSM_00652]
09112] cyclically check the periodicity of the
supervised entities
[SRS_ModeMgm_- Initialization of Basic Software [SWS_CanSM_00652]
09113] modules shall be done
[SRS_ModeMgm_- Starting/invoking the shutdown [SWS_CanSM_00652]
09114] process shall be provided
[SRS_ModeMgm_- The ECU State Manager shall include [SWS_CanSM_00652]
09115] a mechanism to evaluate the
condition to stay in the RUN state
[SRS_ModeMgm_- Requesting and releasing the RUN [SWS_CanSM_00652]
09116] state shall be provided
[SRS_ModeMgm_- The ECU State Manager shall [SWS_CanSM_00652]
09118] provide a mechanism to enter a step
by step decreasing power mode
[SRS_ModeMgm_- Several sleep modes shall be [SWS_CanSM_00652]
09119] available
[SRS_ModeMgm_- Configuration of initialization process [SWS_CanSM_00652]
09120] of Basic Software modules shall be
available
[SRS_ModeMgm_- Configuration of users of the ECU [SWS_CanSM_00652]
09122] State Manager
[SRS_ModeMgm_- The Watchdog Manager shall provide [SWS_CanSM_00652]
09125] a service allowing the Update
temporal program flow monitoring
[SRS_ModeMgm_- An API for querying the wake-up [SWS_CanSM_00652]
09126] reason shall be provided
[SRS_ModeMgm_- The ECU State Manager shall [SWS_CanSM_00652]
09127] de-initialize Basic Software modules
where appropriate during the
shutdown process
[SRS_ModeMgm_- Several shutdown targets shall be [SWS_CanSM_00652]
09128] supported
[SRS_ModeMgm_- It shall be possible to assign Network [SWS_CanSM_00652]
09132] Management to physical channels
[SRS_ModeMgm_- It shall be possible to assign physical [SWS_CanSM_00652]
09133] channels to the Communication
Manager
[SRS_ModeMgm_- The ECU State Manager shall be the [SWS_CanSM_00652]
09136] receiver of all wake-up events
[SRS_ModeMgm_- The Communication Manager shall [SWS_CanSM_00652]
09141] be able to configure the physical
channel wake-up prevention
5

33 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_ModeMgm_- The Watchdog Manager shall set the [SWS_CanSM_00652]
09143] triggering condition during inactive
monitoring
[SRS_ModeMgm_- Wake-sleep operation shall be [SWS_CanSM_00652]
09145] supported
[SRS_ModeMgm_- Configuration of time triggered [SWS_CanSM_00652]
09146] increased inoperation shall be
provided
[SRS_ModeMgm_- Configuration of de-initialization [SWS_CanSM_00652]
09147] process of Basic Software modules
shall be provided
[SRS_ModeMgm_- The Communication Manager shall [SWS_CanSM_00652]
09149] provide an API for querying the
requested communication mode
[SRS_ModeMgm_- The Communication Manager shall [SWS_CanSM_00652]
09155] provide a counter for inhibited
communication requests
[SRS_ModeMgm_- It shall be provided an API to retrieve [SWS_CanSM_00652]
09156] the number of inhibited "Full
Communication" mode requests
[SRS_ModeMgm_- It shall be possible to revoke a [SWS_CanSM_00652]
09157] communication mode limitation,
independently for each physical
channel
[SRS_ModeMgm_- The Watchdog Manager shall support [SWS_CanSM_00652]
09158] Post build time and mode dependent
selectable configuration sets for the
Watchdog Manager
[SRS_ModeMgm_- The Watchdog Manager shall report [SWS_CanSM_00652]
09159] failure of temporal or program flow
monitoring to DEM
[SRS_ModeMgm_- The Watchdog Manager shall provide [SWS_CanSM_00652]
09160] the indication of failed temporal
monitoring
[SRS_ModeMgm_- The Watchdog Manager shall reset [SWS_CanSM_00652]
09161] the triggering condition in the
Watchdog Driver in Case of temporal
failure
[SRS_ModeMgm_- The Watchdog Manager shall be able [SWS_CanSM_00652]
09162] to notify the software of an upcoming
watchdog reset
[SRS_ModeMgm_- It shall be possible to configure a [SWS_CanSM_00652]
09163] delay before provoking a watchdog
reset
[SRS_ModeMgm_- Shutdown synchronization for [SWS_CanSM_00652]
09164] SW-Components shall be supported
[SRS_ModeMgm_- The ECU State Manager shall [SWS_CanSM_00652]
09165] provide services to request and
release the POST-RUN state
[SRS_ModeMgm_- The ECU State Manager shall [SWS_CanSM_00652]
09166] evaluate the condition to stay in the
POST-RUN state
[SRS_ModeMgm_- The Communication Manager shall [SWS_CanSM_00652]
09168] support users that are connected to
no physical channel
[SRS_ModeMgm_- The Watchdog Manager shall be able [SWS_CanSM_00652]
09169] to immediately reset the MCU
5

34 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_ModeMgm_- It shall be possible to evaluate the [SWS_CanSM_00652]
09172] current communication mode
[SRS_ModeMgm_- A Run State shall have a minimum [SWS_CanSM_00652]
09173] duration
[SRS_ModeMgm_- The BSW Mode Manager shall [SWS_CanSM_00652]
09174] support the ’disable normal
Communication’
[SRS_ModeMgm_- A configurable Set of Mode [SWS_CanSM_00652]
09175] dependent enabled and concomitant
disabled IPDU groups shall be
supported
[SRS_ModeMgm_- Configurable Sets of Mode [SWS_CanSM_00652]
09176] dependent enabled I-PDU Groups
shall be supported
[SRS_ModeMgm_- The rules of the mode arbitration [SWS_CanSM_00652]
09177] shall be pre-compile and post-build
configurable
[SRS_ModeMgm_- The lists of mode transition specific [SWS_CanSM_00652]
09178] actions shall be pre-compile and
post-build configurable
[SRS_ModeMgm_- The BSW Mode Manager shall [SWS_CanSM_00652]
09179] provide an Interface to allow Mode
Requests of SW-C’s
[SRS_ModeMgm_- The BSW Mode Manager shall [SWS_CanSM_00652]
09180] evaluate the current mode requests
[SRS_ModeMgm_- The BSW Mode Manager shall [SWS_CanSM_00652]
09182] propagate a performed mode change
to all local SW-Cs
[SRS_ModeMgm_- Configurable Mode Activation [SWS_CanSM_00652]
09183] initiated Reset of Signals to Initial
Values shall be supported
[SRS_ModeMgm_- The mode manager shall be able to [SWS_CanSM_00652]
09184] use a COM interface to activate,
respectively deactivate, I-PDU groups
[SRS_ModeMgm_- A persistent Alarm Clock used by [SWS_CanSM_00652]
09185] local SW-Cs shall be provided
[SRS_ModeMgm_- Alarm Clock shall be active while the [SWS_CanSM_00652]
09186] ECU is powered
[SRS_ModeMgm_- In Case of wakeup, all the alarm [SWS_CanSM_00652]
09187] clock shall be canceled
[SRS_ModeMgm_- In Case of startup, all the alarm clock [SWS_CanSM_00652]
09188] shall be canceled
[SRS_ModeMgm_- Consecutive requests shall honor the [SWS_CanSM_00652]
09189] earliest expiring alarm only
[SRS_ModeMgm_- The alarm clock service shall allow [SWS_CanSM_00652]
09190] setting an alarm relative to the
current time using a time resolution of
seconds
[SRS_ModeMgm_- The alarm clock service shall allow [SWS_CanSM_00652]
09194] setting the clock
[SRS_ModeMgm_- The alarm clock service shall allow [SWS_CanSM_00652]
09199] setting an alarm absolute by using an
absolute time with a resolution of
seconds
[SRS_ModeMgm_- ComM shall allow for additional bus [SWS_CanSM_00652]
09207] specific state managers
5

35 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_ModeMgm_- It shall be possible to configure all the [SWS_CanSM_00652]
09220] transition relations
[SRS_ModeMgm_- The Watchdog Manager shall check [SWS_CanSM_00652]
09221] the correct sequence of code
execution in supervised entities
[SRS_ModeMgm_- The Watchdog Manager shall provide [SWS_CanSM_00652]
09222] a service allowing the Update logical
program flow monitoring
[SRS_ModeMgm_- The Watchdog Manager shall support [SWS_CanSM_00652]
09223] Post build time and mode dependent
selectable configuration of transition
relations
[SRS_ModeMgm_- The Watchdog Manager shall provide [SWS_CanSM_00652]
09225] the indication of failed logical
monitoring
[SRS_ModeMgm_- The Watchdog Manager shall reset [SWS_CanSM_00652]
09226] reset the triggering condition in the
Watchdog Driver in Case of logical
program flow violation
[SRS_ModeMgm_- The BSW Mode Manager shall [SWS_CanSM_00652]
09228] provide an Interface to allow Mode
Requests of BSW Modules
[SRS_ModeMgm_- The mode manager shall be able to [SWS_CanSM_00652]
09229] make generic, configured callouts of
void functions to other BSW modules
[SRS_ModeMgm_- All actions shall only be performed on [SWS_CanSM_00652]
09230] mode change
[SRS_ModeMgm_- The Watchdog Manager shall [SWS_CanSM_00652]
09231] periodically set the triggering
condition in the Watchdog Driver as
long as the monitoring has not failed
[SRS_ModeMgm_- The Watchdog Manager shall provide [SWS_CanSM_00652]
09232] a service to cause a watchdog reset
[SRS_ModeMgm_- The EcuM shall handle the [SWS_CanSM_00652]
09234] initialization of Basic Software
modules
[SRS_ModeMgm_- The ECU State Manager shall offer [SWS_CanSM_00652]
09235] two targets for shutting down the ECU
[SRS_ModeMgm_- There shall be one instance of the [SWS_CanSM_00652]
09236] function EcuM_Init that distinguishes
between the different cores
[SRS_ModeMgm_- RTE_Start shall be called on each [SWS_CanSM_00652]
09237] core.
[SRS_ModeMgm_- State changes shall be ECU global [SWS_CanSM_00652]
09238]
[SRS_ModeMgm_- To shutdown, ShutdownAllCores shall [SWS_CanSM_00652]
09239] be called on the master core after
synchronizing all cores
[SRS_ModeMgm_- ComM shall notify BswM of any PNC [SWS_CanSM_00652]
09240] communication state change
[SRS_ModeMgm_- BswM shall be able to request [SWS_CanSM_00652]
09241] communication modes for existing
CommUsers
5

36 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_ModeMgm_- The Communication Manager shall [SWS_CanSM_00652]
09243] be able to handle the Partial
Networks on Flexray, CAN and
Ethernet
[SRS_ModeMgm_- The number of supported PNCs shall [SWS_CanSM_00652]
09244] be configurable strictly at pre-compile
time
[SRS_ModeMgm_- Enabling or disabling the Partial [SWS_CanSM_00652]
09245] Network Cluster management in Com
M shall be post-build selectable.
[SRS_ModeMgm_- The communication manager shall [SWS_CanSM_00652]
09246] arbitrate and coordinate requests
from users on physical channel and
users on PNCs
[SRS_ModeMgm_- For each configured PNC an [SWS_CanSM_00652]
09247] independent state machine shall be
instantiated
[SRS_ModeMgm_- it shall be possible to distinguish [SWS_CanSM_00652]
09248] between internal and external PNC
activation requests
[SRS_ModeMgm_- PNC gateway and coordination [SWS_CanSM_00652]
09249] functionality
[SRS_ModeMgm_- PNC activation requests shall be [SWS_CanSM_00652]
09250] exchanged with the Network
Management via a PNC bit vector
[SRS_ModeMgm_- PNC communication state shall be [SWS_CanSM_00598] [SWS_CanSM_00652]
09251] forwarded to the BswM
[SRS_ModeMgm_- The BswM shall be able to set the [SWS_CanSM_00652]
09253] halt mode for each single CPU Core
independently
[SRS_ModeMgm_- Validation and handling of a wakeup [SWS_CanSM_00652]
09254] event shall be done locally
[SRS_ModeMgm_- [SWS_CanSM_00652]
09255]
[SRS_ModeMgm_- PNC Gateway Functionality shall [SWS_CanSM_00652]
09256] consider systems with more than one
gateways connected to the same
network
[SRS_ModeMgm_- The ECU State Manager shall [SWS_CanSM_00652]
09270] provide a service for the selection of
the shutdown target
[SRS_ModeMgm_- The ECU State Manager shall [SWS_CanSM_00652]
09271] provide a service for the retrieval of
the current shutdown target
[SRS_ModeMgm_- The ECU State Manager shall [SWS_CanSM_00652]
09272] provide a service for the retrieval of
the last sleep targets
[SRS_ModeMgm_- The ECU State Manager shall [SWS_CanSM_00652]
09274] provide a service for the retrieval of
the selected reset modality
[SRS_ModeMgm_- The ECU State Manager shall [SWS_CanSM_00652]
09275] provide a service for querying the
time of previous resets
[SRS_ModeMgm_- The ECU State Manager shall [SWS_CanSM_00652]
09276] provide a service allowing the
selection of the boot target
5

37 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Requirement Description Satisfied by
[SRS_ModeMgm_- The ECU State Manager shall [SWS_CanSM_00652]
09277] provide an alarm clock service which
shall allow the retrieval of clock
values
Table 6.1: RequirementsTracing

38 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7 Functional specification
This chapter specifies the different functions of the CanSM module in the AUTOSAR
BSW architecture.
An ECU can have different communication networks. Each network has to be identified
with an unique network handle. The ComM module requests communication modes
from the networks. It knows by its configuration, which handle is assigned to what kind
of network. In case of CAN, it uses the CanSM module.
The CanSM module is responsible for the control flow abstraction of CAN networks:
It changes the communication modes of the configured CAN networks depending on
the mode requests from the ComM module.
Therefore the CanSM module uses the API of the CanIf module. The CanIf module
is responsible for the control flow abstraction of the configured CAN Controllers and
CAN Transceivers (the data flow abstraction of the CanIf module is not relevant for
the CanSM module). Any change of the CAN Controller modes and CAN Transceiver
modes will be notified by the CanIf module to the CanSM module. Depending on this
notifications and state of the CAN network state machine, which the CanSM module
shall implement for each configured CAN network, the CanSM module notifies the
ComM and the BswM (ref. to chapter 7.2 for details).
Note:
CanSM module will not notify ComM about its communication mode after initialization,
unless a communication mode has explicitly been requested by ComM.

39 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.1 General requirements


CANSM_BSM_S_FULLCOM

ExitPoint
CHANGE_BR

T_NO_COM_MODE_REQUEST
/E_PRE_NOCOM
[G_FULL_COM_MODE_REQUESTED]
/E_FULL_COM /E_BR_END_FULL_COM

T_SILENT_COM_MODE_REQUEST
/E_FULL_TO_SILENT_COM

CANSM_BSM_S_PRE_FULLCOM

CANSM_BSM_S_CHANGE_BAUDRATE
ExitPoint To
FULLCOM T_FULL_COM_MODE_REQUEST
/E_SILENT_TO_FULL_COM

ExitPoint
FULL_OR_SILENT_COM

ExitPoint
NO_COM

[G_SILENT_COM_MODE_REQUESTED]
/E_BR_END_SILENT_COM

T_FULL_COM_MODE_REQUEST CANSM_BSM_S_SILENTCOM

T_FULL_COM_MODE_REQUEST
/E_PRE_NOCOM
CANSM_BSM_WUVALIDATION

T_BUS_OFF

CANSM_BSM_S_SILENTCOM_BOR

T_NO_COM_MODE_REQUEST
/E_PRE_NOCOM
T_STOP_WAKEUP_SOURCE

T_NO_COM_MODE_REQUEST
/E_PRE_NO_COM

CANSM_BSM_S_PRE_NOCOM

T_START_WAKEUP_SOURCE

T_START_WAKEUP_SOURCE

CanSM_Init

CANSM_BSM_S_NOCOM
/E_NOCOM
CANSM_BSM_S_NOT_INITIALIZED
PowerOn
CanSM_DeInit
PowerOff

Figure 7.1: CANSM_BSM, state machine diagram for one CAN network

40 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

[SWS_CanSM_00266] dThe CanSM module shall store the current network mode
for each configured CAN network internally (ref. to [ECUC_CanSM_00126]).c(SRS_-
Can_01142)
[SWS_CanSM_00284] dThe internally stored network modes of the CanSM module
can have the values COMM_NO_COMMUNICATION, COMM_SILENT_COMMUNICATION,
COMM_FULL_COMMUNICATION.c(SRS_Can_01142)
[SWS_CanSM_00428] dAll effects of the CanSM state machine CANSM_BSM shall be
operated in the context of the CanSM main function (ref. to [SWS_CanSM_00065]).c
(SRS_Can_01142, SRS_Can_01145)
[SWS_CanSM_00278] dIf the CanSM state machine CANSM_BSM is in the state
CANSM_BSM_S_NOT_INITIALIZED, it shall deny network mode requests from the
ComM module (ref. to [SWS_CanSM_00062]).c(SRS_Can_01142)
[SWS_CanSM_00385] dIf CanSM has repeated one of the CanIf API calls CanIf_-
SetControllerMode (ref. to [SWS_CanSM_91002]), CanIf_SetTrcvMode (ref.
to [SWS_CanSM_91002]), CanIf_ClearTrcvWufFlag (ref. [SWS_CanSM_91002])
or CanIf_CheckTrcvWakeFlag (ref. [SWS_CanSM_91002]) more often than
CanSMModeRequestRepetitionMax (ref. to [ECUC_CanSM_00335]) without
getting the return value E_OK or without getting the corresponding mode indi-
cation callbacks CanSM_ControllerModeIndication, CanSM_Transceiver-
ModeIndication, CanSM_ClearTrcvWufFlagIndication or CanSM_Check-
TransceiverWakeFlagIndication, CanSM shall call the function Det_Re-
portRuntimeError (ref. to [SWS_CanSM_91002]) with ErrorId parameter
CANSM_E_MODE_REQUEST_TIMEOUT.c(SRS_Can_01142)
[SWS_CanSM_00422] dIf the CanIf module notifies PN availability for a configured
CAN Transceiver to the CanSM module with the callback function CanSM_ConfirmP-
nAvailability (ref. to [SWS_CanSM_00419]), then the CanSM module shall call
the API CanNm_ConfirmPnAvailability (ref. to [SWS_CanSM_91002]) with the
related CAN network as channel to confirm the PN availability to the CanNm module.c
(SRS_Can_01142)
[SWS_CanSM_00667]{DRAFT} dIf the CanIf module notifies PN availability for
a configured CAN Controller to the CanSM module with the callback function
CanSM_ConfirmCtrlPnAvailability (ref. to [SWS_CanSM_91004]), then the
CanSM module shall call the API CanNm_ConfirmPnAvailability (ref. to
[SWS_CanSM_91002]) with the related CAN network as channel to confirm the PN
availability to the CanNm module.c(SRS_Can_01142)
[SWS_CanSM_00560] dIf no CanSMTransceiverId (ref. to
[ECUC_CanSM_00137]) is configured for a CAN Network, then the CanSM module
shall bypass all specified CanIf_SetTrcvMode (ref. to [SWS_CanSM_91002]) (e.g.
[SWS_CanSM_00446]) calls for the CAN Network and proceed in the different state
transitions as if it has got the supposed CanSM_TransceiverModeIndication
already (e.g. [SWS_CanSM_00448]).c(SRS_Can_01145)

41 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

[SWS_CanSM_00635] dThe CanSM module shall store for each configured CAN
network (ref. to [ECUC_CanSM_00126]) the latest communication mode request,
which has been accepted by returning E_OK in the API request CanSM_Request-
ComMode (ref. to [SWS_CanSM_00062], [SWS_CanSM_00182]) and use it as
trigger for the state machine of the related CAN network, [SWS_CanSM_00427],
[SWS_CanSM_00429], [SWS_CanSM_00499], [SWS_CanSM_00542],
[SWS_CanSM_00543], [SWS_CanSM_00425], [SWS_CanSM_00426]).c(SRS_-
Can_01142)
[SWS_CanSM_00638] dThe CanSM module shall store after every successful CAN
controller mode change (ref. to [SWS_CanSM_00396]) or bus-off conditioned change
to CAN_CS_STOPPED (ref. to [SWS_CanSM_00064]), the changed mode internally for
each CAN controller.c(SRS_Can_01145)

7.2 State machine for each CAN network


The diagram (ref. to Figure 7.1) specifies the behavioral state machine of the CanSM
module, which shall be implemented for each configured CAN network (ref. to
[ECUC_CanSM_00126])

7.2.1 Trigger: PowerOn

[SWS_CanSM_00424] dAfter PowerOn the CanSM state machines shall be in the state
CANSM_BSM_NOT_INITIALIZED.c()

7.2.2 Trigger: CanSM_Init

[SWS_CanSM_00423] dIf the CanSM module is requested with the function CanSM_-
Init, this shall trigger the CanSM state machines for all configured CAN Networks
(ref. to [ECUC_CanSM_00126]) with the trigger CanSM_Init.c(SRS_Can_01142,
SRS_Can_01145)

7.2.3 Trigger: CanSM_DeInit

[SWS_CanSM_00658] dIf the CanSM module is requested with the function CanSM_-
DeInit, this shall trigger the CanSM state machines for all configured CAN Networks
(ref. to [ECUC_CanSM_00126]) with the trigger CanSM_DeInit.c(SRS_Can_01164)
Note: Caller of the CanSM_DeInit function has to ensure all CAN networks are in the
state CANSM_NO_COMMUNICATION

42 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.4 Trigger: T_START_WAKEUP_SOURCE

[SWS_CanSM_00607] dIf the API request CanSM_StartWakeupSource (ref. to


[SWS_CanSM_00609]) returns E_OK (ref. to [SWS_CanSM_00616]), it shall trigger
the state machine with T_START_WAKEUP_SOURCE.c(SRS_Can_01142, SRS_Can_-
01145)

7.2.5 Trigger: T_STOP_WAKEUP_SOURCE

[SWS_CanSM_00608] dIf the API request CanSM_StopWakeupSource (ref. to


[SWS_CanSM_00610]) returns E_OK (ref. to [SWS_CanSM_00622]), it shall trigger
the state machine with T_STOP_WAKEUP_SOURCE.c(SRS_Can_01142, SRS_Can_-
01145)

7.2.6 Trigger: T_FULL_COM_MODE_REQUEST

[SWS_CanSM_00425] dThe API request CanSM_RequestComMode


(ref. to [SWS_CanSM_00635]) with the parameter ComM_Mode equal
to COMM_FULL_COMMUNICATION shall trigger the state machine with
T_FULL_COM_MODE_REQUEST, if the function parameter network matches
the configuration parameter CanSMComMNetworkHandleRef (ref. to
[ECUC_CanSM_00161]).c(SRS_Can_01142, SRS_Can_01145)

7.2.7 Trigger: T_SILENT_COM_MODE_REQUEST

[SWS_CanSM_00499] dThe API request CanSM_RequestComMode


(ref. to [SWS_CanSM_00635]) with the parameter ComM_Mode equal
to COMM_SILENT_COMMUNICATION shall trigger the sub state machine
CANSM_BSM_S_FULLCOM with T_SILENT_COM_MODE_REQUEST, which corre-
sponds to the function parameter network and the configuration parameter CanSM-
ComMNetworkHandleRef (ref. to [ECUC_CanSM_00161]).c(SRS_Can_01145,
SRS_Can_01142)
Rationale: Regular use case for the transition of the CanNm Network mode to the
CanNm Prepare Bus-Sleep mode.

7.2.8 Trigger: T_NO_COM_MODE_REQUEST

[SWS_CanSM_00426] dThe API request CanSM_RequestComMode


(ref. to [SWS_CanSM_00635]) with the parameter ComM_Mode equal
to COMM_NO_COMMUNICATION shall trigger the state machine with
T_NO_COM_MODE_REQUEST, if the function parameter network matches the configu-

43 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

ration parameter CanSMComMNetworkHandleRef) (ref. to [ECUC_CanSM_00161]).c


(SRS_Can_01142, SRS_Can_01145)
Remark: Depending on the ComM configuration, the ComM module will re-
quest COMM_SILENT_COMMUNICATION first and then COMM_NO_COMMUNICATION or
COMM_NO_COMMUNICATION directly (ComMNmVariant=LIGHT)".

7.2.9 Trigger: T_BUS_OFF

[SWS_CanSM_00606] dThe callback function CanSM_ControllerBusOff (ref. to


[SWS_CanSM_00064]) shall trigger the state machine CANSM_BSM for the CAN net-
work with T_BUS_OFF, if one of its configured CAN controllers matches to the function
parameter ControllerId of the callback function CanSM_ControllerBusOff.c
(SRS_Can_01144, SRS_Can_01146)

7.2.10 Guarding condition: G_FULL_COM_MODE_REQUESTED

[SWS_CanSM_00427] dThe guarding condition G_FULL_COM_MODE_REQUESTED of


the CanSM_BSM state machine shall evaluate, if the latest accepted communication
mode request with CanSM_RequestComMode (ref. to [SWS_CanSM_00635]) for
the respective network handle of the state machine has been with the parameter
ComM_Mode equal to COMM_FULL_COMMUNICATION.c(SRS_Can_01142, SRS_Can_-
01145)

7.2.11 Guarding condition: G_SILENT_COM_MODE_REQUESTED

[SWS_CanSM_00429] dThe guarding condition G_SILENT_COM_MODE_REQUESTED


of the CanSM_BSM state machine shall evaluate, if the latest accepted communica-
tion mode request with CanSM_RequestComMode (ref. to [SWS_CanSM_00635])
for the respective network handle of the state machine has been with the parameter
ComM_Mode equal to COMM_SILENT_COMMUNICATION.c(SRS_Can_01142, SRS_-
Can_01145)

7.2.12 Effect: E_PRE_NOCOM

[SWS_CanSM_00431] dThe effect E_PRE_NOCOM of the CanSM_BSM state machine


shall call for the corresponding CAN network the API BswM_CanSM_CurrentState
(ref. to [SWS_CanSM_91002]) with the parameters Network := CanSMComM-
NetworkHandleRef and CurrentState := CANSM_BSWM_NO_COMMUNICATION.c
(SRS_Can_01142, SRS_Can_01145)

44 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.13 Effect: E_NOCOM

[SWS_CanSM_00430] dThe effect E_NOCOM of the CanSM_BSM state machine shall


change the internally stored network mode (ref. to [SWS_CanSM_00266]) of the
addressed CAN network to COMM_NO_COMMUNICATION.c(SRS_Can_01142, SRS_-
Can_01145)
[SWS_CanSM_00651] dIf a communication mode request for the network is
present already (ref. to [SWS_CanSM_00635]) and the stored communica-
tion mode request is COMM_NO_COMMUNICATION, then the effect E_NOCOM of
the CanSM_BSM state machine shall call the API ComM_BusSM_ModeIndica-
tion (ref. to [SWS_CanSM_91002]) with the parameters Channel := CanSM-
ComMNetworkHandleRef (ref. to [ECUC_CanSM_00161]) and ComMode :=
COMM_NO_COMMUNICATION.c(SRS_Can_01142, SRS_Can_01145)

7.2.14 Effect: E_FULL_COM

[SWS_CanSM_00539] dIf ECU passive is FALSE (ref. to [SWS_CanSM_00646]), then


the effect E_FULL_COM of the CanSM_BSM state machine shall call at 1st place for
each configured CAN controller of the CAN network the API CanIf_SetPduMode (ref.
to [SWS_CanSM_91002]) with the parameters ControllerId := CanSMControl-
lerId (ref. to [ECUC_CanSM_00141]) and PduModeRequest := CANIF_ONLINE.c
(SRS_Can_01158)
[SWS_CanSM_00647] dIf ECU passive is TRUE (ref. to [SWS_CanSM_00646]),
then the effect E_FULL_COM of the CanSM_BSM state machine shall call at 1st place
for each configured CAN controller of the CAN network the API CanIf_SetP-
duMode (ref. to [SWS_CanSM_91002]) with the parameters ControllerId :=
CanSMControllerId (ref. to [ECUC_CanSM_00141]) and PduModeRequest :=
CANIF_TX_OFFLINE_ACTIVE.c(SRS_Can_01158)
[SWS_CanSM_00435] dAfter considering [SWS_CanSM_00539] and
[SWS_CanSM_00647] in context of the effect E_FULL_COM of the CanSM_BSM state
machine, the CanSM module shall call the API ComM_BusSM_ModeIndication (ref.
to [SWS_CanSM_91002]) for the corresponding CAN network with the parameters
Channel := CanSMComMNetworkHandleRef (ref. to [ECUC_CanSM_00161]) and
ComMode := COMM_FULL_COMMUNICATION.c(SRS_Can_01158)
[SWS_CanSM_00540] dAfter considering [SWS_CanSM_00435] in context of the ef-
fect E_FULL_COM of the CanSM_BSM state machine, the CanSM module shall call the
API BswM_CanSM_CurrentState (ref. to [SWS_CanSM_91002]) for the correspond-
ing CAN network with the parameters Network := CanSMComMNetworkHandleRef
and CurrentState := CANSM_BSWM_FULL_COMMUNICATION.c(SRS_Can_01142,
SRS_Can_01145)

45 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.15 Effect: E_FULL_TO_SILENT_COM

[SWS_CanSM_00434] dThe effect E_FULL_TO_SILENT_COM of the CanSM_BSM


state machine shall call at 1st place for the corresponding CAN network the
API BswM_CanSM_CurrentState (ref. to [SWS_CanSM_91002]) with the pa-
rameters Network := CanSMComMNetworkHandleRef and CurrentState :=
CANSM_BSWM_SILENT_COMMUNICATION.c(SRS_Can_01142, SRS_Can_01145)
[SWS_CanSM_00541] dThe effect E_FULL_TO_SILENT_COM of the CanSM_BSM
state machine shall call at 2nd place for each configured CAN controller of the CAN
network the API CanIf_SetPduMode (ref. to [SWS_CanSM_91002]) with the param-
eters ControllerId := CanSMControllerId (ref. to [ECUC_CanSM_00141]) and
PduModeRequest := CANIF_TX_OFFLINE.c(SRS_Can_01142, SRS_Can_01145)
[SWS_CanSM_00538] dThe effect E_FULL_TO_SILENT_COM of the CanSM_BSM
state machine shall call at 3th place for the corresponding CAN network the API
ComM_BusSM_ModeIndication (ref. to [SWS_CanSM_91002]) with the parame-
ters Channel := CanSMComMNetworkHandleRef (ref. to [ECUC_CanSM_00161])
and ComMode := COMM_SILENT_COMMUNICATION.c(SRS_Can_01142, SRS_Can_-
01145)

7.2.16 Effect: E_BR_END_FULL_COM

[SWS_CanSM_00432] dThe effect E_BR_END_FULL_COM of the CanSM_BSM state


machine shall be the same as E_FULL_COM.c(SRS_Can_01142, SRS_Can_01145)

7.2.17 Effect: E_BR_END_SILENT_COM

[SWS_CanSM_00433] dThe effect E_BR_END_SILENT_COM of the CanSM_BSM state


machine shall be the same as E_FULL_TO_SILENT_COM.c(SRS_Can_01142, SRS_-
Can_01145)

7.2.18 Effect: E_SILENT_TO_FULL_COM

[SWS_CanSM_00550] dThe effect E_SILENT_TO_FULL_COM of the CanSM_BSM


state machine shall be the same as E_FULL_COM.c(SRS_Can_01142, SRS_Can_-
01145)

46 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.19 Sub state machine CANSM_BSM_WUVALIDATION

stm CANSM_BSM_WUVALIDATION

S_TRCV_NORMAL [G_TRCV_NORMAL_E_OK]

do / DO_SET_TRCV_MODE_NORMAL
EntryPoint
S_TRCV_NORMAL_WAIT
T_TRCV_NORMAL_TIMEOUT
T_TRCV_NORMAL_INDICATED

T_TRCV_NORMAL_INDICATED
S_CC_STOPPED [G_CC_STOPPED_E_OK]

do / DO_SET_CC_MODE_STOPPED

S_CC_STOPPED_WAIT

T_CC_STOPPED_INDICATED
T_CC_STOPPED_TIMEOUT

T_CC_STOPPED_INDICATED
S_CC_STARTED

do / DO_SET_CC_MODE_STARTED
[G_CC_STARTED_E_OK]

T_CC_STARTED_INDICATED
S_CC_STARTED_WAIT
T_CC_STARTED_TIMEOUT

WAIT_WUVALIDATION_LEAVE
T_CC_STARTED_INDICATED

Figure 7.2: CANSM_BSM_WUVALIDATION, sub state machine of CANSM_BSM

7.2.19.1 State operation to do in: S_TRCV_NORMAL

[SWS_CanSM_00623] dIf for the CAN network a CAN Transceiver is config-


ured (ref. to [ECUC_CanSM_00137]), then as long the sub state machine
CANSM_BSM_WUVALIDATION is in the state S_TRCV_NORMAL, the CanSM module
shall operate the do action DO_SET_TRCV_MODE_NORMAL and therefore repeat for
the configured CAN Transceiver of the CAN network (ref. to [ECUC_CanSM_00137])
the API request CanIf_SetTrcvMode (ref. to [SWS_CanSM_91002]) with
TransceiverMode equal to CANTRCV_TRCVMODE_NORMAL.c(SRS_Can_01142,
SRS_Can_01145)

7.2.19.2 Guarding condition G_TRCV_NORMAL_E_OK

[SWS_CanSM_00624] dThe guarding condition G_TRCV_NORMAL_E_OK of the sub


state machine CANSM_BSM_WUVALIDATION shall be passed, if the API call of
[SWS_CanSM_00483] has returned E_OK.c(SRS_Can_01142, SRS_Can_01145)

47 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.19.3 Trigger: T_TRCV_NORMAL_INDICATED

[SWS_CanSM_00625] dIf CanSM module has got the CANTRCV_TRCVMODE_NORMAL


mode indication (ref. to [SWS_CanSM_00399]) for the configured CAN
Transceiver of the CAN network (ref. to [ECUC_CanSM_00137]) after the re-
spective request (ref. to [SWS_CanSM_00623]), this shall trigger the sub
state machine machine CANSM_BSM_WUVALIDATION of the CAN network with
T_TRCV_NORMAL_INDICATED.c(SRS_Can_01142, SRS_Can_01145)

7.2.19.4 Trigger: T_TRCV_NORMAL_TIMEOUT

[SWS_CanSM_00626] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME


(ref. to [ECUC_CanSM_00336]) for the supposed transceiver normal indi-
cation (ref. to [SWS_CanSM_00625]), this condition shall trigger the sub
state machine CANSM_BSM_WUVALIDATION of the respective network with
T_TRCV_NORMAL_TIMEOUT.c(SRS_Can_01142, SRS_Can_01145)

7.2.19.5 State operation to do in: S_CC_STOPPED

[SWS_CanSM_00627] dAs long the sub state machine CANSM_BSM_WUVALIDATION


is in the state S_CC_STOPPED, the CanSM module shall operate the do action
DO_SET_CC_MODE_STOPPED and therefore repeat for all configured CAN controllers
of the CAN network (ref. to [ECUC_CanSM_00141]) the API request CanIf_Set-
ControllerMode (ref. to [SWS_CanSM_91002]) with ControllerMode equal to
CAN_CS_STOPPED, if the current CAN controller mode (ref. to [SWS_CanSM_00638])
is different.c(SRS_Can_01142, SRS_Can_01145)

7.2.19.6 Guarding condition: G_CC_STOPPED_OK

[SWS_CanSM_00628] dThe guarding condition G_CC_STOPPED_OK of the sub


state machine CANSM_BSM_WUVALIDATION shall be passed, if all API calls of
[SWS_CanSM_00627] have returned E_OK.c(SRS_Can_01142, SRS_Can_01145)

7.2.19.7 Trigger: T_CC_STOPPED_INDICATED

[SWS_CanSM_00629] dIf the CanSM module has got all mode indications (ref.
to [SWS_CanSM_00396]) for the configured CAN controllers of the CAN network
(ref. to [ECUC_CanSM_00141]) after the respective requests to stop the CAN
controllers of the CAN network (ref. to [SWS_CanSM_00627]), this shall trig-
ger the sub state machine CANSM_BSM_WUVALIDATION of the CAN network with
T_CC_STOPPED_INDICATED.c(SRS_Can_01142, SRS_Can_01145)

48 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.19.8 Trigger: T_CC_STOPPED_TIMEOUT

[SWS_CanSM_00630] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for all supposed controller stopped mode indica-
tions (ref. to [SWS_CanSM_00629]), this condition shall trigger the sub
state machine CANSM_BSM_WUVALIDATION of the respective network with
T_CC_STOPPED_TIMEOUT.c(SRS_Can_01142, SRS_Can_01145)

7.2.19.9 State operation to do in: S_CC_STARTED

[SWS_CanSM_00631] dAs long the sub state machine CANSM_BSM_WUVALIDATION


is in the state S_CC_STARTED, the CanSM module shall operate the do action
DO_SET_CC_MODE_STARTED and therefore repeat for all configured CAN controllers
of the CAN network (ref. to [ECUC_CanSM_00141]) the API request CanIf_Set-
ControllerMode with ControllerMode equal to CAN_CS_STARTED, if the current
CAN controller mode (ref. to [SWS_CanSM_00638]) is different.c(SRS_Can_01142,
SRS_Can_01145)

7.2.19.10 Guarding condition: G_CC_STARTED_E_OK

[SWS_CanSM_00632] dThe guarding condition G_CC_STARTED_OK of the sub


state machine CANSM_BSM_WUVALIDATION shall be passed, if all API calls of
[SWS_CanSM_00631] have returned E_OK.c(SRS_Can_01142, SRS_Can_01145)

7.2.19.11 Trigger: T_CC_STARTED_INDICATED

[SWS_CanSM_00633] dIf CanSM module has got all mode indications (ref. to
[SWS_CanSM_00396]) for the configured CAN controllers of the CAN network
(ref. to [ECUC_CanSM_00141]) after the respective requests to start the CAN
controllers of the CAN network (ref. to [SWS_CanSM_00631]), this shall trig-
ger the sub state machine CANSM_BSM_WUVALIDATION of the CAN network with
T_CC_STARTED_INDICATED.c(SRS_Can_01142, SRS_Can_01145)

7.2.19.12 Trigger: T_CC_STARTED_TIMEOUT

[SWS_CanSM_00634] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for all supposed controller started mode indica-
tions (ref. to[SWS_CanSM_00633]), this condition shall trigger the sub
state machine CANSM_BSM_WUVALIDATION of the respective network with
T_CC_STARTED_TIMEOUT.c(SRS_Can_01142, SRS_Can_01145)

49 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.20 Sub state machine: CANSM_BSM_S_PRE_NOCOM

stm CANSM_BSM_S_PRE_NOCOM

EntryPoint
[CANSM_BSM_G_PN_NOT_SUPPORTED] [CANSM_BSM_G_PN_SUPPORTED]

CANSM_BSM_DeinitPnNotSupported CANSM_BSM_DeinitPnSupported

ExitPoint

Figure 7.3: CANSM_BSM_S_PRE_NOCOM, sub state machine of CANSM_BSM

7.2.20.1 Guarding condition: CANSM_BSM_G_PN_NOT_SUPPORTED

[SWS_CanSM_00436] dThe guarding condition CANSM_BSM_G_PN_NOT_SUPPORTED


of the sub state machine CANSM_BSM_S_PRE_NO_COM shall evaluate, if the con-
figuration parameter CanTrcvPnEnabled (ref. to [11, ECUC_CanTrcv_00172])
is FALSE, which is available via the reference CanSMTransceiverId (ref. to
[ECUC_CanSM_00137]) or if no CanSMTransceiverId is configured at all.c(SRS_-
Can_01142, SRS_Can_01145)

7.2.20.2 Guarding condition: CANSM_BSM_G_PN_SUPPORTED

[SWS_CanSM_00437] dThe guarding condition CANSM_BSM_G_PN_SUPPORTED of


the sub state machine CANSM_BSM_S_PRE_NO_COM shall evaluate, if a CanSM-
TransceiverId (ref. to [ECUC_CanSM_00137]) is configured and if the con-
figuration parameter CanTrcvPnEnabled (ref. to [11, ECUC_CanTrcv_00172])
is TRUE, which is available via the reference CanSMTransceiverId (ref. to
[ECUC_CanSM_00137]).c(SRS_Can_01142, SRS_Can_01145)

50 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.20.3 Sub state machine: CANSM_BSM_DeinitPnSupported

stm CANSM_BSM_DeinitPnSupported

CANSM_BSM_DeinitPnSupportedProceed

S_PN_CLEAR_WUF

do / DO_CLEAR_TRCV_WUF

[G_PN_CLEAR_WUF_E_OK]
T_CLEAR_WUF_INDICATED T_CLEAR_WUF_TIMEOUT

S_PN_CLEAR_WUF_WAIT

T_CLEAR_WUF_INDICATED

S_CC_STOPPED

do / DO_SET_CC_MODE_STOPPED

T_CC_STOPPED_INDICATED [G_CC_STOPPED_E_OK]
T_CC_STOPPED_TIMEOUT

S_CC_STOPPED_WAIT

T_CC_STOPPED_INDICATED

S_TRCV_NORMAL

do / DO_SET_TRCV_MODE_NORMAL

T_TRCV_NORMAL_INDICATED [G_TRCV_NORMAL_E_OK] T_TRCV_NORMAL_TIMEOUT

S_TRCV_NORMAL_WAIT

T_TRCV_NORMAL_INDICATED

S_TRCV_STANDBY

do / DO_SET_TRCV_MODE_STANDBY
T_TRCV_STANDBY_TIMOUT
T_TRCV_STANDBY_INDICATED [G_TRCV_STANDBY_E_OK]

S_TRCV_STANDBY_WAIT

T_TRCV_STANDBY_INDICATED

S_CC_SLEEP

do / DO_SET_CC_MODE_SLEEP

[G_CC_SLEEP_E_OK] T_CHECK_WFLAG_INDICATED

T_CC_SLEEP_INDICATED
S_CC_SLEEP_WAIT

CANSM_BSM_T_CC_SLEEP_TIMEOUT

T_CC_SLEEP_INDICATED
S_CHECK_WFLAG_IN_NOT_CC_SLEEP

do / DO_CHECK_WFLAG
S_CHECK_WFLAG_IN_CC_SLEEP

do / DO_CHECK_WFLAG
[G_CHECK_WFLAG_E_OK]
T_CHECK_WFLAG_TIMEOUT
[G_CHECK_WFLAG_E_OK]

S_CHECK_WUF_IN_NOT_CC_SLEEP_WAIT
T_CHECK_WFLAG_INDICATED

T_CHECK_WFLAG_TIMEOUT T_CHECK_WFLAG_INDICATED
S_CHECK_WUF_IN_CC_SLEEP_WAIT

Junction

T_CHECK_WFLAG_INDICATED
ExitPoint

Figure 7.4: CANSM_BSM_DeinitPnSupported, sub state machine of


CANSM_BSM_S_PRE_NOCOM

51 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.20.3.1 State operation to do in: S_PN_CLEAR_WUF

[SWS_CanSM_00438] dAs long the sub state machine


CANSM_BSM_DeinitPnSupported is in the state S_PN_CLEAR_WUF, the CanSM
module operate the do action DO_CLEAR_TRCV_WUF and therefore repeat the API
request CanIf_ClearTrcvWufFlag and use the configured Transceiver (ref. to
[ECUC_CanSM_00137]) as API function parameter.c(SRS_Can_01142, SRS_Can_-
01145)

7.2.20.3.2 Guarding condition: G_PN_CLEAR_WUF_E_OK

[SWS_CanSM_00439] dThe guarding condition G_PN_CLEAR_WUF_E_OK of the sub


state machine CANSM_BSM_DeinitPnSupported shall be passed, if the API call of
[SWS_CanSM_00438] has returned E_OK.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.3 Trigger: T_CLEAR_WUF_INDICATED

[SWS_CanSM_00440] dThe callback function CanSM_ClearTrcvWuf-


FlagIndication (ref. to [SWS_CanSM_00413]) shall trigger the sub
state machine CANSM_BSM_DeinitPnSupported of the CAN network with
T_CLEAR_WUF_INDICATED, if the function parameter Transceiver of CanSM_-
ClearTrcvWufFlagIndication matches to the configured CAN Transceiver (ref.
to [ECUC_CanSM_00137]) of the CAN network.c(SRS_Can_01142, SRS_Can_-
01145)

7.2.20.3.4 Trigger: T_CLEAR_WUF_TIMEOUT

[SWS_CanSM_00443] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref. to


[ECUC_CanSM_00336]) for the callback function CanSM_ClearTrcvWufFlagIndi-
cation (ref. to [SWS_CanSM_00440]), this condition shall trigger the sub
state machine CANSM_BSM_DeinitPnSupported of the respective network with
T_CLEAR_WUF_TIMEOUT.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.5 State operation to do in: S_CC_STOPPED

[SWS_CanSM_00441] dAs long the sub state machine


CANSM_BSM_DeinitPnSupported is in the state S_CC_STOPPED, the CanSM
module shall operate the do action DO_SET_CC_MODE_STOPPED and therefore repeat
for all configured CAN controllers of the CAN network (ref. to [ECUC_CanSM_00141])
the API request CanIf_SetControllerMode with ControllerMode equal to
CAN_CS_STOPPED, if the current CAN controller mode (ref. to [SWS_CanSM_00638])
is different.c(SRS_Can_01142, SRS_Can_01145)

52 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.20.3.6 Guarding condition: G_CC_STOPPED_E_OK

[SWS_CanSM_00442] dThe guarding condition G_CC_STOPPED_E_OK of the sub


state machine CANSM_BSM_DeinitPnSupported shall be passed, if all API calls of
[SWS_CanSM_00441] have returned E_OK.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.7 Trigger: T_CC_STOPPED_INDICATED

[SWS_CanSM_00444] dIf CanSM module has got all mode indications (ref. to
[SWS_CanSM_00396]) for the configured CAN controllers of the CAN network (ref.
to [ECUC_CanSM_00141]) after the respective requests to stop the CAN con-
trollers of the CAN network (ref. to [SWS_CanSM_00442]), this shall trigger the
sub state machine CANSM_BSM_DeinitPnSupported of the CAN network with
T_CC_STOPPED_INDICATED.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.8 Trigger: T_CC_STOPPED_TIMEOUT

[SWS_CanSM_00445] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for all supposed controller stopped mode indica-
tions (ref. to [SWS_CanSM_00444]), this condition shall trigger the sub
state machine CANSM_BSM_DeinitPnSupported of the respective network with
T_CC_STOPPED_TIMEOUT.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.9 State operation to do in: S_TRCV_NORMAL

[SWS_CanSM_00446] dAs long the sub state machine


CANSM_BSM_DeinitPnSupported is in the state S_TRCV_NORMAL, the
CanSM module shall operate the do action DO_SET_TRCV_MODE_NORMAL
and therefore repeat for the configured CAN Transceiver of the CAN net-
work (ref. to [ECUC_CanSM_00137]) the API request CanIf_SetTrcv-
Mode (ref. to [SWS_CanSM_91002]) with TransceiverMode equal to
CANTRCV_TRCVMODE_NORMAL.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.10 Guarding condition: G_TRCV_NORMAL_E_OK

[SWS_CanSM_00447] dThe guarding condition G_TRCV_NORMAL_E_OK of the sub


state machine CANSM_BSM_DeinitPnSupported shall be passed, if the API call of
[SWS_CanSM_00446] has returned E_OK.c(SRS_Can_01142, SRS_Can_01145)

53 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.20.3.11 Trigger: T_TRCV_NORMAL_INDICATED

[SWS_CanSM_00448] dIf CanSM module has got the CANTRCV_TRCVMODE_NORMAL


mode indication (ref. to [SWS_CanSM_00399]) for the configured CAN
Transceiver of the CAN network (ref. to [ECUC_CanSM_00137]) after the re-
spective request (ref. to [SWS_CanSM_00446]), this shall trigger the sub
state machine CANSM_BSM_DeinitPnSupported of the CAN network with
T_TRCV_NORMAL_INDICATED.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.12 Trigger: T_TRCV_NORMAL_TIMEOUT

[SWS_CanSM_00449] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME


(ref. to [ECUC_CanSM_00336]) for the supposed transceiver normal indica-
tion (ref. to [SWS_CanSM_00448]), this condition shall trigger the sub state
machine CANSM_BSM_DeinitPnSupported of the respective network with
T_TRCV_NORMAL_TIMEOUT.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.13 State operation to do in: S_TRCV_STANDBY

[SWS_CanSM_00450] dAs long the sub state machine


CANSM_BSM_DeinitPnSupported is in the state S_TRCV_STANDBY, the CanSM
module shall operate the do action DO_SET_TRCV_STANDBY and therefore repeat for
the configured CAN Transceiver of the CAN network (ref. to [ECUC_CanSM_00137])
the API request CanIf_SetTrcvMode (ref. to [SWS_CanSM_91002]) with
TransceiverMode equal to CANTRCV_TRCVMODE_STANDBY.c(SRS_Can_01142,
SRS_Can_01145)

7.2.20.3.14 Guarding condition: G_TRCV_STANDBY_E_OK

[SWS_CanSM_00451] dThe guarding condition G_TRCV_STANDBY_E_OK of the sub


state machine CANSM_BSM_DeinitPnSupported shall be passed, if the API call of
[SWS_CanSM_00450] has returned E_OK.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.15 Trigger: T_TRCV_STANDBY_INDICATED

[SWS_CanSM_00452] dIf the CanSM module has got the


CANTRCV_TRCVMODE_STANDBY mode indication (ref. to [SWS_CanSM_00399]) for
the configured CAN Transceiver of the CAN network (ref. to [ECUC_CanSM_00137])
after the respective request (ref. to [SWS_CanSM_00450]), this shall trigger the
sub state machine CANSM_BSM_DeinitPnSupported of the CAN network with
T_TRCV_STANDBY_INDICATED.c(SRS_Can_01142, SRS_Can_01145)

54 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.20.3.16 Trigger: T_TRCV_STANDBY_TIMEOUT

[SWS_CanSM_00454] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for the supposed transceiver standby indication
(ref. to [SWS_CanSM_00452]), this condition shall trigger the sub state
machine CANSM_BSM_DeinitPnSupported of the respective network with
T_TRCV_STANDBY_TIMEOUT.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.17 State operation to do in: S_CC_SLEEP

[SWS_CanSM_00453] dAs long the sub state machine


CANSM_BSM_DeinitPnSupported is in the state S_CC_SLEEP, the CanSM
module shall operate the do action DO_SET_CC_MODE_SLEEP and therefore repeat
for all configured CAN controllers of the CAN network (ref. to [ECUC_CanSM_00141])
the API request CanIf_SetControllerMode (ref. to [SWS_CanSM_91002]) with
ControllerMode equal to CAN_CS_SLEEP, if the current CAN controller mode (ref.
to [SWS_CanSM_00638]) is different.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.18 Guarding condition: G_CC_SLEEP_E_OK

[SWS_CanSM_00455] dThe guarding condition G_CC_SLEEP_E_OK of the sub state


machine CANSM_BSM_DeinitPnSupported shall be passed, if all API calls of
[SWS_CanSM_00453] have returned E_OK.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.19 Trigger: T_CC_SLEEP_INDICATED

[SWS_CanSM_00456] dIf CanSM module has got all mode indications (ref. to
[SWS_CanSM_00396]) for the configured CAN controllers of the CAN network (ref.
to [ECUC_CanSM_00141]) after the respective requests to set the CAN controllers
of the CAN network to sleep mode (ref. to [SWS_CanSM_00453]), this shall trigger
the sub state machine CANSM_BSM_DeinitPnSupported of the CAN network with
T_CC_SLEEP_INDICATED.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.20 Trigger: CANSM_BSM_T_CC_SLEEP_TIMEOUT

[SWS_CanSM_00457] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for all supposed controller sleep mode indications
(ref. to [SWS_CanSM_00456]), this condition shall trigger the sub state machine
CANSM_BSM_DeinitPnSupported (ref. to Figure 7-4Figure 7-4) of the respective
network with CANSM_BSM_T_CC_SLEEP_TIMEOUT.c(SRS_Can_01142, SRS_Can_-
01145)

55 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.20.3.21 State operation to do in: S_CHECK_WFLAG_IN_CC_SLEEP

[SWS_CanSM_00458] dAs long the sub state machine


CANSM_BSM_DeinitPnSupported is in the state S_CHECK_WFLAG_IN_CC_SLEEP,
the CanSM module operate the do action DO_CHECK_WFLAG and therefore repeat the
API request CanIf_CheckTrcvWakeFlag (ref. [SWS_CanSM_91002]) and use the
configured CAN Transceiver of the related Network (ref. to [ECUC_CanSM_00137])
as Transceiver parameter.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.22 Guarding condition: G_CHECK_WFLAG_E_OK

[SWS_CanSM_00459] dThe guarding condition G_CHECK_WFLAG_E_OK of the sub


state machine CANSM_BSM_DeinitPnSupported shall be passed, if the API call
of [SWS_CanSM_00458] or [SWS_CanSM_00462] has returned E_OK.c(SRS_Can_-
01142, SRS_Can_01145)

7.2.20.3.23 Trigger: T_CHECK_WFLAG_INDICATED

[SWS_CanSM_00460] dThe callback function CanSM_CheckTransceiver-


WakeFlagIndication (ref. to [SWS_CanSM_00416]) shall trigger the sub
state machine CANSM_BSM_DeinitPnSupported of the CAN network with
T_CHECK_WFLAG_INDICATED, if the function parameter Transceiver of
CanSM_CheckTransceiverWakeFlagIndication matches to the configured
CAN Transceiver (ref. to [ECUC_CanSM_00137]) of the CAN network.c(SRS_Can_-
01142, SRS_Can_01145)

7.2.20.3.24 Trigger: T_CHECK_WFLAG_TIMEOUT

[SWS_CanSM_00461] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref. to


[ECUC_CanSM_00336]) for the callback function CanSM_CheckTransceiverWake-
FlagIndication (ref. to [SWS_CanSM_00460]), this condition shall trigger the
sub state machine CANSM_BSM_DeinitPnSupported of the respective network with
T_CHECK_WFLAG_TIMEOUT.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.3.25 State operation to do in: S_CHECK_WFLAG_IN_NOT_CC_SLEEP

[SWS_CanSM_00462] dAs long the sub state ma-


chine CANSM_BSM_DeinitPnSupported is in the state
S_CHECK_WFLAG_IN_NOT_CC_SLEEP, the CanSM module operate the do action
DO_CHECK_WFLAG and therefore repeat the API request CanIf_CheckTrcvWake-
Flag (ref. [SWS_CanSM_91002]) and use the configured CAN Transceiver of the

56 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

related Network (ref. to [ECUC_CanSM_00137]) as Transceiver parameter.c


(SRS_Can_01142, SRS_Can_01145)

7.2.20.4 Sub state machine: CANSM_BSM_DeinitPnNotSupported

stm CANSM_BSM_DeinitPnNotSupported

CANSM_BSM_DeinitPnNotSupportedProceed

S_CC_STOPPED

do / DO_SET_CC_MODE_STOPPED

[CANSM_BSM_G_CC_STOPPED_E_OK]

T_CC_STOPPED_INDICATED
T_CC_STOPPED_TIMEOUT

S_CC_STOPPED_WAIT

T_CC_STOPPED_INDICATED

S_CC_SLEEP

do / DO_SET_CC_MODE_SLEEP

T_CC_SLEEP_INDICATED
[G_CC_SLEEP_E_OK]

T_CC_SLEEP_TIMEOUT

S_CC_SLEEP_WAIT

T_CC_SLEEP_INDICATED

S_TRCV_NORMAL

do / DO_SET_TRCV_MODE_NORMAL

[G_TRCV_NORMAL_E_OK]

T_TRCV_NORMAL_INDICATED
T_TRCV_NORMAL_TIMEOUT

S_TRCV_NORMAL_WAIT

T_TRCV_NORMAL_INDICATED

S_TRCV_STANDBY

do / DO_SET_TRCV_MODE_STANDBY

[G_TRCV_STANDBY_E_OK]

CANSM_BSM_T_TRCV_STANDBY_TIMOUT
T_TRCV_STANDBY_INDICATED

S_TRCV_STANDBY_WAIT

T_TRCV_STANDBY_INDICATED
ExitPoint

Figure 7.5: CANSM_BSM_DeinitPnNotSupported, sub state machine of


CANSM_BSM_S_PRE_NOCOM

57 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.20.4.1 State operation to do in: S_CC_STOPPED

[SWS_CanSM_00464] dAs long the sub state machine


CANSM_BSM_DeinitPnNotSupported is in the state S_CC_STOPPED, the CanSM
module shall operate the do action DO_SET_CC_MODE_STOPPED and therefore repeat
for all configured CAN controllers of the CAN network (ref. to [ECUC_CanSM_00141])
the API request CanIf_SetControllerMode (ref. to [SWS_CanSM_91002]) with
ControllerMode equal to CAN_CS_STOPPED, if the current CAN controller mode
(ref. to [SWS_CanSM_00638]) is different.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.4.2 Guarding condition: CANSM_BSM_G_CC_STOPPED_OK

[SWS_CanSM_00465] dThe guarding condition CANSM_BSM__CC_STOPPED_OK of


the sub state machine CANSM_BSM_DeinitPnNotSupported shall be passed, if all
API calls of [SWS_CanSM_00464] have returned E_OK.c(SRS_Can_01142, SRS_-
Can_01145)

7.2.20.4.3 Trigger: T_CC_STOPPED_INDICATED

[SWS_CanSM_00466] dIf CanSM module has got all mode indications (ref. to
[SWS_CanSM_00396]) for the configured CAN controllers of the CAN network (ref.
to [ECUC_CanSM_00141]) after the respective requests to stop the CAN con-
trollers of the CAN network (ref. to [SWS_CanSM_00464]), this shall trigger the
sub state machine CANSM_BSM_DeinitPnNotSupported of the CAN network with
T_CC_STOPPED_INDICATED.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.4.4 Trigger: T_CC_STOPPED_TIMEOUT

[SWS_CanSM_00467] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for all supposed controller stopped mode indica-
tions (ref. to [SWS_CanSM_00466]), this condition shall trigger the sub state
machine CANSM_BSM_DeinitPnNotSupported of the respective network with
T_CC_STOPPED_TIMEOUT.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.4.5 State operation to do in: S_CC_SLEEP

[SWS_CanSM_00468] dAs long the sub state machine


CANSM_BSM_DeinitPnNotSupported is in the state S_CC_SLEEP, the CanSM
module shall operate the do action DO_SET_CC_MODE_SLEEP and therefore repeat
for all configured CAN controllers of the CAN network (ref. to [ECUC_CanSM_00141])
the API request CanIf_SetControllerMode (ref. to [SWS_CanSM_91002]) with

58 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

ControllerMode equal to CAN_CS_SLEEP, if the current CAN controller mode (ref.


to [SWS_CanSM_00638]) is different.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.4.6 Guarding condition: G_CC_SLEEP_E_OK

[SWS_CanSM_00469] dThe guarding condition G_CC_SLEEP_E_OK of the sub state


machine CANSM_BSM_DeinitPnNotSupported shall be passed, if all API calls of
[SWS_CanSM_00468] have returned E_OK.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.4.7 Trigger: T_CC_SLEEP_INDICATED

[SWS_CanSM_00470] dIf CanSM module has got all mode indications (ref. to
[SWS_CanSM_00396]) for the configured CAN controllers of the CAN network (ref.
to [ECUC_CanSM_00141]) after the respective requests to set the CAN controllers of
the CAN network to sleep mode (ref. to [SWS_CanSM_00468]), this shall trigger the
sub state machine CANSM_BSM_DeinitPnNotSupported of the CAN network with
T_CC_SLEEP_INDICATED.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.4.8 Trigger: T_CC_SLEEP_TIMEOUT

[SWS_CanSM_00471] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for all supposed controller sleep mode indications
(ref. to [SWS_CanSM_00470]), this condition shall trigger the sub state
machine CANSM_BSM_DeinitPnNotSupported of the respective network with
T_CC_SLEEP_TIMEOUT.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.4.9 State operation to do in: S_TRCV_NORMAL

[SWS_CanSM_00472] dIf for the CAN network a CAN Transceiver is con-


figured (ref. to [ECUC_CanSM_00137]), then as long the sub state ma-
chine CANSM_BSM_DeinitPnNotSupported is in the state S_TRCV_NORMAL,
the CanSM module shall operate the do action DO_SET_TRCV_MODE_NORMAL
and therefore repeat for the configured CAN Transceiver of the CAN net-
work (ref. to [ECUC_CanSM_00137]) the API request CanIf_SetTrcv-
Mode (ref. to [SWS_CanSM_91002]) with TransceiverMode equal to
CANTRCV_TRCVMODE_NORMAL.c(SRS_Can_01142, SRS_Can_01145)

59 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.20.4.10 Guarding condition: G_TRCV_NORMAL_E_OK

[SWS_CanSM_00473] dThe guarding condition G_TRCV_NORMAL_E_OK of the sub


state machine CANSM_BSM_DeinitPnNotSupported shall be passed, if the API call
of [SWS_CanSM_00472] has returned E_OK.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.4.11 Trigger: T_TRCV_NORMAL_INDICATED

[SWS_CanSM_00474] dIf CanSM module has got the CANTRCV_TRCVMODE_NORMAL


mode indication (ref. to [SWS_CanSM_00399]) for the configured CAN
Transceiver of the CAN network (ref. to [ECUC_CanSM_00137]) after the re-
spective request (ref. to [SWS_CanSM_00472]), this shall trigger the sub
state machine CANSM_BSM_DeinitPnNotSupported of the CAN network with
T_TRCV_NORMAL_INDICATED.c(SRS_Can_01142, SRS_Can_01145)
[SWS_CanSM_00556] dIf no CAN Transceiver is configured for the CAN network, then
this shall trigger the sub state machine CANSM_BSM_DeinitPnNotSupported of
the CAN network in the state S_TRCV_NORMAL with T_TRCV_NORMAL_INDICATED.c
(SRS_Can_01142, SRS_Can_01145)

7.2.20.4.12 Trigger: T_TRCV_NORMAL_TIMEOUT

[SWS_CanSM_00475] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for the supposed transceiver normal indication (ref.
to [SWS_CanSM_00474]), this condition shall trigger the sub state ma-
chine CANSM_BSM_DeinitPnNotSupported of the respective network with
T_TRCV_NORMAL_TIMEOUT.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.4.13 State operation to do in: S_TRCV_STANDBY

[SWS_CanSM_00476] dIf for the CAN network a CAN Transceiver is con-


figured (ref. to [ECUC_CanSM_00137]), then as long the sub state ma-
chine CANSM_BSM_DeinitPnNotSupported is in the state S_TRCV_STANDBY,
the CanSM module shall operate the do action DO_SET_TRCV_MODE_STANDBY
and therefore repeat for the configured CAN Transceiver of the CAN net-
work (ref. to [ECUC_CanSM_00137]) the API request CanIf_SetTrcv-
Mode (ref. to [SWS_CanSM_91002]) with TransceiverMode equal to
CANTRCV_TRCVMODE_STANDBY.c(SRS_Can_01142, SRS_Can_01145)

60 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.20.4.14 Guarding condition: G_TRCV_STANDBY_E_OK

[SWS_CanSM_00477] dThe guarding condition G_TRCV_STANDBY_E_OK of the sub


state machine CANSM_BSM_DeinitPnNotSupported shall be passed, if the API call
of [SWS_CanSM_00476] has returned E_OK.c(SRS_Can_01142, SRS_Can_01145)

7.2.20.4.15 Trigger: T_TRCV_STANDBY_INDICATED

[SWS_CanSM_00478] dIf CanSM module has got the


CANTRCV_TRCVMODE_STANDBY mode indication (ref. to [SWS_CanSM_00399]) for
the configured CAN Transceiver of the CAN network (ref. to [ECUC_CanSM_00137])
after the respective request (ref. to [SWS_CanSM_00476]), this shall trigger the
sub state machine CANSM_BSM_DeinitPnNotSupported of the CAN network with
T_TRCV_STANDBY_INDICATED.c(SRS_Can_01142, SRS_Can_01145)
[SWS_CanSM_00557] dIf no CAN Transceiver is configured for the CAN net-
work (ref. to [ECUC_CanSM_00137]), then this shall trigger the sub state ma-
chine CANSM_BSM_DeinitPnNotSupported of the CAN network in the state
S_TRCV_STANDBY with T_TRCV_STANDBY_INDICATED.c(SRS_Can_01142, SRS_-
Can_01145)

7.2.20.4.16 Trigger: CANSM_BSM_T_TRCV_STANDBY_TIMEOUT

[SWS_CanSM_00479] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for the supposed transceiver standby indication
(ref. to [SWS_CanSM_00478]), this condition shall trigger the sub state
machine CANSM_BSM_DeinitPnNotSupported of the respective network with
CANSM_BSM_T_TRCV_STANDBY_TIMEOUT.c(SRS_Can_01142, SRS_Can_01145)

61 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.21 Sub state machine: CANSM_BSM_S_SILENTCOM_BOR

stm CANSM_BSM_S_SILENTCOM_BOR

S_RESTART_CC
/E_BUS_OFF
do / DO_SET_CC_MODE_STARTED
EntryPoint

[G_RESTART_CC_E_OK]

T_RESTART_CC_TIMEOUT

T_RESTART_CC_INDICATED /E_TX_OFF

CANSM_BSM_S_RESTART_CC_WAIT

T_RESTART_CC_INDICATED /E_TX_OFF

ExitPoint

Figure 7.6: CANSM_BSM_S_SILENTCOM_BOR, sub state machine of CANSM_BSM

7.2.21.1 Effect: E_BUS_OFF

[SWS_CanSM_00605] dThe effect E_BUS_OFF of the sub state machine


CANSM_BSM_S_FULLCOM CANSM_BSM_S_SILENTCOM_BOR shall invocate Dem_-
SetEventStatus (ref. to [SWS_CanSM_91002]) with the parameters Even-
tId := CANSM_E_BUS_OFF (ref. to [ECUC_CanSM_00070]) and EventStatus :=
DEM_EVENT_STATUS_PRE_FAILED.c(SRS_BSW_00422)

7.2.21.2 State operation: S_RESTART_CC

[SWS_CanSM_00604] dAs long the sub state machine


CANSM_BSM_S_SILENTCOM_BOR is in the state S_RESTART_CC, the CanSM
module shall operate the do action DO_SET_CC_MODE_STARTED and therefore repeat
for all configured CAN controllers of the CAN network (ref. to [ECUC_CanSM_00141])
the API request CanIf_SetControllerMode (ref. to [SWS_CanSM_91002]) with
ControllerMode equal to CAN_CS_STARTED, if the current CAN controller mode
(ref. to [SWS_CanSM_00638]) is different.c(SRS_Can_01142, SRS_Can_01145,
SRS_Can_01144, SRS_Can_01146)

62 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.21.3 G_RESTART_CC_E_OK

[SWS_CanSM_00603] dThe guarding condition G_RESTART_CC_OK of the sub


state machine CANSM_BSM_S_SILENTCOM_BOR shall be passed, if all API calls
of [SWS_CanSM_00604] have returned E_OK.c(SRS_Can_01142, SRS_Can_01145,
SRS_Can_01144, SRS_Can_01146)

7.2.21.4 Trigger: T_RESTART_CC_INDICATED

[SWS_CanSM_00600] dIf CanSM module has got all mode indications (ref.
to [SWS_CanSM_00396]) for the configured CAN controllers of the CAN net-
work (ref. to [ECUC_CanSM_00141]) after the respective requests to start
the CAN controllers of the CAN network (ref. to [SWS_CanSM_00604]), this
shall trigger the sub state CANSM_BSM_S_SILENTCOM_BOR of the CAN network
with T_RESTART_CC_INDICATED.c(SRS_Can_01142, SRS_Can_01145, SRS_-
Can_01144, SRS_Can_01146)

7.2.21.5 T_RESTART_CC_TIMEOUT

[SWS_CanSM_00602] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for all supposed controller started mode indica-
tions (ref. to [SWS_CanSM_00600]), this condition shall trigger the sub
state machine CANSM_BSM_S_SILENTCOM_BOR of the respective network with
T_RESTART_CC_TIMEOUT.c(SRS_Can_01142, SRS_Can_01145, SRS_Can_01144,
SRS_Can_01146)

7.2.21.6 Effect: E_TX_OFF

The effect E_TX_OFF shall do nothing (default PDU mode after restart of CAN con-
troller is already TX OFF, ref. to CanIf SWS).

63 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.22 Sub state machine: CANSM_BSM_S_PRE_FULLCOM

stm CANSM_BSM_S_PRE_FULLCOM

S_TRCV_NORMAL [G_TRCV_NORMAL_E_OK]
EntryPoint
do / DO_SET_TRCV_MODE_NORMAL
T_TRCV_NORMAL_TIMEOUT

T_TRCV_NORMAL_INDICATED S_TRCV_NORMAL_WAIT

T_TRCV_NORMAL_INDICATED
S_CC_STOPPED

do / DO_SET_CC_MODE_STOPPED [G_CC_STOPPED_E_OK]

T_CC_STOPPED_TIMEOUT
T_CC_STOPPED_INDICATED

S_CC_STOPPED_WAIT

T_CC_STOPPED_INDICATED

S_CC_STARTED
[G_CC_STARTED_E_OK]
do / DO_SET_CC_MODE_STARTED
T_CC_STARTED_TIMEOUT

S_CC_STARTED_WAIT

T_CC_STARTED_INDICATED

T_CC_STARTED_INDICATED
ExitPoint
To
FULLCOM

Figure 7.7: CANSM_BSM_S_PRE_FULLCOM, sub state machine of CANSM_BSM

7.2.22.1 State operation to do in: S_TRCV_NORMAL

[SWS_CanSM_00483] dIf for the CAN network a CAN Transceiver is config-


ured (ref. to [ECUC_CanSM_00137]), then as long the sub state machine
CANSM_BSM_S_PRE_FULLCOM is in the state S_TRCV_NORMAL, the CanSM module
shall operate the do action DO_SET_TRCV_MODE_NORMAL and therefore repeat for
the configured CAN Transceiver of the CAN network (ref. to [ECUC_CanSM_00137])
the API request CanIf_SetTrcvMode (ref. to [SWS_CanSM_91002]) with
TransceiverMode equal to CANTRCV_TRCVMODE_NORMAL.c(SRS_Can_01145,
SRS_Can_01142)

64 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.22.2 Guarding condition: G_TRCV_NORMAL_E_OK

[SWS_CanSM_00484] dThe guarding condition G_TRCV_NORMAL_E_OK of the sub


state machine CANSM_BSM_S_PRE_FULLCOM shall be passed, if the API call of
[SWS_CanSM_00483] has returned E_OK.c(SRS_Can_01145, SRS_Can_01142)

7.2.22.3 Trigger: T_TRCV_NORMAL_INDICATED

[SWS_CanSM_00485] dIf CanSM module has got the CANTRCV_TRCVMODE_NORMAL


mode indication (ref. to [SWS_CanSM_00399]) for the configured CAN
Transceiver of the CAN network (ref. to [ECUC_CanSM_00137]) after the
respective request (ref. to [SWS_CanSM_00483]), this shall trigger the
sub state machine CANSM_BSM_S_PRE_FULLCOM of the CAN network with
T_TRCV_NORMAL_INDICATED.c(SRS_Can_01145, SRS_Can_01142)
[SWS_CanSM_00558] dIf no CAN Transceiver is configured for the CAN network
(ref. to [ECUC_CanSM_00137]), then this shall trigger the sub state machine
CANSM_BSM_S_PRE_FULLCOM of the CAN network in the state S_TRCV_NORMAL with
T_TRCV_NORMAL_INDICATED.c(SRS_Can_01145, SRS_Can_01142)

7.2.22.4 Trigger: T_TRCV_NORMAL_TIMEOUT

[SWS_CanSM_00486] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME


(ref. to [ECUC_CanSM_00336]) for the supposed transceiver normal indi-
cation (ref. to [SWS_CanSM_00485]), this condition shall trigger the sub
state machine CANSM_BSM_S_PRE_FULLCOM of the respective network with
T_TRCV_NORMAL_TIMEOUT.c(SRS_Can_01145, SRS_Can_01142)

7.2.22.5 State operation to do in: S_CC_STOPPED

[SWS_CanSM_00487] dAs long the sub state machine


CANSM_BSM_S_PRE_FULLCOM is in the state S_CC_STOPPED, the CanSM mod-
ule shall operate the do action DO_SET_CC_MODE_STOPPED and therefore repeat for
all configured CAN controllers of the CAN network (ref. to [ECUC_CanSM_00141])
the API request CanIf_SetControllerMode (ref. to [SWS_CanSM_91002]) with
ControllerMode equal to CAN_CS_STOPPED, if the current CAN controller mode
(ref. to [SWS_CanSM_00638]) is different.c(SRS_Can_01145, SRS_Can_01142)

65 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.22.6 Guarding condition: G_CC_STOPPED_OK

[SWS_CanSM_00488] dThe guarding condition G_CC_STOPPED_OK of the sub


state machine CANSM_BSM_S_PRE_FULLCOM shall be passed, if all API calls of
[SWS_CanSM_00487] have returned E_OK.c(SRS_Can_01145, SRS_Can_01142)

7.2.22.7 Trigger: T_CC_STOPPED_INDICATED

[SWS_CanSM_00489] dIf CanSM module has got all mode indications (ref. to
[SWS_CanSM_00396]) for the configured CAN controllers of the CAN network
(ref. to [ECUC_CanSM_00141]) after the respective requests to stop the CAN
controllers of the CAN network (ref. to [SWS_CanSM_00487]), this shall trig-
ger the sub state machine CANSM_BSM_S_PRE_FULLCOM of the CAN network with
T_CC_STOPPED_INDICATED.c(SRS_Can_01145, SRS_Can_01142)

7.2.22.8 Trigger: T_CC_STOPPED_TIMEOUT

[SWS_CanSM_00490] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for all supposed controller stopped mode indica-
tions (ref. to [SWS_CanSM_00489]), this condition shall trigger the sub
state machine CANSM_BSM_S_PRE_FULLCOM of the respective network with
T_CC_STOPPED_TIMEOUT.c(SRS_Can_01145, SRS_Can_01142)

7.2.22.9 State operation to do in: S_CC_STARTED

[SWS_CanSM_00491] dAs long the sub state machine


CANSM_BSM_S_PRE_FULLCOM is in the state S_CC_STARTED, the CanSM mod-
ule shall operate the do action DO_SET_CC_MODE_STARTED and therefore repeat for
all configured CAN controllers of the CAN network (ref. to [ECUC_CanSM_00141])
the API request CanIf_SetControllerMode (ref. to [SWS_CanSM_91002]) with
ControllerMode equal to CAN_CS_STARTED, if the current CAN controller mode
(ref. to [SWS_CanSM_00638]) is different.c(SRS_Can_01145, SRS_Can_01142)

7.2.22.10 Guarding condition: G_CC_STARTED_OK

[SWS_CanSM_00492] dThe guarding condition G_CC_STARTED_OK of the sub


state machine CANSM_BSM_S_PRE_FULLCOM shall be passed, if all API calls of
[SWS_CanSM_00491] have returned E_OK.c(SRS_Can_01145, SRS_Can_01142)

66 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.22.11 Trigger: T_CC_STARTED_INDICATED

[SWS_CanSM_00493] dIf CanSM module has got all mode indications (ref. to
[SWS_CanSM_00396]) for the configured CAN controllers of the CAN network
(ref. to [ECUC_CanSM_00141]) after the respective requests to start the CAN
controllers of the CAN network (ref. to [SWS_CanSM_00491]), this shall trig-
ger the sub state machine CANSM_BSM_S_PRE_FULLCOM of the CAN network with
T_CC_STARTED_INDICATED.c(SRS_Can_01145, SRS_Can_01142)

7.2.22.12 Trigger: T_CC_STARTED_TIMEOUT

[SWS_CanSM_00494] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for all supposed controller started mode indica-
tions (ref. to [SWS_CanSM_00493]), this condition shall trigger the sub
state machine CANSM_BSM_S_PRE_FULLCOM of the respective network with
T_CC_STARTED_TIMEOUT.c(SRS_Can_01145, SRS_Can_01142)

67 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.23 Sub state machine CANSM_BSM_S_FULLCOM

stm CANSM_BSM_S_FULLCOM

S_BUS_OFF_CHECK EntryPoint

[G_BUS_OFF_PASSIVE]
[G_TX_ON] /E_TX_ON /E_BUS_OFF_PASSIVE

T_BUS_OFF /E_BUS_OFF
S_NO_BUS_OFF

T_CHANGE_BR_REQUEST
S_TX_OFF /E_CHANGE_BR_BSWM_MODE

T_TX_TIMEOUT_EXCEPTION

T_RESTART_CC_INDICATED /E_TX_OFF

CANSM_BSM_S_TX_TIMEOUT_EXCEPTION
T_RESTART_CC_INDICATED /E_TX_OFF

CANSM_BSM_S_RESTART_CC_WAIT
ExitPoint TxTimeout

T_BUS_OFF /E_BUS_OFF

T_RESTART_CC_TIMEOUT

[G_RESTART_CC_E_OK]

S_RESTART_CC

do / DO_SET_CC_MODE_STARTED ExitPoint
CHANGE_BR

Figure 7.8: CANSM_BSM_S_FULLCOM, sub state machine of CANSM_BSM

7.2.23.1 Guarding condition: G_BUS_OFF_PASSIVE

[SWS_CanSM_00496] dThe guarding condition G_BUS_OFF_PASSIVE


of the sub state machine CANSM_BSM_S_FULLCOM shall be passed,
if CANSM_BOR_TX_CONFIRMATION_POLLING is disabled (ref. to
[ECUC_CanSM_00339]) and the time duration since the effect E_TX_ON is greater
or equal the configuration parameter CANSM_BOR_TIME_TX_ENSURED (ref. to
[ECUC_CanSM_00130]).c(SRS_Can_01145, SRS_Can_01142)
[SWS_CanSM_00497] dThe guarding condition G_BUS_OFF_PASSIVE
of the sub state machine CANSM_BSM_S_FULLCOM shall be passed,
if CANSM_BOR_TX_CONFIRMATION_POLLING is enabled (ref. to
[ECUC_CanSM_00339]) and the API CanIf_GetTxConfirmationState (ref.
to [SWS_CanSM_91002]) returns CANIF_TX_RX_NOTIFICATION for all configured

68 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

CAN controllers of the CAN network (ref. to [ECUC_CanSM_00141]).c(SRS_Can_-


01145, SRS_Can_01142)

7.2.23.2 Effect: E_BUS_OFF_PASSIVE

[SWS_CanSM_00498] dThe effect E_BUS_OFF_PASSIVE of the sub state ma-


chine CANSM_BSM_S_FULLCOM shall invocate Dem_SetEventStatus (ref. to
[SWS_CanSM_91002]) with the parameters EventId := CANSM_E_BUS_OFF (ref.
to [ECUC_CanSM_00070]) and EventStatus := DEM_EVENT_STATUS_PASSED.c
(SRS_BSW_00422)

7.2.23.3 Trigger: T_CHANGE_BR_REQUEST

[SWS_CanSM_00507] dIf no condition is present to deny the CanSM_SetBaudrate


request (ref. to [SWS_CanSM_00503]), this shall trigger the state machine
CANSM_BSM_S_FULLCOM and respectively the parent state machine CanSM_BSM with
T_CHANGE_BR_REQUEST (causes either a direct baud rate change if possible via
CanIf_SetBaudrate (ref. to [SWS_CanSM_91003])) or the start of the required
asynchronous process to do thatc(SRS_Can_01145, SRS_Can_01142)

7.2.23.4 Effect: E_CHANGE_BR_BSWM_MODE

[SWS_CanSM_00528] dThe effect E_CHANGE_BR_BSWM_MODE of the sub state


machine CANSM_BSM_S_FULLCOM shall call for the corresponding CAN network
the API BswM_CanSM_CurrentState (ref. to [SWS_CanSM_91002]) with the
parameters Network := CanSMComMNetworkHandleRef and CurrentState :=
CANSM_BSWM_CHANGE_BAUDRATE.c(SRS_Can_01145, SRS_Can_01142)

7.2.23.5 Trigger: T_BUS_OFF

[SWS_CanSM_00500] dThe callback function CanSM_ControllerBusOff (ref. to


[SWS_CanSM_00064]) shall trigger the sub state machine CANSM_BSM_S_FULLCOM
for the CAN network with T_BUS_OFF, if one of its configured CAN controllers matches
to the function parameter ControllerId of the callback function CanSM_Con-
trollerBusOff.c(SRS_Can_01145, SRS_Can_01142)
[SWS_CanSM_00653] dIf more than one CAN controller belongs to one CAN network
and for one of its controllers a bus-off is indicated with CanSM_ControllerBusOff,
then the CanSM shall stop in context of the effect E_BUS_OFF the other CAN con-
toller(s) of the CAN network, too.c(SRS_Can_01145, SRS_Can_01142)

69 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.23.6 Effect: E_BUS_OFF

[SWS_CanSM_00508] dThe effect E_BUS_OFF of the sub state machine


CANSM_BSM_S_FULLCOM shall call at 1st place for the corresponding CAN net-
work the API BswM_CanSM_CurrentState (ref. to [SWS_CanSM_91002]) with
the parameters Network := CanSMComMNetworkHandleRef and CurrentState
:= CANSM_BSWM_BUS_OFF.c(SRS_Can_01145, SRS_Can_01142)
[SWS_CanSM_00521] dThe effect E_BUS_OFF of the sub state machine
CANSM_BSM_S_FULLCOM shall call at 2nd place for the corresponding CAN network the
API ComM_BusSM_ModeIndication (ref. to [SWS_CanSM_91002]) with the param-
eters Channel := CanSMComMNetworkHandleRef (ref. to [ECUC_CanSM_00161])
and ComMode := COMM_SILENT_COMMUNICATION.c(SRS_Can_01145, SRS_Can_-
01142)
[SWS_CanSM_00522] dThe effect E_BUS_OFF of the sub state machine
CANSM_BSM_S_FULLCOM shall invocate Dem_SetEventStatus (ref. to
[SWS_CanSM_91002]) with the parameters EventId := CANSM_E_BUS_OFF (ref. to
[ECUC_CanSM_00070]) and EventStatus := DEM_EVENT_STATUS_PRE_FAILED.c
(SRS_BSW_00422)

7.2.23.7 State operation to do in: S_RESTART_CC

[SWS_CanSM_00509] dAs long the sub state machine CANSM_BSM_S_FULLCOM


is in the state S_RESTART_CC, the CanSM module shall operate the do action
DO_SET_CC_MODE_STARTED and therefore repeat for all configured CAN controllers
of the CAN network (ref. to [ECUC_CanSM_00141]) the API request CanIf_Set-
ControllerMode (ref. to [SWS_CanSM_91002]) with ControllerMode equal to
CAN_CS_STARTED, if the current CAN controller mode (ref. to [SWS_CanSM_00638])
is different.c(SRS_Can_01145, SRS_Can_01142)

7.2.23.8 Guarding condition: G_RESTART_CC_OK

[SWS_CanSM_00510] dThe guarding condition G_RESTART_CC_OK of the sub


state machine CANSM_BSM_S_FULLCOM shall be passed, if all API calls of
[SWS_CanSM_00509] have returned E_OK.c(SRS_Can_01145, SRS_Can_01142)

7.2.23.9 Trigger: T_RESTART_CC_INDICATED

[SWS_CanSM_00511] dIf CanSM module has got all mode indications (ref. to
[SWS_CanSM_00396]) for the configured CAN controllers of the CAN network (ref.
to [ECUC_CanSM_00141]) after the respective requests to start the CAN controllers
of the CAN network (ref. to [SWS_CanSM_00509]), this shall trigger the sub state

70 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

CANSM_BSM_S_FULLCOM of the CAN network with T_RESTART_CC_INDICATED.c


(SRS_Can_01145, SRS_Can_01142)

7.2.23.10 Trigger: T_RESTART_CC_TIMEOUT

[SWS_CanSM_00512] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for all supposed controller started mode indications
(ref. to [SWS_CanSM_00511]), this condition shall trigger the sub state machine
CANSM_BSM_S_FULLCOM of the respective network with T_RESTART_CC_TIMEOUT.c
(SRS_Can_01145, SRS_Can_01142)

7.2.23.11 Effect: E_TX_OFF

The effect E_TX_OFF shall do nothing.

7.2.23.12 Guarding condition: G_TX_ON

[SWS_CanSM_00514] dIf CanSMEnableBusOffDelay is FALSE, then guarding con-


dition G_TX_ON of the sub state machine CANSM_BSM_S_FULLCOM shall be passed
after a time duration of CanSMBorTimeL1 (ref. to [ECUC_CanSM_00128]) related to
the last T_BUS_OFF, if the count of bus-off recovery retries with E_BUS_OFF without
passing the guarding condition G_BUS_OFF_PASSIVE is lower than CanSMBorCoun-
terL1ToL2 (ref. to [ECUC_CanSM_00131]).c(SRS_Can_01145, SRS_Can_01142)
[SWS_CanSM_00515] dIf CanSMEnableBusOffDelay is FALSE, then the guarding
condition G_TX_ON of the sub state machine CANSM_BSM_S_FULLCOM shall be passed
after a time duration of CanSMBorTimeL2 (ref. to [ECUC_CanSM_00129]) related to
the last T_BUS_OFF, if the count of bus-off recovery retries with E_BUS_OFF with-
out passing the guarding condition G_BUS_OFF_PASSIVE is greater than or equal
to CanSMBorCounterL1ToL2 (ref. to [ECUC_CanSM_00131]).c(SRS_Can_01145,
SRS_Can_01142)
[SWS_CanSM_00636] dIf CanSMEnableBusOffDelay is TRUE, then the guarding
conditions of [SWS_CanSM_00514] and [SWS_CanSM_00515] shall be passed af-
ter the specified time duration in each case plus the additional random delay value,
which shall be requested after the bus-off event with the configured call out function
<User_GetBusOffDelay> (API name defined by CanSMGetBusOffDelayFunc-
tion).c(SRS_Can_01145, SRS_Can_01142)

71 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.23.13 Effect: E_TX_ON

[SWS_CanSM_00516] dIf ECU passive is FALSE (ref. to [SWS_CanSM_00646]),


then the effect E_TX_ON of the sub state machine CANSM_BSM_S_FULLCOM
shall call at 1st place for the configured CAN controllers of the CAN network
(ref. to [ECUC_CanSM_00141]) the API function CanIf_SetPduMode (ref. to
[SWS_CanSM_91002]) with the parameters ControllerId := CanSMControl-
lerId (ref. to [ECUC_CanSM_00141]) and PduModeRequest := CANIF_ONLINE.c
(SRS_Can_01158)
[SWS_CanSM_00648] dIf ECU passive is TRUE (ref. to [SWS_CanSM_00646]),
then the effect E_TX_ON of the sub state machine CANSM_BSM_S_FULLCOM
shall call at 1st place for the configured CAN controllers of the CAN net-
work (ref. to [ECUC_CanSM_00141]) the API function CanIf_SetPduMode
(ref. to [SWS_CanSM_91002]) with the parameters ControllerId := CanSM-
ControllerId (ref. to [ECUC_CanSM_00141]) and PduModeRequest :=
CANIF_TX_OFFLINE_ACTIVE.c(SRS_Can_01158)
[SWS_CanSM_00517] dThe effect E_TX_ON of the sub state machine
CANSM_BSM_S_FULLCOM shall call at 2nd place for the corresponding CAN net-
work the API BswM_CanSM_CurrentState (ref. to [SWS_CanSM_91002]) with the
parameters Network := CanSMComMNetworkHandleRef and CurrentState :=
CANSM_BSWM_FULL_COMMUNICATION.c(SRS_Can_01145, SRS_Can_01142)
[SWS_CanSM_00518] dThe effect E_TX_ON of the sub state machine
CANSM_BSM_S_FULLCOM shall call at 3rd place the API ComM_BusSM_Mod-
eIndication (ref. to [SWS_CanSM_91002]) with the parameters Channel :=
CanSMComMNetworkHandleRef (ref. to [ECUC_CanSM_00161]) and ComMode :=
COMM_FULL_COMMUNICATION.c(SRS_Can_01145, SRS_Can_01142)

7.2.23.14 Trigger: T_TX_TIMEOUT_EXCEPTION

[SWS_CanSM_00584] dThe callback function CanSM_TxTimeoutException (ref. to


[SWS_CanSM_00410]) shall trigger the sub state machine CANSM_BSM_S_FULLCOM
with T_TX_TIMEOUT_EXCEPTION.c(SRS_Can_01145, SRS_Can_01142)

7.2.23.15 Notes

In the state S_NO_BUS_OFF no state operation is required for the CanSM module.

72 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.23.16 Sub state machine: CANSM_BSM_S_TX_TIMEOUT_EXCEPTION

stm CANSM_BSM_S_TX_TIMEOUT_EXCEPTION

S_TX_TIMEOUT_EXCEPTION_PROCEED
EntryPoint
T_CC_STOPPED_TIMEOUT
S_CC_STOPPED S_CC_STOPPED_WAIT

do / DO_SET_CC_MODE_STOPPED()
[G_CC_STOPPED_E_OK]

T_CC_STOPPED_INDICATED T_CC_STOPPED_INDICATED

S_CC_STARTED

do / DO_SET_CC_MODE_STARTED()

[G_CC_STARTED_E_OK]
T_CC_STARTED_TIMEOUT

T_CC_STARTED_INDICATED
S_CC_STARTED_WAIT

T_CC_STARTED_INDICATED

ExitPoint TxTimeout

Figure 7.9: CANSM_BSM_S_TX_TIMEOUT_EXCEPTION, sub state machine of


CANSM_BSM_S_FULLCOM

7.2.23.16.1 Trigger: T_CC_STOPPED_TIMEOUT

[SWS_CanSM_00576] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for all supposed controller stopped mode indications
(ref. to [SWS_CanSM_00579]), this condition shall trigger the sub state ma-
chine CANSM_BSM_S_TX_TIMEOUT_EXCEPTION of the respective network with
T_CC_STOPPED_TIMEOUT.c(SRS_Can_01145, SRS_Can_01142)

7.2.23.16.2 Guarding condition: G_CC_STOPPED_E_OK

[SWS_CanSM_00577] dThe guarding condition G_CC_STOPPED_E_OK of the sub


state machine CANSM_BSM_S_TX_TIMEOUT_EXCEPTION shall be passed, if all API
calls of [SWS_CanSM_00578] have returned E_OK.c(SRS_Can_01145, SRS_Can_-
01142)

73 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.23.16.3 State operation: DO_SET_CC_MODE_STOPPED ()

[SWS_CanSM_00578] dAs long the sub state machine


CANSM_BSM_S_TX_TIMEOUT_EXCEPTION is in the state S_CC_STOPPED, the
CanSM module shall operate the do action DO_SET_CC_MODE_STOPPED and
therefore repeat for all configured CAN controllers of the CAN network (ref. to
[ECUC_CanSM_00141]) the API request CanIf_SetControllerMode (ref. to
[SWS_CanSM_91002]) with ControllerMode equal to CAN_CS_STOPPED, if the
current CAN controller mode (ref. to [SWS_CanSM_00638]) is different.c(SRS_Can_-
01145, SRS_Can_01142)

7.2.23.16.4 Trigger: T_CC_STOPPED_INDICATED

[SWS_CanSM_00579] dIf CanSM module has got all mode indications (ref. to
[SWS_CanSM_00396]) for the configured CAN controllers of the CAN network (ref.
to [ECUC_CanSM_00141]) after the respective requests to stop the CAN controllers
of the CAN network (ref. to [SWS_CanSM_00524]), this shall trigger the sub
state machine CANSM_BSM_S_TX_TIMEOUT_EXCEPTION of the CAN network with
T_CC_STOPPED_INDICATED.c(SRS_Can_01145, SRS_Can_01142)

7.2.23.16.5 Trigger: T_CC_STARTED_INDICATED

[SWS_CanSM_00580] dIf CanSM module has got all mode indications (ref. to
[SWS_CanSM_00396]) for the configured CAN controllers of the CAN network (ref.
to [ECUC_CanSM_00141]) after the respective requests to start the CAN controllers
of the CAN network (ref. to [SWS_CanSM_00582]), this shall trigger the sub
state machine CANSM_BSM_S_TX_TIMEOUT_EXCEPTION of the CAN network with
T_CC_STARTED_INDICATED.c(SRS_Can_01145, SRS_Can_01142)

7.2.23.16.6 Guarding condition: G_CC_STARTED_E_OK

[SWS_CanSM_00581] dThe guarding condition G_CC_STARTED_E_OK of the sub


state machine CANSM_BSM_S_TX_TIMEOUT_EXCEPTION shall be passed, if all API
calls of [SWS_CanSM_00582] have returned E_OK.c(SRS_Can_01145, SRS_Can_-
01142)

7.2.23.16.7 State operation: DO_SET_CC_MODE_STARTED

[SWS_CanSM_00582] dAs long the sub state machine


CANSM_BSM_S_TX_TIMEOUT_EXCEPTION is in the state S_CC_STARTED, the
CanSM module shall operate the do action DO_SET_CC_MODE_STARTED and
therefore repeat for all configured CAN controllers of the CAN network (ref. to

74 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

[ECUC_CanSM_00141]) the API request CanIf_SetControllerMode (ref. to


[SWS_CanSM_91002]) with ControllerMode equal to CAN_CS_STARTED, if the
current CAN controller mode (ref. to [SWS_CanSM_00638]) is different.c(SRS_Can_-
01145, SRS_Can_01142)

7.2.23.16.8 ExitPoint: TxTimeout

[SWS_CanSM_00655] dIf the sub state machine


CANSM_BSM_S_TX_TIMEOUT_EXCEPTION is triggered with
T_CC_STARTED_INDICATED, the API CanIf_SetPduMode (ref. to
[SWS_CanSM_91002]) shall be called with CANIF_ONLINE.c()

7.2.24 Sub state machine: CANSM_BSM_S_CHANGE_BAUDRATE

stm CANSM_BSM_S_CHANGE_BAUDRATE

CANSM_BSM_CHANGE_BR_SYNC

entry / DO_SET_BAUDRATE_DIRECT
EntryPoint

[G_SET_BAUDRATE_DIRECT_OK [G_SET_BAUDRATE_DIRECT_NOT_OK] [G_SET_BAUDRATE_DIRECT_OK


G_NO_COM_MODE_REQUESTED] G_NO_COM_MODE_NOT_REQUESTED]
CANSM_BSM_S_CHANGE_BAUDRATE_PROCEED

S_CC_STOPPED T_CC_STOPPED_TIMEOUT
S_CC_STOPPED_WAIT
do / DO_SET_CC_MODE_STOPPED [G_CC_STOPPED_E_OK]

T_CC_STOPPED_INDICATED T_CC_STOPPED_INDICATED
/E_CHANGE_BAUDRATE /E_CHANGE_BAUDRATE

S_CC_STARTED

do / DO_SET_CC_MODE_STARTED

T_CC_STARTED_INDICATED T_CC_STARTED_INDICATED
[G_NO_COM_MODE_REQUESTED] [G_NO_COM_MODE_NOT_REQUESTED]

[G_CC_STARTED_E_OK] T_CC_STARTED_TIMEOUT

S_CC_STARTED_WAIT

T_CC_STARTED_INDICATED T_CC_STARTED_INDICATED
[G_NO_COM_MODE_REQUESTED] [G_NO_COM_MODE_NOT_REQUESTED]

ExitPoint
ExitPoint
NO_COM FULL_OR_SILENT_COM

Figure 7.10: CANSM_BSM_S_CHANGE_BAUDRATE, sub state machine of CANSM_BSM

75 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.24.1 State operation to do on entry: DO_SET_BAUDRATE_DIRECT

[SWS_CanSM_00639] dThe state operation DO_SET_BAUDRATE_DIRECT shall call


the API request CanIf_SetBaudrate (ref. to [SWS_CanSM_91003])) for all con-
figured CAN controllers of the CAN network (ref. to [ECUC_CanSM_00141] with the
respective ControllerId parameter. It shall use as BaudRateConfigID parame-
ter the respective function parameter BaudRateConfigID from the call CanSM_Set-
Baudrate.c(SRS_Can_01145, SRS_Can_01142)

7.2.24.2 Guarding condition: G_SET_BAUDRATE_DIRECT_OK

[SWS_CanSM_00641] dIf all CanIf_SetBaudrate (ref. to [SWS_CanSM_91003]))


(ref. to [SWS_CanSM_00639]) requests returned with E_OK, the guarding condi-
tion G_SET_BAUDRATE_DIRECT_OK shall be passed.c(SRS_Can_01145, SRS_Can_-
01142)

7.2.24.3 Guarding conditions: G_SET_BAUDRATE_DIRECT_NOT_OK

[SWS_CanSM_00642] dIf any of the CanIf_SetBaudrate (ref. to


[SWS_CanSM_91003])) (ref. to [SWS_CanSM_00639]) requests did return
with E_NOT_OK, the guarding condition G_SET_BAUDRATE_NOT_OK of the state
CANSM_BSM_CHANGE_BR_SYNC shall be passed.c(SRS_Can_01145, SRS_Can_-
01142)

7.2.24.4 State operation to do in: S_CC_STOPPED

[SWS_CanSM_00524] dAs long the sub state machine


CANSM_BSM_S_CHANGE_BAUDRATE is in the state S_CC_STOPPED, the CanSM
module shall operate the do action DO_SET_CC_MODE_STOPPED and therefore repeat
for all configured CAN controllers of the CAN network (ref. to [ECUC_CanSM_00141])
the API request CanIf_SetControllerMode (ref. to [SWS_CanSM_91002]) with
ControllerMode equal to CAN_CS_STOPPED, if the current CAN controller mode
(ref. to [SWS_CanSM_00638]) is different.c(SRS_Can_01145, SRS_Can_01142)

7.2.24.5 Guarding condition: G_CC_STOPPED_OK

[SWS_CanSM_00525] dThe guarding condition G_CC_STOPPED_OK of the sub state


machine CANSM_BSM_S_CHANGE_BAUDRATE shall be passed, if all API calls of
[SWS_CanSM_00524] have returned E_OK.c(SRS_Can_01145, SRS_Can_01142)

76 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.24.6 Trigger: T_CC_STOPPED_INDICATED

[SWS_CanSM_00526] dIf CanSM module has got all mode indications (ref. to
[SWS_CanSM_00396]) for the configured CAN controllers of the CAN network (ref.
to [ECUC_CanSM_00141]) after the respective requests to stop the CAN con-
trollers of the CAN network (ref. to [SWS_CanSM_00524]), this shall trigger the
sub state machine CANSM_BSM_S_CHANGE_BAUDRATE of the CAN network with
T_CC_STOPPED_INDICATED.c(SRS_Can_01145, SRS_Can_01142)

7.2.24.7 Trigger: T_CC_STOPPED_TIMEOUT

[SWS_CanSM_00527] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for all supposed controller stopped mode indica-
tions (ref. to [SWS_CanSM_00526]), this condition shall trigger the sub
state machine CANSM_BSM_S_CHANGE_BAUDRATE of the respective network with
T_CC_STOPPED_TIMEOUT.c(SRS_Can_01145, SRS_Can_01142)

7.2.24.8 Effect: E_CHANGE_BAUDRATE

[SWS_CanSM_00529] dThe effect E_CHANGE_BAUDRATE of the sub state machine


CANSM_BSM_S_CHANGE_BAUDRATE shall call at 1st place for the corresponding CAN
network the API ComM_BusSM_ModeIndication (ref. to [SWS_CanSM_91002])
with the parameters Channel := CanSMComMNetworkHandleRef (ref. to
[ECUC_CanSM_00161]) and ComMode := COMM_NO_COMMUNICATION.c(SRS_Can_-
01145, SRS_Can_01142)
[SWS_CanSM_00531] dThe effect E_CHANGE_BAUDRATE of the sub state machine
CANSM_BSM_S_CHANGE_BAUDRATE shall call at 2nd place for all configured CAN
controllers of the CAN network (ref. to [ECUC_CanSM_00141]) the API request
CanIf_SetBaudrate (ref. to [SWS_CanSM_91003])) with the respective Control-
lerId parameter and shall use as BaudRateConfigID parameter the remembered
BaudRateConfigID from the call CanSM_SetBaudrate.c(SRS_Can_01145, SRS_-
Can_01142)

7.2.24.9 State operation to do in: S_CC_STARTED

[SWS_CanSM_00532] dAs long the sub state machine


CANSM_BSM_S_CHANGE_BAUDRATE is in the state S_CC_STARTED, the CanSM
module shall operate the do action DO_SET_CC_MODE_STARTED and therefore repeat
for all configured CAN controllers of the CAN network (ref. to [ECUC_CanSM_00141])
the API request CanIf_SetControllerMode (ref. to [SWS_CanSM_91002]) with
ControllerMode equal to CAN_CS_STARTED, if the current CAN controller mode
(ref. to [SWS_CanSM_00638]) is different.c(SRS_Can_01145, SRS_Can_01142)

77 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.2.24.10 Guarding condition: G_CC_STARTED_OK

[SWS_CanSM_00533] dThe guarding condition G_CC_STARTED_OK of the sub state


machine CANSM_BSM_S_CHANGE_BAUDRATE shall be passed, if all API calls of
[SWS_CanSM_00532] have returned E_OK.c(SRS_Can_01145, SRS_Can_01142)

7.2.24.11 Trigger: T_CC_STARTED_INDICATED

[SWS_CanSM_00534] dIf CanSM module has got all mode indications (ref. to
[SWS_CanSM_00396]) for the configured CAN controllers of the CAN network (ref.
to [ECUC_CanSM_00141]) after the respective requests to start the CAN con-
trollers of the CAN network (ref. to [SWS_CanSM_00532]), this shall trigger the
sub state machine CANSM_BSM_S_CHANGE_BAUDRATE of the CAN network with
T_CC_STARTED_INDICATED.c(SRS_Can_01145, SRS_Can_01142)

7.2.24.12 Trigger: T_CC_STARTED_TIMEOUT

[SWS_CanSM_00535] dAfter a timeout of CANSM_MODEREQ_REPEAT_TIME (ref.


to [ECUC_CanSM_00336]) for all supposed controller started mode indica-
tions (ref. to[SWS_CanSM_00534]), this condition shall trigger the sub
state machine CANSM_BSM_S_CHANGE_BAUDRATE of the respective network with
T_CC_STARTED_TIMEOUT.c(SRS_Can_01145, SRS_Can_01142)

7.2.24.13 Guarding condition: G_NO_COM_MODE_REQUESTED

[SWS_CanSM_00542] dThe sub state machine CANSM_BSM_S_CHANGE_BAUDRATE


shall pass the guarding condition G_NO_COM_MODE_REQUESTED, if the latest ac-
cepted communication mode request with CanSM_RequestComMode (ref. to
[SWS_CanSM_00635]) for the respective network handle of the state machine has
been with the parameter ComM_Mode equal to COMM_NO_COMMUNICATION.c(SRS_-
Can_01145, SRS_Can_01142)

7.2.24.14 Guarding condition: G_NO_COM_MODE_NOT_REQUESTED

[SWS_CanSM_00543] dThe sub state machine CANSM_BSM_S_CHANGE_BAUDRATE


shall pass the guarding condition G_NO_COM_MODE_NOT_REQUESTED, if the lat-
est accepted communication mode request with CanSM_RequestComMode (ref. to
[SWS_CanSM_00635]) for the respective network handle of the state machine has
been with the parameter ComM_Mode equal to COMM_SILENT_COMMUNICATION or
COMM_FULL_COMMUNICATION.c(SRS_Can_01145, SRS_Can_01142)

78 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.3 Error Classification


Section "Error Handling" of the document [2] "General Specification of Basic Software
Modules" 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.3.1 Development Errors

[SWS_CanSM_00654] Definiton of development errors in module CanSM d


Type of error Related error code Error value
API service used without module initialization CANSM_E_UNINIT 0x01
API service called with wrong pointer CANSM_E_PARAM_POINTER 0x02
API service called with wrong parameter CANSM_E_INVALID_NETWORK_HANDLE 0x03
API service called with wrong parameter CANSM_E_PARAM_CONTROLLER 0x04
API service called with wrong parameter CANSM_E_PARAM_TRANSCEIVER 0x05
DeInit API service called when not all CAN CANSM_E_NOT_IN_NO_COM 0x0B
networks are in state CANSM_NO_
COMMUNICATION

c(SRS_BSW_00337)

7.3.2 Runtime Errors

[SWS_CanSM_00664] Definiton of runtime errors in module CanSM d


Type of error Related error code Error value
Mode request for a network failed more often than CANSM_E_MODE_REQUEST_TIMEOUT 0x0A
allowed by configuration

c(SRS_BSW_00466)

7.3.3 Transient Faults

There are no transient faults.

7.3.4 Production Errors

There are no production errors.

79 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

7.3.5 Extended Production Errors

There are no extended production errors.

7.3.5.1 CANSM_E_BUS_OFF

[SWS_CanSM_00666] d

Error Name: CANSM_E_BUS_OFF (ref. to ECUC_CanSM_00070)


Short Description: Bus-off detection
Long Description: The bus-off recovery state machine of a CAN network has
detected a certain amount of sequential bus-offs without
successful recovery
Recommended DTC: Assigned by DEM
Detection Criteria: Fail PRE_FAILED when CanSM_ControllerBusOff is
called (T_BUS_OFF/E_BUS_OFF),
debouncing to be defined by OEM in DEM
Pass After successful transmission of a CAN frame
(G_BUS_OFF_PASSIVE/E_BUS_OFF_
PASSIVE)
Secondary None
Parameters:
Time Required: PRE_FAILED immediately (in error interrupt context),
FAILED depending on debounce configuration of DEM
Monitor Frequency Continuous
MIL illumniation: Assigned by DEM

c()

7.4 ECU online active / passive mode


[SWS_CanSM_00646] dThe CanSM module shall store the state of the requested
ECU passive mode (ref. to [SWS_CanSM_00644]).c(SRS_Can_01158)
[SWS_CanSM_00649] dWhen CanSM_SetEcuPassive is called with
CanSM_Passive=true; (ref. to [SWS_CanSM_00644]), then the CanSM shall
change all PDU modes of the configured CAN controllers, which are CANIF_ONLINE
at the moment to CANIF_TX_OFFLINE_ACTIVE by calling the API CanIf_Set-
PduMode (ref. to [SWS_CanSM_91002]) with the parameters ControllerId :=
CanSMControllerId (ref. to [ECUC_CanSM_00141]) and PduModeRequest :=
CANIF_TX_OFFLINE_ACTIVE.c(SRS_Can_01158)

80 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

[SWS_CanSM_00650] dIf CanSM_SetEcuPassive called with CanSM_Passive=


false; (ref. to [SWS_CanSM_00644]), then the CanSM shall change all PDU
modes of the configured CAN controllers, which are CANIF_TX_OFFLINE_ACTIVE
at the moment to CANIF_ONLINE by calling the API CanIf_SetPduMode (ref. to
[SWS_CanSM_91002]) with the parameters ControllerId := CanSMControl-
lerId (ref. to [ECUC_CanSM_00141]) and PduModeRequest := CANIF_ONLINE.c
(SRS_Can_01158)
[SWS_CanSM_00656] dIf the CanSM module needs informations about the ac-
tual PduMode, the CanSM shall call the API CanIf_GetPduMode (ref. to
[SWS_CanSM_91002]) to get the current Pdu Mode of the CanIf.c(SRS_Can_01158)

7.5 Non-functional design rules


The CanSM shall cover the software module design requirements of the [12, General
Requirements on Basic Software Modules].

81 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

8 API specification

8.1 Imported types


In this chapter all types included from the following modules are listed:
[SWS_CanSM_00243] Definition of imported datatypes of module CanSM d
Module Header File Imported Type
Can Can_GeneralTypes.h Can_ControllerStateType
CanIf CanIf.h CanIf_NotifStatusType
CanIf.h CanIf_PduModeType
CanTrcv Can_GeneralTypes.h CanTrcv_TrcvModeType
ComM Rte_ComM_Type.h ComM_ModeType
ComStack_Types ComStack_Types.h NetworkHandleType
Dem Rte_Dem_Type.h Dem_EventIdType
Rte_Dem_Type.h Dem_EventStatusType
Std Std_Types.h Std_ReturnType
Std_Types.h Std_VersionInfoType

c()

8.2 Type definitions


The following tables contain the type definitions of the CanSM module.

8.2.1 CanSM_ConfigType

[SWS_CanSM_00597] Definition of datatype CanSM_ConfigType d


Name CanSM_ConfigType
Kind Structure
Elements –
Type –
Comment –
Description This type defines a data structure for the post build parameters of the CanSM. At initialization the
CanSM gets a pointer to a structure of this type to get access to its configuration data, which is
necessary for initialization.
Available via CanSM.h

c(SRS_BSW_00400, SRS_BSW_00438)

82 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

8.2.2 CanSM_BswMCurrentStateType

[SWS_CanSM_00598] Definition of datatype CanSM_BswMCurrentStateType d


Name CanSM_BswMCurrentStateType
Kind Enumeration
Range CANSM_BSWM_NO_ – –
COMMUNICATION
CANSM_BSWM_SILENT_ – –
COMMUNICATION
CANSM_BSWM_FULL_ – –
COMMUNICATION
CANSM_BSWM_BUS_OFF – –
CANSM_BSWM_ – –
CHANGE_BAUDRATE
Description Can specific communication modes / states notified to the BswM module
Available via CanSM.h

c(SRS_ModeMgm_09251)

8.3 Function definitions


The following sections specify the provided API functions of the CanSM module.

8.3.1 CanSM_Init

[SWS_CanSM_00023] Definition of API function CanSM_Init d


Service Name CanSM_Init
Syntax void CanSM_Init (
const CanSM_ConfigType* ConfigPtr
)
Service ID [hex] 0x00
Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) ConfigPtr Pointer to init structure for the post build parameters of the Can
SM
Parameters (inout) None
Parameters (out) None
Return value None
Description This service initializes the CanSM module
Available via CanSM.h

c(SRS_BSW_00405, SRS_BSW_00101, SRS_BSW_00406, SRS_BSW_00358,


SRS_BSW_00414, SRS_BSW_00404, SRS_BSW_00400, SRS_BSW_00438)

83 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

8.3.2 CanSM_DeInit

[SWS_CanSM_91001] Definition of API function CanSM_DeInit d


Service Name CanSM_DeInit
Syntax void CanSM_DeInit (
void
)
Service ID [hex] 0x14
Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) None
Parameters (inout) None
Parameters (out) None
Return value None
Description This service de-initializes the CanSM module.
Available via CanSM.h

c(SRS_Can_01164, 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 CanSM_DeInit function has to ensure all CAN networks are in
the state CANSM_NO_COMMUNICATION.
[SWS_CanSM_00660] dIf development error detection for the CanSM module is en-
abled: The function CanSM_DeInit shall raise the error CANSM_E_NOT_IN_NO_COM
if not all CAN networks are in state CANSM_NO_COMMUNICATION.c(SRS_BSW_00369)

8.3.3 CanSM_RequestComMode

[SWS_CanSM_00062] Definition of API function CanSM_RequestComMode d


Service Name CanSM_RequestComMode
Syntax Std_ReturnType CanSM_RequestComMode (
NetworkHandleType network,
ComM_ModeType ComM_Mode
)
Service ID [hex] 0x02
Sync/Async Asynchronous
Reentrancy Reentrant (only for different network handles)
Parameters (in) network Handle of destined communication network for request
ComM_Mode Requested communication mode
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: Service accepted
E_NOT_OK: Service denied
Description This service shall change the communication mode of a CAN network to the requested one.
Available via CanSM.h

84 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

c(SRS_Can_01145, SRS_Can_01142) Remark: Please refer to [5, Specification of


Communication Manager] for a detailed description of the communication modes.
[SWS_CanSM_00369] dThe function CanSM_RequestComMode shall accept its re-
quest, if the NetworkHandle parameter of the request is a handle contained in the con-
figuration of the CanSM module (ref. to [ECUC_CanSM_00161]).c(SRS_Can_01145,
SRS_Can_01142)
[SWS_CanSM_00370] dThe function CanSM_RequestComMode shall deny its re-
quest, if the NetworkHandle parameter of the request is not a handle contained in
the configuration of the CanSM module (ref. to [ECUC_CanSM_00161]).c(SRS_Can_-
01145, SRS_Can_01142)
[SWS_CanSM_00555] dThe CanSM module shall deny the API requestCanSM_-
RequestComMode, if the initial transition for the requested CAN network is
not finished yet after the CanSM_Init request (ref. to [SWS_CanSM_00423],
[SWS_CanSM_00430]).c(SRS_Can_01145, SRS_Can_01142)
[SWS_CanSM_00183] dThe function CanSM_RequestComMode shall call the func-
tion Det_ReportError (ref. to [SWS_CanSM_91003]) with ErrorId parameter
CANSM_E_INVALID_NETWORK_HANDLE, if it does not accept the network handle of
the request.c(SRS_Can_01145, SRS_Can_01142)
[SWS_CanSM_00182] dIf the function CanSM_RequestComMode accepts the re-
quest, the request shall be considered by the CanSM state machine (ref. to
[SWS_CanSM_00635]).c(SRS_Can_01145, SRS_Can_01142)
[SWS_CanSM_00184] dIf the CanSM module is not initialized, when the function
CanSM_RequestComMode is called, then this function shall call the function Det_-
ReportError (ref. to [SWS_CanSM_91003]) with ErrorId parameter CANSM_E_-
UNINIT.c(SRS_BSW_00406)

8.3.4 CanSM_GetCurrentComMode

[SWS_CanSM_00063] Definition of API function CanSM_GetCurrentComMode d


Service Name CanSM_GetCurrentComMode
Syntax Std_ReturnType CanSM_GetCurrentComMode (
NetworkHandleType network,
ComM_ModeType* ComM_ModePtr
)
Service ID [hex] 0x03
Sync/Async Synchronous
Reentrancy Reentrant
Parameters (in) network Network handle, whose current communication mode shall be put
out
Parameters (inout) None
Parameters (out) ComM_ModePtr Pointer, where to put out the current communication mode
5

85 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Return value Std_ReturnType E_OK: Service accepted
E_NOT_OK: Service denied
Description This service shall put out the current communication mode of a CAN network.
Available via CanSM.h

c(SRS_ModeMgm_09084)
[SWS_CanSM_00282] dThe CanSM module shall return E_NOT_OK for the API re-
quest CanSM_GetCurrentComMode until the call of the provided API CanSM_Init
(ref. to [SWS_CanSM_00023]).c(SRS_Can_01142)
[SWS_CanSM_00371] dThe function CanSM_GetCurrentComMode shall accept its
request, if the NetworkHandle parameter of the request is a handle contained in the
configuration of the CanSM module (ref. to [ECUC_CanSM_00161]).c(SRS_Can_-
01142)
[SWS_CanSM_00372] dThe function CanSM_GetCurrentComMode shall deny its re-
quest, if the NetworkHandle parameter of the request is not a handle contained in the
configuration of the CanSM module (ref. to [ECUC_CanSM_00161]).c(SRS_Can_-
01142)
[SWS_CanSM_00187] dThe function CanSM_GetCurrentComMode shall call the
function Det_ReportError (ref. to [SWS_CanSM_91003]) with ErrorId param-
eter CANSM_E_INVALID_NETWORK_HANDLE, if it does not accept the network handle
of the request.c(SRS_Can_01142)
[SWS_CanSM_00186] dThe function CanSM_GetCurrentComMode shall put out the
current communication mode for the network handle (ref. to [SWS_CanSM_00266])
to the designated pointer of type ComM_ModeType, if it accepts the request.c(SRS_-
Can_01142)
[SWS_CanSM_00188] dIf the CanSM module is not initialized (ref. to
[SWS_CanSM_00282]), when the function CanSM_GetCurrentComMode is
called, then this function shall call the function Det_ReportError (ref. to
[SWS_CanSM_91003]) with ErrorId parameter CANSM_E_UNINIT.c(SRS_-
Can_01142)
[SWS_CanSM_00360] dThe function CanSM_GetCurrentComMode shall report the
development error CANSM_E_PARAM_POINTER to the DET, if the user of this function
hands over a NULL-pointer as ComM_ModePtr.c(SRS_Can_01142)

86 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

8.3.5 CanSM_StartWakeupSource

[SWS_CanSM_00609] Definition of API function CanSM_StartWakeupSource d


Service Name CanSM_StartWakeupSource
Syntax Std_ReturnType CanSM_StartWakeupSource (
NetworkHandleType network
)
Service ID [hex] 0x11
Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) network Affected CAN network
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: Request accepted
E_NOT_OK: Request denied
Description This function shall be called by EcuM when a wakeup source shall be started.
Available via CanSM.h

c(SRS_Can_01145)
[SWS_CanSM_00611] dThe API function CanSM_StartWakeupSource shall return
E_NOT_OK, if the CanSM module is not initialized yet with CanSM_Init (ref. to
[SWS_CanSM_00023]).c(SRS_Can_01145)
[SWS_CanSM_00617] dThe function CanSM_StartWakeupSource shall call the
function Det_ReportError (ref. to [SWS_CanSM_91003]) with ErrorId param-
eter CANSM_E_UNINIT, if the CanSM module is not initialized yet with CanSM_Init
(ref. to [SWS_CanSM_00023]).c(SRS_Can_01145)
[SWS_CanSM_00612] dThe function CanSM_StartWakeupSource shall return
E_NOT_OK, if the CanSM module is initialized and the network parameter of the re-
quest is not a handle contained in the configuration of the CanSM module (ref. to
[ECUC_CanSM_00161]).c(SRS_Can_01145)
[SWS_CanSM_00613] dThe function CanSM_StartWakeupSource shall call the
function Det_ReportError (ref. to [SWS_CanSM_91003]) with ErrorId pa-
rameter CANSM_E_INVALID_NETWORK_HANDLE, if the CanSM module is initialized
and the requested handle is invalid concerning the CanSM configuration (ref. to
[ECUC_CanSM_00161]).c(SRS_Can_01145)
[SWS_CanSM_00616] dThe function CanSM_StartWakeupSource shall return
E_OK and it shall be considered as trigger (ref. to [SWS_CanSM_00607]) for the state
machine of the related network, if the CanSM module is initialized and the requested
handle is valid concerning the CanSM configuration (ref. to [ECUC_CanSM_00161]).c
(SRS_Can_01145)

87 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

8.3.6 CanSM_StopWakeupSource

[SWS_CanSM_00610] Definition of API function CanSM_StopWakeupSource d


Service Name CanSM_StopWakeupSource
Syntax Std_ReturnType CanSM_StopWakeupSource (
NetworkHandleType network
)
Service ID [hex] 0x12
Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) network Affected CAN network
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: Request accepted
E_NOT_OK: Request denied
Description This function shall be called by EcuM when a wakeup source shall be stopped.
Available via CanSM.h

c(SRS_Can_01145)
[SWS_CanSM_00618] dThe API function CanSM_StopWakeupSource shall return
E_NOT_OK, if the CanSM module is not initialized yet with CanSM_Init (ref. to
[SWS_CanSM_00023]).c(SRS_Can_01145)
[SWS_CanSM_00619] dThe function CanSM_StopWakeupSource shall call the func-
tion Det_ReportError (ref. to [SWS_CanSM_91003]) with ErrorId parameter
CANSM_E_UNINIT, if the CanSM module is not initialized yet with CanSM_Init (ref.
to [SWS_CanSM_00023]).c(SRS_Can_01145)
[SWS_CanSM_00620] dThe function CanSM_StopWakeupSource shall return
E_NOT_OK, if the CanSM module is initialized and the network parameter of the re-
quest is not a handle contained in the configuration of the CanSM module (ref. to
[ECUC_CanSM_00161]).c(SRS_Can_01145)
[SWS_CanSM_00621] dThe function CanSM_StopWakeupSource shall call the
function Det_ReportError (ref. to [SWS_CanSM_91003]) with ErrorId pa-
rameter CANSM_E_INVALID_NETWORK_HANDLE, if the CanSM module is initialized
and the requested handle is invalid concerning the CanSM configuration (ref. to
[ECUC_CanSM_00161]).c(SRS_Can_01145)
[SWS_CanSM_00622] dThe function CanSM_StopWakeupSource shall return E_OK
and it shall be considered as trigger (ref. to [SWS_CanSM_00608]) for the state ma-
chine of the related network, if the CanSM module is initialized and the requested
handle is valid concerning the CanSM configuration (ref. to [ECUC_CanSM_00161]).c
(SRS_Can_01145)

88 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

8.3.7 Optional

8.3.7.1 CanSM_GetVersionInfo

[SWS_CanSM_00024] Definition of API function CanSM_GetVersionInfo d


Service Name CanSM_GetVersionInfo
Syntax void CanSM_GetVersionInfo (
Std_VersionInfoType* VersionInfo
)
Service ID [hex] 0x01
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 puts out the version information of this module (module ID, vendor ID, vendor
specific version numbers related to BSW00407)
Available via CanSM.h

c(SRS_BSW_00407, SRS_BSW_00003)
[SWS_CanSM_00374] dThe function CanSM_GetVersionInfo shall report the de-
velopment error CANSM_E_PARAM_POINTER to the DET, if the user of this func-
tion hands over a NULL-pointer as VersionInfo.c(SRS_BSW_00407, SRS_BSW_-
00003)

8.3.7.2 CanSM_SetBaudrate

[SWS_CanSM_00561] Definition of API function CanSM_SetBaudrate d


Service Name CanSM_SetBaudrate
Syntax Std_ReturnType CanSM_SetBaudrate (
NetworkHandleType Network,
uint16 BaudRateConfigID
)
Service ID [hex] 0x0d
Sync/Async Synchronous
Reentrancy Reentrant for different Networks. Non reentrant for the same Network.
Parameters (in) Network Handle of the addressed CAN network for the baud rate change
BaudRateConfigID references a baud rate configuration by ID (see CanController
BaudRateConfigID)
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: Service request accepted, setting of (new) baud rate
started
E_NOT_OK: Service request not accepted
5

89 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Description This service shall start an asynchronous process to change the baud rate for the configured
CAN controllers of a certain CAN network. Depending on necessary baud rate modifications
the controllers might have to reset.
Available via CanSM.h

c(SRS_Can_01142)
[SWS_CanSM_00569] dThe CanSM module shall provide the API function CanSM_-
SetBaudrate, if the CanSMSetBaudrateApi parameter is configured with the value
TRUE.c(SRS_Can_01142)
[SWS_CanSM_00570] dThe CanSM module shall not provide the API function
CanSM_SetBaudrate, if the CanSMSetBaudrateApi is configured with the value
FALSE.c(SRS_Can_01142)
[SWS_CanSM_00502] dThe CanSM module shall deny the CanSM_SetBaudrate
API request, if the NetworkHandle parameter does not match to the configured Net-
work handles of the CanSM module (ref. to [ECUC_CanSM_00161]).c(SRS_Can_-
01142)
[SWS_CanSM_00504] dThe function CanSM_SetBaudrate shall call the function
Det_ReportError (ref. to [SWS_CanSM_91003]) with ErrorId parameter
CANSM_E_INVALID_NETWORK_HANDLE, if it does not accept the network handle of
the request.c(SRS_Can_01142)
[SWS_CanSM_00505] dThe function CanSM_SetBaudrate shall deny its re-
quest, if the requested CAN network is not in the communication mode
COMM_FULL_COMMUNICATION.c(SRS_Can_01142)
[SWS_CanSM_00530] dThe CanSM module shall deny the CanSM_SetBaudrate
API request, if the CanSM module is not initialized.c(SRS_Can_01142)
[SWS_CanSM_00506] dIf the function CanSM_SetBaudrate is called and the
CanSM module is not initialized, then this function shall call the function Det_Re-
portError (ref. to [SWS_CanSM_91003]) with ErrorId parameter CANSM_E_-
UNINIT.c(SRS_Can_01142)
[SWS_CanSM_00503] dIIf no condition is present to deny the CanSM_SetBau-
drate request according to [SWS_CanSM_00502] and [SWS_CanSM_00505],
[SWS_CanSM_00530], then the CanSM module shall return E_OK and operate the
process for the requested baud rate change as specified with [SWS_CanSM_00507].c
(SRS_Can_01142)

90 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

8.3.7.3 CanSM_SetEcuPassive

[SWS_CanSM_00644] Definition of API function CanSM_SetEcuPassive d


Service Name CanSM_SetEcuPassive
Syntax Std_ReturnType CanSM_SetEcuPassive (
boolean CanSM_Passive
)
Service ID [hex] 0x13
Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) CanSM_Passive TRUE: set all CanSM channels to passive, i.e. receive only
FALSE: set all CanSM channels back to non-passive
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: Request accepted
E_NOT_OK: Request not accepted
Description This function can be used to set all CanSM channels of the ECU to a receive only mode.
Available via CanSM.h

c(SRS_Can_01158)
[SWS_CanSM_00645] dThe CanSM module shall provide the API function CanSM_-
SetEcuPassive, if the CanSMTxOfflineActiveSupport parameter is configured
with the value TRUE.c(SRS_Can_01158)

8.4 Call-back notifications


This is a list of functions provided for other modules.

8.4.1 CanSM_ControllerBusOff

[SWS_CanSM_00064] Definition of callback function CanSM_ControllerBusOff d


Service Name CanSM_ControllerBusOff
Syntax void CanSM_ControllerBusOff (
uint8 ControllerId
)
Service ID [hex] 0x04
Sync/Async Synchronous
Reentrancy Reentrant (only for different CanControllers)
Parameters (in) ControllerId CAN controller, which detected a bus-off event
Parameters (inout) None
Parameters (out) None
Return value None
5

91 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Description This callback function notifies the CanSM about a bus-off event on a certain CAN controller,
which needs to be considered with the specified bus-off recovery handling for the impacted
CAN network.
Available via CanSM_CanIf.h

c(SRS_BSW_00359, SRS_BSW_00333)
[SWS_CanSM_00189] dIf the function CanSM_ControllerBusOff gets a Con-
troller, which is not configured as CanSMControllerId in the configuration
of the CanSM module, it shall call the function Det_ReportError (ref. to
[SWS_CanSM_91003]) with ErrorId parameter CANSM_E_PARAM_CONTROLLER.c
(SRS_BSW_00359, SRS_BSW_00333)
[SWS_CanSM_00190] dIf the CanSM module is not initialized, when the function
CanSM_ControllerBusOff is called, then the function CanSM_ControllerBu-
sOff shall call the function Det_ReportError (ref. to [SWS_CanSM_91003]) with
ErrorId parameter CANSM_E_UNINIT.c(SRS_BSW_00359, SRS_BSW_00333)
[SWS_CanSM_00235] dIf the CanSM module is initialized and the input parameter
Controller is one of the CAN controllers configured with the parameter CanSMCon-
trollerId, this bus-off event shall be considered by the CAN Network state machine
(ref. to [SWS_CanSM_00500]).c(SRS_BSW_00359, SRS_BSW_00333)
Additional remarks:
1.) The call context is either on interrupt level (interrupt mode) or on task level (polling
mode).
2.) Reentrancy is necessary for multiple CAN controller usage.

8.4.2 CanSM_ControllerModeIndication

[SWS_CanSM_00396] Definition of callback function CanSM_ControllerModeIn-


dication d
Service Name CanSM_ControllerModeIndication
Syntax void CanSM_ControllerModeIndication (
uint8 ControllerId,
Can_ControllerStateType ControllerMode
)
Service ID [hex] 0x07
Sync/Async Synchronous
Reentrancy Reentrant (only for different CAN controllers)
Parameters (in) ControllerId CAN controller, whose mode has changed
ControllerMode Notified CAN controller mode
Parameters (inout) None
Parameters (out) None
Return value None
5

92 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Description This callback shall notify the CanSM module about a CAN controller mode change.
Available via CanSM_CanIf.h

c(SRS_Can_01145)
[SWS_CanSM_00397] dIf the function CanSM_ControllerModeIndication gets
a ControllerId, which is not configured as CanSMControllerId in the config-
uration of the CanSM module, it shall call the function Det_ReportError (ref. to
[SWS_CanSM_91003]) with ErrorId parameter CANSM_E_PARAM_CONTROLLER.c
(SRS_Can_01145)
[SWS_CanSM_00398] dIf the CanSM module is not initialized, when the func-
tion CanSM_ControllerModeIndication is called, then the function CanSM_-
ControllerModeIndication shall call the function Det_ReportError (ref. to
[SWS_CanSM_91003]) with ErrorId parameter CANSM_E_UNINIT.c(SRS_Can_-
01145)

8.4.3 CanSM_TransceiverModeIndication

[SWS_CanSM_00399] Definition of callback function CanSM_TransceiverMode


Indication d
Service Name CanSM_TransceiverModeIndication
Syntax void CanSM_TransceiverModeIndication (
uint8 TransceiverId,
CanTrcv_TrcvModeType TransceiverMode
)
Service ID [hex] 0x09
Sync/Async Synchronous
Reentrancy Reentrant for different CAN Transceivers
Parameters (in) TransceiverId CAN transceiver, whose mode has changed
TransceiverMode Notified CAN transceiver mode
Parameters (inout) None
Parameters (out) None
Return value None
Description This callback shall notify the CanSM module about a CAN transceiver mode change.
Available via CanSM_CanIf.h

c(SRS_Can_01145, SRS_Can_01142) Note: CANTRCV_TRCVMODE_SLEEP state


can be requested to Can_Trcv module only by integration code and not by CanSM
module. Hence when CanSM_TransceiverModeIndication() is invoked for
CANTRCV_TRCVMODE_SLEEP, CanSM module should ignore this request.
[SWS_CanSM_00400] dIf the function CanSM_TransceiverModeIndication gets
a TransceiverId, which is not configured as CanSMTransceiverId in the con-
figuration of the CanSM module, it shall call the function Det_ReportError (ref. to
[SWS_CanSM_91003]) with ErrorId parameter CANSM_E_PARAM_TRANSCEIVER.c
(SRS_Can_01145)

93 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

[SWS_CanSM_00401] dIf the CanSM module is not initialized, when the func-
tion CanSM_TransceiverModeIndication is called, then the function CanSM_-
TransceiverModeIndication shall call the function Det_ReportError (ref. to
[SWS_CanSM_91003]) with ErrorId parameter CANSM_E_UNINIT.c(SRS_Can_-
01145)

8.4.4 CanSM_TxTimeoutException

[SWS_CanSM_00410] Definition of callback function CanSM_TxTimeoutExcep-


tion d
Service Name CanSM_TxTimeoutException
Syntax void CanSM_TxTimeoutException (
NetworkHandleType Channel
)
Service ID [hex] 0x0b
Sync/Async Synchronous
Reentrancy Reentrant
Parameters (in) Channel Affected CAN network
Parameters (inout) None
Parameters (out) None
Return value None
Description This function shall notify the CanSM module, that the CanNm has detected for the affected
partial CAN network a tx timeout exception, which shall be recovered within the respective
network state machine of the CanSM module.
Available via CanSM_CanIf.h

c(SRS_Can_01142, SRS_Can_01145)
[SWS_CanSM_00411] dThe function CanSM_TxTimeoutException shall report
CANSM_E_UNINIT to the DET, if the CanSM module is not initialized yet.c(SRS_Can_-
01145)
[SWS_CanSM_00412] dIf the function CanSM_TxTimeoutException is referenced
with a Channel, which is not configured as CanSMNetworkHandle in the CanSM con-
figuration, it shall report CANSM_E_INVALID_NETWORK_HANDLE to the DET.c(SRS_-
Can_01145)
Remarks: Reentrancy is necessary for different Channels.

94 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

8.4.5 CanSM_ClearTrcvWufFlagIndication

[SWS_CanSM_00413] Definition of callback function CanSM_ClearTrcvWufFlag


Indication d
Service Name CanSM_ClearTrcvWufFlagIndication
Syntax void CanSM_ClearTrcvWufFlagIndication (
uint8 Transceiver
)
Service ID [hex] 0x08
Sync/Async Synchronous
Reentrancy Reentrant for different CAN Transceivers
Parameters (in) Transceiver Requested Transceiver
Parameters (inout) None
Parameters (out) None
Return value None
Description This callback function shall indicate the CanIf_ClearTrcvWufFlag API process end for the
notified CAN Transceiver.
Available via CanSM_CanIf.h

c(SRS_Can_01145)
[SWS_CanSM_00414] dThe function CanSM_ClearTrcvWufFlagIndication
shall report CANSM_E_UNINIT to the DET, if the CanSM module is not initialized yet.c
(SRS_Can_01145)
[SWS_CanSM_00415] dIf the function CanSM_ClearTrcvWufFlagIndication
gets a TransceiverId, which is not configured (ref. to [ECUC_CanSM_00137]) in
the configuration of the CanSM module, it shall call the function Det_ReportEr-
ror (ref. to [SWS_CanSM_91003]) with ErrorId parameter CANSM_E_PARAM_-
TRANSCEIVER.c(SRS_Can_01145)

8.4.6 CanSM_CheckTransceiverWakeFlagIndication

[SWS_CanSM_00416] Definition of callback function CanSM_CheckTransceiver


WakeFlagIndication d
Service Name CanSM_CheckTransceiverWakeFlagIndication
Syntax void CanSM_CheckTransceiverWakeFlagIndication (
uint8 Transceiver
)
Service ID [hex] 0x0a
Sync/Async Synchronous
Reentrancy Reentrant for different CAN Transceivers
Parameters (in) Transceiver Requested Transceiver
Parameters (inout) None
Parameters (out) None
Return value None
5

95 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Description This callback function indicates the CanIf_CheckTrcvWakeFlag API process end for the notified
CAN Transceiver.
Available via CanSM_CanIf.h

c(SRS_Can_01145)
[SWS_CanSM_00417] dThe function CanSM_CheckTransceiverWakeFlagIndi-
cation shall report CANSM_E_UNINIT to the DET, if the CanSM module is not initial-
ized yet.c(SRS_Can_01145)
[SWS_CanSM_00418] dIf the function CanSM_CheckTransceiverWake-
FlagIndication gets a TransceiverId, which is not configured (ref. to
[ECUC_CanSM_00137]) in the configuration of the CanSM module, it shall call the
function Det_ReportError (ref. to [SWS_CanSM_91003]) with ErrorId parameter
CANSM_E_PARAM_TRANSCEIVER.c(SRS_Can_01145)

8.4.7 CanSM_ConfirmPnAvailability

[SWS_CanSM_00419] Definition of callback function CanSM_ConfirmPnAvail-


ability d
Service Name CanSM_ConfirmPnAvailability
Syntax void CanSM_ConfirmPnAvailability (
uint8 TransceiverId
)
Service ID [hex] 0x06
Sync/Async Synchronous
Reentrancy Reentrant
Parameters (in) TransceiverId CAN transceiver, which was checked for PN availability
Parameters (inout) None
Parameters (out) None
Return value None
Description This callback function indicates that the transceiver is running in PN communication mode.
Available via CanSM_CanIf.h

c(SRS_Can_01145)
[SWS_CanSM_00546] dThe function CanSM_ConfirmPnAvailability shall notify
the Can_Nm module (ref. to [SWS_CanSM_00422]), if it is called with a configured
Transceiver as input parameter (ref. to [ECUC_CanSM_00137]).c(SRS_Can_01145)
[SWS_CanSM_00420] dThe function CanSM_ConfirmPnAvailability shall report
CANSM_E_UNINIT to the DET, if the CanSM module is not initialized yet.c(SRS_Can_-
01145)
[SWS_CanSM_00421] dIf the function CanSM_ConfirmPnAvailability gets a
TransceiverId, which is not configured (ref. to [ECUC_CanSM_00137]) in the con-
figuration of the CanSM module, it shall call the function Det_ReportError (ref. to

96 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

[SWS_CanSM_91003]) with ErrorId parameter CANSM_E_PARAM_TRANSCEIVER.c


(SRS_Can_01145)

8.4.8 CanSM_ConfirmCtrlPnAvailability

[SWS_CanSM_91004]{DRAFT} Definition of callback function CanSM_Confirm


CtrlPnAvailability d
Service Name CanSM_ConfirmCtrlPnAvailability (draft)
Syntax void CanSM_ConfirmCtrlPnAvailability (
uint8 ControllerId
)
Service ID [hex] 0x15
Sync/Async Synchronous
Reentrancy Reentrant
Parameters (in) ControllerId CAN controller, which was checked for PN availability
Parameters (inout) None
Parameters (out) None
Return value None
Description This callback function indicates that the controller is running in PN communication mode.
Tags: atp.Status=draft
Available via CanSM_CanIf.h

c(SRS_Can_01145)
[SWS_CanSM_00668]{DRAFT} dThe function CanSM_ConfirmCtrlPnAvailabil-
ity shall notify the CanNm module (ref. to [SWS_CanSM_00667]), if it is called with
a configured Controller as input parameter (ref. to [ECUC_CanSM_00141]).c(SRS_-
Can_01145)
[SWS_CanSM_00669]{DRAFT} dThe function CanSM_ConfirmCtrlPnAvailabil-
ity shall report CANSM_E_UNINIT to the DET, if the CanSM module is not initialized
yet.c(SRS_Can_01145)
[SWS_CanSM_00670]{DRAFT} dIf the function CanSM_ConfirmCtrlPnAvail-
ability gets a ControllerId, which is not configured (ref. to [ECUC_CanSM_00141])
in the configuration of the CanSM module, it shall call the function Det_ReportEr-
ror (ref. to [SWS_CanSM_91003]) with ErrorId parameter CANSM_E_PARAM_CON-
TROLLER.c(SRS_Can_01145)

8.5 Scheduled functions


For details refer to the chapter 8.5 "Scheduled functions" in SWS_BSWGeneral.

97 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

8.5.1 CanSM_MainFunction

[SWS_CanSM_00065] Definition of scheduled function CanSM_MainFunction d


Service Name CanSM_MainFunction
Syntax void CanSM_MainFunction (
void
)
Service ID [hex] 0x05
Description Scheduled function of the CanSM
Available via SchM_CanSM.h

c(SRS_BSW_00424, SRS_BSW_00425, SRS_Can_01145, SRS_Can_01142)


[SWS_CanSM_00167] dThe main function of the CanSM module shall operate the
effects of the CanSM state machine, which the CanSM module shall implement for
each configured CAN Network.c(SRS_BSW_00424, SRS_BSW_00425, SRS_Can_-
01145, SRS_Can_01142)

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.
[SWS_CanSM_91002] Definition of mandatory interfaces in module CanSM d
API Function Header File Description
BswM_CanSM_CurrentState BswM_CanSM.h Function called by CanSM to indicate its current
state.
CanIf_CheckTrcvWakeFlag CanIf.h Requests the CanIf module to check the Wake flag
of the designated CAN transceiver.
CanIf_ClearTrcvWufFlag CanIf.h Requests the CanIf module to clear the WUF flag of
the designated CAN transceiver.
CanIf_GetPduMode CanIf.h This service reports the current mode of a
requested PDU channel.
CanIf_GetTxConfirmationState CanIf.h This service reports, if any TX confirmation has
been done for the whole CAN controller since the
last CAN controller start.
CanIf_SetControllerMode CanIf.h This service calls the corresponding CAN Driver
service for changing of the CAN controller mode.
CanIf_SetPduMode CanIf.h This service sets the requested mode at the L-PDUs
of a predefined logical PDU channel.
5

98 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
API Function Header File Description
CanIf_SetTrcvMode CanIf.h This service changes the operation mode of the
tansceiver TransceiverId, via calling the
corresponding CAN Transceiver Driver service.
CanNm_ConfirmPnAvailability CanNm.h Enables the PN filter functionality on the indicated
NM channel. Availability: The API is only available if
CanNmGlobalPnSupport is TRUE.
ComM_BusSM_ModeIndication ComM.h Indication of the actual bus mode by the
corresponding Bus State Manager. ComM shall
propagate the indicated state to the users with
means of the RTE and BswM.
Dem_SetEventStatus Dem.h Called by SW-Cs or BSW modules to report monitor
status information to the Dem. BSW modules calling
Dem_SetEventStatus can safely ignore the return
value. This API will be available only if ({Dem/Dem
ConfigSet/DemEventParameter/DemEvent
ReportingType} == STANDARD_REPORTING)
Det_ReportRuntimeError Det.h Service to report runtime errors. If a callout has
been configured then this callout shall be called.

c()

8.6.1.1 Remark: Usage of CanIf_SetPduMode

Although the CanIf module provides more requestable PDU modes, the CanSM mod-
ule only uses the parameters CANIF_ONLINE, CANIF_TX_OFFLINE_ACTIVE and
CANIF_TX_OFFLINE for the call of the API CanIf_SetPduMode.
The CANIF_OFFLINE mode is assumed automatically by CanIf and needs not to be
set by CanSM.

8.6.2 Optional Interfaces

This chapter defines all interfaces, which are required to fulfill an optional functionality
of the module.
[SWS_CanSM_91003] Definition of optional interfaces in module CanSM d
API Function Header File Description
CanIf_SetBaudrate CanIf.h This service shall set the baud rate configuration of
the CAN controller. Depending on necessary baud
rate modifications the controller might have to reset.
Det_ReportError Det.h Service to report development errors.

c()

99 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

8.6.3 Configurable Interfaces

In this chapter all interfaces are listed where the target functions could be configured.
The target function is usually a callback function. The names of these kind of interfaces
is not fixed because they are configurable.

8.6.3.1 <User_GetBusOffDelay>

[SWS_CanSM_00637] Definition of configurable interface <User_GetBusOffDe-


lay> d
Service Name <User_GetBusOffDelay>
Syntax void <User_GetBusOffDelay> (
NetworkHandleType network,
uint8* delayCyclesPtr
)
Sync/Async Synchronous
Reentrancy Reentrant for different networks
Parameters (in) network CAN network where a BusOff occurred.
Parameters (inout) None
Parameters (out) delayCyclesPtr Number of CanSM base cycles to wait additionally to L1/L2 after
a BusOff occurred.
Return value None
Description This callout function returns the number of CanSM base cycles to wait additionally to L1/L2
after a BusOff occurred.
Available via Configuration parameter CanSM/CanSMGeneral/CanSMGetBusOffDelayHeader

c(SRS_Can_01144, SRS_Can_01146)

100 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

9 Sequence diagrams
All interactions of the CanSM module with the depending modules CanIf, ComM, Bsw
M, Dem and CanNm are specified in the state machine diagrams (ref. to Figure 7-1-
Figure 7-10). Therefore the CanSM SWS provides only some exemplary sequences
for the use case to start and to stop the CAN controller(s) of a CAN network.
Remark: For the special use case of CAN network deinitialization with partial network
support please refer to chapter 9 of [11, Specification of CAN Transceiver Driver].

9.1 Sequence diagram CanSm_StartCanController


«module» «module»
CanSM CanIf      
       
       
       
      
   !     "  
alt CanSm_StartCanControllerVariants #$% $%&       
     
[CAN controller mode change performed synchronously]    

loop CanSm_StartCanControllerLoop1

[Do for every configured CAN controller of the CAN network]

CanIf_SetControllerMode(return, ControllerId, ControllerMode:


=CAN_CS_STARTED)

CanSM_ControllerModeIndication(ControllerId,
ControllerMode:=CAN_CS_STARTED)

:E_OK

[CAN controller mode change performed asynchronously]

loop CanSm_StartCanControllerLoop2

[Do for every configured CAN controller of the CAN network]

CanIf_SetControllerMode(Std_ReturnType, uint8,
Can_ControllerStateType)

:E_OK

loop CanSm_StartCanControllerLoop3
[Wait for CAN_CS_STARTED indication for all CAN controllers of the CAN network]

CanSM_ControllerModeIndication(ControllerId,
ControllerMode:=CAN_CS_STARTED)

Figure 9.1: CanSm_StartCanController

101 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

9.2 Sequence diagram CanSm_StopCanController


«module» «module»
CanSM CanIf      
       
       
       
      
   !     "  
alt CanSm_StopCanControllerVariants #$% $%&       
     
[CAN controller mode change performed synchronously]    

loop CanSm_StopCanControllerLoop1

[Do for every configured CAN controller of the CAN network]

CanIf_SetControllerMode(return, ControllerId, ControllerMode:=CAN_CS_STOPPED)

CanSM_ControllerModeIndication(ControllerId, ControllerMode:=CAN_CS_STOPPED)

:E_OK

[CAN controller mode change performed asynchronously]

loop CanSm_StopCanControllerLoop2

[Do for every configured CAN controller of the CAN network]

CanIf_SetControllerMode(Std_ReturnType, uint8, Can_ControllerStateType)

:E_OK

loop CanSm_StopCanControllerLoop3
[Wait for CAN_CS_STOPPED indication for all CAN controllers of the CAN network]

CanSM_ControllerModeIndication(ControllerId, ControllerMode:=CAN_CS_STOPPED)

Figure 9.2: CanSm_StopCanController

102 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

10 Configuration specification
In general, this chapter defines configuration parameters and their clustering into con-
tainers. 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
CanSM.
Chapter 10.3 specifies published information of the module CanSM.

10.1 How to read this chapter


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

10.2 Containers and configuration parameters


The following chapters summarize all configuration parameters of the CanSM module.
The detailed meanings of the parameters is described in chapter 7 and chapter 8.

10.2.1 CanSM

SWS Item [ECUC_CanSM_00351]


Module Name CanSM
Description Configuration of the CanSM 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
CanSMConfiguration 1 This container contains the global parameters of the CanSM and
sub containers, which are for the CAN network specific
configuration.
CanSMGeneral 1 Container for general pre-compile parameters of the CanSM
module

103 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

10.2.2 CanSMConfiguration

SWS Item [ECUC_CanSM_00123]


Container Name CanSMConfiguration
Parent Container CanSM
Description This container contains the global parameters of the CanSM and sub containers, which
are for the CAN network specific configuration.
Configuration Parameters

SWS Item [ECUC_CanSM_00335]


Parameter Name CanSMModeRequestRepetitionMax
Parent Container CanSMConfiguration
Description Specifies the maximal amount of mode request repetitions without a respective mode
indication from the CanIf module until the CanSM module reports a Development Error
to the Det and tries to go back to no communication.
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

SWS Item [ECUC_CanSM_00336]


Parameter Name CanSMModeRequestRepetitionTime
Parent Container CanSMConfiguration
Description Specifies in which time duration the CanSM module shall repeat mode change
requests by using the API of the CanIf module.
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
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

Included Containers
Container Name Multiplicity Scope / Dependency
CanSMManagerNetwork 1..* This container contains the CAN network specific parameters of
each CAN network

104 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

10.2.3 CanSMGeneral

SWS Item [ECUC_CanSM_00314]


Container Name CanSMGeneral
Parent Container CanSM
Description Container for general pre-compile parameters of the CanSM module
Configuration Parameters

SWS Item [ECUC_CanSM_00133]


Parameter Name CanSMDevErrorDetect
Parent Container CanSMGeneral
Description Switches the development error detection and notification on or off.
• true: detection and notification is enabled.
• 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_CanSM_00347]


Parameter Name CanSMGetBusOffDelayFunction
Parent Container CanSMGeneral
Description This parameter configures the name of the <User_GetBusOffDelay> callout function,
which is used by CanSM to acquire an additional L1/L2 delay time. This function is only
called for channels where CanSMEnableBusOffDelay is enabled.
Multiplicity 0..1
Type EcucFunctionNameDef
Default value –
Regular Expression –
Post-Build Variant Multiplicity false
Post-Build Variant Value false
Multiplicity Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

SWS Item [ECUC_CanSM_00348]


Parameter Name CanSMGetBusOffDelayHeader
Parent Container CanSMGeneral
Description This parameter configures the header file containing the prototype of the <User_Get
BusOffDelay> callout function.
5

105 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Multiplicity 0..1
Type EcucStringParamDef
Default value –
Regular Expression –
Post-Build Variant Multiplicity false
Post-Build Variant Value false
Multiplicity Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

SWS Item [ECUC_CanSM_00312]


Parameter Name CanSMMainFunctionTimePeriod
Parent Container CanSMGeneral
Description This parameter defines the cycle time of the function CanSM_MainFunction in seconds
Multiplicity 1
Type EcucFloatParamDef
Range ]0 .. INF[
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

SWS Item [ECUC_CanSM_00344]


Parameter Name CanSMPncSupport
Parent Container CanSMGeneral
Description Enables or disables support of partial networking. False: Partial Networking is disabled
True: Partial Networking is enabled
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Multiplicity false
Post-Build Variant Value false
Multiplicity Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local
dependency: This parameter shall be available only if ComMPncSupport is enabled in
ComM

106 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

SWS Item [ECUC_CanSM_00343]


Parameter Name CanSMSetBaudrateApi
Parent Container CanSMGeneral
Description The support of the Can_SetBaudrate API is optional. If this parameter is set to true the
Can_SetBaudrate API shall be supported. Otherwise the API is not supported.
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Multiplicity false
Post-Build Variant Value false
Multiplicity Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: ECU

SWS Item [ECUC_CanSM_00349]


Parameter Name CanSMTxOfflineActiveSupport
Parent Container CanSMGeneral
Description Determines whether the ECU passive feature is supported by CanSM. True: Enabled
False: Disabled
Multiplicity 0..1
Type EcucBooleanParamDef
Default value –
Post-Build Variant Multiplicity false
Post-Build Variant Value false
Multiplicity Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local
dependency: CanIfTxOfflineActiveSupport

SWS Item [ECUC_CanSM_00311]


Parameter Name CanSMVersionInfoApi
Parent Container CanSMGeneral
Description Activate/Deactivate the version information API (CanSM_GetVersionInfo).
true: version information API activated false: version information API deactivated
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
5

107 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
Post-build time –
Scope / Dependency scope: local

No Included Containers

10.2.4 CanSMManagerNetwork

SWS Item [ECUC_CanSM_00338]


Container Name CanSMController
Parent Container CanSMManagerNetwork
Description This container contains the controller IDs assigned to a CAN network.
Configuration Parameters

SWS Item [ECUC_CanSM_00141]


Parameter Name CanSMControllerId
Parent Container CanSMController
Description Unique handle to identify one certain CAN controller. Reference to one of the CAN
controllers managed by the CanIf module.
Multiplicity 1
Type Symbolic name reference to CanIfCtrlCfg
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: CanIf

No Included Containers

SWS Item [ECUC_CanSM_00126]


Container Name CanSMManagerNetwork
Parent Container CanSMConfiguration
Description This container contains the CAN network specific parameters of each CAN network
Configuration Parameters

SWS Item [ECUC_CanSM_00131]


Parameter Name CanSMBorCounterL1ToL2
Parent Container CanSMManagerNetwork
Description This threshold defines the count of bus-offs until the bus-off recovery switches from
level 1 (short recovery time) to level 2 (long recovery time).
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 255
Default value –
5

108 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
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

SWS Item [ECUC_CanSM_00128]


Parameter Name CanSMBorTimeL1
Parent Container CanSMManagerNetwork
Description This time parameter defines in seconds the duration of the bus-off recovery time in
level 1 (short recovery time).
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
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_CanSM_00129]


Parameter Name CanSMBorTimeL2
Parent Container CanSMManagerNetwork
Description This time parameter defines in seconds the duration of the bus-off recovery time in
level 2 (long recovery time).
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
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_CanSM_00130]


Parameter Name CanSMBorTimeTxEnsured
Parent Container CanSMManagerNetwork
Description This parameter defines in seconds the duration of the bus-off event check. This check
assesses, if the recovery has been successful after the recovery reenables the transmit
path. If a new bus-off occurs during this time period, the CanSM assesses this bus-off
as sequential bus-off without successful recovery. Because a bus-off only can be
detected, when PDUs are transmitted, the time has to be great enough to ensure that
PDUs are transmitted again (e. g. time period of the fastest cyclic transmitted PDU of
the COM module, ComTxModeTimePeriod).
Multiplicity 1
Type EcucFloatParamDef
Range [0 .. 65.535]
5

109 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
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: CANSM_BOR_TX_CONFIRMATION_POLLING disabled

SWS Item [ECUC_CanSM_00339]


Parameter Name CanSMBorTxConfirmationPolling
Parent Container CanSMManagerNetwork
Description This parameter shall configure, if the CanSM polls the CanIf_GetTxConfirmationState
API to decide the bus-off state to be recovered instead of using the CanSMBorTimeTx
Ensured parameter for this decision.
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

SWS Item [ECUC_CanSM_00346]


Parameter Name CanSMEnableBusOffDelay
Parent Container CanSMManagerNetwork
Description This parameter defines if the <User_GetBusOffDelay> shall be called for this network.
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Multiplicity false
Post-Build Variant Value false
Multiplicity Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

SWS Item [ECUC_CanSM_00161]


Parameter Name CanSMComMNetworkHandleRef
Parent Container CanSMManagerNetwork
Description Unique handle to identify one certain CAN network. Reference to one of the network
handles configured for the ComM.
Multiplicity 1
Type Symbolic name reference to ComMChannel
5

110 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

4
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: ComM

SWS Item [ECUC_CanSM_00137]


Parameter Name CanSMTransceiverId
Parent Container CanSMManagerNetwork
Description ID of the CAN transceiver assigned to the configured network handle. Reference to
one of the transceivers managed by the CanIf module.
Multiplicity 0..1
Type Symbolic name reference to CanIfTrcvCfg
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
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: local
dependency: CanIf

Included Containers
Container Name Multiplicity Scope / Dependency
CanSMController 1..* This container contains the controller IDs assigned to a CAN
network.
CanSMDemEventParameterRefs 0..1 Container for the references to DemEventParameter elements
which shall be invoked using the API Dem_SetEventStatus in
case the corresponding error occurs. The EventId is taken from
the referenced DemEventParameter’s DemEventId symbolic
value. The standardized errors are provided in this container and
can be extended by vendor-specific error references.

10.2.5 CanSMDemEventParameterRefs

SWS Item [ECUC_CanSM_00127]


Container Name CanSMDemEventParameterRefs
Parent Container CanSMManagerNetwork
Description Container for the references to DemEventParameter elements which shall be invoked
using the API Dem_SetEventStatus in case the corresponding error occurs. The Event
Id is taken from the referenced DemEventParameter’s DemEventId symbolic value.
The standardized errors are provided in this container and can be extended by
vendor-specific error references.
Configuration Parameters

111 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

SWS Item [ECUC_CanSM_00070]


Parameter Name CANSM_E_BUS_OFF
Parent Container CanSMDemEventParameterRefs
Description Reference to configured DEM event to report bus off errors for this CAN network.
Multiplicity 0..1
Type Symbolic name reference to DemEventParameter
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
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: local
dependency: Dem

SWS Item [ECUC_CanSM_00352]


Parameter Name CANSM_E_MODE_REQUEST_TIMEOUT
Parent Container CanSMDemEventParameterRefs
Description Reference to configured DEM event to report bus off errors for this CAN network.
Multiplicity 0..1
Type Symbolic name reference to DemEventParameter
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
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: local
dependency: Dem

No Included Containers

10.3 Published Information


For details refer to the chapter 10.3 “Published Information” in SWS_BSWGeneral.

112 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

A Not applicable requirements


[SWS_CanSM_00652] dThe following requirements are not applicable to this speci-
fication, because they are either general BSW requirements, which apply to all BSW
modules and not only especially to the CanSM module or they are not applicable at
all.c(SRS_BSW_00170, SRS_BSW_00375, SRS_BSW_00395, SRS_BSW_00416,
SRS_BSW_00437, SRS_BSW_00168, SRS_BSW_00423, SRS_BSW_00426,
SRS_BSW_00427, SRS_BSW_00428, SRS_BSW_00429, SRS_BSW_00432,
SRS_BSW_00433, SRS_BSW_00336, SRS_BSW_00417, SRS_BSW_00161,
SRS_BSW_00162, SRS_BSW_00005, SRS_BSW_00347, SRS_BSW_00314,
SRS_BSW_00353, SRS_BSW_00377, SRS_BSW_00308, SRS_BSW_00309,
SRS_BSW_00360, SRS_BSW_00341, SRS_BSW_00439, SRS_BSW_00440,
SRS_BSW_00004, SRS_BSW_00006, SRS_BSW_00007, SRS_BSW_00009,
SRS_BSW_00010, SRS_BSW_00159, SRS_BSW_00160, SRS_BSW_00164,
SRS_BSW_00167, SRS_BSW_00172, SRS_BSW_00300, SRS_BSW_00301,
SRS_BSW_00302, SRS_BSW_00305, SRS_BSW_00306, SRS_BSW_00307,
SRS_BSW_00310, SRS_BSW_00312, SRS_BSW_00318, SRS_BSW_00321,
SRS_BSW_00323, SRS_BSW_00325, SRS_BSW_00327, SRS_BSW_00328,
SRS_BSW_00330, SRS_BSW_00331, SRS_BSW_00334, SRS_BSW_00335,
SRS_BSW_00339, SRS_BSW_00342, SRS_BSW_00343, SRS_BSW_00346,
SRS_BSW_00348, SRS_BSW_00350, SRS_BSW_00357, SRS_BSW_00360,
SRS_BSW_00369, SRS_BSW_00373, SRS_BSW_00374, SRS_BSW_00378,
SRS_BSW_00379, SRS_BSW_00380, SRS_BSW_00383, SRS_BSW_00384,
SRS_BSW_00385, SRS_BSW_00386, SRS_BSW_00388, SRS_BSW_00389,
SRS_BSW_00390, SRS_BSW_00392, SRS_BSW_00393, SRS_BSW_00394,
SRS_BSW_00396, SRS_BSW_00397, SRS_BSW_00398, SRS_BSW_00399,
SRS_BSW_00400, SRS_BSW_00401, SRS_BSW_00402, SRS_BSW_00408,
SRS_BSW_00409, SRS_BSW_00410, SRS_BSW_00411, SRS_BSW_00413,
SRS_BSW_00415, SRS_BSW_00419, SRS_BSW_00422, SRS_BSW_00438,
SRS_BSW_00441, SRS_BSW_00448, SRS_BSW_00449, SRS_BSW_00450,
SRS_BSW_00451, SRS_BSW_00452, SRS_BSW_00453, SRS_BSW_00454,
SRS_BSW_00456, SRS_BSW_00457, SRS_BSW_00458, SRS_BSW_00459,
SRS_BSW_00460, SRS_BSW_00461, SRS_BSW_00462, SRS_BSW_00463,
SRS_BSW_00465, SRS_BSW_00466, SRS_BSW_00467, SRS_BSW_00469,
SRS_BSW_00470, SRS_BSW_00471, SRS_BSW_00472, SRS_Can_01001,
SRS_Can_01002, SRS_Can_01003, SRS_Can_01004, SRS_Can_01005, SRS_-
Can_01006, SRS_Can_01007, SRS_Can_01008, SRS_Can_01009, SRS_Can_-
01011, SRS_Can_01013, SRS_Can_01014, SRS_Can_01015, SRS_Can_01016,
SRS_Can_01018, SRS_Can_01020, SRS_Can_01021, SRS_Can_01022, SRS_-
Can_01023, SRS_Can_01027, SRS_Can_01028, SRS_Can_01029, SRS_Can_-
01032, SRS_Can_01033, SRS_Can_01034, SRS_Can_01035, SRS_Can_01036,
SRS_Can_01037, SRS_Can_01038, SRS_Can_01039, SRS_Can_01041, SRS_-
Can_01042, SRS_Can_01043, SRS_Can_01045, SRS_Can_01049, SRS_Can_-
01051, SRS_Can_01053, SRS_Can_01054, SRS_Can_01055, SRS_Can_01058,
SRS_Can_01059, SRS_Can_01060, SRS_Can_01061, SRS_Can_01062, SRS_-
Can_01065, SRS_Can_01066, SRS_Can_01068, SRS_Can_01069, SRS_Can_-

113 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

01071, SRS_Can_01073, SRS_Can_01074, SRS_Can_01075, SRS_Can_01076,


SRS_Can_01078, SRS_Can_01079, SRS_Can_01081, SRS_Can_01082, SRS_-
Can_01086, SRS_Can_01090, SRS_Can_01091, SRS_Can_01095, SRS_Can_-
01096, SRS_Can_01097, SRS_Can_01098, SRS_Can_01099, SRS_Can_01100,
SRS_Can_01101, SRS_Can_01103, SRS_Can_01107, SRS_Can_01108, SRS_-
Can_01109, SRS_Can_01110, SRS_Can_01111, SRS_Can_01112, SRS_Can_-
01114, SRS_Can_01115, SRS_Can_01116, SRS_Can_01121, SRS_Can_01122,
SRS_Can_01125, SRS_Can_01126, SRS_Can_01129, SRS_Can_01130, SRS_-
Can_01131, SRS_Can_01132, SRS_Can_01134, SRS_Can_01135, SRS_Can_-
01136, SRS_Can_01138, SRS_Can_01139, SRS_Can_01140, SRS_Can_01141,
SRS_Can_01143, SRS_Can_01147, SRS_Can_01148, SRS_Can_01149, SRS_-
Can_01151, SRS_Can_01153, SRS_Can_01154, SRS_Can_01155, SRS_Can_-
01156, SRS_Can_01157, SRS_Can_01159, SRS_Can_01160, SRS_Can_01161,
SRS_Can_01162, SRS_Can_01163, SRS_ModeMgm_00049, SRS_ModeMgm_-
09001, SRS_ModeMgm_09009, SRS_ModeMgm_09017, SRS_ModeMgm_-
09028, SRS_ModeMgm_09071, SRS_ModeMgm_09072, SRS_ModeMgm_-
09078, SRS_ModeMgm_09080, SRS_ModeMgm_09081, SRS_ModeMgm_-
09083, SRS_ModeMgm_09084, SRS_ModeMgm_09085, SRS_ModeMgm_-
09087, SRS_ModeMgm_09089, SRS_ModeMgm_09090, SRS_ModeMgm_-
09097, SRS_ModeMgm_09098, SRS_ModeMgm_09100, SRS_ModeMgm_-
09101, SRS_ModeMgm_09102, SRS_ModeMgm_09104, SRS_ModeMgm_-
09106, SRS_ModeMgm_09107, SRS_ModeMgm_09109, SRS_ModeMgm_-
09110, SRS_ModeMgm_09112, SRS_ModeMgm_09113, SRS_ModeMgm_-
09114, SRS_ModeMgm_09115, SRS_ModeMgm_09116, SRS_ModeMgm_-
09118, SRS_ModeMgm_09119, SRS_ModeMgm_09120, SRS_ModeMgm_-
09122, SRS_ModeMgm_09125, SRS_ModeMgm_09126, SRS_ModeMgm_-
09127, SRS_ModeMgm_09128, SRS_ModeMgm_09132, SRS_ModeMgm_-
09133, SRS_ModeMgm_09136, SRS_ModeMgm_09141, SRS_ModeMgm_-
09143, SRS_ModeMgm_09145, SRS_ModeMgm_09146, SRS_ModeMgm_-
09147, SRS_ModeMgm_09149, SRS_ModeMgm_09155, SRS_ModeMgm_-
09156, SRS_ModeMgm_09157, SRS_ModeMgm_09158, SRS_ModeMgm_-
09159, SRS_ModeMgm_09160, SRS_ModeMgm_09161, SRS_ModeMgm_-
09162, SRS_ModeMgm_09163, SRS_ModeMgm_09164, SRS_ModeMgm_-
09165, SRS_ModeMgm_09166, SRS_ModeMgm_09168, SRS_ModeMgm_-
09169, SRS_ModeMgm_09172, SRS_ModeMgm_09173, SRS_ModeMgm_-
09174, SRS_ModeMgm_09175, SRS_ModeMgm_09176, SRS_ModeMgm_-
09177, SRS_ModeMgm_09178, SRS_ModeMgm_09179, SRS_ModeMgm_-
09180, SRS_ModeMgm_09182, SRS_ModeMgm_09183, SRS_ModeMgm_-
09184, SRS_ModeMgm_09185, SRS_ModeMgm_09186, SRS_ModeMgm_-
09187, SRS_ModeMgm_09188, SRS_ModeMgm_09189, SRS_ModeMgm_-
09190, SRS_ModeMgm_09194, SRS_ModeMgm_09199, SRS_ModeMgm_-
09207, SRS_ModeMgm_09220, SRS_ModeMgm_09221, SRS_ModeMgm_-
09222, SRS_ModeMgm_09223, SRS_ModeMgm_09225, SRS_ModeMgm_-
09226, SRS_ModeMgm_09228, SRS_ModeMgm_09229, SRS_ModeMgm_-
09230, SRS_ModeMgm_09231, SRS_ModeMgm_09232, SRS_ModeMgm_-

114 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager


Specification of CAN State Manager
AUTOSAR CP R23-11

09234, SRS_ModeMgm_09235, SRS_ModeMgm_09236, SRS_ModeMgm_-


09237, SRS_ModeMgm_09238, SRS_ModeMgm_09239, SRS_ModeMgm_-
09240, SRS_ModeMgm_09241, SRS_ModeMgm_09243, SRS_ModeMgm_-
09244, SRS_ModeMgm_09245, SRS_ModeMgm_09246, SRS_ModeMgm_-
09247, SRS_ModeMgm_09248, SRS_ModeMgm_09249, SRS_ModeMgm_-
09250, SRS_ModeMgm_09251, SRS_ModeMgm_09253, SRS_ModeMgm_-
09254, SRS_ModeMgm_09255, SRS_ModeMgm_09256, SRS_ModeMgm_09270,
SRS_ModeMgm_09271, SRS_ModeMgm_09272, SRS_ModeMgm_09274, SRS_-
ModeMgm_09275, SRS_ModeMgm_09276, SRS_ModeMgm_09277)

115 of 115 Document ID 253: AUTOSAR_CP_SWS_CANStateManager

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy