AUTOSAR SWS FlexRayInterface
AUTOSAR SWS FlexRayInterface
AUTOSAR CP R20-11
Disclaimer
This work (specification and/or software implementation) and the material contained
in it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR
and the companies that have contributed to it shall not be liable for any use of the
work.
The material contained in this work is protected by copyright and other types of
intellectual property rights. The commercial exploitation of the material contained in
this work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by
any means, for informational purposes only. For any other purpose, no part of the
work may be utilized or reproduced, in any form or by any means, without permission
in writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Table of Content
Likewise, in order to access the FlexRay Transceiver(s), the FlexRay Interface shall
use one or multiple FlexRay Transceiver Driver module(s), which abstract the specific
features and interfaces of the respective FlexRay Transceiver(s)
Therefore, the FlexRay Interface executable code (however, not the configuration
used during runtime) shall be completely independent of the FlexRay Communication
Controller(s) and the FlexRay Transceiver(s).
Note: The FlexRay Interface is specified in a way that allows for object code delivery
of the code module, following the "one-fits-all" principle, i.e. the entire configuration of
the FlexRay Interface can be carried out without modifying any source code. Thus,
the configuration of the FlexRay Interface can be carried out largely without detailed
knowledge of the underlying hardware.
The FlexRay Interface provides to upper layer AUTOSAR BSW modules the
following groups of functions:
initialization
data transmission (sending and reception)
start/halt/abort communication
FlexRay specific functions (e.g. send wake-up pattern)
set operation mode
get status information
various timer functions
9 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
In general, the FlexRay Interface has no knowledge of the origin of a PDU passed to
it in an API service call.
Therefore, throughout this document, the term "PDU" is being used for PDUs
originating from or sent to:
In addition to the above-mentioned AUTOSAR BSW modules, the FrIf shall, with the
functionality described within the specification in hand, also support other non-
AUTOSAR upper layer software modules (Complex Drivers), provided that these
modules interact with the FrIf in the same manner as the upper layer AUTOSAR
BSW modules.
Throughout this document, several scenarios for changing configuration data are
mentioned. They are being used as follows:
"pre compile time" = carried out before compiling the code of the FlexRay
Interface, since the code generation depends on this setting.
"at system configuration time" = static configuration parameters stored in
the FlexRay Interface; may be defined after compilation of the code of the
FlexRay Interface ("link time" or "post build time"), but have to be defined
before the first execution of the FlexRay Interface code.
"during runtime" = dynamically switching (in POC:normal active state of the
FlexRay CC, if supported) between different configuration parameter sets
stored in the static configuration of the FlexRay Interface, or the FlexRay
Driver, respectively.
Everything not explicitly mentioned in this document, should be considered as
implementation-specific.
The following acronyms and abbreviations are used throughout this document:
Acronym: Description:
BSW (AUTOSAR) Basic Software
CAS Collision Avoidance Symbol
CC (FlexRay) Communication Controller
CDD Complex Driver
CHI Controller Host Interface of a FlexRay CC
COM Communication (AUTOSAR BSW module)
ComM Communication Manager (AUTOSAR BSW module)
DEM Diagnostic Event Manager (AUTOSAR BSW module)
DET Default Error Tracer (AUTOSAR BSW module)
FrIf FlexRay Interface (AUTOSAR BSW module)
FrNm FlexRay Network Management (AUTOSAR BSW module)
FrTp FlexRay Transport Layer (AUTOSAR BSW module)
ISR Interrupt Service Routine
MCG Module Configuration Generator
PduR PDU Router (AUTOSAR BSW module)
POC Protocol Operation Control
WUDOP Wake-Up During Operation
WUP Wake-Up Pattern
WUS Wake-Up Symbol
System Designer The person responsible for the configuration of all system
parameters that do not influence the executable code itself (i.e.
the sequence of instructions executed during runtime), but the
data used to configure which operations this executable code
performs on which data and at which points in time.
Abbreviation: Description:
i.e. [lat.] id est = [eng.] that is
e.g. [lat.] exempli gratia = [eng.] for example
N/A not applicable
3 Related Documentation
Thus, the specification SWS BSW General shall be considered as additional and
required specification for FlexRay Interface.
4.1 Limitations
The FlexRay BSW modules are only able to handle a single thread of execution per
Cluster. The execution for a particular Cluster must not be pre-empted by itself for
the same Cluster. The same applies to the execution of the FlexRay Job List
Execution Function.
It is not possible to transmit signals, PDUs, and/or L-SDUs, which exceed the
available buffer size of the used FlexRay CC during normal operation. Longer
signals, PDUs, and/or L-SDUs have to be transmitted using the FlexRay Transport
Protocol.
Note: The FlexRay Interface does not make any PDU payload-dependent routing
decisions.
Note: In order for the AUTOSAR FlexRay BSW (FrIf and FlexRay Driver) modules to
be able to control a FlexRay CC, this CC must allow for configuring its
transmit/receive buffers to support the Cycle Counter Filter Criterion / (Support of
Slot/Cycle Muliplexing)
For 2.1 FlexRay Hardware, the following Cycle Counter Filtering is possible
For 3.0 FlexRay Hardware, the Cycle Counter Filtering shall be possible as described
in [19]
The FlexRay BSW Stack can be used wherever high data rates and fault tolerant
communication (in conjunction with AUTOSAR COM) are required. Of course, it can
also be used for less-demanding use cases, i.e. for low data rates or non-fault-
tolerant communication. Furthermore, it enables the synchronized operation of
several ECUs within a car.
[SWS_FrIf_05099] ⌈There is one dedicated FlexRay Job List Execution Function for
each FlexRay Cluster. ⌋ ()
[SWS_FrIf_05100] ⌈The FlexRay Interface module shall execute the Flexray Job List
Execution Function. ⌋ ()
Note: It is up to the implementer whether the FlexRay Job List Execution Functions
run in a task context or in an ISR.
[SWS_FrIf_05050] ⌈The calling of the FlexRay Job List Execution Function by the
FlexRay Interface module synchronously to the FlexRay Global Time shall ensure
that both the indication (to an upper layer BSW module) of received data and the
request (to an upper layer BSW module) for data to be sent occur synchronously to
the FlexRay Global Time. ⌋ (SRS_Fr_05000)
Rationale for SWS_FrIf_05148: If the respective upper layer BSW module does not
operate synchronously to the FlexRay Global Time, these occurrences are
asynchronous to the code execution of this BSW module.
The FrIf module declares and calls some callback functions of the PDU-Router in
order to confirm transmission and notify reception of PDUs.
The FrIf module declares and calls some callback functions of the FlexRay Network
Management in order to confirm transmission and notify reception of PDUs.
The FrIf module declares and calls some callback functions of the FlexRay Transport
Protocol in order to confirm transmission and notify reception of PDUs.
The FrIf module has a tight relation to the FlexRay Driver since many of the FlexRay-
related services offered by the FrIf module to upper layer BSW modules are actually
carried out by the FlexRay Driver BSW module. For those services, the FrIf module
mainly performs only an abstraction of the communication hardware specific
information (e.g. the topology of the FlexRay Communication System) and then calls
the respective FlexRay Driver with the appropriate parameters.
The FlexRay Driver module has to be the only BSW module which has to run
necessarily synchronous to the FlexRay Interface.
The FrIf module has a tight relation to the FlexRay Transceiver Driver since calls of
API services of the FlexRay Transceiver Driver are also routed through the FrIf
module in order to abstract the communication hardware specific information (e.g.
the topology of the FlexRay Communication System).
Please refer to the chapter 5.1.7 Header file structure in “SWS_BSWGeneral” [16].
[SWS_FrIf_05087] ⌈The FrIf module source code file(s) shall include SchM_FrIf.h if
data consistency mechanisms of the BSW scheduler are required as described in
[13]. ⌋ ()
[SWS_FrIf_05090] ⌈The header file FrIf.h shall contain a software and specification
version number. ⌋ (SRS_BSW_00004)
[SWS_FrIf_05095] ⌈ Mirror.h contains the declaration of the API service the Bus
Mirroring module offers to the FlexRay Interface. This header is only included if Bus
Mirroring is enabled (see FrIfBusMirroringSupport).⌋ (SRS_BSW_00004)
6 Requirements Traceability
Requirement Description Satisfied by
SRS_BSW_00004 All Basic SW Modules shall perform a pre-processor SWS_FrIf_05090,
check of the versions of all imported include files SWS_FrIf_05095
SRS_BSW_00101 The Basic Software Module shall be able to initialize SWS_FrIf_05003
variables and hardware in a separate initialization
function
SRS_BSW_00170 The AUTOSAR SW Components shall provide SWS_FrIf_05089
information about their dependency from faults, signal
qualities, driver demands
SRS_BSW_00171 Optional functionality of a Basic-SW component that is SWS_FrIf_05089
not required in the ECU shall be configurable at pre-
compile-time
SRS_BSW_00304 All AUTOSAR Basic Software Modules shall use the SWS_FrIf_05001
following data types instead of native C data types
SRS_BSW_00334 All Basic Software Modules shall provide an XML file that SWS_FrIf_05089
contains the meta data
SRS_BSW_00336 Basic SW module shall be able to shutdown SWS_FrIf_05006
SRS_BSW_00342 It shall be possible to create an AUTOSAR ECU out of SWS_FrIf_05078
modules provided as source code and modules provided
as object code, even mixed
SRS_BSW_00345 BSW Modules shall support pre-compile configuration SWS_FrIf_05069
SRS_BSW_00348 All AUTOSAR standard types and constants shall be SWS_FrIf_05001
placed and organized in a standard type header file
SRS_BSW_00353 All integer type definitions of target and compiler specific SWS_FrIf_05001
scope shall be placed and organized in a single type
header
SRS_BSW_00358 The return type of init() functions implemented by SWS_FrIf_05003
AUTOSAR Basic Software Modules shall be void
SRS_BSW_00361 All mappings of not standardized keywords of compiler SWS_FrIf_05001
specific scope shall be placed and organized in a
compiler specific type and keyword header
SRS_BSW_00375 Basic Software Modules shall report wake-up reasons SWS_FrIf_05036
SRS_BSW_00378 AUTOSAR shall provide a boolean type SWS_FrIf_05001
SRS_BSW_00404 BSW Modules shall support post-build configuration SWS_FrIf_05069
SRS_BSW_00405 BSW Modules shall support multiple configuration sets SWS_FrIf_05003
SRS_BSW_00407 Each BSW module shall provide a function to read out SWS_FrIf_05002
the version information of a dedicated module
implementation
SRS_BSW_00411 All AUTOSAR Basic Software Modules shall apply a SWS_FrIf_05002
naming rule for enabling/disabling the existence of the
API
SRS_BSW_00414 Init functions shall have a pointer to a configuration SWS_FrIf_05003
structure as single parameter
SRS_Fr_05000 Synchronous SW Modules shall be supported SWS_FrIf_05050
SRS_Fr_05007 The FlexRay Interface shall be able to communicate with SWS_FrIf_05053
at least four FlexRay CCs via the appropriate FlexRay
19 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
Driver(s)
SRS_Fr_05010 Each PDU shall have one PDU-ID SWS_FrIf_05052
SRS_Fr_05013 The local Memory Space shall be initialized SWS_FrIf_05003
SRS_Fr_05015 The FlexRay Interface shall provide a software interface SWS_FrIf_05005
to start-up a specific FlexRay CC
SRS_Fr_05016 A FlexRay CC Communication shall be aborted when SWS_FrIf_05007
wanted
SRS_Fr_05018 The FlexRay Interface shall provide a software interface SWS_FrIf_05011
to send a wake-up pattern on a channel or CC
SRS_Fr_05022 FlexRay CC POC Status shall be available SWS_FrIf_05014
SRS_Fr_05027 A PDU shall be transmitted via the FlexRay SWS_FrIf_05063
communication system
SRS_Fr_05031 A FlexRay CC shall be initialized and configured SWS_FrIf_05004
SRS_Fr_05039 The Operation Mode of a FlexRay Transceiver shall be SWS_FrIf_05034
set
SRS_Fr_05042 The FlexRay Interface shall allow switching from one SWS_FrIf_05061
configuration to another one in Normal Active Mode
SRS_Fr_05056 Configuration of the FlexRay Interface shall be done at SWS_FrIf_05054
System Configuration Time
SRS_Fr_05063 A FlexRay CC Communication shall be halted when SWS_FrIf_05006
wanted
SRS_Fr_05096 Communication controllers shall be assigned to FlexRay SWS_FrIf_05060
Driver.
SRS_Fr_05097 The FlexRay Interface shall be able to communicate with SWS_FrIf_05057
at least four FlexRay Drivers
SRS_Fr_05126 PDU Update/Valid Information shall be handled SWS_FrIf_05056
SRS_Fr_05130 The FlexRay Interface shall support PDU transmission SWS_FrIf_05058
buffer queues
SRS_Fr_05157 The Operation Mode of a FlexRay Transceiver shall be SWS_FrIf_05035
available
SRS_Fr_05158 The wake-up reason of a specific FlexRay Transceiver SWS_FrIf_05036
device shall be available
SRS_Fr_05161 Pending Wake-up Events of a Transceiver shall be SWS_FrIf_05039
cleared if necessary
SRS_Fr_05170 PDUs received via the FlexRay communication system SWS_FrIf_05062
shall be retrieved
Functional Specification
7 Functional Specification
FlexRay Interface
Software
FlexRay Driver FlexRay Driver FlexRay Driver
Vendor A Vendor B Vendor C
Hardware
FlexRay CC FlexRay CC FlexRay CC FlexRay CC FlexRay CC
Type A Type A Type B Type C Type C
7.2.1 Principle
Most of the FrIf module’s API services used for accessing the numerous (hardware
and software) resources1 map to corresponding API services of the underlying
FlexRay Driver(s), or FlexRay Transceiver Driver(s), respectively.
In order to select those resources spread over the various entities2 accessed via the
FrIf module, the FlexRay-related AUTOSAR BSW modules use an indexing scheme
that is exemplarily described in Figure 7-2 and Figure 7-3.
[SWS_FrIf_05052] ⌈The FrIf module shall achieve the abstraction (of the CCs and
Drivers) by providing to the upper layer BSW modules an abstract, unique, zero-
based consecutive index for each sort of resource, independent of their type,
location, and access method. ⌋ (SRS_Fr_05010)
Rationale: The FrIf module achieves the abstraction (of the CCs and Drivers) by
providing these abstract indices to the upper layer BSW modules.
The FrIf module API service uses the abstract index passed to it by the upper layer
BSW module to retrieve:
1. the function pointer to a corresponding lower layer BSW module's API
service from a static configuration data table containing function pointers to all
API services of all lower layer BSW modules called by the FrIf module, and
2. the translated index used in the call to the lower layer BSW module's API
service from a static configuration data table.
Since this static configuration data table contains function pointers to the lower layer
BSW module’s API services, it obviously has to be linked against the linked and
located code of the lower layer BSW modules.
The FrIf module then calls the corresponding lower layer BSW module's API service
via the function pointer and passes the translated index in the API call.
1
E.g. timers, configuration data sets, etc.
2
FlexRay Drivers, FlexRay Communication Controllers, FlexRay Transceiver Drivers, and FlexRay
Transceivers
23 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
ECU
FrIf
FrIf_ClstIdx = 0 FrIf_ClstIdx = 1
Fr #0 Fr #1 Fr #0
Fr_CtrlIdx = 0 Fr_CtrlIdx = 0 Fr_CtrlIdx = 1
FlexRay CC FlexRay CC FlexRay CC
Type A Type B Type A
AT Fr_AbsTimerIdx = 1 AT Fr_AbsTimerIdx = 1
RT Fr_RelTimerIdx = 0 RT Fr_RelTimerIdx = 0
Fr_ChnlIdx = FR_CHANNEL_A
Fr_ChnlIdx = FR_CHANNEL_B
[SWS_FrIf_05060] ⌈In order to abstract for upper layer BSW modules the various
CCs, which the FrIf module controls via the FlexRay Driver modules, the FrIf module
offers an abstract, unique, zero-based consecutive index FrIfCtrlIdx as configuration
parameter, which maps to a tuple of FlexRay Driver API Service function pointer and
CC index Fr_CtrlIdx. ⌋ (SRS_Fr_05096)
ECU
FrIf
FrIf_ClstIdx = 0 FrIf_ClstIdx = 1
FR_CHANNEL_A
FR_CHANNEL_B
In order to abstract for upper layer BSW modules the various FlexRay Transceiver
modules, which the FrIf module accesses via the FlexRay Transceiver Driver
modules, the FrIf module takes advantage of the fact that each FlexRay Transceiver
module is unambiguously assigned to a specific Channel on a specific FlexRay CC.
The function descriptions in chapter 8 specify the required mapping of upper layer
BSW module's parameters to corresponding lower layer BSW module's API services
in detail.”
[SWS_FrIf_05107] ⌈Besides hardware and software resources, the FrIf module also
numbers the logical structure elements presented by FlexRay with an abstract,
unique, zero-based consecutive index.
The static configuration data of the FrIf module contains a data structure that
specifies which FlexRay CC modules and which FlexRay Transceiver modules are
connected to which Clusters, or in other words, that maps each value of FrIf_ClstIdx
to (one, or in general) a set of values for FrIf_CtrlIdx and tuples of (FrIfCtrlIIdx,
FrIf_ChnlIdx). ⌋ ()
[SWS_FrIf_05110] ⌈The FrIf module shall number all PDUs to be transmitted with an
abstract, unique, zero-based consecutive index TxPduId. ⌋ ()
Note:This index is used in the FrIf API service FrIf_Transmit() and allows the FrIf
module to quickly identify (e.g. by a table look-up) the PDU that is passed to it by an
upper layer BSW module, and to process it accordingly.
[SWS_FrIf_05057] ⌈It shall be possible that the FrIf module can be configured to
support at least four (possibly different) FlexRay Drivers to access the FlexRay
Communication Controllers. ⌋ (SRS_Fr_05097)
[SWS_FrIf_05053] ⌈It shall be possible that the FrIf module can be configured using
the parameter FRIF_CTRL_IDX to support at least four (possibly different) FlexRay
CCs. ⌋ (SRS_Fr_05007)
[SWS_FrIf_05111] ⌈It shall be possible that the FrIf module can be configured to
support one of both or both FlexRay Channels as specified in [17]. ⌋ ()
[SWS_FrIf_05112] ⌈It shall be possible that the FrIf module can be configured using
the parameter FRIF_CLST_IDX to support at least four FlexRay Clusters. ⌋ ()
[SWS_FrIf_05113] ⌈It shall be possible that the FrIf module can be configured using
the parameter FRIF_ABS_TIMER_IDX to support at least one absolute timer per
FlexRay CCs. ⌋ ()
[SWS_FrIf_05115] ⌈
In order to allow to control the communication operations of the FlexRay system, the
FrIf module shall implement a behavior, which is defined using a simple state
machine (one per FlexRay cluster), called FlexRay Interface State Machine
Initial
(1)
(2)
FRIF_STATE_OFFLINE FRIF_STATE_ONLINE
(3)
Figure 7-4 shows the states and transistions that are visible to the user of a FrIf
module. The two different states, which are defined as FrIf type FrIf_StateType (see
8.2.2), represent the communication capabilities of a FrIf module.
State Description
FRIF_STATE_OFFLINE No communication services are executed (see chapter 7.6
for details)
FRIF_STATE_ONLINE All communication services (reception, transmission,
transmission confirmation) are executed (see chapter 7.6
for details).
⌋ ()
The transitions are requested by an API service FrIf_SetState() which takes the
Cluster to process on and the Transistion name to invoke. ⌋ ()
[SWS_FrIf_05118] ⌈If the FrIf module’s environment calls the function FrIf_SetState
with parameter FrIf_StateTransition = FRIF_GOTO_ONLINE and if the current state
for the requested cluster is FRIF_STATE_OFFLINE, the FrIf module shall take the
current state of the requested cluster to FRIF_STATE_ONLINE.” (refer to figure 7-4
transsition (2)).
If the FrIf module’s environment calls the function FrIf_SetState with parameter
FrIf_StateTransition = FRIF_GOTO_ OFFLINE and if the current state for the
requested cluster is FRIF_STATE_ONLINE, the FrIf module shall take the current
state of the requested cluster to FRIF_STATE_OFFLINE.” (refer to figure 7-4
transition (3)).
Otherwise, do not perform a state transition.
Transition Name
⌋ ()
Note: It has to be ensured that the FlexRay Interface does not lose the
TxConfCounter values at the point in time the API FrIf_SetState with parameter
FRIF_STATE_OFFLINE is called.
The FlexRay Interface Main Function needs to be called cyclically from a task body
provided by the BSW Scheduler with a calling period
(FRIF_MAINFUNCTION_PERIOD) depending on the FlexRay Cycle length and
configurable at system configuration time.
Since the Cycle length of each Cluster is independent, the desired calling period of
the FlexRay Interface Main Function might differ from Cluster to Cluster, except for
“Transmission with Immediate Buffer Access”.
[SWS_FrIf_05119] ⌈The FrIf module shall provide one dedicated FlexRay Interface
Main Function for each FlexRay Cluster that is controlled by that FrIf module. ⌋ ()
[SWS_FrIf_05283] ⌈The API names of the FlexRay Interface Main Functions shall
obey the following pattern:
FrIf_GetChannelStatus for each FlexRay controller of the cluster and report the
status to DEM as described below. ⌋ ()
as Dem_SetEventStatus (FRIF_E_ACS_CH_B,
DEM_EVENT_STATUS_PREPASSED) when none of these error bits is set. ⌋ ()
[SWS_FrIf_05069] ⌈The FrIf module shall support pre-compile time, link-time and
post-build-time configuration. ⌋ (SRS_BSW_00404, SRS_BSW_00345)
[SWS_FrIf_05078] ⌈The FrIf module shall implement the API functions specified by
the FrIf SWS as real C code functions and shall not implement the API functions as
macros. ⌋ (SRS_BSW_00342)
[SWS_FrIf_05244] ⌈
The FrIf module shall pad transmitted PDUs that are located on a FrIf L-Sdu where
FrIfAllowDynamicLSduLength is set to false, if the size is smaller than the configured
size of the PDU. Padding shall be done with the configured FrIfUnusedBitValue.
⌋ ()
[SWS_FrIf_05089] ⌈The FrIf module shall provide an XML file that contains the data
which is required for the SW identification (it shall contain the vendor identification,
module ID and software version information), configuration and integration process.
This file should describe vendor specific configuration parameters as well as it should
contain recommended configuration parameter values.
The description of the configuration and initialization data itself is not part of this
specification but very implementation specific. ⌋ (SRS_BSW_00171, SRS_BSW_00170,
SRS_BSW_00334)
This even holds true for data that - from the application’s point of view - are
considered event-driven.
Note: When looking only at specific instances of the AUTOSAR FlexRay software
modules running on a specific ECU it is not possible to "anticipate" the exact point in
time when a certain FlexRay frame is being sent (or received, respectively) in the
Dynamic Segment of the FlexRay Cycle.
[SWS_FrIf_05054] ⌈The FrIf module shall define the resources (e.g. a buffer in the
FlexRay Communication Controller or FlexRay Driver) needed for data transmission
(or reception, respectively) at system configuration time specifically for data
transmission (or reception, respectively). ⌋ (SRS_Fr_05056)
7.6.1 PDU Packing, PDU update bits, and Frame Construction Plans
In accordance with basic AUTOSAR rules, the API services that the FrIf module
provides to upper layer BSW modules for data transmission and data reception are
PDU-based.
[SWS_FrIf_05121] ⌈The FrIf module shall be capable of packing multiple PDUs into
one FlexRay Frame. ⌋ ()
Note: It is also allowed to define PDUs which are larger than 8 bytes. Please be
aware that PDUs greater than 8 bytes are not bus independent any more!
[SWS_FrIf_05122] ⌈The FrIf module shall take the information on how to pack PDUs
into FlexRay Frames from the so-called Frame Construction Plans. The rules
defining how to pack PDUs into FlexRay Frames are defined at system configuration
time ⌋ ()
[SWS_FrIf_05124] ⌈If multiple PDUs are packed into a single FlexRay Frame and if
the FrIf module recognizes the update of at least one of the contained PDUs, then
the FrIf module shall transmit this FlexRay Frame. ⌋ ()
Note: As a result, the space associated with PDUs in this FlexRay Frame that have
not been updated by the upper layer BSW module will also be transmitted. This does
not necessarily mean that the previous values of those PDUs are transmitted. On the
contrary, in case the parameter ‘FrIfUnusedBitValue’ does not exist, arbitrary values
for those PDUs will be transmitted.
[SWS_FrIf_05056] ⌈The receiving FrIf module shall evaluate the PDU Update-bit (if
configured) to recognize the update of the PDU associated with this PDU update bits
⌋ (SRS_Fr_05126)
Rationale: In order for the receiving FrIf module to be able to determine which of the
PDUs in a received FlexRay Frame have actually been updated by the upper layer
BSW module (by a call of FrIf_Transmit()) on the transmitter side, additional update
information, so called PDU update bits within the FlexRay Frame, shall be
transmitted to the receiving FrIf module.
[SWS_FrIf_05126] ⌈This PDU update bits shall be located at an arbitrary bit position
in the Frame Construction Plan that is not occupied by any PDU. ⌋ ()
[SWS_FrIf_05127] ⌈The configuration of update bitss for the PDUs and the definition
of the location of the update bitss within the FlexRay Frame are performed at system
configuration time [Configuration Parameter FrIfPduUpdateBitOffset, see FrIf06071] ⌋
()
[SWS_FrIf_05128] ⌈If no update bit is configured for a specific PDU, the FrIf module
shall assume this PDU to be always valid and the FrIf module shall always indicate
its reception to the upper layer BSW module on the receiver side. ⌋ ()
[SWS_FrIf_05129] ⌈If Transmission with Immediate Buffer Access is used, only one
PDU is allowed per FlexRay Frame (L-SDU). ⌋ ()
Note: Therefore, PDU update bits can be omitted for Transmission with Immediate
Buffer Access.
If FrIfImmediate equals TRUE, the actual length of the respective PDU shall be as
passed via FrIf_Transmit().
If FrIfImmediate equals FALSE, the actual length of the respective PDU shall be as
passed via <UL_TriggerTransmit>()
⌋ ()
Note: If FrIfAllowDynamicLSduLength is set to false, the FrIf module just passes the
length information according to the frame construction plan to the FlexRay driver.
[SWS_FrIf_05094] ⌈The FrIf shall only indicate PDUs in received areas (PDU offset
<= actual L-PDU length) to upper layer(s). ⌋ ()
7.6.3 AlwaysTransmit
Note: According to [17], a FlexRay CC might only support the so-called “continuous
transmission mode” where a message is transmitted continuously until the host
explicitly invalidates the transmit buffer. If such a FlexRay CC is being used for
transmission, and the receiving FrIf should still be able to determine which of the
PDUs in a received FlexRay Frame have actually been updated by an upper layer
BSW module on the transmitter side, a special mechanism is needed in the
transmitting FrIf, called AlwaysTransmit (configuration parameter
FrIfAlwaysTransmit, see ECUC_FrIf_06050). If AlwaysTransmit is enabled for an L-
PDU that is transmitted using the Communication Operation
DECOUPLED_TRANSMISSION, the FlexRay Driver’s API service
Fr_TransmitTxLPdu() is always called for this L-PDU, independent from any PDUs in
this L-PDU having been updated by an upper layer BSW module. This enables
resetting the PDU update bits in the FlexRay CC’s transmit buffer, even if none of the
PDUs in the FlexRay Frame have actually been updated by an upper layer BSW
module, and thus ensures the correct interpretation of the received Frame contents
by the receiving FrIf.
Note: Since:
in general, the transmit mode of a FlexRay CC can be configured (“continuous
mode” / “single shot mode”), and
34 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
[SWS_FrIf_05130] ⌈The FrIf module shall call all functions accessing the transmit
and receive buffers (i.e. performing data transmission or reception, respectively)
synchronously (i.e. synchronized to the FlexRay Global Time) ⌋ ()
Rationale for SWS_FrIf_05130: The access of FrIf module functions to transmit and
receive buffers only at well-defined points in time3 avoids concurrent access to the
buffers by the hardware and the software.
Note: In order to provide this necessary synchronicity, the FrIf module defines for
each Cluster a FlexRay Job List [Configuration Parameter FrIfJobList, see
FrIf05367].
The Cluster's FlexRay Job List is executed by its Job List Execution Function (see
8.5.1) using an absolute timer [Configuration Parameter FrIfAbsTimerRef, see
FrIf06063] of a FlexRay CC connected to the respective Cluster.
3
In FlexRay Global Time
35 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
[SWS_FrIf_05133] ⌈The FrIf module shall call the respective Cluster's FlexRay Job
List Execution Function to execute each FlexRay Communication Job at the
execution start time assigned to that Communication Job⌋ ()
[SWS_FrIf_05134] ⌈The FrIf module shall process the actions determined by the
Communication Operations assigned to each FlexRay Communication Job
The Copy Operation into/from the FlexRay CCs are scheduled within the FlexRay
JobLists’ communication operations
[SWS_FrIf_05136] ⌈The API names of the FlexRay Job List Execution Functions
shall obey the following pattern:
4
The LPDU is identified by a LPdu Index, which has a 1:1 association to a frame triggering for
historical reasons. To obtain compatibility this configuration structure is not changed here. The L-PDU
index is identified with a zero-based and dense index, which shall be used as the parameter
Fr_LPduIdx passed to the AUTOSAR FlexRay Driver when processing LPdus.
36 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
[SWS_FrIf_05137] ⌈The FlexRay Job List Execution Function shall execute the
Cluster's FlexRay Job List Jobs synchronously to the Cluster’s global time (i.e. at
well-defined points in time). ⌋ ()
[SWS_FrIf_05138] ⌈Upon invocation, the FlexRay Job List Execution Function shall
perform the following steps:
1. Retrieve the FlexRay Global Time from the FlexRay CC providing the Cluster’s
absolute timer interrupt.
2. If the FlexRay Global Time cannot be retrieved or the global time delay compared
to the jobs start time is larger than a maximum delay [Configuration Parameter
FrIfMaxIsrDelay, see FrIf06004], the execution of the FlexRay Job List is
considered to be asynchronous to the FlexRay Global Time and thus the following
actions are performed:
Either set a flag (JobListAsyncFlag) indicating that the execution of the
FlexRay Job List of this Cluster is asynchronous or directly resynchronize
the Joblist as described in SWS_FrIf_95120
If the JobListAsyncFlag was set, call the Runtime error
FRIF_E_JLE_SYNC
Disable absolute Timer Interrupt
Terminate the execution of this FlexRay Job.
Otherwise, the FlexRay Job List Execution Function continues with step 3.
3. Retrieve the ordered list of Communication Operations of the current Job pointed
to by the current job-pointer.
4. Forward the current job-pointer to the next job-list entry. If the job-pointer was
pointed at the end of the job-list, wrap around and set it to the first job-list entry.
5. Retrieve the execution start time of the job marked by the job-pointer and set the
absolute timer to this job’s start time in order to invoke the FlexRay Job List
Execution Function again.
This chapter describes each Communication Operation that is executed within the
Job List Execution Function.
7.6.5.1 TransmitWithDecoupledBufferAccess
Note: Only the amount of transmit requests are stored, not the data itself.
All described actions in SWS_FrIf_05287 are depicted in detail in the sequence chart
in chapter 9.1.2.
The shortened L-Sdu shall always contain all configured update bits.
This ensures that on one hand all the needed information for disassembling the L-
SDU is available on receiver side (PDU(s) itself and the corresponding update-bit(s)
if configured), and on the other hand that the payload can be reduced as much as
possible by talking the position of all the required data for disassembling contained in
the frame construction plan into account when shortening the L-SDU to be passed to
the driver. ⌋ ()
7.6.5.2 ProvideTxConfirmation
Function shall execute this Communication Operation. Otherwise, the Job List
Execution Function shall ignore this Communication Operation. ⌋ ()
7.6.5.3 ReceiveAndStore
7.6.5.4 ProvideRxIndication
a. Call the upper layer’s function <UL>_RxIndication() with the PDU Id the
receiving module expects and PduInfoPtr which contains the received
data address and received data length.
b. Mark the PDU-related static buffer as outdated. ⌋ ()
7.6.5.5 ReceiveAndIndicate
2) Initialize ComOpLoopCounter to 0.
7.6.5.6 PREPARE_LPDU
[SWS_FrIf_05061] ⌈
The Communication Operation PREPARE_LPDU enables hardware optimization
purposes. Its purpose is to enable certain FlexRay CC hardware resources (e.g. a
CC’s message buffer) to be prepared (configured) for the transmission/reception of a
certain L-PDU.
This Communication Operation enables the FlexRay Driver to optimize the usage of
hardware resources if available at appropriate point of times. However, it is the
responsibility of the FlexRay Driver to decide and validate ressource allocation
optimizations based on the PREPARE_LPDU Communication Operations. Practically
the usage of this Communication Operation will introduce some runtime-overhead
even if the FlexRay Driver does not use the opportunity for reconfiguration. ⌋
(SRS_Fr_05042)
7.6.3.7 FREE_OP_A
7.6.3.8 FREE_OP_B
[SWS_FrIf_15295] ⌈
The FlexRay Job List Execution Function does not initiate transmission with
immediate buffer access. Instead, the actions described here are carried out in the
context of the FrIf_Transmit() API service, which in turn is called by an upper layer
BSW module. ⌋ ()
In case the Driver’s API Fr_TransmitTxLPdu() returned E_OK (indicating that the
transmission request succeeded) the TxConfCounter is incremented for the
respective PDU. The maximum value of TxConfCounter is limited by static
configuration [Configuration Parameter FrIfCounterLimit, see FrIf06076]). If Bus
Mirroring is enabled globally (see FrIfBusMirroringSupport) and has been
activated with a call to FrIf_EnableBusMirroring() for the Fr_CtrlIdx, call
Mirror_ReportFlexRayFrame() with “controllerId” set to Fr_CtrlIdx, , “slotId”,
“cycle”, and “channel” taken from Fr_SlotAssignmentPtr, “frame” constructed from
Fr_LSduPtr and Fr_LSduLength, and “txConflict” set to false.
[SWS_FrIf_05145]⌈
Type of error Related error code Error value
⌋()
[SWS_FrIf_05432]⌈
Error
Type of error Related error code
value
⌋()
[SWS_FrIf_05146] ⌈
[SWS_FrIf_05426]⌈
Error Name: FRIF_E_NIT_CH_A
Short Description: Error detection in NIT on channel A
Long Description: This production error shall be issued when an error in NIT on
channel A was detected
Recommended DTC: N/A
Fail The channel status information shall be reported
to DEM as Dem_SetEventStatus
(FRIF_E_NIT_CH_A,
DEM_EVENT_STATUS_PREFAILED) when any
of the error bits of a single controller (Channel A
NIT status data vSS!SyntaxError,
vSS!Bviolation) is set (SWS_FrIf_35120)
Detection Criteria:
Pass The channel status information shall be reported
to DEM as Dem_SetEventStatus
(FRIF_E_NIT_CH_A,
DEM_EVENT_STATUS_PREPASSED) when
none of the error bits of a single controller
(Channel A NIT status data vSS!SyntaxError,
vSS!Bviolation) is set (SWS_FrIf_35120)
Secondary Parameters: N/A
Time Required: N/A
Monitor Frequency continuous
MIL illumination: N/A
⌋()
[SWS_FrIf_05427]⌈
Error Name: FRIF_E_NIT_CH_B
Short Description: Error detection in NIT on channel B
48 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
Long Description: This production error shall be issued when an error in NIT on
channel B was detected
Recommended DTC: N/A
Fail The channel status information shall be reported
to DEM as Dem_SetEventStatus
(FRIF_E_NIT_CH_B,
DEM_EVENT_STATUS_PREFAILED) when any
of the error bits of a single controller (Channel B
NIT status data vSS!SyntaxError,
vSS!Bviolation) is set (SWS_FrIf_45120)
Detection Criteria:
Pass The channel status information shall be reported
to DEM as Dem_SetEventStatus
(FRIF_E_NIT_CH_B,
DEM_EVENT_STATUS_PREPASSED) when
none of the error bits of a single controller
(Channel B NIT status data vSS!SyntaxError,
vSS!Bviolation) is set (SWS_FrIf_45120)
Secondary Parameters: N/A
Time Required: N/A
Monitor Frequency continuous
MIL illumination: N/A
⌋()
[SWS_FrIf_05428]⌈
Error Name: FRIF_E_SW_CH_A
Short Description: Error detection in SW on channel A
Long Description: This production error shall be issued when an error in SW on
channel A was detected.
Recommended DTC: N/A
Fail The channel status information shall be reported
to DEM as Dem_SetEventStatus
(FRIF_E_SW_CH_A,
DEM_EVENT_STATUS_PREFAILED) when any
of the error bits of a single controller (Channel A
symbol window status data vSS!SyntaxError,
vSS!Bviolation, vSS!TxConflict) is set
(SWS_FrIf_55120)
Detection Criteria:
Pass The channel status information shall be reported
to DEM as Dem_SetEventStatus
(FRIF_E_SW_CH_A,
DEM_EVENT_STATUS_PREPASSED) when
none of the error bits of a single controller
(Channel A symbol window status data
vSS!SyntaxError, vSS!Bviolation,
vSS!TxConflict) is set (SWS_FrIf_55120)
Secondary Parameters: N/A
Time Required: N/A
Monitor Frequency continuous
MIL illumination: N/A
49 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
⌋()
[SWS_FrIf_05429]⌈
Error Name: FRIF_E_SW_CH_B
Short Description: Error detection in SW on channel B
Long Description: This production error shall be issued when an error in SW on
channel B was detected.
Recommended DTC: N/A
Fail The channel status information shall be reported
to DEM as Dem_SetEventStatus
(FRIF_E_SW_CH_B,
DEM_EVENT_STATUS_PREFAILED) when any
of the error bits of a single controller (Channel B
symbol window status data vSS!SyntaxError,
vSS!Bviolation, vSS!TxConflict) is set
(SWS_FrIf_65120)
Detection Criteria:
Pass The channel status information shall be reported
to DEM as Dem_SetEventStatus
(FRIF_E_SW_CH_B,
DEM_EVENT_STATUS_PREPASSED) when
none of the error bits of a single controller
(Channel B symbol window status data
vSS!SyntaxError, vSS!Bviolation,
vSS!TxConflict) is set (SWS_FrIf_65120)
Secondary Parameters: N/A
Time Required: N/A
Monitor Frequency continuous
MIL illumination: N/A
⌋()
[SWS_FrIf_05431]⌈
Error Name: FRIF_E_ACS_CH_A
Short Description: Error detection in ACS on channel A
Long Description: This production error shall be issued when an error in ACS
on channel A was detected
Recommended DTC: N/A
Fail The channel status information shall be reported
to DEM as Dem_SetEventStatus
(FRIF_E_ACS_CH_A ,
DEM_EVENT_STATUS_PREFAILED) when any
of the error bits of a single controller (Channel A
Detection Criteria: aggregated channel status vSS!SyntaxError,
vSS!ContentError, vSS!Bviolation,
vSS!TxConflict) is set (SWS_FrIf_75120)
Pass The channel status information shall be reported
to DEM as Dem_SetEventStatus
(FRIF_E_ACS_CH_A ,
50 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
DEM_EVENT_STATUS_PREPASSED) when
none of the error bits of a single controller
(Channel A aggregated channel status
vSS!SyntaxError, vSS!ContentError,
vSS!Bviolation, vSS!TxConflict) is set
(SWS_FrIf_75120)
Secondary Parameters: N/A
Time Required: N/A
Monitor Frequency continuous
MIL illumination: N/A
⌋()
[SWS_FrIf_05430]⌈
Error Name: FRIF_E_ACS_CH_B
Short Description: Error detection in ACS on channel B
Long Description: This production error shall be issued when an error in ACS
on channel B was detected
Recommended DTC: N/A
Fail The channel status information shall be reported
to DEM as Dem_SetEventStatus
(FRIF_E_SW_CH_B,
DEM_EVENT_STATUS_PREFAILED) when any
of the error bits of a single controller (Channel B
symbol window status data vSS!SyntaxError,
vSS!Bviolation, vSS!TxConflict) is set
(SWS_FrIf_85120)
Detection Criteria: Pass The channel status information shall be reported
to DEM as Dem_SetEventStatus
(FRIF_E_ACS_CH_B ,
DEM_EVENT_STATUS_PREPASSED) when
none of the error bits of a single controller
(Channel B aggregated channel status
vSS!SyntaxError, vSS!ContentError,
vSS!Bviolation, vSS!TxConflict) is set
(SWS_FrIf_85120)
Secondary Parameters: N/A
Time Required: N/A
Monitor Frequency continuous
MIL illumination: N/A
⌋()
In this chapter all types included from the following files are listed:
[SWS_FrIf_05001]⌈
Module Header File Imported Type
ComStack_Types.h PduIdType
ComStack_Types.h PduLengthType
Rte_Dem_Type.h Dem_EventIdType
Dem
Rte_Dem_Type.h Dem_EventStatusType
Fr_GeneralTypes.h Fr_ChannelType
Fr_GeneralTypes.h Fr_ErrorModeType
Fr_GeneralTypes.h Fr_POCStateType
Fr_GeneralTypes.h Fr_POCStatusType
Fr_GeneralTypes.h Fr_RxLPduStatusType
Fr
Fr_GeneralTypes.h Fr_SlotAssignmentType
Fr_GeneralTypes.h Fr_SlotModeType
Fr_GeneralTypes.h Fr_StartupStateType
Fr_GeneralTypes.h Fr_TxLPduStatusType
Fr_GeneralTypes.h Fr_WakeupStatusType
Fr_GeneralTypes.h FrTrcv_TrcvModeType
FrTrcv
Fr_GeneralTypes.h FrTrcv_TrcvWUReasonType
Std_Types.h Std_ReturnType
Std
Std_Types.h Std_VersionInfoType
This chapter lists the data types that the FlexRay Interface defines.
8.2.1 FrIf_ConfigType
[SWS_FrIf_05301]⌈
Name FrIf_ConfigType
Kind Structure
Implementation specific
Elements Type --
Comment --
This type contains the implementation-specific post build time configuration structure.
Description
Only pointers of this type are allowed.
Available
FrIf.h
via
⌋()
8.2.2 FrIf_StateType
[SWS_FrIf_05755]⌈
Name FrIf_StateType
Kind Enumeration
Description Variables of this type are used to represent the FrIf_State of a FlexRay CC.
Available
FrIf.h
via
⌋()
53 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
8.2.3 FrIf_StateTransitionType
[SWS_FrIf_05303]⌈
Name FrIf_StateTransitionType
Kind Enumeration
Description Variables of this type are used to represent the FrIf_State of a FlexRay CC.
Available
FrIf.h
via
⌋()
This is a list of API services (functions) the FrIf module provides to upper layer BSW
modules.
8.3.1 FrIf_Init
[SWS_FrIf_05003]⌈
Service Name FrIf_Init
void FrIf_Init (
Syntax const FrIf_ConfigType* FrIf_ConfigPtr
)
Sync/Async Synchronous
Parameters
None
(inout)
Note:
The AUTOSAR ECU StateManager calls this FlexRay Interface API service with the
address of the static configuration structure of the FrIf module in parameter
FrIf_ConfigPtr.
[SWS_FrIf_05156] ⌈The function FrIf_Init shall carry out the following actions:
1) Configure the FlexRay Interface module: initialize the local
memory space used to store the PDU data and the PDU
properties and state variables and the FlexRay Interface State
Machine.
8.3.2 FrIf_ControllerInit
[SWS_FrIf_05004]⌈
Service Name FrIf_ControllerInit
Std_ReturnType FrIf_ControllerInit (
Syntax uint8 FrIf_CtrlIdx
)
Service ID
0x03
[hex]
Sync/Async Synchronous
non reentrant for identical values of FrIf_CtrlIdx, reentrant for different values of Fr
Reentrancy
If_CtrlIdx
Parameters
FrIf_CtrlIdx Index of the FlexRay CC to address.
(in)
Parameters
None
(inout)
Parameters
None
(out)
E_OK: The call of the FlexRay Driver's API service has returned E_
Std_- OK.
Return value Return- E_NOT_OK: The call of the FlexRay Driver's API service has
Type returned E_NOT_OK, or an error has been detected in development
mode.
⌋(SRS_Fr_05031)
8.3.3 FrIf_SetAbsoluteTimer
[SWS_FrIf_05021]⌈
Service Name FrIf_SetAbsoluteTimer
Std_ReturnType FrIf_SetAbsoluteTimer (
uint8 FrIf_CtrlIdx,
uint8 FrIf_AbsTimerIdx,
Syntax uint8 FrIf_Cycle,
uint16 FrIf_Offset
)
Service ID
0x19
[hex]
Sync/Async Synchronous
Reentrancy non reentrant for the same FlexRay CC, reentrant for different FlexRay CCs
FrIf_Abs
Index of the absolute timer to address.
Parameters TimerIdx
(in)
FrIf_Cycle FlexRay Cycle number to be set.
Parameters
None
(inout)
Parameters
None
(out)
E_OK: The call of the FlexRay Driver's API service has returned E_
OK.
Std_-
Return value E_NOT_OK: The call of the FlexRay Driver's API service has
ReturnType
returned E_NOT_OK, or an error has been detected in development
mode.
⌋()
8.3.4 FrIf_EnableAbsoluteTimerIRQ
[SWS_FrIf_05025]⌈
Service Name FrIf_EnableAbsoluteTimerIRQ
Std_ReturnType FrIf_EnableAbsoluteTimerIRQ (
uint8 FrIf_CtrlIdx,
Syntax
uint8 FrIf_AbsTimerIdx
)
Service ID
0x1d
[hex]
Sync/Async Synchronous
Reentrancy non reentrant for the same FlexRay CC, reentrant for different FlexRay CCs
Parameters
None
(inout)
Parameters
None
(out)
E_OK: The call of the FlexRay Driver's API service has returned E_
OK.
Std_-
Return value E_NOT_OK: The call of the FlexRay Driver's API service has
ReturnType
returned E_NOT_OK, or an error has been detected in development
mode.
59 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
⌋()
8.3.5 FrIf_AckAbsoluteTimerIRQ
[SWS_FrIf_05029]⌈
Service Name FrIf_AckAbsoluteTimerIRQ
Std_ReturnType FrIf_AckAbsoluteTimerIRQ (
uint8 FrIf_CtrlIdx,
Syntax
uint8 FrIf_AbsTimerIdx
)
Service ID
0x21
[hex]
Sync/Async Synchronous
Reentrancy non reentrant for the same FlexRay CC, reentrant for different FlexRay CCs
Parameters
None
(inout)
60 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
Parameters
None
(out)
E_OK: The call of the FlexRay Driver's API service has returned E_
OK.
Std_-
Return value E_NOT_OK: The call of the FlexRay Driver's API service has
ReturnType
returned E_NOT_OK, or an error has been detected in development
mode.
⌋()
8.3.6 FrIf_StartCommunication
[SWS_FrIf_05005]⌈
Service Name FrIf_StartCommunication
Std_ReturnType FrIf_StartCommunication (
Syntax uint8 FrIf_CtrlIdx
)
Service ID
0x04
[hex]
Sync/Async Asynchronous
non reentrant for identical values of FrIf_CtrlIdx, reentrant for different values of Fr
Reentrancy
If_CtrlIdx
61 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
Parameters
FrIf_CtrlIdx Index of the FlexRay CC to address.
(in)
Parameters
None
(inout)
Parameters
None
(out)
E_OK: The call of the FlexRay Driver's API service has returned E_
Std_- OK.
Return value Return- E_NOT_OK: The call of the FlexRay Driver's API service has
Type returned E_NOT_OK, or an error has been detected in development
mode.
⌋(SRS_Fr_05015)
8.3.7 FrIf_HaltCommunication
[SWS_FrIf_05006]⌈
Service Name FrIf_HaltCommunication
Std_ReturnType FrIf_HaltCommunication (
Syntax uint8 FrIf_CtrlIdx
)
Service ID 0x05
62 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
[hex]
Sync/Async Asynchronous
non reentrant for identical values of FrIf_CtrlIdx, reentrant for different values of Fr
Reentrancy
If_CtrlIdx
Parameters
FrIf_CtrlIdx Index of the FlexRay CC to address.
(in)
Parameters
None
(inout)
Parameters
None
(out)
E_OK: The call of the FlexRay Driver's API service has returned E_
Std_- OK.
Return value Return- E_NOT_OK: The call of the FlexRay Driver's API service has
Type returned E_NOT_OK, or an error has been detected in development
mode.
⌋(SRS_BSW_00336, SRS_Fr_05063)
8.3.8 FrIf_AbortCommunication
[SWS_FrIf_05007]⌈
63 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
Std_ReturnType FrIf_AbortCommunication (
Syntax uint8 FrIf_CtrlIdx
)
Service ID
0x06
[hex]
Sync/Async Synchronous
non reentrant for identical values of FrIf_CtrlIdx, reentrant for different values of Fr
Reentrancy
If_CtrlIdx
Parameters
FrIf_CtrlIdx Index of the FlexRay CC to address.
(in)
Parameters
None
(inout)
Parameters
None
(out)
E_OK: The call of the FlexRay Driver's API service has returned E_
Std_- OK.
Return value Return- E_NOT_OK: The call of the FlexRay Driver's API service has
Type returned E_NOT_OK, or an error has been detected in development
mode.
⌋(SRS_Fr_05016)
8.3.9 FrIf_GetState
[SWS_FrIf_05170]⌈
Service Name FrIf_GetState
Std_ReturnType FrIf_GetState (
uint8 FrIf_ClstIdx,
Syntax FrIf_StateType* FrIf_StatePtr
)
Service ID
0x07
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
None
(inout)
⌋()
8.3.10 FrIf_SetState
[SWS_FrIf_05174]⌈
Service Name FrIf_SetState
Std_ReturnType FrIf_SetState (
uint8 FrIf_ClstIdx,
Syntax FrIf_StateTransitionType FrIf_StateTransition
)
Service ID
0x08
[hex]
Sync/Async Synchronous
Parameters
None
(inout)
Parameters
None
(out)
⌋()
8.3.11 FrIf_SetWakeupChannel
[SWS_FrIf_05010]⌈
Service Name FrIf_SetWakeupChannel
Std_ReturnType FrIf_SetWakeupChannel (
uint8 FrIf_CtrlIdx,
Syntax Fr_ChannelType FrIf_ChnlIdx
)
Service ID
0x09
[hex]
Sync/Async Synchronous
non reentrant for identical values of FrIf_CtrlIdx, reentrant for different values of Fr
Reentrancy
If_CtrlIdx
Parameters
None
(inout)
Parameters
None
(out)
E_OK: The call of the FlexRay Driver's API service has returned E_
Std_- OK.
Return value Return- E_NOT_OK: The call of the FlexRay Driver's API service has
Type returned E_NOT_OK, or an error has been detected in development
mode.
Wraps the FlexRay Driver API function Fr_SetWakeupChannel(). The enum value
Description
"FR_CHANNEL_AB" shall not be used.
⌋()
8.3.12 FrIf_SendWUP
[SWS_FrIf_05011]⌈
Service Name FrIf_SendWUP
Std_ReturnType FrIf_SendWUP (
Syntax uint8 FrIf_CtrlIdx
)
Service ID
0x0a
[hex]
Sync/Async Asynchronous
non reentrant for identical values of FrIf_CtrlIdx, reentrant for different values of Fr
Reentrancy
If_CtrlIdx
Parameters
FrIf_CtrlIdx Index of the FlexRay CC to address.
(in)
Parameters
None
(inout)
Parameters
None
(out)
E_OK: The call of the FlexRay Driver's API service has returned E_
Std_- OK.
Return value Return- E_NOT_OK: The call of the FlexRay Driver's API service has
Type returned E_NOT_OK, or an error has been detected in development
mode.
⌋(SRS_Fr_05018)
68 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
[SWS_FrIf_05181] ⌈The function FrIf_SendWUP shall wrap the FlexRay Driver API
function Fr_SendWUP() by:
- 1) Translating (based on static FrIf module configuration)
the FlexRay CC index FrIf_CtrlIdx into a tuple (FlexRay
Driver | Driver-specific CC index Fr_CtrlIdx).
- 2) Calling Fr_SendWUP() of the determined FlexRay Driver
module with the parameters determined as described above.
⌋ ()
8.3.13 FrIf_GetPOCStatus
[SWS_FrIf_05014]⌈
Service Name FrIf_GetPOCStatus
Std_ReturnType FrIf_GetPOCStatus (
uint8 FrIf_CtrlIdx,
Syntax Fr_POCStatusType* FrIf_POCStatusPtr
)
Service ID
0x0d
[hex]
Sync/Async Synchronous
non reentrant for identical values of FrIf_CtrlIdx, reentrant for different values of Fr
Reentrancy
If_CtrlIdx
Parameters
FrIf_CtrlIdx Index of the FlexRay CC to address.
(in)
Parameters
None
(inout)
Parameters FrIf_
Pointer to a memory location where output value will be stored.
(out) POCStatusPtr
E_OK: The call of the FlexRay Driver's API service has returned
E_OK.
Std_Return-
Return value E_NOT_OK: The call of the FlexRay Driver's API service has
Type
returned E_NOT_OK, or an error has been detected in
development mode.
⌋(SRS_Fr_05022)
8.3.14 FrIf_GetGlobalTime
[SWS_FrIf_05015]⌈
Service Name FrIf_GetGlobalTime
Std_ReturnType FrIf_GetGlobalTime (
uint8 FrIf_CtrlIdx,
Syntax uint8* FrIf_CyclePtr,
uint16* FrIf_MacroTickPtr
)
Service ID
0x0e
[hex]
Sync/Async Synchronous
non reentrant for identical values of FrIf_CtrlIdx, reentrant for different values of Fr
Reentrancy
If_CtrlIdx
Parameters
FrIf_CtrlIdx Index of the FlexRay CC to address.
(in)
Parameters
None
(inout)
FrIf_Cycle
Pointer to a memory location where output value will be stored.
Ptr
Parameters
(out)
FrIf_Macro
Pointer to a memory location where output value will be stored.
TickPtr
E_OK: The call of the FlexRay Driver's API service has returned E_
OK.
Std_Return-
Return value E_NOT_OK: The call of the FlexRay Driver's API service has
Type
returned E_NOT_OK, or an error has been detected in development
mode.
⌋()
8.3.15 FrIf_AllowColdstart
[SWS_FrIf_05017]⌈
Service Name FrIf_AllowColdstart
Std_ReturnType FrIf_AllowColdstart (
Syntax uint8 FrIf_CtrlIdx
)
Service ID
0x10
[hex]
Sync/Async Asynchronous
non reentrant for identical values of FrIf_CtrlIdx, reentrant for different values of Fr
Reentrancy
If_CtrlIdx
Parameters
FrIf_CtrlIdx Index of the FlexRay CC to address.
(in)
Parameters
None
(inout)
Parameters
None
(out)
E_OK: The call of the FlexRay Driver's API service has returned E_
Std_- OK.
Return value Return- E_NOT_OK: The call of the FlexRay Driver's API service has
Type returned E_NOT_OK, or an error has been detected in development
mode.
⌋()
8.3.16 FrIf_GetMacroticksPerCycle
[SWS_FrIf_05018]⌈
Service Name FrIf_GetMacroticksPerCycle
uint16 FrIf_GetMacroticksPerCycle (
Syntax uint8 FrIf_CtrlIdx
)
Sync/Async Synchronous
Reentrancy Reentrant
⌋()
This API service of the FlexRay Interface retrieves the number of Macroticks per
FlexRay Cycle of the FlexRay Cluster with index FrIf_CtrlIdx out of the static
configuration. ⌋ ()
8.3.17 FrIf_GetMacrotickDuration
[SWS_FrIf_05019]⌈
Service Name FrIf_GetMacrotickDuration
uint16 FrIf_GetMacrotickDuration (
Syntax uint8 FrIf_CtrlIdx
)
Sync/Async Synchronous
Reentrancy Reentrant
⌋()
This API service of the FlexRay Interface retrieves duration of one Macrotick in
nanoseconds of the FlexRay Cluster with index FrIf_CtrlIdx out of the static
configuration. ⌋ ()
74 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
8.3.18 FrIf_Transmit
[SWS_FrIf_05033]⌈
Service Name FrIf_Transmit
Std_ReturnType FrIf_Transmit (
PduIdType TxPduId,
Syntax const PduInfoType* PduInfoPtr
)
Sync/Async Synchronous
Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters
None
(inout)
⌋()
[SWS_FrIf_05318]
FrIf_Transmit() shall return E_NOT_OK in case the FrIf's state is
FRIF_STATE_OFFLINE.
In case of decoupled transmission the PDU with index TxPduId is not yet passed to
the underlying FlexRay Driver module for transmission. FrIf only remembers the
PDU's transmission request (increment TrigTxCounter5). This decoupling mechanism
between the call of FrIf_Transmit() and the execution of the FrIfCommunicationAction
(see FrIf06067) has some implications:
The upper layer BSW module may operate asynchronously to the FlexRay
Communication System and thus may call FrIf_Transmit() at any point in time.
The upper layer BSW module must permanently buffer the PDU's payload date
and must be able to handle a call of its <UL_TriggerTransmit>() API service at
(from the BSW's point of view) any arbitrary point in time. ⌋ ()
[SWS_FrIf_05757] ⌈
"If parameter TxPduId is configured for an immediate PDU, and if configuration
parameter FrIfAllowDynamicLSduLength is set to FALSE, the provided length in
PduInfoPtr shall be compared with the static configured length (see
ECUC_FrIf_06054).
If the length information does not match, FrIf_Transmit() shall return E_NOT_OK and
shall not perform the immediate PDU transmission. If development error detection is
enabled (i.e. FrIfDevErrorDetect equals ON), the function FrIf_Transmit() shall report
development error code FRIF_E_INV_PDULENGTH to the Det_ReportError service
of the DET module. ⌋ ()
8.3.19 FrIf_SetTransceiverMode
[SWS_FrIf_05034]⌈
Service Name FrIf_SetTransceiverMode
Std_ReturnType FrIf_SetTransceiverMode (
Syntax uint8 FrIf_CtrlIdx,
Fr_ChannelType FrIf_ChnlIdx,
5
Limited by static configuration [Configuration Parameter FrIfCounterLimit, see FrIf06076]
76 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
FrTrcv_TrcvModeType FrIf_TrcvMode
)
Service ID
0x13
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
None
(inout)
Parameters
None
(out)
⌋(SRS_Fr_05039)
8.3.20 FrIf_GetTransceiverMode
[SWS_FrIf_05035]⌈
Service Name FrIf_GetTransceiverMode
Std_ReturnType FrIf_GetTransceiverMode (
uint8 FrIf_CtrlIdx,
Syntax Fr_ChannelType FrIf_ChnlIdx,
FrTrcv_TrcvModeType* FrIf_TrcvModePtr
)
Service ID
0x14
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
None
(inout)
Parameters FrIf_TrcvMode
Pointer to a memory location where output value will be stored.
(out) Ptr
⌋(SRS_Fr_05157)
8.3.21 FrIf_GetTransceiverWUReason
[SWS_FrIf_05036]⌈
Service Name FrIf_GetTransceiverWUReason
Std_ReturnType FrIf_GetTransceiverWUReason (
uint8 FrIf_CtrlIdx,
Syntax Fr_ChannelType FrIf_ChnlIdx,
FrTrcv_TrcvWUReasonType* FrIf_TrcvWUReasonPtr
)
Service ID
0x15
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
None
(inout)
⌋(SRS_BSW_00375, SRS_Fr_05158)
8.3.22 FrIf_ClearTransceiverWakeup
[SWS_FrIf_05039]⌈
Service Name FrIf_ClearTransceiverWakeup
Std_ReturnType FrIf_ClearTransceiverWakeup (
uint8 FrIf_CtrlIdx,
Syntax
Fr_ChannelType FrIf_ChnlIdx
)
Service ID 0x18
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
None
(inout)
Parameters
None
(out)
⌋(SRS_Fr_05161)
[SWS_FrIf_05230] ⌈If parameter FrIf_CtrlIdx of FrIf_ClearTransceiverWakeup has an
invalid value and if development error detection is enabled (i.e. FrIfDevErrorDetect
equals ON), the function FrIf_ClearTransceiverWakeup shall report development
error code FRIF_E_INV_CTRL_IDX to the Det_ReportError service of the DET
module. ⌋ ()
8.3.23 FrIf_CancelAbsoluteTimer
[SWS_FrIf_05023]⌈
Service Name FrIf_CancelAbsoluteTimer
Std_ReturnType FrIf_CancelAbsoluteTimer (
uint8 FrIf_CtrlIdx,
Syntax uint8 FrIf_AbsTimerIdx
)
Service ID
0x1b
[hex]
Sync/Async Synchronous
Reentrancy non reentrant for the same FlexRay CC, reentrant for different FlexRay CCs
Parameters
None
(inout)
Parameters
None
(out)
E_OK: The call of the FlexRay Driver's API service has returned E_
OK.
Std_-
Return value E_NOT_OK: The call of the FlexRay Driver's API service has
ReturnType
returned E_NOT_OK, or an error has been detected in development
mode.
⌋()
[SWS_FrIf_05240] ⌈If parameter FrIf_CtrlIdx of FrIf_CancelAbsoluteTimer has an
invalid value and if development error detection is enabled (i.e. FrIfDevErrorDetect
equals ON), the function FrIf_CancelAbsoluteTimer shall report development error
code FRIF_E_INV_CTRL_IDX to the Det_ReportError service of the DET module. ⌋ ()
8.3.24 FrIf_GetAbsoluteTimerIRQStatus
[SWS_FrIf_05027]⌈
Service Name FrIf_GetAbsoluteTimerIRQStatus
Std_ReturnType FrIf_GetAbsoluteTimerIRQStatus (
uint8 FrIf_CtrlIdx,
Syntax uint8 FrIf_AbsTimerIdx,
boolean* FrIf_IRQStatusPtr
)
Service ID
0x1f
[hex]
Sync/Async Synchronous
Reentrancy non reentrant for the same FlexRay CC, reentrant for different FlexRay CCs
Parameters
None
(inout)
Parameters FrIf_
Pointer to a memory location where output value will be stored.
(out) IRQStatusPtr
E_OK: The call of the FlexRay Driver's API service has returned E_
OK.
Std_Return-
Return value E_NOT_OK: The call of the FlexRay Driver's API service has
Type
returned E_NOT_OK, or an error has been detected in
development mode.
⌋()
Fr_IRQStatusPtr to FrIf_IRQStatusPtr
3. Calling Fr_GetAbsoluteTimerIRQStatus() of the determined FlexRay Driver
module with the parameters determined as described above. ⌋ ()
8.3.25 FrIf_DisableAbsoluteTimerIRQ
[SWS_FrIf_05031]⌈
Service Name FrIf_DisableAbsoluteTimerIRQ
Std_ReturnType FrIf_DisableAbsoluteTimerIRQ (
uint8 FrIf_CtrlIdx,
Syntax
uint8 FrIf_AbsTimerIdx
)
Service ID
0x23
[hex]
Sync/Async Synchronous
Reentrancy non reentrant for the same FlexRay CC, reentrant for different FlexRay CCs
Parameters
None
(inout)
Parameters
None
(out)
E_OK: The call of the FlexRay Driver's API service has returned E_
OK.
Std_-
Return value E_NOT_OK: The call of the FlexRay Driver's API service has
ReturnType
returned E_NOT_OK, or an error has been detected in development
mode.
⌋()
8.3.26 FrIf_GetCycleLength
[SWS_FrIf_05239]⌈
Service Name FrIf_GetCycleLength
uint32 FrIf_GetCycleLength (
Syntax uint8 FrIf_CtrlIdx
)
Service ID
0x3a
[hex]
Sync/Async Synchronous
Reentrancy Non Reentrant for the same FlexRay CC, reentrant for different FlexRay CCs
Parameters
FrIf_CtrlIdx Index of the FlexRay CC to address.
(in)
Parameters
None
(inout)
Parameters
None
(out)
This API returns the configured time of the configuration parameter "GdCycle" in
Description
nanoseconds for the FlexRay controller with index FrIf_CtrlIdx.
⌋()
8.4.1 FrIf_AllSlots
[SWS_FrIf_05020]⌈
Service Name FrIf_AllSlots
Std_ReturnType FrIf_AllSlots (
Syntax uint8 FrIf_CtrlIdx
)
Service ID
0x33
[hex]
Sync/Async Synchronous
Parameters
FrIf_CtrlIdx Index of the FlexRay CC to address.
(in)
Parameters
None
(inout)
Parameters
None
(out)
E_OK: The call of the FlexRay Driver's API service has returned E_
Std_- OK.
Return value Return- E_NOT_OK: The call of the FlexRay Driver's API service has
Type returned E_NOT_OK, or an error has been detected in development
mode.
⌋()
[SWS_FrIf_05706] ⌈If development error detection for the FrIf module is enabled: if
the function FrIf_AllSlots is called before the FrIf was initialized successfully, the
function FrIf_AllSlots shall raise the development error FRIF_E_UNINIT and return
E_NOT_OK. ⌋ ()
88 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
[SWS_FrIf_05707] ⌈If development error detection for the Fr module is enabled: the
function FrIf_AllSlots shall check the parameter FrIf_CtrlIdx for being valid. If
FrIf_CtrlIdx is invalid, the function FrIf_AllSlots shall raise the development error
FRIF_E_INV_CTRL_IDX and return E_NOT_OK. ⌋ ()
8.4.2 FrIf_GetChannelStatus
[SWS_FrIf_05030]⌈
Service Name FrIf_GetChannelStatus
Std_ReturnType FrIf_GetChannelStatus (
uint8 FrIf_CtrlIdx,
Syntax uint16* FrIf_ChannelAStatusPtr,
uint16* FrIf_ChannelBStatusPtr
)
Sync/Async Synchronous
Parameters
None
(inout)
Wraps the FlexRay Driver API function Fr_GetChannelStatus() and gets the
Description
channel status information.
⌋()
[SWS_FrIf_05708] ⌈If development error detection for the FrIf module is enabled: if
the function FrIf_GetChannelStatus is called before the FrIf module was initialized
successfully, the function FrIf_GetChannelStatus shall raise the development error
FRIF_E_UNINIT and return E_NOT_OK. ⌋ ()
[SWS_FrIf_05709] ⌈If development error detection for the FrIf module is enabled: the
function FrIf_GetChannelStatus shall check the parameter FrIf_CtrlIdx for being valid.
If FrIf_CtrlIdx is invalid, the function FrIf_GetChannelStatus shall raise the
development error FRIF_E_INV_CTRL_IDX and return E_NOT_OK. ⌋ ()
8.4.3 FrIf_GetClockCorrection
[SWS_FrIf_05071]⌈
Service Name FrIf_GetClockCorrection
Std_ReturnType FrIf_GetClockCorrection (
uint8 FrIf_CtrlIdx,
Syntax sint16* FrIf_RateCorrectionPtr,
sint32* FrIf_OffsetCorrectionPtr
)
Sync/Async Synchronous
Parameters
None
(inout)
Wraps the FlexRay Driver API function Fr_GetClockCorrection () and gets the
Description
current clock correction values.
⌋()
[SWS_FrIf_05414] ⌈The function FrIf_GetClockCorrection shall be pre compile time
configurable ON/OFF by the configuration parameter FrIfGetClockCorrectionSupport
(derived from configuration parameter FrIfGetClockCorrectionSupport, see
90 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
ECUC_FrIf_06106) ⌋ ()
[SWS_FrIf_05711] ⌈If development error detection for the FrIf module is enabled: if
the function FrIf_GetClockCorrection is called before the FrIf was initialized
successfully, the function FrIf_GetClockCorrection shall raise the development error
FRIF_E_UNINIT and return E_NOT_OK. ⌋ ()
[SWS_FrIf_05712] ⌈If development error detection for the FrIf module is enabled: the
function FrIf_GetClockCorrection shall check the parameter FrIf_CtrlIdx for being
valid. If FrIf_CtrlIdx is invalid, the function FrIf_GetClockCorrection shall raise the
development error FRIF_E_INV_CTRL_IDX and return E_NOT_OK. ⌋ ()
8.4.4 FrIf_GetSyncFrameList
[SWS_FrIf_05072]⌈
Service
FrIf_GetSyncFrameList
Name
Std_ReturnType FrIf_GetSyncFrameList (
uint8 FrIf_CtrlIdx,
uint8 FrIf_ListSize,
uint16* FrIf_ChannelAEvenListPtr,
Syntax uint16* FrIf_ChannelBEvenListPtr,
uint16* FrIf_ChannelAOddListPtr,
uint16* FrIf_ChannelBOddListPtr
)
Service ID
0x2a
[hex]
Sync/Async Synchronous
Parameters
None
(inout)
Std_- E_OK: API call finished successfully. E_NOT_OK: API call aborted
Return value
ReturnType due to errors.
Wraps the FlexRay Driver API function Fr_GetSyncFrameList and gets a list of
Description syncframes received or transmitted on channel A and channel B via the even and
odd communication cycle.
⌋()
[SWS_FrIf_05715] ⌈If development error detection for the FrIf module is enabled: if
the function FrIf_GetSyncFrameList is called before the Fr was initialized
successfully, the function FrIf_GetSyncFrameList shall raise the development error
FRIF_E_UNINIT and return E_NOT_OK. ⌋ ()
[SWS_FrIf_05716] ⌈If development error detection for the FrIf module is enabled: the
function FrIf_GetSyncFrameList shall check the parameter FrIf_CtrlIdx for being
valid. If FrIf_CtrlIdx is invalid, the function FrIf_GetSyncFrameList shall raise the
development error FRIF_E_INV_CTRL_IDX and return E_NOT_OK. ⌋ ()
8.4.5 FrIf_GetNumOfStartupFrames
[SWS_FrIf_05073]⌈
Service Name FrIf_GetNumOfStartupFrames
uint8 FrIf_CtrlIdx,
uint8* FrIf_NumOfStartupFramesPtr
)
Service ID
0x34
[hex]
Sync/Async Synchronous
Parameters
None
(inout)
Parameters FrIf_NumOfStartup Address where the number of startup frames seen within the
(out) FramesPtr last even/odd cycle pair shall be stored.
Wraps the FlexRay Driver API function Fr_GetNumOfStartupFrames and gets a list
Description of the current number of startup frames seen on the cluster. See variable vStartup
Pairs of [12] for details.
⌋()
[SWS_FrIf_05721] ⌈If development error detection for the FrIf module is enabled: if
the function FrIf_GetNumOfStartupFrames is called before the FrIf was initialized
successfully, the function FrIf_GetNumOfStartupFrames shall raise the development
error FRIF_E_UNINIT and return E_NOT_OK. ⌋ ()
[SWS_FrIf_05722] ⌈If development error detection for the FrIf module is enabled: the
function FrIf_GetNumOfStartupFrames shall check the parameter FrIf_CtrlIdx for
being valid. If FrIf_CtrlIdx is invalid, the function FrIf_GetNumOfStartupFrames shall
raise the development error FRIF_E_INV_CTRL_IDX and return E_NOT_OK. ⌋ ()
8.4.6 FrIf_GetWakeupRxStatus
[SWS_FrIf_05102]⌈
Service Name FrIf_GetWakeupRxStatus
Std_ReturnType FrIf_GetWakeupRxStatus (
uint8 FrIf_CtrlIdx,
Syntax uint8* FrIf_WakeupRxStatusPtr
)
Service ID
0x2b
[hex]
Sync/Async Synchronous
Parameters
FrIf_CtrlIdx Index of FlexRay CC within the context of the FlexRay Driver.
(in)
Parameters
None
(inout)
Std_Return- E_OK: API call finished successfully. E_NOT_OK: API call aborted
Return value
Type due to errors.
Wraps the FlexRay Driver API function Fr_GetWakeupRxStatus and gets the
Description
wakeup received information from the FlexRay controller.
⌋()
[SWS_FrIf_05700] ⌈If development error detection for the FrIf module is enabled: if
the function FrIf_GetWakeupRxStatus is called before the Fr was initialized
successfully, the function FrIf_GetWakeupRxStatus shall raise the development error
FRIF_E_UNINIT and return E_NOT_OK. ⌋ ()
[SWS_FrIf_05701] ⌈If development error detection for the FrIf module is enabled: the
function FrIf_GetWakeupRxStatus shall check the parameter FrIf_CtrlIdx for being
valid. If FrIf_CtrlIdx is invalid, the function FrIf_GetWakeupRxStatus shall raise the
development error FRIF_E_INV_CTRL_IDX and return E_NOT_OK. ⌋ ()
8.4.7 FrIf_CancelTransmit
[SWS_FrIf_05070]⌈
94 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
Std_ReturnType FrIf_CancelTransmit (
Syntax PduIdType TxPduId
)
Sync/Async Synchronous
Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters
None
(inout)
⌋()
[SWS_FrIf_05703] ⌈If development error detection for the FrIf module is enabled: if
the function FrIf_CancelTransmit is called before the FrIf was initialized successfully,
the function FrIf_CancelTransmit shall raise the development error FRIF_E_UNINIT
and return E_NOT_OK. ⌋ ()
[SWS_FrIf_05704] ⌈If development error detection for the FrIf module is enabled: the
function FrIf_CancelTransmit shall check the parameter TxPduId for being valid. If
TxPduId is invalid, the function FrIf_CancelTransmit shall raise the development error
FRIF_E_INV_TXPDUID and return E_NOT_OK. ⌋ ()
8.4.8 FrIf_DisableLPdu
[SWS_FrIf_05710]⌈
Service Name FrIf_DisableLPdu
Std_ReturnType FrIf_DisableLPdu (
uint8 FrIf_CtrlIdx,
Syntax
uint16 FrIf_LPduIdx
)
Service ID
0x28
[hex]
Sync/Async Synchronous
Parameters
None
(inout)
Parameters
None
(out)
⌋()
[SWS_FrIf_05717] ⌈If development error detection for the FrIf module is enabled: if
the function FrIf_DisableLPdu is called before the FrIf was initialized successfully, the
function FrIf_DisableLPdu shall raise the development error FRIF_E_UNINIT and
return E_NOT_OK. ⌋ ()
[SWS_FrIf_05714] ⌈If development error detection for the FrIf module is enabled: the
function FrIf_DisableLPdu shall check the parameter FrIf_CtrlIdx for being valid. If
FrIf_CtrlIdx is invalid, the function FrIf_DisableLPdu shall raise the development error
FRIF_E_INV_CTRL_IDX and return E_NOT_OK. ⌋ ()
8.4.9 FrIf_GetTransceiverError
[SWS_FrIf_05032]⌈
Service Name FrIf_GetTransceiverError
Std_ReturnType FrIf_GetTransceiverError (
uint8 FrIf_CtrlIdx,
Fr_ChannelType FrIf_ChnlIdx,
Syntax uint8 FrIf_BranchIdx,
uint32* FrIf_BusErrorState
)
Service ID
0x35
[hex]
Sync/Async Synchronous
Reentrancy Function is non reentrant for the same channel of the same controller.
Parameters
None
(inout)
Parameters FrIf_BusError
Address where the transceiver error state is stored.
(out) State
⌋()
[SWS_FrIf_05718] ⌈If development error detection for the FrIf module is enabled: if
the function FrIf_GetTransceiverError is called before the FrIf was initialized
successfully, the function FrIf_GetTransceiverError shall raise the development error
FRIF_E_UNINIT and return E_NOT_OK. ⌋ ()
[SWS_FrIf_05719] ⌈If development error detection for the FrIf module is enabled: the
function FrIf_GetTransceiverError shall check the parameter FrIf_CtrlIdx for being
valid. If FrIf_CtrlIdx is invalid, the function FrIf_GetTransceiverError shall raise the
development error FRIF_E_INV_CTRL_IDX and return E_NOT_OK. ⌋ ()
8.4.10 FrIf_EnableTransceiverBranch
[SWS_FrIf_05085]⌈
Service Name FrIf_EnableTransceiverBranch
Std_ReturnType FrIf_EnableTransceiverBranch (
uint8 FrIf_CtrlIdx,
Syntax Fr_ChannelType FrIf_ChnlIdx,
uint8 FrIf_BranchIdx
)
Service ID
0x36
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
None
(inout)
Parameters
None
(out)
E_OK: The call of the FlexRay Transceiver Driver's API service has
Std_Return- returned E_OK.
Return value
Type E_NOT_OK: The call of the FlexRay Transceiver Driver's API
service has returned E_NOT_OK.
⌋()
[SWS_FrIf_05307] ⌈If development error detection for the FrIf module is enabled: if
the function FrIf_EnableTransceiverBranch is called before the Fr was initialized
successfully, the function FrIf_EnableTransceiverBranch shall raise the development
error FRIF_E_UNINIT and return E_NOT_OK. ⌋ ()
8.4.11 FrIf_DisableTransceiverBranch
[SWS_FrIf_05028]⌈
Service Name FrIf_DisableTransceiverBranch
Std_ReturnType FrIf_DisableTransceiverBranch (
uint8 FrIf_CtrlIdx,
Syntax Fr_ChannelType FrIf_ChnlIdx,
uint8 FrIf_BranchIdx
)
Service ID
0x37
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
None
(inout)
Parameters
None
(out)
Std_Return- E_OK: The call of the FlexRay Transceiver Driver's API service has
Return value
Type returned E_OK.
⌋()
8.4.12 FrIf_ReconfigLPdu
[SWS_FrIf_05048]⌈
Service Name FrIf_ReconfigLPdu
Std_ReturnType FrIf_ReconfigLPdu (
uint8 FrIf_CtrlIdx,
uint16 FrIf_LPduIdx,
uint16 FrIf_FrameId,
Fr_ChannelType FrIf_ChnlIdx,
Syntax uint8 FrIf_CycleRepetition,
uint8 FrIf_CycleOffset,
uint8 FrIf_PayloadLength,
uint16 FrIf_HeaderCRC
)
Service ID [hex] 0
Sync/Async Synchronous
Parameters
None
(inout)
Parameters
None
(out)
Calls the FlexRay Driver's API Fr_ReconfigLPdu. The enum value "FR_
Description
CHANNEL_AB" shall not be used.
⌋()
8.4.13 FrIf_GetNmVector
[SWS_FrIf_05016]⌈
Service Name FrIf_GetNmVector
Std_ReturnType FrIf_GetNmVector (
uint8 FrIf_CtrlIdx,
Syntax
uint8* FrIf_NmVectorPtr
)
Service ID
0x0f
[hex]
Sync/Async Synchronous
non reentrant for identical values of FrIf_CtrlIdx, reentrant for different values of Fr
Reentrancy
If_CtrlIdx
Parameters
FrIf_CtrlIdx Index of the FlexRay CC to address.
(in)
Parameters
None
(inout)
Parameters FrIf_Nm
Pointer to a memory location where output value will be stored.
(out) VectorPtr
E_OK: The call of the FlexRay Driver's API service has returned E_
OK.
Std_-
Return value E_NOT_OK: The call of the FlexRay Driver's API service has
ReturnType
returned E_NOT_OK, or an error has been detected in development
mode.
⌋()
8.4.14 FrIf_GetVersionInfo
[SWS_FrIf_05002]⌈
Service Name FrIf_GetVersionInfo
void FrIf_GetVersionInfo (
Syntax Std_VersionInfoType* FrIf_VersionInfoPtr
)
Sync/Async Synchronous
Reentrancy Reentrant
104 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
Parameters
None
(inout)
⌋(SRS_BSW_00407, SRS_BSW_00411)
[SWS_FrIf_05424] ⌈The function FrIf_GetVersionInfo shall be pre compile time
configurable ON/OFF by the configuration parameter FrIfVersionInfoApi (derived
from configuration parameter FrIfVersionInfoApi, see ECUC_FrIf_06083) ⌋ ()
8.4.15 FrIf_ReadCCConfig
[SWS_FrIf_05313]⌈
Service Name FrIf_ReadCCConfig
Std_ReturnType FrIf_ReadCCConfig (
uint8 FrIf_CtrlIdx,
Syntax uint8 FrIf_ConfigParamIdx,
uint32* FrIf_ConfigParamValuePtr
)
Service ID
0x3b
[hex]
Sync/Async Synchronous
Reentrancy Non Reentrant for the same FlexRay CC, reentrant for different FlexRay CCs
Parameters
None
(inout)
Parameters FrIf_Config Pointer to a memory location where output value will be stored.
(out) ParamValuePtr
E_OK: The call of the FlexRay Driver's API service has returned
E_OK.
Std_Return-
Return value E_NOT_OK: The call of the FlexRay Driver's API service has
Type
returned E_NOT_OK, or an error has been detected in
development mode.
⌋()
8.4.16 FrIf_EnableBusMirroring
[SWS_FrIf_05726]⌈
Service
FrIf_EnableBusMirroring
Name
Std_ReturnType FrIf_EnableBusMirroring (
uint8 FrIf_ClstIdx,
Syntax boolean FrIf_MirroringActive
)
Service ID
0x4b
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
None
(inout)
Parameters None
(out)
Enables or disables mirroring for all FlexRay controllers connected to the addressed
Description
FlexRay cluster.
⌋()
8.5.1 FrIf_JobListExec_<FrIfCluster.ShortName>
[SWS_FrIf_05040]⌈
Service Name FrIf_JobListExec_<FrIfCluster.ShortName>
void FrIf_JobListExec_<FrIfCluster.ShortName> (
Syntax void
)
Sync/Async Synchronous
Description Processes the FlexRay Job List of the FlexRay Cluster with index ClstIdx.
⌋()
Note:
For a detailed description of this API service, please refer to chapter 7.6.4.2.
For each FlexRay Cluster (identified by index ClstIdx), the respective API service
FrIf_JobListExec_<FrIfCluster.ShortName> must be registered in the AUTOSAR OS
as the ISR of an absolute timer of a FlexRay CC connected to the FlexRay Cluster
with index ClstIdx, if the CC does not guarantee asynchronous buffer access. ⌋ ()
8.6.1 FrIf_CheckWakeupByTransceiver
[SWS_FrIf_05041]⌈
Service Name FrIf_CheckWakeupByTransceiver
void FrIf_CheckWakeupByTransceiver (
uint8 FrIf_CtrlIdx,
Syntax Fr_ChannelType FrIf_ChnlIdx
)
Service ID
0x39
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
None
(inout)
Parameters
None
(out)
⌋()
8.7.1 FrIf_MainFunction_<FrIfCluster.ShortName>
[SWS_FrIf_05042]⌈
Service Name FrIf_MainFunction_<FrIfCluster.ShortName>
void FrIf_MainFunction_<FrIfCluster.ShortName> (
Syntax void
)
Service ID
0x27
[hex]
This function will be called cyclically by a task body provided by the BSW
Description
Scheduler.
⌋()
Note:
This cyclically executed API service of the FlexRay Interface serves the following
purposes:
Program the absolute timer interrupt in order to start the execution of
FrIf_JobListExec_<FrIfCluster.ShortName>() if the CC does not support asynchronous
buffer access.
Monitoring the proper (in time) execution of the
FrIf_JobListExec_<FrIfCluster.ShortName>() and resynchronize the Joblist if
necessary.
Since the duration of a FlexRay Cycle may be different for two Clusters of an ECU,
the calling period (parameter FrIfMainFunctionPeriod) of this API service shall be
configurable independently for each Cluster at system configuration time.
This chapter defines all API services which are required from other BSW modules to
fulfill the core functionality of the FlexRay Interface.
[SWS_FrIf_05043]⌈
Header
API Function Description
File
Fr_DisableAbsoluteTimerI-
Fr.h Disables the interrupt line of an absolute timer.
RQ
Fr_EnableAbsoluteTimerI-
Fr.h Enables the interrupt line of an absolute timer.
RQ
Fr_GetAbsoluteTimerIRQ-
Fr.h Gets IRQ status of an absolute timer.
Status
FrTrcv_CheckWakeupBy-
FrTrcv.h --
Transceiver
FrTrcv_ClearTransceiver-
FrTrcv.h This function clears a pending wake up event.
Wakeup
FrTrcv_GetTransceiver-
FrTrcv.h This function returns the actual state of the transceiver.
Mode
FrTrcv_GetTransceiverW-
FrTrcv.h This function returns the wakeup reason.
UReason
FrTrcv_SetTransceiver-
FrTrcv.h This service sets the transceiver mode.
Mode
⌋()
This chapter defines all API services which are required from other BSW modules to
fulfill an optional functionality of the FlexRay Interface
[SWS_FrIf_05044]⌈
Header
API Function Description
File
Det_Report-
Det.h Service to report development errors.
Error
Fr_GetChannel-
Fr.h Gets the channel status information.
Status
Fr_GetClock- Gets the current clock correction values. See variables vInterimRate
Fr.h
Correction Correction and vInterimOffsetCorrection of [12] for details.
Fr_GetNm-
Fr.h Gets the network management vector of the last communication cycle.
Vector
Fr_GetNumOf- Gets the current number of startup frames seen on the cluster. See
Fr.h
StartupFrames variable vStartupPairs of [12] for details.
Fr_GetWakeup-
Fr.h Gets the wakeup received information from the FlexRay controller.
RxStatus
Fr_PrepareL-
Fr.h Prepares a LPdu.
Pdu
Within this API, the upper layer module (called module) shall check
whether the available data fits into the buffer size reported by PduInfo
FrArTp_Trigger- FrNm_ Ptr->SduLength. If it fits, it shall copy its data into the buffer provided by
Transmit FrIf.h PduInfoPtr->SduDataPtr and update the length of the actual copied
data in PduInfoPtr->SduLength. If not, it returns E_NOT_OK without
changing PduInfoPtr.
Within this API, the upper layer module (called module) shall check
whether the available data fits into the buffer size reported by PduInfo
FrNm_Trigger- FrNm_ Ptr->SduLength. If it fits, it shall copy its data into the buffer provided by
Transmit FrIf.h PduInfoPtr->SduDataPtr and update the length of the actual copied
data in PduInfoPtr->SduLength. If not, it returns E_NOT_OK without
changing PduInfoPtr.
Within this API, the upper layer module (called module) shall check
whether the available data fits into the buffer size reported by PduInfo
FrTp_Trigger- FrNm_ Ptr->SduLength. If it fits, it shall copy its data into the buffer provided by
Transmit FrIf.h PduInfoPtr->SduDataPtr and update the length of the actual copied
data in PduInfoPtr->SduLength. If not, it returns E_NOT_OK without
changing PduInfoPtr.
FrTrcv_Disable-
This function disables the specified branch on the addressed (active
Transceiver- FrTrcv.h
star) transceiver.
Branch
FrTrcv_Enable-
This function enables the specified branch on the addressed (active
Transceiver- FrTrcv.h
star) transceiver.
Branch
All mandatory errors defined by the FlexRay EPL [5] which are
FrTrcv_Get-
supported by the FlexRay transceiver hardware can be accessed via
Transceiver- FrTrcv.h
this API:In addition to errors on the physical layer and local to the ECU
Error
hardware, a global error flag is provided.
Mirror_Report-
Mirror.h Reports a received or transmitted FlexRay frame or a Tx conflict.
FlexRayFrame
Within this API, the upper layer module (called module) shall check
whether the available data fits into the buffer size reported by PduInfo
PduR_FrIf- PduR_
Ptr->SduLength. If it fits, it shall copy its data into the buffer provided by
TriggerTransmit FrIf.h
PduInfoPtr->SduDataPtr and update the length of the actual copied
data in PduInfoPtr->SduLength. If not, it returns E_NOT_OK without
changing PduInfoPtr.
PduR_FrIfTx- PduR_ The lower layer communication interface module confirms the
Confirmation FrIf.h transmission of a PDU, or the failure to transmit a PDU.
Within this API, the upper layer module (called module) shall check
whether the available data fits into the buffer size reported by PduInfo
Xcp_FrIf- Ptr->SduLength. If it fits, it shall copy its data into the buffer provided by
Xcp.h
TriggerTransmit PduInfoPtr->SduDataPtr and update the length of the actual copied
data in PduInfoPtr->SduLength. If not, it returns E_NOT_OK without
changing PduInfoPtr.
⌋()
This chapter lists all interfaces where the target API service of any upper layer, which
require one or more of these mentioned interfaces to be called has to be set up by
static configuration of the FlexRay Interface. The target function is usually a call-back
function. The names of these kinds of interfaces are not fixed because they are
configurable.
These call-back services are specified and implemented in the upper layer BSW
modules, which use the FlexRay Interface according to [2]. The specific call-back
notification is specified in the corresponding AUTOSAR SWS document (see chapter
3).
In addition to upper layer AUTOSAR BSW modules, the FrIf can, with the
functionality described within this specification, also support other non-AUTOSAR
upper layer software modules (CDs), provided that these modules interact with the
FrIf in the same manner as the upper layer AUTOSAR BSW modules. In particular,
those non-AUTOSAR modules need to provide APIs as described in this chapter.
8.8.3.1 <UL_RxIndication>
[SWS_FrIf_05045]⌈
Service Name <User_RxIndication>
void <User_RxIndication> (
PduIdType RxPduId,
Syntax const PduInfoType* PduInfoPtr
)
Sync/Async Synchronous
Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.
RxPdu
ID of the received PDU.
Id
Parameters
(in) Contains the length (SduLength) of the received PDU, a pointer to a
Pdu
buffer (SduDataPtr) containing the PDU, and the MetaData related to this
InfoPtr
PDU.
Parameters
None
(inout)
Parameters
None
(out)
Description Indication of a received PDU from a lower layer communication interface module.
⌋()
Note:
During the execution of this API service, the upper layer BSW module that is the final
recipient of this PDU is expected to retrieve (i.e. copy) the SDU (i.e. the payload of
the PDU) by means of the pointer PduInfoPtr which contains the received data
address and received data length.
Caveats of <UL_RxIndication>: This API service is called during the execution of the
FlexRay Job List Execution Function.
8.8.3.2 <UL_TxConfirmation>
[SWS_FrIf_05046]⌈
Service Name <User_TxConfirmation>
void <User_TxConfirmation> (
PduIdType TxPduId,
Syntax
Std_ReturnType result
)
Sync/Async Synchronous
Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters
None
(inout)
Parameters
None
(out)
⌋()
Caveats of <UL_TxConfirmation>: This API service is called during the execution of
the FlexRay Job List Execution Function.
8.8.3.3 <UL_TriggerTransmit>
[SWS_FrIf_05047]⌈
Service
<User_TriggerTransmit>
Name
Std_ReturnType <User_TriggerTransmit> (
PduIdType TxPduId,
Syntax PduInfoType* PduInfoPtr
)
Sync/Async Synchronous
Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters
TxPduId ID of the SDU that is requested to be transmitted.
(in)
Parameters
None
(out)
E_OK: SDU has been copied and SduLength indicates the number of
Std_-
copied bytes.
Return value Return-
E_NOT_OK: No SDU data has been copied. PduInfoPtr must not be
Type
used since it may contain a NULL pointer or point to invalid data.
Description Within this API, the upper layer module (called module) shall check whether the
available data fits into the buffer size reported by PduInfoPtr->SduLength. If it fits, it
shall copy its data into the buffer provided by PduInfoPtr->SduDataPtr and update
the length of the actual copied data in PduInfoPtr->SduLength. If not, it returns E_
NOT_OK without changing PduInfoPtr.
⌋()
Caveats of <UL_TriggerTransmit>: This API service is called during the execution of
the FlexRay Job List Execution Function.
8.8.3.4 <Free_Op_A>
[SWS_FrIf_05316]⌈
Service Name <Free_Op_A>
void <Free_Op_A> (
uint8 FrIf_CtrlIdx,
Syntax
uint16 FrIf_LPduIdx
)
Sync/Async Synchronous
Reentrancy Reentrant for different FrIf_LPduIdx, non reentrant for same FrIf_LPduIdx
Parameters
None
(inout)
Parameters
None
(out)
⌋()
Caveats of <Free_Op_A>: This API service is called during the execution of the
FlexRay Job List Execution Function.
8.8.3.5 <Free_Op_B>
[SWS_FrIf_05317]⌈
Service Name <Free_Op_B>
void <Free_Op_B> (
uint8 FrIf_CtrlIdx,
Syntax uint16 FrIf_LPduIdx
)
Sync/Async Synchronous
Reentrancy Reentrant for different FrIf_LPduIdx, non reentrant for same FrIf_LPduIdx
Parameters
None
(inout)
Parameters
None
(out)
⌋()
Caveats of <Free_Op_B>: This API service is called during the execution of the
FlexRay Job List Execution Function.
8.8.3.6 <UL_TxConflictNotification>
[SWS_FrIf_91001]⌈
Service Name <UL_TxConflictNotification>
void <UL_TxConflictNotification> (
uint8 FrIf_CtrlIdx,
Syntax
uint16 FrIf_LPduIdx
)
Sync/Async Synchronous
Reentrancy Reentrant for different FrIf_LPduIdx. Non reentrant for the same FrIf_LPduIdx.
⌋()
9 Sequence Diagrams
The sequence diagrams in this chapter show the basic operations carried out in a
FlexRay Cluster's FlexRay Job List Execution Function when executing the various
Communication Operations. They also show the interaction of the FrIf with the upper
layer BSW module and with the underlying FlexRay Driver.
Please note that the sequence diagrams are an extension for illustrational purposes
to ease understanding of the specification.
9.1.1 TransmitWithImmediateBufferAccess
FrIf_Transmit(Std_ReturnType, PduIdType,
const PduInfoType *)
Fr_TransmitTxLSdu()
FrIf_Transmit()
9.1.2 TransmitWithDecoupledBufferAccess
loop
Determine PDU's Byte Offset in Fram and PDU-owning
Upper Layer, Set FrIf_SduPtr = Fr_LSduPtr + ByteOffset()
[YES]
<UL_TriggerTransmit>(TxPduId, FrIf_SduPtr)
<UL_TriggerTransmit>()
FrIf_JobListExec_<FrIfCluster.ShortName>()
9.1.3 ProvideTxConfirmation
FrIf_JobListExec_<FrIfCluster.ShortName>
() FrIf Joblist Handling
Fr_CheckTxLSduStatus()
opt PDU's TxConfCounter > 0 && TxConfirmation is configured for this PDU
Determine FrTxPduId and
PDU-owning Upper Layer()
<UL_TxConfirmation>(PduIdType, Std_ReturnType)
<UL_TxConfirmation>()
Decrement PDU's
TxConfCounter()
FrIf_JobListExecution_<ClstIdx>()
9.2.1 ReceiveAndIndicate
FrIf_JobListExec_<FrIfCluster.ShortName>()
FrIf Jobllist Handling
Fr_ReceiveRxLSdu()
[FALSE]
Copy PDU to
internal location()
<UL_RxIndication>()
[TRUE]
FrIf_JobListExec_<FrIfCluster.ShortName>()
9.2.2 ReceiveAndStore
Std_ReturnType:=Fr_ReceiveRxLSdu(Fr_LPduIdx, Fr_CtrlIdx,
Fr_LSduPtr, Fr_LSduLengthPtr)
Fr_ReceiveRxLSdu()
[FALSE]
[TRUE]
FrIf_JobListExec_<FrIfCluster.ShortName>
()
9.2.3 ProvideRxIndication
FrIf_JobListExec_<FrIfCluster.ShortName>
()
FrIf Joblist Handling
<UL_RxIndication>()
FrIf_JobListExec_<FrIfCluster.ShortName>
()
FrIf_JobListExec_<FrIfCluster.ShortName>
()
Fr_PrepareLPdu(Fr_CtrlIdx, Fr_LPduIdx)
Fr_PrepareLPdu()
FrIf_JobListExec_<FrIfCluster.ShortName>
()
10 Configuration Specification
This chapter defines configuration parameters and their clustering into containers.
Chapter 10.1 gives information to help understanding the subsequent chapters.
Chapter 10.2 specifies the structure (containers) and the parameters of the FlexRay
Interface.
Chapter 9.3 specifies published information of the FlexRay Interface.
The listed configuration items can be derived from a network description database,
which is based on the EcuConfigurationTemplate. The configuration tool has to
extract all information to configure the FrIf module.
Note:
The configuration tool must check the consistency of the configuration at
configuration time.
Note:
These dependencies between FlexRay Interface and FlexRay Driver configuration
must be provided at configuration time by the configuration tools.
10.2.1 FrIf
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration parameters and sub
FrIfConfig 1
containers of the AUTOSAR FrIf module.
This container contains the general configuration parameters
FrIfGeneral 1
of the FlexRay Interface.
lowerMultiplicity = 0
upperMultiplicity = 1
FrIfPdusInFrame:
FrIfFrameStructure: EcucParamConfContainerDef
EcucParamConfContainerDef +subContainer
+container +subContainer upperMultiplicity = *
upperMultiplicity = * lowerMultiplicity = 1
lowerMultiplicity = 1
FrIfRxPdu:
EcucParamConfContainerDef
FrIfPduDirection: +choice
upperMultiplicity = 1
FrIfPdu: EcucChoiceContainerDef lowerMultiplicity = 0
+subContainer EcucParamConfContainerDef
+subContainer
upperMultiplicity = *
lowerMultiplicity = 1 +choice FrIfTxPdu:
EcucParamConfContainerDef
upperMultiplicity = 1
lowerMultiplicity = 0
+subContainer
+subContainer
FrIfController: EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 1
10.2.2 FrIfGeneral
Name FrIfCancelTransmitSupport
Parent Container FrIfGeneral
Description Configuration parameter to enable/disable FrIf support to request the
cancellation of the I-PDU transmission to FrDrv.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
Link time --
Post-build time --
Scope / Dependency scope: local
Name FrIfGetWakeupRxStatusSupport
Parent Container FrIfGeneral
Description Configuration parameter to enable/disable FrIf support to get the wakeup
received information from the FlexRay controller.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
Post-build time --
Scope / Dependency scope: local
dependency: FrIfTxConflictNotificationName
No Included Containers
10.2.3 FrIfCluster
Name FrIfGChannels
Parent Container FrIfCluster
Description The channels that are used by the cluster.
Implementation Type: Fr_ChannelType
Multiplicity 1
Type EcucEnumerationParamDef
Range FR_CHANNEL_A Cluster uses channel A
FR_CHANNEL_AB Cluster uses channel A and B
Range 1 .. 63
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU
Name FrIfGdDynamicSlotIdlePhase
Parent Container FrIfCluster
Description Duration of the idle phase within a dynamic slot [Minislots].
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 2
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
Description Number of bits used by the node to test the duration of the 'idle' or HIGH
phase of a received wakeup [gdBit]. Remarks: This parameter maps to
FlexRay Protocol 2.1 Rev. A parameter gdWakeupSymbolRxIdle. Lower
limit 14 for FlexRay Protocol 2.1 Rev. A compliance.
Multiplicity 1
Type EcucIntegerParamDef
Range 8 .. 59
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
Multiplicity 1
Type EcucIntegerParamDef
Range 15 .. 60
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
Remark: Upper limit 7986 for FlexRay Protocol 2.1 Rev. A compliance
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 7988
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
Name FrIfMainFunctionPeriod
Parent Container FrIfCluster
Description The execution cycle of the FrIf_MainFunction_<FrIfCluster.ShortName>()
in seconds. The FrIf does not require this information but the BSW
scheduler, which invokes the cluster main functions, needs it in order to
plan its tasks.
Multiplicity 1
Type EcucFloatParamDef
Range ]0 .. INF[
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
Included Containers
Container Name Multiplicity Scope / Dependency
Container for the references to DemEventParameter
elements which shall be invoked using the API
Dem_SetEventStatus in case the corresponding error
FrIfClusterDemEventParameterRef
0..1 occurs. The EventId is taken from the referenced
s
DemEventParameter's DemEventId symbolic value. The
standardized errors are provided in this container and
can be extended by vendor-specific error references.
This container contains the configuration of FlexRay
FrIfController 1..*
CC.
This container specifies a list of all FlexRay Jobs of the
FrIfJobList 1 Cluster to be performed by
FrIf_JobListExec_<FrIfCluster.ShortName>().
10.2.4 FrIfController
Included Containers
Container Name Multiplicity Scope / Dependency
A Frame triggering contains the communication parameters of
FrIfFrameTriggering 1..* the FlexRay Frame as well as a reference to the Frame
Construction Plan.
FrIfLPdu 1..* Reference to a L-PDU index
Up to two FlexRay Transceivers may connect a Controller to a
FrIfTransceiver 1..2 Cluster. This container realizes a Controller-Transceiver
assignment.
FrIfCtrlIdx:
EcucIntegerParamDef
FrIfController: +parameter
EcucParamConfContainerDef symbolicNameValue = true
min = 0
upperMultiplicity = * max = 31
lowerMultiplicity = 1
FrController:
+reference FrIfFrCtrlRef: EcucReferenceDef +destination EcucParamConfContainerDef +parameter FrCtrlIdx: EcucIntegerParamDef
upperMultiplicity = * symbolicNameValue = true
requiresSymbolicNameValue = true lowerMultiplicity = 1 min = 0
max = 255
FrIfFrTrcvChannelRef: FrTrcvChannel:
FrIfTransceiver: +reference +destination
EcucReferenceDef EcucParamConfContainerDef
EcucParamConfContainerDef
requiresSymbolicNameValue = true upperMultiplicity = *
upperMultiplicity = 2
lowerMultiplicity = 1
lowerMultiplicity = 1
+subContainer
FrIfClusterChannel: +literal FRIF_CHANNEL_A:
EcucEnumerationParamDef EcucEnumerationLiteralDef
+parameter
+literal FRIF_CHANNEL_B:
EcucEnumerationLiteralDef
FrIfBaseCycle:
+parameter EcucIntegerParamDef
max = 63
min = 0
FrIfCycleRepetition:
+parameter EcucIntegerParamDef
max = 64
min = 1
FrIfSlotId: EcucIntegerParamDef
+parameter
max = 2047
min = 1
FrIfLSduLength:
+parameter EcucIntegerParamDef
max = 254
+subContainer min = 0 FRIF_CHANNEL_A:
+literal EcucEnumerationLiteralDef
FrIfChannel:
EcucEnumerationParamDef
+literal FRIF_CHANNEL_B:
EcucEnumerationLiteralDef
+parameter
+literal FRIF_CHANNEL_AB:
EcucEnumerationLiteralDef
+parameter FrIfMessageId:
FrIfAlwaysTransmit:
EcucIntegerParamDef
EcucBooleanParamDef
+parameter
lowerMultiplicity = 0
+parameter upperMultiplicity = 1
FrIfAllowDynamicLSduLength:
min = 0
EcucBooleanParamDef
max = 65535
+parameter
FrIfPayloadPreamble:
EcucBooleanParamDef
FRIF_E_LPDU_SLOTSTATUS:
FrIfFrameTriggeringDemEventParameterRefs: EcucReferenceDef
+reference
+subContainer EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 1 upperMultiplicity = 1
lowerMultiplicity = 0 requiresSymbolicNameValue = true
FrIfLPdu:
EcucParamConfContainerDef
FrIfLPduIdx: EcucIntegerParamDef
upperMultiplicity = * +parameter
lowerMultiplicity = 1 symbolicNameValue = true
+subContainer max = 4095
min = 0
+parameter FrIfReconfigurable:
EcucBooleanParamDef
10.2.5 FrIfTransceiver
No Included Containers
10.2.6 FrIfLPdu
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 4095
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
No Included Containers
10.2.7 FrIfFrameTriggering
Configuration Parameters
Post-Build Variant
true
Value
Value Pre-compile time X VARIANT-PRE-COMPILE
Configuration Link time X VARIANT-LINK-TIME
Class Post-build time X VARIANT-POST-BUILD
Scope / scope: local
Dependency
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
Included Containers
Container Name Multiplicity Scope / Dependency
Container for the references to
FrIfFrameTriggeringDemEventParameterRef DemEventParameter elements which shall be
0..1
s invoked using the API Dem_SetEventStatus in
case the corresponding error occurs. The
159 of 177 Document ID 27: AUTOSAR_SWS_FlexRayInterface
Specification of FlexRay Interface
AUTOSAR CP R20-11
10.2.8 FrIfJobList
Included Containers
Container Name Multiplicity Scope / Dependency
A job may contain more than one operation that are executed
FrIfJob 1..*
at a specific point in time.
FrIfCluster:
EcucParamConfContainerDef
upperMultiplicity = *
lowerMultiplicity = 1
+subContainer
FrIfAbsTimerRef: EcucReferenceDef FrAbsoluteTimer: FrAbsTimerIdx:
+destination EcucParamConfContainerDef EcucIntegerParamDef
FrIfJobList: +reference +parameter
requiresSymbolicNameValue = true
EcucParamConfContainerDef upperMultiplicity = * symbolicNameValue = true
lowerMultiplicity = 1 max = 254
min = 0
FrIfCommunicationOperationIdx:
FrIfCommunicationOperation:
+parameter EcucIntegerParamDef
EcucParamConfContainerDef
max = 255
+subContainer upperMultiplicity = *
min = 0
lowerMultiplicity = 1
FrIfJob:
+literal DECOUPLED_TRANSMISSION:
EcucParamConfContainerDef
FrIfCommunicationAction: EcucEnumerationLiteralDef
upperMultiplicity = * EcucEnumerationParamDef
lowerMultiplicity = 1 +literal
TX_CONFIRMATION:
EcucEnumerationLiteralDef
+literal
RECEIVE_AND_INDICATE:
EcucEnumerationLiteralDef
+literal RX_INDICATION:
EcucEnumerationLiteralDef
+parameter
+literal
RECEIVE_AND_STORE:
EcucEnumerationLiteralDef
+subContainer +literal
PREPARE_LPDU:
EcucEnumerationLiteralDef
+literal
FREE_OP_A:
EcucEnumerationLiteralDef
+literal
FREE_OP_B:
EcucEnumerationLiteralDef
+reference FrIfLPdu:
FrIfLPduIdxRef: +destination
EcucParamConfContainerDef
EcucReferenceDef
upperMultiplicity = *
lowerMultiplicity = 1
FrIfRxComOpMaxLoop:
+parameter EcucIntegerParamDef
min = 1
max = 512
lowerMultiplicity = 0
FrIfCycle: EcucIntegerParamDef upperMultiplicity = 1
+parameter
max = 63
min = 0
FrIfMacrotick: EcucIntegerParamDef
+parameter
min = 0
max = 10240000
FrIfMaxIsrDelay:
+parameter EcucIntegerParamDef
min = 0
max = 10240000
10.2.9 FrIfJob
Included Containers
Container Name Multiplicity Scope / Dependency
A separate operation which is part of a FlexRay Job and
FrIfCommunicationOperation 1..*
defines what type of action is executed.
10.2.10 FrIfCommunicationOperation
No Included Containers
10.2.11 FrIfFrameStructure
Description This parameter defines the ByteOrder of all Pdus that are mapped into the Frame.
The absolute position of a Pdu in the Frame is
determined by the definition of the ByteOrder parameter:
If BIG_ENDIAN is specified, the FrIfPduOffset indicates the position of the most
significant bit in the Frame.
If LITTLE_ENDIAN is specified, the FrIfPduOffset indicates the position of the least
significant bit in the Frame.
Multiplicity 1
Type EcucEnumerationParamDef
Range BIG_ENDIAN --
LITTLE_ENDIAN --
Post-Build Variant
true
Value
Value Pre-compile time X VARIANT-PRE-COMPILE
Configuration Link time X VARIANT-LINK-TIME
Class Post-build time X VARIANT-POST-BUILD
Scope / scope: local
Dependency
Included Containers
Container Name Multiplicity Scope / Dependency
This container holds all the information about a PDU in a
FrIfPdusInFrame 1..*
FlexRay Frame.
10.2.12 FrIfPdusInFrame
addition, if the Frame will is sent in static segment, this parameter depends
on GPayloadLengthStatic.
No Included Containers
10.2.13 FrIfPdu
Included Containers
Container Name Multiplicity Scope / Dependency
FrIfPduDirection 1 A PDU is either transmit or receive
10.2.14 FrIfTxPdu
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU
No Included Containers
FrIfTxPduId: Pdu:
EcucIntegerParamDef EcucParamConfContainerDef
FrIfPduDirection:
FrIfConfig: EcucParamConfContainerDef EcucChoiceContainerDef FrIfTxPdu:
+parameter symbolicNameValue = true lowerMultiplicity = 0
EcucParamConfContainerDef
min = 0 upperMultiplicity = *
upperMultiplicity = 1 max = 65535
lowerMultiplicity = 0
+subContainer
FrIfPdu:
EcucParamConfContainerDef +parameter FrIfConfirm:
EcucBooleanParamDef
upperMultiplicity = *
lowerMultiplicity = 1 +parameter FrIfImmediate:
EcucBooleanParamDef
FrIfCounterLimit:
+subContainer EcucIntegerParamDef
+parameter
min = 1
max = 255
lowerMultiplicity = 0
FrIfTxConfirmationName:
upperMultiplicity = 1 +parameter EcucFunctionNameDef
upperMultiplicity = 1
FrIfUserTriggerTransmitName: lowerMultiplicity = 0
+parameter EcucFunctionNameDef
upperMultiplicity = 1
lowerMultiplicity = 0
+choice
XCP:
FrIfUserTxUL: +literal EcucEnumerationLiteralDef
EcucEnumerationParamDef
+literal PDUR:
EcucEnumerationLiteralDef
+literal
FR_NM:
EcucEnumerationLiteralDef
+parameter +literal
FR_TP:
EcucEnumerationLiteralDef
+literal
CDD:
EcucEnumerationLiteralDef
+literal
FR_AR_TP:
EcucEnumerationLiteralDef
+literal
FR_TSYN:
EcucEnumerationLiteralDef
FrIfNoneMode:
+parameter EcucBooleanParamDef
lowerMultiplicity = 0
upperMultiplicity = 1
FrIfRxPdu: defaultValue = false
+choice
EcucParamConfContainerDef
upperMultiplicity = 1
lowerMultiplicity = 0
10.2.15 FrIfRxPdu
No Included Containers
10.2.16 FrIfPduDirection
Container Choices
Container Name Multiplicity Scope / Dependency
FrIfRxPdu 0..1 Receive PDU
FrIfTxPdu 0..1 This container specifies transmission PDUs.
10.2.17 FrIfConfig
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME, VARIANT-POST-
BUILD
Post-build time --
Scope / Dependency scope: local
Included Containers
Container Name Multiplicity Scope / Dependency
This container specifies a FrIf Cluster and all related data
FrIfCluster 1..* which is required to enable communication of the Cluster. A
Cluster may consist of more than one Controller.
The Frame structure specifies a Construction Plan how a
FrIfFrameStructure 1..* Frame is assembled with PDUs and their respective Update-
Bits.
Contains PDU information. A PDU may be either a
FrIfPdu 1..*
transmission PDU or a reception PDU.
10.2.18 FrIfClusterDemEventParameterRefs
No Included Containers
10.2.19 FrIfFrameTriggeringDemEventParameterRefs
No Included Containers