AUTOSAR CAN Interface Specification R22-11
AUTOSAR CAN Interface Specification R22-11
AUTOSAR CP R22-11
Disclaimer
This work (specification and/or software implementation) and the material contained in
it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and the
companies that have contributed to it shall not be liable for any use of the work.
The material contained in this work is protected by copyright and other types of intel-
lectual property rights. The commercial exploitation of the material contained in this
work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by
any means, for informational purposes only. For any other purpose, no part of the work
may be utilized or reproduced, in any form or by any means, without permission in
writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Contents
1 Introduction and functional overview 11
3 Related documentation 16
3.1 Input documents & related standards and norms . . . . . . . . . . . . 16
3.2 Related specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4 Constraints and assumptions 18
4.1 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2 Applicability to car domains . . . . . . . . . . . . . . . . . . . . . . . . 18
5 Dependencies to other modules 19
5.1 Upper Protocol Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.2 Initialization: Ecu State Manager . . . . . . . . . . . . . . . . . . . . . 20
5.3 Mode Control: CAN State Manager . . . . . . . . . . . . . . . . . . . . 20
5.4 Lower layers: CAN Driver . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.5 Lower layers: CAN Transceiver Driver . . . . . . . . . . . . . . . . . . 21
5.6 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.7 File structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.7.1 Code file structure . . . . . . . . . . . . . . . . . . . . . . . . 23
5.7.2 Header file structure . . . . . . . . . . . . . . . . . . . . . . . 23
6 Requirements Tracing 24
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 . . . . . . . . . . . . . . . . . . . . . . . . 45
7.11.2 Buffer characteristics . . . . . . . . . . . . . . . . . . . . . . 46
[Link] Storage of L-PDUs in the transmit L-PDU buffer . . . 46
[Link] Clearance of transmit L-PDU buffers . . . . . . . . . 48
[Link] Initialization of transmit L-PDU buffers . . . . . . . . 48
7.11.3 Data integrity of transmit L-PDU buffers . . . . . . . . . . . . 48
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
References
[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:2015 – Road vehicles – Controller area network (CAN)
[13] Specification of ECU State Manager
AUTOSAR_SWS_ECUStateManager
[14] CiA 610-1 version 1.0.0 (DSP) - CAN XL specifications and test plans - Part 1:
Data link layer and physical coding sub-layer requirements
[Link]
[15] CiA 611-1 version 1.0.0 (DSP) - CAN XL higher layer functions - Part 1: Definition
of service data unit types
[Link]
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 CanDrv detects and processes events of the CAN Controllers and notifies those
to the CanIf.
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 (CanIf_TxConfirmation()), receive indica-
tion (CAN 2.0/FD CanIf_RxIndication(), CAN XL CanIf_XLRxIndication()
) and notification of a controller mode change CanIf_ControllerModeIndication
().
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 CanIfCtrlDrvCfg).
• Number of Hardware Object Handles. To supervise transmit requests the CAN
Interface needs to know the number of HTHs and the assignments between each
HTH and the corresponding CAN Controller (see CanIfHthCanCtrlIdRef;
CanIfHthIdSymRef).
• Range of received CAN IDs passing hardware acceptance filter for each hard-
ware object. The CAN Interface uses fixed assignments between HRHs and
L-PDUs to be received in the corresponding hardware object to conduct a search
algorithm (see section 7.20 “Software receive filter”, see CanIfHrhSoftware-
Filter, CanIfHrhCanCtrlIdRef, CanIfHrhIdSymRef)
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 connected
to one or multiple CAN networks. The following information is therefore retrieved from
the CAN communication matrix, part of the AUTOSAR system configuration (see
CanIfTxPduCfg, CanIfRxPduCfg):
[SWS_CANIF_00378] dCanIf shall access the location of the API of all used underly-
ing 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.
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
[RS_Ids_00810] Basic SW security events [SWS_CANIF_00913]
[SWS_CANIF_00915]
[SWS_CANIF_00916]
[SWS_CANIF_00917]
[SWS_CANIF_00918]
[SWS_CANIF_00919]
[SWS_CANIF_00920]
[SWS_CANIF_00921]
[SWS_CANIF_91008]
[SWS_CANIF_91009]
[SWS_CANIF_91010]
[SRS_BSW_00007] All Basic SW Modules written in C [SWS_CANIF_NA_00999]
language shall conform to the
MISRA C 2012 Standard.
[SRS_BSW_00010] The memory consumption of all [SWS_CANIF_NA_00999]
Basic SW Modules shall be
documented for a defined
configuration for all supported
platforms.
[SRS_BSW_00101] The Basic Software Module shall [SWS_CANIF_00001]
be able to initialize variables and
hardware in a separate
initialization function
[SRS_BSW_00159] All modules of the AUTOSAR [SWS_CANIF_NA_00999]
Basic Software shall support a tool
based configuration
[SRS_BSW_00164] The Implementation of interrupt [SWS_CANIF_NA_00999]
service routines shall be done by
the Operating System, complex
drivers or modules
[SRS_BSW_00167] All AUTOSAR Basic Software [SWS_CANIF_NA_00999]
Modules shall provide
configuration rules and constraints
to enable plausibility checks
[SRS_BSW_00168] SW components shall be tested by [SWS_CANIF_NA_00999]
a function defined in a common
API in the Basis-SW
[SRS_BSW_00170] The AUTOSAR SW Components [SWS_CANIF_NA_00999]
shall provide information about
their dependency from faults,
signal qualities, driver demands
[SRS_BSW_00172] The scheduling strategy that is [SWS_CANIF_NA_00999]
built inside the Basic Software
Modules shall be compatible with
the strategy used in the system
[SWS_CANIF_CONSTR_00001]
[SWS_CANIF_CONSTR_00002]
[SWS_CANIF_CONSTR_00003]
[SWS_CANIF_CONSTR_00004]
[SWS_CANIF_CONSTR_00005]
[SWS_CANIF_CONSTR_00006]
[SWS_CANIF_CONSTR_00007]
[SWS_CANIF_CONSTR_00008]
[SWS_CANIF_CONSTR_00009]
[SWS_CANIF_CONSTR_00010]
[SWS_CANIF_CONSTR_00011]
[SWS_CANIF_CONSTR_00012]
[SWS_CANIF_CONSTR_00013]
[SWS_CANIF_CONSTR_00014]
7 Functional specification
CanIf supports activation and deactivation of all L-PDUs belonging to one CAN Con-
troller for transmission as well as for reception (see 7.19.2, see CanIf_SetPdu-
Mode(), [SWS_CANIF_00008]). For L-PDU mode control refer to section 7.19.
Each L-PDU is associated with an upper layer module in order to ensure correct dis-
patching during reception, transmission confirmation, and data access. Each upper
layer module can use the L-PDUs to serve different CAN Controllers simultane-
ously.
According to the PDU architecture defined for the entire AUTOSAR communication
stack (see [7, Layered Software Architecture]), the usage of L-PDUs is split in two
different ways:
• For transmission request and transmission/reception polling API the upper layer
module uses the L-SDU ID (CanTxPduId/CanRxPduId) defined by CanIf as
parameter.
• For all callback APIs, which are invoked by CanIf at upper layer modules, CanIf
passes the target PduId defined by each upper layer module as parameter.
The principle is that the caller must use the defined target L-PDU/L-SDU Id of the
callee.
If power on initialization is not performed and upper layer performs transmit requests
to CanIf, no L-SDUs are transmitted to lower layer and DET shall be invoked. Thus,
no un-initialized data can be transmitted on the network. Behavior of L-PDU/L-SDU
transmitting function is specified in detail in subsection 8.3.6.
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.
to the corresponding upper layer modules. For more details please refer to section
7.20 “Software receive filter”.
[SWS_CANIF_00467] dCanIf shall configure and store an order on HTHs and
HRHs for all HOHs derived from the configuration containers CanIfHthCfg and Can-
IfHrhCfg.c()
[SWS_CANIF_00468] dCanIf shall reference a hardware acceptance filter for each
HOH derived from the configuration parameters CanIfHthIdSymRef and Can-
IfHrhIdSymRef.c()
The main difference between BasicCAN and FullCAN operation is in the need of a
software acceptance filtering mechanism (see section 7.20 “Software receive filter”).
[SWS_CANIF_00469] dCanIf shall give the possibility to configure and store a soft-
ware acceptance filter for each HRH of type BasicCAN configured by parameter Can-
IfHrhSoftwareFilter.c()
[SWS_CANIF_00211] dCanIf shall execute the software acceptance filter from
[SWS_CANIF_00469] for the HRH passed by callback function CanIf_RxIndica-
tion().c()
BasicCAN and FullCAN objects may coexist in a single configuration setup. Multiple
BasicCAN and FullCAN receive objects can be used, if provided by the underlying CAN
Controllers.
[SWS_CANIF_00877] dIf CanIf receives a L-PDU (see CanIf_RxIndication()
), it shall perform the following comparisons to select the correct reception L-SDU
configured in CanIfRxPduCfg:
• compare CanIfRxPduCanId with the passed Mailbox->CanId (Can_Id-
Type) excluding the two most significant bits
• compare CanIfRxPduCanIdType with the two most significant bits of the
passed Mailbox->CanId (Can_IdType)
c(SRS_Can_01140, SRS_Can_01141, SRS_Can_01162)
Basically, CanIf supports reception either of Standard CAN IDs or Extended CAN IDs
on one Physical CAN Channel by the parameters CanIfTxPduCanIdType and
CanIfRxPduCanIdType.
[SWS_CANIF_00281] dCanIf shall accept and handle StandardCAN IDs and Ex-
tendedCAN IDs on the same Physical Channel (= mixed mode operation).c(SRS_-
Can_01140)
In a mixed mode operation Standard CAN IDs and Extended CAN IDs can be used
mixed at the same time on the same CAN network. Mixed mode operation can be
accomplished, if the BasicCAN/FullCAN Hardware Objects have been configured
separately for either StandardCAN or ExtendedCAN operation using configuration pa-
rameters CanIfTxPduCanIdType and CanIfRxPduCanIdType. In case of mixed
mode 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
subsection 8.6.3).
Call of Can_Write()
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() or CanXL_Write().
[SWS_CANIF_00904] dIf Bus Mirroring is enabled globally (see CanIfBusMirror-
ingSupport) and has been activated with a call to CanIf_EnableBusMirroring
() for a CAN Controller, the CanIf shall store the content of each frame before it
is transmitted on that controller with Can_Write().c(SRS_Can_01172)
Note: The frame content should only be provided to the Bus Mirroring module when it
was actually sent. Therefore, the content has to be stored so that it can be provided to
the Bus Mirroring module from within the CanIf_TxConfirmation().
Note: In case the buffers provided by the hardware are not sufficient, the CAN XL
Driver might implement software buffers.
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_TxCon-
firmation>(). 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. De-
pending 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.
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] dThe CanIf shall support buffering of a CAN L-PDU for Ba-
sicCAN transmission in the CanIf, if parameter CanIfPublicTxBuffering (see
CanIfPublicTxBuffering) is enabled.c(SRS_Can_01020)
[SWS_CANIF_00849] dFor dynamic Transmit L-PDUs, also the CanId has to be
stored in the CanIfTxBuffer.c()
[SWS_CANIF_00381] dIf 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] dIf 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] dIf 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,
Receive Interrupt
[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»
Copy data to L-PDU
buffer
<User_RxIndication>() returns
CanIf_RxIndication() returns
called, the CanIf evaluates the CAN L-PDU for acceptance and prepares the L-SDU
for later access by the upper communication layers. The CanIf notifies upper layer
modules about this asynchronous event using <User_RxIndication>() (see sub-
subsection [Link] “<User_RxIndication>”, [SWS_CANIF_00012]), if configured and if
this CAN L-PDU is successfully detected and accepted for further processing. The
detailed requirements for this behavior follow here.
[SWS_CANIF_00906] dIf Bus Mirroring is enabled globally (see CanIfBusMirror-
ingSupport) and has been activated with a call to CanIf_EnableBusMirroring
() for a CAN Controller, the CanIf shall call Mirror_ReportCanFrame() for
each frame reception on that controller that is indicated with CanIf_RxIndication
().c(SRS_Can_01172)
[SWS_CANIF_00389] dIf the function CanIf_RxIndication() is called, the CanIf
shall process the Software Filtering on the received L-PDU, if configured (see multi-
plicity of CanIfHrhRangeCfg equals 0..∗). If Software Filtering rejects the received
L-PDU, the CanIf shall end the receive indication for that call of CanIf_RxIndica-
tion().c()
Note for [SWS_CANIF_00389]: See 7.20.
[SWS_CANIF_00390] dIf CanIf accepts an L-PDU received via CanIf_RxIndica-
tion() during Software Filtering (see [SWS_CANIF_00389]), CanIf shall process
the Data Length check afterwards, if configured (see CanIfPrivateDataLength-
Check and CanIfRxPduDataLengthCheck).c()
For further details, please refer to section 7.21 “Data Length Check”.
[SWS_CANIF_00297] dIf CanIf has accepted a L-PDU received via CanIf_-
RxIndication() during Data Length Check (see [SWS_CANIF_00390]), CanIf
shall copy the number of bytes according to the configured Data Length (see
ECUC_CanIf_00599) to the static receive buffer, if configured for that L-PDU
(see [SWS_CANIF_00198], ECUC_CanIf_00600).c()
[SWS_CANIF_00851] dIf MetaData item CAN_ID_32 is configured for a received L-
-SDU, CanIf shall copy the PDU payload to the static receive buffer and the CAN ID
to the MetaDataItem of type CAN_ID_32.c()
[SWS_CANIF_00056] dIf CanIf accepts a L-PDU received via CanIf_-
RxIndication() during Data Length Check (see [SWS_CANIF_00390],
[SWS_CANIF_00026]), CanIf shall identify if a target upper layer module was
configured (see configuration descrption of [SWS_CANIF_00012], CanIfRxPdu-
UserRxIndicationUL, CanIfRxPduUserRxIndicationName) to be called with
its providing receive indication service for the received L-SDU.c()
[SWS_CANIF_00135] dIf a target upper layer module was configured to be called with
its providing receive indication service (see [SWS_CANIF_00056]), the CanIf shall call
this configured receive indication callback service (see CanIfRxPduUserRxIndi-
cationName) and shall provide the parameters required for upper layer notification
CanIf provides services for controlling the communication mode of all supported
CAN Controllers represented by the underlying CanDrv. This means that all CAN
Controllers 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_SetCon-
trollerMode() or CanIf_ControllerBusOff(). CanIf does not decide if a re-
quested 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 transi-
tions.
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_GetCon-
trollerMode() 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] dIf 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() or CanXL_Write() and returns E_NOT_OK.c(SRS_-
Can_01162, SRS_Can_02003)
[SWS_CANIF_00485] dIf 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] dIf 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 CanIfPublicTx-
ConfirmPollingSupport 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_Trans-
mit(), either a positive or negative <User_TxConfirmation>() is called.
[SWS_CANIF_00724] dWhen callback CanIf_ControllerBusOff(Control-
lerId) is called, the CanIf shall call CanSM_ControllerBusOff(Control-
lerId) of the CanSm or a CDD (see [SWS_CANIF_00559], [SWS_CANIF_00560]).c
()
Note for [SWS_CANIF_00724]: See subsubsection [Link] “<User_ControllerMod-
eIndication>”.
[SWS_CANIF_00711] dWhen callback CanIf_ControllerModeIndication
(ControllerId, ControllerMode) is called, CanIf shall call CanSm_Con-
trollerModeIndication(ControllerId, ControllerMode) of the CanSm or
a CDD (see [SWS_CANIF_00691], [SWS_CANIF_00692]).c()
Note for [SWS_CANIF_00711]: See subsubsection [Link] “<User_ControllerMod-
eIndication>”.
[SWS_CANIF_00712] dWhen callback CanIf_TrcvModeIndication
(Transceiver, TransceiverMode) is called, CanIf shall call CanSM_-
TransceiverModeIndication(TransceiverId, TransceiverMode) of the
CanSm or a CDD (see [SWS_CANIF_00697], [SWS_CANIF_00698]).c()
Note for [SWS_CANIF_00712]: See subsubsection [Link] “<User_ControllerMod-
eIndication>”.
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 setting 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 transitions very fast, CanIf_-
ControllerModeIndication() can be called during CanIf_SetController-
Mode(). 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_Get-
ControllerMode().
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 corresponding CAN Con-
troller (CanIf_SetControllerMode()) and CAN Transceiver (CanIf_Set-
TrcvMode()) (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.
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 with listening), and CANIF_ONLINE (full communication). The default state is the
CANIF_OFFLINE mode.
[Link] CANIF_OFFLINE
shall set the PDU channel mode of the corresponding channel to CANIF_TX_OF-
FLINE.c()
[SWS_CANIF_00489] dFor Physical Channels switching to CANIF_TX_OFFLINE
mode CanIf shall:
• prevent forwarding of transmit requests CanIf_Transmit() of associated L-
-PDUs to CanDrv (return E_NOT_OK to the calling upper layer modules),
• clear the corresponding CanIf transmit buffers,
• prevent invocation of transmit confirmation callback services of the upper layer
modules.
• enable invocation of receive indication callback services of the upper layer mod-
ules.
c()
The BusOff notification is implicitly suppressed in case of CANIF_OFFLINE and
CANIF_TX_OFFLINE due to the fact, that no L-PDUs can be transmitted and thus
the CAN Controller is not able to go in BusOff mode by newly requested L-PDUs
for transmission.
[SWS_CANIF_00118] dIf those Transmit L-PDUs, which are already waiting for
transmission in the CAN Transmit Hardware Object, will be transmitted imme-
diately after change to CANIF_TX_OFFLINE or CANIF_OFFLINE mode and a subse-
quent BusOff event occurs, CanIf does not prohibit execution of the BusOff notifica-
tion <User_ControllerBusOff>(ControllerId).c()
The wake-up notification is not affected concerning PDU channel mode changes.
[Link] CANIF_ONLINE
[Link] 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
c()
CanDrv from the L-SDU passed in the APIs. The parameters have to be translated
accordingly: i.e. L-SDU => HTH/HRH, CanId, Data Length."
The support for multiple CanDrvs can be enabled and disabled by the configuration
parameter CanIfPublicMultipleDrvSupport.
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.
CanIf User «mod... Can_99_Ext1: «Peripheral» Can_99_Ext2: «Peripheral»
CanIf Can CanController A: Can CanController B:
CanController CanController
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()
CanIf_Transmit()
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 Length
<User_RxIndication>(PduIdType, 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()
• Due to different handling of possibly large CAN XL buffers with quite diverse
range of sizes, L-PDU transmission buffering within CanIf (see section 7.11)
is not available for CAN XL frames.
Instead of configuring all relevant CAN XL parameters for a CAN XL frame, some
parameters may also be passed as MetaData:
During reception, only those parameters are matched, that are configured for the cor-
responding CanIfRxPdu, while the not configured parameters shall be passed on to
the upper layer as MetaData.
During transmission, the actually used parameters are assembled from the passed
MetaData items and the parameters configured for the CanIfTxPdu.
[SWS_CANIF_00937] dWhen a CAN XL frame is received, the CAN XL parame-
ters configured as MetaData items of type PRIORITYID_16, VLAN_16, SDUTYPE_8,
and ACCEPTANCEFIELD_32 for the global PDU shall be extracted from the passed
CanXL_Params and collected into the MetaData of the PDU that is passed to the up-
per layer.c(SRS_Can_02003)
[SWS_CANIF_00938] dWhen a CAN XL frame shall be transmitted, the CanXL_-
Params shall be assembled from the CAN XL parameters passed as MetaData items
of type PRIORITYID_16, VLAN_16, SDUTYPE_8, and ACCEPTANCEFIELD_32 from
the upper layer, and the configured CanIfTxPduXLParams.c(SRS_Can_02003)
Please note: The configuration has to ensure that each CAN XL parameter of a re-
ceived or transmitted CAN XL frame is either configured or passed as MetaData, never
both. See also section 10.2.
c(RS_Ids_00810)
[SWS_CANIF_00913] dIf security event reporting has been enabled for the CanIf
module (CanIfEnableSecurityEventReporting = true) the respective security
events shall bereported to the IdsM via the interfaces defined in AUTOSAR_SWS_-
BSWGeneral.c(RS_Ids_00810)
[SWS_CANIF_00915] dIf CanIf_ErrorNotification() is called by CanDrv, the
function shall evaluate whether a Tx related error was detected. If this is the case the
CanIfshall report the security event CANIF_SEV_TX_ERROR_DETECTED.
The context data is structured as follows:
Context Data (2 Byte)
• ControllerID (1 Byte)
• CanError (1 Byte)
– CAN_ERROR_BIT_MONITORING1 (0x1)
– CAN_ERROR_BIT_MONITORING0 (0x2)
– CAN_ERROR_BIT (0x3)
– CAN_ERROR_CHECK_ACK_FAILED (0x4)
– CAN_ERROR_ACK_DELIMITER (0x5)
– CAN_ERROR_ARBITRATION_LOST (0x6)
– CAN_ERROR_OVERLOAD (0x7)
c(RS_Ids_00810)
[SWS_CANIF_00916] dIf CanIf_ErrorNotification() is called by CanDrv, the
function shall evaluate whether a Rx related error was detected. If this is the case the
CanIf shall report the security event CANIF_SEV_RX_ERROR_DETECTED.
The context data is structured as follows:
Context Data (2 Byte)
• ControllerID (1 Byte)
• CanError (1 Byte)
– CAN_ERROR_CHECK_FORM_FAILED (0x8)
– CAN_ERROR_CHECK_STUFFING_FAILED (0x9)
– CAN_ERROR_CHECK_CRC_FAILED (0xA)
– CAN_ERROR_BUS_LOCK (0xB)
c(RS_Ids_00810)
[SWS_CANIF_00917] dIf CanIf_ControllerErrorStatePassive() is called by
CanDrv, the CanIf shall report the security event CANIF_SEV_ERRORSTATE_PAS-
SIVE in following cases:
• TxErrorCounter > 127 and TxErrorCounter <= 255
• RxErrorCounter > 127 and TxErrorCounter <= 255
[SWS_CANIF_91006] d
Type of error Related error code Error value
API service called with invalid CAN ID CANIF_E_PARAM_CANID 10
API service called with invalid hardware object CANIF_E_PARAM_HOH 12
API service called with invalid PDU ID CANIF_E_PARAM_LPDU 13
API service called with invalid controller ID CANIF_E_PARAM_CONTROLLERID 15
API service called with invalid wakeup source CANIF_E_PARAM_WAKEUPSOURCE 16
API service called with invalid transceiver ID CANIF_E_PARAM_TRCV 17
API service called with invalid transceiver mode CANIF_E_PARAM_TRCVMODE 18
API service called with invalid transceiver wakeup CANIF_E_PARAM_TRCVWAKEUPMODE 19
mode
API service called with invalid pointer CANIF_E_PARAM_POINTER 20
API service called with invalid controller mode CANIF_E_PARAM_CTRLMODE 21
API service called with invalid PDU mode CANIF_E_PARAM_PDU_MODE 22
API services called with invalid parameter CANIF_E_PARAM_CAN_ERROR 23
API service used without module initialization CANIF_E_UNINIT 30
Transmit PDU ID invalid CANIF_E_INVALID_TXPDUID 50
Receive PDU ID invalid CANIF_E_INVALID_RXPDUID 60
CAN Interface initialisation failed CANIF_E_INIT_FAILED 80
c()
[SWS_CANIF_91007] d
Type of error Related error code Error value
Failed Data Length Check CANIF_E_INVALID_DATA_LENGTH 61
Data Length CANIF_E_DATA_LENGTH_MISMATCH 62
Transmit requested on offline PDU channel CANIF_E_STOPPED 70
Message length was exceeding the maximum CANIF_E_TXPDU_LENGTH_EXCEEDED 90
length
c()
8 API specification
8.2.1 CanIf_ConfigType
[SWS_CANIF_00144] d
Name CanIf_ConfigType
Kind Structure
Elements implementation specific
Type –
5
4
Comment The contents of the initialization 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.
Available via CanIf.h
c()
[SWS_CANIF_00523] dThe initialization data structure for a specific CanIf_Config-
Type shall include the definition of CanIf public parameters and the definition for each
L-PDU/L-SDU.c()
Note: The definition of CanIf public parameters and the definition for each L-PDU/
L-SDU are specified in chapter 10.
8.2.2 CanIf_PduModeType
[SWS_CANIF_00137] d
Name CanIf_PduModeType
Kind 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_ 0x02 Transmit path of the corresponding channel is
ACTIVE in offline active mode (see SWS_
CANIF_00072). The receive path is enabled.
This mode requires CanIfTxOfflineActive
Support = 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.
Available via CanIf.h
c()
8.2.3 CanIf_NotifStatusType
[SWS_CANIF_00201] d
Name CanIf_NotifStatusType
Kind Enumeration
Range CANIF_TX_RX_ – The requested Rx/Tx CAN L-PDU was
NOTIFICATION 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.
Available via CanIf.h
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 Interface for the further
processing.
Available via CanIf.h
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
Reentrancy Non Reentrant
Parameters (in) None
Parameters (inout) None
Parameters (out) None
Return value None
Description De-initializes the CanIf module.
Available via CanIf.h
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 transition.
ControllerMode Requested mode transition
Parameters (inout) None
Parameters (out) None
5
4
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.
Available via CanIf.h
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.
[SWS_CANIF_00308] dThe service CanIf_SetControllerMode() shall call
Can_SetControllerMode(Controller, Transition) for the requested CAN
controller.c()
[SWS_CANIF_00311] dIf parameter ControllerId of CanIf_SetController-
Mode() 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_SetControllerMode() is called.c(SRS_BSW_00323)
[SWS_CANIF_00774] dIf parameter ControllerMode of CanIf_SetController-
Mode() has an invalid value (not CAN_CS_STARTED, CAN_CS_SLEEP or CAN_CS_-
STOPPED), the CanIfshall report development error code CANIF_E_PARAM_CTRLMODE
to the Det_ReportError service of the DET module, when CanIf_SetCon-
trollerMode() is called.c(SRS_BSW_00323)
Note: The ID of the CAN controller is published inside the configuration description of
the CanIf.
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 operation mode.
Parameters (inout) None
Parameters (out) ControllerModePtr Pointer to a memory location, where the current mode of the CAN
controller will be stored.
5
4
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.
Available via CanIf.h
c(SRS_Can_01028)
[SWS_CANIF_00313] dIf parameter ControllerId of CanIf_GetController-
Mode() has an invalid, the CanIf shall report development error code CANIF_-
E_PARAM_CONTROLLERID to the Det_ReportError service of the DET, when
CanIf_GetControllerMode() is called.c(SRS_BSW_00323)
[SWS_CANIF_00656] dIf parameter ControllerModePtr of CanIf_GetCon-
trollerMode() has an invalid value, the CanIf shall report development error code
CANIF_E_PARAM_POINTER to the Det_ReportError service of the DET, when
CanIf_GetControllerMode() is called.c(SRS_BSW_00323)
Note: The ID of the CAN controller module is published inside the configuration de-
scription of the CanIf.
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 accepted.
Description This service calls the corresponding CAN Driver service for obtaining the error state of the CAN
controller.
Available via CanIf.h
c(SRS_Can_01169)
[SWS_CANIF_00898] dIf parameter ControllerId of CanIf_GetCon-
trollerErrorState() has an invalid value, the CanIf shall report develop-
ment error code CANIF_E_PARAM_CONTROLLERID 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 accepted.
Description Requests transmission of a PDU.
Available via CanIf.h
c(SRS_Can_01008)
Note: The corresponding CAN Controller and HTH have to be resolved by the Tx-
PduId.
[SWS_CANIF_00939] dWhen CanIf_Transmit() is called and the container CanI-
fTxPduCfg->CanIfTxPduXLParams is existing which indicates a CAN XL frame,
then CanXL_Write() shall be used for transmission. Otherwise Can_Write() shall
be used for transmission.c(SRS_Can_01162, SRS_Can_02003)
[SWS_CANIF_00317] dThe service CanIf_Transmit() shall not accept a transmit
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] dCanIf_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]
8.3.7 CanIf_ReadRxPduData
[SWS_CANIF_00194] d
Service Name CanIf_ReadRxPduData
Syntax Std_ReturnType CanIf_ReadRxPduData (
PduIdType CanIfRxSduId,
PduInfoType* CanIfRxInfoPtr
)
Service ID [hex] 0x06
Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) CanIfRxSduId Receive L-SDU handle specifying 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) CanIfRxInfoPtr Contains the length (SduLength) of the received PDU, a pointer
to a buffer (SduDataPtr) containing the PDU, and the MetaData
related to this PDU.
Return value Std_ReturnType E_OK: Request for L-SDU data has been accepted
E_NOT_OK: No valid data has been received
Description This service provides the Data Length and the received data of the requested CanIfRxSduId to
the calling upper layer.
Available via CanIf.h
c(SRS_Can_01125, SRS_Can_01129)
[SWS_CANIF_00324] dThe 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] dIf parameter CanIfRxSduId of CanIf_ReadRxPduData()
has an invalid value, e.g. not configured to be stored within CanIf via CanIfRxP-
duReadData, CanIf shall report development error code CANIF_E_INVALID_RX-
PDUID to the Det_ReportError service of the DET, when CanIf_ReadRxPdu-
Data() is called.c(SRS_BSW_00323)
8.3.8 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_NotifStatusType Current confirmation status of the corresponding 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.
Available via CanIf.h
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] dIf configuration parameters CanIfPublicReadTxPduNoti-
fyStatusApi and CanIfTxPduReadNotifyStatus 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] dIf parameter CanIfTxSduId of CanIf_ReadTxNotifSta-
tus() 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
8.3.9 CanIf_ReadRxNotifStatus
[SWS_CANIF_00230] d
Service Name CanIf_ReadRxNotifStatus
Syntax CanIf_NotifStatusType CanIf_ReadRxNotifStatus (
PduIdType CanIfRxSduId
)
Service ID [hex] 0x08
Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) CanIfRxSduId Receive L-SDU handle specifying 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_NotifStatusType Current indication status of the corresponding CAN Rx L-PDU.
Description This service returns the indication status (indication occurred or not) of a specific CAN Rx
L-PDU, requested by the CanIfRxSduId.
Available via CanIf.h
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] dIf configuration parameters CanIfPublicReadRxPduNoti-
fyStatusApi and CanIfRxPduReadNotifyStatus are set to TRUE, and if
CanIf_ReadRxNotifStatus() is called, then CanIf shall reset the notification sta-
tus for the received L-SDU.c()
[SWS_CANIF_00336] dIf parameter CanIfRxSduId of CanIf_ReadRxNotifSta-
tus() is out of range or if status for CanRxPduId was requested whereas CanIfRx-
PduReadData 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).
8.3.10 CanIf_SetPduMode
[SWS_CANIF_00008] d
Service Name CanIf_SetPduMode
Syntax Std_ReturnType CanIf_SetPduMode (
uint8 ControllerId,
CanIf_PduModeType PduModeRequest
)
Service ID [hex] 0x09
Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) ControllerId All PDUs of the own ECU connected to the corresponding CanIf
ControllerId, which is assigned to a physical CAN controller are
addressed.
PduModeRequest Requested PDU mode change
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: Request for mode transition has been accepted.
E_NOT_OK: Request for mode transition has not been accepted.
Description This service sets the requested mode at the L-PDUs of a predefined logical PDU channel.
Available via CanIf.h
c()
Note: The channel parameter denoting the predefined logical PDU channel can be
derived from parameter ControllerId of function CanIf_SetPduMode().
[SWS_CANIF_00341] dIf CanIf_SetPduMode() is called with invalid Control-
lerId, CanIf shall report development error code CANIF_E_PARAM_CONTROL-
LERID to the Det_ReportError service of the DET module.c(SRS_BSW_00323)
[SWS_CANIF_00860] dIf 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] dThe 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.11 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
Reentrancy Reentrant (Not for the same channel)
Parameters (in) ControllerId All PDUs of the own ECU connected to the corresponding CanIf
ControllerId, which is assigned to a physical CAN controller are
addressed.
Parameters (inout) None
Parameters (out) PduModePtr Pointer to a memory location, where the current mode of the
logical PDU channel will be stored.
Return value Std_ReturnType E_OK: PDU mode request has been accepted
E_NOT_OK: PDU mode request has not been accepted
Description This service reports the current mode of a requested PDU channel.
Available via CanIf.h
c()
[SWS_CANIF_00346] dIf CanIf_GetPduMode() is called with invalid Control-
lerId, CanIf shall report development error code CANIF_E_PARAM_CONTROL-
LERID to the Det_ReportError service of the DET module.c(SRS_BSW_00323)
[SWS_CANIF_00657] dIf CanIf_GetPduMode() is called with invalid PduModePtr,
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.12 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.
Available via CanIf.h
c(SRS_BSW_00407, SRS_BSW_00411)
8.3.13 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 requested CAN L-PDU.
Available via CanIf.h
c()
Note: CanIf_SetDynamicTxId() may be interrupted by CanIf_Transmit()
called by several modules in the communication stack. Therefore precautions for
preventing inconsistency need to be considered.
[SWS_CANIF_00944] dIf parameter CanIfTxSduId of CanIf_SetDynamicTxId()
refers to a CanIfTxPduCfg with CanIfTxPduXLParams, CanIf shall report devel-
opment error code CANIF_E_INVALID_TXPDUID to the Det_ReportError ser-
vice of the DET module, when CanIf_SetDynamicTxId() is called.c(SRS_Can_-
02003)
[SWS_CANIF_00352] dIf parameter CanIfTxSduId of CanIf_SetDynamicTxId
() has an invalid value, CanIf shall report development error code CANIF_E_IN-
VALID_TXPDUID to the Det_ReportError service of the DET module, when
CanIf_SetDynamicTxId() is called.c(SRS_BSW_00323)
[SWS_CANIF_00353] dIf 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_SetDynamic-
TxId() is called.c(SRS_BSW_00323)
[SWS_CANIF_00355] dIf CanIf was not initialized before calling CanIf_SetDynam-
icTxId(), then the function CanIf_SetDynamicTxId() shall not execute a recon-
figuration of Tx CanId.c()
8.3.14 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 accepted.
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.
Available via CanIf.h
c()
Note: For more details, please refer to the [2, Specification of CAN Transceiver Driver].
[SWS_CANIF_00358] dThe 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] dIf 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.15 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 accepted.
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.
Available via CanIf.h
c()
Note: For more details, please refer to the [2, Specification of CAN Transceiver Driver].
[SWS_CANIF_00363] dThe function CanIf_GetTrcvMode() shall call the function
CanTrcv_GetOpMode(Transceiver, OpMode) on the corresponding requested
CAN Transceiver Driver module.c()
8.3.16 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
Return value Std_ReturnType E_OK: Transceiver wake up reason request has been accepted.
E_NOT_OK: Transceiver wake up reason request has not been
accepted.
Description This service returns the reason for the wake up of the transceiver TransceiverId, via calling the
corresponding CAN Transceiver Driver service.
Available via CanIf.h
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] dThe 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] dIf parameter TransceiverId of CanIf_GetTrcvWake-
upReason() has an invalid value, the CanIf shall report development error code
CANIF_E_PARAM_TRCV to the Det_ReportError service of the DET module,
when CanIf_GetTrcvWakeupReason() is called.c(SRS_BSW_00323)
[SWS_CANIF_00649] dIf parameter TrcvWuReasonPtr of CanIf_GetTrcvWake-
upReason() has an invalid value, the CanIf shall report development error code
CANIF_E_PARAM_POINTER to the Det_ReportError service of the DET mod-
ule, 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.
[SWS_CANIF_00371] dConfiguration of CanIf_GetTrcvWakeupReason(): The
number of supported transceiver types for each network is set up in the configura-
tion phase (see CanIfTrcvCfg and CanIfTrcvDrvCfg). 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_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 notifications 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.
Available via CanIf.h
c(SRS_Can_01175)
Note: For more details, please refer to [2, Specification of CAN Transceiver Driver].
[SWS_CANIF_00372] dThe 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 CanNetwork,
the notification is executed within or immediately after the function CanTrcv_SetTr-
cvWakeupMode() (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_Set-
TrcvWakeupMode() 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] dIf parameter TransceiverId of CanIf_SetTrcvWakeup-
Mode() has an invalid value, the CanIf shall report development 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] dIf parameter TrcvWakeupMode of CanIf_SetTrcvWakeup-
Mode() has an invalid value, the CanIf shall report development error code CANIF_-
E_PARAM_TRCVWAKEUPMODE to the Det_ReportError service of the DET mod-
ule, when CanIf_SetTrcvWakeupMode() is called.c(SRS_BSW_00323)
[SWS_CANIF_00373] dConfiguration of CanIf_SetTrcvWakeupMode(): The num-
ber of supported transceiver types for each network is set up in the configuration phase
(see CanIfTrcvCfg and CanIfTrcvDrvCfg). 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.18 CanIf_CheckWakeup
[SWS_CANIF_00219] d
Service Name CanIf_CheckWakeup
Syntax Std_ReturnType CanIf_CheckWakeup (
EcuM_WakeupSourceType WakeupSource
)
Service ID [hex] 0x11
Sync/Async Asynchronous
Reentrancy Reentrant
Parameters (in) WakeupSource Source device, which initiated the wake up event: CAN controller
or CAN transceiver
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: Will be returned, if the check wake up request has been
accepted
E_NOT_OK: Will be returned, if the check wake up request has
not been accepted
5
4
Description This service checks, whether an underlying CAN driver or a CAN transceiver driver already
signals a wakeup event.
Available via CanIf.h
c()
Note: Integration Code calls this function
[SWS_CANIF_00398] dIf parameter WakeupSource of CanIf_CheckWakeup() has
an invalid value, CanIf shall report development error code CANIF_E_PARAM_WAKE-
UPSOURCE to the Det_ReportError service of the DET, when CanIf_Check-
Wakeup() 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).
8.3.19 CanIf_CheckValidation
[SWS_CANIF_00178] d
Service Name CanIf_CheckValidation
Syntax Std_ReturnType CanIf_CheckValidation (
EcuM_WakeupSourceType WakeupSource
)
Service ID [hex] 0x12
Sync/Async Synchronous
Reentrancy Reentrant
Parameters (in) WakeupSource Source device which initiated the wake-up event and which has to
be validated: CAN controller or CAN transceiver
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: Will be returned, if the check validation request has been
accepted.
E_NOT_OK: Will be returned, if the check validation request has
not been accepted.
Description This service is performed to validate a previous wakeup event.
Available via CanIf.h
c()
Note: Integration Code calls this function
[SWS_CANIF_00404] dIf parameter WakeupSource of CanIf_CheckValidation
() has an invalid value, the CanIf shall report development 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).
8.3.20 CanIf_GetTxConfirmationState
[SWS_CANIF_00734] d
Service Name CanIf_GetTxConfirmationState
Syntax CanIf_NotifStatusType CanIf_GetTxConfirmationState (
uint8 ControllerId
)
Service ID [hex] 0x19
Sync/Async Synchronous
Reentrancy Reentrant (Not for the same controller)
Parameters (in) ControllerId Abstracted CanIf ControllerId which is assigned to a CAN
controller
Parameters (inout) None
Parameters (out) None
Return value CanIf_NotifStatusType Combined TX confirmation status for all TX PDUs of the CAN
controller
Description This service reports, if any TX confirmation has been done for the whole CAN controller since
the last CAN controller start.
Available via CanIf.h
c()
[SWS_CANIF_00736] dIf parameter ControllerId of CanIf_GetTxConfirma-
tionState() 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] dConfiguration 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 CanIfPublic-
TxConfirmPollingSupport.c()
8.3.21 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.
Available via CanIf.h
c()
[SWS_CANIF_00766] dWithin CanIf_ClearTrcvWufFlag() the function
CanTrcv_ClearTrcvWufFlag() shall be called.c()
[SWS_CANIF_00769] dIf parameter TransceiverId of CanIf_ClearTrcvWuf-
Flag() has an invalid value, the CanIf shall report development error code CANIF_-
E_PARAM_TRCV to the Det_ReportError service of the DET module, when
CanIf_ClearTrcvWufFlag() is caled.c()
[SWS_CANIF_00771] dConfiguration of CanIf_ClearTrcvWufFlag(): Whether
the CanIf supports this function shall be pre compile time configurable On/Off by the
configuration parameter CanIfPublicPnSupport.c()
8.3.22 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
5
4
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.
Available via CanIf.h
c()
[SWS_CANIF_00765] dWithin CanIf_CheckTrcvWakeFlag() the function
CanTrcv_CheckWakeFlag() shall be called.c()
[SWS_CANIF_00770] dIf parameter TransceiverId of CanIf_CheckTrcvWake-
Flag() has an invalid value, the CanIf shall report development error code CANIF_-
E_PARAM_TRCV to the Det_ReportError service of the DET module, when
CanIf_CheckTrcvWakeFlag() is caled.c()
[SWS_CANIF_00813] dConfiguration of CanIf_CheckTrcvWakeFlag(): Whether
the CanIf supports this function shall be pre compile time configurable On/Off by the
configuration parameter CanIfPublicPnSupport.c()
8.3.23 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 ControllerId.
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 CanController
BaudRateConfigID)
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: Service request accepted, setting of (new) baud rate
started
E_NOT_OK: Service request not accepted
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.
Available via CanIf.h
c()
[SWS_CANIF_00868] dThe service CanIf_SetBaudrate() shall call Can_-
SetBaudrate(Controller, BaudRateConfigID) for the requested CAN Con-
troller.c()
8.3.24 CanIf_GetControllerRxErrorCounter
[SWS_CANIF_91003] d
Service Name CanIf_GetControllerRxErrorCounter
Syntax Std_ReturnType CanIf_GetControllerRxErrorCounter (
uint8 ControllerId,
uint8* RxErrorCounterPtr
)
Service ID [hex] 0x4d
Sync/Async Synchronous
Reentrancy Non Reentrant for the same ControllerId
Parameters (in) ControllerId Abstracted CanIf ControllerId which is assigned to a CAN
controller.
Parameters (inout) None
Parameters (out) RxErrorCounterPtr Pointer to a memory location, where the current Rx error counter
of the CAN controller will be stored.
Return value Std_ReturnType E_OK: Rx error counter available.
E_NOT_OK: Wrong ControllerId, or Rx error counter not
available.
Description This service calls the corresponding CAN Driver service for obtaining the Rx error counter of
the CAN controller.
Available via CanIf.h
c()
[SWS_CANIF_00907] dIf parameter ControllerId of CanIf_GetControllerRx-
ErrorCounter() 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_GetControllerRxErrorCounter() is called.c(SRS_BSW_00323)
[SWS_CANIF_00908] dIf parameter RxErrorCounterPtr of CanIf_GetCon-
trollerRxErrorCounter() is a null pointer, the CanIf shall report development
error code CANIF_E_PARAM_POINTER to the Det_ReportError service of the
DET, when CanIf_GetControllerRxErrorCounter() is called.c(SRS_BSW_-
00323)
8.3.25 CanIf_GetControllerTxErrorCounter
[SWS_CANIF_91004] d
Service Name CanIf_GetControllerTxErrorCounter
Syntax Std_ReturnType CanIf_GetControllerTxErrorCounter (
uint8 ControllerId,
uint8* TxErrorCounterPtr
)
Service ID [hex] 0x4e
Sync/Async Synchronous
Reentrancy Non Reentrant for the same ControllerId
Parameters (in) ControllerId Abstracted CanIf ControllerId which is assigned to a CAN
controller.
Parameters (inout) None
Parameters (out) TxErrorCounterPtr Pointer to a memory location, where the current Tx error counter
of the CAN controller will be stored.
Return value Std_ReturnType E_OK: Tx error counter available.
E_NOT_OK: Wrong ControllerId, or Tx error counter not
available.
Description This service calls the corresponding CAN Driver service for obtaining the Tx error counter of
the CAN controller.
Available via CanIf.h
c()
[SWS_CANIF_00909] dIf parameter ControllerId of CanIf_GetControllerTx-
ErrorCounter() 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_GetControllerTxErrorCounter() is called.c(SRS_BSW_00323)
[SWS_CANIF_00910] dIf parameter TxErrorCounterPtr of CanIf_GetCon-
trollerTxErrorCounter() is a null pointer, the CanIf shall report development
error code CANIF_E_PARAM_POINTER to the Det_ReportError service of the
DET, when CanIf_GetControllerTxErrorCounter() is called.c(SRS_BSW_-
00323)
8.3.26 CanIf_EnableBusMirroring
[SWS_CANIF_91005] d
Service Name CanIf_EnableBusMirroring
Syntax Std_ReturnType CanIf_EnableBusMirroring (
uint8 ControllerId,
boolean MirroringActive
)
Service ID [hex] 0x4c
Sync/Async Synchronous
Reentrancy Reentrant
5
4
Parameters (in) ControllerId Abstracted CanIf ControllerId which is assigned to a CAN
controller.
MirroringActive TRUE: Mirror_ReportCanFrame will be called for each frame
received or transmitted on the given controller. FALSE: Mirror_
ReportCanFrame will not be called for the given controller.
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: Mirroring mode was changed.
E_NOT_OK: Wrong ControllerId, or mirroring globally disabled
(see CanIfBusMirroringSupport).
Description Enables or disables mirroring for a CAN controller.
Available via CanIf.h
c()
[SWS_CANIF_00911] dIf Bus Mirroring is not enabled (see CanIfBusMirroring-
Support), the API CanIf_EnableBusMirroring() can be omitted.c(SRS_Can_-
01172)
[SWS_CANIF_00912] dIf parameter ControllerId of CanIf_EnableBusMirror-
ing() 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_EnableBusMirroring() is called.c(SRS_BSW_00323)
8.3.27 CanIf_GetCurrentTime
[SWS_CANIF_91014]{DRAFT} d
Service Name CanIf_GetCurrentTime (draft)
Syntax Std_ReturnType CanIf_GetCurrentTime (
uint8 Controller,
Can_TimeStampType* timeStampPtr
)
Service ID [hex] 0x51
Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) Controller Index of the addresses CAN controller.
Parameters (inout) None
Parameters (out) timeStampPtr current time stamp
Return value Std_ReturnType E_OK: successful
E_NOT_OK: failed
Description This service calls the corresponding CAN Driver service to retrieve the current time value out of
the HW registers.
Tags: [Link]=draft
Available via CanIf.h
c(SRS_Can_01181)
8.3.28 CanIf_EnableEgressTimeStamp
[SWS_CANIF_91011]{DRAFT} d
Service Name CanIf_EnableEgressTimeStamp (draft)
Syntax void CanIf_EnableEgressTimeStamp (
PduIdType TxPduId
)
Service ID [hex] 0x52
Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) TxPduId L-PDU handle of CAN L-PDU for which the time stamping shall
be enabled.
Parameters (inout) None
Parameters (out) None
Return value None
Description This service calls the corresponding CAN Driver service to activate egress time stamping on a
dedicated message object.
Tags: [Link]=draft
Available via CanIf.h
c(SRS_Can_01181)
[SWS_CANIF_00926]{DRAFT} dIf development error detection is enabled: the func-
tion shall check that the service CanIf_Init() was previously called. If the check
fails, the function shall raise the development error CANIF_E_UNINITc()
[SWS_CANIF_00927]{DRAFT} dIf development error detection is enabled: the func-
tion shall check the parameter TxPduId for being valid. If the check fails, the function
shall raise the development error CANIF_E_PARAM_LPDU.c()
[SWS_CANIF_00928]{DRAFT} dThe function shall be pre compile time configurable
On/Off by the configuration parameter: CanIfGlobalTimeSupportc()
8.3.29 CanIf_GetEgressTimeStamp
[SWS_CANIF_91012]{DRAFT} d
Service Name CanIf_GetEgressTimeStamp (draft)
Syntax Std_ReturnType CanIf_GetEgressTimeStamp (
PduIdType TxPduId,
Can_TimeStampType* timeStampPtr
)
Service ID [hex] 0x53
Sync/Async Synchronous
Reentrancy Non Reentrant for the same TxPduId, Reentrant for different TxPduId
Parameters (in) TxPduId L-PDU handle of CAN L-PDU for which the time stamp shall be
returned.
Parameters (inout) None
Parameters (out) timeStampPtr current time stamp
Return value Std_ReturnType E_OK: successful
E_NOT_OK: failed
Description This service calls the corresponding CAN Driver service to read back the egress time stamp on
a dedicated message object. It needs to be called within the TxConfirmation() function.
Tags: [Link]=draft
Available via CanIf.h
c(SRS_Can_01181)
[SWS_CANIF_00929]{DRAFT} dIf development error detection is enabled: the func-
tion shall check that the service CanIf_Init() was previously called. If the check
fails, the function shall raise the development error CANIF_E_UNINITc()
[SWS_CANIF_00930]{DRAFT} dIf development error detection is enabled: the func-
tion shall check the parameter TxPduId for being valid. If the check fails, the function
shall raise the development error CANIF_E_PARAM_LPDU.c()
[SWS_CANIF_00931]{DRAFT} dIf development error detection is enabled: the func-
tion shall check the parameter timeStampPtr for being valid. If the check fails, the
function shall raise the development error CANIF_E_PARAM_POINTER.c()
[SWS_CANIF_00932]{DRAFT} dThe function shall be pre compile time configurable
On/Off by the configuration parameter: CanIfGlobalTimeSupportc()
8.3.30 CanIf_GetIngressTimeStamp
[SWS_CANIF_91013]{DRAFT} d
Service Name CanIf_GetIngressTimeStamp (draft)
Syntax Std_ReturnType CanIf_GetIngressTimeStamp (
PduIdType RxPduId,
Can_TimeStampType* timeStampPtr
)
5
4
Service ID [hex] 0x54
Sync/Async Synchronous
Reentrancy Non Reentrant for the same RxPduId, Reentrant for different RxPduIds
Parameters (in) RxPduId ID of the received I-PDU for which the time stamp shall be
returned.
Parameters (inout) None
Parameters (out) timeStampPtr current time stamp
Return value Std_ReturnType E_OK: successful
E_NOT_OK: failed
Description This service calls the corresponding CAN Driver service to reads back the ingress time stamp
on a dedicated message object. It needs to be called within the RxIndication() function.
Tags: [Link]=draft
Available via CanIf.h
c(SRS_Can_01181)
[SWS_CANIF_00933]{DRAFT} dIf development error detection is enabled: the func-
tion shall check that the service CanIf_Init() was previously called. If the check
fails, the function shall raise the development error CANIF_E_UNINITc()
[SWS_CANIF_00934]{DRAFT} dIf development error detection is enabled: the func-
tion shall check the parameter RxPduId for being valid. If the check fails, the function
shall raise the development error CANIF_E_PARAM_LPDU.c()
[SWS_CANIF_00935]{DRAFT} dIf development error detection is enabled: the func-
tion shall check the parameter timeStampPtr for being valid. If the check fails, the
function shall raise the development error CANIF_E_PARAM_POINTER.c()
[SWS_CANIF_00936]{DRAFT} dThe function shall be pre compile time configurable
On/Off by the configuration parameter: CanIfGlobalTimeSupportc()
8.4.1 CanIf_TriggerTransmit
[SWS_CANIF_00883] d
Service Name CanIf_TriggerTransmit
Syntax Std_ReturnType CanIf_TriggerTransmit (
PduIdType TxPduId,
PduInfoType* PduInfoPtr
)
Service ID [hex] 0x41
5
4
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.
Parameters (out) None
Return value Std_ReturnType E_OK: SDU has been copied and SduLength indicates the
number of copied bytes.
E_NOT_OK: No SDU data has been copied. PduInfoPtr must not
be used since it may contain a NULL pointer or point to invalid
data.
Description Within this API, the upper layer module (called module) shall check whether the available data
fits into the buffer size reported by PduInfoPtr->SduLength. If it fits, it shall copy its data into the
buffer provided by PduInfoPtr->SduDataPtr and update the length of the actual copied data in
PduInfoPtr->SduLength. If not, it returns E_NOT_OK without changing PduInfoPtr.
Available via CanIf.h
c()
[SWS_CANIF_00884] dCanIf shall only provide the API function CanIf_Trigger-
Transmit() if TriggerTransmit support is enabled (CanIfTriggerTransmitSup-
port = TRUE).c()
[SWS_CANIF_00885] dThe function CanIf_TriggerTransmit() shall call the cor-
responding <User_TriggerTransmit>() function, passing the translated TxPduId
and the pointer to the PduInfo structure (PduInfoPtr). Upon return, CanIf_Trig-
gerTransmit() 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
Parameters (in) CanTxPduId L-PDU handle of CAN L-PDU successfully transmitted. This ID
specifies the corresponding CAN L-PDU ID and implicitly the
CAN Driver instance as well as the corresponding CAN controller
device.
Parameters (inout) None
Parameters (out) None
Return value None
Description This service confirms a previously successfully processed transmission of a CAN TxPDU.
Available via CanIf_Can.h
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 [16, Specification of ECU Configuration]: Within the service CanIf_TxConfirma-
tion(), CanDrv uses PduInfo->swPduHandle as CanTxPduId, which was pre-
served from Can_Write(Hth, *PduInfo) or CanXL_Write(Hth, *PduInfo).
[SWS_CANIF_00391] dIf configuration parameters CanIfPublicReadTxPduNoti-
fyStatusApi and CanIfTxPduReadNotifyStatus 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] dIf 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_TxCon-
firmation() is called.c(SRS_BSW_00323)
[SWS_CANIF_00412] dIf CanIf was not initialized before calling CanIf_TxConfir-
mation(), 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] dConfiguration of CanIf_TxConfirmation(): Each Tx L-
-PDU (see CanIfTxPduCfg) has to be configured with a corresponding transmit con-
firmation 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 Controller
PduInfoPtr Pointer to the received L-PDU
Parameters (inout) None
Parameters (out) None
5
4
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.
Available via CanIf_Can.h
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] dWithin the service CanIf_RxIndication() the CanIf
routes this indication to the configured upper layer target service(s).c()
[SWS_CANIF_00392] dIf configuration parameters CanIfPublicReadRxPduNoti-
fyStatusApi and CanIfRxPduReadNotifyStatus for the Received L-PDU are
set to TRUE, and if CanIf_RxIndication() is called, the CanIf shall set the notifi-
cation status for the Received L-PDU.c()
[SWS_CANIF_00416] dIf 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_RxIndica-
tion() is called.c(SRS_BSW_00323)
[SWS_CANIF_00417] dIf 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_RxIndi-
cation() 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]).
[SWS_CANIF_00419] dIf parameter PduInfoPtr or Mailbox of CanIf_RxIndi-
cation() 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_RxIndication() is called.c(SRS_BSW_00323)
[SWS_CANIF_00421] dIf CanIf was not initialized before calling CanIf_RxIndica-
tion(), CanIf shall not execute Rx indication handling, when CanIf_RxIndica-
tion(), is called.c()
Note: The call context of CanIf_RxIndication() is either on interrupt level (inter-
rupt mode) or on task level (polling mode).
[SWS_CANIF_00423] dConfiguration of CanIf_RxIndication(): Each Rx L-PDU
(see CanIfRxPduCfg) has to be configured with a corresponding receive indica-
tion service of an upper layer module (see [SWS_CANIF_00012]) which is called in
CanIf_RxIndication().c()
8.4.4 CanIf_XLRxIndication
[SWS_CANIF_91015] d
Service Name CanIf_XLRxIndication
Syntax void CanIf_XLRxIndication (
const CanXL_HwType* Mailbox,
const PduInfoType* PduInfoPtr
)
Service ID [hex] 0x55
Sync/Async Synchronous
Reentrancy Reentrant
Parameters (in) Mailbox Identifies the HRH and its corresponding CAN Controller
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 XL Rx L-PDU to the CanIf after
passing all filters and validation checks. It provides the CAN XL specific parameters besides
the hardware and actual L-PDU information.
Available via CanIf_Can.h
c()
Note: The service CanIf_XLRxIndication() is implemented in CanIf and called
by CAN XL Driver after a CAN XL L-PDU has been received. Depending on re-
ceived SDU Type this might indicate a content based CAN XL frame (SDU Type 01h)
or a tunneled CAN 2.0/FD frame (SDU Type 03h) or any arbitratry SDU Type handled
by a CDD. An exception to this are mapped tunneled 802.3 Ethernet frames (SDU Type
05h) which are already handled by CAN XL Driver itself and therefore not passed
through to CanIf. Please note that unmapped tunneled 802.3 Ethernet frames (SDU
Type 04h) are not handled by CAN XL Driver.
Note: The call context of CanIf_XLRxIndication() is either on interrupt level (in-
terrupt mode) or on task level (polling mode).
[SWS_CANIF_00945] dWithin the service CanIf_XLRxIndication() the CanIf
routes this indication to the configured upper layer target service(s).c(SRS_Can_-
02003)
[SWS_CANIF_00946] dIn case received SDU Type equals a content based CAN XL
frame (SDU Type 01h) the matching CanIfRxPduCfg shall be searched. In case it is
found, it shall be processed as configured, otherwise it shall be dropped.c(SRS_Can_-
02003)
[SWS_CANIF_00947] dIn case received SDU Type equals a tunneled CAN 2.0/FD
frame (Sdu Type 03h), CAN ID, DLC and payload shall be extracted and then handled
as defined in CanIf_RxIndication() after matching the the Priority ID and the
VCID as described in [SWS_CANIF_00952].c(SRS_Can_02003)
[SWS_CANIF_00948] dIn case received SDU Type does neither equals a content
based CAN XL frame (SDU Type 01h) or a tunneled CAN 2.0/FD frame (Sdu Type
03h), it shall not be further processed within CanIf. In case the matching CanIfRxP-
duCfg has configured CanIfRxPduCfg->CanIfRxPduUserRxIndicationUL equals CDD,
it shall be passed further containing MetaData to the configured <User_RxIndica-
tion>().c(SRS_Can_02003)
[SWS_CANIF_00949] dIf parameter Mailbox->Hoh of CanIf_XLRxIndication()
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_XLRxIndi-
cation() is called.c(SRS_Can_02003)
[SWS_CANIF_00950] dIf parameter PduInfoPtr, Mailbox or Mailbox->XL-
Params of CanIf_XLRxIndication() has an invalid value, CanIf shall report de-
velopment error code CANIF_E_PARAM_POINTER to the Det_ReportError service
of the DET module, when CanIf_RxIndication() is called.c(SRS_Can_02003)
8.4.5 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 corresponding CAN Controller
with the abstract CanIf ControllerId.
Available via CanIf_Can.h
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] dIf parameter ControllerId of CanIf_ControllerBusOff
() 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_ControllerBusOff() is called.c(SRS_BSW_00323)
[SWS_CANIF_00431] dIf CanIf was not initialized before calling CanIf_Con-
trollerBusOff(), CanIf shall not execute BusOff notification, when CanIf_Con-
trollerBusOff(), is called.c()
8.4.6 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 availability.
Parameters (inout) None
Parameters (out) None
Return value None
Description This service indicates that the transceiver is running in PN communication mode referring to the
corresponding CAN transceiver with the abstract CanIf TransceiverId.
Available via CanIf_CanTrcv.h
c()
[SWS_CANIF_00753] dIf 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] dIf parameter TransceiverId of CanIf_ConfirmPnAvail-
ability() 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()
[SWS_CANIF_00817] dIf CanIf was not initialized before calling CanIf_ConfirmP-
nAvailability(), CanIf shall not execute notification, when CanIf_ConfirmP-
nAvailability() is called.c()
Note: The call context of CanIf_ConfirmPnAvailability() is either on interrupt
level (interrupt mode) or on task level (polling mode).
8.4.7 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 referring to the
corresponding CAN transceiver with the abstract CanIf TransceiverId.
Available via CanIf_CanTrcv.h
c()
[SWS_CANIF_00757] dIf 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] dIf parameter TransceiverId of CanIf_ClearTrcvWuf-
FlagIndication() 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] dIf CanIf was not initialized before calling CanIf_ClearTr-
cvWufFlagIndication(), CanIf shall not execute notification, when CanIf_-
ClearTrcvWufFlagIndication() is called.c()
Note: The call context of CanIf_ClearTrcvWufFlagIndication() is either on
interrupt level (interrupt mode) or on task level (polling mode).
[SWS_CANIF_00808] dConfiguration of CanIf_ClearTrcvWufFlagIndication
(): This function shall be pre compile time configurable ON/OFF by the configuration
parameter CanIfPublicPnSupport.c()
8.4.8 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 abstract CanIf TransceiverId. This indication is used to
cope with the asynchronous transceiver communication.
Available via CanIf_CanTrcv.h
c()
[SWS_CANIF_00759] dIf 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] dIf parameter TransceiverId of CanIf_CheckTrcvWake-
FlagIndication() 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] dIf the CanIf was not initialized before calling CanIf_Check-
TrcvWakeFlagIndication(), 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).
[SWS_CANIF_00812] dConfiguration of CanIf_CheckTrcvWakeFlagIndication
(): This function shall be pre compile time configurable ON/OFF by the configuration
parameter CanIfPublicPnSupport.c()
8.4.9 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 corresponding CAN controller
with the abstract CanIf ControllerId.
Available via CanIf_Can.h
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] dIf parameter ControllerId of CanIf_ControllerMod-
eIndication() 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] dIf CanIf was not initialized before calling CanIf_Con-
trollerModeIndication(), CanIf shall not execute state transition 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.10 CanIf_TrcvModeIndication
[SWS_CANIF_00764] d
Service Name CanIf_TrcvModeIndication
Syntax void CanIf_TrcvModeIndication (
uint8 TransceiverId,
CanTrcv_TrcvModeType TransceiverMode
)
5
4
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 corresponding CAN
transceiver with the abstract CanIf TransceiverId.
Available via CanIf_CanTrcv.h
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] dIf parameter TransceiverId of CanIf_TrcvModeIndica-
tion() 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_-
TrcvModeIndication() is called.c()
[SWS_CANIF_00708] dIf CanIf was not initialized before calling CanIf_TrcvMod-
eIndication(), CanIf shall not execute state transition notification, 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] dConfiguration of CanIf_TrcvModeIndication(): ID of the
CAN Transceiver is published inside the configuration description of CanIf via pa-
rameter CanIfTrcvId.c()
[SWS_CANIF_00730] dConfiguration of CanIf_TrcvModeIndication(): If
transceivers are not supported (CanIfTrcvDrvCfg is not configured, see CanIfTr-
cvDrvCfg), CanIf_TrcvModeIndication() shall not be provided by CanIf.c()
8.4.11 CanIf_ControllerErrorStatePassive
[SWS_CANIF_91008] d
Service Name CanIf_ControllerErrorStatePassive
Syntax void CanIf_ControllerErrorStatePassive (
uint8 ControllerId,
uint16 RxErrorCounter,
uint16 TxErrorCounter
)
Service ID [hex] 0x4f
Sync/Async Synchronous
Reentrancy Reentrant
Parameters (in) ControllerId Abstracted CanIf ControllerId which is assigned to a CAN
controller.
RxErrorCounter Value of the Rx error counter
TxErrorCounter Value of the Tx error counter
Parameters (inout) None
Parameters (out) None
Return value void –
Description The function derives the ErrorCounterTreshold from RxErrorCounter/ TxErrorCounter values
and reports it to the IdsM as security event CANIF_SEV_ERRORSTATE_PASSIVE to the IdsM.
It also prepares the context data for the respective security event.
Available via CanIf_Can.h
c(RS_Ids_00810)
[SWS_CANIF_00919] dIf parameter ControllerId of CanIf_Con-
trollerErrorStatePassive() has an invalid value, the CanIf shall report
development error code CANIF_E_PARAM_CONTROLLERID to the Det_ReportEr-
ror service of the DET module when CanIf_ControllerErrorStatePassive()
is called.c(RS_Ids_00810)
8.4.12 CanIf_ErrorNotification
[SWS_CANIF_91009] d
Service Name CanIf_ErrorNotification
Syntax void CanIf_ErrorNotification (
uint8 ControllerId,
Can_ErrorType Can_ErrorType
)
Service ID [hex] 0x50
Sync/Async Synchronous
Reentrancy Reentrant
Parameters (in) ControllerId Abstracted CanIf ControllerId which is assigned to a CAN
controller.
Can_ErrorType Reported CAN error
Parameters (inout) None
5
4
Parameters (out) None
Return value void –
Description The function shall derive the bus error source rx or tx from the parameter CanError and report
the bus error as security event CANIF_SEV_TX_ERROR_DETECTED or CANIF_SEV_RX_
ERROR_DETECTED. It also prepares the context data for the respective security event.
Available via CanIf_Can.h
c(RS_Ids_00810)
[SWS_CANIF_00920] dIf parameter ControllerId of CanIf_ErrorNotifica-
tion() 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_ErrorNotification() is called.c(RS_Ids_00810)
[SWS_CANIF_00921] dIf parameter CanError of CanIf_ErrorNotification()
has an invalid value, the CanIf shall report development error code CANIF_E_-
PARAM_CAN_ERROR to the Det_ReportError service of the DET module, when
CanIf_ErrorNotification() is called.c(RS_Ids_00810)
Note: This section defines all interfaces, which are required to fulfill the core function-
ality of the module.
[SWS_CANIF_00040] d
API Function Header File Description
Can_GetControllerErrorState Can.h This service obtains the error state of the CAN
controller.
Can_GetControllerRxErrorCounter Can.h Returns the Rx error counter for a CAN controller.
This value might not be available for all CAN
controllers, in which case E_NOT_OK would be
returned.
Please note that the value of the counter might not
be correct at the moment the API returns it, because
the Rx counter is handled asynchronously in
hardware. Applications should not trust this value for
any assumption about the current bus state.
Can_GetControllerTxErrorCounter Can.h Returns the Tx error counter for a CAN controller.
This value might not be available for all CAN
controllers, in which case E_NOT_OK would be
returned.
Please note that the value of the counter might not
be correct at the moment the API returns it, because
the Tx counter is handled asynchronously in
hardware. Applications should not trust this value for
any assumption about the current bus state.
Can_SetControllerMode Can.h This function performs software triggered state
transitions of the CAN controller State machine.
Can_Write Can.h This function is called by CanIf to pass a CAN
message to CanDrv for transmission.
Det_ReportRuntimeError Det.h Service to report runtime errors. If a callout has
been configured then this callout shall be called.
SchM_Enter_CanIf_<ExclusiveArea> SchM_<Mip>.h Invokes the SchM_Enter function to enter a module
local exclusive area.
SchM_Exit_CanIf_<ExclusiveArea> SchM_<Mip>.h 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 Header File Description
Can_CheckWakeup Can.h This function checks if a wakeup has occurred for
the given controller.
Can_SetBaudrate Can.h This service shall set the baud rate configuration of
the CAN controller. Depending on necessary baud
rate modifications the controller might have to reset.
CanNm_RxIndication CanNm.h Indication of a received PDU from a lower layer
communication interface module.
CanNm_TxConfirmation CanNm.h The lower layer communication interface module
confirms the transmission of a PDU, or the failure to
transmit a PDU.
5
4
API Function Header File Description
CanSM_CheckTransceiverWakeFlag CanSM_CanIf.h This callback function indicates the CanIf_Check
Indication TrcvWakeFlag API process end for the notified CAN
Transceiver.
CanSM_ClearTrcvWufFlagIndication CanSM_CanIf.h This callback function shall indicate the CanIf_Clear
TrcvWufFlag API process end for the notified CAN
Transceiver.
CanSM_ConfirmPnAvailability CanSM_CanIf.h This callback function indicates that the transceiver
is running in PN communication mode.
CanSM_ControllerBusOff CanSM_CanIf.h This callback function notifies the CanSM about a
bus-off event on a certain CAN controller, which
needs to be considered with the specified bus-off
recovery handling for the impacted CAN network.
CanSM_ControllerModeIndication CanSM_CanIf.h This callback shall notify the CanSM module about a
CAN controller mode change.
CanSM_TransceiverModeIndication CanSM_CanIf.h This callback shall notify the CanSM module about a
CAN transceiver mode change.
CanTp_RxIndication CanTp.h Indication of a received PDU from a lower layer
communication interface module.
CanTp_TxConfirmation CanTp.h The lower layer communication interface module
confirms the transmission of a PDU, or the failure to
transmit a PDU.
CanTrcv_CheckWakeFlag CanTrcv.h Requests to check the status of the wakeup flag
from the transceiver hardware.
CanTrcv_CheckWakeup CanTrcv.h Service is called by underlying CANIF in case a
wake up interrupt is detected.
CanTrcv_GetBusWuReason CanTrcv.h Gets the wakeup reason for the Transceiver and
returns it in parameter Reason.
CanTrcv_GetOpMode CanTrcv.h Gets the mode of the Transceiver and returns it in
OpMode.
CanTrcv_SetOpMode CanTrcv.h Sets the mode of the Transceiver to the value Op
Mode.
CanTrcv_SetWakeupMode CanTrcv.h Enables, disables or clears wake-up events of the
Transceiver according to TrcvWakeupMode.
CanTSyn_RxIndication CanTSyn.h Indication of a received PDU from a lower layer
communication interface module.
CanTSyn_TxConfirmation CanTSyn.h The lower layer communication interface module
confirms the transmission of a PDU, or the failure to
transmit a PDU.
CanXL_Write CanXL.h This function is called by CanIf to pass a CAN XL
message to the CAN XL driver for transmission. It
provides the CAN XL specific parameters besides
the hardware handle and actual PDU information.
Det_ReportError Det.h Service to report development errors.
EcuM_ValidateWakeupEvent EcuM.h After wakeup, the ECU State Manager will stop the
process during the WAKEUP VALIDATION state/
sequence to wait for validation of the wakeup
[Link] API service is used to indicate to the ECU
Manager module that the wakeup events indicated
in the sources parameter have been validated.
IdsM_SetSecurityEventWithContext IdsM.h This API is the application interface to report
Data security events with context data to the IdsM.
J1939Nm_RxIndication J1939Nm.h Indication of a received PDU from a lower layer
communication interface module.
J1939Nm_TxConfirmation J1939Nm.h The lower layer communication interface module
confirms the transmission of a PDU, or the failure to
transmit a PDU.
5
4
API Function Header File Description
J1939Tp_RxIndication J1939Tp.h Indication of a received PDU from a lower layer
communication interface module.
J1939Tp_TxConfirmation J1939Tp.h The lower layer communication interface module
confirms the transmission of a PDU, or the failure to
transmit a PDU.
Mirror_ReportCanFrame Mirror.h Reports a received or transmitted CAN frame. All
received CAN frames that pass the hardware
acceptance filter are reported, independent of the
software filter configuration. Transmitted CAN
frames are reported when the transmission is
confirmed.
PduR_CanIfRxIndication PduR_CanIf.h Indication of a received PDU from a lower layer
communication interface module.
PduR_CanIfTxConfirmation PduR_CanIf.h The lower layer communication interface module
confirms the transmission of a PDU, or the failure to
transmit a PDU.
Xcp_CanIfRxIndication Xcp.h Indication of a received PDU from a lower layer
communication interface module.
Xcp_CanIfTxConfirmation Xcp.h The lower layer communication interface module
confirms the transmission of a PDU, or the failure to
transmit a PDU.
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.
[Link] <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.
Parameters (out) None
Return value Std_ReturnType E_OK: SDU has been copied and SduLength indicates the
number of copied bytes.
E_NOT_OK: No SDU data has been copied. PduInfoPtr must not
be used since it may contain a NULL pointer or point to invalid
data.
Description Within this API, the upper layer module (called module) shall check whether the available data
fits into the buffer size reported by PduInfoPtr->SduLength. If it fits, it shall copy its data into the
buffer provided by PduInfoPtr->SduDataPtr and update the length of the actual copied data in
PduInfoPtr->SduLength. If not, it returns E_NOT_OK without changing PduInfoPtr.
Available via configurable
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] dConfiguration 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] dConfiguration of <User_TriggerTransmit>(): The name
of the API <User_TriggerTransmit>() which is called by CanIf shall be con-
figured for CanIf by parameter CanIfTxPduUserTriggerTransmitName (see
CanIfTxPduUserTriggerTransmitName).c()
Note: If CanIfTxPduTriggerTransmit is not specified or FALSE, no upper layer
modules have to be configured for Trigger Transmit. Therefore, <User_Trigger-
Transmit>() will not be called and CanIfTxPduUserTxConfirmationUL as well
as CanIfTxPduUserTriggerTransmitName need not to be configured.
[Link] <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 transmission of a PDU, or the
failure to transmit a PDU.
Available via configurable
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] dConfiguration of <User_TxConfirmation>(): The upper
layer module, which provides this callback service, has to be configured by CanI-
fTxPduUserTxConfirmationUL. If no upper layer modules are configured for trans-
mit confirmation using <User_TxConfirmation>(), no transmit confirmation is ex-
ecuted.c()
[Link] <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.
Available via configurable
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
CanIfRxPduUserRxIndicationUL).
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] dConfiguration of <User_RxIndication>(): The upper layer
module, which provides this callback service, has to be configured by CanIfRxPdu-
UserRxIndicationUL.c()
[SWS_CANIF_00552] dConfiguration of <User_RxIndication>(): The name of
the API <User_RxIndication>() which will be called by CanIf shall be configured
for CanIf by parameter CanIfRxPduUserRxIndicationName.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, Can-
IfRxPduUserRxIndicationUL and CanIfRxPduUserRxIndicationName need
not to be configured.
[Link] <User_ValidateWakeupEvent>
[SWS_CANIF_00532] d
Service Name <User_ValidateWakeupEvent>
Syntax void <User_ValidateWakeupEvent> (
EcuM_WakeupSourceType sources
)
Sync/Async Synchronous
Reentrancy Non Reentrant (defined within providing upper layer module)
Parameters (in) sources Validated CAN wakeup events. Every CAN controller or CAN
transceiver can be a separate wakeup source.
5
4
Parameters (inout) None
Parameters (out) None
Return value None
Description This service indicates if a wake up event initiated from the wake up source (CAN controller or
transceiver) after a former request to the CAN Driver or CAN Transceiver Driver module is valid.
Available via configurable
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] dConfiguration of <User_ValidateWakeupEvent>(): If no
validation is needed, this API can be omitted by disabling CanIfPublicWake-
upCheckValidSupport.c()
[SWS_CANIF_00456] dConfiguration of <User_ValidateWakeupEvent>(): The
upper layer module which provides this callback service has to be configured by Can-
IfDispatchUserValidateWakeupEventUL, but:
• If no upper layer modules are configured for wake up notification using <User_-
ValidateWakeupEvent>(), no wake up notification needs to be configured.
CanIfDispatchUserValidateWakeupEventUL needs not to be configured.
• If wake up is not supported (CanIfCtrlWakeupSupport and CanIfTr-
cvWakeupSupport equal FALSE, CanIfDispatchUserValidateWakeu-
pEventUL is not configurable.
c()
[SWS_CANIF_00563] dConfiguration of <User_ValidateWakeupEvent>(): If
CanIfDispatchUserValidateWakeupEventUL is set to ECUM, CanIfDis-
patchUserValidateWakeupEventName must be EcuM_ValidateWakeu-
pEvent.c()
[SWS_CANIF_00564] dConfiguration of <User_ValidateWakeupEvent>(): If
CanIfDispatchUserValidateWakeupEventUL is set to CDD the name of the API
has to be configured via parameter CanIfDispatchUserValidateWakeupEvent-
Name.c()
[Link] <User_ControllerBusOff>
[SWS_CANIF_00014] d
Service Name <User_ControllerBusOff>
Syntax void <User_ControllerBusOff> (
uint8 ControllerId
)
Sync/Async Synchronous
Reentrancy Non Reentrant (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).
Available via configurable
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 configured up-
per layer module. It is called in case of a BusOff notification via CanIf_Controller-
BusOff() of the CanDrv. The delivered parameter ControllerId 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_Con-
trollerBusOff>() is performed only once in case of multiple BusOff events at CAN
Controller.
Configuration of <User_ControllerBusOff>()
[Link] <User_ConfirmPnAvailability>
[SWS_CANIF_00821] d
Service Name <User_ConfirmPnAvailability>
Syntax void <User_ConfirmPnAvailability> (
uint8 TransceiverId
)
Sync/Async Synchronous
Reentrancy Non Reentrant (defined within providing upper layer module)
Parameters (in) TransceiverId Abstract CanIf TransceiverId, which is assigned to a CAN
transceiver, which was checked for PN availability.
Parameters (inout) None
Parameters (out) None
Return value None
Description This service indicates that the CAN transceiver is running in PN communication mode.
Available via configurable
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_ConfirmPnAvailability>() is either on interrupt
level (interrupt mode) or on task level (polling mode).
Note: The callback service <User_ConfirmPnAvailability>() is in general re-
entrant for multiple CAN Controller usage, but not for the same CAN Controller
[SWS_CANIF_00823] dConfiguration of <User_ConfirmPnAvailability>():
The upper layer module, which is called (see [SWS_CANIF_00753]), has to be config-
urable by CanIfDispatchUserConfirmPnAvailabilityUL if CanIfPublicPn-
Support equals True.c()
[SWS_CANIF_00824] dConfiguration of <User_ConfirmPnAvailability>()
: The name of <User_ConfirmPnAvailability>() shall be configurable
by CanIfDispatchUserConfirmPnAvailabilityName if CanIfPublicPnSup-
port equals True.c()
[Link] <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 function 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.
Available via configurable
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] dConfiguration of <User_ClearTrcvWufFlagIndication>
(): The upper layer module, which is called (see [SWS_CANIF_00757]), has to be
configurable by CanIfDispatchUserClearTrcvWufFlagIndicationUL if Can-
IfPublicPnSupport equals True.c()
[Link] <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 function was called.
Parameters (inout) None
Parameters (out) None
Return value None
Description This service indicates that the wake up flag in the CAN transceiver is set. This function is called
in CanIf_CheckTrcvWakeFlagIndication.
Available via configurable
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] dConfiguration of <User_CheckTrcvWakeFlagIndica-
tion>(): The upper layer module, which is called (see [SWS_CANIF_00759]), has
to be configurable by CanIfDispatchUserCheckTrcvWakeFlagIndicationUL if
CanIfPublicPnSupport equals True.c()
[SWS_CANIF_00801] dConfiguration of <User_CheckTrcvWakeFlagIndica-
tion>(): The name of <User_CheckTrcvWakeFlagIndication>() shall be con-
figurable by CanIfDispatchUserCheckTrcvWakeFlagIndicationName if Can-
IfPublicPnSupport equals True.c()
[SWS_CANIF_00802] dConfiguration of <User_CheckTrcvWakeFlagIndica-
tion>(): It shall be configurable by CanIfPublicPnSupport, if CanIf supports
this service (False: not supported, True: supported)c()
[SWS_CANIF_00803] dConfiguration of <User_CheckTrcvWakeFlagIndica-
tion>(): If CanIfDispatchUserCheckTrcvWakeFlagIndicationUL is set to
CAN_SM, CanIfDispatchUserCheckTrcvWakeFlagIndicationName must be
CanSM_CheckTransceiverWakeFlagIndication.c()
[SWS_CANIF_00804] dConfiguration of <User_CheckTrcvWakeFlagIndica-
tion>(): If CanIfDispatchUserCheckTrcvWakeFlagIndicationUL is set to
CDD, the name of the service has to be configurable via parameter CanIfDis-
patchUserCheckTrcvWakeFlagIndicationName.c()
[Link] <User_ControllerModeIndication>
[SWS_CANIF_00687] d
Service Name <User_ControllerModeIndication>
Syntax void <User_ControllerModeIndication> (
uint8 ControllerId,
Can_ControllerStateType ControllerMode
)
Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) ControllerId Abstracted CanIf ControllerId which is assigned to a CAN
controller, at which a controller state transition occurred.
ControllerMode Notified CAN controller mode
Parameters (inout) None
Parameters (out) None
Return value None
Description This service indicates a CAN controller state transition to the corresponding upper layer module
(mainly the CAN State Manager module).
Available via configurable
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 configured up-
per layer module. It is called in case of a state transition notification via CanIf_-
ControllerModeIndication() of the CanDrv. The delivered parameter Con-
trollerId 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] dConfiguration of <User_ControllerModeIndication>()
: The upper layer module which provides this callback service has to be configured by
CanIfDispatchUserCtrlModeIndicationUL.c()
[SWS_CANIF_00690] dConfiguration of <User_ControllerModeIndication>()
: The name of <User_ControllerModeIndication>() which is called by CanIf
shall be configured for CanIf by parameter CanIfDispatchUserCtrlModeIndi-
cationName. This is only necessary if state transition notifications are configured via
CanIfDispatchUserCtrlModeIndicationUL.c()
[SWS_CANIF_00691] dConfiguration of <User_ControllerModeIndication>()
: If CanIfDispatchUserCtrlModeIndicationUL is set to CAN_SM, CanIfDis-
patchUserCtrlModeIndicationName must be CanSM_ControllerModeIndi-
cation.c()
[SWS_CANIF_00692] dConfiguration of <User_ControllerModeIndication>()
: If CanIfDispatchUserCtrlModeIndicationUL is set to CDD the name of the
function has to be configured via parameter CanIfDispatchUserCtrlModeIndi-
cationName.c()
[Link] <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
5
4
Parameters (in) TransceiverId Abstracted CanIf TransceiverId which is assigned to a CAN
transceiver, at which a transceiver state transition 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 corresponding upper layer
module (mainly the CAN State Manager module).
Available via configurable
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 configured upper
layer module. It is called in case of a state transition notification via CanIf_TrcvMod-
eIndication() of the CanTrcv. The delivered parameter Transceiver of the ser-
vice CanIf_TrcvModeIndication() is mapped (as configured) to the appropriate
parameter TransceiverId which will be passed to the upper layer module. The de-
livered parameter TransceiverMode of the service CanIf_TrcvModeIndication
() is mapped to the appropriate parameter TransceiverMode of <User_TrcvMod-
eIndication>().
Note: For different upper layer users different service names shall be used.
[SWS_CANIF_00694] dCaveats of <User_TrcvModeIndication>():
• The CanTrcv must be initialized after Power ON.
• The call context is either on task level (polling mode).
• This callback service is in general re-entrant for multiple CAN Transceiver us-
age, but not for the same CAN Transceiver.
c()
[SWS_CANIF_00695] dConfiguration of <User_TrcvModeIndication>(): The up-
per layer module which provides this callback service has to be configured by Can-
IfDispatchUserTrcvModeIndicationUL, but:
• If no upper layer modules are configured for transceiver mode indications using
<User_TrcvModeIndication>(), no transceiver mode indication needs to be
configured. CanIfDispatchUserTrcvModeIndicationUL needs not to be
configured.
• If transceivers are not supported (CanIfTrcvDrvCfg is not configured, Can-
IfDispatchUserTrcvModeIndicationUL is not configurable.
c()
If no upper layer modules are configured for state transition notifications using
<User_TrcvModeIndication>(), no state transition notification needs to be con-
figured.
[SWS_CANIF_00696] dConfiguration of <User_TrcvModeIndication>(): The
name of <User_TrcvModeIndication>() which will be called by CanIf shall be
configured for CanIf by parameter CanIfDispatchUserTrcvModeIndication-
Name. This is only necessary if state transition notifications are configured via Can-
IfDispatchUserTrcvModeIndicationUL.c()
[SWS_CANIF_00697] dConfiguration of <User_TrcvModeIndication>(): If
CanIfDispatchUserTrcvModeIndicationUL is set to CAN_SM, CanIfDis-
patchUserTrcvModeIndicationName must be CanSM_TransceiverMod-
eIndication.c()
[SWS_CANIF_00698] dConfiguration of <User_TrcvModeIndication>(): If Can-
IfDispatchUserTrcvModeIndicationUL is set to CDD the name of the API has
to be configured via parameter CanIfDispatchUserTrcvModeIndicationName.c
()
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*)
CanIf_Transmit()
Can_Write(Std_ReturnType, Can_HwHandleType,
const Can_PduType*)
Insert L-PDU in
transmit buffer()
CanIf_Transmit()
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.
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.
CanIf_Transmit(Std_ReturnType,
PduIdType, const PduInfoType*)
Can_Write(Std_ReturnType,
Can_HwHandleType, const Can_PduType*)
<CanIfUser>_CanIfTriggerTransmit(Std_ReturnType,
PduIdType, PduInfoType*)
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()
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*)
! "
<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*)
&
[L-PDU reception in BasicCAN]:
! Software filtering and L-PDU
' 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
! flag()
"#$%
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()
CanIf_SetControllerMode(Std_ReturnType, uint8,
Can_ControllerStateType)
Can_SetControllerMode(Std_ReturnType, uint8,
Can_ControllerStateType)
Disable Wakeup
interrupt, if supported()
<User_ControllerModeIndication>(uint8,
Can_ControllerStateType)
<User_ControllerModeIndication>() !! "
CanIf_ControllerModeIndication()
Can_SetControllerMode returns with E_OK()
CanIf_ControllerMode returns with E_OK()
[STARTED] CanIf_ControllerModeIndication(uint8,
Can_ControllerStateType)
<User_ControllerModeIndication>(uint8,
Can_ControllerStateType)
<User_ControllerModeIndication>()
CanIf_ControllerModeIndication()
[SLEEP]
Can_SetControllerMode returns with E_NOT_OK()
CanIf_SetControllerMode returns with E_NOT_OK() " # # $ "
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 CanIf_SetControllerMode
STARTED" mode of the (ControllerId, CAN_CS_STARTED) to request STARTED
desired CAN controller 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)
Reset
transmit
<User_ControllerBusOff>(uint8)
queue()
<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)
<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 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
upperMultiplicity = 1 CanIfRxPduCfg:
+container EcucParamConfContainerDef lowerMultiplicity = 0
+subContainer
upperMultiplicity = *
lowerMultiplicity = 0
upperMultiplicity = *
+subContainer +subContainer
CanIfTxPduCfg:
EcucParamConfContainerDef CanIfHrhRangeCfg:
EcucParamConfContainerDef
CanIfDispatchCfg: lowerMultiplicity = 0
+container EcucParamConfContainerDef lowerMultiplicity = 0
upperMultiplicity = *
upperMultiplicity = *
CanIfCtrlCfg: EcucParamConfContainerDef
CanIfCtrlDrvCfg:
EcucParamConfContainerDef +subContainer upperMultiplicity = *
+container
lowerMultiplicity = 1
lowerMultiplicity = 1
upperMultiplicity = *
CanIfTrcvDrvCfg: CanIfTrcvCfg:
EcucParamConfContainerDef EcucParamConfContainerDef
+container +subContainer
lowerMultiplicity = 0 lowerMultiplicity = 1
upperMultiplicity = * upperMultiplicity = *
10.1.1 CanIf
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfCtrlDrvCfg 1..* Configuration parameters for all the underlying CAN Driver
modules are aggregated under this container. For each CAN
Driver module a seperate instance of this container has to be
provided.
CanIfDispatchCfg 1 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.
5
4
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfInitCfg 1 This container contains the init parameters of the CAN Interface.
CanIfPrivateCfg 1 This container contains the private configuration (parameters) of
the CAN Interface.
CanIfPublicCfg 1 This container contains the public configuration (parameters) of
the CAN Interface.
CanIfTrcvDrvCfg 0..* This container contains the configuration (parameters) of all
addressed CAN transceivers by each underlying CAN
Transceiver Driver module. For each CAN transceiver Driver a
seperate instance of this container shall be provided.
CanIf: EcucModuleDef
CanIfPublicCfg:
upperMultiplicity = 1 +container EcucParamConfContainerDef
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
upperMultiplicity = 1 +subContainer
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
4
Description Selects the desired software filter mechanism for reception only. Each implemented
software filtering method is identified by this enumeration number.
Range: Types implemented software filtering methods
Multiplicity 1
Type EcucEnumerationParamDef
Range BINARY Selects Binary Filter method.
INDEX Selects Index Filter method.
LINEAR Selects Linear Filter method.
TABLE Selects Table Filter method.
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local
dependency: BasicCAN reception must be enabled by referenced parameter Can
HandleType of the CAN Driver module via CanIfHrhIdSymRef for at least one HRH.
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.
This container is only included and valid if TTCAN is supported
by the controller, enabled (see CanIfSupportTTCAN, ECUC_Can
If_00675), and used.
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 = 1
upperMultiplicity = 1
10.1.3 CanIfPublicCfg
4
Scope / Dependency scope: local
4
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: ECU
dependency: Can_HwHandleType
4
Description Enables and disables the buffering of transmit L-PDUs (rejected by the CanDrv) within
the CAN Interface module.
True: Enabled False: Disabled
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: ECU
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfSecurityEventRefs 0..1 Container for the references to IdsMEvent elements representing
the security events that the CanIf module shall report to the IdsM
in case the coresponding security related event occurs (and if
CanIfEnableSecurityEventReporting is set to "true"). The
standardized security events in this container can be extended
by vendor-specific security events.
Tags: [Link]=draft
CanIfPublicCfg: CanIfPublicReadRxPduDataApi:
+parameter
EcucParamConfContainerDef EcucBooleanParamDef
upperMultiplicity = 1 defaultValue = false
lowerMultiplicity = 1 +parameter CanIfPublicReadRxPduNotifyStatusApi:
EcucBooleanParamDef
defaultValue = False
+parameter CanIfPublicReadTxPduNotifyStatusApi:
EcucBooleanParamDef
defaultValue = False
+parameter CanIfPublicWakeupCheckValidSupport:
EcucBooleanParamDef
CanIfPublicMultipleDrvSupport:
defaultValue = False EcucBooleanParamDef
+parameter
defaultValue = True
+parameter CanIfVersionInfoApi:
EcucBooleanParamDef
CanIfDevErrorDetect:
defaultValue = false EcucBooleanParamDef
+parameter
defaultValue = false
+parameter CanIfPublicTxConfirmPollingSupport:
EcucBooleanParamDef CanIfPublicTxBuffering:
+parameter EcucBooleanParamDef
defaultValue = False
+parameter CanIfTriggerTransmitSupport:
EcucBooleanParamDef
CanIfTxOfflineActiveSupport:
defaultValue = true EcucBooleanParamDef
+parameter
defaultValue = False
CanIfSetBaudrateApi:
EcucBooleanParamDef CanIfPublicWakeupCheckValidByNM:
+parameter
defaultValue = False EcucBooleanParamDef
lowerMultiplicity = 0 defaultValue = false
upperMultiplicity = 1 lowerMultiplicity = 0
+parameter
upperMultiplicity = 1
+parameter CanIfBusMirroringSupport:
EcucBooleanParamDef CanIfPublicCddHeaderFile:
EcucStringParamDef
defaultValue = false
+parameter
minLength = 1
maxLength = 32
CanIfPublicPnSupport: lowerMultiplicity = 0
+parameter
EcucBooleanParamDef upperMultiplicity = *
defaultValue = false
+parameter CanIfWakeupSupport:
EcucBooleanParamDef
CanIfMetaDataSupport:
defaultValue = true
+parameter EcucBooleanParamDef
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1
+literal
CanIfPublicHandleTypeEnum: UINT8: EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
+literal
UINT16: EcucEnumerationLiteralDef
+parameter CanIfEnableSecurityEventReporting:
EcucBooleanParamDef
defaultValue = false
CanIfGlobalTimeSupport:
+parameter
EcucBooleanParamDef
CanIfSecurityEventRefs:
+subContainer EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 1
10.1.4 CanIfInitCfg
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfBufferCfg 0..* This container contains the Txbuffer configuration. Multiple
buffers with different sizes could be configured. If CanIfBuffer
Size (ECUC_CanIf_00834) equals 0, the CanIf Tx L-PDU only
refers via this CanIfBufferCfg the corresponding CanIfHthCfg.
5
4
Included Containers
Container Name Multiplicity Scope / Dependency
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.
The SHORT-NAME of "CanIfRxPduConfig" container itself
represents the symolic name of Receive L-PDU.
This L-SDU produces a meta data item of type CAN_ID_32, and,
depending on CanIfRxPduXLParams, meta data items of type
PRIORITYID_16, VLAN_16, SDUTYPE_8, and
ACCEPTANCEFIELD_32.
CanIfTxPduCfg 0..* This container contains the configuration (parameters) of a
transmit CAN L-PDU. It has to be configured as often as a
transmit CAN L-PDU is needed.
The SHORT-NAME of "CanIfTxPduConfig" container represents
the symolic name of Transmit L-PDU.
This L-SDU consumes a meta data item of type CAN_ID_32,
and, depending on CanIfTxPduXLParams, meta data items of
type PRIORITYID_16, VLAN_16, SDUTYPE_8, and
ACCEPTANCEFIELD_32.
CanIf: EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
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
4
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Configuration Parameters
4
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
dependency: This parameter shall only be configurable if CanIfPublicPnSupport equals
True.
4
Description Enables/disables truncation of PDUs that exceed the configured size.
Multiplicity 1
Type EcucBooleanParamDef
Default value true
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU
4
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Scope / Dependency scope: ECU
dependency: CanIfTxPduUserTriggerTransmitName requires CanIfTxPduUserTx
ConfirmationUL to be either PDUR or CDD.
4
XCP Extended Calibration Protocol
Post-Build Variant Multiplicity false
Post-Build Variant Value false
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Scope / Dependency scope: ECU
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfTTTxFrameTriggering 0..1 CanIfTTTxFrameTriggering is specified in the SWS TTCAN
Interface and defines Frame trigger for TTCAN transmission.
This container is only included and valid if TTCAN is supported
by the controller, enabled (see CanIfSupportTTCAN, ECUC_Can
If_00675), and a joblist is used.
CanIfTxPduXLParams 0..1 CAN XL parameters. Identifies the CanIfTxPduCfg as CAN XL
PDU.
CanIfTxPduCfg: CanIfTxPduReadNotifyStatus:
+parameter
EcucParamConfContainerDef EcucBooleanParamDef Pdu:
EcucParamConfContainerDef
lowerMultiplicity = 0 defaultValue = false
upperMultiplicity = * CanIfTxPduRef: +destination lowerMultiplicity = 0
+reference EcucReferenceDef upperMultiplicity = *
+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
lowerMultiplicity = 0
upperMultiplicity = 1 +literal
STANDARD_FD_CAN: EcucEnumerationLiteralDef
+literal
EXTENDED_FD_CAN: EcucEnumerationLiteralDef
CanIfTxPduId: CanIfTxPduUserTxConfirmationName:
+parameter EcucIntegerParamDef EcucFunctionNameDef
symbolicNameValue = true lowerMultiplicity = 0
min = 0 upperMultiplicity = 1
max = 4294967295 minLength = 1
+parameter
maxLength = 32
+parameter CanIfTxPduTruncation:
CanIfTxPduCanIdMask:
EcucBooleanParamDef
EcucIntegerParamDef
+parameter defaultValue = true
min = 0
lowerMultiplicity = 1
max = 3758096383
upperMultiplicity = 1
defaultValue = 3758096383
lowerMultiplicity = 0
upperMultiplicity = 1 CanIfTxPduPnFilterPdu:
+parameter
EcucBooleanParamDef
lowerMultiplicity = 0
+destination upperMultiplicity = *
CanIfTxPduBufferRef:
+reference EcucReferenceDef
+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
+subContainer CanIfTxPduXLParams:
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 1
10.1.6 CanIfTxPduXLParams
4
Scope / Dependency scope: local
No Included Containers
CanIfTxPduCfg:
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
+subContainer
CanIfXLPriorityId:
EcucIntegerParamDef
CanIfTxPduXLParams:
EcucParamConfContainerDef +parameter min = 0
max = 2047
lowerMultiplicity = 0
lowerMultiplicity = 0
upperMultiplicity = 1
upperMultiplicity = 1
CanIfXLVcid:
EcucIntegerParamDef
+parameter
min = 0
max = 255
lowerMultiplicity = 0
upperMultiplicity = 1
CanIfXLSduType:
EcucIntegerParamDef
+parameter
min = 0
max = 255
lowerMultiplicity = 0
upperMultiplicity = 1
+parameter CanIfXLAcceptanceField:
EcucIntegerParamDef
min = 0
max = 4294967295
lowerMultiplicity = 0
upperMultiplicity = 1
10.1.7 CanIfRxPduCfg
4
Description CAN Identifier of Receive CAN L-PDUs used by the CAN Interface. Exa: Software
Filtering. This parameter is used if exactly one Can Identifier is assigned to the Pdu. If
a range is assigned then the CanIfRxPduCanIdRange parameter shall be used.
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 Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU
4
EXTENDED_FD_CAN CAN FD frame with extended identifier (29 bits)
EXTENDED_NO_FD_CAN CAN 2.0 frame with extended identifier (29 bits)
STANDARD_CAN CAN 2.0 or CAN FD frame with standard
identifier (11 bits)
STANDARD_FD_CAN CAN FD frame with standard identifier (11 bits)
STANDARD_NO_FD_CAN CAN 2.0 frame with standard identifier (11 bits)
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
dependency: Not relevant if CanIfRxPduXLParams is configured and CanIfXLSduType
is not 3, otherwise mandatory.
4
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
4
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
dependency: CanIfPublicReadRxPduNotifyStatusApi must be enabled.
4
Post-Build Variant Multiplicity false
Post-Build Variant Value false
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Scope / Dependency scope: ECU
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfRxPduCanIdRange 0..1 Optional container that allows to map a range of CAN Ids to one
PduId.
CanIfRxPduXLParams 0..1 CAN XL parameters. Identifies the CanIfRxPduCfg as CAN XL
PDU.
CanIfTTRxFrameTriggering 0..1 CanIfTTRxFrameTriggering is specified in the SWS TTCAN
Interface and defines Frame trigger for TTCAN reception.
This container is only included and valid if TTCAN is supported
by the controller, enabled (see CanIfSupportTTCAN, ECUC_Can
If_00675), and a joblist is used for reception.
CanIfHrhCfg:
CanIfRxPduCfg: +reference CanIfRxPduHrhIdRef: +destination EcucParamConfContainerDef
EcucParamConfContainerDef EcucReferenceDef
lowerMultiplicity = 0
lowerMultiplicity = 0 upperMultiplicity = *
upperMultiplicity = *
CanIfRxPduReadNotifyStatus: +reference
+parameter
EcucBooleanParamDef
CanIfHrhIdSymRef:
defaultValue = false EcucChoiceReferenceDef
requiresSymbolicNameValue = true
Pdu:
EcucParamConfContainerDef
+reference +destination
CanIfRxPduRef:
lowerMultiplicity = 0
EcucReferenceDef
upperMultiplicity = *
+literal
CanIfRxPduUserRxIndicationUL: CAN_TP: EcucEnumerationLiteralDef
EcucEnumerationParamDef +literal
upperMultiplicity = 1 CDD: EcucEnumerationLiteralDef
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
lowerMultiplicity = 0 STANDARD_CAN: EcucEnumerationLiteralDef
upperMultiplicity = 1 +literal
+parameter EXTENDED_FD_CAN: EcucEnumerationLiteralDef
+literal
STANDARD_FD_CAN: EcucEnumerationLiteralDef
+literal
EXTENDED_NO_FD_CAN: EcucEnumerationLiteralDef
+literal
STANDARD_NO_FD_CAN: EcucEnumerationLiteralDef
+parameter
CanIfRxPduDataLengthCheck:
CanIfRxPduId: EcucBooleanParamDef
EcucIntegerParamDef
defaultValue = true
+parameter symbolicNameValue = true
upperMultiplicity = 1
lowerMultiplicity = 1
min = 0
max = 4294967295
CanIfRxPduDataLength:
+parameter EcucIntegerParamDef
min = 0
CanIfRxPduReadData: max = 2048
+parameter CanIfRxPduCanId:
EcucBooleanParamDef
EcucIntegerParamDef
defaultValue = false
min = 0
+parameter max = 536870911
lowerMultiplicity = 0
upperMultiplicity = 1
10.1.8 CanIfRxPduXLParams
4
Scope / Dependency scope: local
No Included Containers
CanIfRxPduCfg:
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
+subContainer
CanIfXLPriorityId:
CanIfRxPduXLParams: EcucIntegerParamDef
EcucParamConfContainerDef
+parameter
min = 0
lowerMultiplicity = 0 max = 2047
upperMultiplicity = 1 lowerMultiplicity = 0
upperMultiplicity = 1
CanIfXLVcid:
EcucIntegerParamDef
+parameter
min = 0
max = 255
lowerMultiplicity = 0
upperMultiplicity = 1
CanIfXLSduType:
EcucIntegerParamDef
+parameter
min = 0
max = 255
lowerMultiplicity = 0
upperMultiplicity = 1
+parameter CanIfXLAcceptanceField:
EcucIntegerParamDef
min = 0
max = 4294967295
lowerMultiplicity = 0
upperMultiplicity = 1
10.1.9 CanIfRxPduCanIdRange
No Included Containers
10.1.10 CanIfDispatchCfg
4
Post-build time –
Scope / Dependency scope: ECU
dependency: CanIfDispatchUserCheckTrcvWakeFlagIndicationUL, CanIfPublicPn
Support
4
Scope / Dependency scope: ECU
dependency: CanIfDispatchUserClearTrcvWufFlagIndicationUL, CanIfPublicPnSupport
4
Scope / Dependency scope: ECU
dependency: CanIfDispatchUserConfirmPnAvailabilityUL, CanIfPublicPnSupport
4
Scope / Dependency scope: ECU
dependency: CanIfDispatchUserCtrlBusOffUL
4
Multiplicity 0..1
Type EcucEnumerationParamDef
Range CAN_SM CAN State Manager
CDD Complex Driver
Post-Build Variant Multiplicity false
Post-Build Variant Value false
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Scope / Dependency scope: ECU
4
Type EcucEnumerationParamDef
Range CDD Complex Driver
ECUM ECU State Manager
Post-Build Variant Multiplicity false
Post-Build Variant Value false
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Scope / Dependency scope: ECU
No Included Containers
CanIfDispatchUserCtrlBusOffName:
CanIfDispatchCfg:
EcucFunctionNameDef
EcucParamConfContainerDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1
minLength = 1 CanIfDispatchUserValidateWakeupEventName:
maxLength = 32 EcucFunctionNameDef
+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
minLength = 1 CanIfDispatchUserTrcvModeIndicationName:
maxLength = 32 EcucFunctionNameDef
lowerMultiplicity = 0
+parameter
upperMultiplicity = 1
minLength = 1
maxLength = 32
+literal
CanIfDispatchUserCtrlModeIndicationUL:
CAN_SM: EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
lowerMultiplicity = 1 +literal
upperMultiplicity = 1 CDD: EcucEnumerationLiteralDef
+literal
CanIfDispatchUserTrcvModeIndicationUL: CAN_SM: EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
+literal
lowerMultiplicity = 0 CDD: EcucEnumerationLiteralDef
upperMultiplicity = 1
+parameter CanIfDispatchUserConfirmPnAvailabilityName:
EcucFunctionNameDef
CanIfDispatchUserClearTrcvWufFlagIndicationName:
lowerMultiplicity = 0
+parameter EcucFunctionNameDef
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
CanIfDispatchUserCheckTrcvWakeFlagIndicationUL: +literal
CAN_SM: EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
lowerMultiplicity = 0 +literal
upperMultiplicity = 1 CDD: EcucEnumerationLiteralDef
+literal
CanIfDispatchUserConfirmPnAvailabilityUL: CAN_SM: EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
lowerMultiplicity = 0 +literal
upperMultiplicity = 1 CDD: EcucEnumerationLiteralDef
10.1.11 CanIfCtrlCfg
No Included Containers
CanIf: EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanIfCtrlDrvCfg:
EcucParamConfContainerDef
lowerMultiplicity = 1
upperMultiplicity = *
+subContainer
CanIfCtrlId: EcucIntegerParamDef
+parameter +parameter
min = 0
max = 255
CanControllerId:
symbolicNameValue = true
EcucIntegerParamDef
upperMultiplicity = 1
lowerMultiplicity = 1
symbolicNameValue = true
min = 0
max = 255
+parameter CanIfCtrlWakeupSupport:
EcucBooleanParamDef
defaultValue = False
10.1.12 CanIfCtrlDrvCfg
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 = *
CanIfInitHohCfg:
EcucParamConfContainerDef
+reference CanIfCtrlDrvInitHohConfigRef: +destination
EcucReferenceDef lowerMultiplicity = 0
upperMultiplicity = *
10.1.13 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
lowerMultiplicity = 0 +subContainer
upperMultiplicity = * lowerMultiplicity = 1
upperMultiplicity = *
10.1.14 CanIfTrcvCfg
No Included Containers
CanIf: EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanIfTrcvDrvCfg:
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
+subContainer
CanIfTrcvCfg: CanIfTrcvWakeupSupport:
EcucParamConfContainerDef +parameter
EcucBooleanParamDef
lowerMultiplicity = 1 defaultValue = false
upperMultiplicity = *
CanIfTrcvId: EcucIntegerParamDef
+parameter
min = 0
max = 255
symbolicNameValue = true
+reference +parameter
CanTrcvWakeupSourceRef: CanTrcvChannelId:
EcucReferenceDef EcucIntegerParamDef
10.1.15 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.16 CanIfHthCfg
4
Description The parameter refers to a particular HTH object in the CanDrv configuration (see Can
HardwareObject or CanXLHardwareObject).
CanIf receives the following information of the CanDrv module by this reference:
• CanHandleType (only for CAN 2.0 and CAN FD)
• CanObjectId
Multiplicity 1
Type Choice symbolic name reference to [ CanHardwareObject, CanXLHardwareObject ]
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU
No Included Containers
CanIfInitHohCfg:
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
+subContainer
CanIfHthCfg: CanIfCtrlCfg:
EcucParamConfContainerDef +reference CanIfHthCanCtrlIdRef: +destination
EcucParamConfContainerDef
EcucReferenceDef
lowerMultiplicity = 0 upperMultiplicity = *
upperMultiplicity = * lowerMultiplicity = 1
CanIfHthIdSymRef: CanHardwareObject:
EcucChoiceReferenceDef +destination EcucParamConfContainerDef
+reference
requiresSymbolicNameValue = true lowerMultiplicity = 0
upperMultiplicity = *
CanXLHardwareObject:
+destination EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
10.1.17 CanIfHrhCfg
4
Post-build time X VARIANT-POST-BUILD
Configuration Parameters
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
CanIfHrhCfg: EcucParamConfContainerDef
EcucReferenceDef
EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 0 lowerMultiplicity = 1
upperMultiplicity = *
CanHardwareObject:
EcucParamConfContainerDef
+destination
CanIfHrhIdSymRef: lowerMultiplicity = 0
EcucChoiceReferenceDef upperMultiplicity = *
+reference
requiresSymbolicNameValue = true
+destination CanXLHardwareObject:
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
CanIfHrhSoftwareFilter:
+parameter EcucBooleanParamDef
defaultValue = True
CanIfHrhRangeCfg:
EcucParamConfContainerDef
+subContainer
lowerMultiplicity = 0
upperMultiplicity = *
10.1.18 CanIfHrhRangeCfg
4
Default value –
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
No Included Containers
CanIfHrhCfg:
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
CanIfHrhRangeRxPduUpperCanId:
EcucIntegerParamDef
+subContainer
min = 0
CanIfHrhRangeCfg: +parameter max = 536870911
EcucParamConfContainerDef 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.19 CanIfBufferCfg
4
Description This parameter defines the number of CanIf Tx L-PDUs which can be buffered in one
Txbuffer. If this value equals 0, the CanIf does not perform Txbuffering for the CanIf Tx
L-PDUs which are assigned to this Txbuffer. If CanIfPublicTxBuffering equals False,
this parameter equals 0 for all TxBuffer. If the CanHandleType of the referred HTH
equals FULL, this parameter equals 0 for this TxBuffer.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 255
Default value 0
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
dependency: CanIfPublicTxBuffering, CanHandleType
No Included Containers
lowerMultiplicity = 0 lowerMultiplicity = 0
upperMultiplicity = * upperMultiplicity = *
CanIfBufferSize:
+parameter EcucIntegerParamDef
min = 0
max = 255
defaultValue = 0
10.1.20 CanIfSecurityEventRefs
4
Link time –
Post-build time –
Scope / Dependency scope: local
No Included Containers
CanIfPublicCfg:
EcucParamConfContainerDef +parameter CanIfEnableSecurityEventReporting:
EcucBooleanParamDef
upperMultiplicity = 1
lowerMultiplicity = 1 defaultValue = false
+subContainer
CANIF_SEV_RX_ERROR_DETECTED:
+reference EcucReferenceDef +destination
lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true
CANIF_SEV_ERRORSTATE_PASSIVE:
+reference EcucReferenceDef +destination
lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true
CANIF_SEV_ERRORSTATE_BUSOFF:
+reference EcucReferenceDef +destination
lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true
(from IdsM)
MetaData item of type SDUTYPE_8 for the global PDU referenced via CanIfTxP-
duRef, or as [Link].c(SRS_Can_02003)
[SWS_CANIF_CONSTR_00005] dFor each CanIfRxPduCfg that contains CanI-
fRxPduXLParams, the CAN XL parameter Virtual CAN Network ID shall either
be configured as MetaData item of type VLAN_16 for the global PDU referenced via
CanIfRxPduRef, or as [Link].c(SRS_Can_02003)
[SWS_CANIF_CONSTR_00006] dFor each CanIfTxPduCfg that contains CanI-
fTxPduXLParams, the CAN XL parameter Virtual CAN Network ID shall either
be configured as MetaData item of type VLAN_16 for the global PDU referenced via
CanIfTxPduRef, or as [Link].c(SRS_Can_02003)
[SWS_CANIF_CONSTR_00007] dFor each CanIfRxPduCfg that contains CanI-
fRxPduXLParams where the [Link] is config-
ured but not set to 03h, the CAN XL parameter Acceptance Field shall either be
configured as MetaData item of type ACCEPTANCEFIELD_32 for the global PDU refer-
enced via CanIfRxPduRef, or as [Link]-
Field.c(SRS_Can_02003)
[SWS_CANIF_CONSTR_00008] dFor each CanIfTxPduCfg that contains CanI-
fTxPduXLParams where the [Link] is config-
ured but not set to 03h, the CAN XL parameter Acceptance Field shall either be
configured as MetaData item of type ACCEPTANCEFIELD_32 for the global PDU refer-
enced via CanIfTxPduRef, or as [Link]-
Field.c(SRS_Can_02003)
[SWS_CANIF_CONSTR_00009] dFor each CanIfRxPduCfg that contains CanI-
fRxPduXLParams where the [Link] is config-
ured as 03h, the CAN XL parameter Acceptance Field shall neither be config-
ured as MetaData item of type ACCEPTANCEFIELD_32 for the global PDU referenced
via CanIfRxPduRef, nor as [Link].c
(SRS_Can_02003)
[SWS_CANIF_CONSTR_00010] dFor each CanIfTxPduCfg that contains CanI-
fTxPduXLParams where the [Link] is config-
ured as 03h, the CAN XL parameter Acceptance Field shall neither be config-
ured as MetaData item of type ACCEPTANCEFIELD_32 for the global PDU referenced
via CanIfTxPduRef, nor as [Link].c
(SRS_Can_02003)
[SWS_CANIF_CONSTR_00011] dFor each CanIfRxPduCfg that contains CanI-
fRxPduXLParams where the [Link] is config-
ured but not set to 03h, the parameters CanIfRxPduCanId, CanIfRxPduCanId-
Type, and CanIfRxPduCanIdMask shall not be configured, and no MetaData item
of type CAN_ID_32 shall be configured for the global PDU referenced via CanIfRxP-
duRef.c(SRS_Can_02003)