Autosar Sws Caninterface
Autosar Sws Caninterface
Autosar Sws Caninterface
V5.0.0
R4.0 Rev 3
This specification 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 specification.
The material contained in this specification is protected by copyright and other types
of Intellectual Property Rights. The commercial exploitation of the material contained
in this specification requires a license to such Intellectual Property Rights.
This specification 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 specification may be utilized or reproduced, in
any form or by any means, without permission in writing from the publisher.
The AUTOSAR specifications have been developed for automotive applications only.
They have neither been developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Any such exemplary items are contained in the Specification Documents for
illustration purposes only, and they themselves are not part of the AUTOSAR
Standard. Neither their presence in such Specification Documents, nor any later
documentation of AUTOSAR conformance of products actually implementing such
exemplary items, imply that intellectual property rights covering such exemplary
items are licensed under the same rules as applicable to the AUTOSAR Standard.
Table of Contents
3 Related documentation...................................................................................... 15
3.1 Input documents......................................................................................... 15
3.2 Related standards and norms .................................................................... 16
4 Constraints and assumptions ............................................................................ 17
4.1 Limitations .................................................................................................. 17
4.2 Applicability to car domains........................................................................ 17
5 Dependencies to other modules........................................................................ 18
5.1 Upper Protocol Layers................................................................................ 19
5.2 Initialization: Ecu State Manager ................................................................ 19
5.3 Mode Control: CAN State Manager............................................................ 19
5.4 Lower layers: CAN Driver........................................................................... 19
5.5 Lower layers: CAN Transceiver Driver ....................................................... 20
5.6 Configuration .............................................................................................. 20
5.7 File structure .............................................................................................. 22
5.7.1 Code file structure ............................................................................... 22
5.7.2 Header file structure............................................................................ 22
5.8 Version check............................................................................................. 25
6 Requirements traceability .................................................................................. 27
Known Limitations
The CAN Interface module is located between the low level CAN device drivers (CAN
Driver and Transceiver Driver) and the upper communication service layers (i.e. CAN
State Manager, CAN Network Management, CAN Transport Protocol, PDU Router).
It represents the interface to the services of the CAN Driver for the upper
communication layers.
The CAN Interface module provides a unique interface to manage different CAN
hardware device types like CAN controllers and CAN transceivers used by the
defined ECU hardware layout. Thus multiple underlying internal and external CAN
controllers/CAN transceivers can be controlled by the CAN State Manager module
based on a physical CAN channel related view.
Manager
CANNM
PDU Router
PDU
Multi-
plexer CAN Transport
Protocol
CAN Interface
Communication drivers
SPI µC CAN
External
CAN controller
Figure 1 AUTOSAR CAN Layer Model (see [2])
The CAN Interface module 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 to is based on CAN L-PDUs,
whereas APIs for control and mode handling provides a CAN controller related view.
In case of transmit requests the CAN Interface module completes the L-PDU
transmission with corresponding parameters and relays the CAN L-PDU via the
appropriate CAN Driver to the CAN controller. At reception the CAN Interface module
distributes the received L-PDUs to the upper layer. The assignment between receive
L-PDU and upper layer is statically configured. At transmit confirmation the CAN
Interface is responsible for the notification of upper layers about successful
transmission.
The CAN Interface module provides CAN communication abstracted access to the
CAN Driver and CAN Transceiver Driver services for control and supervision of the
CAN network. The CAN Interface forwards downwards the status change requests
from the CAN State Manager to the lower layer CAN device drivers, and upwards the
CAN Driver / CAN Transceiver Driver events are forwarded by the CAN Interface
module to e.g. the corresponding NM module.
Terms: Description:
Buffer Fixed sized memory area for a single data unit (e.g. CAN ID, DLC,
SDU, etc.) is stored at a dedicated memory address in RAM.
CAN communication matrix Describes the complete CAN network:
Participating nodes
Definition of all CAN PDUs (identifier, DLC)
Source and Sinks for PDUs
CAN controller A CAN controller is a CPU on-chip or external standalone hardware
device. One CAN controller is connected to one physical channel.
CAN device driver Generic term of CAN Driver and CAN Transceiver Driver.
CAN hardware unit A CAN Hardware unit may consist of one or multiple CAN controllers
of the same type and one, two or multiple CAN RAM areas. The CAN
hardware unit is located on-chip or as external device. The CAN
hardware unit is represented by one CAN Driver.
CanIf Controller mode state This is not really a state machine, which may be influenced by
machine transmission requests. This is an image of the current abstracted state
of an appropriate CAN controller. The state transitions can only be
realized by UL modules like the CanSm or by external events like e.g.
if a BusOff occurred.
13 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
CanIf Receive L-PDU / CanIf L-PDU handle of which the direction is set to “lower to upper layer”.
Rx L-PDU
CanIf Receive L-PDU buffer / Single element RAM buffer located in the CAN Interface module to
CanIfRxBuffer store whole receive L-PDUs.
CanIf Transmit L-PDU / CanIf L-PDU handle of which the direction is set to “upper to lower layer”.
Tx L-PDU
CanIf Transmit L-PDU buffer Single CanIfTxBuffer element located in the CanIf to store one or
/ CanIfTxBuffer multiple CanIf Tx L-PDUs. If the buffersize of a single CanIfTxBuffer
element is set to 0, a CanIfTxBuffer element is only used to refer a
HTH.
Hardware object/ HW object A CAN hardware object is defined as a PDU buffer inside the CAN
RAM of the CAN hardware unit / CAN controller.
Hardware receive handle The Hardware Receive Handle (HRH) is defined and provided by the
(HRH) CAN Driver. Each HRH typically represents just one hardware object.
The HRH is used as a parameter by the CAN Interface Layer for i.e.
software filtering.
Hardware transmit handle The Hardware Transmit Handle (HTH) is defined and provided by the
(HTH) CAN Driver. Each HTH typically represents just one or multiple CAN
hardware objects that are configured as CAN hardware transmit buffer
pool.
Inner priority inversion Transmission of a high-priority L-PDU is prevented by the presence of
a pending low-priority L-PDU in the same transmit hardware object.
Integration Code Code that the Integrator needs to add to an AUTOSAR System, to
adapt non-standardized functionalities. Examples are Callouts of the
ECU State Manager and Callbacks of various other BSW modules.
The I/O Hardware Abstraction is called Integration Code, too.
Lowest In – First Out / LOFO This is a data storage procedure, whereas always the elements with
the lowest values will be extracted.
L-PDU handle The L-PDU handle is defined as integer type and placed inside the
CAN Interface layer. Typically, each handle represents an L-PDU,
which is a constant structure with information for Tx/Rx processing.
L-PDU channel group Group of CAN L-PDUs, which belong to just one underlying network.
Usually they are handled by one upper layer module.
Outer priority inversion A time gap occurs between two consecutive transmit L-PDUs.
In this case a lower priority L-PDU from another node can prevent
sending the own higher priority L-PDU. Here the higher priority L-PDU
cannot participate in arbitration during network access because the
lower priority L-PDU already won the arbitration.
Physical channel A physical channel represents an interface from a CAN controller to
the CAN Network. Different physical channels of the CAN hardware
unit may access different networks.
Tx request Transmit request to the CAN Interface module from a upper layer
module of the CanIf
3 Related documentation
3.1 Input documents
[1] List of Basic Software Modules
AUTOSAR_TR_BSWModuleList.pdf
4.1 Limitations
The CAN Interface can be used for CAN communication only and is specifically
designed to operate with one or multiple underlying CAN Drivers and CAN
Transceiver Drivers. Several CAN Driver modules covering different CAN hardware
units are represented by just one generic interface as specified in the CAN Driver
specification. 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. Other protocols
than CAN (i.e. LIN or FlexRay) are not supported.
ComServices
«realize»
«realize»
Com_Cbk «module»
«mandatory» Com
«optional» CanSM_Cbk
PduR_Com
«realize»
«realize»
«use
optionally»
«module» CanTp «module»
PduR «mandatory» CanTp
«realize»
«use
optionally» «use»
PduR_CanIf CanTp_Cbk
ComHwA
«use»
«use»
CanIf CanTrcv
«realize» «realize»
CanIf «module»
CanTrcv
«realize» «realize»
«use»
CanIf_Cbk CanTrcv_Cbk
ComDrivers
«mandatory»
Can
«realize»
«module»
Can
«use»
Hardware
«Peripheral»
CanController
The AUTOSAR BSW architecture indicates that the application data buffers are
located in the upper layer, to which they belong. Direct access to these buffers is
prohibited. The buffer location is passed by the CanIf from or to the CAN Driver
module (Abbr.: CanDrv) during transmission and reception. During execution of these
transmission/reception indication services buffer location is passed. Data integrity is
guaranteed by use of lock mechanisms each time the buffer has been accessed. See
[7.18 Data integrity].
The API used by the CanIf consists of notification services as basic agents for the
transfer of CAN related data (i.e. CAN DLC) to the target upper layer. The call
parameters of these services points to the information buffered in the CanDrv or they
refer directly to the CAN hardware.
The CanDrv provides a hardware abstracted access to the CAN controller only, but
control of operation modes is done in CanSm only.
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
underlying CAN controllers.
The CanIf provides notification services used by the CanDrv in all notifications
scenarios, for example: transmit confirmation (8.4.1 CanIf_TxConfirmation, see
[CANIF007), receive indication (8.4.2 CanIf_RxIndication, see [CANIF006), transmit
cancellation notification (8.4.3 CanIf_CancelTxConfirmation, see [CANIF101), BusOff
notification (8.4.4 CanIf_ControllerBusOff, see [CANIF218) and notification of a
controller mode change (8.4.8, see CANIF669).
In case of using multiple CanDrv serving different interrupt vectors these callback
services mentioned above must be re-entrant, refer to [7.25 Multiple CAN Driver
support]. Reentrancy of callback functions is specified in chapter 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 chapter 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 7.5 Physical channel view).
Each CanTrcv itself does operation mode control of the CAN transceiver device. The
CanIf just maps all APIs of several underlying Cantrcv to a unique one, thus CanSm
is able to trigger a transition of the corresponding CAN transceiver modes. No control
or handling functionality belonging to CanTrcv is done inside the CanIf.
The CanIf maps the following services of all underlying CanTrcvs to one unique
interface. These are further described in the CAN Transceiver Driver SWS (see
[9]Specification of CAN Transceiver Driver):
Unique CanTrcv mode request and read services to manage the operation
modes of each underlying CAN transceiver device.
Read service for CAN transceiver wake up reason support.
Mode request service to enable/disable/clear wake up event state of each
used CAN transceiver (CanIf_SetTrcvMode(), see CANIF287).
5.6 Configuration
The CanIf design is optimized to manage CAN protocol specific capabilities and
handling of the used underlying CAN controller.
20 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
The CanIf is capable to change the CAN configuration without a re-build. Therefore
the function CanIf_Init (see [CANIF001) retrieves the required CAN configuration
information from configuration containers and parameters, which are specified (linked
as references, or additional parameters) in chapter 10, see Figure 32 Overview about
CAN Interface configuration containers
. This section gives a summary of the retrieved information, e.g.:
Number of CAN controllers. The number of CAN controllers is necessary for
dispatching of transmit and receive L-PDUs and for the control of the status of
the available CAN Drivers (see CanIfCanControllerIdRef).
Number of hardware object handles. To supervise transmit requests the CAN
Interface needs to know the number of HTHs and the assignments between
each HTH and the corresponding CAN controller (see
CANIF_HTH_CAN_CONTROLLER_ID_REF, CANIF625_Conf;
CANIF_HTH_ID_SYMREF, CANIF627_Conf).
Range of received CAN IDs passing hardware acceptance filter for each
hardware object. The CAN Interface uses fixed assignments between HRHs
and L-PDUs to be received in the corresponding hardware object to conduct a
search algorithm (see 7.21 Software receive filter, see
CANIF_SOFTWARE_FILTER_HRH,
CANIF_HRH_CAN_CONTROLLER_ID_REF, CANIF_HRH_ID_SYMREF,
CANIF634_Conf)
The CanIf needs information about all used upper communication service layers and
L-PDUs to be dispatched. The following information has to be set up at configuration
time for integration of the CanIf inside the AUTOSAR COM stack:
Transmitting upper layer module and transmit I-PDU for each transmit L-PDU.
=> Used for dispatching of transmit confirmation services (see
CANIF_CANTXPDUID, CANIF247_Conf).
Receiving upper layer module and receive I-PDU for each receive L-PDU.
=> Used for L-PDU dispatching during receive indication (see
CANIF_CANRXPDUID, CANIF249_Conf).
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 containers: CanIfTxPduConfig, CANIF248_Conf;
CanIfRxPduConfig, CANIF249_Conf):
[CANIF374] ⌈The code file structure shall not be defined within this specification
completely. Here it shall be pointed out that the code-file structure shall include the
following files named:
CanIf_Lcfg.c – for link time configurable parameters.
CanIf_PBcfg.c – for post build time configurable parameters.
These files shall contain all link time and post-build time configurable parameters.⌋
(BSW00380)
[CANIF377] ⌈The CanIf shall access the location of the API of all used underlying
CanDrvs for pre-compile time configuration either by using of external declaration in
includes of all CanDrvs public header files can_<x>.h or by the code file
CanIf_Cfg.c. ⌋()
[CANIF378] ⌈The CanIf shall access the location of the API of all used underlying
CanDrvs for link time configuration by a set of function pointers for each CanDrv.⌋()
The values for the function pointers for each CanDrv are given at link time.
Rationale for CANIF377 and CANIF378: The API of all used underlying CanDrv must
be known at the latest at link-time.
[CANIF116] ⌈ The CanIf shall offer a header file CanIf.h, which contains the
declaration of the CanIf API.. ⌋()
Constants, global data types and functions that are only used by the CanIf internally,
are declared within CanIf.c.
[CANIF643] ⌈The generic type definitions of the CanIf which are described in chapter
8.2 shall be performed in the header file CanIf_Types.h. This file has to be
included in the header file CanIf.h.⌋()
Dem_IntErrId.h Std_Types.h
(Event Id Symbols)
Can_GeneralTypes.h
ComStack_Types.h
Dem.h
CAN Interface
optional
MemMap.h CanIf.h
<Module>_CanIf.h CanIf.c
optional
Can_<vID>_<V specific name>.c
PduR_Cfg.h
CanNm_Cfg.h
optional
CanTp_Cfg.h
Can_<vID>_<V specific name>.h
Description:
X Y This means that file X includes file Y.
‘V’ stands for Vendor: <vID> == <vendorID>; <V specific name> == <Vendor specific name>
[CANIF121] ⌈The CanIf shall provide a header file CanIf_Cbk.h, which declares
the callback functions called by the CanDrv.⌋()
[CANIF122] ⌈The CanIf shall include necessary configuration data by the header
files:
CanIf.h – for declaration of the provided interface functions
CanIf_Cfg.h – for pre-compile time configurable parameters and
CanIf_Lcfg.h – for link build time configurable parameters
CanIf_PBcfg.h – for post build time configurable parameters⌋
(BSW00381, BSW00412)
[CANIF208] ⌈The CanIf shall include the following header files <Module>_CanIf.h
of those upper layer modules, from which declarations of only CanIf specific API
services or type definitions are needed:
PduR_CanIf.h – for services and callback declarations of the PduR
SchM_CanIf.h –for services and callback declarations of the SchM
⌋(BSW00415)
[CANIF233] ⌈The CanIf shall include the following header files <Module>_Cbk.h, in
which the callback functions called by the CanIf at the upper layers are declared:
CanSM_Cbk.h – for callback declarations of the CanSm
CanNm_Cbk.h – for callback declarations of the CanNm
CanTp_Cbk.h – for callback declarations of the CanTp
24 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
EcuM_Cbk.h – for callback declarations of the EcuM
<CDD>_Cbk.h – for callback declarations of CDD; <CDD> is
configurable via parameter
CANIF_CDD_HEADERFILE (see CANIF671_Conf)
⌋()
[CANIF280] ⌈The CanIf shall include the following header files <Module>_Cfg.h,
which contain the configuration data used by the CanIf:
Can_<vendorID>_<Vendor specific name><driver
abbreviation>_Cfg.h
– for configuration data of the CanDrv
(e.g.: Can_99_Ext1_Cfg.h)
CanTrcv_<Vendor Id>_<Vendor specific name><driver
abbreviation>_Cfg.h
– for configuration data of the CanTrcv
(e.g.: CanTrcv_99_Ext1_Cfg.h)
PduR_Cfg.h – for PduR configuration data (e.g. PduR target
PDU Ids)
CanNm_Cfg.h – for CanNm configuration data (e.g. CanNm target
PDU Ids)
CanTp_Cfg.h – for CanTp configuration data (e.g. CanTp target
PDU Ids)
Xcp_Cfg.h - for XCP configuration data (e.g. XCP target PDU
Ids)⌋()
By this way, reporting production errors as well as the required Event Id symbols are
included. This specification defines the name of the Event Id symbols (see error table
in chapter 7.27 Error classification), which are provided by XML to the DEM
configuration tool. The DEM configuration tool assigns ECU dependent values to the
Event Id symbols and publishes the symbols in Dem_IntErrId.h.
[CANIF278] ⌈The CanIf shall include the file MemMap.h in case the mapping of code
and data to specific memory sections via memory mapping file is needed for CanIf
implementation.⌋()
[CANIF021] ⌈The CanIf shall perform Inter Module Checks to avoid integration of
incompatible files.
The imported included files shall be checked by preprocessing directives. ⌋(BSW004)
If the values are not identical to the expected values, an error shall be reported.
Hint: The CanIf files check the consistency between the header, C and configuration
files during compilation according to BSW004 General Requirements on Basic
Software Modules [3]. The CanIf’s implementer shall avoid the integration of
incompatible files. Minimum implementation is the version check of the header file.
6 Requirements traceability
Requirement Satisfied by
[BSW01033] Basic Software General Fulfilled by this chapter.
Requirements
[BSW01125] Data throughput read direction CANIF194
[BSW01126] Data throughput write direction CANIF381, CANIF382
[BSW01139] CAN Controller specific Initialization Not applicable
[BSW01129] Receive Data Interface for CAN Subchapter 7.16 Read received data, subchapter
Interface and CAN Driver Module 8.3.6 CanIf_ReadRxPduData, CANIF194
[BSW01121] Interfaces of the CAN Interface Subchapter 5.4 Lower layers: CAN Driver,
module subchapter 5.5 Lower layers: CAN Transceiver
Driver
[BSW01014] Network configuration abstraction Not applicable
7 Functional specification
Initialization
Transmit request services
Transmit confirmation services
Reception indication services
Controller mode control services
PDU mode control services
i. Interrupt mode
The CanDrv processes interrupts triggered by the CAN controller. The CanIf,
which is event based, is notified when the event occurs. In this case the relevant
CanIf services is called within the corresponding ISRs in the CanDrv.
This specification describes a unique interface, which is valid for all three types of
operation modes. Summarized the CanIf works in the same way, either if any events
are processed on interrupt, task level or mixed. The only difference is the call context
and probably the way of interruption of the notifications: pre-emptive or co-operative.
All services are performed in accordance with the configuration.
Rationale for CANIF023: The CanIf remains independent of hardware, because the
CanDrv interfaces are called with HOH parameters, which abstract from the concrete
CAN hardware buffer properties.
Each CAN controller can provide multiple CAN transmit hardware objects in the CAN
mailbox. These can be logically linked to one entire pool of hardware objects
(multiplexed hardware objects) and thus addressed by one HTH.
CANIF662: The CanIf shall use two types of HOHs to enable access to the CanDrv:
Hardware Transmit Handle (HTH) and
Hardware Receive Handle (HRH).
[CANIF665] ⌈ The HRH shall enable the CanIf to use BasicCAN or a FullCAN
reception method of the referenced reception unit and to indicate a received L-PDU
to a target upper layer module.⌋()
[CANIF465] ⌈Each CanRxPduId shall be assigned to one or multiple HRHs. Thus the
assignment of single CanIds to multiple HRHs is possible.⌋()
[CANIF664] ⌈If multiple HRHs are used, each HRH shall belong at least to a single
or fixed group of Rx L-PDU handles (CanRxPduIds).⌋()
outlet range
RxPduId #0000
(CAN ID, DLC,
HRH #000, etc.)
outlet range
CAN Driver
<CanIf_User>
RxPduId #0010
(CAN ID, DLC, HRH #000
HRH #001, etc.) (address to HW Object)
RxPduId #0000
HRH #000
RxPduId #0010 RxPduId #0011 HRH #001
HRH #001
(CAN ID, DLC, (address to HW Object)
RxPduId #0011 HRH #001, etc.)
HTH #000
HTH #000
TxPduId #0000
HTH #001 (address to HW Object)
TxPduId #0001 TxPduId #0000
(CAN ID, DLC, provided by HTH #001
CAN Driver (address to HW Object)
HTH #000, etc.)
module’s
configuration
TxPduId #0001
(CAN ID, DLC,
HTH #001, etc.)
Descriptions:
Outlet range= Range of Rx L-PDUs which will be pass ed
Mailbox = CAN RAM structure
All arrows within this picture are references
HW Object = CAN RAM structure that contains (CanId, DLC, data)
and no communication directions ot sth. else.
HRH = abstract reference to the CAN RAM structure
Transmit path is coloured red
Receive path is coloured green.
[CANIF666] ⌈The HTH shall enable the CanIf to use BasicCAN or a FullCAN
transmission method of the referenced transmission unit and to confirm a transmitted
L-PDU to a target upper layer module. ⌋()
[CANIF667] ⌈If multiple HTHs are used, each HTH shall belong to a single or fixed
group of Tx L-PDU handles (CanTxPduIds). ⌋()
[CANIF115] ⌈The CanIf shall be able to use all HRHs and HTHs of one CanDrv as
common, single numbering area starting with zero.⌋()
The dedicated HRH and HTHs are derived from the configuration set of the CanDrv.
The definition of HTH/HRH inside the numbering area and hardware objects is up to
the CanDrv. It has to be ensured by configuration, that no overlapping of several
numbering areas of multiple CanDrvs is allowed.
[CANIF046] ⌈The CanIf shall assign each L-PDU handle to one CAN controller only.
Thus, the assignment of single L-PDU handles to more than one CAN controller is
prohibited. ⌋()
Rationale for CANIF046: This relation is used in order to ensure correct L-PDU
dispatching at transmission confirmation and reception indication events. In this
manner the CanIf is able to identify the CAN controller module from the L-PDU
handle.
The CanIf supports activation and deactivation of all L-PDUs belonging to one CAN
controller for transmission as well as for reception (see chapter 7.20.2 PDU channel
modes ,see CanIf_SetPduMode(), CANIF008). For L-PDU mode control refer to
section [7.20 PDU channel mode control].
Each L-PDU handle is associated with an upper layer module in order to ensure
correct dispatching during reception, transmission confirmation and data access.
Each upper layer module can use the L-PDU handles to serve different CAN
controllers simultaneously.
According to the PDU architecture defined for the entire AUTOSAR communication
stack (see [2] 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 CAN L-PDU Id defined by the CanIf as parameter.
For all callback APIs, which are invoked by the CanIf at upper layer modules, the
CanIf passes the target PduId defined by each upper layer module as parameter.
The principle is that the caller must use the defined target PDU Id of the callee.
If power on initialization is not performed and upper layer performs transmit requests
to CanIf, no L-PDUs are transmitted to lower layer and DET shall be invoked. Thus,
no un-initialized data can be transmitted on the network. Behavior of PDU
transmitting function is specified in detail in chapter [8.3.4 CanIf_Transmit].
The usage of all other L-PDU elements are equal to normal static transmit L-PDUs:
The transmit confirmation notification
CANIF_TXPDU_USERTXCONFIRMATION_UL (see CANIF527_Conf) cannot be
reconfigured as it belongs to the L-PDU handle.
The data length code (DLC) and the pointer to the data buffer are both
determined by the upper layer module at call of CanIf_Transmit().
[CANIF188] ⌈ The CanIf shall process the ‘identifier extension flag’ (see
[18]ISO11898 – Road vehicles - controller area network (CAN)) to determine the kind
of CanId and thus how the dynamic transmit L-PDU shall be transmitted.⌋()
[CANIF673] ⌈The CanIf shall guarantee data consistency of the CanId in case of
running function CanIf_SetDynamicTxId(). This service may be interrupted by a
pre-emptive call of CanIf_Transmit() affecting the same L-PDU handle, see
CANIF064. ⌋()
Note: CanIf_Init() initializes the CanIds of the dynamic transmit L-PDUs (see
CANIF085).
The CanIf provides services to control all CAN devices like CAN Controllers and CAN
Transceivers of all supported ECU's CAN channels. Those APIs are used by the
CanSm to provide a network view to the ComM (see [11]Specification of CAN State
Manager) used to perform wake up and sleep request for all physical channels
connected to a single network.
The CanIf passes status information provided by the CanDrv and CanTrcv separately
for each physical channel as status information for the CanSm
(<User_ControllerBusOff>(), refer to CANIF014).
[CANIF653] ⌈The CanIf shall provide a ControllerId, which abstracts from the
different Controllers of the different CanDrv instances. The range of the
ControllerIds within the CanIf shall start with ‘0’. It shall be configurable via
CANIF_CTRL_ID (see CANIF647_Conf).⌋()
Example:
CanIf CanDrv A CanDrv B
ControllerId 0 Controller 0
ControllerId 1 Controller 1
ControllerId 2 Controller 0
[CANIF655] ⌈The CanIf shall provide a TransceiverId, which abstracts from the
different Transceivers of the different CanTrcv instances. The range of the
TransceiverIds within the CanIf shall start with ‘0’. It shall be configurable via
CANIF_TRCV_ID (see CANIF654_Conf).⌋()
42 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
Example:
CanIf CanTrcv A CanTrcv B
TransceiverId 0 Transceiver 0
TransceiverId 1 Transceiver 1
TransceiverId 2 Transceiver 0
During the notification process the CanIf maps the original CAN controller or CAN
transceiver parameter from the Driver module to the CanSm. This mapping is done
as the referenced CAN controller or CAN transceiver parameters are configured with
the abstracted CanIf parameters ControllerId or TransceiverId.
CAN Interface
Same types of
CAN transceiver 0 CAN transceiver 1
CAN controllers
CAN network A
CAN network B
Only one CAN transceiver Different types of
driver is needed, of the CAN transceivers Use Case: 1:1 relation between CAN
transceiver type is same. network and physical channel
Figure 5: Physical channel view definition example A
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
controllers are connected.
Network view
CAN Interface
& &
Rx Tx Rx Tx
CAN transceiver 0 Same types of CAN transceiver 1
CAN controllers
The CAN hardware unit combines one or multiple CAN controller modules of the
same type, which may be located on-chip or as external standalone devices. Each
CAN hardware unit is served by the corresponding CAN Driver module.
If different types of CAN controllers are used, also different types of CAN Driver
modules have to be applied with a unified API to the CAN Interface module. The
CAN Interface module collects information about number and types of CAN controller
modules and their hardware objects in its mapping tables at configuration time. This
allows transparent and hardware independent access to the CAN controllers from
upper layer modules using HOHs (refer to [7.2 Hardware object handles] and [7.25
Multiple CAN Driver support]).
The following figure shows a CAN hardware unit consisting of two CAN controllers of
the same type connected to two physical channels:
CAN controller
device A
Tx A CAN CAN
transceiver network Physical channel A
Rx A A A
Hardware objects
of mailbox A
CAN controller
device B
Tx B CAN
transceiver CAN
network Physical channel B
Rx B B
B
Hardware objects
of mailbox B
A CAN mailbox (hardware object) for FullCAN operation only enables transmission or
reception of single CanIds. Accordingly, BasicCAN operation of one hardware object
enables to transmit or receive a range of CanIds.
[CANIF467] ⌈The CanIf shall configure and store an order on HTHs and HRHs for all
HOHs derived from the configuration containers CanIfHthCfg (see CANIF258_Conf)
and CanIfHrhCfg (see CANIF259_Conf).⌋()
[CANIF468] ⌈The CanIf shall reference a hardware acceptance filter for each HOH
derived from the configuration parameters CANIF_HTH_Id_SYMREF (see
CANIF627_Conf) and CANIF_HRH_ID_SYMREF (see CANIF634_Conf). ⌋()
The main difference between BasicCAN and FullCAN operation is in the need of a
software acceptance filtering mechanism (see chapter 7.21 Software receive filter).
[CANIF469] ⌈The CanIf shall give the possibility to configure and store a software
acceptance filter for each HRH of type BasicCAN configured by parameter
CANIF_HRH_SOFTWARE_FILTER (see CANIF632_Conf).⌋()
[CANIF211] ⌈The CanIf shall execute the software acceptance filter from CANIF469
for the HRH passed by callback function CanIf_RxIndication().⌋()
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.
[CANIF281] ⌈The CanIf shall accept and handle StandardCAN IDs and
ExtendedCAN IDs on the same physical channel (=mixed mode operation).⌋
(BSW01140)
In a mixed mode operation StandardCAN IDs and ExtendedCAN 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
parameters CANIF_CANTXPDUID_CANIDTYPE (see CANIF590_Conf) and
CANIF_CANRXPDUID_CANIDTYPE (see CANIF596_Conf). In case of mixed mode
operation the software acceptance filter algorithm (see 7.21 Software receive filter)
must be able to deal with both type of CanIds.
7.8 Initialization
The EcuM calls the CanIf's function CanIf_Init() for initialization of the entire
CanIf (see CANIF001). All global variables and data structures are initialized
including flags and buffers during the initialization process. The EcuM executes
initialization of CanDrvs and CanTrcvs separately by call of their corresponding
46 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
initialization services (refer to [8] Specification of CAN Driver and [9]Specification of
CAN Transceiver Driver).
The EcuM is responsible to ensure, that Initialization processes shall only take place,
if all CCMSMs (see chapter 7.19.2 CAN Controller operation modes) for the
corresponding CAN controllers equal CANIF_CS_UNINIT or CANIF_CS_STOPPED.
CANIF_CS_UNINIT mode is left only, if once global initialization after power-on reset
has been requested (see [15]Specification of ECU State Manager).
The CanIf expects that the CAN controller remains in STOPPED mode like after
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
CANIF001).
If re-initialization of the entire CAN modules during runtime is required, the EcuM
shall invoke the CanSm (see [11]Specification of CAN State Manager) to initiate the
required state transitions of the CAN controller 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 chapter 8.3).
Upper layer modules use the API service CanIf_Transmit() to initiate a transmit
request (refer to chapter [8.3.4 CanIf_Transmit].
The CanIf performs following actions for L-PDU transmission at call of the service
CanIf_Transmit():
Check, initialization status of the CanIf
Identify CanDrv (only if multiple CanDrvs are used)
Determine HTH for access to the CAN hardware transmit object
Call Can_Write() of the CanDrv
Call of Can_Write()
CAN Driver
[No]
[Yes]
Buffer is free
The CanIf stores information about the available hardware objects configured for
transmission purposes. The function CanIf_Transmit() maps the CanTxPduId to
the corresponding HTH and calls the function Can_Write() (see CANIF318).
At the scope of the CanIf the transmit process starts with the call of
CanIf_Transmit() and it ends with invocation of upper layer module's callback
service <User_TxConfirmation>(). During the transmit process the CanIf, the
CanDrv and the CAN Mailbox altogether shall store the L-PDU to be transmitted only
once at a single location. Either in the CAN hardware transmit object or the transmit
L-PDU buffer inside the CanIf, if transmit buffering is enabled. A single CanIf 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.
Basically, the overall buffer in CanIf for buffering CanIf Tx L-PDUs consits of one or
multiple CanIfTxBuffers (see CANIF832_Conf)). Whereas each CanIfTxBuffer is
assigned to one or multiple dedicated HTH’s (see CANIF833_Conf) and can be
configured to buffer one or multiple CanIf Tx L-PDUs. But as already mentioned
above only one instance per CanIf Tx L-PDU can be buffered in the overall amount of
CanIfTxBuffers.
The behavior of the CanIf during L-PDU transmission differs whether transmit
buffering is enabled in the configuration setup for the corresponding CanIf Tx L-
PDU, or not. If transmit buffering is disabled and a transmit request to the CAN Driver
module 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 the CAN Driver
module 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 the 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.
As per CANIF835 a CanIf Tx L-PDU refers HTHs via the CanIfTxBuffer configuration
container (see CANIF832_Conf). This is valid if transmit buffering is not needed as
well. In this case, the buffer size (see CANIF834_Conf) of the CanIfTxBuffer has to
be set to 0. Then CanIfTxBuffer configuration container is only used to refer a HTH.
The CanIf tries to store a new transmit L-PDU in the transmit L-PDU buffer only, if
the CanDrv return CAN_BUSY during a call of Can_Write() (see CANIF381) or
a pending transmit request was successfully aborted (see CANIF054).
[CANIF063] ⌈The CanIf shall support buffering of a CAN L-PDU handle for
BasicCAN transmission in the CanIf, if parameter CANIF_PUBLIC_TX_BUFFERING
(see CANIF618_Conf) is enabled.⌋(BSW01020)
[CANIF381] ⌈If transmit buffering is enabled (see CANIF063) and if the call of
Can_Write()returns with CAN_BUSY, the CanIf shall check if it is possible to buffer
the complete CanIf Tx L-PDU,which was requested to be transmitted via
Can_Write() in a CanIfTxBuffer.⌋(BSW01126)
When the call of Can_Write()returns with CAN_BUSY, the CanDrv has rejected the
requested transmission of the L-PDU (see [8]Specification of CAN Driver) because
there is no free HW object available at time of the transmit request (Tx request).
The buffer size of any CanIfTxBuffer is only configurable bigger than zero, if transmit
buffering is enabled. Additionally the buffer size of a single CanIfTxBuffer is only
configurable bigger than zero if the CanIfTxBuffer is not assigned to a FullCAN HTH
(see CANIF834_Conf).
[CANIF836] ⌈If it is possible to buffer a CanIf Tx L-PDU, because the buffer size of
the assigned CanIfTxBuffer is bigger than zero (see CANIF836), the CanIf shall
buffer a CanIf Tx L-PDU in a free buffer element of the assigned CanIfTxBuffer, if the
CanIf Tx L-PDU is not already buffered in the CanIfTxBuffer.⌋()
[CANIF068] ⌈If it is possible to buffer a CanIf Tx L-PDU, because the buffer size of
the assigned CanIfTxBuffer is bigger than zero (see CANIF836), the CanIf shall
overwrite a CanIf Tx L-PDU in the assigned CanIfTxBuffer, if the CanIf Tx L-PDU is
already buffered in the CanIfTxBuffer when Can_Write() returns CAN_BUSY.⌋()
CANIF068 implies that a CanIf Tx L-PDU shall not be overwritten in a CanIfTxBuffer
in the context of CanIf_CancelTxConfirmation().⌋(BSW01011)
If the order of various transmit requests of different L-PDUs shall be kept, transmit
requests of upper layer modules must be connected to previous transmit confirmation
notifications. This means that a subsequent L-PDU is requested for transmission by
the upper layer modules only, if the transmit confirmation of the previous one was
notified by the CanIf.
[CANIF837] If the buffer size is greater zero, all buffer elements are busy and
CanIf_Transmit()is called with a new Pdu (no other instance of the same Pdu is
already stored in the buffer), then the new Pdu shall not be stored and
[CANIF386] ⌈The CanIf shall evaluate during transmit confirmation (see (CANIF007),
whether pending CanIf Tx L-PDUs are stored within the CanIfTxBuffers, which are
assigned to the new free Hardware Transmit Object (see CANIF466). ⌋()
[CANIF668] ⌈If pending CanIf Tx L-PDUs are available in the CanIfTxBuffers as per
CANIF386, then the CanIf shall initiate a new transmit request of that pending CanIf
Tx L-PDU (of the ones assigned to the new HW Transmit Object) with the highest
priority (see CANIF070) by call of Can_Write().⌋()
[CANIF070] ⌈The CAN Interface module shall transmit L-PDUs stored in the transmit
L-PDU buffers in priority order (see[18]) per each HTH.⌋()
[CANIF183] ⌈When the CanIf calls the function Can_Write() for prioritized L-PDU
stored in CanIfTxBuffer and the return value of Can_Write() is E_OK, then the
CanIf shall remove this L-PDU from the transmit L-PDU buffer immediately, before
the transmit confirmation returns.⌋()
The behavior specified in CANIF183 simplifies the choice of the new transmit L-PDU
stored in the transmit L-PDU buffer.
[CANIF033] ⌈The CanIf shall protect access to transmit L-PDU buffers for all transmit
L-PDUs by usage of critical sections.⌋(BSW01114)
Rationale: for CANIF033: pre-emptive accesses to the transmit L-PDU buffer cannot
always be avoided. Such transmit L-PDU buffer access like storing a new L-PDU or
removing transmitted L-PDU may occur preemptively.
One transmit L-PDU can only be assigned to one single transmit confirmation
callback service. Please refer to chapter [8.6.3.1 <User_TxConfirmation>].
53 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
In that case the pending transmit request within a CAN hardware transmit object is
cancelled and replaced by the newly requested L-PDU with higher priority. The
CanDrv informs the CanIf about a successful transmit cancellation via
CanIf_CancelTxConfirmation() (see 8.4.3 CanIf_CancelTxConfirmation).
After CanIf called Can_Write() the CanDrv might confirm successful transmit
cancellation to the CanIf via CanIf_CancelTxConfirmation() and passes the L-
PDU requested for transmission back to the CanIf's transmit L-PDU buffer. See UML
diagram in chapter [9.6].
Dependent on the used CAN controller and the traffic on the network the cancellation
of a pending transmit L-PDU inside a CAN hardware object can be delayed and thus
it may occur asynchronously.
Rationale: This way of L-PDU storage ensures to keep the latest data of several
pending transmit L-PDUs with the same L-PDU handle inside the CanIf's transmit L-
PDU buffers.
Hint: The CanIf needs to protect all critical accesses out of pre-emptive call contexts
like processing of pending transmit requests in the transmit confirmation context the
transmit request service is called re-entrant.
Call of Can_Write()
CAN Driver
CAN Hardware is
[No]
free?
«datastore»
[New Tx L-PDU has higher priority than at
CAN Controller Copy L-PDU into CAN
least one of the pending ones in the CAN
hardware
hardware]
Can Driver
Request cancellation of
[New Tx L-PDU has lower priority pending L-PDU with lowest
than all of the pending ones in the priority
Set transmit request in CAN
CAN hardware]
controller
«datastore»
Copy L-PDU into transmit CAN Interface
buffer
Call CanIf_CancelTxConfirmation()
CAN Driver module
Call Can_Write() New Tx L-PDU with a higher priority than the one stored
formerly into a TxBuffer shall be set into the HW Buffer
Can_Write() and
CanIf_CancelTxConfirmation()
returns
According to the AUTOSAR Basic Software Architecture the PDU data buffers are
placed in the upper layer communication stacks, i.e. AUTOSAR COM, CanNm,
CanTp, DCM), where the corresponding data will be evaluated and processed. This
means, all transmit as well as all receive PDU buffers are located in these upper
layers.
[CANIF057] ⌈The CanIf shall not provide buffers to store SDUs but it shall use the
SDU buffers provided by upper layer modules.⌋()
The received L-SDU is hardware dependent (nibble and byte ordering, access type)
and allocated to the lowest layer in the communication system – to the CanDrv.
The HRH serves as a link between the CanDrv and the upper layer module using the
L-SDU. The HRH identifies one CAN hardware receive object, where a new CAN L-
PDU was received.
After the received L-PDU passed the software filtering (refer to 7.21Software receive
filter), identification of the L-PDU handle and passing the DLC Check, the CanIf
derives the target upper layer memory buffer location from the L-PDU Handle.
Hereby the hardware receive handle and the L-PDU Handle represents the source
and destination information for the copying session of the L-PDU out of the CAN
hardware receive object to the L-PDU buffer relocated in the upper layer module.
Initially after detection of a new reception of an L-PDU the CanDrv stores the L-PDU
data in an own temporary buffer. If a separate L-SDU normalization is not necessary
according to the data structures of the used CAN controller, temporary buffering can
be omitted. Thus this feature is up to the CanDrv. The CanIf is not able to recognize,
whether the CanDrv uses temporary buffering or a direct hardware access. The CanIf
expects normalized L-PDU data in calls of the CanIf_RxIndication().
The CAN hardware receive object is locked until the end of the copy process to the
temporary or upper layer module buffer. The hardware object will be immediately
released after CanIf_RxIndication() of the CanIf returns to avoid loss of data.
In case temporary buffering is used, the hardware object remains locked until the
data is read out and copied to the temporary buffer. Then the CAN controller is able
to perform the next occurred receive event.
In case no temporary buffer is used, the hardware object remains locked until the
data is read out and the indication service returns. In this case the parameter of the
receive indication callback CanIf_RxIndication() refers to the locked CAN RAM
with received data.
The temporary buffer or the CAN hardware receive object within the currently
received L-PDU remains locked until the end of the copy process. The CanDrv is
responsible to unlock them, after CanIf's indication services has returned.
The CanDrv, the CanIf and the upper layer module , which belongs to the received L-
PDU, access the same temporary intermediate buffer, which can be located either in
the CAN hardware receive object of the CAN controller or as temporary buffer in the
CanDrv.
Receive Interrupt
CAN Controller
Data «datastore»
CAN Driver [Yes]
normalization Temporary buffer in CAN
necessary? Driver
[No]
Rx L-PDU [Yes]
received in Software filtering
BasicCAN ?
[No]
[Yes]
CANIF_DLC_CHECK
enabled? [L-PDU passed]
[No]
DLC Check [No]
failed ?
[Yes]
[L-PDU not
Call Dem_ReportErrorStatus() with passed]
EventId == CANIF_E_INVALID_DLC
Call <User_RxIndication>() to
upper layers
«datastore»
Upper Layer Copy data to L-PDU
buffer
<User_RxIndication>() returns
CanIf_RxIndication() returns
[CANIF135] ⌈If a target upper layer module was configured to be called with its
providing receive indication service (see CANIF056), the CanIf shall call this
configured receive indication callback service (see CANIF530_Conf) and shall
provide the parameters required for upper layer notification callback functions (see
CANIF012) based on the parameters of CanIf_RxIndication().⌋(BSW00325)
Note: A single receive L-PDU can only be assigned to a single receive indication
callback service (refer to multiplicity of CANIF_USERRXINDICATION_NAME,
CANIF530_Conf).
By this way the type of mechanism to receive CAN L-PDUs (in the upper layer
modules of the CanIf) can be chosen at configuration time by the parameter
CANIF_RXPDU_USERRXINDICATION_UL (see CANIF529_Conf) and parameter
CANIF_RXPDU_READ_DATA (see CANIF600_Conf) according to the needs of the
upper layer module, to which the corresponding receive CAN L-PDU belongs to. For
details please refer to [9.9 Read received data].
Rationale for CANIF391 and CANIF393 respectively CANIF392 and CANIF394: This
'read-and-consume' behavior ensures, that at least one successful transmit or
receive event occurred after last call of this service.
[CANIF064] ⌈ The CanIf shall protect preemptive events, which access shared
resources, that could be changed during the CanIf’s event handling, against each
other. ⌋(BSW00312)
Rationale: An attempt to update the data in the upper layer module buffers as well as
in the internal CanIf’s buffers has to be done with respect to possible changes done
in the context of an interrupt service routine or other preemptive events. Preemptive
events probably occur either from preemptive tasks, multiple CAN interrupts, if
multiple physical channels i.e. for gateways are used, or in case of other peripherals
or network systems interrupts, which have the needs to transmit and receive CAN L-
PDUs on the network.
[CANIF058] ⌈If the CanIf’s environment reads data from the CanIf controlled memory
areas initiated by calling one of the functions CanIf_Transmit(),
CanIf_TxConfirmation(), CanIf_CancelTxConfirmation(), and
CanIf_ReadRxPduData(), the CanIf shall guarantee that the provided values are
the most recently acquired values.⌋()
Handling of shared transmit and receive L-PDU buffers are critical issues for the
implementation of the CanIf. Therefore the CanIf shall ensure data integrity and thus
use appropriate mechanisms for access to shared resources like
transmission/reception L-PDU buffers. Preemptive events, i.e. transmission and
reception event from other CAN controllers could compromise data integrity by
writing into the same L-PDU buffer.
The 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 information which is stored within the CanIf are accessible
via CanIf_GetControllerMode().
The CAN controller status may be changed at request of the upper layer by the
calling of CanIf_SetControllerMode() service. The request is validated and
passed by the 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 the CanSm. By this way the CanSm is responsible to set all CAN
controllers of one CAN network sequentially to sleep mode or to wake them up.
When a CAN controller signals the network event “BusOff”, the CanIf service
CanIf_ControllerBusOff() is called which transitions the buffered CAN
controller mode (see below CCMSM) in the CanIf to CANIF_CS_STOPPED and
which in turn notifies the CanSm by the callback service
CanSm_ControllerBusOff(ControllerId).
In case of a CAN bus “wake-up” event the function
CanIf_CheckWakeup(WakeupSource) may be called during execution of
EcuM_CheckWakeup(WakeupSource) (see wake-up sequence diagrams of
EcuM). The CanIf in turn checks by configured input reference to
EcuMWakeupSource in the Driver modules, which Driver modules have to be
checked. The CanIf gets this information via reference CanIfCtrlCanCtrlRef
(see CANIF636_Conf).
The Communication Service, which is called, belongs to the service defined during
configuration (see CANIF250_Conf). In this way the EcuM as well as the CanSm are
able to change CAN controller states and to control the system behavior concerning
the BusOff recovery or wakeup procedure.
The state machine in Figure 12 CanIf Controller mode state machine for one CAN
controller = CCMSM) gives an overview about the possible CAN controller state
transitions, which may be requested by surrounding modules of the CanIf (CanDrv,
CanSm, EcuM, CDD etc.). The CanIf does not check these requests for correctness.
The calling modules requesting state transitions of the CCMSM can do this
independently of the current state of the CCMSM, i.e. the CanIf accepts every state
64 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
transition request by calling the function CanIf_SetControllerMode()or
CanIf_ControllerBusOff(). The CanIf does not decide if a requested mode
transition of the CAN controller is valid or not. The CanIf only includes the execution
of requested mode transitions (see CANIF474).
This network related state machine is implemented in the CanSm. Refer to [11]
Specification of CAN State Manager. The CanIf only stores the requested mode and
executes the requested transition.
Hint: It has to be regarded that not only the CanSm is able to request CAN controller
mode changes.
CANIF_CS_UNINIT
PowerOn Reset
CANIF_CS_INIT
CanIf_SetControllerMode( CanIf_SetControllerMode(
CanIf_SetControllerMode(
Controller, CANIF_CS_STOPPED) Controller, CAN_CS_STARTED)
Controller, CANIF_CS_SLEEP)
/Can_SetControllerMode( /Can_SetControllerMode(
/Can_SetControllerMode(
Controller, CAN_T_STOP) Controller, CAN_T_STOP) Controller, CAN_T_START)
CANIF_CS_STOPPED
CanIf_Init()
+ entry / cancel pending transmit requests CANIF_CS_START_TO_SLEEP
+ entry / clear CanIf transmit buffers
CANIF_CS_STOP /Can_SetControllerMode(
Controller, CAN_T_SLEEP)
/Can_SetControllerMode(
Controller, CAN_T_START)
CANIF_CS_SLEEP_TO_START
CANIF_CS_SLEEP
CanIf_SetControllerMode(
Co ntroller, CANIF_CS_SLEEP)
/Can _ SetControllerMode(
Controller, CAN_T_SLEEP)
Figure 12 CanIf Controller mode state machine for one CAN controller
[CANIF474] ⌈The CAN Interface module shall not contain any complete CAN
controller state machine.⌋()
According to the requested operation mode by the CanSm the CanIf translates it into
the right order of mode transitions for the CAN controller.
The CanIf changes or stores the new operation mode of the CAN controller after a
indication of a successful mode transition via
CanIf_ControllerModeIndication(Controller, ControllerMode).
7.19.2.1 CANIF_CS_UNINIT
The CanIf is not initialized. The EcuM has to consider, that also the CAN driver
module(s) and CAN controller(s) are not initialized.
7.19.2.2 CANIF_CS_INIT
[CANIF477] ⌈If the CCMSM is in state CANIF_CS_INIT for every assigned CAN
controller when the function CanIf_Init() is called, then the CAN Interface
module shall take the CCMSM for every assigned CAN controller to state
CANIF_CS_INIT.⌋()
[CANIF478] ⌈If the state CANIF_CS_INIT of a CCMSM is entered, then the CanIf
shall take that CCMSM to sub state CANIF_CS_STOPPED of state CANIF_CS_INIT.
⌋()
66 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
[CANIF479] ⌈If a CCMSM enters state CANIF_CS_INIT, then the CanIf shall clear all
temporarily stored wakeup events corresponding to that state machine.⌋()
7.19.2.2.1 CANIF_CS_STOPPED
The CAN controller cannot receive or transmit CAN L-PDUs on the network in the
corresponding mode CAN_T_STOP.
[CANIF485] ⌈If a CCMSM enters state CANIF_CS_STOPPED, then the CanIf shall
clear the CanIf transmit buffers assigned to the CAN controller corresponding to that
state machine.⌋()
7.19.2.2.2 CANIF_CS_STARTED
In the mode CANIF_CS_STARTED the CanIf passes all transmit requests to the
CanDrv and the CanIf can receive CAN L-PDUs and notify upper layers about
received L-PDUs.
7.19.2.2.3 CANIF_CS_SLEEP
If a CAN controller is set to CAN_T_SLEEP mode, then the controller are enabled, if
supported. As long as wake up functionality is not provided by the CAN controller, the
CanDrv encapsulates it.
7.19.2.3 BUSOFF
The API for state change requests to the CAN controller behaves in an asynchronous
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
CANIF_CS_SLEEP. After successful change to e.g. CAN_T_SLEEP mode the
CanDrv calls function CanIf_ControllerModeIndication()and the CanIf in
turn calls function <User_ControllerModeIndication>() besides changing
the CCMSM to CANIF_CS_SLEEP. If CAN controller transitions very fast,
Upper layer modules of CanIf can poll the current within the CanIf buffered operation
mode (CCMSM) by CanIf_GetControllerMode() (see CANIF229).
Not all types of CAN controllers support Sleep and Wake up mode. These modes are
then encapsulated by the CanDrv by providing hardware independent operation
modes via its interface, which has to be managed by the CanIf.
The CanDrv can release directly a wake up interrupt (to the ECU Integration Code)
during the outstanding request Can_SetControllerMode(Controller,
CAN_T_SLEEP) and the answer
CanIf_ControllerModeIndication(Controller, CANIF_CS_SLEEP), when
CAN L-PDUs are transmitted or received at the same time.
This treatment guarantees, that the CanSm is informed immediately about the
transition to CANIF_CS_SLEEP mode for handling the CanTrcv and enabling the
wake up interrupt.
The CanIf distinguishes between internal initiated CAN controller wake up request
(internal request) and network wake up request (external request). The internal
request is initiated by call of the CAN Interface module's function
CanIf_SetControllerMode(ControllerId, CANIF_CS_STARTED) and it is
an internal asynchronous request.
The external request is a CAN controller event, which is notified by the CanDrv or the
CanTrcv to the ECU Integration Code. For details see respective UML diagram in the
chapter “CAN Wakeup Sequences” of document [15] Specification of ECU State
Manager module.
7.19.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.
If wake-up support is enabled (see CANIF180) the CanIf is notified by the Integration
Code about a detected CAN wake-up by the service CanIf_CheckWakeup()(see
CAN Wakeup Sequences of [15] Specification of ECU State Manager).
[CANIF679] ⌈If the CCMSM (see chapter 7.19) of the CAN controller, which shall be
checked for a wake-up event via CanIf_CheckWakeup(), is not in mode
CANIF_CS_SLEEP, the CanIf shall report the development error code
CANIF_E_NOT_SLEEP to the Det_ReportError service of the DET module and
CanIf_CheckWakeup() shall return E_NOT_OK.⌋()
Note: When a CAN controller / transceiver detects a bus wake-up event, then this will
be notified to the ECU State Manager indirectly. If such a wake-up event needs to be
validated, the EcuM (or a CDD) switches on the corresponding CAN controller
(CanIf_SetControllerMode()) and transceiver (CanIf_SetTrcvMode()) (For
more details see chapter 9 of [15] Specification of ECU State Manager).
Attention: The CanIf notifies the upper layer modules about received messages after
the corresponding CCMSM has been transitioned to CANIF_CS_STARTED and the
PDU channel mode has been set to CANIF_SET_TX_ONLINE. Thus, it is necessary
that the PDU channel mode is not set to CANIF_SET_TX_ONLINE if wake-up
validation is required.
72 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
Note: As per CAN411 and CAN Controller State Diagram (see [8] Specification of
CAN Driver) a direct transition from mode CAN_T_SLEEP to CAN_T_START is not
allowed.
CANIF756: When CC is set to CS_SLEEP the stored event (call of the first
CanIf_RxIndication) shall be cleared.
The figure below shows one possible usage of L-PDU channel group and its relation
to the upper layers and/or networks:
Typical users like PDU Router or the network management are responsible for
controlling the PDU operation modes.
CAN NM A CAN NM B
Channel Channel Channel Channel
Network 0 Network 0 Network 1 Network 1
TxPath RxPath TxPath RxPath
CAN Interface
Network A
Network B
The CanIf accepts always requests to change the PDU channel mode independent of
its current state. Although this is not necessarily sufficient to e.g. enable transmission
of L-PDUs, because the CAN Interface module does not transmit or receive L-PDUs
in CANIF_CS_STOPPED, CANIF_CS_SLEEP or CANIF_CS_UNINIT state.
The CanIf provides information about the status of 'ONLINE'/'OFFLINE' service when
required via the service CanIf_GetPduMode().
OFFLINE
Passive
Active
ONLINE
The figure above shows a diagram with possible L-PDU channel modes. Each L-
PDU channel can be OFFLINE (no transmission) or ONLINE (activated
transmission). A simulation of the successful transmission (transmit confirmation) is
supported in the OFFLINE mode and called CANIF_OFFLINE_ACTIVE mode (see
CANIF072). The default state of L-PDU channel in OFFLINE mode thus is 'Passive'.
No simulation of the successful transmission takes place.
7.20.2.1 CANIF_OFFLINE
[CANIF118] ⌈If those transmit L-PDUs, which are already waiting for transmission in
the CAN hardware transmit object, will be transmitted immediately after change to
CANIF_SET_TX_OFFLINE or CANIF_SET_OFFLINE mode and a subsequent
BusOff event occurs, the CanIf does not prohibit execution of the BusOff notification
<User_ControllerBusOff>(ControllerId). ⌋()
The wake-up notification is not affected concerning mode PDU channel changes.
7.20.2.2 CANIF_ONLINE
7.20.2.3 CANIF_OFFLINE_ACTIVE
Rational: This functionality is useful to realize special operating modes (i.e. diagnosis
passive mode) to avoid bus traffic without impact to the notification mechanism. This
mode is typically used for diagnostic usage.
Not all L-PDUs, which may pass the hardware acceptance filter and therefore are
successful received in BasicCAN hardware objects, are defined as receive L-PDUs
and thus needed from the corresponding ECU. The CanIf optionally filters out these
L-PDUs and prohibits further software processing.
Certain software filter algorithms are provided to optimize software filter runtime. The
approach of software filter mechanisms is to find out the corresponding L-PDU
handle from the HRH and CAN ID currently being processed. After the L-PDU handle
is found, the CanIf accepts the L-PDU and enables upper layers to access L-PDU
information directly.
The configuration tool handles the information about hardware acceptance filter
settings. The most important settings are the number of the L-PDU hardware objects
and their range. The outlet range defines, which receive L-PDUs belongs to each
hardware receive object. The following definitions are possible:
a single receive L-PDU (FullCAN reception),
a list of receive L-PDUs or
one or multiple ranges of receive L-PDUs can be linked to a hardware receive
object (BasicCAN reception).
For definition of range reception it is necessary to define at least one Rx L-PDU with
the CanId inside the defined range.
[CANIF645] ⌈A range of CanIds which shall pass the software receive filter shall be
defined by its upper limit (see CANIF_HRHRANGE_UPPER_CANID
CANIF630_Conf) and lower limit (see CANIF_HRHRANGE_LOWER_CANID
CANIF629_Conf) CanId.⌋()
[CANIF646] ⌈Each configurable range of CAN Ids (see CANIF645), which shall pass
the software receive filter, shall be configurable either for StandardCAN IDs or
ExtendedCAN IDs via CANIF_HRHRANGE_CANIDTYPE (see CANIF644_Conf).⌋()
Receive L-PDUs are provided as constant structures statically generated from the
communication matrix. They are arranged according to the corresponding hardware
acceptance filter, so that there is one single list of receive CanIds for every hardware
receive object (HRH). The corresponding list can be derived by the HRH, if multiple
BasicCAN objects are used. The subsequent filtering is the search through one list of
multiple CanIds by comparing them with the new received CanId. In case of a hit the
receive L-PDU handle is derived from the found CanId.
[CANIF030] ⌈If the CanIf has found the CanId of the received L-PDU in the list of
receive CanIds for the HRH of the received L-PDU, then the CanIf shall accept this L-
PDU and the software filtering algorithm shall derive the receive L-PDU handle from
the found CanId.⌋(BSW01018)
Hardware
Receive Handle
Rcv Handle Nr. Rcv Handle Nr. Rcv Handle Nr. Rcv Handle Nr. Rcv Handle Nr. Rcv Handle Nr. Rcv Handle Nr. Rcv Handle Nr.
CAN Id CAN Id CAN Id CAN Id CAN Id CAN Id CAN Id CAN Id
DLC DLC DLC DLC DLC DLC DLC DLC
Upper Layer ID Upper Layer ID Upper Layer ID Upper Layer ID Upper Layer ID Upper Layer ID Upper Layer ID Upper Layer ID
*destination *destination *destination *destination *destination *destination *destination *destination
list end flag=0 list end flag=0 list end flag=1 list end flag=1 list end flag=0 list end flag=0 list end flag=0 list end flag=1
[CANIF026] ⌈The CanIf shall accept all received L-PDUs (see CANIF390) with a
DLC value equal or greater then the configured DLC value (see CANIF599_Conf).⌋
(BSW01005)
79 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
Hint: The DLC Check can be enabled or disabled globally by CanIf configuration (see
parameter CANIF_PRIVATE_DLC_CHECK, CANIF617_Conf) for all used CanDrvs.
[CANIF168] ⌈If the DLC check rejects a received L-PDU (see CANIF026), the CanIf
shall report development error code CANIF_E_INVALID_DLC to the
Det_ReportError() service of the DET module.⌋()
[CANIF829] ⌈The CanIf shall pass the received (see CANIF006) length value (DLC)
to the target upper layer module (see CANIF135), if the DLC check is passed.⌋()
[CANIF830] ⌈The CanIf shall pass the received (see CANIF006) length value (DLC)
to the target upper layer module (see CANIF135), if the DLC check is not configured
(see CANIF617_Conf), ⌋()
These notification services are able to detect new events that occurred in the CAN
hardware objects since its last execution. The CanIf's notification services for
forwarding of detected events by the CanDrv are the same like for interrupt operation
(see chapter 8.4 “Callback notifications”).
80 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
The user has to consider, that the CanIf has to be able to perform notification
services triggered by interrupt on interrupt level as well as to perform invoked
notification services on task level.
If any access to the CAN controller's mailbox is blocked, subsequent transmit
buffering takes place (refer [7.12 Transmit buffering]).
The Polling and Interrupt mode can be configured for each underlying CAN
controller.
The CanIf needs a specific mapping to cover multiple CanDrv to provide a common
interface to upper layers. Thus, the CanIf must dispatch all actions up-down to the
APIs of the corresponding target CanDrv and underlying CAN controller(s) and as
well the way down-up by providing multiple callback notifications on the CanIf for
multiple CanDrvs.
[CANIF124] ⌈If multiple CanDrvs are assigned to a CanIf, then that CanIf shall
provide a separate set of callback function for each CanDrv, in which the callback
function names has to follow the naming convention specified in BSW00347. ⌋
(BSW00347)
The naming convention is as follows:
<CAN Driver module name>_<vendorID>_<Vendor specific API name><driver
abbreviation>()
E.g.:
Can_99_Ext1
Can_99_Ext2
The additional affixes within the function names shall be derived from configuration
reference CANIF_DRIVER_NAME_REF (see CANIF638_Conf).
[CANIF224] ⌈If only one CanDrv is assigned to a CanIf, then that CanIf shall provide
the set of callback functions for that CanDrv as defined in chapter 8.4.⌋()
The support for multiple CanDrvs can be enabled and disabled by the configuration
parameter CANIF_MULTIPLE_DRIVER_SUPPORT (see CANIF612_Conf).
Each transmit L-PDU enables the CanIf to derive the corresponding CAN controller
and implicitly the 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.
[CAN Controller A used] Here the name of the called function has to be extended to
distinguish the different CAN drivers. I.e.: Can_Write_99_Ext1.
CanIf_Transmit(Std_ReturnType, PduIdType, const PduInfoType*) :
Std_ReturnType
Can_Write(Can_ReturnType, Can_HwHandleType,
const Can_PduType*)
Copy L-PDU in CAN
Hardware A()
Can_Write()
CanIf_Transmit()
CanIf_Transmit()
Every notification callback service invoked by the CanDrvs at the CanIf exists
multiple times, if multiple CanDrvs are used in a single ECU. This means, that each
used CanDrv calls 'it's own' callback service at the CanIf. The CanIf must provide all
callback services unique for each underlying CanDrv. Thus, the HRH parameter is
unique at the scope of each CanDrv. Following callback services are affected:
CanIf_TxConfirmation
CanIf_RxIndication
CanIf_CancelTxConfirmation
CanIf_ControllerBusOff
CanIf_ControllerModeIndication
Example: On reception side the corresponding callback routine of the CanDrv are
being triggered by the reception events is called at the CanIf. If the CanIf underlies
two CanDrvs, the CanIf has to provide two CanIf_RxIndication() routines. At
83 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
configuration time the relation between callback service and used CanDrv has to be
set up.
Received L-PDU
Exemplary call: parameters differ for User=CanTp validation check (SW
Filtering, DLC
Check)
<User_RxIndication>(PduIdType, const
uint8*)
Copy
Data()
Copy
Data()
<User_RxIndication>()
CanIf_RxIndication()
Receive
Interrupt()
<User_RxIndication>(PduIdType, const
uint8*)
Copy
data()
Copy
data()
<User_RxIndication>()
CanIf_RxIndication()
Receive
Interrupt()
A table with addresses to all CanDrv API services is the basis to provide a unique
driver interface to the CanIf. This table makes the assignment from two different
driver interfaces to one single driver interface (with prefix (Can_).
In case of L-PDU handle based APIs, the CanIf has to derive the corresponding
CanDrv from the L-PDU handle. Afterwards the CanIf can use the CanDrv number
as an index for the table with function pointers. The parameters have correspondingly
to be translated: i.e. L-PDU handle => HTH/HRH, CanId, Dlc.
CAN Interface
Each CanDrv supports a certain number of underlying CAN controllers and a fixed
number of HTHs. Each CanDrv has an own numbering area, which starts always at
zero for controller and HTH.
CANIF748: ⌈The PnTxFilter of CANIF747 shall only have an effect and transition its
modes (enabled/disabled) if more than zero TxPDUs per CAN controller are
configured as PnFilterPdu (see CANIF_TXPDU_PNFILTERPDU, CANIF773_Conf).⌋()
CANIF750: ⌈If the PnTxFilter (ref. to CANIF749) of a CAN controller is enabled, the
CanIf shall block all Tx requests (return E_NOT_OK when CanIf_Transmit() is
called) to that CAN controller, except if the requested TxPdu is one of the configured
PnFilterPdus of that CAN controller. These PnFilterPdus shall always be passed to
the corresponding CAN driver module.⌋()
CANIF752: ⌈If the PnTxFilter of a CAN controller is disabled, the CanIf shall behave
as requested via CanIf_SetPduMode (see CANIF749).⌋()
Hint (ref. to CANIF752): If e.g. the requested PDU channel mode (see CANIF749)
changes in the meantime when PnTxFilter was enabled from CANIF_SET_ONLINE
to e.g. CANIF_SET_TX_ONLINE, the CanIf shall behave correspondingly.
This chapter lists and classifies all errors that can be detected within this software
module. Each error is classified according to relevance (development / production)
and related error code. For development errors, a value is defined.
[CANIF153] ⌈Values for production code Event Ids are assigned externally by the
configuration of the Dem. They are published in the file Dem_IntErrId.h and
included via Dem.h.⌋(BSW00409)
The following table shows the available error codes. The CanIf shall detect them to
the DET, if configured.
They shall not be used as the return value of the called function.
[CANIF223] ⌈For all defined production errors it is only required to report the event,
when an error or diagnostic relevant event (e.g. state changes, no L-PDU events)
occurs. Any status has not to be reported.⌋()
88 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
7.30 Debugging
[CANIF567] ⌈The declaration of variables in the header file shall be such that it is
possible to calculate the size of the variables by C-"sizeof" operation.⌋()
[CANIF726] ⌈The CanIf shall provide a readable module vendor identification in its
published parameters (see CANIF725). The naming convention of this module
vendor identification for CanIf is CANIF_VENDOR_ID. This parameter shall be
represented in uint16 (16 bit).⌋(BSW00374)
[CANIF727] ⌈The CanIf shall provide a module identifier in its published parameters
(see CANIF725). The naming convention of this module identifier for CanIf is
CANIF_MODULE_ID. This parameter shall be represented in uint16 (16 bit) and it
shall be set to the value of CanIf from Basic Software Module list (see [1]).⌋
(BSW00379)
[CANIF728] ⌈The CanIf shall provide the following version numbers with the
following naming convention (see CANIF021) in its published parameters (see
CANIF725):
CANIF_SW_MAJOR_VERSION
CANIF_SW_MINOR_VERSION
CANIF_SW_PATCH_VERSION
CANIF_AR_RELEASE_MAJOR_VERSION
CANIF_AR_RELEASE_MINOR_VERSION
CANIF_AR_RELEASE_REVISION_VERSION⌋(BSW00318)
8 API specification
[CANIF142] ⌈
Module Imported Type
Can Can_HwHandleType
Can_IdType
Can_ReturnType
Can_StateTransitionType
Can_PduType
Can_GeneralTypes CanTrcv_TrcvModeType
CanTrcv_TrcvWakeupModeType
CanTrcv_TrcvWakeupReasonType
ComStack_Types PduIdType
PduInfoType
EcuM EcuM_WakeupSourceType
Std_Types Std_ReturnType
Std_VersionInfoType
⌋(BSW00348, BSW00353, BSW00361)
8.2.1 CanIf_ConfigType
Name: CanIf_ConfigType
Type: Structure
Element: void implementation The contents of the initialization data
specific 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.
Note: The definition of CanIf public parameters and the definition for each L-PDU
handle are specified in chapter 10.
8.2.2 CanIf_ControllerModeType
Name: CanIf_ControllerModeType
Type: Enumeration
Range: CANIF_CS_UNINIT = 0
UNINIT mode. Default mode of the CAN Driver and all CAN
controllers connected to one CAN network after power on.
CANIF_CS_SLEEP SLEEP mode. At least one of all CAN controllers connected
to one CAN network are set into the SLEEP mode and can
be woken up by request of the CAN Driver or by a network
event (must be supported by CAN hardware)
CANIF_CS_STARTED STARTED mode. All CAN controllers connected to one CAN
network are started by the CAN Driver and in full-operational
mode.
CANIF_CS_STOPPED STOPPED mode. At least one of all CAN controllers
connected to one CAN network is halted and does not
operate on the network.
Description: Operating modes of the CAN Controller and CAN Driver
8.2.3 CanIf_PduSetModeType
Name: CanIf_PduSetModeType
Type: Enumeration
Range: CANIF_SET_OFFLINE =0
Channel shall be set to the offline mode
=> no transmission and reception
CANIF_SET_ONLINE Channel shall be set to online mode
=> full operation mode
CANIF_SET_RX_OFFLINE Receive path of the corresponding channel
shall be disabled
CANIF_SET_RX_ONLINE Receive path of the corresponding channel
shall be enabled
CANIF_SET_TX_OFFLINE Transmit path of the corresponding channel
shall be disabled
CANIF_SET_TX_OFFLINE_ACTIVE Transmit path of the corresponding channel
shall be set to the offline active mode
=> notifications are processed but transmit
requests are blocked.
CANIF_SET_TX_ONLINE Transmit path of the corresponding channel
shall be enabled
Description: Request for PDU channel group. The request type of the channel defines it's
transmit or receive activity. Communication direction (transmission and/or reception)
of the channel can be controlled separately or together by upper layers.
8.2.4 CanIf_PduGetModeType
Name: CanIf_PduGetModeType
Type: Enumeration
Range: CANIF_GET_OFFLINE =0
Channel is in the offline mode
=> no transmission and reception
CANIF_GET_OFFLINE_ACTIVE Transmit path of the corresponding
channel is in the offline active
mode
=> transmit notifications are
processed but transmit requests
are blocked.
The receive path is disabled.
CANIF_GET_OFFLINE_ACTIVE_RX_ONLINE Transmit path of the corresponding
channel is in the offline active
mode
=> transmit notifications are
processed but transmit requests
are blocked.
The receive path is enabled.
CANIF_GET_ONLINE Channel is in the online mode
=> full operation mode
CANIF_GET_RX_ONLINE Receive path of the corresponding
channel is enabled and transmit
path is disabled.
CANIF_GET_TX_ONLINE Transmit path of the corresponding
channel is enabled and receive
path is disabled.
Description: Status of the PDU channel group. Current mode of the 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.
8.2.5 CanIf_NotifStatusType
Name: CanIf_NotifStatusType
Type: Enumeration
Range: CANIF_NO_NOTIFICATION =0
No transmit or receive event occurred for the
requested L-PDU.
CANIF_TX_RX_NOTIFICATION The requested Rx/Tx CAN L-PDU was successfully
transmitted or received.
Description: Return value of CAN L-PDU notification status.
8.3.1 CanIf_Init
[CANIF001] ⌈
Service name: CanIf_Init
Syntax: void CanIf_Init(
const CanIf_ConfigType* ConfigPtr
)
93 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
Service ID[hex]: 0x01
Sync/Async: Synchronous
Reentrancy: Non Reentrant
ConfigPtr Pointer to configuration parameter set, used e.g. for post build
Parameters (in):
parameters
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This service Initializes internal and external interfaces of the CAN Interface for the
further processing.
⌋(BSW00405, BSW101, BSW00358, BSW00414, BSW01021, BSW01022)
Note: All underlying CAN controllers and transceivers still remain not operational.
[CANIF085] ⌈The service CanIf_Init() shall initialize the global variables and
data structures of the CanIf including flags and buffers.⌋()
Note: In case only one configuration setup is used, a NULL pointer is sufficient to
choose the one static existing configuration setup.
8.3.2 CanIf_SetControllerMode
[CANIF003] ⌈
Service name: CanIf_SetControllerMode
Syntax: Std_ReturnType CanIf_SetControllerMode(
uint8 ControllerId,
CanIf_ControllerModeType ControllerMode
)
Service ID[hex]: 0x03
Sync/Async: Asynchronous
Reentrancy: Reentrant (Not for the same controller)
ControllerId Abstracted CanIf ControllerId which is assigned to a CAN
Parameters (in):
controller, which is requested for mode transition.
94 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
ControllerMode Requested mode transition
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Controller mode request has been accepted
Return value:
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.
⌋(BSW01027)
Note: The ID of the CAN controller is published inside the configuration description of
the CanIf.
8.3.3 CanIf_GetControllerMode
[CANIF229] ⌈
Service name: CanIf_GetControllerMode
Syntax: Std_ReturnType CanIf_GetControllerMode(
uint8 ControllerId,
CanIf_ControllerModeType* ControllerModePtr
)
Service ID[hex]: 0x04
Sync/Async: Synchronous
Reentrancy: Non Reentrant
95 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
ControllerId Abstracted CanIf ControllerId which is assigned to a CAN
controller, which is requested for current operation mode.
Parameters (in):
ControllerModePtrPointer to a memory location, where the current mode of the
CAN controller will be stored.
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Controller mode request has been accepted.
Return value:
E_NOT_OK: Controller mode request has not been accepted.
Description: This service reports about the current status of the requested CAN controller.
⌋(BSW01028)
Note: The ID of the CAN controller module is published inside the configuration
description of the CanIf.
8.3.4 CanIf_Transmit
[CANIF005] ⌈
Service name: CanIf_Transmit
Syntax: Std_ReturnType CanIf_Transmit(
PduIdType CanTxPduId,
const PduInfoType* PduInfoPtr
)
Service ID[hex]: 0x05
Sync/Async: Synchronous
Reentrancy: Reentrant
CanTxPduId L-PDU handle of CAN L-PDU to be transmitted.
This handle specifies the corresponding CAN L-PDU ID and
Parameters (in):
implicitly the CAN Driver instance as well as the corresponding
CAN controller device.
96 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
PduInfoPtr Pointer to a structure with CAN L-PDU related data: DLC and
pointer to CAN L-SDU buffer
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Transmit request has been accepted
Return value:
E_NOT_OK: Transmit request has not been accepted
Description: This service initiates a request for transmission of the CAN L-PDU specified by the
CanTxPduId and CAN related data in the L-PDU structure.
⌋(BSW01008)
Note: The corresponding CAN controller and HTH have to be resolved by the
CanTxPduId.
Note: PduInfoPtr is a pointer to a SDU user memory, CAN Identifier, PDU handle and
DLC (see [8] Specification of CAN Driver).
[CANIF243] ⌈The CanIf shall set the ‘identifier extension flag’ (see [18]ISO11898 –
Road vehicles - controller area network (CAN)) of the CanId before the CanIf passes
the static predefined CanId to the CanDrv at call of Can_Write(). The CanId format
type of each CAN L-PDU can be configured by
CANIF_CANIFTXPDUID_CANIDTYPE, refer to CANIF590_Conf.⌋(BSW01141)
.[CANIF162] ⌈If the call of Can_Write() returns E_OK the transmit request service
CanIf_Transmit() shall return E_OK.⌋()
8.3.5 CanIf_CancelTransmit
[CANIF520] ⌈
Service name: CanIf_CancelTransmit
Syntax: Std_ReturnType CanIf_CancelTransmit(
PduIdType CanTxPduId
)
Service ID[hex]: 0x18
Sync/Async: Synchronous
Reentrancy: Non Reentrant
CanTxPduId L-PDU handle of CAN L-PDU to be transmitted.
This handle specifies the corresponding CAN L-PDU ID and
Parameters (in):
implicitly the CAN Driver instance as well as the corresponding
CAN controller device.
Parameters None
(inout):
Parameters (out): None
Return value: Std_ReturnType Always return E_OK
Description: This is a dummy method introduced for interface compatibility.
⌋()
8.3.6 CanIf_ReadRxPduData
[CANIF194] ⌈
Service name: CanIf_ReadRxPduData
Syntax: Std_ReturnType CanIf_ReadRxPduData(
PduIdType CanRxPduId,
PduInfoType* PduInfoPtr
)
Service ID[hex]: 0x06
Sync/Async: Synchronous
Reentrancy: Non Reentrant
CanRxPduId Receive L-PDU handle of CAN L-PDU.
This handle specifies the corresponding CAN L-PDU ID and
Parameters (in):
implicitly the CAN Driver instance as well as the corresponding
CAN controller device.
Parameters None
(inout):
PduInfoPtr Pointer to a structure with CAN L-PDU related data: DLC and
Parameters (out):
pointer to CAN L-SDU buffer
Std_ReturnType E_OK: Request for L-PDU data has been accepted
Return value:
E_NOT_OK: No valid data has been received
Description: This service provides the CAN DLC and the received data of the requested
CanRxPduId to the calling upper layer.
⌋(BSW01125, BSW01129, BSW01129)
8.3.7 CanIf_ReadTxNotifStatus
[CANIF202] ⌈
Service name: CanIf_ReadTxNotifStatus
Syntax: CanIf_NotifStatusType CanIf_ReadTxNotifStatus(
PduIdType CanTxPduId
)
Service ID[hex]: 0x07
Sync/Async: Synchronous
Reentrancy: Non Reentrant
CanTxPduId L-PDU handle of CAN L-PDU to be transmitted.
This handle specifies the corresponding CAN L-PDU ID and
Parameters (in):
implicitly the CAN Driver instance as well as the
corresponding CAN controller device.
Parameters None
(inout):
Parameters (out): None
CanIf_NotifStatusTypeCurrent confirmation status of the corresponding CAN Tx L-
Return value:
PDU.
Description: This service returns the confirmation status (confirmation occured of not) of a
specific static or dynamic CAN Tx L-PDU, requested by the CanTxPduId.
⌋(BSW01130)
Note: This function notifies the upper layer about any transmit confirmation event to
the corresponding requested CAN L-PDU.
8.3.8 CanIf_ReadRxNotifStatus
[CANIF230] ⌈
Service name: CanIf_ReadRxNotifStatus
Syntax: CanIf_NotifStatusType CanIf_ReadRxNotifStatus(
PduIdType CanRxPduId
)
Service ID[hex]: 0x08
Sync/Async: Synchronous
Reentrancy: Non Reentrant
CanRxPduId L-PDU handle of CAN L-PDU to be received.
This handle specifies the corresponding CAN L-PDU ID and
Parameters (in):
implicitly the CAN Driver instance as well as the
corresponding CAN controller device.
Parameters None
(inout):
Parameters (out): None
CanIf_NotifStatusTypeCurrent indication status of the corresponding CAN Rx L-
Return value:
PDU.
Description: This service returns the indication status (indication occurred or not) of a specific
CAN Rx L-PDU, requested by the CanRxPduId.
⌋(BSW01130, BSW01131)
Note: This function notifies the upper layer about any receive indication event to the
corresponding requested CAN L-PDU.
8.3.9 CanIf_SetPduMode
[CANIF008] ⌈
Service name: CanIf_SetPduMode
Syntax: Std_ReturnType CanIf_SetPduMode(
uint8 ControllerId,
CanIf_PduSetModeType PduModeRequest
)
Service ID[hex]: 0x09
Sync/Async: Synchronous
Reentrancy: Non Reentrant
ControllerId All PDUs of the own ECU connected to the corresponding CanIf
ControllerId, which is assigned to a physical CAN controller are
Parameters (in):
addressed.
PduModeRequestRequested PDU mode change (see CanIf_PduSetModeType)
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Request for mode transition has been accepted.
Return value: 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.
⌋()
Note: The channel parameter denoting the predefined logical PDU channel can be
derived from parameter ControllerId of function CanIf_SetPduMode().
8.3.11 CanIf_GetVersionInfo
[CANIF158] ⌈
Service name: CanIf_GetVersionInfo
Syntax: void CanIf_GetVersionInfo(
Std_VersionInfoType* VersionInfo
)
Service ID[hex]: 0x0b
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): None
Parameters None
(inout):
Parameters (out): VersionInfo Pointer to where to store the version information of this module.
Return value: None
103 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
Description: This service returns the version information of the called CAN Interface module.
⌋(BSW00407, BSW00411)
Implementation hint: If source code for caller and callee of this function is available
this function should be realized as a macro. The macro should be defined in the
modules header file.
8.3.12 CanIf_SetDynamicTxId
[CANIF189] ⌈
Service name: CanIf_SetDynamicTxId
Syntax: void CanIf_SetDynamicTxId(
PduIdType CanTxPduId,
Can_IdType CanId
)
Service ID[hex]: 0x0c
Sync/Async: Synchronous
Reentrancy: Non Reentrant
CanTxPduId L-PDU handle of CAN L-PDU for transmission.
This ID specifies the corresponding CAN L-PDU ID and implicitly the
Parameters (in): CAN Driver instance as well as the corresponding CAN controller
device.
CanId Standard/Extended CAN ID of CAN L-PDU that shall be transmitted.
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This service reconfigures the corresponding CAN identifier of the requested CAN
L-PDU.
⌋()
8.3.13 CanIf_SetTrcvMode
[CANIF287] ⌈
Service name: CanIf_SetTrcvMode
Syntax: Std_ReturnType CanIf_SetTrcvMode(
uint8 TransceiverId,
CanTrcv_TrcvModeType TransceiverMode
)
Service ID[hex]: 0x0d
Sync/Async: Asynchronous
Reentrancy: Non Reentrant
TransceiverId Abstracted CanIf TransceiverId, which is assigned to a CAN
Parameters (in): transceiver, which is requested for mode transition
TransceiverMode Requested mode transition
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Transceiver mode request has been accepted.
Return value:
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.
⌋()
Note: For more details, please refer to the [9] Specification of CAN Transceiver
Driver.
8.3.14 CanIf_GetTrcvMode
[CANIF288] ⌈
Service name: CanIf_GetTrcvMode
Syntax: Std_ReturnType CanIf_GetTrcvMode(
106 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
CanTrcv_TrcvModeType* TransceiverModePtr,
uint8 TransceiverId
)
Service ID[hex]: 0x0e
Sync/Async: Synchronous
Reentrancy: Non Reentrant
TransceiverId Abstracted CanIf TransceiverId, which is assigned to a CAN
Parameters (in):
transceiver, which is requested for current operation mode.
Parameters None
(inout):
TransceiverModePtrRequested mode of requested network the Transceiver is
Parameters (out):
connected to.
Std_ReturnType E_OK: Transceiver mode request has been accepted.
Return value: 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.
⌋()
Note: For more details, please refer to the [9] Specification of CAN Transceiver
Driver
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 [9]
Specification of CAN Transceiver Driver.
8.3.16 CanIf_SetTrcvWakeupMode
[CANIF290] ⌈
Service name: CanIf_SetTrcvWakeupMode
Syntax: Std_ReturnType CanIf_SetTrcvWakeupMode(
uint8 TransceiverId,
CanTrcv_TrcvWakeupModeType TrcvWakeupMode
)
Service ID[hex]: 0x10
Sync/Async: Synchronous
Reentrancy: Non Reentrant
TransceiverId Abstracted CanIf TransceiverId, which is assigned to a CAN
transceiver, which is requested for wake up notification mode
Parameters (in):
transition.
TrcvWakeupModeRequested transceiver wake up notification mode
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Will be returned, if the wake up notifications state has
been changed to the requested mode.
Return value: 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.
⌋()
Note: For more details, please refer to [9] Specification of CAN Transceiver Driver.
Note: The following three paragraphs are already described in the Specification of
CanTrcv (see [9]). 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_SetTrcvWakeupMode() (depending on the implementation).
CANIF_TRCV_WU_DISABLE:
No notifications for wake-up events for the addressed CanNetwork are passed
through the CanTrcv. The transceiver device and the underlying communication
driver has to buffer detected wake-up events and raise the event(s), when the wake-
up notification is enabled again.
CANIF_TRCV_WU_CLEAR:
If notification of wake-up events is disabled (see description of mode
CANIF_TRCV_WU_DISABLE), detected wake-up events are buffered. Calling
CanIf_SetTrcvWakeupMode() with parameter CANIF_TRCV_WU_CLEAR clears
these bufferd events. Clearing of wake-up events has to be used, when the wake-up
notification is disabled to clear all stored wake-up events under control of the higher
layers of the CanTrcv.
8.3.18 CanIf_CheckValidation
[CANIF178]⌈
Service name: CanIf_CheckValidation
Syntax: Std_ReturnType CanIf_CheckValidation(
EcuM_WakeupSourceType WakeupSource
)
Service ID[hex]: 0x12
Sync/Async: Synchronous
111 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
Reentrancy: Reentrant
WakeupSource Source device which initiated the wake-up event and which has to
Parameters (in):
be validated: CAN controller or CAN transceiver
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Will be returned, if the check validation request has been
accepted.
Return value:
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.
⌋()
8.3.19 CanIf_GetTxConfirmationState
[CANIF734] ⌈
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)
ControllerId Abstracted CanIf ControllerId which is assigned to a
Parameters (in):
CAN controller
Parameters None
(inout):
Parameters (out): None
112 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
CanIf_NotifStatusType Combined TX confirmation status for all TX PDUs of the
Return value:
CAN controller
Description: This service reports, if any TX confirmation has been done for the whole CAN
controller since the last CAN controller start.
⌋()
8.3.20 CanIf_ClearTrcvWufFlag
[CANIF760] ⌈
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 designated CAN transceiver
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Request has been accepted
Return value:
E_NOT_OK: Request has not been accepted
Description: Requests the CanIf module to clear the WUF flag of the designated CAN
transceiver.
⌋()
8.3.21 CanIf_CheckTrcvWakeFlag
[CANIF761] ⌈
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 designated CAN transceiver
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Request has been accepted
Return value:
E_NOT_OK: Request has not been accepted
Description: Requests the CanIf module to check the Wake flag of the designated CAN
transceiver.
⌋()
8.3.22 CanIf_CheckBaudrate
[CANIF775] ⌈
Service name: CanIf_CheckBaudrate
Syntax: Std_ReturnType CanIf_CheckBaudrate(
uint8 ControllerId,
114 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
const uint16 Baudrate
)
Service ID[hex]: 0x1a
Sync/Async: Synchronous
Reentrancy: Reentrant
ControllerId CAN Controller to check for the support of a certain baudrate
Parameters (in):
Baudrate Baudrate to check in kbps
Parameters (inout): None
Parameters (out): None
Std_ReturnType E_OK: Baudrate supported by the CAN Controller
Return value:
E_NOT_OK: Baudrate not supported / invalid CAN controller
Description: This service shall check, if a certain CAN controller supports a requested
baudrate
⌋()
8.3.23 CanIf_ChangeBaudrate
[CANIF776]
Service name: CanIf_ChangeBaudrate
Syntax: Std_ReturnType CanIf_ChangeBaudrate(
uint8 ControllerId,
const uint16 Baudrate
)
Service ID[hex]: 0x1b
Sync/Async: Asynchronous
Reentrancy: Reentrant
Parameters (in): ControllerId CAN Controller, whose baudrate shall be changed
115 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
Baudrate Requested baudrate in kbps
Parameters (inout): None
Parameters (out): None
Std_ReturnType E_OK: Service request accepted, baudrate change started
Return value:
E_NOT_OK: Service request not accepted
Description: This service shall change the baudrate of the CAN controller.
⌋()
Note: This callback service in this chapter are implemented as many times as
underlying CAN Driver modules are used. In that case one callback is assigned to
one underlying CAN Driver module. The following naming convention has to be
considered: CanIf_<Callback function>_<CAN_Driver> (See [CANIF124in
subchapter 7.25.)
8.4.2 CanIf_RxIndication
[CANIF006] ⌈
Service name: CanIf_RxIndication
Syntax: void CanIf_RxIndication(
Can_HwHandleType Hrh,
Can_IdType CanId,
uint8 CanDlc,
const uint8* CanSduPtr
)
Service ID[hex]: 0x14
Sync/Async: Synchronous
Reentrancy: Reentrant
Hrh ID of the corresponding Hardware Object
Range: 0..(total number of HRH -1)
CanId Standard/Extended CAN ID of CAN L-PDU that has been
Parameters (in):
successfully received
CanDlc Data Length Code (length of CAN L-PDU payload)
CanSduPtr Pointer to received L-SDU (payload)
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This service indicates a successful reception of a received CAN Rx L-PDU to the
CanIf after passing all filters and validation checks.
⌋()
8.4.3 CanIf_CancelTxConfirmation
[CANIF101] ⌈
Service name: CanIf_CancelTxConfirmation
Syntax: void CanIf_CancelTxConfirmation(
PduIdType CanTxPduId,
const PduInfoType* PduInfoPtr
)
119 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
Service ID[hex]: 0x15
Sync/Async: Synchronous
Reentrancy: Non Reentrant
CanTxPduId ID of the L-PDU which shall be buffered in CanIf and replaced by a
new pending L-PDU with a higher priority.
Parameters (in):
PduInfoPtr Pointer to struct which contains the address of the HTH in which the
L-PDU is located and the length of the L-PDU.
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This service informs CanIf that a L-PDU shall be buffered in CanIf Tx´buffer from
CAN hardware object to avoid priority inversion.
⌋()
Note: This service always has to be available, so there does not exist an appropriate
configuration parameter.
8.4.5 CanIf_ConfirmPnAvailability
[CANIF815] ⌈
121 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
Service name: CanIf_ConfirmPnAvailability
Syntax: void CanIf_ConfirmPnAvailability(
uint8 TransceiverId
)
Service ID[hex]: 0x1a
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): TransceiverId CAN transceiver, which was checked for PN availability
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This service indicates that the transceiver is running in PN communication mode.
⌋()
Note: The CanIf passes the delivered parameter TransceiverId to the upper layer
module.
8.4.6 CanIf_ClearTrcvWufFlagIndication
[CANIF762] ⌈
Service name: CanIf_ClearTrcvWufFlagIndication
Syntax: void CanIf_ClearTrcvWufFlagIndication(
uint8 TransceiverId
122 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
)
Service ID[hex]: 0x20
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): TransceiverId CAN transceiver, for which this function was called.
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This service indicates that the transceiver has cleared the WufFlag.
⌋()
Note: The CanIf passes the delivered parameter TransceiverId to the upper layer
module.
8.4.7 CanIf_CheckTrcvWakeFlagIndication
[CANIF763] ⌈
Service name: CanIf_CheckTrcvWakeFlagIndication
Syntax: void CanIf_CheckTrcvWakeFlagIndication(
uint8 TransceiverId
)
Service ID[hex]: 0x21
Sync/Async: Synchronous
123 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
Reentrancy: Reentrant
Parameters (in): TransceiverId CAN transceiver, for which this function was called.
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This service indicates the reason for the wake up that the CAN transceiver has
detected.
⌋()
Note: The CanIf passes the delivered parameter TransceiverId to the upper layer
module.
8.4.8 CanIf_ControllerModeIndication
[CANIF699] ⌈
Service name: CanIf_ControllerModeIndication
Syntax: void CanIf_ControllerModeIndication(
uint8 ControllerId,
CanIf_ControllerModeType ControllerMode
)
Service ID[hex]: 0x17
Sync/Async: Synchronous
Reentrancy: Reentrant
124 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
ControllerId CAN controller, which state has been transitioned.
Parameters (in):
ControllerMode Mode to which the CAN controller transitioned
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This service indicates a controller state transition referring to the corresponding
CAN controller.
⌋()
8.4.9 CanIf_TrcvModeIndication
[CANIF764] ⌈
Service name: CanIf_TrcvModeIndication
Syntax: void CanIf_TrcvModeIndication(
uint8 TransceiverId,
CanTrcv_TrcvModeType TransceiverMode
)
Service ID[hex]: 0x18
Sync/Async: Synchronous
Reentrancy: Reentrant
TransceiverId CAN transceiver, which state has been transitioned.
Parameters (in):
TransceiverMode Mode to which the CAN transceiver transitioned
Parameters None
In this chapter all interfaces required from other modules are listed.
[CANIF040] ⌈
API function Description
Can_SetControllerMode This function performs software triggered state transitions of the
CAN controller State machine.
Can_Write --
SchM_Enter_CanIf_<ExclusiveArea> Invokes the SchM_Enter function to enter a module local
exclusive area.
SchM_Exit_CanIf_<ExclusiveArea> Invokes the SchM_Exit function to exit an exclusive area.
⌋()
[CANIF294] ⌈
API function Description
CanTrcv_CheckWakeup Service is called by underlying CANIF in case a wake up interrupt is
detected.
CanTrcv_GetBusWuReason Gets the wakeup reason for the Transceiver and returns it in parameter
Reason.
CanTrcv_GetOpMode Gets the mode of the Transceiver and returns it in OpMode.
CanTrcv_SetOpMode Sets the mode of the Transceiver to the value OpMode.
CanTrcv_SetWakeupMode Enables, disables or clears wake-up events of the Transceiver
according to TrcvWakeupMode.
Can_ChangeBaudrate This service shall change the baudrate of the CAN controller.
Can_CheckBaudrate This service shall check, if a certain CAN controller supports a
requested baudrate
Can_CheckWakeup This function checks if a wakeup has occurred for the given controller.
Det_ReportError Service to report development errors.
⌋()
The upper layer module provides the Service ID of the following functions.
8.6.3.1 <User_TxConfirmation>
[CANIF011] ⌈
Service name: <User_TxConfirmation>
Syntax: void <User_TxConfirmation>(
PduIdType TxPduId
)
Sync/Async: Synchronous
Reentrancy: Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters (in): TxPduId ID of the I-PDU that has been transmitted.
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: The lower layer communication module confirms the transmission of an I-PDU.
⌋()
Note: This callback service is called by the CanIf and implemented in the
corresponding upper layer module. It is called in case of a transmit confirmation of
the CanDrv.
Note: This type of confirmation callback service is mainly designed for the PduR,
CanNm and CanTp, but not exclusive.
Note: Parameter TxPduId specifies the corresponding CAN L-PDU ID and implicitly
the CanDrv instance as well as the corresponding CAN controller device. The range
is between 0 and ((maximum number of L-PDU IDs which may be transmitted by the
CanIf) -1).
Note: This kind of callback function is in general re-entrant for multiple CAN controller
or multiple CAN network usage (for different L-PDU IDs), but not for the same CAN
controller or CAN network (the same L-PDU ID).
Note: If transmit confirmations are not necessary or no upper layer modules are
configured for transmit confirmations and thus <User_TxConfirmation>() shall
not be called, CANIF_TXPDU_USERTXCONFIRMATION_UL and
CANIF_TXPDU_USERTXCONFIRMATION_NAME need not to be configured.
8.6.3.2 <User_RxIndication>
[CANIF012] ⌈
Service name: <User_RxIndication>
Syntax: void <User_RxIndication>(
PduIdType RxPduId,
PduInfoType* PduInfoPtr
)
Sync/Async: Synchronous
Reentrancy: Reentrant for different PduIds. Non reentrant for the same PduId.
RxPduId ID of the received I-PDU.
Parameters (in): PduInfoPtr Contains the length (SduLength) of the received I-PDU and a pointer to
a buffer (SduDataPtr) containing the I-PDU.
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Indication of a received I-PDU from a lower layer communication module.
⌋(BSW01003)
Note: This service indicates a successful reception of an L-PDU to the upper layer
module after passing all filters and validation checks.
Note: This callback service is called by the CanIf and implemented in the configured
upper layer module (e.g. PduR, CanNm, CanTp, etc.) if configured accordingly (see
CANIF529_Conf).
Note: Parameter / handle RxPduId identifies the received data. The range is between
0 and ((maximum number of L-PDU IDs which may be received by the CanIf) -1).
Note: This kind of callback function is in general reentrant for multiple CAN controller
or multiple CAN network usage (for different L-PDU IDs), but not for the same CAN
controller or CAN network (the same L-PDU ID).
Note: If receive indications are not necessary or no upper layer modules are
configured for receive indications and thus <User_RxIndication>() shall not be
called, CANIF_RXPDU_USERRXINDICATION_UL and
CANIF_RXPDU_USERRXINDICATION_NAME need not to be configured.
The value passed to CanNm via the API parameter CanNmRxPduId refers to the
CanNm channel handle within the CanNm module (see [12] Specification of CAN
Network Management).
8.6.3.3 <User_ValidateWakeupEvent>
[CANIF532] ⌈
Service name: <User_ValidateWakeupEvent>
Syntax: void <User_ValidateWakeupEvent>(
EcuM_WakeupSourceType sources
)
Sync/Async: (defined within providing upper layer module)
Reentrancy: (defined within providing upper layer module)
sources Validated CAN wakeup events. Every CAN controller or CAN transceiver
Parameters (in):
can be a separate wakeup source.
Parameters None
(inout):
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.
⌋()
Note: This callback service is mainly implemented in and used by the ECU State
Manager module (see Specification of ECU State Manager [15]).
Note: The CanIf calls this callback service. It is implemented by the configured upper
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.
8.6.3.4 <User_ControllerBusOff>
[CANIF014] ⌈
Service name: <User_ControllerBusOff>
Syntax: void <User_ControllerBusOff>(
uint8 ControllerId
)
Sync/Async: (defined within providing upper layer module)
Reentrancy: (defined within providing upper layer module)
ControllerId Abstracted CanIf ControllerId which is assigned to a CAN controller,
Parameters (in):
at which a BusOff occurred.
Parameters None
(inout):
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).
⌋(BSW01029)
Note: This callback service is mainly implemented in and used by the CanSm (see
Specification of CAN State Manager [11]).
Note: This callback service is called by the CanIf and implemented by the configured
upper layer module. It is called in case of a BusOff notification via
CanIf_ControllerBusOff() of the CanDrv. The delivered parameter
ControllerId of the service CanIf_ControllerBusOff() is passed to the
upper layer module.
8.6.3.5 <User_ConfirmPnAvailability>
[CANIF821] ⌈
Service name: <User_ConfirmPnAvailability>
Syntax: void <User_ConfirmPnAvailability>(
uint8 TransceiverId
)
Sync/Async: (defined within providing upper layer module)
Reentrancy: (defined within providing upper layer module)
Parameters (in): TransceiverId CAN transceiver, which was checked for PN availability
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This service indicates that the CAN transceiver is running in PN communication
mode.
⌋()
Note: This callback service is mainly implemented in and used by the CanSm (see
Specification of CAN State Manager [11]).
8.6.3.6 <User_ClearTrcvWufFlagIndication>
[CANIF788] ⌈
Service name: <User_ClearTrcvWufFlagIndication>
Syntax: void <User_ClearTrcvWufFlagIndication>(
uint8 TransceiverId
)
Sync/Async: Synchronous
Reentrancy: Non Reentrant
TransceiverId Abstracted CanIf TransceiverId, for which this function was
Parameters (in):
called.
Parameters None
(inout):
Parameters (out): None
Return value: None
136 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
Description: This service indicates that the CAN transceiver has cleared the WufFlag. This
function is called in CanIf_ClearTrcvWufFlagIndication.
⌋()
Note: This callback service is mainly implemented in and used by the CanSm (see
Specification of CAN State Manager [11]).
8.6.3.7 <User_CheckTrcvWakeFlagIndication>
[CANIF814] ⌈
Service name: <User_CheckTrcvWakeFlagIndication>
Syntax: void <User_CheckTrcvWakeFlagIndication>(
uint8 TransceiverId
)
Sync/Async: Synchronous
Reentrancy: Non Reentrant
TransceiverId Abstracted CanIf TransceiverId, for which this function was
Parameters (in):
called.
Parameters None
(inout):
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.
⌋()
Note: This callback service is mainly implemented in and used by the CanSm (see
Specification of CAN State Manager [11]).
8.6.3.8 <User_ControllerModeIndication>
[CANIF687] ⌈
Service name: <User_ControllerModeIndication>
Syntax: void <User_ControllerModeIndication>(
uint8 ControllerId,
CanIf_ControllerModeType ControllerMode
)
Sync/Async: Synchronous
Reentrancy: Non Reentrant
ControllerId Abstracted CanIf ControllerId which is assigned to a CAN
Parameters (in): controller, at which a controller state transition occurred.
ControllerMode Notified CAN controller mode
Parameters None
(inout):
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).
⌋()
Note: This callback service is mainly implemented in and used by the CAN State
Manager module (see Specification of CAN State Manager [11]).
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_ControllerModeIndication() of the CanDrv. The delivered parameter
ControllerId of the service CanIf_ControllerModeIndication() is passed
to the upper layer module. The delivered parameter ControllerMode of the service
CanIf_ControllerModeIndication() is mapped to the appropriate parameter
ControllerMode of <User_ControllerModeIndication>().
Note: For different upper layer users different service names shall be used.
139 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
8.6.3.9 <User_TrcvModeIndication>
[CANIF693] ⌈
Service name: <User_TrcvModeIndication>
Syntax: void <User_TrcvModeIndication>(
uint8 TransceiverId,
CanTrcv_TrcvModeType TransceiverMode
)
Sync/Async: Synchronous
Reentrancy: Non Reentrant
TransceiverId Abstracted CanIf TransceiverId which is assigned to a CAN
Parameters (in): transceiver, at which a transceiver state transition occurred.
TransceiverMode Notified CAN transceiver mode
Parameters None
(inout):
140 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
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).
⌋()
Note: This callback service is mainly implemented in and used by the CAN State
Manager module (see Specification of CAN State Manager [11]).
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_TrcvModeIndication() of the CanTrcv. The delivered parameter
Transceiver of the service CanIf_TrcvModeIndication() is mapped (as
configured) to the appropriate parameter TransceiverId which will be passed to
the upper layer module. The delivered parameter TransceiverMode of the service
CanIf_TrcvModeIndication() is mapped to the appropriate parameter
TransceiverMode of <User_TrcvModeIndication>().
Note: For different upper layer users different service names shall be used.
If no upper layer modules are configured for state transition notifications using
<User_TrcvModeIndication>(), no state transition notification needs to be
configured.
9 Sequence diagrams
The following sequence diagrams show the interactions between CanIf and CanDrv.
Can_Write(Can_ReturnType, Can_HwHandleType,
const Can_PduType*)
Can_Write()
SchM_Enter_CanIf_<ExclusiveArea>()
ENTER
CRITICAL SchM_Enter_CanIf_<ExclusiveArea>()
SECTION
SchM_Exit_CanIf_<ExclusiveArea>()
LEAVE
CRITICAL SchM_Exit_CanIf_<ExclusiveArea>()
SECTION
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-PDU. 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-PDU related data such as
CanSduLength and *CanSduPtr.
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 service Can_Write() returns E_OK to CanIf_Transmit().
E_BUSY from Can_Write service If the CanDrv detects, there are no free hardware objects
available, it returns CAN_E_BUSY to the CanIf.
Copying into the buffer The L-PDU of the rejected transmit request will be
inserted in the transmit buffer of the CanIf until the next
transmit confirmation.
143 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
E_OK from CAN Interface CanIf_Transmit() returns E_OK to the upper layer.
Can_Write(Can_ReturnType, Can_HwHandleType,
const Can_PduType*)
ENTER SchM_Enter_CanIf_<ExclusiveArea>()
CRITICAL
SchM_Enter_CanIf_<ExclusiveArea>()
SECTION
LEAVE SchM_Exit_CanIf_<ExclusiveArea>()
CRITICAL
SECTION SchM_Exit_CanIf_<ExclusiveArea>()
CanIf_Transmit()
SchM_Enter_CanIf_<ExclusiveArea>()
ENTER
CRITICAL SchM_Enter_CanIf_<ExclusiveArea>()
SECTION
Insert L-PDU in
transmit buffer()
LEAVE SchM_Exit_CanIf_<ExclusiveArea>()
CRITICAL
SECTION SchM_Exit_CanIf_<ExclusiveArea>()
CanIf_Transmit()
Transmit
Interrupt()
CanIf_TxConfirmation(PduIdType)
<User_TxConfirmation>(PduIdType)
<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 the CAN Interface CAN Driver calls the service
CanIf_TxConfirmation(). The parameter
CanTxPduId specifies the CAN L-PDU previously sent
by Can_Write().
The CAN diver 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>(). It signals a
successful L-PDU transmission to the upper layer.
BSW Scheduler
<User_TxConfirmation>(PduIdType)
<User_TxConfirmation>()
CanIf_TxConfirmation()
Can_MainFunction_Write()
Activity Description
Cyclic Task The service Can_MainFunction_Write()is called
CAN Driver by the BSW Scheduler.
Check for pending transmit Can_MainFunction_Write()checks the underlying
confirmations CAN 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 CAN Interface CAN Driver calls the service
CanIf_TxConfirmation() The parameter
CanTxPduId specifies the CAN L-PDU previously sent by
Can_Write().
The CAN diver 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>(). It signals a
successful L-PDU transmission to the upper layer.
Transmit Confirmation
Interrupt()
CanIf_TxConfirmation(PduIdType)
ENTER SchM_Enter_CanIf_<ExclusiveArea>()
CRITICAL
SECTION SchM_Enter_CanIf_<ExclusiveArea>()
check transmit
buffers for other
pending
L-PDU()
[Buffer is empty]
SchM_Exit_CanIf_<ExclusiveArea>()
LEAVE
CRITICAL SchM_Exit_CanIf_<ExclusiveArea>()
SECTION
<User_TxConfirmation>(PduIdType)
<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 CAN Interface CanDrv calls service CanIf_TxConfirmation().
Parameter CanTxPduId specifies the CAN L-PDU
previously transmitted by Can_Write(). CanDrv must
store the L-PDU IDs of all in HTHs pending L-PDUs in an
array organized per HTH to avoid new search of the L-
PDU ID for call of CanIf_TxConfirmation().
ENTER CRITICAL SECTION Protect transmit buffers from being corrupted. This is
done by entering an exclusive area defined in the SchM.
Check of transmit buffers The transmit buffers of the CanIf checked, whether a
pending L-PDU is stored or not.
Transmit request passed to the CAN In case of pending L-PDUs in the transmit buffers the
Driver highest 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 from The L-PDU pending for transmission is removed from the
transmit buffers transmission buffers by the CanIf.
LEAVE CRITICAL SECTION End of protection segment.
Confirmation to the upper layer Calling of the corresponding upper layer confirmation
service <User_TxConfirmation>(). It signals a
CanIf_Transmit(Std_ReturnType, PduIdType,
const PduInfoType*) :Std_ReturnType The CAN Driver stores the L-PDU ID
Can_Write(Can_ReturnType, in a corresponding array
Can_HwHandleType, const
Can_PduType*) Search free hardware
object()
Search free hardware
object()
[New Tx L-PDU has lower priority than al l of the pending ones in the CAN hardware]
Nothing to do
[New Tx L-PDU has same or higher prio rity than one of the pending ones in the CAN hardware]
Request Cancellation of pending L-PDU with lower
priority()
Request Cancellation of pending L-PDU with lower
priority()
Can_Write()
ENTER SchM_Enter_CanIf_<ExclusiveArea>()
CRITICAL
SECTION SchM_Enter_CanIf_<ExclusiveArea>() ATTENTION:
CanIf_Transmit()
ENTER SchM_Enter_CanIf_<ExclusiveArea>()
CRITICAL
SECTION SchM_Enter_CanIf_<ExclusiveArea>()
SchM_Exit_CanIf_<ExclusiveArea>()
LEAVE
SchM_Exit_CanIf_<ExclusiveArea>()
CRITICAL
SECTION Can_Write(Can_ReturnType,
Can_HwHandleType, const
Copy L-PDU into free CAN hardware
Can_PduType*)
object()
Copy L-PDU into free CAN hardware
Tx L-PDU of highest Can_Write() object()
priority (lowest CAN ID)
is transmitted out of the CanIf_CancelTxConfirmation()
Tx L-PDU buffer
Confirmation of cancelled transmit
L-PDU()
Activity Description
Transmission request The upper layer initiates a transmit request via the service
CanIf_Transmit(). The parameter CanTxPduId identifies the
requested L-PDU. 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-PDU related data such as CanSduLength and
*CanSduPtr.
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 service Can_Write() returns E_OK to CanIf_Transmit().
E_BUSY from Can_Write If the CanDrv detects, there are no free hardware objects
service without transmit available and the new transmit L-PDU has lower priority than all
abort of the pending ones in the CAN hardware have, it returns
CAN_E_BUSY to the CanIf.
E_BUSY from Can_Write If the CanDrv detects, there are no free hardware objects
service with transmit abort available and the new transmit L-PDU has higher priority than all
of the pending ones in the CAN hardware, it requested transmit
abort of the pending L-PDU in the CAN hardware with the lowest
priority and returns CAN_E_BUSY to the CanIf.
Transmit buffer The CanIf stores the rejected L-PDU in the transmit buffers.
E_OK from CAN Interface CanIf_Transmit() returns E_OK to the upper layer.
Com_MainFunctionTx()
PduR_ComTransmit(Std_ReturnType,
PduIdType, const PduInfoType*)
CanIf_Transmit(Std_ReturnType, PduIdType,
const PduInfoType*)
Can_Write(Can_ReturnType,
Can_HwHandleType, const
altCan_PduType*)
CAN controller
Copy L-PDU into CAN Hardware()
[CAN controller hardware object is free]
Copy L-PDU into CAN Hardware()
Can_Write()
SchM_Enter_CanIf_<ExclusiveArea>()
ENTER
CRITICAL SchM_Enter_CanIf_<ExclusiveArea>()
SECTION
Insert L-PDU in
transmit buffer()
LEAVE SchM_Exit_CanIf_<ExclusiveArea>()
CRITICAL SchM_Exit_CanIf_<ExclusiveArea>()
SECTION
CanIf_Transmit()
PduR_ComTransmit()
Tcom: Activate
timeout
Com_MainFunctionTx() supervision()
alt Transmission
Transmit
[Successful] CanIf_TxConfirmation(PduIdType) Interrupt()
PduR_CanIfTxConfirmation(PduIdType)
Com_TxConfirmation(PduIdType)
Com_TxConfirmation()
PduR_CanIfTxConfirmation()
CanIf_TxConfirmation()
Transmit
Interrupt()
[TRUE]
[TRUE]
Tcom: Timer
expired()
PduR_ComCancelTransmit(PduIdType,
Std_ReturnType)
CanIf_CancelTransmit(PduIdType,
Std_ReturnType)
Dummy API:
Can_CancelTransmit()
CanIf_CancelTransmit()
PduR_ComCancelTransmit()
[FALSE]
[FALSE]
[FALSE]
If TURNED OFF, no code is complied. Sametimeout handling as in OSEK COM
Activity Description
Call of scheduled Function Com_MainFunctionTx() will be called cyclic by the SchM.
Transmission request to the Within cyclic called Com_MainFunctionTx() a transmission
PDU Router request through the PduR arises: PduR_ComTransmit()
152 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
Transmission request to the PduR passes the transmit request via CanIf_Transmit() to
CAN Interface the CanIf. The parameter CanTxPduId identifies the requested
L-PDU. 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-PDU related data such as
CanSduLength and *CanSduPtr.
Transmission request to the CanIf_Transmit() requests a transmission and calls the
CAN Driver CanDrv service Can_Write() with corresponding processing
of the HTH.
Transmission request to the Can_Write()writes all L-PDU data in the CAN Hardware (if it is
hardware free) and sets the hardware request for transmission.
E_OK from Can_Write service Can_Write() returns E_OK to CanIf_Transmit().
E_BUSY from Can_Write If the CanDrv detects, there are no free hardware objects
service available, it returns CAN_E_BUSY to the 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 CAN Interface CanIf_Transmit() returns E_OK to the PduR.
E_OK from PDU Router PduR_ComTransmit() returns E_OK to the COM.
Starting Timeout supervision The PduR starts a timeout supervision which checks if a
confirmation for the successful transmission will arrive.
E_OK from COM The Com_MainFunctionTx() returns E_OK to the SchM.
Receive
Interrupt()
Invalidation of
hardware object()
Invalidation of
hardware object()
CanIf_RxIndication(Can_HwHandleType,
Can_IdType, uint8, const uint8*)
<User_RxIndication>()
CanIf_RxIndication()
Validation of
hardware object()
Validation of
hardware object()
Receive
Interrupt()
Activity Description
Receive Interrupt The CAN controller signals a successful reception and
triggers a receive interrupt.
Invalidation of CAN hardware object, The CPU (CAN Driver) get exclusive access rights to the
154 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
provide CPU access to CAN mailbox CAN mailbox or at least to the corresponding hardware
object, where new data were received.
Buffering, normalizing The L-SDU is normalized and is buffered in the
temporary buffer located in the CAN Driver. Each CAN
Driver owns a temporary buffer for every physical
channel only if normalizing of the data is necessary.
Indication to The reception is indicated to the CAN Interface by calling
CAN Interface 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 the CAN Interface by
*CanSduPtr.
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.
DLC check If the L-PDU is found, the DLC of the received L-PDU is
compared with the expected, statically configured one for
the received L-PDU.
Receive Indication to the upper layer The corresponding receive indication service of the
upper layer is called. This signals a successful reception
to the target upper layer. The parameter CanPduId
specifies the
L-PDU, 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 object, The CAN controller get back exclusive access rights to
allow access of CAN controller to the CAN mailbox or at least to the corresponding
CAN mailbox hardware object, where new data were already being
copied into the upper layer buffer.
BSW Scheduler
al t Pendi ng Rx indication
CanIf_RxIndication(Can_HwHandleType,
Can_IdType, uint8, const uint8*)
Copy
data()
Copy
data()
<User_RxIndication>()
CanIf_RxIndication()
Validation of
hardware object()
Validation of
hardware object()
Can_MainFunction_Read()
Can_MainFunction_Read()
Activity Description
Cyclic Task The service Can_MainFunction_Read()is called by
CAN Driver the BSW Scheduler.
Check for new received L-PDU Can_MainFunction_Read()checks the underlying
CAN controller(s) about new received L-PDUs.
Invalidation of CAN hardware object, In case of a new receive event the CPU (CAN Driver) get
provide CPU access to CAN mailbox exclusive access rights to the CAN mailbox or at least to
the corresponding hardware object, where new data
were received.
Receive
Interrupt()
Invalidation of
hardware object()
Invalidation of
hardware object()
CanIf_RxIndication(Can_HwHandleType,
Can_IdType, uint8, const uint8*)
Here no
[L-PDU reception in
temporary buffer
BasicCAN]:Software filtering
in CAN driver is
and L-PDU assignment()
used.
Set
Indication
Flag()
<User_RxIndication>(PduIdType, const
uint8*)
<User_RxIndication>()
CanIf_RxIndication()
Validation of
hardware object()
Validation of
hardware object()
Receive
Interrupt()
Read
For transmit CAN L-PDUs, the service Indication flag()
CanIf_ReadNotifStatus returns the
Confirmation flag status
Reset Indication
flag()
CanIf_ReadNotifStatus()
CanIf_ReadRxPduData ()
Activity Description
Receive Interrupt The CAN controller signals a successful reception and
triggers a receive interrupt.
Invalidation of CAN hardware object, The CPU (CAN Driver) get exclusive access rights to the
158 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
provide CPU access to CAN mailbox CAN mailbox or at least to the corresponding hardware
object, where new data were received.
Buffering, normalizing The L-SDU is normalized and is buffered in the
temporary buffer located in the CAN Driver. Each CAN
Driver owns a temporary buffer for every physical
channel only if normalizing of the data is necessary.
Indication to The reception is indicated to the CAN Interface by calling
CAN Interface 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 the CAN Interface by
*CanSduPtr.
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.
DLC check If the L-PDU is found, the DLC 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 the CAN Interface. During
access the CAN hardware buffers must be unlocked for
CPU access/locked fro CAN controller access.
Indication Flag Set indication status flag for the received L-PDU in the
CAN Interface.
Receive Indication to the upper layer The corresponding receive indication service of the
upper layer is called. This signals a successful reception
to the target upper layer. The parameter CanPduId
specifies the
L-PDU, the second parameter is the reference on the
temporary buffer within the L-SDU.
Validation of CAN hardware object, The CAN controller get back exclusive access rights to
allow access of CAN controller to the CAN mailbox or at least to the corresponding
CAN mailbox hardware object, where new data were already being
copied into the upper layer 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_ReadRxNotifStatus().
loop Requesting CAN controller mode consecutively. If m ode changed -> CanIf_ControllerModeIndication()
Can_MainFunction_Mode()
Can_SetControllerMode(Can_ReturnType, uint8,
Can_StateTransitionType)
Disable Wakeup
interrupt, if supported()
CanIf_ControllerModeIndication(uint8,
CanIf_ControllerModeType)
Change to
CANIF_CS_STARTED() Can_MainFunction_Mo de() detects the
<User_ControllerModeIndication>(uint8, successful mode transition to STARTED
CanIf_ControllerModeType) which results in a call of
<User_ControllerModeIndication>()
CanIf_ControllerModeIndication() CanIf_ControllerModeIndication()
Change to
<User_ControllerModeIndication>(uint8, CANIF_CS_STARTED() CanIf_ControllerM odeIndication is called
CanIf_ControllerModeType) during Can_SetControllerMode(). This
<User_ControllerModeIndication>() happens if CAN controller transitions fast
CanIf_ControllerModeIndication() enough.
[STARTED]
CanIf_ControllerModeIndication(uint8,
CanIf_ControllerModeType)
Change to
CANIF_CS_STARTED()
<User_ControllerModeIndication>(uint8,
CanIf_ControllerModeType)
<User_ControllerModeIndication>()
CanIf_ControllerModeIndication()
[SLEEP]
Can_SetControllerMode returns with CAN_NOT_OK ()
CanIf_SetControllerMode returns with E_NOT_OK() CAN Driver module not even requests CAN
controller to transition to START mode
This sequence diagram resembles “Stop CAN network” or “Sleep CAN network”.
Activity Description
160 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
Loop requesting CAN controller The Can_MainFunction_Mode() is triggered
mode consecutively. consecutively. It checks the HW if a controller mode has
changed. If so, it is notified via a function call of
CanIf_ControllerModeIndication(Controller,
ControllerMode).
The upper layer requests The upper layer calls CanIf_SetControllerMode
“STARTED” mode of the desired (ControllerId, CANIF_CS_STARTED) to request
CAN controller STARTED mode for the requested CAN controller.
CanDrv disables wake up interrupts, This is only done in case of requesting “STARTED”
if supported mode. If “SLEEP” mode of CAN controller is requested,
here the wake up interrupts are enabled. In case of
“STOPPED”, nothing happens.
CanDrv requests the CAN controller During function call
to transition into the requested Can_SetControllerMode(Controller,
mode (CAN_T_START). Can_StateTransitionType), the CanDrv enters the
request into the hardware of the CAN controller. This
may mean that the 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 STOPPED The former request Can_SetControllerMode()
mode returns and 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,
CANIF_CS_STARTED) . Then the CanIf updates its
CCMSM mode.
CAN controller was in STOPPED During the former request
mode and the CAN controller Can_SetControllerMode() the function
transitions very fast so that mode CanIf_ControllerModeIndication(Controller,
indication is called during transition CANIF_CS_STARTED) is called to inform the CanIf
request directly about the successful mode transition. Then the
CanIf updates its CCMSM mode. When
CanIf_ControllerModeIndication(Controller,
CANIF_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 STARTED During the former request
mode Can_SetControllerMode() the function
CanIf_ControllerModeIndication(Controller,
CANIF_CS_STARTED) is called to inform the CanIf
directly about the successful mode transition (because
the mode was already started). Then the CanIf updates
its CCMSM mode (not really necessary). When
CanIf_ControllerModeIndication(Controller,
CANIF_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 SLEEP mode This transition is not allowed -> CAN_NOT_OK and
E_NOT_OK.
BusOff Detection()
CanIf_ControllerBusOff(uint8)
Change to
CANIF_CS_STOP PED()
Transmit queues being
reset to avoid
Reset transmission of old L-
transmit PDUs after CAN
<User_ControllerBusOff>(uint8) queue() controller restart
<User_ControllerBusOff>()
CanIf_ControllerBusOff()
BusOff Detection()
Activity Description
BusOff detection interrupt The CAN controller signals a BusOff event.
Stop CAN controller CAN controller is set to STOPPED mode by the CAN
Driver, if necessary.
BusOff indication to CAN Interface BusOff is notified to the CanIf by calling of
CanIf_ControllerBusOff()
BusOff indication to upper layer BusOff is notified to the upper layer by calling of
(CanSM) <User_ControllerBusOff>()
[STOPPED]
CanIf_ControllerBusOff(uint8)
<User_ControllerBusOff>()
CanIf_ControllerBusOff()
BusOff Detection()
Can_SetContollerMode()
CanIf_SetControllerMode()
CanIf_ControllerModeIndication(uint8,
CanIf_ControllerModeType)
Change to
CANIF_CS_STARTED()
<User_ControllerModeIndication>(uint8,
CanIf_ControllerModeType)
<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 CAN Interface BusOff is notified to the CanIf by calling of
CanIf_ControllerBusOff().The transmit buffers
inside the CanIf will be reset.
BusOff indication to upper layer BusOff is notified to the upper layer by calling of
<User_ControllerBusOff>()
Upper Layer (CanSM) initiates After a time specified by the BusOff Recovery algorithm
BusOff Recovery the Recovery process itself in initiated by
163 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
CanIf_SetControllerMode
(ControllerId, CANIF_CS_STARTED).
Restart of CAN controller The driver restarts the CAN controller by call of
Can_SetControllerMode (Controller,
CAN_T_STARTED).
10 Configuration specification
In general, this chapter defines configuration parameters and their clustering into
containers. In order to support the specification chapter 10.1 describes fundamentals.
It also specifies a template (table) you shall use for the parameter specification. We
intend to leave chapter 10.1 in the specification to guarantee comprehension.
Chapter 10.2 specifies the structure (containers) and the parameters of the CanIf.
The following is only a short survey of the topic and it will not replace the ECU
Configuration Specification document.
10.1.2 Variants
Variants describe sets of configuration parameters. E.g., variant 1: only pre-compile
time configuration parameters; variant 2: mix of pre-compile- and post build time-
configuration parameters. In one variant a parameter can only be of one
configuration class.
10.1.3 Containers
Containers structure the set of configuration parameters. This means:
- all configuration parameters are kept in containers.
- (sub-) containers can reference (sub-) containers. It is possible to assign a
multiplicity to these references. The multiplicity then defines the possible
number of instances of the contained parameters.
Label Description
x The configuration parameter shall be of configuration class Pre-compile time.
-- The configuration parameter shall never be of configuration class Pre-compile time.
Label Description
x The configuration parameter shall be of configuration class Link time.
-- The configuration parameter shall never be of configuration class Link time.
Label Description
The configuration parameter shall be of configuration class Post Build and no specific
x
implementation is required.
Loadable - the configuration parameter shall be of configuration class Post Build and only
L
one configuration parameter set resides in the ECU.
Multiple - the configuration parameter shall be of configuration class Post Build and is
M selected out of a set of multiple parameters by passing a dedicated pointer to the init
function of the module.
-- The configuration parameter shall never be of configuration class Post Build.
[CANIF066] ⌈The CanIf has access to the CanDrv configuration data. All public
CanDrv configuration data are described in [8] Specification of CAN Driver.⌋()
CanIf :EcucModuleDef
CanIfPrivateCfg :
upperMultiplicity = 1 +container EcucParamConfContainerDef
lowerMultiplicity = 0
CanIfHthCfg :
CanIfPublicCfg : EcucParamConfContainerDef
+container EcucParamConfContainerDef
+subContainer upperMultiplicity = *
upperMultiplicity = 1 lowerMultiplicity = 0
lowerMultiplicity = 1 CanIfInitHohCfg :
EcucParamConfContainerDef
+subContainer
upperMultiplicity = * CanIfHrhCfg :
+subContainer lowerMultiplicity = 0 EcucParamConfContainerDef
CanIfInitCfg :EcucParamConfCon tai ne rDef
upperMultiplicity = 1 upperMultiplicity = *
lowerMultiplicity = 1 CanIfRxPduCfg : lowerMultiplicity = 0
+subContainer
multipleConfigurationContainer = true EcucParamConfContainerDef
+container
upperMultiplicity = *
lowerMultiplicity = 0 +subContainer
CanIfHrhRangeCfg :
+subContainer EcucParamConfContainerDef
CanIfTxPduCfg :
upperMultiplicity = *
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
CanIfDispatchCfg : lowerMultiplicity = 0
+container EcucParamConfContainerDef
CanIfTrcvDrvCfg : CanIfTrcvCfg :
+container +subContainer EcucParamConfContainerDef
EcucParamConfContainerDef
lowerM ultiplicity = 0 lowerMultiplicity = 1
upperM ultiplicity = * upperMultiplicity = *
10.2.1 Variants
[CANIF462] ⌈Variant 3: Mix of pre compile-, link time and post build time
parameters.⌋(BSW00344, BSW00404, BSW00342)
10.2.2 CanIf
Included Containers
CANIF244_Conf (This SWS Item ID belongs to the table above. The generated
Artifact is faulty.)
CanIfDispatchCfg :
+container EcucParamConfContainerDef
CanIfTrcvDrvCfg :
+container EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
CanIfCtrlDrvCfg : CanIfCtrlCfg :
EcucParamConfContainerDef +subContainer EcucParamConfContainerDef
+container
upperMultiplicity = * upperMultiplicity = *
lowerMultiplicity = 1 lowerMultiplicity = 1
CanIfInitCfg :EcucParamConfContainerDef
CanIfInitHohCfg :
upperMultiplicity = 1 +subContainer EcucParamConfContainerDef
lowerMultiplicity = 1
multipleConfigurationContainer = true upperMultiplicity = *
lowerMultiplicity = 0
CanIfTxPduCfg :
+subContainer EcucParamConfContainerDef
+container upperMultiplicity = *
lowerMultiplicity = 0
CanIfRxPduCfg :
+subContainer EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 0
CanIfBufferCfg :
+subContainer EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 0
Included Containers
Container
Multiplicity Scope / Dependency
Name
CanIfTTGenera 0..1 This container is only included and valid if TTCAN Interface SWS is used
169 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
l and TTCAN is enabled. This container contains the parameters, which
define if and in which way TTCAN is supported. CanIfTTGeneral is only
included, if the controller supports TTCAN.
CanIf :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanIfPrivateDlcCheck :
CanIfPrivateCfg : +parameter
EcucBooleanParamDef
EcucParamConfContainerDef
defaultValue = True
+parameter CanIfPrivateSoftwareFilterType :
EcucEnumerationParamDef
+literal +literal
LINEAR : BINARY :
EcucEnumerationLiteralDef EcucEnumerationLiteralDef
+literal +literal
TABLE : INDEX :
EcucEnumerationLiteralDef EcucEnumerationLiteralDef
10.2.4 CanIfPublicCfg
No Included Containers
CanIf :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanIfPublicCfg :
EcucParamConfContainerDef CanIfPublicReadRxPduDataApi :
+parameter
EcucBooleanParamDef
upperMultiplicity = 1
lowerMultiplicity = 1 defaultValue = False
CanIfPublicReadRxPduNotifyStatusApi :
+parameter
EcucBooleanParamDef
defaultValue = False
CanIfPublicReadTxPduNotifyStatusApi :
+parameter
EcucBooleanParamDef
defaultValue = False
CanIfPublicSetDynamicTxIdApi :
+parameter
EcucBooleanParamDef
defaultValue = False
CanIfPublicWakeupCheckValidSupport :
+parameter
EcucBooleanParamDef
defaultValue = False
+parameter CanIfPublicMultipleDrvSupport :
EcucBooleanParamDef
defaultValue = True
CanIfPublicVersionInfoApi :
+parameter
EcucBooleanParamDef
defaultValue = True
CanIfPublicDevErrorDetect :
+parameter
EcucBooleanParamDef
defaultValue = 1
min = 1
max = 255
+parameter CanIfPublicCancelTransmitSupport :
EcucBooleanParamDef
CanIfPublicTxBuffering :
+parameter
EcucBooleanParamDef
defaultValue = False
CanIfPublicCddHeaderFile :
EcucStringParamDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = *
minLength = 1
+parameter CanIfPublicTxConfirmPollingSupport : maxLength = 32
EcucBooleanParamDef
CanIfPublicWakeupCheckValidByNM :
EcucBooleanParamDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1
defaultValue = False
CanIfPublicHandleTypeEnum :
+literal UINT8 :
EcucEnumerationParamDef
EcucEnumerationLiteralDef
+parameter
+literal UINT16 :
EcucEnumerationLiteralDef
CanIfPublicPnSupport :
+parameter
EcucBooleanParamDef
defaultValue = false
+parameter CanIfPublicChangeBaudrateSupport :
EcucBooleanParamDef
defaultValue = False
10.2.5 CanIfInitCfg
Included Containers
Container
Multiplicity Scope / Dependency
Name
This container contains the Txbuffer configuration. Multiple buffers with
different sizes could be configured. If CanIfBufferSize (CANIF834_Conf)
CanIfBufferCfg 0..*
equals 0, the CanIf Tx L-PDU only refers via this CanIfBufferCfg the
corresponding CanIfHthCfg.
CanIfInitHohCf This container contains the references to the configuration setup of each
0..*
g underlying CAN Driver.
This container contains the configuration (parameters) of each receive CAN
CanIfRxPduCfg 0..* L-PDU. The SHORT-NAME of "CanIfRxPduConfig" container itself
represents the symolic name of Receive L-PDU.
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.
CanIfTxPduCfg 0..*
The SHORT-NAME of "CanIfTxPduConfig" container represents the symolic
name of Transmit L-PDU.
CanIf :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanIfRxPduCfg :
+subContainer EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 0
CanIfInitHohCfg :
+subContainer EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 0
CanIfTxPduCfg :
+subContainer EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 0
10.2.6 CanIfTxPduCfg
Included Containers
Container Name Multiplicity Scope / Dependency
This container is only included and valid if TTCAN Interface SWS
CanIfTTTxFrameTriggerin is used and TTCAN is enabled. Frame trigger for TTCAN
0..1
g transmission. CanIfTTTxFrameTriggering is only included, if the
controller supports TTCAN and a joblist is used.
CanIfInitCfg :EcucParamConfContainerDef
The SHORT-NAME of "CanIfTxPduConfig"
upperMultiplicity = 1 container itself represents the symolic name of
lowerMultiplicity = 1 Transmit L-PDU.
multipleConfigurationContainer = true
+subContainer
CanIfTxPduCfg :
EcucParamConfContainerDef
upperMultiplicity = *
CanIfTxPduReadNotifyStatus :
lowerMultiplicity = 0 +parameter
EcucBooleanParamDef
Pdu :
EcucParamConfContainerDef
defaultValue = False
+destination
+reference upperMultiplicity = *
CanIfTxPduRef :
lowerMultiplicity = 0
EcucReferenceDef CanIfTxPduUserTxConfirmationName :
(from EcucPdu) EcucFunctionNameDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1
+literal minLength = 1
CanIfTxPduUserTxConfirmationUL : CAN_TP :EcucEnumerationLiteralDef maxLength = 32
EcucEnumerationParamDef +literal
PDUR :EcucEnumerationLiteralDef
lowerMultiplicity = 0
upperMultiplicity = 1 +literal
CAN_NM :EcucEnumerationLiteralDef
+literal
+parameter
J1939TP :EcucEnumerationLiteralDef
+literal
XCP :EcucEnumerationLiteralDef
+literal
CDD :EcucEnumerationLiteralDef
+literal
+parameter CanIfTxPduCanIdType : STANDARD_CAN :EcucEnumerationLiteralDef
EcucEnumerationParamDef
+literal
EXTENDED_CAN :EcucEnumerationLiteralDef
CanIfTxPduId :
EcucIntegerParamDef
+parameter
symbolicNameValue = true
min = 0
max = 4294967295
CanIfTxPduCanId :
+parameter EcucIntegerParamDef
min = 0
max = 536870911
CanIfTxPduType : +literal
+parameter DYNAMIC :EcucEnumerationLiteralDef
EcucEnumerationParamDef
+literal
STATIC :EcucEnumerationLiteralDef
CanIfTxPduDlc :
+parameter EcucIntegerParamDef
min = 0
max = 8
RteBswExclusiveAreaImpl :
+reference CanIfTxPduBswSchExclAreaIdRef : +destination EcucParamConfContainerDef
EcucReferenceDef
lowerMultiplicity = 0
upperMultiplicity = *
(from RteBswExclusiveAreaImpl)
CanIfTxPduBufferRef : CanIfBufferCfg :
+reference EcucReferenceDef +destination EcucParamConfContainerDef
lowerMultiplicity = 1 upperMultiplicity = *
upperMultiplicity = 1 lowerMultiplicity = 0
CanIfTxPduPnFilterPdu :
+parameter EcucBooleanParamDef
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1
Included Containers
Container Name Multiplicity Scope / Dependency
Optional container that allows to map a range of CAN Ids to one
CanIfRxPduCanIdRange 0..1
PduId.
This container is only included and valid if TTCAN Interface
CanIfTTRxFrameTriggerin SWS is used and TTCAN is enabled. Frame trigger for TTCAN
0..1
g reception. CanIfTTRxFrameTriggering is only included, if the
controller supports TTCAN and a joblist is used for reception.
CanIfInitCfg :EcucParamConfContainerDef
+subContainer
CanIfRxPduHrhIdRef : CanIfHrhCfg :
EcucReferenceDef
CanIfRxPduCfg : +reference +destination EcucParamConfContainerDef
EcucParamConfContainerDef
lowerMultiplicity = 1 upperMultiplicity = *
upperMultiplicity = * lowerMultiplicity = 0 +reference
upperMultiplicity = *
lowerMultiplicity = 0 CanIfRxPduReadNotifyStatus :
+parameter CanIfHrhIdSymRef :
EcucBooleanParamDef
Pdu : EcucSymbolicNameReferenceDef
EcucParamConfContainerDef
defaultValue = False
+reference +destination upperMultiplicity = *
CanIfRxPduRef : CanIfRxPduUserRxIndicationName :
EcucReferenceDef lowerMultiplicity = 0
EcucFunctionNameDef
(from EcucPdu) +parameter
lowerMultiplicity = 0
+literal upperMultiplicity = 1
CanIfRxPduUserRxIndicationUL : CAN_TP :EcucEnumerationLiteralDef minLength = 1
EcucEnumerationParamDef +literal maxLength = 32
CDD :EcucEnumerationLiteralDef
upperMultiplicity = 1
lowerMultiplicity = 0 +literal
+parameter CAN_NM :EcucEnumerationLiteralDef
+literal
J1939TP :EcucEnumerationLiteralDef
+literal
PDUR :EcucEnumerationLiteralDef
+literal
XCP :EcucEnumerationLiteralDef
+literal
+parameter CanIfRxPduCanIdType :
EXTENDED_CAN :EcucEnumerationLiteralDef
EcucEnumerationParamDef
+literal
STANDARD_CAN :EcucEnumerationLiteralDef
CanIfRxPduId :
EcucIntegerParamDef
+parameter
symbolicNameValue = true
upperMultiplicity = 1
lowerMultiplicity = 1
min = 0
max = 4294967295 CanIfRxPduDlc :
+parameter EcucIntegerParamDef
min = 0
CanIfRxPduReadData : max = 8
+parameter
EcucBooleanParamDef
CanIfRxPduCanIdRange : CanIfRxPduCanIdRangeUpperCanId :
EcucParamConfContainerDef +parameter EcucIntegerParamDef
lowerMultiplicity = 0 min = 0
+subContainer upperMultiplicity = 1 max = 536870911
CanIfRxPduCanIdRangeLowerCanId :
+parameter
EcucIntegerParamDef
min = 0
max = 536870911
RteBswExclusiveAreaImpl :
+reference CanIfRxPduBswSchExclAreaIdRef : +destination EcucParamConfContainerDef
EcucReferenceDef
lowerMultiplicity = 0
upperMultiplicity = *
(from RteBswExclusiveAreaImpl)
No Included Containers
10.2.9 CanIfDispatchCfg
No Included Containers
CanIf :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanIfDispatchUserCtrlBusOffName :
EcucFunctionNameDef
CanIfDispatchCfg :
EcucParamConfContainerDef +parameter
lowerMultiplicity = 0
upperMultiplicity = 1
minLength = 1
maxLength = 32
+literal
+parameter CanIfDispatchUserCtrlBusOffUL : CAN_SM :EcucEnumerationLiteralDef
EcucEnumerationParamDef
+literal
CDD :EcucEnumerationLiteralDef
CanIfDispatchUserValidateWakeupEventName :
EcucFunctionNameDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1
minLength = 1
maxLength = 32
+literal
CanIfDispatchUserValidateWakeupEventUL : ECUM :EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
+literal
CDD :EcucEnumerationLiteralDef
lowerMultiplicity = 0
upperMultiplicity = 1
CanIfDispatchUserCtrlModeIndicationName :
EcucFunctionNameDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1
minLength = 1
maxLength = 32
+literal
CanIfDispatchUserCtrlModeIndicationUL : CAN_SM :EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
+literal
lowerMultiplicity = 1 CDD :EcucEnumerationLiteralDef
upperMultiplicity = 1
CanIfDispatchUserTrcvModeIndicationName :
EcucFunctionNameDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1
minLength = 1
maxLength = 32
+literal
CanIfDispatchUserTrcvModeIndicationUL : CAN_SM :EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
+literal
lowerMultiplicity = 0 CDD :EcucEnumerationLiteralDef
upperMultiplicity = 1
CanIfDispatchUserClearTrcvWufFlagIndicationName :
+parameter EcucFunctionNameDef
lowerMultiplicity = 0
upperMultiplicity = 1
+literal
CanIfDispatchUserClearTrcvWufFlagIndicationUL : CAN_SM :EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
+literal
lowerMultiplicity = 0 CDD :EcucEnumerationLiteralDef
upperMultiplicity = 1
CanIfDispatchUserCheckTrcvWakeFlagIndicationName :
+parameter EcucFunctionNameDef
lowerMultiplicity = 0
upperMultiplicity = 1
+literal
CAN_SM :EcucEnumerationLiteralDef
CanIfDispatchUserCheckTrcvWakeFlagIndicationUL :
+parameter EcucEnumerationParamDef
+literal
lowerMultiplicity = 0 CDD :EcucEnumerationLiteralDef
upperMultiplicity = 1
+parameter CanIfDispatchUserConfirmPnAvailabilityName :
EcucFunctionNameDef
+literal
CanIfDispatchUserConfirmPnAvailabilityUL : CAN_SM :EcucEnumerationLiteralDef
+parameter
EcucEnumerationParamDef
+literal
CDD :EcucEnumerationLiteralDef
10.2.10 CanIfCtrlCfg
15B
No Included Containers
CanIf :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanIfCtrlDrvCfg :
EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 1
+subContainer
upperMultiplicity = 1
lowerMultiplicity = 1
symbolicNameValue = true
min = 0
+parameter CanIfCtrlWakeupSupport : max = 255
EcucBooleanParamDef
(from CanDrv)
defaultValue = False
10.2.11 CanIfCtrlDrvCfg
156B
Included Containers
Container
Multiplicity Scope / Dependency
Name
This container contains the configuration (parameters) of an adressed CAN
CanIfCtrlCf
1..* controller by an underlying CAN Driver module. This container is configurable
g
per CAN controller.
CanIf :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanIfCtrlDrvCfg : CanGeneral :
+reference CanIfCtrlDrvNameRef : +destination
EcucParamConfContainerDef EcucParamConfContainerDef
EcucReferenceDef
upperMultiplicity = * upperMultiplicity = 1
lowerMultiplicity = 1
lowerMultiplicity = 1
+parameter CanIfCtrlDrvTxCancellation : (from CanDrv)
EcucBooleanParamDef
CanIfInitHohCfg :
+reference CanIfCtrlDrvInitHohConfigRef : +destination EcucParamConfContainerDef
EcucReferenceDef
upperMultiplicity = *
lowerMultiplicity = 0
10.2.12 CanIfTrcvDrvCfg
157B
Included Containers
Container
Multiplicity Scope / Dependency
Name
This container contains the configuration (parameters) of one addressed CAN
CanIfTrcvCf
1..* transceiver by the underlying CAN Transceiver Driver module. For each CAN
g
transceiver a seperate instance of this container has to be provided.
CanIf :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanIfTrcvDrvCfg :
EcucParamConfContainerDef CanIfTrcvCfg :
EcucParamConfContainerDef
+subContainer
lowerMultiplicity = 0
upperMultiplicity = * lowerMultiplicity = 1
upperMultiplicity = *
10.2.13 CanIfTrcvCfg
158B
No Included Containers
CanIf :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
CanIfTrcvDrvCfg :
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
+subContainer
CanTrcvChannelId :
EcucIntegerParamDef
CanIfTrcvCfg :
EcucParamConfContainerDef +parameter
CanIfTrcvCanTrcvRef : CanTrcvChannel :
symbolicNameValue = true
+reference EcucSymbolicNameReferenceDef +destination EcucParamConfContainerDef
lowerMultiplicity = 1 max = 255
upperMultiplicity = * lowerMultiplicity = 1 upperMultiplicity = * (from CanTrcv)
upperMultiplicity = 1 lowerMultiplicity = 1
CanTrcvWakeupSourceRef :
+reference EcucReferenceDef
CanIfTrcvWakeupSupport :
+parameter
EcucBooleanParamDef lowerMultiplicity = 0
(from CanTrcv) upperMultiplicity = 1
defaultValue = False
(from CanTrcv)
CanIfTrcvId :EcucIntegerParamDef
+parameter
min = 0
max = 65535
symbolicNameValue = true
10.2.14 CanIfInitHohCfg
159B
Included Containers
Container
Multiplicity Scope / Dependency
Name
CanIfHrhCf This container contains configuration parameters for each hardware receive
0..*
g object (HRH).
CanIfHthCfg 0..* This container contains parameters related to each HTH.
CanIfInitCfg :EcucParamConfContainerDef
upperMultiplicity = 1
lowerMultiplicity = 1
multipleConfigurationContainer = true
+subContainer CanIfHrhCfg :
EcucParamConfContainerDef
CanIfInitHohCfg : +subContainer
EcucParamConfContainerDef upperMultiplicity = *
lowerMultiplicity = 0
upperMultiplicity = *
lowerMultiplicity = 0 CanIfHthCfg :
+subContainer EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 0
+reference CanIfInitRefCfgSet :
EcucReferenceDef
+destination
CanConfigSet :EcucParamConfContainerDef
multipleConfigurationContainer = true
(from CanDrv)
No Included Containers
CanIfInitHohCfg :
EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 0
+subContainer
CanIfHthCfg : CanIfCtrlCfg :
EcucParamConfContainerDef +reference CanIfHthCanCtrlIdRef : +destination
EcucParamConfContainerDef
EcucReferenceDef
upperMultiplicity = * upperMultiplicity = *
lowerMultiplicity = 0 lowerMultiplicity = 1
CanHandleType :
CanIfHthCanHandleTypeRef : +parameter
CanHardwareObject : EcucEnumerationParamDef
+reference EcucSymbolicNameReferenceDef +destination EcucParamConfContainerDef
(from CanDrv)
10.2.16 CanIfHrhCfg
16B
Included Containers
Container Name Multiplicity Scope / Dependency
CanIfHrhRangeCf Defines the parameters required for configurating multiple CANID ranges
0..*
g for a given same HRH.
CanIfInitHohCfg :
EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 0
+subContainer CanIfCtrlCfg :
+reference CanIfHrhCanCtrlIdRef : +destination EcucParamConfContainerDef
CanIfHrhCfg :
EcucReferenceDef
EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 1
upperMultiplicity = *
lowerMultiplicity = 0
CanObjectId :EcucIntegerParamDef
CanIfHrhSoftwareFilter :
+parameter EcucBooleanParamDef
defaultValue = True
CanIfHrhRangeCfg :
+subContainer EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 0
10.2.17 CanIfHrhRangeCfg
162B
No Included Containers
CanIfHrhCfg :
EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 0
+subContainer
CanIfHrhRangeRxPduUpperCanId :
EcucIntegerParamDef
CanIfHrhRangeCfg : +parameter
EcucParamConfContainerDef
min = 0
max = 536870911
upperMultiplicity = *
lowerMultiplicity = 0
CanIfHrhRangeRxPduLowerCanId :
EcucIntegerParamDef
+parameter
upperMultiplicity = 1
lowerMultiplicity = 1
min = 0
max = 536870911
STANDARD :
+literal EcucEnumerationLiteralDef
CanIfHrhRangeRxPduRangeCanIdType :
EcucEnumerationParamDef
+parameter
+literal EXTENDED :
EcucEnumerationLiteralDef
No Included Containers
CanIfHthCfg :
CanIfBufferCfg : CanIfBufferHthRef :
EcucReferenceDef +destination EcucParamConfContainerDef
EcucParamConfContainerDef +reference
upperMultiplicity = *
upperMultiplicity = * lowerMultiplicity = 1
lowerMultiplicity = 0
lowerMultiplicity = 0 upperMultiplicity = *
CanIfBufferSize :
+parameter EcucIntegerParamDef
min = 0
max = 255
defaultValue = 0
CANIF226
H
CANIF286
H
CANIF287
H Changed service to asynchronous
CANIF297
H Clarification/Improvment on DLC Check description
CANIF381
H Improvement of transmit buffer handling
CANIF382
H
CANIF414
H Removal of CanIfCtrlDrvRxIndication and CanIfCtrlDrvTxConfirmation
configuraion parameters
CANIF423
H Removal of CanIfCtrlDrvRxIndication and CanIfCtrlDrvTxConfirmation
configuraion parameters
CANIF466
H Improvement of transmit buffer handling
CANIF468
H Redundant information in CanIfHthCfg container
CANIF520
H Changed service to Synchronous
CANIF626_Conf
H Redundant information in CanIfHthCfg container
CANIF627_Conf
H Redundant information in CanIfHthCfg container
CANIF633_Conf
H Redundant information in CanIfHthCfg container
CANIF634_Conf
H Redundant information in CanIfHthCfg container
CANIF679
H Changed CANIF_E_SLEEP from production to development error
CANIF723
H
CANIF775
H Change of baudrate within UDS service linkcontrol
CANIF776
H Change of baudrate within UDS service linkcontrol
CANIF778
H Change of baudrate within UDS service linkcontrol
CANIF779
H Change of baudrate within UDS service linkcontrol
CANIF780
H Change of baudrate within UDS service linkcontrol
CANIF782
H Change of baudrate within UDS service linkcontrol
CANIF783
H Change of baudrate within UDS service linkcontrol
CANIF784
H Change of baudrate within UDS service linkcontrol
CANIF785
HU U Change of baudrate within UDS service linkcontrol
CANIF786
H Change of baudrate within UDS service linkcontrol
CANIF787
H Change of baudrate within UDS service linkcontrol
CANIF788
H [CanSm] Instruction order of Entering NoCom
CANIF789_Conf
H [CanSm] Instruction order of Entering NoCom
CANIF790_Conf
H [CanSm] Instruction order of Entering NoCom
CANIF791_Conf
H [CanSm] Instruction order of Entering NoCom
CANIF792_Conf
H [CanSm] Instruction order of Entering NoCom
CANIF793
H [CanSm] Instruction order of Entering NoCom
CANIF794
H [CanSm] Instruction order of Entering NoCom
CANIF795
H [CanSm] Instruction order of Entering NoCom
CANIF796
H [CanSm] Instruction order of Entering NoCom
CANIF797
H [CanSm] Instruction order of Entering NoCom
CANIF798
H [CanSm] Instruction order of Entering NoCom
CANIF799
H [CanSm] Instruction order of Entering NoCom
CANIF800
H [CanSm] Instruction order of Entering NoCom
CANIF801
H [CanSm] Instruction order of Entering NoCom
CANIF802
H [CanSm] Instruction order of Entering NoCom
CANIF803
H [CanSm] Instruction order of Entering NoCom
CANIF804
H [CanSm] Instruction order of Entering NoCom
CANIF805
H [CanSm] Instruction order of Entering NoCom
CANIF806
H [CanSm] Instruction order of Entering NoCom
CANIF807
H [CanSm] Instruction order of Entering NoCom
CANIF808
H [CanSm] Instruction order of Entering NoCom
CANIF809
H [CanSm] Instruction order of Entering NoCom
CANIF810
H [CanSm] Instruction order of Entering NoCom
CANIF811
H [CanSm] Instruction order of Entering NoCom
CANIF812
H [CanSm] Instruction order of Entering NoCom
CANIF813
H [CanSm] Instruction order of Entering NoCom
CANIF814
H [CanSm] Instruction order of Entering NoCom
CANIF815
H Handling if PN functionality is disabled in the Trcv
CANIF816
H Handling if PN functionality is disabled in the Trcv
CANIF817
H Handling if PN functionality is disabled in the Trcv
211 of 213 Document ID 012: AUTOSAR_SWS_CANInterface.doc
- AUTOSAR confidential -
Specification of CAN Interface
V5.0.0
R4.0 Rev 3
CANIF818
H Handling if PN functionality is disabled in the Trcv
CANIF819_Conf
H Handling if PN functionality is disabled in the Trcv
CANIF820_Conf
H Handling if PN functionality is disabled in the Trcv
CANIF821
H Handling if PN functionality is disabled in the Trcv
CANIF822
H Handling if PN functionality is disabled in the Trcv
CANIF823
H Handling if PN functionality is disabled in the Trcv
CANIF824
H Handling if PN functionality is disabled in the Trcv
CANIF825
H Handling if PN functionality is disabled in the Trcv
CANIF826
H Handling if PN functionality is disabled in the Trcv
CANIF827
H Handling if PN functionality is disabled in the Trcv
CANIF828
H Incoherence for the returned error in the service
CanIf_CancelTxConfirmation()
CANIF829
H Clarification/Improvment on DLC Check description
CANIF830
H Clarification/Improvment on DLC Check description
CANIF831_Conf
H Improvement of transmit buffer handling
CANIF832_Conf
H Improvement of transmit buffer handling
CANIF833_Conf
H Improvement of transmit buffer handling
CANIF834_Conf
H Improvement of transmit buffer handling
CANIF835
H Improvement of transmit buffer handling
CANIF836
H Improvement of transmit buffer handling
CANIF837
X Improvement of transmit buffer handling