AUTOSAR SWS CANInterface
AUTOSAR SWS CANInterface
• HOH definition
• abstracted ControllerId and
TransceiverId
• No changing of baudrate via CanIf
and CanIf_ControllerInit
• Dispatcher adapted because of CDD
• TxBuffering: only one buffer per
AUTOSAR L-PDU
2010-02-02 3.1.4
Administration • Wake up mechanism adapted to
environment behavior (network ->
controller/transceiver;
wakeupSource)
• Mode changes made asynchronous
• no complete state machine in CanIf,
just buffered states per controller
• Legal disclaimer revised
AUTOSAR
2008-08-13 3.1.1 Legal disclaimer revised
Administration
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.
Table of Contents
1 Introduction and functional overview 10
3 Related documentation 15
3.1 Input documents & related standards and norms . . . . . . . . . . . . 15
3.2 Related specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4 Constraints and assumptions 17
4.1 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Applicability to car domains . . . . . . . . . . . . . . . . . . . . . . . . 17
5 Dependencies to other modules 18
5.1 Upper Protocol Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.2 Initialization: Ecu State Manager . . . . . . . . . . . . . . . . . . . . . 19
5.3 Mode Control: CAN State Manager . . . . . . . . . . . . . . . . . . . . 19
5.4 Lower layers: CAN Driver . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.5 Lower layers: CAN Transceiver Driver . . . . . . . . . . . . . . . . . . 20
5.6 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.7 File structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.7.1 Code file structure . . . . . . . . . . . . . . . . . . . . . . . . 22
5.7.2 Header file structure . . . . . . . . . . . . . . . . . . . . . . . 22
6 Requirements Tracing 26
7 Functional specification 31
7.1 General Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.2 Hardware object handles . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7.3 Static L-PDUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
7.4 Dynamic L-PDUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.4.1 Dynamic Transmit L-PDUs . . . . . . . . . . . . . . . . . . . 36
7.4.2 Dynamic receive L-PDUs . . . . . . . . . . . . . . . . . . . . 37
7.5 Physical channel view . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.6 CAN Hardware Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.7 BasicCAN and FullCAN reception . . . . . . . . . . . . . . . . . . . . . 40
7.8 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.9 Transmit request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.10 Transmit data flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.11 Transmit buffering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7.11.1 General behavior . . . . . . . . . . . . . . . . . . . . . . . . 44
7.11.2 Buffer characteristics . . . . . . . . . . . . . . . . . . . . . . 45
7.11.2.1 Storage of L-PDUs in the transmit L-PDU buffer . . . 46
7.11.2.2 Clearance of transmit L-PDU buffers . . . . . . . . . 47
7.11.2.3 Initialization of transmit L-PDU buffers . . . . . . . . 48
7.11.3 Data integrity of transmit L-PDU buffers . . . . . . . . . . . . 48
8.3.1 CanIf_Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
8.3.2 CanIf_DeInit . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
8.3.3 CanIf_SetControllerMode . . . . . . . . . . . . . . . . . . . . 78
8.3.4 CanIf_GetControllerMode . . . . . . . . . . . . . . . . . . . . 79
8.3.5 CanIf_GetControllerErrorState . . . . . . . . . . . . . . . . . 80
8.3.6 CanIf_Transmit . . . . . . . . . . . . . . . . . . . . . . . . . . 81
8.3.7 CanIf_CancelTransmit . . . . . . . . . . . . . . . . . . . . . . 83
8.3.8 CanIf_ReadRxPduData . . . . . . . . . . . . . . . . . . . . . 83
8.3.9 CanIf_ReadTxNotifStatus . . . . . . . . . . . . . . . . . . . . 85
8.3.10 CanIf_ReadRxNotifStatus . . . . . . . . . . . . . . . . . . . . 85
8.3.11 CanIf_SetPduMode . . . . . . . . . . . . . . . . . . . . . . . 86
8.3.12 CanIf_GetPduMode . . . . . . . . . . . . . . . . . . . . . . . 87
8.3.13 CanIf_GetVersionInfo . . . . . . . . . . . . . . . . . . . . . . 88
8.3.14 CanIf_SetDynamicTxId . . . . . . . . . . . . . . . . . . . . . 89
8.3.15 CanIf_SetTrcvMode . . . . . . . . . . . . . . . . . . . . . . . 90
8.3.16 CanIf_GetTrcvMode . . . . . . . . . . . . . . . . . . . . . . . 91
8.3.17 CanIf_GetTrcvWakeupReason . . . . . . . . . . . . . . . . . 92
8.3.18 CanIf_SetTrcvWakeupMode . . . . . . . . . . . . . . . . . . 94
8.3.19 CanIf_CheckWakeup . . . . . . . . . . . . . . . . . . . . . . 95
8.3.20 CanIf_CheckValidation . . . . . . . . . . . . . . . . . . . . . 96
8.3.21 CanIf_GetTxConfirmationState . . . . . . . . . . . . . . . . . 97
8.3.22 CanIf_ClearTrcvWufFlag . . . . . . . . . . . . . . . . . . . . 98
8.3.23 CanIf_CheckTrcvWakeFlag . . . . . . . . . . . . . . . . . . . 99
8.3.24 CanIf_SetBaudrate . . . . . . . . . . . . . . . . . . . . . . . 100
8.3.25 CanIf_SetIcomConfiguration . . . . . . . . . . . . . . . . . . 100
8.4 Callback notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
8.4.1 CanIf_TriggerTransmit . . . . . . . . . . . . . . . . . . . . . . 101
8.4.2 CanIf_TxConfirmation . . . . . . . . . . . . . . . . . . . . . . 102
8.4.3 CanIf_RxIndication . . . . . . . . . . . . . . . . . . . . . . . 104
8.4.4 CanIf_ControllerBusOff . . . . . . . . . . . . . . . . . . . . . 105
8.4.5 CanIf_ConfirmPnAvailability . . . . . . . . . . . . . . . . . . 106
8.4.6 CanIf_ClearTrcvWufFlagIndication . . . . . . . . . . . . . . . 107
8.4.7 CanIf_CheckTrcvWakeFlagIndication . . . . . . . . . . . . . 108
8.4.8 CanIf_ControllerModeIndication . . . . . . . . . . . . . . . . 109
8.4.9 CanIf_TrcvModeIndication . . . . . . . . . . . . . . . . . . . 110
8.4.10 CanIf_CurrentIcomConfiguration . . . . . . . . . . . . . . . . 111
8.5 Scheduled functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
8.6 Expected interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
8.6.1 Mandatory interfaces . . . . . . . . . . . . . . . . . . . . . . 112
8.6.2 Optional interfaces . . . . . . . . . . . . . . . . . . . . . . . . 112
8.6.3 Configurable interfaces . . . . . . . . . . . . . . . . . . . . . 114
8.6.3.1 <User_TriggerTransmit> . . . . . . . . . . . . . . . . 114
8.6.3.2 <User_TxConfirmation> . . . . . . . . . . . . . . . . 116
8.6.3.3 <User_RxIndication> . . . . . . . . . . . . . . . . . . 117
8.6.3.4 <User_ValidateWakeupEvent> . . . . . . . . . . . . 119
8.6.3.5 <User_ControllerBusOff> . . . . . . . . . . . . . . . 121
The CAN Interface module consists of all CAN hardware independent tasks, which
belongs to the CAN communication device drivers of the corresponding ECU. Those
functionality is implemented once in the CAN Interface module, so that underlying CAN
device drivers only focus on access and control of the corresponding specific CAN
hardware device.
CanIf fulfils main control flow and data flow requirements of the PDU Router and
upper layer communication modules of the AUTOSAR COM stack: transmit request
processing, transmit confirmation / receive indication / error notification and start /
stop of a CAN Controller and thus waking up / participating on a network. Its data
processing and notification API is based on CAN L-SDUs, whereas APIs for control
and mode handling provides a CAN Controller related view.
In case of Transmit Requests CanIf completes the L-PDU transmission with cor-
responding parameters and relays the CAN L-PDU via the appropriate CanDrv to the
3 Related documentation
Bibliography
[1] Specification of CAN Driver
AUTOSAR_SWS_CANDriver
[2] Specification of CAN Transceiver Driver
AUTOSAR_SWS_CANTransceiverDriver
[3] Specification of CAN State Manager
AUTOSAR_SWS_CANStateManager
[4] Specification of CAN Network Management
AUTOSAR_SWS_CANNetworkManagement
[5] Specification of CAN Transport Layer
AUTOSAR_SWS_CANTransportLayer
[6] Specification of PDU Router
AUTOSAR_SWS_PDURouter
[7] Layered Software Architecture
AUTOSAR_EXP_LayeredSoftwareArchitecture
[8] Glossary
AUTOSAR_TR_Glossary
[9] General Specification of Basic Software Modules
AUTOSAR_SWS_BSWGeneral
[10] General Requirements on Basic Software Modules
AUTOSAR_SRS_BSWGeneral
[11] Requirements on CAN
AUTOSAR_SRS_CAN
[12] ISO 11898-1:2003 – Road vehicles – Controller area network (CAN)
[13] Specification of ECU State Manager
AUTOSAR_SWS_ECUStateManager
[14] Specification of ECU Configuration
AUTOSAR_TPS_ECUConfiguration
4.1 Limitations
The CAN Interface can be used for CAN communication only and is specifically de-
signed to operate with one or multiple underlying CAN Drivers and CAN Transceiver
Drivers. Several CAN Driver modules covering different CAN Hardware Units are rep-
resented by just one generic interface as specified in the CAN Driver specification [1].
As well in the same manner several CAN Transceiver Driver modules covering different
CAN Transceiver devices are represented by just one generic interface as specified in
the CAN Transceiver Driver specification [2, Specification of CAN Transceiver Driver].
Other protocols than CAN (i.e. LIN or FlexRay) are not supported.
Please be aware that an active PnTxFilter ensures that the first messages on bus
is CanIfTxPduPnFilterPdu. In case that CanIfTxPduPnFilterPdu is the NM-PDU the
COM-Stack start up takes care that the PduGroups are disabled until successful trans-
mission of that PDU. However, transmit requests for other PDUs (i.e. initially started
PDUs, TP-PDUs, XCP-PDUs) will be rejected until the configured PDU was sent. Only
the very first PDU which initiates the Wake-up of the Network has to be the CanIfTx-
PduPnFilterPdu. In case communication is ongoing and there is an successful recep-
tion of frame with PnTxFilter enabled, PnTxFilter shall be disabled. The PnTxFilter is
in this case not needed since an Ack will be provided by an already active Node.
The CanIf passes operation mode requests of the CanSm to the corresponding under-
lying CAN Controllers.
CanDrv provides a normalized L-PDU to ensure hardware independence of CanIf.
The pointer to this normalized L-PDU points either to a temporary buffer (for e.g. data
normalizing) or to the CAN hardware dependent CanDrv. For CanIf the kind of L-PDU
buffer is invisible.
The CanIf provides notification services used by the CanDrv in all notifications scenar-
ios, for example: transmit confirmation (subsection 8.4.2 “CanIf_TxConfirmation”, see
[SWS_CANIF_00007]), receive indication (subsection 8.4.3 “CanIf_RxIndication”,
see [SWS_CANIF_00006]), transmit cancellation notification (subsec-
tion 8.4.4 “CanIf_ControllerBusOff”, see [SWS_CANIF_00218]) and notification
of a controller mode change (subsection 8.4.8, see [SWS_CANIF_00699]).
In case of using multiple CanDrv serving different interrupt vectors these callback ser-
vices mentioned above must be re-entrant, refer to section 7.24 “Multiple CAN Driver
support”. Reentrancy of callback functions is specified in section 8.4.
The callback services called by the CanDrv are declared and implemented inside the
CanIf. The callback services called by the CanIf are declared and placed inside the
appropriate upper communication service layer, for example PduR, CanNm, CanTp.
The CanIf structure is specified in section 5.7 “File structure”.
The number of configured CAN Controllers does not necessarily belong to the number
of used CAN Transceivers. In case multiple CAN Controllers of a different types operate
on the same CAN network, one CAN Transceiver and CanTrcv is sufficient, whereas
dependent to the type of the CAN Controller devices one or two different CanDrv are
needed (see section 7.5 “Physical channel view”).
5.6 Configuration
The CanIf design is optimized to manage CAN protocol specific capabilities and han-
dling of the used underlying CAN Controller.
The CanIf is capable to change the CAN configuration without a re-build. Therefore, the
function CanIf_Init() (see [SWS_CANIF_00001]) retrieves the required CAN con-
figuration information from configuration containers and parameters, which are speci-
fied (linked as references, or additional parameters) in chapter 10, see Figure 10.1.
This section gives a summary of the retrieved information, e.g.:
• Number of CAN Controllers. The number of CAN Controllers is necessary for
dispatching of transmit and receive L-PDUs and for the control of the status of
the available CAN Drivers (see CanIfCanControllerIdRef).
• Number of Hardware Object Handles. To supervise transmit requests
the CAN Interface needs to know the number of HTHs and the as-
signments between each HTH and the corresponding CAN Controller
(see CANIF_HTH_CAN_CONTROLLER_ID_REF, ECUC_CanIf_00625;
CANIF_HTH_ID_SYMREF, ECUC_CanIf_00627 ).
• Range of received CAN IDs passing hardware acceptance filter for each
hardware object. The CAN Interface uses fixed assignments between HRHs
and L-PDUs to be received in the corresponding hardware object to con-
duct a search algorithm (see section 7.20 “Software receive filter”, see
CANIF_SOFTWARE_FILTER_HRH, CANIF_HRH_CAN_CONTROLLER_ID_REF,
CANIF_HRH_ID_SYMREF, ECUC_CanIf_00634)
CanIf needs information about all used upper communication service layers and L-
SDUs to be dispatched. The following information has to be set up at configuration time
for integration of CanIf inside the AUTOSAR COM stack:
• Transmitting upper layer module and transmit I-PDU for each transmit L-SDU.
=> Used for dispatching of transmit confirmation services
(see CanIfTxPduId).
• Receiving upper layer module and receive I-PDU for each receive L-SDU.
=> Used for L-SDU dispatching during receive indication
(see CanIfRxPduId).
The CanIf needs the description of the controller and the own ECU, which is con-
nected to one or multiple CAN networks. The following information is therefore re-
trieved from the CAN communication matrix, part of the AUTOSAR system configu-
ration (see containers: CanIfTxPduConfig, ECUC_CanIf_00248; CanIfRxPduConfig,
ECUC_CanIf_00249):
[SWS_CANIF_00377] d CanIf shall access the location of the API of all used un-
derlying CanDrvs for pre-compile time configuration either by using of external dec-
laration in includes of all CanDrvs public header files can_<x>.h or by the code file
CanIf_Cfg.c. c()
[SWS_CANIF_00378] d CanIf shall access the location of the API of all used under-
lying CanDrvs for link time configuration by a set of function pointers for each CanDrv.
c()
The values for the function pointers for each CanDrv are given at link time.
Rationale for [SWS_CANIF_00377] and [SWS_CANIF_00378]: The API of all used
underlying CanDrv must be known at the latest at link time.
The include file structure can be constructed as shown in Figure 5.2.
Table 5.2: CanIf include header files upper layer CanIf specific API services or type defi-
nitions
Table 5.3: CanIf include header files upper layer callback functions
[SWS_CANIF_00280] d CanIf shall include the header files <Module>.h, which con-
tain the configuration data used by CanIf according to Table 5.4. c()
Can_<vendorID>_<Vendor specific name><driver abbreviation>.h
for configuration data of CanDrv (e.g.: Can_99_Ext1.h)
CanTrcv_<Vendor Id>_<Vendor specific name><driver abbreviation>.h
for configuration data of CanTrcv (e.g.: CanTrcv_99_Ext1.h)
PduR.h for PduR configuration data (e.g. PduR target PDU Ids)
CanNm.h for CanNm configuration data (e.g. CanNm target PDU Ids)
CanTp.h for CanTp configuration data (e.g. CanTp target PDU Ids)
Xcp.h for XCP configuration data (e.g. XCP target PDU Ids)
J1939Tp.h for J1939Tp configuration data (e.g. J1939Tp target PDU Ids)
J1939Nm.h for J1939Nm configuration data (e.g. J1939Nm target PDU Ids)
6 Requirements Tracing
The following tables references the requirements specified in [10] as well as [11] 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_00007] All Basic SW Modules written in C language [SWS_CANIF_00999]
shall conform to the MISRA C 2012 Standard.
[SRS_BSW_00010] The memory consumption of all Basic SW [SWS_CANIF_00999]
Modules shall be documented for a defined
configuration for all supported platforms.
[SRS_BSW_00101] The Basic Software Module shall be able to [SWS_CANIF_00001]
initialize variables and hardware in a separate
initialization function
[SRS_BSW_00159] All modules of the AUTOSAR Basic Software [SWS_CANIF_00999]
shall support a tool based configuration
[SRS_BSW_00164] The Implementation of interrupt service routines [SWS_CANIF_00999]
shall be done by the Operating System, complex
drivers or modules
[SRS_BSW_00167] All AUTOSAR Basic Software Modules shall [SWS_CANIF_00999]
provide configuration rules and constraints to
enable plausibility checks
[SRS_BSW_00168] SW components shall be tested by a function [SWS_CANIF_00999]
defined in a common API in the Basis-SW
[SRS_BSW_00170] The AUTOSAR SW Components shall provide [SWS_CANIF_00999]
information about their dependency from faults,
signal qualities, driver demands
[SRS_BSW_00172] The scheduling strategy that is built inside the [SWS_CANIF_00999]
Basic Software Modules shall be compatible
with the strategy used in the system
[SRS_BSW_00306] AUTOSAR Basic Software Modules shall be [SWS_CANIF_00999]
compiler and platform independent
[SRS_BSW_00307] Global variables naming convention [SWS_CANIF_00999]
[SRS_BSW_00308] AUTOSAR Basic Software Modules shall not [SWS_CANIF_00999]
define global data in their header files, but in the
C file
[SRS_BSW_00309] All AUTOSAR Basic Software Modules shall [SWS_CANIF_00999]
indicate all global data with read-only purposes
by explicitly assigning the const keyword
[SRS_BSW_00312] Shared code shall be reentrant [SWS_CANIF_00064]
[SRS_Can_01139] The CAN Interface and Driver shall offer a CAN [SWS_CANIF_00999]
Controller specific interface for initialization
[SRS_Can_01140] The CAN Interface shall support both Standard [SWS_CANIF_00281]
(11bit) and Extended (29bit) Identifiers [SWS_CANIF_00877]
[SRS_Can_01141] The CAN Interface shall support both Standard [SWS_CANIF_00243]
(11bit) and Extended (29bit) Identifiers at same [SWS_CANIF_00877]
time on one network
[SRS_Can_01151] The CAN Interface shall provide a service to [SWS_CANIF_00286]
check for a CAN Wake-up event.
[SRS_Can_01162] The CAN Interface shall support classic CAN [SWS_CANIF_00877]
and CAN FD frames
[SRS_Can_01168] The CAN Interface shall implement an interface [SWS_CANIF_91002]
for de-initialization
[SRS_Can_01169] The CAN interface shall provide a function to [SWS_CANIF_91001]
return the current CAN controller error state
7 Functional specification
Note: The resulting ID could be calculated in the following way: (CanIfTxPduCanId &
CanIfTxPduCanIdMask) | (<dynamic ID parts> & ∼CanIfTxPduCanIdMask)
[SWS_CANIF_00857] d CanIf_Init() (see [SWS_CANIF_00085]) initializes the
CanIds of the dynamic Transmit L-PDUs with CanIfTxPduType to the value con-
figured via CanIfTxPduCanId. c()
TransceiverIds within the CanIf shall start with ’0’. It shall be configurable via
CANIF_TRCV_ID (see ECUC_CanIf_00654). c()
Example:
CanIf CanDrv A CanDrv B
TransceiverId 0 Transceiver 0
TransceiverId 1 Transceiver 1
TransceiverId 2 Transceiver 0
During the notification process the CanIf maps the original CAN Controller or CAN
Transceiver parameter from the Driver module to the CanSm. This mapping is done as
the referenced CAN Controller or CAN Transceiver parameters are configured with the
abstracted CanIf parameters ControllerId or TransceiverId.
The CanIf supports multiple physical CAN channels. These have to be distinguished
by the CanSm for network control. The CanIf API provides request and read control
for multiple underlying physical CAN channels.
Moreover the CanIf does not distinguish between dedicated types of CAN physical
layers (i.e. Low-Speed CAN or High-Speed CAN), to which one or multiple CAN Con-
trollers are connected.
operation the software acceptance filter algorithm (see section 7.20 “Software receive
filter”) must be able to deal with both type of CanIds.
[SWS_CANIF_00281] is an optional feature. This feature can be realized by different
variants of implementations, no configuration options are available.
7.8 Initialization
The EcuM calls the CanIf’s function CanIf_Init() for initialization of the entire CanIf
(see [SWS_CANIF_00001]). All global variables and data structures are initialized
including flags and buffers during the initialization process. The EcuM executes initial-
ization of CanDrvs and CanTrcvs separately by call of their corresponding initialization
services (refer to [1] and [2, Specification of CAN Transceiver Driver]).
The CanIf expects that the CAN Controller remains in STOPPED mode like af-
ter power-on reset after the initialization process has been completed. In this
mode the CanIf and CanDrv are neither able to transmit nor receive CAN L-PDUs
(see [SWS_CANIF_00001]).
If re-initialization of the entire CAN modules during runtime is required, the EcuM shall
invoke the CanSm (see [3]) to initiate the required state transitions of the CAN Con-
troller by call of CAN Interface module’s API service CanIf_SetControllerMode().
The CanIf maps the calls from CanSm to calls of the respective CanDrvs (see subsec-
tion 8.6.3).
Call of Can_Write()
CAN Driver
CAN Hardware is
free? [No]
Trigger-transmit
PDU?
[Yes]
[No] [Yes]
CanIf stores information about the available hardware objects configured for trans-
mission purposes. The function CanIf_Transmit() maps the CanTxPduId to the
corresponding HTH and calls the function Can_Write() (see [SWS_CANIF_00318]).
At the scope of CanIf the transmit process starts with the call of CanIf_Transmit()
and it ends with invocation of upper layer module’s callback service
<User_TxConfirmation>(). During the transmit process CanIf, CanDrv
and the CAN Mailbox altogether shall store the L-PDU to be transmitted only once at
a single location. Depending on the transmit method, these are:
• The CAN hardware transmit object or
• The Transmit L-PDU Buffer inside CanIf, if transmit buffering is enabled.
For triggered transmission, CanIf only has to store the transmit request for the given
L-PDU but not its data. The data is fetched just in time by means of the trigger transmit
function when the HTH is free (again). A single Tx L-PDU, requested for transmission,
shall never be stored twice. This behavior corresponds to the usual way of periodic
communication on the CAN network.
If transmit buffering is enabled, CanIf will store a Tx L-PDU in a CanIf Trans-
mit L-PDU Buffer (CanIfBufferCfg), if it is rejected by CanDrv at Transmit
Request.
Basically, the overall buffer in CanIf for buffering Tx L-PDUs consits of one or multi-
ple CanIfBufferCfg (see CanIfBufferCfg). Whereas each CanIfBufferCfg is
assigned to one or multiple dedicated CanIfBufferHthRef (see CanIfBuffer-
HthRef) and can be configured to buffer one or multiple Tx L-PDUs. But as al-
ready mentioned above only one instance per Tx L-PDU can be buffered in the overall
amount of CanIfBufferCfg.
The behavior of CanIf during L-PDU transmission differs whether transmit buffering
is enabled in the configuration setup for the corresponding Tx L-PDU, or not. If trans-
mit buffering is disabled and a transmit request to CanDrv fails (CAN Controller
mailbox is in use, BasicCAN), the L-PDU is not copied to the CAN Controller’s
mailbox and CanIf_Transmit() returns the value E_NOT_OK. If transmit buffering is
enabled and a transmit request to CanDrv fails, depending on the CanIfTxBuffer
configuration the L-PDU can be stored in a CanIfTxBuffer. In this case the API
CanIf_Transmit() returns the value E_OK although the transmission could not be
performed. In this case CanIf takes care of the outstanding transmission of the L-PDU
via CanIf_TxConfirmation() callback and the upper layer doesn’t have to retry the
transmit request.
The number of available transmit CanIf Tx L-PDU Buffers can be configured
completely independent from the number of used Transmit L-PDUs defined in the
CAN network description file for this ECU.
As per [SWS_CANIF_00835] a Tx L-PDU refers HTHs via the CanIfBufferCfg con-
figuration container (see CanIfBufferCfg). This is valid if transmit buffering is not
needed as well. In this case, the buffer size (see CanIfBufferSize) of the Can-
IfBufferCfg has to be set to 0. Then CanIfBufferCfg configuration container is
only used to refer a HTH.
CanIf tries to store a new Transmit L-PDU or its Transmit Request in the
Transmit L-PDU Buffer only, if CanDrv return CAN_BUSY during a call of
Can_Write() (see [SWS_CANIF_00381]).
[SWS_CANIF_00063] d The CanIf shall support buffering of a CAN L-PDU for Basic-
CAN transmission in the CanIf, if parameter CanIfPublicTxBuffering (see Can-
IfPublicTxBuffering) is enabled. c(SRS_Can_01020)
[SWS_CANIF_00849] d For dynamic Transmit L-PDUs, also the CanId has to be
stored in the CanIfTxBuffer. c()
[SWS_CANIF_00381] d If transmit buffering is enabled (see [SWS_CANIF_00063])
and if the call of Can_Write() for a PDU configured for direct transmission returns
with CAN_BUSY, CanIf shall check if it is possible to buffer the CanIf Tx L-PDU,
which was requested to be transmitted via Can_Write() in a CanIfTxBuffer. c
(SRS_Can_01126)
When the call of Can_Write() returns with CAN_BUSY, CanDrv has rejected the
requested transmission of the L-PDU (see [1]) because there is no free hardware object
available at time of the transmit request (Tx request).
[SWS_CANIF_00895] d If the rejected data length exceeds the configured size, CanIf
shall:
• buffer the configured amount of data and discard the rest
• and report runtime error code CANIF_E_DATA_LENGTH_MISMATCH to the
Det_ReportRuntimeError() service of the DET.
c()
[SWS_CANIF_00881] d If transmit buffering is enabled (see [SWS_CANIF_00063])
and if the call of Can_Write() for a PDU configured for triggered transmission returns
with CAN_BUSY, CanIf shall check if it is possible to buffer the Transmit Request,
which was requested to be transmitted via Can_Write() in a CanIfTxBuffer. c
(SRS_Can_01126)
[SWS_CANIF_00835] d When CanIf checks whether it is possible to buffer
a CanIf Tx L-PDU or a Transmit Request (see [SWS_CANIF_00381],
[SWS_CANIF_00881]), this shall only be possible, if the CanIf Tx L-PDU is as-
signed (see CanIfTxPduBufferRef) to a CanIfBufferCfg (see CanIfBuffer-
Cfg), which is configured with a buffer size (see CanIfBufferSize) bigger than zero.
c()
The buffer size of any CanIfTxBuffer is only configurable bigger than zero, if transmit
buffering is enabled. Additionally the buffer size of a single CanIfTxBuffer is only
configurable bigger than zero if the CanIfTxBuffer is not assigned to a FullCAN HTH
(see CanIfBufferSize).
The CAN hardware receive object is locked until the end of the copy process to the tem-
porary or upper layer module buffer. The hardware object will be immediately released
after CanIf_RxIndication() of CanIf returns to avoid loss of data.
CanDrv, CanIf and the upper layer module, which belongs to the received L-PDU,
access the same temporary intermediate buffer, which can be located either in the CAN
hardware receive object of the CAN Controller or as temporary buffer in CanDrv.
Receive Interrupt
CAN Controller
Data «datastore»
CAN Driver [Yes]
normalization Temporary buffer in CAN
necessary? Driver
[No]
Rx L-PDU [Yes]
received in Software filtering
BasicCAN ?
[No]
[Yes]
Data Length
Check enabled? [L-PDU passed]
[No]
Data Length [No]
Check failed ?
[Yes]
[L-PDU not
Call Det_ReportRuntimeError() with passed]
error code
CANIF_E_INVALID_DATA_LENGTH
Call <User_RxIndication>() to
upper layers
«datastore»
Upper Layer Copy data to L-PDU
buffer
<User_RxIndication>() returns
CanIf_RxIndication() returns
Note: A single receive L-PDU can only be assigned to a single receive indi-
cation callback service (refer to multiplicity of CANIF_USERRXINDICATION_NAME,
ECUC_CanIf_00530).
Overview: CanIf performs the following steps at a call of CanIf_RxIndication():
• Software Filtering (only BasicCAN), if configured
• Data Length Check, if configured
• buffer received L-SDU if configured
• call upper layer receive indication callback service, if configured.
CanIf provides services for controlling the communication mode of all supported CAN
Controllers represented by the underlying CanDrv. This means that all CAN Con-
trollers are controlled by the corresponding provided API services to request and
read the current controller mode.
The CAN Controller status may be changed at request of the upper layer by the
calling of CanIf_SetControllerMode() service. The request is passed by CanIf
via the CanDrv API to the addressed CAN Controller.
The consistent management of all CAN Controllers connected at one CAN network
is the task of CanSm. By this way CanSm is responsible to set all CAN Controllers
of one CAN network sequentially to sleep mode or to wake them up.
CanIf accepts every state transition request by calling the function
CanIf_SetControllerMode() or CanIf_ControllerBusOff(). CanIf
does not decide if a requested mode transition of the CAN Controller is valid or
not. CanIf only interacts with CanDrv by fetching the current mode and execution of
requested mode transitions.
This network related state machine is implemented in CanSm. Refer to [3]. CanIf only
stores the requested mode and executes the requested transition.
Hint: As optimisation to avoid frequent requests to CanDrv for internal
use the last state indicated by CanIf_ControllerModeIndication() and
Can_GetControllerMode() could be stored per controller.
Hint: It has to be regarded that not only CanSm is able to request CAN Controller Mode
changes.
According to the requested operation mode by CanSm, CanIf forwards request Can-
Drvs.
[SWS_CANIF_00677] d If a controller mode referenced by ControllerId is in state
CAN_CS_STOPPED and if the PduIdType parameter in a call of CanIf_Transmit()
is assigned to that CAN Controller, then the call of CanIf_Transmit() does not
result in a call of Can_Write() (see [SWS_CANIF_00317]) and returns E_NOT_OK. c
()
[SWS_CANIF_00485] d If a controller mode referenced by ControllerId enters
state CAN_CS_STOPPED, then CanIf shall clear the CanIf transmit buffers assigned to
the CAN Controller corresponding. c()
[SWS_CANIF_00739] d If a controller mode referenced by ControllerId enters
state CAN_CS_STOPPED, then CanIf shall inform corresponding upper layer modules
about failed transmission by calling <User_TxConfirmation>(id, E_NOT_OK) for
every outstanding TxConfirmation assigned to that CAN Controller. If CanIfPub-
licTxConfirmPollingSupport is enabled, CanIf shall also clear the information
about a TxConfirmation (see [SWS_CANIF_00740]). c()
Note: This ensures, that for each PDU, which shall be transmitted via
CanIf_Transmit(), either a positive or negative <User_TxConfirmation>() is
called.
[SWS_CANIF_00724] d When callback CanIf_ControllerBusOff(ControllerId)
is called, the CanIf shall call CanSM_ControllerBusOff(ControllerId) of
The API for state change requests to the CAN Controller behaves in an asyn-
chronous manner with asynchronous notification via callback services.
The real transition to the requested mode occurs asynchronously based on set-
ting of transition requests in the CAN controller hardware, e.g. request for
sleep transition CAN_CS_SLEEP. After successful change to e.g. CAN_CS_SLEEP
mode CanDrv calls function CanIf_ControllerModeIndication() and CanIf
in turn calls function <User_ControllerModeIndication>(). If CAN tran-
sitions very fast, CanIf_ControllerModeIndication() can be called during
CanIf_SetControllerMode(). This is implementation specific.
Unsuccessful or no mode transitions of the CAN Controllers have to be tracked by
upper layer modules. Mode transitions CAN_CS_STARTED and CAN_CS_STOPPED are
treated similar.
Upper layer modules of CanIf can poll the current Controller Mode by
CanIf_GetControllerMode().
Not all types of CAN Controllers support Sleep and Wake-Up Mode. These
modes are then encapsulated by CanDrv by providing hardware independent oper-
ation modes via its interface, which has to be managed by CanIf.
Note: It is possible that during transition from CAN_CS_STOPPED to CAN_CS_SLEEP
CAN Controller may indicate a wake-up interrupt to the ECU Integration Code.
CanIf distinguishes between internal initiated CAN controller wake-up request (inter-
nal request) and network wake-up request (external request). The internal request is
initiated by call of CanIf’s function CanIf_SetControllerMode(ControllerId,
CAN_CS_STARTED) and it is an internal asynchronous request. The external request
is a CAN controller event, which is notified by CanDrv or CanTrcv to the ECU Inte-
gration Code. For details see respective UML diagram in the chapter "CAN Wakeup
Sequences" of document [13].
7.18.4 Wake-up
The ECU supports wake-up over CAN network, regardless of the used wake-up
method (directly about CAN Controller or CAN Transceiver), only if the CAN
Controller and CAN Transceiver are set to some kind of "listen for wake-up"
mode. This is usually a Sleep Mode, where the usual communication is disabled. Only
this mode ensures that the CAN Controller is stopped. Thus, the wake-up interrupt
can be enabled.
Note: When a CAN Controller / CAN Transceiver detects a bus wake-up event,
then this will be notified to the ECU State Manager directly. If such a wake-up
event needs to be validated, the EcuM (or a CDD) switches on the correspond-
ing CAN Controller (CanIf_SetControllerMode()) and CAN Transceiver
(CanIf_SetTrcvMode()) (For more details see chapter 9 of [13]).
Attention: CanIf notifies the upper layer modules about received messages after
the PDU Channel Mode has been set to CANIF_ONLINE or CANIF_TX_OFFLINE.
Thus, it is necessary that the PDU Channel Mode is not set to CANIF_ONLINE or
CANIF_TX_OFFLINE if wake-up validation is required.
Note: As per [SWS_CAN_00411] and CAN Controller State Diagram (see [1]) a direct
transition from mode CAN_CS_SLEEP to CAN_CS_STARTED is not allowed.
[SWS_CANIF_00226] d CanIf shall provide wake-up service
CanIf_CheckValidation() only, if
• underlying CAN Controller provides wake-up support and wake-up is enabled
by the parameter CANIF_CTRL_WAKEUP_SUPPORT (see ECUC_CanIf_00637 )
and by CanDrv configuration
• and/or underlying CAN Transceiver provides wake-up support and
wake-up is enabled by the parameter CANIF_TRCV_WAKEUP_SUPPORT
(see ECUC_CanIf_00606) and by CanTrcv configuration
• and configuration parameter CANIF_PUBLIC_WAKEUP_CHECK_VALIDATION_SUPPORT
(see ECUC_CanIf_00611) is enabled.
c()
[SWS_CANIF_00286] d If CanIfPublicWakeupCheckValidSupport equals
TRUE, CanIf enables the detection for CAN wake-up validation. Therefore,
CanIf stores the event of the first valid call of CanIf_RxIndication() of a
CAN Controller which has been set to CAN_CS_STARTED. The first call of
CanIf_RxIndication() is valid:
• only for received NM messages if CanIfPublicWakeupCheckValidByNM is
TRUE
• for all received messages corresponding to a configured Rx PDU if CanIfPub-
licWakeupCheckValidByNM is FALSE.
c(SRS_Can_01151)
[SWS_CANIF_00179] d <User_ValidateWakeupEvent>(sources) shall be
called during CanIf_CheckValidation(WakeupSource), whereas sources is
set to WakeupSource, if the event of the first called CanIf_RxIndication() is
stored in CanIf at the corresponding CAN Controller. c(SRS_Can_01136)
Note: If there is no wake-up event stored in CanIf, CanIf_CheckValidation()
should not call <User_ValidateWakeupEvent>().
Note: The parameter of the function <User_ValidateWakeupEvent>() is of type:
• sources: EcuM_WakeupSourceType (see [13])
Each L-PDU is assigned to one dedicated physical CAN channel connected to one
CAN Controller and one CAN network. By this way all L-PDUs belonging to one
Physical Channel can be controlled on the view of handling logically single L-PDU
channel groups. Those logical groups represent all L-PDUs of one ECU connected to
one underlying CAN network.
Figure 7.7 below shows one possible usage of L-PDU channel group and its relation to
the upper layers and/or networks.
An L-PDU can only be assigned to one channel group.
Typical users like PduR or the Network Management are responsible for controlling the
PDU operation modes.
Figure 7.8 shows a diagram with possible PDU channel modes. Each L-PDU chan-
nel can be in CANIF_OFFLINE (no communication), CANIF_TX_OFFLINE (passive
mode => listen without sending), CANIF_TX_OFFLINE_ACTIVE (simulated transmis-
sion without listening (see [SWS_CANIF_00072]), and CANIF_ONLINE (full communi-
cation). The default state is the CANIF_OFFLINE mode.
7.19.2.1 CANIF_OFFLINE
7.19.2.2 CANIF_ONLINE
7.19.2.3 CANIF_OFFLINE_ACTIVE
The configuration tool handles the information about hardware acceptance filter set-
tings. The most important settings are the number of the L-PDU hardware objects
and their range. The outlet range defines, which Receive L-PDUs belongs to each
Hardware Receive Object. The following definitions are possible:
• a single Receive L-PDU (FullCAN reception),
• a list of Receive L-PDUs or
• one or multiple ranges of Receive L-PDUs can be linked to a Hardware Re-
ceive Object (BasicCAN reception).
For definition of range reception it is necessary to define at least one Rx L-PDU where
the CanId or the complete ID range is inside the defined range.
[SWS_CANIF_00645] d A range of CanIds which shall pass the software receive fil-
ter shall either be defined by its upper limit (see CANIF_HRHRANGE_UPPER_CANID,
ECUC_CanIf_00630) and lower limit (see CANIF_HRHRANGE_LOWER_CANID,
ECUC_CanIf_00629) CanId, or by a base ID (see CANIF_HRHRANGE_BASEID) and
a mask that defines the relevant bits of the base ID (see CANIF_HRHRANGE_MASK). c
()
Note: Software receive filtering is optional (see multiplicity of 0..∗ in
ECUC_CanIf_00628).
[SWS_CANIF_00646] d Each configurable range of CanIds
(see [SWS_CANIF_00645]), which shall pass the software receive filter,
shall be configurable either for Standard CAN IDs or Extended CAN IDs via
CANIF_HRHRANGE_CANIDTYPE (see ECUC_CanIf_00644). c()
Receive L-PDUs are provided as constant structures statically generated from the
communication matrix. They are arranged according to the corresponding hardware
acceptance filter, so that there is one single list of receive CanIds for every Hardware
Receive Object (HRH). The corresponding list can be derived by the HRH, if multiple
BasicCAN objects are used. The subsequent filtering is the search through one list of
multiple CanIds by comparing them with the new received CanId. In case of a hit the
Receive L-PDU is derived from the found CanId.
[SWS_CANIF_00030] d If the CanId of the received L-PDU in the HRH is config-
ured to be received, then CanIf shall accept this L-PDU and the software filtering
algorithm shall derive the corresponding Receive L-PDU from the found CanId. c
(SRS_Can_01018)
Each Transmit L-PDU enables CanIf to derive the corresponding CAN Con-
troller and implicitly CanDrv serving the affected Hardware Unit. Resolving of
these dependencies is possible because of the construction of the CAN Controller
Handle: it combines CanDrv Handle and the corresponding CAN Controller in the
Hardware Unit.
At configuration time a CAN Controller Handle will be mapped to each CAN Con-
troller. The sequence diagram Figure 7.10 below demonstrates two transmit re-
quests directed to different CanDrvs. CanIf needs only to select the corresponding
CanDrv in order to call the correct API service.
Note: Figure 7.10 and the following table serve only as an example. Finally, it is up to
the implementation to access the correct APIs of underlying CanDrvs.
Can_Write(Std_ReturnType, Can_HwHandleType,
const Can_PduType*)
Copy L-PDU in CAN
Hardware A()
Can_Write()
CanIf_Transmit()
Can_Write(Std_ReturnType, Can_HwHandleType,
const Can_PduType*)
Copy L-PDU in CAN
Hardware B()
Even if multiple CanDrvs are used in a single ECU Every notification callback service
invoked by CanDrvs at the CanIf exists only once. This means, that CanIf has
to identify calling CanDrv using the passed parameters. CanIf identifies the calling
CanDrv from the ControllerId within the Mailbox (Can_HwType) structure.
Receive
Interrupt()
CanIf_RxIndication(const Can_HwType*,
const PduInfoType*)
Received L-PDU
validation check (SW
Filtering, Data
<User_RxIndication>(PduIdType, Length Check)
const PduInfoType*)
Copy
Data()
Copy
Data()
<User_RxIndication>()
CanIf_RxIndication()
Receive
Interrupt()
Receive
Interrupt()
CanIf_RxIndication(const Can_HwType*,
const PduInfoType*)
Copy
data()
<User_RxIndication>()
CanIf_RxIndication()
Receive
Interrupt()
system point of view, the format for each frame has to be configured. Otherwise the
sender wouldn’t know which kind of frame shall be transmitted.
The following table shows the available error codes. CanIf shall detect them to the
DET, if configured.
Type of error Relevance Related error code Value
API service called with Development CANIF_E_PARAM_CANID 10
invalid parameter CANIF_E_PARAM_HOH 12
CANIF_E_PARAM_LPDU 13
CANIF_E_PARAM_CONTROLLERID 15
CANIF_E_PARAM_WAKEUPSOURCE 16
CANIF_E_PARAM_TRCV 17
CANIF_E_PARAM_TRCVMODE 18
CANIF_E_PARAM_TRCVWAKEUPMODE 19
CANIF_E_PARAM_CTRLMODE 21
CANIF_E_PARAM_PDU_MODE 22
API service called with Development CANIF_E_PARAM_POINTER 20
invalid pointer
API service used without Development CANIF_E_UNINIT 30
module initialization
Transmit PDU ID invalid Development CANIF_E_INVALID_TXPDUID 50
Receive PDU ID invalid Development CANIF_E_INVALID_RXPDUID 60
CAN Interface initialisation Development CANIF_E_INIT_FAILED 80
failed
8 API specification
8.2.1 CanIf_ConfigType
[SWS_CANIF_00144] d
Name: CanIf_ConfigType
Type: Structure
Element: implementation The contents of the initial-
specific ization data structure are
CAN interface specific
Description: This type defines a data structure for the post build parameters of the CAN
interface for all underlying CAN drivers. At initialization the CanIf gets a
pointer to a structure of this type to get access to its configuration data, which
is necessary for initialization.
c()
8.2.2 CanIf_PduModeType
[SWS_CANIF_00137] d
Name: CanIf_PduModeType
Type: Enumeration
Range: CANIF_OFFLINE 0x00 = 0 Transmit and receive path of
the corresponding channel are
disabled => no communication
mode
CANIF_TX_OFFLINE 0x01 Transmit path of the corresponding
channel is disabled. The receive
path is enabled.
CANIF_TX_OFFLINE_ACTIVE 0x02 Transmit path of the corresponding
channel is in offline active mode
(see SWS_CANIF_00072). The
receive path is disabled.
This mode requires
CanIfTxOfflineActiveSupport =
TRUE.
CANIF_ONLINE 0x03 Transmit and receive path of the
corresponding channel are
enabled => full operation mode
Description: The PduMode of a channel defines its transmit or receive activity.
Communication direction (transmission and/or reception) of the channel can
be controlled separately or together by upper layers.
c()
8.2.3 CanIf_NotifStatusType
[SWS_CANIF_00201] d
Name: CanIf_NotifStatusType
Type: Enumeration
Range: CANIF_TX_RX_NOTIFICATION – The requested Rx/Tx CAN L-PDU
was successfully transmitted or
received.
CANIF_NO_NOTIFICATION 0x00 No transmit or receive event
occurred for the requested L-PDU.
Description: Return value of CAN L-PDU notification status.
c()
8.3.1 CanIf_Init
[SWS_CANIF_00001] d
Service name: CanIf_Init
Syntax: void CanIf_Init(
const CanIf_ConfigType* ConfigPtr
)
Service ID[hex]: 0x01
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ConfigPtr Pointer to configuration parameter set, used e.g. for
post build parameters
Parameters (inout): None
Parameters (out): None
Return value: None
Description: This service Initializes internal and external interfaces of the CAN Inter-
face for the further processing.
8.3.2 CanIf_DeInit
[SWS_CANIF_91002] d
Service name: CanIf_DeInit
Syntax: void CanIf_DeInit(
void
)
Service ID[hex]: 0x02
Sync/Async: Synchronous
c(SRS_Can_01168, 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 CanIf_DeInit() function has to be sure there are no on-going
transmissions/receptions, nor any pending transmission confirmations.
8.3.3 CanIf_SetControllerMode
[SWS_CANIF_00003] d
Service name: CanIf_SetControllerMode
Syntax: Std_ReturnType CanIf_SetControllerMode(
uint8 ControllerId,
Can_ControllerStateType ControllerMode
)
Service ID[hex]: 0x03
Sync/Async: Asynchronous
Reentrancy: Reentrant (Not for the same controller)
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN controller, which is requested for mode transi-
tion.
ControllerMode Requested mode transition
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Controller mode request has been accepted
E_NOT_OK: Controller mode request has not been
accepted
Description: This service calls the corresponding CAN Driver service for changing of
the CAN controller mode.
c(SRS_Can_01027)
Note: The service CanIf_SetControllerMode() initiates a transition to the re-
quested CAN controller mode ControllerMode of the CAN controller which is as-
signed by parameter ControllerId.
8.3.4 CanIf_GetControllerMode
[SWS_CANIF_00229] d
Service name: CanIf_GetControllerMode
Syntax: Std_ReturnType CanIf_GetControllerMode(
uint8 ControllerId,
Can_ControllerStateType* ControllerModePtr
)
Service ID[hex]: 0x04
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN controller, which is requested for current oper-
ation mode.
Parameters (inout): None
Parameters (out): ControllerModePtr Pointer to a memory location, where the current
mode of the CAN controller will be stored.
Return value: Std_ReturnType E_OK: Controller mode request has been accepted.
E_NOT_OK: Controller mode request has not been
accepted.
Description: This service calls the corresponding CAN Driver service for obtaining the
current status of the CAN controller.
c(SRS_Can_01028)
[SWS_CANIF_00313] d If parameter ControllerId of
CanIf_GetControllerMode() has an invalid, the CanIf shall report development
8.3.5 CanIf_GetControllerErrorState
[SWS_CANIF_91001] d
Service name: CanIf_GetControllerErrorState
Syntax: Std_ReturnType CanIf_GetControllerErrorState(
uint8 ControllerId,
Can_ErrorStateType* ErrorStatePtr
)
Service ID[hex]: 0x4b
Sync/Async: Synchronous
Reentrancy: Non Reentrant for the same ControllerId
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN controller, which is requested for ErrorState.
Parameters (inout): None
Parameters (out): ErrorStatePtr Pointer to a memory location, where the error state
of the CAN controller will be stored.
Return value: Std_ReturnType E_OK: Error state request has been accepted.
E_NOT_OK: Error state request has not been ac-
cepted.
Description: This service calls the corresponding CAN Driver service for obtaining the
error state of the CAN controller.
c(SRS_Can_01169)
[SWS_CANIF_00898] d If parameter ControllerId of
CanIf_GetControllerErrorState() has an invalid value, the CanIf
shall report development error code CANIF_E_PARAM_CONTROLLERID
to the Det_ReportError service of the DET, when
CanIf_GetControllerErrorState() is called. c(SRS_BSW_00323)
[SWS_CANIF_00899] d If parameter ErrorStatePtr of
CanIf_GetControllerErrorState() is a null pointer, the CanIf shall re-
port development error code CANIF_E_PARAM_POINTER to the Det_ReportError
service of the DET, when CanIf_GetControllerErrorState() is called. c
(SRS_BSW_00323)
8.3.6 CanIf_Transmit
[SWS_CANIF_00005] d
Service name: CanIf_Transmit
Syntax: Std_ReturnType CanIf_Transmit(
PduIdType TxPduId,
const PduInfoType* PduInfoPtr
)
Service ID[hex]: 0x49
Sync/Async: Synchronous
Reentrancy: Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters (in): TxPduId Identifier of the PDU to be transmitted
PduInfoPtr Length of and pointer to the PDU data and pointer
to MetaData.
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Transmit request has been accepted.
E_NOT_OK: Transmit request has not been ac-
cepted.
Description: Requests transmission of a PDU.
c(SRS_Can_01008)
Note: The corresponding CAN Controller and HTH have to be resolved by the Tx-
PduId.
[SWS_CANIF_00317] d The service CanIf_Transmit() shall not accept a trans-
mit request, if the controller mode referenced by ControllerId is different to
CAN_CS_STARTED and the channel mode at least for the transmit path is not online
or offline active. c()
[SWS_CANIF_00318] d CanIf_Transmit() shall call Can_Write() with the hard-
ware transmit handle corresponding to the provided TxPduId and a Can_PduType
structure where:
• swPduHandle is set to the CanTxPduId used in the corresponding
CanIf_TxConfirmation() call
• length is set to the value provided as PduInfoPtr->SduLength, possibly
reduced according to [SWS_CANIF_00894]
• id is set to the CAN ID associated with the TxPduId
• sdu is set to the pointer provided as PduInfoPtr->SduDataPtr
c()
Note: PduInfoPtr is a pointer to a L-SDU user memory, CAN Identifier, L-SDU han-
dle and Data Length (see [1, Specification of CAN Driver]).
[SWS_CANIF_00243] d CanIf shall set the two most significant bits (’IDentifier Exten-
sion flag’ (see [12, ISO11898 (CAN)]) and ’CAN FD flag’) of the CanId (PduInfoPtr-
>id) before CanIf passes the predefined CanId to CanDrv at call of Can_Write()
(see [1, Specification of CAN Driver], definition of Can_IdType [SWS_Can_00416]).
The CanId format type of each CAN L-PDU can be configured by CanIfTxPdu-
CanIdType, refer to CanIfTxPduCanIdType. c(SRS_Can_01141)
[SWS_CANIF_00882] d CanIf_Transmit() shall accept a NULL pointer as
PduInfoPtr->SduDataPtr, if the PDU is configured for triggered transmission:
CanIfTxPduTriggerTransmit = TRUE. c()
[SWS_CANIF_00162] d If the call of Can_Write() returns E_OK the transmit request
service CanIf_Transmit() shall return E_OK. c()
Note: If the call of Can_Write() returns E_NOT_OK, then the transmit request ser-
vice CanIf_Transmit() shall return E_NOT_OK. If the transmit request service
CanIf_Transmit() returns E_NOT_OK, then the upper layer module is responsible
to repeat the transmit request.
[SWS_CANIF_00319] d If parameter TxPduId of CanIf_Transmit() has an invalid
value, CanIf shall report development error code CANIF_E_INVALID_TXPDUID to
the Det_ReportError service of the DET, when CanIf_Transmit() is called.
c(SRS_BSW_00323)
[SWS_CANIF_00320] d If parameter PduInfoPtr of CanIf_Transmit() has an
invalid value, CanIf shall report development error code CANIF_E_PARAM_POINTER
to the Det_ReportError service of the DET module, when CanIf_Transmit()
is called. c(SRS_BSW_00323)
[SWS_CANIF_00893] d When CanIf_Transmit() is called with PduInfoPtr-
>SduLength exceeding the maximum length of the PDU referenced by TxPduId:
• SduLength > 8 if the Can_IdType indicates a classic CAN frame
• SduLength > 64 if the Can_IdType indicates a CAN FD frame
CanIf shall report runtime error code CANIF_E_DATA_LENGTH_MISMATCH to the
Det_ReportRuntimeError() service of the DET. c()
Note: Besides static configured transmissions there are dynamic transmissions, too.
Therefore, the valid data length is always passed by PduInfoPtr->SduLength.
Furthermore, even the frame type might change via CanIf_SetDynamicTxId().
[SWS_CANIF_00893] ensures that not matching transmit requests can be detected
via DET.
[SWS_CANIF_00894] d When CanIf_Transmit() is called with PduInfoPtr-
>SduLength exceeding the maximum length of the PDU referenced by TxPduId and
CanIfTxPduTruncation is enabled, CanIf shall transmit as much data as possible
and discard the rest. c()
[SWS_CANIF_00900] d When CanIf_Transmit() is called with PduInfoPtr-
>SduLength exceeding the maximum length of the PDU referenced by TxPduId
8.3.7 CanIf_CancelTransmit
[SWS_CANIF_00520] d
Service name: CanIf_CancelTransmit
Syntax: Std_ReturnType CanIf_CancelTransmit(
PduIdType TxPduId
)
Service ID[hex]: 0x4a
Sync/Async: Synchronous
Reentrancy: Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters (in): TxPduId Identification of the PDU to be cancelled.
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Cancellation was executed successfully by
the destination module.
E_NOT_OK: Cancellation was rejected by the des-
tination module.
Description: Requests cancellation of an ongoing transmission of a PDU in a lower
layer communication module.
c()
Note: The service CanIf_CancelTransmit() has no functionality and is called by
the AUTOSAR PduR to achieve bus agnostic behavior.
[SWS_CANIF_00521] d The service CanIf_CancelTransmit() shall
be pre-compile time configurable On/Off by the configuration parameter
CANIF_PUBLIC_CANCEL_TRANSMIT_SUPPORT (see ECUC_CanIf_00614). It
shall be configured ON if PduRComCancelTransmitSupport is configured as ON. c()
[SWS_CANIF_00652] d If parameter TxPduId of CanIf_CancelTransmit()
has an invalid value, CanIf shall report development error code
CANIF_E_INVALID_TXPDUID to the Det_ReportError service of the DET,
when CanIf_CancelTransmit() is called. c(SRS_BSW_00323)
8.3.8 CanIf_ReadRxPduData
[SWS_CANIF_00194] d
c(SRS_Can_01125, SRS_Can_01129)
[SWS_CANIF_00324] d The function CanIf_ReadRxPduData() shall not accept a
request and return E_NOT_OK, if the corresponding controller mode refrenced by Con-
trollerId is different to CAN_CS_STARTED and the channel mode is in the receive
path online. c()
[SWS_CANIF_00325] d If parameter CanIfRxSduId of CanIf_ReadRxPduData()
has an invalid value, e.g. not configured to be stored within CanIf via
CANIF_READRXPDU_DATA (ECUC_CanIf_00600), CanIf shall report development
error code CANIF_E_INVALID_RXPDUID to the Det_ReportError service of the
DET, when CanIf_ReadRxPduData() is called. c(SRS_BSW_00323)
[SWS_CANIF_00326] d If parameter CanIfRxInfoPtr of
CanIf_ReadRxPduData() has an invalid value, CanIf shall report develop-
ment error code CANIF_E_PARAM_POINTER to the Det_ReportError service of
the DET module, when CanIf_ReadRxPduData() is called. c(SRS_BSW_00323)
[SWS_CANIF_00329] d CanIf_ReadRxPduData() shall not be used for CanIfRxS-
duId, which are defined to receive multiple CAN-Ids (range reception). c()
Note: During the call of CanIf_ReadRxPduData() the buffer of CanIfRxInfoPtr is
controlled by CanIf and this buffer should not be accessed for read/write from another
call context. After return of this call the ownership changes to the upper layer.
[SWS_CANIF_00330] d Configuration of CanIf_ReadRxPduData(): This API can
be enabled or disabled at pre-compile time configuration by the configuration parameter
CANIF_PUBLIC_READRXPDU_DATA_API (ECUC_CanIf_00607 ). c()
8.3.9 CanIf_ReadTxNotifStatus
[SWS_CANIF_00202] d
Service name: CanIf_ReadTxNotifStatus
Syntax: CanIf_NotifStatusType CanIf_ReadTxNotifStatus(
PduIdType CanIfTxSduId
)
Service ID[hex]: 0x07
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): CanIfTxSduId L-SDU handle to be transmitted.
This handle specifies the corresponding CAN L-
SDU ID and implicitly the CAN Driver instance as
well as the corresponding CAN controller device.
Parameters (inout): None
Parameters (out): None
Return value: CanIf_NotifStatus Current confirmation status of the corresponding
Type CAN Tx L-PDU.
Description: This service returns the confirmation status (confirmation occurred or
not) of a specific static or dynamic CAN Tx L-PDU, requested by the
CanIfTxSduId.
c(SRS_Can_01130)
Note: This function notifies the upper layer about any transmit confirmation event to
the corresponding requested L-SDU.
[SWS_CANIF_00393] d If configuration parameters
CANIF_PUBLIC_READTXPDU_NOTIFY_STATUS_API (ECUC_CanIf_00609) and
CANIF_TXPDU_READ_NOTIFYSTATUS (ECUC_CanIf_00589) for the transmitted
L-SDU are set to TRUE, and if CanIf_ReadTxNotifStatus() is called, the CanIf
shall reset the notification status for the transmitted L-SDU. c()
[SWS_CANIF_00331] d If parameter CanIfTxSduId of
CanIf_ReadTxNotifStatus() is out of range or if no status information was
configured for this CAN Tx L-SDU, CanIf shall report development error code
CANIF_E_INVALID_TXPDUID to the Det_ReportError service of the DET
when CanIf_ReadTxNotifStatus() is called. c(SRS_BSW_00323)
[SWS_CANIF_00335] d Configuration of CanIf_ReadTxNotifyStatus(): This API
can be enabled or disabled at pre-compile time configuration globally by the parameter
CANIF_PUBLIC_READTXPDU_NOTIFY_STATUS_API (see ECUC_CanIf_00609). c()
8.3.10 CanIf_ReadRxNotifStatus
[SWS_CANIF_00230] d
c(SRS_Can_01130, SRS_Can_01131)
Note: This function notifies the upper layer about any receive indication event to the
corresponding requested L-SDU.
[SWS_CANIF_00394] d If configuration parameters
CANIF_PUBLIC_READRXPDU_NOTIFY_STATUS_API (ECUC_CanIf_00608) and
CANIF_RXPDU_READ_NOTIFYSTATUS (ECUC_CanIf_00595) are set to TRUE, and
if CanIf_ReadRxNotifStatus() is called, then CanIf shall reset the notification
status for the received L-SDU. c()
[SWS_CANIF_00336] d If parameter CanIfRxSduId of
CanIf_ReadRxNotifStatus() is out of range or if status for CanRxPduId
was requested whereas CANIF_READRXPDU_DATA_API is disabled or if no status
information was configured for this CAN Rx L-SDU, CanIf shall report development
error code CANIF_E_INVALID_RXPDUID to the Det_ReportError service of
the DET, when CanIf_ReadRxNotifStatus() is called. c(SRS_BSW_00323)
Note: The function CanIf_ReadRxNotifStatus() must not be used for CanI-
fRxSduIds, which are defined to receive multiple CAN-Ids (range reception).
[SWS_CANIF_00340] d Configuration of CanIf_ReadRxNotifStatus(): This API
can be enabled or disabled at pre-compile time configuration globally by the parameter
CANIF_PUBLIC_READRXPDU_NOTIFY_STATUS_API (see ECUC_CanIf_00608). c()
8.3.11 CanIf_SetPduMode
[SWS_CANIF_00008] d
Service name: CanIf_SetPduMode
c()
Note: The channel parameter denoting the predefined logical PDU channel can be
derived from parameter ControllerId of function CanIf_SetPduMode().
[SWS_CANIF_00341] d If CanIf_SetPduMode() is called with in-
valid ControllerId, CanIf shall report development error code
CANIF_E_PARAM_CONTROLLERID to the Det_ReportError service of the
DET module. c(SRS_BSW_00323)
[SWS_CANIF_00860] d If CanIf_SetPduMode() is called with invalid PduMod-
eRequest, CanIf shall report development error code CANIF_E_PARAM_PDU_MODE
to the Det_ReportError service of the DET module. c(SRS_BSW_00323)
[SWS_CANIF_00874] d The service CanIf_SetPduMode() shall not accept any re-
quest and shall return E_NOT_OK, if the controller mode referenced by ControllerId
is not in state CAN_CS_STARTED. c()
8.3.12 CanIf_GetPduMode
[SWS_CANIF_00009] d
Service name: CanIf_GetPduMode
Syntax: Std_ReturnType CanIf_GetPduMode(
uint8 ControllerId,
CanIf_PduModeType* PduModePtr
)
Service ID[hex]: 0x0a
Sync/Async: Synchronous
c()
[SWS_CANIF_00346] d If CanIf_GetPduMode() is called with in-
valid ControllerId, CanIf shall report development error code
CANIF_E_PARAM_CONTROLLERID to the Det_ReportError service of the
DET module. c(SRS_BSW_00323)
[SWS_CANIF_00657] d If CanIf_GetPduMode() is called with invalid PduMod-
ePtr, CanIf shall report development error code CANIF_E_PARAM_POINTER to the
Det_ReportError service of the DET module. c(SRS_BSW_00323)
8.3.13 CanIf_GetVersionInfo
[SWS_CANIF_00158] d
Service name: CanIf_GetVersionInfo
Syntax: void CanIf_GetVersionInfo(
Std_VersionInfoType* VersionInfo
)
Service ID[hex]: 0x0b
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): None
Parameters (inout): None
Parameters (out): VersionInfo Pointer to where to store the version information of
this module.
Return value: None
Description: This service returns the version information of the called CAN Interface
module.
c(SRS_BSW_00407, SRS_BSW_00411)
8.3.14 CanIf_SetDynamicTxId
[SWS_CANIF_00189] d
Service name: CanIf_SetDynamicTxId
Syntax: void CanIf_SetDynamicTxId(
PduIdType CanIfTxSduId,
Can_IdType CanId
)
Service ID[hex]: 0x0c
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): CanIfTxSduId L-SDU handle to be transmitted.
This handle specifies the corresponding CAN L-
SDU ID and implicitly the CAN Driver instance as
well as the corresponding CAN controller device.
CanId Standard/Extended CAN ID of CAN L-SDU that
shall be transmitted as FD or conventional CAN
frame.
Parameters (inout): None
Parameters (out): None
Return value: None
Description: This service reconfigures the corresponding CAN identifier of the re-
quested CAN L-PDU.
c()
[SWS_CANIF_00352] d If parameter CanIfTxSduId of
CanIf_SetDynamicTxId() has an invalid value, CanIf shall report development
error code CANIF_E_INVALID_TXPDUID to the Det_ReportError service of
the DET module, when CanIf_SetDynamicTxId() is called. c(SRS_BSW_00323)
[SWS_CANIF_00353] d If parameter CanId of CanIf_SetDynamicTxId()
has an invalid value, CanIf shall report development error code
CANIF_E_PARAM_CANID to the Det_ReportError service of the DET module,
when CanIf_SetDynamicTxId() is called. c(SRS_BSW_00323)
[SWS_CANIF_00355] d If CanIf was not initialized before calling
CanIf_SetDynamicTxId(), then the function CanIf_SetDynamicTxId()
shall not execute a reconfiguration of Tx CanId. c()
[SWS_CANIF_00356] d CanIf_SetDynamicTxId() shall not be interrupted by
CanIf_Transmit(), if the same L-SDU ID is handled. c()
[SWS_CANIF_00357] d Configuration of CanIf_SetDynamicTxId(): This func-
tion shall be pre compile time configurable On/Off by the configuration parameter
CANIF_PUBLIC_SETDYNAMICTXID_API (see ECUC_CanIf_00610). c()
8.3.15 CanIf_SetTrcvMode
[SWS_CANIF_00287] d
Service name: CanIf_SetTrcvMode
Syntax: Std_ReturnType CanIf_SetTrcvMode(
uint8 TransceiverId,
CanTrcv_TrcvModeType TransceiverMode
)
Service ID[hex]: 0x0d
Sync/Async: Asynchronous
Reentrancy: Non Reentrant
Parameters (in): TransceiverId Abstracted CanIf TransceiverId, which is assigned
to a CAN transceiver, which is requested for mode
transition
TransceiverMode Requested mode transition
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Transceiver mode request has been ac-
cepted.
E_NOT_OK: Transceiver mode request has not
been accepted.
Description: This service changes the operation mode of the tansceiver TransceiverId,
via calling the corresponding CAN Transceiver Driver service.
c()
Note: For more details, please refer to the [2, Specification of CAN Transceiver Driver].
[SWS_CANIF_00358] d The function CanIf_SetTrcvMode() shall call the function
CanTrcv_SetOpMode(Transceiver, OpMode) on the corresponding requested
CAN Transceiver Driver module. c()
Note: The parameters of the service CanTrcv_SetOpMode() are of type:
• OpMode: CanTrcv_TrcvModeType(desired operation mode)
• Transceiver: uint8 (Transceiver to which function call has to be applied)
(see [2, Specification of CAN Transceiver Driver])
[SWS_CANIF_00538] d If parameter TransceiverId of CanIf_SetTrcvMode()
has an invalid value, the CanIf shall report development error code
CANIF_E_PARAM_TRCV to the Det_ReportError service of the DET, when
CanIf_SetTrcvMode() is called. c(SRS_BSW_00323)
Note: The mode of a transceiver can only be changed to
CANTRCV_TRCVMODE_STANDBY, when the former mode of the transceiver has
been CANTRCV_TRCVMODE_NORMAL (see [2]). But this is not checked by the CanIf.
8.3.16 CanIf_GetTrcvMode
[SWS_CANIF_00288] d
Service name: CanIf_GetTrcvMode
Syntax: Std_ReturnType CanIf_GetTrcvMode(
uint8 TransceiverId,
CanTrcv_TrcvModeType* TransceiverModePtr
)
Service ID[hex]: 0x0e
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): TransceiverId Abstracted CanIf TransceiverId, which is assigned
to a CAN transceiver, which is requested for current
operation mode.
Parameters (inout): None
Parameters (out): TransceiverModePtr Requested mode of requested network the
Transceiver is connected to.
Return value: Std_ReturnType E_OK: Transceiver mode request has been ac-
cepted.
E_NOT_OK: Transceiver mode request has not
been accepted.
Description: This function invokes CanTrcv_GetOpMode and updates the parameter
TransceiverModePtr with the value OpMode provided by CanTrcv.
c()
Note: For more details, please refer to the [2, Specification of CAN Transceiver Driver].
[SWS_CANIF_00363] d The function CanIf_GetTrcvMode() shall call the function
CanTrcv_GetOpMode(Transceiver, OpMode) on the corresponding requested
CAN Transceiver Driver module. c()
Note: The parameters of the function CanTrcv_GetOpMode are of type:
• OpMode: CanTrcv_TrcvModeType (desired operation mode)
• Transceiver: uint8 (Transceiver to which API call has to be applied)
(see [2, Specification of CAN Transceiver Driver])
[SWS_CANIF_00364] d If parameter TransceiverId of CanIf_GetTrcvMode()
has an invalid value, the CanIf shall report development error code
CANIF_E_PARAM_TRCV to the Det_ReportError service of the DET mod-
ule, when CanIf_GetTrcvMode() is called. c(SRS_BSW_00323)
[SWS_CANIF_00650] d If parameter TransceiverModePtr of
CanIf_GetTrcvMode() has an invalid value, the CanIf shall report develop-
ment error code CANIF_E_PARAM_POINTER to the Det_ReportError service of
the DET module, when CanIf_GetTrcvMode() was called. c(SRS_BSW_00323)
[SWS_CANIF_00367] d Configuration of CanIf_GetTrcvMode(): The number of
supported transceiver types for each network is set up in the configuration phase
(see CanInterfaceTransceiverConfiguration ECUC_CanIf_00587 and CanInterface-
TransceiverDriverConfiguration ECUC_CanIf_00273). If no transceiver is used, this
function may be omitted. Therefore, if no transceiver is configured in LT or PB class
the API shall return with E_NOT_OK. c()
8.3.17 CanIf_GetTrcvWakeupReason
[SWS_CANIF_00289] d
Service name: CanIf_GetTrcvWakeupReason
Syntax: Std_ReturnType CanIf_GetTrcvWakeupReason(
uint8 TransceiverId,
CanTrcv_TrcvWakeupReasonType* TrcvWuReasonPtr
)
Service ID[hex]: 0x0f
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): TransceiverId Abstracted CanIf TransceiverId, which is assigned
to a CAN transceiver, which is requested for wake
up reason.
Parameters (inout): None
Parameters (out): TrcvWuReasonPtr provided pointer to where the requested transceiver
wake up reason shall be returned
c()
Note: The ability to detect and differentiate the possible wake up reasons depends
strongly on the CAN transceiver hardware. For more details, please refer to the [2,
Specification of CAN Transceiver Driver].
[SWS_CANIF_00368] d The function CanIf_GetTrcvWakeupReason() shall call
CanTrcv_GetBusWuReason(Transceiver, Reason) on the corresponding re-
quested CanTrcv. c()
Note: The parameters of the function CanTrcv_GetBusWuReason() are of type:
• Reason: CanTrcv_TrcvWakeupReasonType
• Transceiver: uint8 (Transceiver to which API call has to be applied)
(see [2, Specification of CAN Transceiver Driver])
[SWS_CANIF_00537] d If parameter TransceiverId of
CanIf_GetTrcvWakeupReason() has an invalid value, the CanIf shall report
development error code CANIF_E_PARAM_TRCV to the Det_ReportError ser-
vice of the DET module, when CanIf_GetTrcvWakeupReason() is called. c
(SRS_BSW_00323)
[SWS_CANIF_00649] d If parameter TrcvWuReasonPtr of
CanIf_GetTrcvWakeupReason() has an invalid value, the CanIf shall report
development error code CANIF_E_PARAM_POINTER to the Det_ReportError
service of the DET module, when CanIf_GetTrcvWakeupReason() is called. c
(SRS_BSW_00323)
Note: Please be aware, that if more than one network is available, each network may
report a different wake-up reason. E.g. if an ECU uses CAN, a wake-up by CAN may
occur and the incoming data may cause an internal wake-up for another CAN network.
The service CanIf_GetTrcvWakeupReason() has a "per network" view and does
not vote the more important reason or sequence internally. The same may be true if
e.g. one transceiver controls the power supply and the other is just powered or un-
powered. Then one may be able to return CANIF_TRCV_WU_POWER_ON, whereas the
other may state e.g. CANIF_TRCV_WU_RESET. It is up to the calling module to decide,
how to handle the wake-up information.
8.3.18 CanIf_SetTrcvWakeupMode
[SWS_CANIF_00290] d
Service name: CanIf_SetTrcvWakeupMode
Syntax: Std_ReturnType CanIf_SetTrcvWakeupMode(
uint8 TransceiverId,
CanTrcv_TrcvWakeupModeType TrcvWakeupMode
)
Service ID[hex]: 0x10
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): TransceiverId Abstracted CanIf TransceiverId, which is assigned
to a CAN transceiver, which is requested for wake
up notification mode transition.
TrcvWakeupMode Requested transceiver wake up notification mode
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Will be returned, if the wake up notifications
state has been changed to the requested mode.
E_NOT_OK: Will be returned, if the wake up notifi-
cations state change has failed or the parameter is
out of the allowed range. The previous state has not
been changed.
Description: This function shall call CanTrcv_SetTrcvWakeupMode.
c()
Note: For more details, please refer to [2, Specification of CAN Transceiver Driver].
[SWS_CANIF_00372] d The function CanIf_SetTrcvWakeupMode() shall call
CanTrcv_SetWakeupMode(Transceiver, TrcvWakeupMode) on the corre-
sponding requested CanTrcv. c()
Info: The parameters of the function CanTrcv_SetWakeupMode() are of type:
• TrcvWakeupMode: CanTrcv_TrcvWakeupModeType (see [2, Specification of
CAN Transceiver Driver])
• Transceiver: uint8 (Transceiver to which API call has to be applied)
(see [2, Specification of CAN Transceiver Driver])
Note: The following three paragraphs are already described in the Specification of
CanTrcv (see [2]). They describe the behavior of a CanTrcv in the respective
transceiver wake-up mode, which is requested in parameter TrcvWakeupMode.
CANIF_TRCV_WU_ENABLE:
If the CanTrcv has a stored wake-up event pending for the addressed Can-
Network, the notification is executed within or immediately after the function
CanTrcv_SetTrcvWakeupMode() (depending on the implementation).
CANIF_TRCV_WU_DISABLE:
No notifications for wake-up events for the addressed CanNetwork are passed
through the CanTrcv. The transceiver device and the underlying communication driver
has to buffer detected wake-up events and raise the event(s), when the wake-up noti-
fication is enabled again.
CANIF_TRCV_WU_CLEAR:
If notification of wake-up events is disabled (see description of mode
CANIF_TRCV_WU_DISABLE), detected wake-up events are buffered. Calling
CanIf_SetTrcvWakeupMode() with parameter CANIF_TRCV_WU_CLEAR clears
these bufferd events. Clearing of wake-up events has to be used, when the wake-up
notification is disabled to clear all stored wake-up events under control of the higher
layers of the CanTrcv.
[SWS_CANIF_00535] d If parameter TransceiverId of
CanIf_SetTrcvWakeupMode() has an invalid value, the CanIf shall report develop-
ment error code CANIF_E_PARAM_TRCV to the Det_ReportError service of the
DET module, when CanIf_SetTrcvWakeupMode() is called. c(SRS_BSW_00323)
[SWS_CANIF_00536] d If parameter TrcvWakeupMode of
CanIf_SetTrcvWakeupMode() has an invalid value, the CanIf shall report devel-
opment error code CANIF_E_PARAM_TRCVWAKEUPMODE to the Det_ReportError
service of the DET module, when CanIf_SetTrcvWakeupMode() is called. c
(SRS_BSW_00323)
[SWS_CANIF_00373] d Configuration of CanIf_SetTrcvWakeupMode(): The num-
ber of supported transceiver types for each network is set up in the configuration
phase (see CanInterfaceTransceiverConfiguration ECUC_CanIf_00587 and CanInter-
faceTransceiverDriverConfiguration ECUC_CanIf_00273). If no transceiver is used,
this function may be omitted. Therefore, if no transceiver is configured in LT or PB
class the API shall return with E_NOT_OK. c()
8.3.19 CanIf_CheckWakeup
[SWS_CANIF_00219] d
Service name: CanIf_CheckWakeup
Syntax: Std_ReturnType CanIf_CheckWakeup(
EcuM_WakeupSourceType WakeupSource
)
c()
Note: Integration Code calls this function
[SWS_CANIF_00398] d If parameter WakeupSource of CanIf_CheckWakeup()
has an invalid value, CanIf shall report development error code
CANIF_E_PARAM_WAKEUPSOURCE to the Det_ReportError service of the
DET, when CanIf_CheckWakeup() is called. c(SRS_BSW_00323)
Note: The call context of CanIf_CheckWakeup() is either on interrupt level (interrupt
mode) or on task level (polling mode).
[SWS_CANIF_00180] d CanIf shall provide wake-up service
CanIf_CheckWakeup() only, if
• underlying CAN Controller provides wake-up support and wake-up is enabled
by the parameter CanIfCtrlWakeupSupport and by CanDrv configuration.
• and/or underlying CAN Transceiver provides wake-up support and wake-up
is enabled by the parameter CanIfTrcvWakeupSupport and by CanTrcv con-
figuration.
• and configuration parameter CanIfWakeupSupport is enabled.
c()
[SWS_CANIF_00892] d Configuration of CanIf_CheckWakeup(): If no wake-up
shall be used, this API can be omitted by disabling of CanIfWakeupSupport. c()
8.3.20 CanIf_CheckValidation
[SWS_CANIF_00178] d
Service name: CanIf_CheckValidation
c()
Note: Integration Code calls this function
[SWS_CANIF_00404] d If parameter WakeupSource of
CanIf_CheckValidation() has an invalid value, the CanIf shall report devel-
opment error code CANIF_E_PARAM_WAKEUPSOURCE to the Det_ReportError
service of the DET module, when CanIf_CheckValidation() is called. c
(SRS_BSW_00323)
Note: The call context of CanIf_CheckValidation() is either on interrupt level
(interrupt mode) or on task level (polling mode).
Caveat: The corresponding CAN controller and transceiver must be switched
on via CanTrcv_SetOpMode(Transceiver, CANTRCV_TRCVMODE_NORMAL) and
Can_SetControllerMode(Controller, CAN_CS_STARTED) and the corre-
sponding mode indications must have been called.
[SWS_CANIF_00408] d Configuration of CanIf_CheckValidation():
If no validation is needed, this API can be omitted by dis-
abling of CANIF_PUBLIC_WAKEUP_CHECK_VALIDATION_SUPPORT
(see ECUC_CanIf_00611). c()
8.3.21 CanIf_GetTxConfirmationState
[SWS_CANIF_00734] d
Service name: CanIf_GetTxConfirmationState
Syntax: CanIf_NotifStatusType CanIf_GetTxConfirmationState(
uint8 ControllerId
)
c()
[SWS_CANIF_00736] d If parameter ControllerId of
CanIf_GetTxConfirmationState() has an invalid value, the CanIf
shall report development error code CANIF_E_PARAM_CONTROLLERID
to the Det_ReportError service of the DET module, when
CanIf_GetTxConfirmationState() is called. c()
Note: The call context of CanIf_GetTxConfirmationState() is on task level
(polling mode).
[SWS_CANIF_00738] d Configuration of CanIf_GetTxConfirmationState(): If
BusOff Recovery of CanSm doesn’t need the status of the Tx confirmations (see
[SWS_CANIF_00740]), this API can be omitted by disabling of CanIfPublicTxCon-
firmPollingSupport. c()
8.3.22 CanIf_ClearTrcvWufFlag
[SWS_CANIF_00760] d
Service name: CanIf_ClearTrcvWufFlag
Syntax: Std_ReturnType CanIf_ClearTrcvWufFlag(
uint8 TransceiverId
)
Service ID[hex]: 0x1e
Sync/Async: Asynchronous
Reentrancy: Reentrant for different CAN transceivers
Parameters (in): TransceiverId Abstract CanIf TransceiverId, which is assigned to
the designated CAN transceiver.
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Request has been accepted
E_NOT_OK: Request has not been accepted
Description: Requests the CanIf module to clear the WUF flag of the designated CAN
transceiver.
c()
[SWS_CANIF_00766] d Within CanIf_ClearTrcvWufFlag() the function
CanTrcv_ClearTrcvWufFlag() shall be called. c()
[SWS_CANIF_00769] d If parameter TransceiverId of
CanIf_ClearTrcvWufFlag() has an invalid value, the CanIf shall report de-
velopment error code CANIF_E_PARAM_TRCV to the Det_ReportError service
of the DET module, when CanIf_ClearTrcvWufFlag() is caled. c()
[SWS_CANIF_00771] d Configuration of CanIf_ClearTrcvWufFlag(): Whether
the CanIf supports this function shall be pre compile time configurable On/Off by the
configuration parameter CANIF_PUBLIC_PN_SUPPORT (see ECUC_CanIf_00772). c
()
8.3.23 CanIf_CheckTrcvWakeFlag
[SWS_CANIF_00761] d
Service name: CanIf_CheckTrcvWakeFlag
Syntax: Std_ReturnType CanIf_CheckTrcvWakeFlag(
uint8 TransceiverId
)
Service ID[hex]: 0x1f
Sync/Async: Asynchronous
Reentrancy: Reentrant for different CAN transceivers
Parameters (in): TransceiverId Abstract CanIf TransceiverId, which is assigned to
the designated CAN transceiver.
Parameters (inout): None
Parameters (out): None
Return value: Std_ReturnType E_OK: Request has been accepted
E_NOT_OK: Request has not been accepted
Description: Requests the CanIf module to check the Wake flag of the designated
CAN transceiver.
c()
[SWS_CANIF_00765] d Within CanIf_CheckTrcvWakeFlag() the function
CanTrcv_CheckWakeFlag() shall be called. c()
[SWS_CANIF_00770] d If parameter TransceiverId of
CanIf_CheckTrcvWakeFlag() has an invalid value, the CanIf shall report de-
velopment error code CANIF_E_PARAM_TRCV to the Det_ReportError service
of the DET module, when CanIf_CheckTrcvWakeFlag() is caled. c()
[SWS_CANIF_00813] d Configuration of CanIf_CheckTrcvWakeFlag(): Whether
the CanIf supports this function shall be pre compile time configurable On/Off by the
configuration parameter CANIF_PUBLIC_PN_SUPPORT (see ECUC_CanIf_00772). c
()
8.3.24 CanIf_SetBaudrate
[SWS_CANIF_00867] d
Service name: CanIf_SetBaudrate
Syntax: Std_ReturnType CanIf_SetBaudrate(
uint8 ControllerId,
uint16 BaudRateConfigID
)
Service ID[hex]: 0x27
Sync/Async: Synchronous
Reentrancy: Reentrant for different ControllerIds. Non reentrant for the same Con-
trollerId.
Parameters (in): ControllerId Abstract CanIf ControllerId which is assigned to a
CAN controller, whose baud rate shall be set.
BaudRateConfigID references a baud rate configuration by ID (see
CanControllerBaudRateConfigID)
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
Description: This service shall set the baud rate configuration of the CAN controller.
Depending on necessary baud rate modifications the controller might
have to reset.
c()
[SWS_CANIF_00868] d The service CanIf_SetBaudrate() shall call
Can_SetBaudrate(Controller, BaudRateConfigID) for the requested
CAN Controller. c()
[SWS_CANIF_00869] d If CanIf_SetBaudrate() is called with in-
valid ControllerId, CanIf shall report development error code
CANIF_E_PARAM_CONTROLLERID to the Det_ReportError service of the
DET module. c(SRS_BSW_00323)
Note: The parameter BaudRateConfigID of CanIf_SetBaudrate() is not
checked by CanIf. This has to be done by responsible CanDrv.
Note: The call context of CanIf_SetBaudrate() is on task level (polling mode).
[SWS_CANIF_00871] d If CanIf supports changing baud rate and thus
CanIf_SetBaudrate(), shall be configurable via CANIF_SET_BAUDRATE_API
(see ECUC_CanIf_00838). c()
8.3.25 CanIf_SetIcomConfiguration
[SWS_CANIF_00861] d
c()
Note: The interface CanIf_SetIcomConfiguration() is called by CanSm to ac-
tivate Pretended Networking and load the requested ICOM configuration via CAN
Driver.
[SWS_CANIF_00838] d The service CanIf_SetIcomConfiguration() shall
call Can_SetIcomConfiguration(Controller, ConfigurationId) for the re-
quested CanDrv to set the requested ICOM configuration. c()
[SWS_CANIF_00872] d If CanIf_SetIcomConfiguration() is called
with invalid ControllerId, CanIf shall report development error code
CANIF_E_PARAM_CONTROLLERID to the Det_ReportError service of the
DET module. c(SRS_BSW_00323)
[SWS_CANIF_00875] d CanIf_SetIcomConfiguration() shall be
pre compile time configurable ON/OFF by the configuration parameter
CANIF_PUBLIC_ICOM_SUPPORT (see ECUC_CanIf_00839). c()
8.4.1 CanIf_TriggerTransmit
[SWS_CANIF_00883] d
Service name: CanIf_TriggerTransmit
c()
[SWS_CANIF_00884] d CanIf shall only provide the API function
CanIf_TriggerTransmit() if TriggerTransmit support is enabled (CanIfTrig-
gerTransmitSupport = TRUE). c()
[SWS_CANIF_00885] d The function CanIf_TriggerTransmit() shall call
the corresponding <User_TriggerTransmit>() function, passing the trans-
lated TxPduId and the pointer to the PduInfo structure (PduInfoPtr).
Upon return, CanIf_TriggerTransmit() shall return the return value of its
<User_TriggerTransmit>(). c()
8.4.2 CanIf_TxConfirmation
[SWS_CANIF_00007] d
Service name: CanIf_TxConfirmation
Syntax: void CanIf_TxConfirmation(
PduIdType CanTxPduId
)
Service ID[hex]: 0x13
Sync/Async: Synchronous
Reentrancy: Reentrant
c(SRS_Can_01009)
Note: The service CanIf_TxConfirmation() is implemented in CanIf and called
by the CanDrv after the CAN L-PDU has been transmitted on the CAN network.
Note: Due to the fact CanDrv does not support the HandleId concept as
described in [14, Specification of ECU Configuration]: Within the service
CanIf_TxConfirmation(), CanDrv uses PduInfo->swPduHandle as CanTx-
PduId, which was preserved from Can_Write(Hth, *PduInfo).
[SWS_CANIF_00391] d If configuration parameters
CANIF_PUBLIC_READTXPDU_NOTIFY_STATUS_API (ECUC_CanIf_00609) and
CANIF_TXPDU_READ_NOTIFYSTATUS (ECUC_CanIf_00589) for the Transmitted
L-PDU are set to TRUE, and if CanIf_TxConfirmation() is called, CanIf shall set
the notification status for the Transmitted L-PDU. c()
[SWS_CANIF_00410] d If parameter CanTxPduId of CanIf_TxConfirmation()
has an invalid value, CanIf shall report development error code
CANIF_E_PARAM_LPDU to the Det_ReportError service of the DET module,
when CanIf_TxConfirmation() is called. c(SRS_BSW_00323)
[SWS_CANIF_00412] d If CanIf was not initialized before call-
ing CanIf_TxConfirmation(), CanIf shall not call the service
<User_TxConfirmation>() and shall not set the Tx confirmation status, when
CanIf_TxConfirmation() is called. c()
Note: The call context of CanIf_TxConfirmation() is either on interrupt level (in-
terrupt mode) or on task level (polling mode).
[SWS_CANIF_00414] d Configuration of CanIf_TxConfirmation(): Each Tx L-
PDU (see ECUC_CanIf_00248) has to be configured with a corresponding transmit
confirmation service of an upper layer module (see [SWS_CANIF_00011]) which is
called in CanIf_TxConfirmation(). c()
8.4.3 CanIf_RxIndication
[SWS_CANIF_00006] d
Service name: CanIf_RxIndication
Syntax: void CanIf_RxIndication(
const Can_HwType* Mailbox,
const PduInfoType* PduInfoPtr
)
Service ID[hex]: 0x14
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): Mailbox Identifies the HRH and its corresponding CAN Con-
troller
PduInfoPtr Pointer to the received L-PDU
Parameters (inout): None
Parameters (out): None
Return value: None
Description: This service indicates a successful reception of a received CAN Rx L-
PDU to the CanIf after passing all filters and validation checks.
c()
Note: The service CanIf_RxIndication() is implemented in CanIf and called by
CanDrv after a CAN L-PDU has been received.
[SWS_CANIF_00415] d Within the service CanIf_RxIndication() the CanIf
routes this indication to the configured upper layer target service(s). c()
[SWS_CANIF_00392] d If configuration parameters
CANIF_PUBLIC_READRXPDU_NOTIFY_STATUS_API (ECUC_CanIf_00608) and
CANIF_RXPDU_READ_NOTIFYSTATUS (ECUC_CanIf_00595) for the Received
L-PDU are set to TRUE, and if CanIf_RxIndication() is called, the CanIf shall
set the notification status for the Received L-PDU. c()
[SWS_CANIF_00416] d If parameter Mailbox->Hoh of CanIf_RxIndication()
has an invalid value, CanIf shall report development error code
CANIF_E_PARAM_HOH to the Det_ReportError service of the DET module,
when CanIf_RxIndication() is called. c(SRS_BSW_00323)
[SWS_CANIF_00417] d If parameter Mailbox->CanId of
CanIf_RxIndication() has an invalid value, CanIf shall report development
error code CANIF_E_PARAM_CANID to the Det_ReportError service of the DET
module, when CanIf_RxIndication() is called. c(SRS_BSW_00323)
Note: If CanIf_RxIndication() is called with invalid PduInfoPtr-
>SduLength, runtime error CANIF_E_INVALID_DATA_LENGTH is reported (see
[SWS_CANIF_00168]).
8.4.4 CanIf_ControllerBusOff
[SWS_CANIF_00218] d
Service name: CanIf_ControllerBusOff
Syntax: void CanIf_ControllerBusOff(
uint8 ControllerId
)
Service ID[hex]: 0x16
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): ControllerId Abstract CanIf ControllerId which is assigned to a
CAN controller, where a BusOff occured.
Parameters (inout): None
Parameters (out): None
Return value: None
Description: This service indicates a Controller BusOff event referring to the corre-
sponding CAN Controller with the abstract CanIf ControllerId.
c()
Note: The callback service CanIf_ControllerBusOff() is called by CanDrv and
implemented in CanIf. It is called in case of a mode change notification of the CanDrv.
[SWS_CANIF_00429] d If parameter ControllerId of
CanIf_ControllerBusOff() has an invalid value, CanIf shall report devel-
opment error code CANIF_E_PARAM_CONTROLLERID to the Det_ReportError
service of the DET module, when CanIf_ControllerBusOff() is called. c
(SRS_BSW_00323)
8.4.5 CanIf_ConfirmPnAvailability
[SWS_CANIF_00815] d
Service name: CanIf_ConfirmPnAvailability
Syntax: void CanIf_ConfirmPnAvailability(
uint8 TransceiverId
)
Service ID[hex]: 0x1a
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): TransceiverId Abstract CanIf TransceiverId, which is assigned to a
CAN transceiver, which was checked for PN avail-
ability.
Parameters (inout): None
Parameters (out): None
Return value: None
Description: This service indicates that the transceiver is running in PN communica-
tion mode referring to the corresponding CAN transceiver with the ab-
stract CanIf TransceiverId.
c()
[SWS_CANIF_00753] d If CanIf_ConfirmPnAvailability() is called, CanIf
calls <User_ConfirmPnAvailability>(). c()
Note: CanIf passes the delivered parameter TransceiverId to the upper layer mod-
ule.
[SWS_CANIF_00816] d If parameter TransceiverId of
CanIf_ConfirmPnAvailability() has an invalid value, CanIf shall report
development error code CANIF_E_PARAM_TRCV to the Det_ReportError service
of the DET module, when CanIf_ConfirmPnAvailability() is called. c()
8.4.6 CanIf_ClearTrcvWufFlagIndication
[SWS_CANIF_00762] d
Service name: CanIf_ClearTrcvWufFlagIndication
Syntax: void CanIf_ClearTrcvWufFlagIndication(
uint8 TransceiverId
)
Service ID[hex]: 0x20
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): TransceiverId Abstract CanIf TransceiverId, which is assigned to a
CAN transceiver, for which this function was called.
Parameters (inout): None
Parameters (out): None
Return value: None
Description: This service indicates that the transceiver has cleared the WufFlag re-
ferring to the corresponding CAN transceiver with the abstract CanIf
TransceiverId.
c()
[SWS_CANIF_00757] d If CanIf_ClearTrcvWufFlagIndication() is called,
CanIf calls <User_ClearTrcvWufFlagIndication>(). c()
Note: CanIf passes the delivered parameter TransceiverId to the upper layer mod-
ule.
[SWS_CANIF_00805] d If parameter TransceiverId of
CanIf_ClearTrcvWufFlagIndication() has an invalid value, CanIf shall
report development error code CANIF_E_PARAM_TRCV to the Det_ReportError
service of the DET module, when CanIf_ClearTrcvWufFlagIndication() is
called. c()
[SWS_CANIF_00806] d If CanIf was not initialized before calling
CanIf_ClearTrcvWufFlagIndication(), CanIf shall not execute notifica-
tion, when CanIf_ClearTrcvWufFlagIndication() is called. c()
8.4.7 CanIf_CheckTrcvWakeFlagIndication
[SWS_CANIF_00763] d
Service name: CanIf_CheckTrcvWakeFlagIndication
Syntax: void CanIf_CheckTrcvWakeFlagIndication(
uint8 TransceiverId
)
Service ID[hex]: 0x21
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): TransceiverId Abstract CanIf TransceiverId, which is assigned to a
CAN transceiver, for which this function was called.
Parameters (inout): None
Parameters (out): None
Return value: None
Description: This service indicates that the check of the transceiver’s wake-up flag
has been finished by the corresponding CAN transceiver with the ab-
stract CanIf TransceiverId. This indication is used to cope with the asyn-
chronous transceiver communication.
c()
[SWS_CANIF_00759] d If CanIf_CheckTrcvWakeFlagIndication() is called,
CanIf calls <User_CheckTrcvWakeFlagIndication>(). c()
Note: CanIf passes the delivered parameter TransceiverId to the upper layer mod-
ule.
[SWS_CANIF_00809] d If parameter TransceiverId of
CanIf_CheckTrcvWakeFlagIndication() has an invalid value, CanIf shall
report development error code CANIF_E_PARAM_TRCV to the Det_ReportError
service of the DET module, when CanIf_CheckTrcvWakeFlagIndication() is
called. c()
[SWS_CANIF_00810] d If the CanIf was not initialized before calling
CanIf_CheckTrcvWakeFlagIndication(), CanIf shall not execute notification,
when CanIf_CheckTrcvWakeFlagIndication() is called. c()
Note: The call context of CanIf_CheckTrcvWakeFlagIndication() is either on
interrupt level (interrupt mode) or on task level (polling mode).
8.4.8 CanIf_ControllerModeIndication
[SWS_CANIF_00699] d
Service name: CanIf_ControllerModeIndication
Syntax: void CanIf_ControllerModeIndication(
uint8 ControllerId,
Can_ControllerStateType ControllerMode
)
Service ID[hex]: 0x17
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): ControllerId Abstract CanIf ControllerId which is assigned to a
CAN controller, which state has been transitioned.
ControllerMode Mode to which the CAN controller transitioned
Parameters (inout): None
Parameters (out): None
Return value: None
Description: This service indicates a controller state transition referring to the corre-
sponding CAN controller with the abstract CanIf ControllerId.
c()
Note: The callback service CanIf_ControllerModeIndication() is called by
CanDrv and implemented in CanIf. It is called in case of a state transition notification
of the CanDrv.
[SWS_CANIF_00700] d If parameter ControllerId of
CanIf_ControllerModeIndication() has an invalid value, CanIf
shall report development error code CANIF_E_PARAM_CONTROLLERID
to the Det_ReportError service of the DET module, when
CanIf_ControllerModeIndication() is called. c()
[SWS_CANIF_00702] d If CanIf was not initialized before calling
CanIf_ControllerModeIndication(), CanIf shall not execute state tran-
sition notification, when CanIf_ControllerModeIndication() is called. c
()
Note: The call context of CanIf_ControllerModeIndication() is either on inter-
rupt level (interrupt mode) or on task level (polling mode).
8.4.9 CanIf_TrcvModeIndication
[SWS_CANIF_00764] d
Service name: CanIf_TrcvModeIndication
Syntax: void CanIf_TrcvModeIndication(
uint8 TransceiverId,
CanTrcv_TrcvModeType TransceiverMode
)
Service ID[hex]: 0x22
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): TransceiverId Abstract CanIf TransceiverId, which is assigned to a
CAN transceiver, which state has been transitioned.
TransceiverMode Mode to which the CAN transceiver transitioned
Parameters (inout): None
Parameters (out): None
Return value: None
Description: This service indicates a transceiver state transition referring to the corre-
sponding CAN transceiver with the abstract CanIf TransceiverId.
c()
Note: The callback service CanIf_TrcvModeIndication() is called by CanDrv
and implemented in CanIf. It is called in case of a state transition notification of the
CanDrv.
[SWS_CANIF_00706] d If parameter TransceiverId of
CanIf_TrcvModeIndication() has an invalid value, CanIf shall report de-
velopment error code CANIF_E_PARAM_TRCV to the Det_ReportError service of
the DET module, when CanIf_TrcvModeIndication() is called. c()
[SWS_CANIF_00708] d If CanIf was not initialized before calling
CanIf_TrcvModeIndication(), CanIf shall not execute state transition no-
tification, when CanIf_TrcvModeIndication() is called. c()
Note: The call context of CanIf_TrcvModeIndication() is either on interrupt level
(interrupt mode) or on task level (polling mode).
[SWS_CANIF_00710] d Configuration of CanIf_TrcvModeIndication(): ID of
the CAN Transceiver is published inside the configuration description of CanIf via
parameter CANIF_TRCV_ID (see ECUC_CanIf_00654). c()
[SWS_CANIF_00730] d Configuration of CanIf_TrcvModeIndication(): If
transceivers are not supported (CanIfTrcvDrvCfg is not configured, see
ECUC_CanIf_00273), CanIf_TrcvModeIndication() shall not be provided by
CanIf. c()
8.4.10 CanIf_CurrentIcomConfiguration
[SWS_CANIF_00862] d
Service name: CanIf_CurrentIcomConfiguration
Syntax: void CanIf_CurrentIcomConfiguration(
uint8 ControllerId,
IcomConfigIdType ConfigurationId,
IcomSwitch_ErrorType Error
)
Service ID[hex]: 0x26
Sync/Async: Synchronous
Reentrancy: Reentrant only for different controller Ids
Parameters (in): ControllerId Abstract CanIf ControllerId which is assigned to a
CAN controller, which informs about the Configura-
tion Id.
ConfigurationId Active Configuration Id.
Error ICOM_SWITCH_E_OK: No Error
ICOM_SWITCH_E_FAILED: Switch to requested
Configuration failed. Severe Error.
Parameters (inout): None
Parameters (out): None
Return value: None
Description: This service shall inform about the change of the Icom Configuration of
a CAN controller using the abstract CanIf ControllerId.
c()
Note: The interface CanIf_CurrentIcomConfiguration() is used by the CanDrv
to inform CanIf about the status of activation or deactivation of Pretended Networking
for a given channel.
[SWS_CANIF_00839] d If CanIf_CurrentIcomConfiguration() is called,
CanIf shall call CanSM_CurrentIcomConfiguration(ControllerId, Con-
figurationId, Error) to inform CanSM about current status of ICOM. c()
[SWS_CANIF_00873] d If CanIf_CurrentIcomConfiguration() is called
with invalid ControllerId, CanIf shall report development error code
CANIF_E_PARAM_CONTROLLERID to the Det_ReportError service of the
DET module. c(SRS_BSW_00323)
[SWS_CANIF_00876] d CanIf_CurrentIcomConfiguration() shall
be pre compile time configurable ON/OFF by the configuration parameter
CANIF_PUBLIC_ICOM_SUPPORT (see ECUC_CanIf_00839). c()
Note: This section defines all interfaces, which are required to fulfill the core function-
ality of the module.
[SWS_CANIF_00040] d
API function Description
Can_SetControllerMode This function performs software triggered state transi-
tions of the CAN controller State machine.
Can_Write This function is called by CanIf to pass a CAN message
to CanDrv for transmission.
Det_ReportRuntimeError Service to report runtime errors. If a callout has been
configured then this callout shall be called.
SchM_Enter_CanIf_<Exclusive Invokes the SchM_Enter function to enter a module local
Area> exclusive area.
SchM_Exit_CanIf_<ExclusiveArea> Invokes the SchM_Exit function to exit an exclusive area.
c()
This section defines all interfaces, which are required to fulfill an optional functionality
of the module.
[SWS_CANIF_00294] d
API function Description
Can_CheckWakeup This function checks if a wakeup has occurred for the
given controller.
Can_SetBaudrate This service shall set the baud rate configuration of the
CAN controller. Depending on necessary baud rate mod-
ifications the controller might have to reset.
Can_SetIcomConfiguration This service shall change the Icom Configuration of a
CAN controller to the requested one.
CanNm_RxIndication Indication of a received PDU from a lower layer commu-
nication interface module.
CanNm_TxConfirmation The lower layer communication interface module con-
firms the transmission of a PDU, or the failure to transmit
a PDU.
CanSM_CheckTransceiverWake This callback function indicates the CanIf_CheckTr-
FlagIndication cvWakeFlag API process end for the notified CAN
Transceiver.
c()
In this section all interfaces are listed, where the target function of any upper layer
to be called has to be set up by configuration. These callback services are specified
and implemented in the upper communication modules, which use CanIf according to
the AUTOSAR BSW architecture. The specific callback notification is specified in the
corresponding SWS document (see chapter 3 “Related documentation”).
As far the interface name is not specified to be mandatory, no callback is performed,
if no API name is configured. This section describes only the content of notification of
the callback, the call context inside CanIf and exact time by the call event.
<User_NotificationName> - This condition is applied for such interface services
which will be implemented in the upper layer and called by CanIf. This condition
displays the symbolic name of the functional group in a callback service in the corre-
sponding upper layer module. Each upper layer module can define no, one or several
callback services for the same functionality (i.e. transmit confirmation). The dispatch
is ensured by the L-SDU ID.
The upper layer module provides the Service ID of the following functions.
8.6.3.1 <User_TriggerTransmit>
[SWS_CANIF_00886] d
Service name: <User_TriggerTransmit>
Syntax: Std_ReturnType <User_TriggerTransmit>(
PduIdType TxPduId,
PduInfoType* PduInfoPtr
)
Sync/Async: Synchronous
Reentrancy: Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters (in): TxPduId ID of the SDU that is requested to be transmitted.
Parameters (inout): PduInfoPtr Contains a pointer to a buffer (SduDataPtr) to where
the SDU data shall be copied, and the available
buffer size in SduLengh.
On return, the service will indicate the length of the
copied SDU data in SduLength.
c()
Note: This callback service is called by CanIf and implemented in the corresponding
upper layer module. It is called in case of a Trigger Transmit request of CanDrv.
Note: The call context of <User_TriggerTransmit>() is either on interrupt level
(interrupt mode) or on task level (polling mode).
[SWS_CANIF_00888] d Configuration of <User_TriggerTransmit>(): The upper
layer module, which provides the TriggerTransmit callback service, has to be con-
figured by CanIfTxPduUserTxConfirmationUL (see CanIfTxPduUserTxCon-
firmationUL). If no upper layer modules are configured, no TriggerTransmit call-
back service is executed and therefore Trigger Transmit functionality is not supported
for that PDU. c()
[SWS_CANIF_00889] d Configuration of <User_TriggerTransmit>(): The name
of the API <User_TriggerTransmit>() which is called by CanIf shall be
configured for CanIf by parameter CanIfTxPduUserTriggerTransmitName
(see CanIfTxPduUserTriggerTransmitName). c()
Note: If CanIfTxPduTriggerTransmit is not specified or FALSE, no up-
per layer modules have to be configured for Trigger Transmit. Therefore,
<User_TriggerTransmit>() will not be called and CanIfTxPduUserTxConfir-
mationUL as well as CanIfTxPduUserTriggerTransmitName need not to be con-
figured.
[SWS_CANIF_00890] d Configuration of <User_TriggerTransmit>(): If CanI-
fTxPduUserTxConfirmationUL is set to PDUR, CanIfTxPduUserTrigger-
TransmitName must be PduR_CanIfTriggerTransmit. c()
[SWS_CANIF_00891] d Configuration of <User_TriggerTransmit>(): If
CanIfTxPduUserTxConfirmationUL is set to CDD, the name of the API
<User_TriggerTransmit>() has to be configured via parameter CanIfTxPdu-
UserTriggerTransmitName. c()
8.6.3.2 <User_TxConfirmation>
[SWS_CANIF_00011] d
Service name: <User_TxConfirmation>
Syntax: void <User_TxConfirmation>(
PduIdType TxPduId,
Std_ReturnType result
)
Sync/Async: Synchronous
Reentrancy: Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters (in): TxPduId ID of the PDU that has been transmitted.
result E_OK: The PDU was transmitted.
E_NOT_OK: Transmission of the PDU failed.
Parameters (inout): None
Parameters (out): None
Return value: None
Description: The lower layer communication interface module confirms the transmis-
sion of a PDU, or the failure to transmit a PDU.
c()
Note: This callback service is called by CanIf and implemented in the corresponding
upper layer module. It is called in case of a transmit confirmation of CanDrv.
Note: This type of confirmation callback service is mainly designed for PduR, CanNm,
and CanTp, but not exclusive.
Note: Parameter TxPduId is derived from <User> configuration.
Note: The call context of <User_TxConfirmation>() is either on interrupt level
(interrupt mode) or on task level (polling mode).
[SWS_CANIF_00438] d Configuration of <User_TxConfirmation>(): The upper
layer module, which provides this callback service, has to be configured by CanI-
fTxPduUserTxConfirmationUL (see ECUC_CanIf_00527 ). If no upper layer mod-
ules are configured for transmit confirmation using <User_TxConfirmation>(), no
transmit confirmation is executed. c()
[SWS_CANIF_00542] d Configuration of <User_TxConfirmation>(): The
name of the API <User_TxConfirmation>() which is called by CanIf shall
be configured for CanIf by parameter CanIfTxPduUserTxConfirmationName
(see ECUC_CanIf_00528). c()
Note: If transmit confirmations are not necessary or no upper layer modules are con-
figured for transmit confirmations and thus <User_TxConfirmation>() shall not be
called, CanIfTxPduUserTxConfirmationUL and CanIfTxPduUserTxConfir-
mationName need not to be configured.
8.6.3.3 <User_RxIndication>
[SWS_CANIF_00012] d
Service name: <User_RxIndication>
Syntax: void <User_RxIndication>(
PduIdType RxPduId,
const PduInfoType* PduInfoPtr
)
Sync/Async: Synchronous
Reentrancy: Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters (in): RxPduId ID of the received PDU.
PduInfoPtr Contains the length (SduLength) of the received
PDU, a pointer to a buffer (SduDataPtr) containing
the PDU, and the MetaData related to this PDU.
Parameters (inout): None
Parameters (out): None
Return value: None
Description: Indication of a received PDU from a lower layer communication interface
module.
c(SRS_Can_01003)
Note: This service indicates a successful reception of an L-SDU to the upper layer
module after passing all filters and validation checks.
Note: This callback service is called by CanIf and implemented in the configured
upper layer module (e.g. PduR, CanNm, CanTp, etc.) if configured accordingly
(see ECUC_CanIf_00529).
Note: Until <User_RxIndication>() returns, CanIf will not access <PduIn-
foPtr>. The <PduInfoPtr> is only valid and can be used by upper layers, until
the indication returns. CanIf guarantees that the number of configured bytes for this
<PduInfoPtr> is valid.
Note: The call context of <User_RxIndication>() is either on interrupt level (inter-
rupt mode) or on task level (polling mode).
[SWS_CANIF_00441] d Configuration of <User_RxIndication>(): The up-
per layer module, which provides this callback service, has to be configured by
CANIF_RXPDU_USERRXINDICATION_UL (see ECUC_CanIf_00529). c()
[SWS_CANIF_00552] d Configuration of <User_RxIndication>(): The name
of the API <User_RxIndication>() which will be called by CanIf shall be
configured for CanIf by parameter CANIF_RXPDU_USERRXINDICATION_NAME
(see ECUC_CanIf_00530). c()
Note: If receive indications are not necessary or no upper layer modules
are configured for receive indications and thus <User_RxIndication>()
shall not be called, CANIF_RXPDU_USERRXINDICATION_UL and
CANIF_RXPDU_USERRXINDICATION_NAME need not to be configured.
[SWS_CANIF_00442] d Configuration of <User_RxIndication>():
If CANIF_RXPDU_USERRXINDICATION_UL is set to PDUR,
CANIF_RXPDU_USERRXINDICATION_NAME must be PduR_CanIfRxIndication.
c()
[SWS_CANIF_00445] d Configuration of <User_RxIndication>():
If CANIF_RXPDU_USERRXINDICATION_UL is set to CAN_NM,
8.6.3.4 <User_ValidateWakeupEvent>
[SWS_CANIF_00532] d
Service name: <User_ValidateWakeupEvent>
Syntax: void <User_ValidateWakeupEvent>(
EcuM_WakeupSourceType sources
)
Sync/Async: (defined within providing upper layer module)
Reentrancy: (defined within providing upper layer module)
Parameters (in): sources Validated CAN wakeup events. Every CAN con-
troller or CAN transceiver can be a separate wakeup
source.
Parameters (inout): None
c()
Note: This callback service is mainly implemented in and used by the ECU State Man-
ager module (see [13, Specification of ECU State Manager]).
Note: The CanIf calls this callback service. It is implemented by the configured up-
per layer module. It is called only during the call of CanIf_CheckValidation() if
a first CAN L-PDU reception event after a wake up event has been occurred at the
corresponding CAN Controller.
Note: The call context of <User_ValidateWakeupEvent>() is either on interrupt
level (interrupt mode) or on task level (polling mode).
Note: The callback service <User_ValidateWakeupEvent>() is in general re-
entrant for multiple CAN Controller usage, but not for the same CAN Controller
[SWS_CANIF_00659] d Configuration of <User_ValidateWakeupEvent>():
If no validation is needed, this API can be omitted by dis-
abling CANIF_PUBLIC_WAKEUP_CHECK_VALIDATION_SUPPORT
(see ECUC_CanIf_00611). c()
[SWS_CANIF_00456] d Configuration of <User_ValidateWakeupEvent>(): The
upper layer module which provides this callback service has to be configured by Can-
IfDispatchUserValidateWakeupEventUL (see ECUC_CanIf_00549), but:
• If no upper layer modules are configured for wake up notification using
<User_ValidateWakeupEvent>(), no wake up notification needs to be con-
figured. CanIfDispatchUserValidateWakeupEventUL needs not to be
configured.
• If wake up is not supported (CANIF_CTRL_WAKEUP_SUPPORT and
CANIF_TRCV_WAKEUP_SUPPORT equal FALSE, see ECUC_CanIf_00637,
ECUC_CanIf_00606), CanIfDispatchUserValidateWakeupEventUL is not
configurable.
c()
[SWS_CANIF_00563] d Configuration of <User_ValidateWakeupEvent>(): If
CanIfDispatchUserValidateWakeupEventUL is set to ECUM, CanIfDis-
patchUserValidateWakeupEventName must be EcuM_ValidateWakeupEvent.
c()
8.6.3.5 <User_ControllerBusOff>
[SWS_CANIF_00014] d
Service name: <User_ControllerBusOff>
Syntax: void <User_ControllerBusOff>(
uint8 ControllerId
)
Sync/Async: (defined within providing upper layer module)
Reentrancy: (defined within providing upper layer module)
Parameters (in): ControllerId Abstracted CanIf ControllerId which is assigned to a
CAN controller, at which a BusOff occurred.
Parameters (inout): None
Parameters (out): None
Return value: None
Description: This service indicates a bus-off event to the corresponding upper layer
module (mainly the CAN State Manager module).
c(SRS_Can_01029)
Note: This callback service is mainly implemented in and used by CanSm (see [3,
Specification of CAN State Manager]).
Note: This callback service is called by CanIf and implemented by the con-
figured upper layer module. It is called in case of a BusOff notification via
CanIf_ControllerBusOff() of the CanDrv. The delivered parameter Control-
lerId of the service CanIf_ControllerBusOff() is passed to the upper layer
module.
Note: The call context of <User_ControllerBusOff>() is either on interrupt level
(interrupt mode) or on task level (polling mode).
Note: The callback service <User_ControllerBusOff>() is in general re-entrant
for multiple CAN Controller usage, but not for the same CAN Controller.
Note: Before re-initialization/restart during BusOff recovery is executed
<User_ControllerBusOff>() is performed only once in case of multiple Bu-
sOff events at CAN Controller.
Configuration of <User_ControllerBusOff>()
8.6.3.6 <User_ConfirmPnAvailability>
[SWS_CANIF_00821] d
Service name: <User_ConfirmPnAvailability>
Syntax: void <User_ConfirmPnAvailability>(
uint8 TransceiverId
)
Sync/Async: (defined within providing upper layer module)
Reentrancy: (defined within providing upper layer module)
Parameters (in): TransceiverId Abstract CanIf TransceiverId, which is assigned to a
CAN transceiver, which was checked for PN avail-
ability.
Parameters (inout): None
Parameters (out): None
Return value: None
Description: This service indicates that the CAN transceiver is running in PN commu-
nication mode.
c()
Note: This callback service is mainly implemented in and used by CanSm (see [3,
Specification of CAN State Manager]).
8.6.3.7 <User_ClearTrcvWufFlagIndication>
[SWS_CANIF_00788] d
Service name: <User_ClearTrcvWufFlagIndication>
Syntax: void <User_ClearTrcvWufFlagIndication>(
uint8 TransceiverId
)
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): TransceiverId Abstracted CanIf TransceiverId, for which this func-
tion was called.
Parameters (inout): None
Parameters (out): None
Return value: None
Description: This service indicates that the CAN transceiver has cleared the WufFlag.
This function is called in CanIf_ClearTrcvWufFlagIndication.
c()
Note: This callback service is mainly implemented in and used by CanSm (see [3,
Specification of CAN State Manager]).
Note: The call context of <User_ClearTrcvWufFlagIndication>() is either on
interrupt level (interrupt mode) or on task level (polling mode).
Note: The callback service <User_ClearTrcvWufFlagIndication>() is in gen-
eral re-entrant for multiple CAN Controller usage, but not for the same CAN Controller
[SWS_CANIF_00794] d Configuration of <User_ClearTrcvWufFlagIndication>():
The upper layer module, which is called (see [SWS_CANIF_00757]), has to be con-
figurable by CanIfDispatchUserClearTrcvWufFlagIndicationUL (see
ECUC_CanIf_00790) if CANIF_PUBLIC_PN_SUPPORT (see ECUC_CanIf_00772)
equals True. c()
[SWS_CANIF_00795] d Configuration of <User_ClearTrcvWufFlagIndication>():
The name of <User_ClearTrcvWufFlagIndication>() shall be config-
urable by CanIfDispatchUserClearTrcvWufFlagIndicationName (see
ECUC_CanIf_00789) if CANIF_PUBLIC_PN_SUPPORT (see ECUC_CanIf_00772)
equals True. c()
[SWS_CANIF_00796] d Configuration of <User_ClearTrcvWufFlagIndication>():
It shall be configurable by CANIF_PUBLIC_PN_SUPPORT (see ECUC_CanIf_00772),
if CanIf supports this service (False: not supported, True: supported) c()
[SWS_CANIF_00797] d Configuration of <User_ClearTrcvWufFlagIndication>():
If CanIfDispatchUserClearTrcvWufFlagIndicationUL is set to
CAN_SM, CanIfDispatchUserClearTrcvWufFlagIndicationName must be
CanSM_ClearTrcvWufFlagIndication. c()
[SWS_CANIF_00798] d Configuration of <User_ClearTrcvWufFlagIndication>():
If CanIfDispatchUserClearTrcvWufFlagIndicationUL is set to CDD, the name
of the service has to be configurable via parameter CanIfDispatchUserClearTr-
cvWufFlagIndicationName. c()
8.6.3.8 <User_CheckTrcvWakeFlagIndication>
[SWS_CANIF_00814] d
Service name: <User_CheckTrcvWakeFlagIndication>
Syntax: void <User_CheckTrcvWakeFlagIndication>(
uint8 TransceiverId
)
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): TransceiverId Abstracted CanIf TransceiverId, for which this func-
tion was called.
Parameters (inout): None
c()
Note: This callback service is mainly implemented in and used by CanSm (see [3,
Specification of CAN State Manager]).
Note: The call context of <User_CheckTrcvWakeFlagIndication>() is either on
interrupt level (interrupt mode) or on task level (polling mode).
Note: The callback service <User_CheckTrcvWakeFlagIndication>() is in gen-
eral re-entrant for multiple CAN Controller usage, but not for the same CAN Controller
[SWS_CANIF_00800] d Configuration of <User_CheckTrcvWakeFlagIndication>():
The upper layer module, which is called (see [SWS_CANIF_00759]), has to be con-
figurable by CanIfDispatchUserCheckTrcvWakeFlagIndicationUL (see
ECUC_CanIf_00792) if CANIF_PUBLIC_PN_SUPPORT (see ECUC_CanIf_00772)
equals True. c()
[SWS_CANIF_00801] d Configuration of <User_CheckTrcvWakeFlagIndication>():
The name of <User_CheckTrcvWakeFlagIndication>() shall be config-
urable by CanIfDispatchUserCheckTrcvWakeFlagIndicationName (see
ECUC_CanIf_00791) if CANIF_PUBLIC_PN_SUPPORT (see ECUC_CanIf_00772)
equals True. c()
[SWS_CANIF_00802] d Configuration of <User_CheckTrcvWakeFlagIndication>():
It shall be configurable by CANIF_PUBLIC_PN_SUPPORT (see ECUC_CanIf_00772),
if CanIf supports this service (False: not supported, True: supported) c()
[SWS_CANIF_00803] d Configuration of <User_CheckTrcvWakeFlagIndication>():
If CanIfDispatchUserCheckTrcvWakeFlagIndicationUL is set to
CAN_SM, CanIfDispatchUserCheckTrcvWakeFlagIndicationName must
be CanSM_CheckTrcvWakeFlagIndication. c()
[SWS_CANIF_00804] d Configuration of <User_CheckTrcvWakeFlagIndication>():
If CanIfDispatchUserCheckTrcvWakeFlagIndicationUL is set to CDD,
the name of the service has to be configurable via parameter CanIfDis-
patchUserCheckTrcvWakeFlagIndicationName. c()
8.6.3.9 <User_ControllerModeIndication>
[SWS_CANIF_00687] d
Service name: <User_ControllerModeIndication>
c()
Note: The upper layer module provides the Service ID.
Note: This callback service is mainly implemented in and used by CanSm (see [3,
Specification of CAN State Manager]).
Note: The CanIf calls this callback service. It is implemented by the config-
ured upper layer module. It is called in case of a state transition notification via
CanIf_ControllerModeIndication() of the CanDrv. The delivered parameter
ControllerId of the service CanIf_ControllerModeIndication() is passed
to the upper layer module. The delivered parameter ControllerMode of the service
CanIf_ControllerModeIndication() is mapped to the appropriate parameter
ControllerMode of <User_ControllerModeIndication>().
Note: For different upper layer users different service names shall be used.
Note: The call context of <User_ControllerModeIndication>() is on task level
(polling mode).
Note: The callback service <User_ControllerModeIndication>() is in general
re-entrant for multiple CAN Controller usage, but not for the same CAN Controller
[SWS_CANIF_00689] d Configuration of <User_ControllerModeIndication>():
The upper layer module which provides this callback service has to be configured by
CANIF_USERCONTROLLERMODEINDICATION_UL (see ECUC_CanIf_00684). c()
[SWS_CANIF_00690] d Configuration of <User_ControllerModeIndication>():
The name of <User_ControllerModeIndication>() which is called by CanIf
shall be configured for CanIf by parameter CanIfDispatchUserCtrlModeIndi-
cationName (see ECUC_CanIf_00683). This is only necessary if state transition
notifications are configured via CanIfDispatchUserCtrlModeIndicationUL. c()
8.6.3.10 <User_TrcvModeIndication>
[SWS_CANIF_00693] d
Service name: <User_TrcvModeIndication>
Syntax: void <User_TrcvModeIndication>(
uint8 TransceiverId,
CanTrcv_TrcvModeType TransceiverMode
)
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): TransceiverId Abstracted CanIf TransceiverId which is assigned to
a CAN transceiver, at which a transceiver state tran-
sition occurred.
TransceiverMode Notified CAN transceiver mode
Parameters (inout): None
Parameters (out): None
Return value: None
Description: This service indicates a CAN transceiver state transition to the corre-
sponding upper layer module (mainly the CAN State Manager module).
c()
Note: The upper layer module provides the Service ID.
Note: This callback service is mainly implemented in and used by CanSm (see [3,
Specification of CAN State Manager]).
Note: The CanIf calls this callback service. It is implemented by the config-
ured upper layer module. It is called in case of a state transition notification
via CanIf_TrcvModeIndication() of the CanTrcv. The delivered parame-
ter Transceiver of the service CanIf_TrcvModeIndication() is mapped (as
configured) to the appropriate parameter TransceiverId which will be passed
to the upper layer module. The delivered parameter TransceiverMode of the
service CanIf_TrcvModeIndication() is mapped to the appropriate parameter
TransceiverMode of <User_TrcvModeIndication>().
Note: For different upper layer users different service names shall be used.
9 Sequence diagrams
The following sequence diagrams show the interactions between CanIf and CanDrv.
Can_Write(Std_ReturnType, Can_HwHandleType,
const Can_PduType*)
Can_Write()
CanIf_Transmit()
Activity Description
Transmission request The upper layer initiates a transmit request via the service
CanIf_Transmit(). The parameter CanTxPduId identifies the
requested L-SDU. The service performs following steps:
• validation of the input parameter
• definition of the CAN Controller to be used
The second parameter *PduInfoPtr is a pointer on the structure
with transmit L-SDU related data such as SduLength and
*SduDataPtr.
Start transmission CanIf_Transmit() requests a transmission and calls the
CanDrv service Can_Write() with corresponding processing of
the HTH.
Hardware request Can_Write() writes all L-PDU data in the CAN Hardware (if it is
free) and sets the hardware request for transmission.
E_OK from Can_Write Can_Write() returns E_OK to CanIf_Transmit().
service
CAN_BUSY from Can_Write If CanDrv detects, there are no free hardware objects available, it
service returns CAN_BUSY to CanIf.
Copying into the buffer The L-PDU of the rejected transmit request will be inserted in the
transmit buffer of CanIf until the next transmit confirmation.
E_OK from CanIf CanIf_Transmit() returns E_OK to the upper layer.
Can_Write(Std_ReturnType, Can_HwHandleType,
const Can_PduType*)
alt CAN Controller A hardware status
Copy L-PDU in CAN
[CAN controller hardware object is free] Hardware A()
CanIf_Transmit()
Can_Write(Std_ReturnType, Can_HwHandleType,
const Can_PduType*)
Insert L-PDU in
transmit buffer()
CanIf_Transmit()
Activity Description
Transmission request A The upper layer initiates a transmit request via the service
CanIf_Transmit(). The parameter CanTxPduId identifies the
requested L-SDU. The service performs following steps:
• validation of the input parameter
• definition of the CAN Controller to be used (here:
Can_99_Ext1)
The second parameter *PduInfoPtr is a pointer on the structure
with transmit L-SDU related data such as SduLength and
*SduDataPtr.
Start transmission CanIf_Transmit() requests a transmission and calls the
CanDrv Can_99_Ext1 service Can_Write_99_Ext1() with
corresponding processing of the HTH.
Hardware request Can_Write_99_Ext1() writes all L-PDU data in the CAN
Hardware of Controller A (if it is free) and sets the hardware
request for transmission.
E_OK from Can_Write Can_Write_99_Ext1() returns E_OK to CanIf_Transmit().
service
CAN_BUSY from Can_Write If CanDrv Can_99_Ext1 detects, there are no free hardware
service objects available, it returns CAN_BUSY to CanIf.
Copying into the buffer The L-PDU of the rejected transmit request will be inserted in the
transmit buffers of CanIf until the next transmit confirmation.
E_OK from CanIf CanIf_Transmit() returns E_OK to the upper layer.
Transmit
Interrupt()
CanIf_TxConfirmation(PduIdType)
<User_TxConfirmation>(PduIdType, Std_ReturnType)
<User_TxConfirmation>()
CanIf_TxConfirmation()
Transmit Interrupt()
Activity Description
Transmit interrupt The acknowledged CAN frame signals a successful transmission to
the receiving CAN Controller and triggers the transmit interrupt.
Confirmation to CanIf CanDrv calls the service CanIf_TxConfirmation(). The
parameter CanTxPduId specifies the L-PDU previously sent by
Can_Write().
CanDrv must store the all in HTHs pending L-PDU Ids in an array
organized per HTH to avoid new search of the L-PDU ID for call of
CanIf_TxConfirmation().
Confirmation to upper layer Calling of the corresponding upper layer confirmation service
<User_TxConfirmation>(id, E_OK). It signals a successful
L-SDU transmission to the upper layer.
BSW Scheduler
<User_TxConfirmation>(PduIdType, Std_ReturnType)
<User_TxConfirmation>()
CanIf_TxConfirmation()
Can_MainFunction_Write()
Activity Description
Cyclic Task CanDrv The service Can_MainFunction_Write() is called by the BSW
Scheduler.
Check for pending transmit Can_MainFunction_Write() checks the underlying CAN
confirmations Controller(s) about pending transmit confirmations of
previously succeeded transmit events.
Transmit Confirmation The acknowledged CAN frame signals a successful transmission
to the sending CAN Controller.
Confirmation to CanIf CanDrv calls the service CanIf_TxConfirmation(). The
parameter CanTxPduId specifies the L-PDU previously sent by
Can_Write().
CanDrv must store the all in HTHs pending L-PDU Ids in an array
organized per HTH to avoid new search of the L-PDU ID for call of
CanIf_TxConfirmation().
Confirmation to upper layer Calling of the corresponding upper layer confirmation service
<User_TxConfirmation>(id, E_OK). It signals a successful
L-SDU transmission to the upper layer.
Transmit Confirmation
Interrupt()
CanIf_TxConfirmation(PduIdType)
check transmit
buffers for other
pending L-PDU()
[Buffer is empty]
<User_TxConfirmation>(PduIdType, Std_ReturnType)
<User_TxConfirmation>()
CanIf_TxConfirmation()
Transmit Confirmation
Interrupt()
Activity Description
Transmit interrupt Acknowledged CAN frame signals successful transmission to
receiving CAN Controller and triggers transmit interrupt.
Confirmation to CanIf CanDrv calls service CanIf_TxConfirmation(). Parameter
CanTxPduId specifies the L-PDU previously transmitted by
Can_Write(). CanDrv must store the all in HTHs pending L-PDU
Ids in an array organized per HTH to avoid new search of the
L-PDU ID for call of CanIf_TxConfirmation().
Check of transmit buffers The transmit buffers of CanIf checked, whether a pending L-PDU
is stored or not.
Transmit request passed to In case of pending L-PDUs in the transmit buffers the highest
CanDrv priority order the latest L-PDU is requested for transmission by
Can_Write(). It signals a successful L-PDU transmission to the
upper layer. Thus Can_Write() can be called re-entrant.
Remove transmitted L-PDU The L-PDU pending for transmission is removed from the
from transmit buffers transmission buffers by CanIf.
Confirmation to the upper Calling of the corresponding upper layer confirmation service
layer <User_TxConfirmation>(id, E_OK). It signals a successful
L-SDU transmission to the upper layer.
Com_MainFunctionTx()
PduR_ComTransmit(Std_ReturnType, PduIdType,
const PduInfoType*)
CanIf_Transmit(Std_ReturnType, PduIdType,
const PduInfoType*)
Can_Write(Std_ReturnType, Can_HwHandleType,
const Can_PduType*)
Can_Write()
Can_Write()
Insert L-PDU in
transmit buffer()
Tcom: Activate
timeout supervision()
Com_TxConfirmation(PduIdType, Std_ReturnType)
Dummy API:
Can_CancelTransmit()
[FALSE]
[FALSE]
[FALSE]
If TURNED OFF, no code is compiled. Same timeout handling as in OSEK COM
Activity Description
Call of scheduled Function Com_MainFunctionTx() will be called cyclic by SchM.
Transmission request to Within cyclic called Com_MainFunctionTx() a transmission
PduR request through PduR arises: PduR_ComTransmit()
Transmission request to PduR passes the transmit request via CanIf_Transmit() to
CanIf CanIf. The parameter CanTxPduId identifies the requested
L-SDU. The service performs following steps:
• validation of the input parameter
• definition of the CAN Controller to be used
The second parameter *PduInfoPtr is a pointer on the structure
with transmit L-SDU related data such as SduLength and
*SduDataPtr.
Transmission request to CanIf_Transmit() requests a transmission and calls the
CanDrv CanDrv service Can_Write() with corresponding processing of
the HTH.
Transmission request to Can_Write() writes all L-PDU data in the CAN Hardware (if it is
the hardware free) and sets the hardware request for transmission.
E_OK from Can_Write Can_Write() returns E_OK to CanIf_Transmit().
service
CAN_BUSY from Can_Write If CanDrv detects, there are no free hardware objects available, it
service returns CAN_BUSY to CanIf.
Copying into the buffer The L-PDU of the rejected transmit request will be inserted in the
transmit buffer of CanIf until the next transmit confirmation.
E_OK from CanIf CanIf_Transmit() returns E_OK to the PduR.
E_OK from PduR PduR_ComTransmit() returns E_OK to COM.
Starting Timeout PduR starts a timeout supervision which checks if a confirmation
supervision for the successful transmission will arrive.
E_OK from COM The Com_MainFunctionTx() returns E_OK to SchM.
Activity Description
Transmit cancellation to If Com_CancelTransmitSupport,
PduR PduR_CancelTransmitSupport and
CanIf_CancelTransmitSupport are activated, the API
PduR_ComCancelTransmit() is called by COM with the
corresponding parameter ComTxPduId e.g. after a timer has been
expired.
Transmit cancellation to If PduR passes the transmit cancellation via the service
CanIf CanIf_CancelTransmit() to CanIf. The parameter
CanTxPduId identifies the requested L-PDU.
E_NOT_OK from The dummy function CanIf_CancelTransmit() returns
CanIf_CancelTransmit E_NOT_OK to PduR.
E_NOT_OK from PduR returns E_NOT_OK to COM.
PduR_ComCancelTransmit
CanIf_Transmit(Std_ReturnType,
PduIdType, const PduInfoType*)
Can_Write(Std_ReturnType,
Can_HwHandleType, const Can_PduType*)
<CainIfUser>_CanIfTriggerTransmit(Std_ReturnType,
PduIdType, PduInfoType*)
Pass pointer to HW
object
Copy L-Pdu into CAN hardware
CanIf_TriggerTransmit()
Can_Write()
CanIf_Transmit()
Activity Description
Transmission request The upper layer initiates a transmit request via the service
CanIf_Transmit(). The parameter CanTxPduId identifies the
requested L-SDU. The service performs following steps:
• validation of the input parameter
• definition of the CAN Controller to be used
The second parameter *PduInfoPtr is a pointer to the structure
with the size (SduLength) of the L-SDU to be transmitted. The
actual SDU data has not been passed by the upper layer. Hence,
the pointer *SduDataPtr points to NULL.
Start transmission CanIf_Transmit() requests a transmission and calls the
CanDrv service Can_Write() with corresponding processing of
the HTH.
Trigger transmission If the CAN hardware is free Can_Write() requests the SDU data
from CanIf by its service CanIf_TriggerTransmit() passing
the L-SDUs corresponding ID and a pointer to the CAN hardware’s
buffer. CanIf forwards the trigger transmit request to the
corresponding upper layer (CanIfUser). CanIf passes the buffer
pointer received by CanDrv. The CanIfUser finally copies the
SDU data to the buffer provided by CanIf (the CAN hardware
buffer) and returns status and number of bytes effectively written.
E_OK from Can_Write() Can_Write() returns E_OK to CanIf_Transmit().
service
CAN_BUSY from If CanDrv detects, there are no free hardware objects available, it
Can_Write() service returns CAN_BUSY to CanIf.
Queuing of transmission The Transmit Request for the L-PDU, which has been rejected
request by CanDrv, is queued by CanIf until the next transmit
confirmation.
E_OK from CanIf CanIf_Transmit() returns E_OK to the upper layer.
Receive Interrupt()
CanIf_RxIndication(const Can_HwType*,
const PduInfoType*)
Copy Data()
[Temp. buffer not used = Data normalization not necessary] Copy Data()
Copy Data()
<User_RxIndication>()
CanIf_RxIndication()
Validation of hardware object()
Receive
Interrupt()
Activity Description
Receive Interrupt The CAN Controller indicates a successful reception and
triggers a receive interrupt.
Invalidation of CAN The CPU (CanDrv) get exclusive access rights to the CAN mailbox
hardware object, provide or at least to the corresponding hardware object, where new data
CPU access to CAN were received.
mailbox
Buffering, normalizing The L-PDU is normalized and is buffered in the temporary buffer
located in CanDrv. Each CanDrv owns such a temporary buffer
for every Physical Channel only if normalizing of the data is
necessary.
Indication to CanIf The reception is indicated to CanIf by calling of
CanIf_RxIndication(). The HRH specifies the CAN RAM
Hardware Object and the corresponding CAN Controller,
which contains the received L-PDU. The temporary buffer is
referenced to CanIf by PduInfoPtr->SduDataPtr.
Software Filtering The Software Filtering checks, whether the received L-PDU will be
processed on a local ECU. If not, the received L-PDU is not
indicated to upper layers. Further processing is suppressed.
Data Length Check If the L-PDU is found, the Data Length of the received L-PDU is
compared with the expected, statically configured one for the
received L-PDU.
Receive Indication to the The corresponding receive indication service of the upper layer is
upper layer called. This signals a successful reception to the target upper
layer. The parameter RxPduId specifies the L-SDU, the second
parameter is the reference on the temporary buffer within the
L-SDU.
During is execution of this service the CAN hardware buffers must
be unlocked for CPU access/locked for CAN Controller access.
Validation of CAN hardware The CAN Controller get back exclusive access rights to the
object, allow access of CAN CAN mailbox or at least to the corresponding hardware object,
Controller to CAN where new data were already being copied into the upper layer
mailbox buffer.
BSW Scheduler
CanIf_RxIndication(const Can_HwType*,
const PduInfoType*)
<User_RxIndication>(PduIdType,
const PduInfoType*)
Exemplary call:
parameters differ for
User=CanTp
<User_RxIndication>()
CanIf_RxIndication()
Validation of hardware
object()
Can_MainFunction_Read()
Activity Description
Cyclic Task CanDrv The service Can_MainFunction_Read() is called by the BSW
Scheduler.
Check for new received Can_MainFunction_Read() checks the underlying CAN
L-PDU Controller(s) about new received L-PDUs.
Invalidation of CAN In case of a new receive event the CPU (CanDrv) get exclusive
hardware object, provide access rights to the CAN mailbox or at least to the corresponding
CPU access to CAN hardware object, where new data were received.
mailbox
Buffering, normalizing In case of a new receive event the L-PDU is normalized and is
buffered in the temporary buffer located in CanDrv. Each CanDrv
owns such a temporary buffer for every Physical Channel only
if normalizing of the data is necessary.
Indication to CanIf The reception is indicated to CanIf by calling of
CanIf_RxIndication(). The HRH specifies the CAN RAM
Hardware Object and the corresponding CAN Controller,
which contains the received L-PDU. The temporary buffer is
referenced to CanIf by PduInfoPtr->SduDataPtr.
Software Filtering The Software Filtering checks, whether the received L-PDU will be
processed on a local ECU. If not, the received L-PDU is not
indicated to upper layers. Further processing is suppressed.
Data Length Check If the L-PDU is found, the Data Length of the received L-PDU is
compared with the expected, statically configured one for the
received L-PDU.
Receive Indication to the If configured, the corresponding receive indication service of the
upper layer upper layer is called. This signals a successful reception to the
target upper layer. The parameter RxPduId specifies the L-SDU,
the second parameter is the reference on the temporary buffer
within the L-SDU.
During is execution of this service the CAN hardware buffers must
be unlocked for CPU access/locked for CAN Controller access.
Validation of CAN hardware The CAN Controller get back exclusive access rights to the
object, allow access of CAN CAN mailbox or at least to the corresponding hardware object,
Controller to CAN where new data were already being copied into the upper layer
mailbox buffer.
Receive
Interrupt()
Invalidation of hardware
object()
Invalidation of hardware
object()
CanIf_RxIndication(const Can_HwType*,
const PduInfoType*)
Here no
temporary buffer [L-PDU reception in BasicCAN]:
Software filtering and L-PDU
in CAN driver is
used. assignment()
Set Indication
Flag()
<User_RxIndication>(PduIdType,
const PduInfoType*)
<User_RxIndication>()
CanIf_RxIndication()
Validation of hardware
object()
Validation of hardware
object()
Receive
Interrupt()
CanIf_ReadRxNotifStatus(CanIf_NotifStatusType, PduIdType)
Read Indication
For transmit CAN L-PDUs, the service flag()
CanIf_ReadNotifStatus returns the
Confirmation flag status
Reset Indication
flag()
CanIf_ReadRxNotifStatus()
CanIf_ReadRxPduData(Std_ReturnType, PduIdType,
PduInfoType*)
Activity Description
Receive Interrupt The CAN Controller indicates a successful reception and
triggers a receive interrupt.
Invalidation of CAN The CPU (CanDrv) get exclusive access rights to the CAN mailbox
hardware object, provide or at least to the corresponding hardware object, where new data
CPU access to CAN were received.
mailbox
Buffering, normalizing The L-PDU is normalized and is buffered in the temporary buffer
located in CanDrv. Each CanDrv owns such a temporary buffer
for every Physical Channel only if normalizing of the data is
necessary.
Indication to CanIf The reception is indicated to CanIf by calling of
CanIf_RxIndication(). The HRH specifies the CAN RAM
Hardware Object and the corresponding CAN Controller,
which contains the received L-PDU. The temporary buffer is
referenced to CanIf by PduInfoPtr->SduDataPtr.
Software Filtering The Software Filtering checks, whether the received L-PDU will be
processed on a local ECU. If not, the received L-PDU is not
indicated to upper layers. Further processing is suppressed.
Data Length Check If the L-PDU is found, the Data Length of the received L-PDU is
compared with the expected, statically configured one for the
received L-PDU.
Copy data The data is copied out of the CAN hardware into the receive CAN
L-PDU buffers in CanIf. During access the CAN hardware buffers
must be unlocked for CPU access/locked for CAN Controller
access.
Indication Flag Set indication status flag for the received L-PDU in CanIf.
Receive Indication to the The corresponding receive indication service of the upper layer is
upper layer called. This signals a successful reception to the target upper
layer. The parameter RxPduId specifies the L-SDU, the second
parameter is the reference on the temporary buffer within the
L-SDU.
Validation of CAN hardware The CAN Controller get back exclusive access rights to the
object, allow access of CAN CAN mailbox or at least to the corresponding hardware object,
Controller to CAN where new data were already being copied into the upper layer
mailbox buffer.
Read indication status Times later the upper layer can read the indication status by call of
CanIf_ReadRxNotifStatus(). This service can also be used
for transmit L-PDUs. Then it return the confirmation status.
Reset indication status Before CanIf_ReadRxNotifStatus() returns, the indication
status is reset.
Read received data Times later the upper layer can read the received data by call of
CanIf_ReadRxPduData().
Read CanIf Rx buffer CanIf_ReadRxPduData() reads the data from CanIf Rx buffer.
E_OK from CanIf If CanIf_ReadRxPduData() was successful, the request returns
E_OK with valid PduInfoPtr.
loop Requesting CAN controller mode consecutively. If mode changed -> CanIf_ControllerModeIndication()
Can_MainFunction_Mode()
Can_SetControllerMode(Std_ReturnType, uint8,
Can_ControllerStateType)
Disable Wakeup
interrupt, if supported()
CanIf_ControllerModeIndication(uint8,
Can_ControllerStateType)
Change to
CAN_CS_STARTED() Can_MainFunction_Mode() detects the
<User_ControllerModeIndication>(uint8, successful mode transition to STARTED
Can_ControllerStateType)
which results in a call of
<User_ControllerModeIndication>()
CanIf_ControllerModeIndication() CanIf_ControllerModeIndication()
Change to
<User_ControllerModeIndication>(uint8, CAN_CS_STARTED() CanIf_ControllerModeIndication is called
Can_ControllerStateType) during Can_SetControllerMode(). This
<User_ControllerModeIndication>() happens if CAN controller transitions fast
CanIf_ControllerModeIndication() enough.
[STARTED]
CanIf_ControllerModeIndication(uint8,
Can_ControllerStateType)
Change to
CAN_CS_STARTED()
<User_ControllerModeIndication>(uint8,
Can_ControllerStateType)
<User_ControllerModeIndication>()
CanIf_ControllerModeIndication()
[SLEEP]
Can_SetControllerMode returns with E_NOT_OK()
CanIf_SetControllerMode returns with E_NOT_OK() CAN Driver module not even requests CAN
controller to transition to START mode
This sequence diagram resembles "Stop CAN network" or "Sleep CAN network".
Activity Description
Loop requesting CAN The Can_MainFunction_Mode() is triggered consecutively. It
controller mode checks the HW if a controller mode has changed. If so, it is notified
consecutively. via a function call of
CanIf_ControllerModeIndication(Controller,
ControllerMode).
The upper layer requests The upper layer calls
"STARTED" mode of the CanIf_SetControllerMode(ControllerId,
desired CAN controller CAN_CS_STARTED) to request STARTED mode for the requested
CAN controller.
CanDrv disables wake up This is only done in case of requesting "STARTED" mode. If
interrupts, if supported "SLEEP" mode of CAN controller is requested, here the wake up
interrupts are enabled. In case of "STOPPED", nothing happens.
CanDrv requests the CAN During function call Can_SetControllerMode(Controller,
controller to transition into Can_ControllerStateType), the CanDrv enters the request
the requested mode into the hardware of the CAN controller. This may mean that the
(CAN_CS_STARTED). controller mode transitions directly, but it could mean that it takes a
few milliseconds until the controller changes its state. It depends
on the controllers.
The following reaction depends on the controller and its current operation mode
CAN controller was in The former request Can_SetControllerMode() returns and
STOPPED mode informs CanIf about a successful request which in turn returns the
upper layer request CanIf_SetControllerMode(). The
Can_MainFunction_Mode() detects the successful mode
transition of the CAN controller and inform the CanIf
asynchronously via
CanIf_ControllerModeIndication(Controller,
CAN_CS_STARTED).
CAN controller was in During the former request Can_SetControllerMode() the
STOPPED mode and the function CanIf_ControllerModeIndication(Controller,
CAN controller transitions CAN_CS_STARTED) is called to inform the CanIf directly about the
very fast so that mode successful mode transition. When
indication is called during CanIf_ControllerModeIndication(Controller,
transition request CAN_CS_STARTED) returned, the request
Can_SetControllerMode() returns and informs CanIf about a
successful request which in turn returns the upper layer request
CanIf_SetControllerMode().
CAN controller was in During the former request Can_SetControllerMode() the
STARTED mode function CanIf_ControllerModeIndication(Controller,
CAN_CS_STARTED) is called to inform the CanIf directly about the
successful mode transition (because the mode was already
started). When
CanIf_ControllerModeIndication(Controller,
CAN_CS_STARTED) returned, the request
Can_SetControllerMode() returns and informs CanIf about a
successful request which in turn returns the upper layer request
CanIf_SetControllerMode().
CAN controller was in This transition is not allowed -> E_NOT_OK.
SLEEP mode
BusOff Detection()
CanIf_ControllerBusOff(uint8)
Change to
CAN_CS_STOPPED()
Transmit queues being
reset to avoid
Reset transmission of old L-
transmit PDUs after CAN
<User_ControllerBusOff>(uint8) queue() controller restart
<User_ControllerBusOff>()
CanIf_ControllerBusOff()
BusOff Detection()
Activity Description
BusOff detection interrupt The CAN controller signals a BusOff event.
Stop CAN controller CAN controller is set to STOPPED mode by the CAN Driver, if
necessary.
BusOff indication to CAN BusOff is notified to the CanIf by calling of
Interface CanIf_ControllerBusOff()
BusOff indication to upper BusOff is notified to the upper layer by calling of
layer (CanSM) <User_ControllerBusOff>()
loop Requesting CAN controller mode consecutively. If mode changed -> CanIf_ControllerModeIndication().
Can_MainFunction_Mode()
[STOPPED]
CanIf_ControllerBusOff(uint8)
<User_ControllerBusOff>()
CanIf_ControllerBusOff()
BusOff Detection()
Can_SetContollerMode()
CanIf_SetControllerMode()
CanIf_ControllerModeIndication(uint8,
Can_ControllerStateType)
Change to
CAN_CS_STARTED()
<User_ControllerModeIndication>(uint8,
Can_ControllerStateType)
<User_ControllerModeIndication>()
CanIf_ControllerModeIndication()
Activity Description
BusOff detection interrupt The CAN controller signals a BusOff event.
Stop CAN controller CAN controller is set to STOPPED mode by the CanDrv, if
necessary
BusOff indication to CanIf BusOff is notified to the CanIf by calling of
CanIf_ControllerBusOff(). The transmit buffers inside
CanIf will be reset.
BusOff indication to upper BusOff is notified to the upper layer by calling of
layer <User_ControllerBusOff>()
Upper Layer (CanSM) After a time specified by the BusOff Recovery algorithm the
initiates BusOff Recovery Recovery process itself in initiated by
CanIf_SetControllerMode(ControllerId,
CAN_CS_STARTED).
Restart of CAN controller The driver restarts the CAN controller by call of
Can_SetControllerMode(Controller,
CAN_CS_STARTED).
CAN controller started CanDrv informs CanIf about the successful start by calling
CanIf_ControllerModeIndication(). CanIf changes
mode to CAN_CS_STARTED and informs in turn upper layers about
the mode change.
10 Configuration specification
In general, this chapter defines configuration parameters and their clustering into
containers. For general information about the definition of containers and param-
eters, refer to the [9, chapter 10.1 "Introduction to configuration specification" in
SWS_BSWGeneral].
section 10.1 specifies the structure (containers) and the parameters of the CanIf.
CanIfHthCfg :
EcucParamConfContainerDef
CanIfPublicCfg :
+container EcucParamConfContainerDef CanIfInitHohCfg : +subContainer lowerMultiplicity = 0
EcucParamConfContainerDef upperMultiplicity = *
upperMultiplicity = 1
lowerMultiplicity = 1 lowerMultiplicity = 0
upperMultiplicity = *
+subContainer +subContainer
CanIfInitCfg :EcucParamConfContainerDef
CanIfHrhCfg :
lowerMultiplicity = 1 EcucParamConfContainerDef
CanIfRxPduCfg :
upperMultiplicity = 1 EcucParamConfContainerDef
+container +subContainer lowerMultiplicity = 0
upperMultiplicity = *
lowerMultiplicity = 0
upperMultiplicity = *
+subContainer +subContainer
CanIfTxPduCfg :
EcucParamConfContainerDef CanIfHrhRangeCfg :
EcucParamConfContainerDef
CanIfDispatchCfg :
+container EcucParamConfContainerDef lowerMultiplicity = 0
upperMultiplicity = * lowerMultiplicity = 0
upperMultiplicity = *
CanIfCtrlCfg :EcucParamConfContainerDef
CanIfCtrlDrvCfg :
EcucParamConfContainerDef +subContainer
+container upperMultiplicity = *
lowerMultiplicity = 1
lowerMultiplicity = 1
upperMultiplicity = *
CanIfTrcvDrvCfg : CanIfTrcvCfg :
EcucParamConfContainerDef EcucParamConfContainerDef
+container +subContainer
lowerMultiplicity = 0 lowerMultiplicity = 1
upperMultiplicity = * upperMultiplicity = *
10.1.1 CanIf
CanIf :EcucModuleDef
CanIfPublicCfg :
+container EcucParamConfContainerDef
upperMultiplicity = 1
lowerMultiplicity = 0
upperMultiplicity = 1
lowerMultiplicity = 1
CanIfPrivateCfg :
+container
EcucParamConfContainerDef
CanIfDispatchCfg :
+container EcucParamConfContainerDef
CanIfTrcvDrvCfg :
EcucParamConfContainerDef
+container
lowerMultiplicity = 0
upperMultiplicity = *
CanIfCtrlDrvCfg : CanIfCtrlCfg :
EcucParamConfContainerDef EcucParamConfContainerDef
+container +subContainer
lowerMultiplicity = 1 upperMultiplicity = *
upperMultiplicity = * lowerMultiplicity = 1
CanIfInitCfg :EcucParamConfContainerDef
CanIfInitHohCfg :
lowerMultiplicity = 1 EcucParamConfContainerDef
+subContainer
upperMultiplicity = 1
lowerMultiplicity = 0
upperMultiplicity = *
CanIfTxPduCfg :
EcucParamConfContainerDef
+subContainer
lowerMultiplicity = 0
upperMultiplicity = *
+container
CanIfRxPduCfg :
EcucParamConfContainerDef
+subContainer
lowerMultiplicity = 0
upperMultiplicity = *
CanIfBufferCfg :
EcucParamConfContainerDef
+subContainer
lowerMultiplicity = 0
upperMultiplicity = *
10.1.2 CanIfPrivateCfg
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfTTGeneral 0..1 CanIfTTGeneral is specified in the SWS TTCAN
Interface and defines if and in which way TTCAN is
supported.
CanIf :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanIfPrivateDataLengthCheck :
CanIfPrivateCfg : +parameter EcucBooleanParamDef
EcucParamConfContainerDef
defaultValue = True
+parameter CanIfPrivateSoftwareFilterType :
EcucEnumerationParamDef
+literal +literal
LINEAR : BINARY :
EcucEnumerationLiteralDef EcucEnumerationLiteralDef
+literal +literal
TABLE : INDEX :
EcucEnumerationLiteralDef EcucEnumerationLiteralDef
CanIfFixedBuffer :
+parameter EcucBooleanParamDef
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1
10.1.3 CanIfPublicCfg
Multiplicity 1
Type EcucBooleanParamDef
Default Value false
Post-Build Variant false
Value
Length 1–32
Regular Expression
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X All Variants
Configuration Class
Link time –
Post-build time –
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: ECU
Multiplicity 1
Type EcucBooleanParamDef
Default Value false
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: ECU
No Included Containers
CanIfPublicCfg : CanIfPublicReadRxPduDataApi :
EcucParamConfContainerDef +parameter
EcucBooleanParamDef
defaultValue = False
+parameter CanIfPublicMultipleDrvSupport :
EcucBooleanParamDef
CanIfDevErrorDetect :
defaultValue = false
EcucBooleanParamDef
+parameter
defaultValue = false
+parameter CanIfPublicTxConfirmPollingSupport :
EcucBooleanParamDef
+parameter CanIfPublicTxBuffering :
EcucBooleanParamDef
+parameter CanIfTxOfflineActiveSupport :
EcucBooleanParamDef
CanIfPublicCddHeaderFile :
defaultValue = False
EcucStringParamDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = *
minLength = 1 CanIfSetBaudrateApi :
maxLength = 32 EcucBooleanParamDef
+parameter
defaultValue = False
lowerMultiplicity = 0
CanIfPublicWakeupCheckValidByNM : upperMultiplicity = 1
EcucBooleanParamDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1
defaultValue = False CanIfPublicIcomSupport :
EcucBooleanParamDef
CanIfPublicHandleTypeEnum :
EcucEnumerationParamDef +literal UINT8 :
EcucEnumerationLiteralDef
+parameter
+literal UINT16 :
EcucEnumerationLiteralDef
10.1.4 CanIfInitCfg
constant to CanIf_ConfigType
Multiplicity 1
Type EcucStringParamDef
Default Value
Length 1–32
Regular Expression
Post-Build Variant true
Value
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfBufferCfg 0..* This container contains the Txbuffer configuration.
Multiple buffers with different sizes could be configured.
If CanIfBufferSize (ECUC_CanIf_00834) equals 0, the
CanIf Tx L-PDU only refers via this CanIfBufferCfg the
corresponding CanIfHthCfg.
CanIfInitHohCfg 0..* This container contains the references to the
configuration setup of each underlying CAN Driver.
CanIfRxPduCfg 0..* This container contains the configuration (parameters)
of each receive CAN L-PDU.
CanIf :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
lowerMultiplicity = 1 minLength = 1
upperMultiplicity = 1 maxLength = 32
CanIfRxPduCfg :
EcucParamConfContainerDef
+subContainer
lowerMultiplicity = 0
upperMultiplicity = *
CanIfInitHohCfg :
+subContainer EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
CanIfTxPduCfg :
EcucParamConfContainerDef
+subContainer
lowerMultiplicity = 0
upperMultiplicity = *
CanIfMaxBufferSize :
+parameter EcucIntegerParamDef
lowerMultiplicity = 0
upperMultiplicity = 1
CanIfMaxTxPduCfg :
+parameter EcucIntegerParamDef
lowerMultiplicity = 0
upperMultiplicity = 1
CanIfMaxRxPduCfg :
+parameter EcucIntegerParamDef
lowerMultiplicity = 0
upperMultiplicity = 1
10.1.5 CanIfTxPduCfg
Multiplicity 0..1
Type EcucBooleanParamDef
Default Value false
Post-Build Variant true
Multiplicity
Post-Build Variant true
Value
Multiplicity Pre-compile time X VARIANT-PRE-COMPILE
Configuration Class
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
dependency: This parameter shall only be configurable if
CanIfPublicPnSupport equals True.
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfTTTxFrame 0..1 CanIfTTTxFrameTriggering is specified in the SWS
Triggering TTCAN Interface and defines Frame trigger for TTCAN
transmission.
CanIfTxPduCfg : CanIfTxPduReadNotifyStatus :
+parameter
EcucParamConfContainerDef EcucBooleanParamDef Pdu :
EcucParamConfContainerDef
lowerMultiplicity = 0 defaultValue = False CanIfTxPduRef : +destination
upperMultiplicity = * EcucReferenceDef lowerMultiplicity = 0
+reference upperMultiplicity = *
(from EcucPdu)
+literal
CanIfTxPduUserTxConfirmationUL : CAN_TP :EcucEnumerationLiteralDef
EcucEnumerationParamDef +literal
PDUR :EcucEnumerationLiteralDef
lowerMultiplicity = 0
upperMultiplicity = 1 +literal
CAN_NM :EcucEnumerationLiteralDef
+literal
J1939TP :EcucEnumerationLiteralDef
+parameter +literal
XCP :EcucEnumerationLiteralDef
+literal
CDD :EcucEnumerationLiteralDef
+literal
J1939NM :EcucEnumerationLiteralDef
+literal
CAN_TSYN :EcucEnumerationLiteralDef
+literal
CanIfTxPduCanIdType : STANDARD_CAN :EcucEnumerationLiteralDef
EcucEnumerationParamDef +literal
+parameter EXTENDED_CAN :EcucEnumerationLiteralDef
+literal
STANDARD_FD_CAN :EcucEnumerationLiteralDef
+literal
EXTENDED_FD_CAN :EcucEnumerationLiteralDef
CanIfTxPduId : CanIfTxPduUserTxConfirmationName :
EcucIntegerParamDef EcucFunctionNameDef
+parameter
+parameter CanIfTxPduTruncation :
CanIfTxPduCanIdMask :
EcucBooleanParamDef
EcucIntegerParamDef
+literal
CanIfTxPduType : DYNAMIC :EcucEnumerationLiteralDef
+parameter
EcucEnumerationParamDef
+literal
STATIC :EcucEnumerationLiteralDef
CanIfTxPduTriggerTransmit :
CanIfTxPduUserTriggerTransmitName :
EcucBooleanParamDef
+parameter EcucFunctionNameDef
defaultValue = false
lowerMultiplicity = 0
lowerMultiplicity = 0
upperMultiplicity = 1
upperMultiplicity = 1
minLength = 1
+parameter
maxLength = 32
10.1.6 CanIfRxPduCfg
Range: 11 Bit For Standard CAN Identifier ... 29 Bit For Extended CAN
identifier
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 536870911
Default Value
Post-Build Variant true
Multiplicity
Post-Build Variant true
Value
Multiplicity Pre-compile time X VARIANT-PRE-COMPILE
Configuration Class
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU
The data area size of a CAN L-PDU can have a range from 0 to 64
bytes.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 64
Default Value
Post-Build Variant true
Value
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU
dependency: If CanIfRxPduDataLength > 8 then
CanIfRxPduCanIdType must not be STANDARD_NO_FD_CAN or
EXTENDED_NO_FD_CAN
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfRxPduCanIdRange 0..1 Optional container that allows to map a range of CAN
Ids to one PduId.
CanIfTTRxFrame 0..1 CanIfTTRxFrameTriggering is specified in the SWS
Triggering TTCAN Interface and defines Frame trigger for TTCAN
reception.
CanIfInitCfg :EcucParamConfContainerDef
The SHORT-NAME of "CanIfRxPduConfig"
lowerMultiplicity = 1 container itself represents the symolic name
upperMultiplicity = 1 of Receive L-PDU.
+subContainer
CanIfHrhCfg : +reference
CanIfRxPduCfg : +reference CanIfRxPduHrhIdRef : +destination EcucParamConfContainerDef
EcucParamConfContainerDef EcucReferenceDef CanIfHrhIdSymRef :
lowerMultiplicity = 0 EcucSymbolicNameReferenceDef
lowerMultiplicity = 0 upperMultiplicity = *
upperMultiplicity = * CanIfRxPduReadNotifyStatus :
+parameter
EcucBooleanParamDef
defaultValue = False
+parameter
CanIfRxPduUserRxIndicationName :
EcucFunctionNameDef
Pdu :
EcucParamConfContainerDef lowerMultiplicity = 0
upperMultiplicity = 1
+reference +destination lowerMultiplicity = 0 minLength = 1
CanIfRxPduRef :
EcucReferenceDef upperMultiplicity = * maxLength = 32
(from EcucPdu)
+literal
CanIfRxPduUserRxIndicationUL : CAN_TP :EcucEnumerationLiteralDef
EcucEnumerationParamDef +literal
CDD :EcucEnumerationLiteralDef
upperMultiplicity = 1
lowerMultiplicity = 0 +literal
CAN_NM :EcucEnumerationLiteralDef
+literal
J1939TP :EcucEnumerationLiteralDef
+parameter +literal
PDUR :EcucEnumerationLiteralDef
+literal
XCP :EcucEnumerationLiteralDef
+literal
J1939NM :EcucEnumerationLiteralDef
+literal
CAN_TSYN :EcucEnumerationLiteralDef
+literal
CanIfRxPduCanIdType : EXTENDED_CAN :EcucEnumerationLiteralDef
EcucEnumerationParamDef
+literal
STANDARD_CAN :EcucEnumerationLiteralDef
+literal
EXTENDED_FD_CAN :EcucEnumerationLiteralDef
+parameter
+literal
STANDARD_FD_CAN :EcucEnumerationLiteralDef
+literal
EXTENDED_NO_FD_CAN :EcucEnumerationLiteralDef
+literal
STANDARD_NO_FD_CAN :EcucEnumerationLiteralDef
CanIfRxPduId :
EcucIntegerParamDef
+parameter
symbolicNameValue = true
upperMultiplicity = 1
lowerMultiplicity = 1
min = 0
max = 4294967295 CanIfRxPduDataLength :
+parameter EcucIntegerParamDef
min = 0
CanIfRxPduReadData : max = 64
+parameter
EcucBooleanParamDef
CanIfRxPduCanIdRange : CanIfRxPduCanIdRangeUpperCanId :
EcucParamConfContainerDef
10.1.7 CanIfRxPduCanIdRange
No Included Containers
10.1.8 CanIfDispatchCfg
Description Callback functions provided by upper layer modules of the CanIf. The
callback functions defined in this container are common to all
configured CAN Driver / CAN Transceiver Driver modules.
Configuration Parameters
Name CanIfDispatchUserCheckTrcvWakeFlagIndicationName
[ECUC_CanIf_00791]
Parent Container CanIfDispatchCfg
Description This parameter defines the name of
<User_CheckTrcvWakeFlagIndication>. If
CanIfDispatchUserCheckTrcvWakeFlagIndicationUL equals CAN_SM
the name of <User_CheckTrcvWakeFlagIndication> is fixed. If it equals
CDD, the name is selectable. If CanIfPublicPnSupport equals False,
this parameter shall not be configurable.
Multiplicity 0..1
Type EcucFunctionNameDef
Default Value
Regular Expression
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X VARIANT-PRE-COMPILE
Configuration Class
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Scope / Dependency scope: ECU
dependency:
CANIF_DISPATCH_USERCHECKTRCVWAKEFLAGINDICATION_UL,
CANIF_PUBLIC_PN_SUPPORT
Name CanIfDispatchUserCheckTrcvWakeFlagIndicationUL
[ECUC_CanIf_00792]
Parent Container CanIfDispatchCfg
Description This parameter defines the upper layer module to which the
CheckTrcvWakeFlagIndication from the Driver modules have to be
routed. If CANIF_PUBLIC_PN_SUPPORT equals False, this
parameter shall not be configurable.
Multiplicity 0..1
Type EcucEnumerationParamDef
Range CAN_SM CAN State Manager
CDD Complex Driver
Post-Build Variant false
Multiplicity
Name CanIfDispatchUserClearTrcvWufFlagIndicationName
[ECUC_CanIf_00789]
Parent Container CanIfDispatchCfg
Description This parameter defines the name of
<User_ClearTrcvWufFlagIndication>. If
CanIfDispatchUserClearTrcvWufFlagIndicationUL equals CAN_SM the
name of <User_ClearTrcvWufFlagIndication> is fixed. If it equals CDD,
the name is selectable. If CANIF_PUBLIC_PN_SUPPORT equals
False, this parameter shall not be configurable.
Multiplicity 0..1
Type EcucFunctionNameDef
Default Value
Regular Expression
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X VARIANT-PRE-COMPILE
Configuration Class
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Scope / Dependency scope: ECU
dependency: CanIfDispatchUserClearTrcvWufFlagIndicationUL,
CANIF_PUBLIC_PN_SUPPORT
Name CanIfDispatchUserClearTrcvWufFlagIndicationUL
[ECUC_CanIf_00790]
Parent Container CanIfDispatchCfg
Description This parameter defines the upper layer module to which the
ClearTrcvWufFlagIndication from the Driver modules have to be routed.
If CANIF_PUBLIC_PN_SUPPORT equals False, this parameter shall
not be configurable.
Multiplicity 0..1
Type EcucEnumerationParamDef
Range CAN_SM CAN State Manager
CDD Complex Driver
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X VARIANT-PRE-COMPILE
Configuration Class
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Scope / Dependency scope: ECU
dependency: CANIF_PUBLIC_PN_SUPPORT
Regular Expression
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X VARIANT-PRE-COMPILE
Configuration Class
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Scope / Dependency scope: ECU
dependency: CanIfDispatchUserCtrlModeIndicationUL
No Included Containers
CanIfDispatchUserCtrlBusOffName :
CanIfDispatchCfg :
EcucFunctionNameDef
EcucParamConfContainerDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1 CanIfDispatchUserValidateWakeupEventName :
minLength = 1 EcucFunctionNameDef
maxLength = 32
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1
minLength = 1
maxLength = 32
+literal
+parameter CanIfDispatchUserCtrlBusOffUL : CAN_SM :EcucEnumerationLiteralDef
EcucEnumerationParamDef
+literal
CDD :EcucEnumerationLiteralDef
CanIfDispatchUserValidateWakeupEventUL : +literal
+parameter EcucEnumerationParamDef ECUM :EcucEnumerationLiteralDef
lowerMultiplicity = 0 +literal
upperMultiplicity = 1 CDD :EcucEnumerationLiteralDef
CanIfDispatchUserCtrlModeIndicationName :
EcucFunctionNameDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1 CanIfDispatchUserTrcvModeIndicationName :
minLength = 1 EcucFunctionNameDef
maxLength = 32
+parameter lowerMultiplicity = 0
upperMultiplicity = 1
minLength = 1
maxLength = 32
+literal
CanIfDispatchUserCtrlModeIndicationUL :
CAN_SM :EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
+literal
lowerMultiplicity = 1 CDD :EcucEnumerationLiteralDef
upperMultiplicity = 1
+literal
CanIfDispatchUserTrcvModeIndicationUL : CAN_SM :EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
+literal
lowerMultiplicity = 0 CDD :EcucEnumerationLiteralDef
upperMultiplicity = 1
+parameter CanIfDispatchUserConfirmPnAvailabilityName :
EcucFunctionNameDef
CanIfDispatchUserClearTrcvWufFlagIndicationName :
+parameter EcucFunctionNameDef lowerMultiplicity = 0
upperMultiplicity = 1
lowerMultiplicity = 0
upperMultiplicity = 1 CanIfDispatchUserCheckTrcvWakeFlagIndicationName :
EcucFunctionNameDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1
CanIfDispatchUserClearTrcvWufFlagIndicationUL : +literal
+parameter EcucEnumerationParamDef CAN_SM :EcucEnumerationLiteralDef
lowerMultiplicity = 0 +literal
upperMultiplicity = 1 CDD :EcucEnumerationLiteralDef
+literal
CanIfDispatchUserCheckTrcvWakeFlagIndicationUL :
CAN_SM :EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
lowerMultiplicity = 0 +literal
upperMultiplicity = 1 CDD :EcucEnumerationLiteralDef
+literal
CanIfDispatchUserConfirmPnAvailabilityUL : CAN_SM :EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
+literal
lowerMultiplicity = 0 CDD :EcucEnumerationLiteralDef
upperMultiplicity = 1
10.1.9 CanIfCtrlCfg
No Included Containers
CanIf :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanIfCtrlDrvCfg :
EcucParamConfContainerDef
lowerMultiplicity = 1
upperMultiplicity = *
+subContainer
upperMultiplicity = * upperMultiplicity = *
lowerMultiplicity = 1 lowerMultiplicity = 1
upperMultiplicity = 1
lowerMultiplicity = 1
symbolicNameValue = true
min = 0
+parameter CanIfCtrlWakeupSupport : max = 255
EcucBooleanParamDef
(from CanDrv)
defaultValue = False
10.1.10 CanIfCtrlDrvCfg
This reference can be used to get any information (Ex. Driver Name,
Vendor ID) from the CAN driver.
The CAN Driver name can be derived from the ShortName of the CAN
driver module.
Multiplicity 1
Type Reference to CanGeneral
false
Post-Build Variant
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfCtrlCfg 1..* This container contains the configuration (parameters)
of an adressed CAN controller by an underlying CAN
Driver module. This container is configurable per CAN
controller.
CanIf :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanGeneral :
CanIfCtrlDrvCfg : +reference +destination EcucParamConfContainerDef
CanIfCtrlDrvNameRef :
EcucParamConfContainerDef
EcucReferenceDef
upperMultiplicity = 1
lowerMultiplicity = 1 lowerMultiplicity = 1
upperMultiplicity = *
(from CanDrv)
CanIfInitHohCfg :
EcucParamConfContainerDef
+reference CanIfCtrlDrvInitHohConfigRef : +destination
EcucReferenceDef
lowerMultiplicity = 0
upperMultiplicity = *
10.1.11 CanIfTrcvDrvCfg
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfTrcvCfg 1..* This container contains the configuration (parameters) of
one addressed CAN transceiver by the underlying CAN
Transceiver Driver module. For each CAN transceiver a
seperate instance of this container has to be provided.
CanIf :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanIfTrcvDrvCfg :
EcucParamConfContainerDef CanIfTrcvCfg :
EcucParamConfContainerDef
+subContainer
lowerMultiplicity = 0
upperMultiplicity = * lowerMultiplicity = 1
upperMultiplicity = *
10.1.12 CanIfTrcvCfg
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: ECU
No Included Containers
CanIf :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanIfTrcvDrvCfg :
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
+subContainer
CanIfTrcvCfg : CanIfTrcvWakeupSupport :
EcucParamConfContainerDef +parameter
EcucBooleanParamDef
CanIfTrcvId :EcucIntegerParamDef
+parameter
min = 0
max = 255
symbolicNameValue = true
(from CanTrcv)
+reference +parameter
CanTrcvWakeupSourceRef : CanTrcvChannelId :
EcucSymbolicNameReferenceDef EcucIntegerParamDef
10.1.13 CanIfInitHohCfg
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfHrhCfg 0..* This container contains configuration parameters for
each hardware receive object (HRH).
CanIfHthCfg 0..* This container contains parameters related to each HTH.
CanIfInitCfg :EcucParamConfContainerDef
lowerMultiplicity = 1
upperMultiplicity = 1
+subContainer
CanIfInitHohCfg : CanIfHrhCfg :
EcucParamConfContainerDef EcucParamConfContainerDef
+subContainer
lowerMultiplicity = 0 lowerMultiplicity = 0
upperMultiplicity = * upperMultiplicity = *
CanIfHthCfg :
EcucParamConfContainerDef
+subContainer
lowerMultiplicity = 0
upperMultiplicity = *
10.1.14 CanIfHthCfg
Multiplicity 1
Type Symbolic name reference to CanHardwareObject
false
Post-Build Variant
Value
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Scope / Dependency scope: ECU
No Included Containers
CanIfInitHohCfg :
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
+subContainer
CanIfHthCfg : CanIfCtrlCfg :
EcucParamConfContainerDef +reference CanIfHthCanCtrlIdRef : +destination
EcucParamConfContainerDef
EcucReferenceDef
lowerMultiplicity = 0 upperMultiplicity = *
upperMultiplicity = * lowerMultiplicity = 1
upperMultiplicity = *
lowerMultiplicity = 1
(from CanDrv)
+parameter +parameter
(from CanDrv)
10.1.15 CanIfHrhCfg
Multiplicity 1
Type Symbolic name reference to CanHardwareObject
true
Post-Build Variant
Value
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfHrhRangeCfg 0..* Defines the parameters required for configurating
multiple CANID ranges for a given same HRH.
CanIfInitHohCfg :
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
+subContainer CanIfCtrlCfg :
+reference CanIfHrhCanCtrlIdRef : +destination EcucParamConfContainerDef
CanIfHrhCfg :
EcucReferenceDef
EcucParamConfContainerDef upperMultiplicity = *
lowerMultiplicity = 1
lowerMultiplicity = 0
upperMultiplicity = *
CanHardwareObject :
+reference CanIfHrhIdSymRef : +destination
EcucParamConfContainerDef
EcucSymbolicNameReferenceDef
upperMultiplicity = *
lowerMultiplicity = 1
CanIfHrhSoftwareFilter :
+parameter EcucBooleanParamDef
defaultValue = True
CanIfHrhRangeCfg :
EcucParamConfContainerDef (from CanDrv)
+subContainer
lowerMultiplicity = 0
upperMultiplicity = * +parameter
CanHandleType :
EcucEnumerationParamDef
CanObjectId :EcucIntegerParamDef
upperMultiplicity = 1
lowerMultiplicity = 1
symbolicNameValue = true
min = 0
max = 65535
(from CanDrv)
10.1.16 CanIfHrhRangeCfg
No Included Containers
CanIfHrhCfg :
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
CanIfHrhRangeRxPduUpperCanId :
EcucIntegerParamDef
+subContainer
CanIfHrhRangeCfg : min = 0
+parameter
EcucParamConfContainerDef max = 536870911
lowerMultiplicity = 0
upperMultiplicity = 1
lowerMultiplicity = 0
upperMultiplicity = *
CanIfHrhRangeRxPduLowerCanId :
EcucIntegerParamDef
+parameter
upperMultiplicity = 1
lowerMultiplicity = 0
min = 0
max = 536870911 STANDARD :
+literal EcucEnumerationLiteralDef
CanIfHrhRangeRxPduRangeCanIdType :
EcucEnumerationParamDef
+parameter
+literal EXTENDED :
EcucEnumerationLiteralDef
CanIfHrhRangeBaseId :
EcucIntegerParamDef
+parameter
upperMultiplicity = 1
lowerMultiplicity = 0
min = 0
max = 536870911
CanIfHrhRangeMask :
EcucIntegerParamDef
+parameter
upperMultiplicity = 1
lowerMultiplicity = 0
min = 0
max = 536870911
10.1.17 CanIfBufferCfg
Description This container contains the Txbuffer configuration. Multiple buffers with
different sizes could be configured. If CanIfBufferSize
(ECUC_CanIf_00834) equals 0, the CanIf Tx L-PDU only refers via this
CanIfBufferCfg the corresponding CanIfHthCfg.
Post-Build Variant true
Multiplicity
Multiplicity Pre-compile time X VARIANT-PRE-COMPILE
Configuration Class
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Configuration Parameters
No Included Containers
lowerMultiplicity = 0 lowerMultiplicity = 0
upperMultiplicity = * upperMultiplicity = *
CanIfBufferSize :
+parameter EcucIntegerParamDef
min = 0
max = 255
defaultValue = 0