AUTOSAR SWS FlexRayARTransportLayer
AUTOSAR SWS FlexRayARTransportLayer
AUTOSAR SWS FlexRayARTransportLayer
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 Contents
7 Functional specification................................................................................. 19
7.1 Overview ....................................................................................................... 19
7.1.1 Extensions of ISO 15765-2 .................................................................. 19
7.1.2 Connections ......................................................................................... 19
7.1.3 Channels .............................................................................................. 20
7.1.4 PDU Pools ............................................................................................ 20
7.1.5 Active Connections .............................................................................. 20
7.2 Protocol Processes ....................................................................................... 20
7.2.1 1:1 Connections ................................................................................... 20
7.2.1.1 1:1 Connection in a channel without Acknowledgement ................. 21
7.2.1.2 1:1 Connection in a channel with Acknowledgement without Retry 23
7.2.1.3 1:1 Connection in a channel with Acknowledgement with Retry ..... 25
7.2.2 1:n Connections ................................................................................... 28
7.3 Frame Layout ................................................................................................ 29
7.3.1 General ................................................................................................ 29
7.3.2 Single Frames (SF-x) ........................................................................... 31
7.3.2.1 ISO 15765-2 Single Frame (SF-I) .................................................... 31
7.3.2.2 Extended Single Frame (SF-E) ........................................................ 32
7.3.3 First Frames (FF-x) .............................................................................. 34
7.3.3.1 First Frame ISO 15765-2 (FF-I)........................................................ 34
7.3.3.2 First Frame Extended (FF-E) ........................................................... 35
7.3.4 Consecutive Frames ............................................................................ 36
7.3.5 Flow Control (FC) ................................................................................. 37
7.3.6 Acknowledgement Frame (AF) ............................................................ 39
The FlexRay AUTOSAR Transport Layer module resides between the PDU Router
[6] and the FlexRay Interface [5] (see Figure 1, according to [2]). The main purpose
of FlexRay AUTOSAR Transport Layer module is segmentation and reassembly of
messages that do not fit in a single FlexRay L-SDU.
Among others, the FlexRay AUTOSAR Transport Layer includes the following
features:
This specification supports only the AUTOSAR FlexRay transport protocol derived
from ISO 15765-2, which was used as standard in AUTOSAR release 3.x and below.
Since AUTOSAR release 4.0, the standard FlexRay transport layer [11] is compatible
to ISO 10681-2. For AUTOSAR release 3.2, a back port of the ISO 10681-2
compliant FlexRay transport layer has been created as a separate document named
FlexRay ISO Transport Layer. Thus, both in AUTOSAR release 3.2 and 4.0, users
must be cautious in choosing which specification to use for FlexRay Transport Layer.
The basic idea is to have an ISO 15765-2 compliant Transport Layer, which allows
by the means of static configuration to add one or more optional features (like
acknowledgement) per channel independently of each other. Of course, by adding
such a feature the compliance to ISO 15765-2 gets lost for this particular channel.
Additionally, the features are deactivatable at compile time. Even if they are compiled
in, they are still deactivatable by static configuration.
The rationale behind some of the provided features is the usage of this transport
layer not only for diagnostic purposes but also for Inter-ECU communication.
Since addressing within ISO 15765-2 is specific for the CAN bus system (CAN
identifier), it is obvious that another approach is taken within FlexRay AUTOSAR
Transport Layer.
Although FlexRay transport protocol is at first set to vehicle diagnostic systems, it has
been developed to also deal with requirements from other FlexRay based systems
needing a transport layer protocol.
Acronym: Description:
Channel A channel hosts a group of connections sharing the properties configurable by the
parameters in section 10.2.
Connection Communication path between two nodes (1:1) or one node and the network (1:n),
characterized by the parameters in section 10.2.
Frame Synonymous for N-PDU or L-SDU.
I-PDU PDU of the AUTOSAR COM module; corresponds to an N-SDU of the FlexRay
Transport Layer.
L-SDU This is the SDU of the FlexRay Interface. It represents the same entity as the N-
PDU, but from the FlexRay Interface’s point of view.
L-SDU ID Unique identifier of an L-SDU; used by upper layers such as the FlexRay
AUTOSAR Transport Layer module to interact with the FlexRay Interface.
Message Synonymous for N-SDU or I-PDU.
N-PDU This is a PDU of the FlexRay AUTOSAR Transport Layer, which is given to the
FlexRay Interface for Sending. It consists of address information, protocol control
information and the payload (N-SDU).
N-SDU This is the SDU of the FlexRay AUTOSAR Transport Layer. In the AUTOSAR
architecture, it is a set of data exchanged with the PDU Router.
N-SDU ID Unique identifier of an SDU; used by upper layers such as the PDU Router to
interact with the FlexRay Transport Layer.
PDU pool Set of FlexRay N-PDUs that share the same size and same addressing type.
Abbreviation: Description:
AF Acknowledgement Frame
CF Consecutive Frame
COM AUTOSAR COM module
FC Flow Control
FF First Frame
Fr FlexRay
PCI Protocol Control Information
FrIf FlexRay Interface
FrArTp FlexRay AUTOSAR Transport Layer (derived from ISO 15765-2)
FrIsoTp FlexRay ISO Transport Layer (ISO 10681-2)
FrTp FlexRay Transport Layer
NM Network Management
PDU Protocol Data Unit
PduR PDU Router
SDU Service Data Unit
SF Single Frame
XCP Universal Calibration Protocol
3 Related documentation
Thus, the specification SWS BSW General shall be considered as additional and
required specification for FlexRay AUTOSAR Transport Layer.
4.1 Limitations
The FlexRay AUTOSAR Transport Layer can always be used for applications if the
FlexRay protocol was used.
The following services of the PDU Router are called by the FlexRay AUTOSAR
Transport Layer module:
PduR_FrArTpStartOfReception
By this API service, the FlexRay AUTOSAR Transport Layer module informs
the upper layer (e.g. DCM via PDU Router) that a new message is being
received.
PduR_FrArTpCopyRxData
By this API service, the FlexRay AUTOSAR Transport Layer module provides
the data of one received segmented message part (N-PDU) to the upper layer.
PduR_FrArTpRxIndication
By this API service, the FlexRay AUTOSAR Transport Layer module indicates
the completed (un)successful reception of a message (N-SDU).
PduR_FrArTpCopyTxData
By this API service, the FlexRay AUTOSAR Transport Layer module asks the
upper layer (e.g. DCM via PDU Router) of the message to provide data for the
next segmented message part (N-PDU).
PduR_FrArTpTxConfirmation
By this API service, the FlexRay AUTOSAR Transport Layer module confirms
the (un)successful sending of the complete message (N-SDU) to the actual
sender (e.g. DCM).
The following services of the FlexRay AUTOSAR Transport Layer module are called
by the PDU Router:
FrArTp_Transmit
By this API service, the sending of a message (N-SDU) is triggered.
FrArTp_CancelTransmit
By this API service, the sending of a message (N-SDU) is cancelled. This
service is optional (per channel).
FrArTp_CancelReceive
By this API service, the receiving of a message (N-SDU) is cancelled. This
service is optional (per channel).
FrArTp_ChangeParameter
By this API service, the STmin and BS values of a connection can be
changed.
The following services of the FlexRay AUTOSAR Transport Layer module are called
by the FlexRay Interface:
FrArTp_RxIndication
By this API service, the FlexRay Interface indicates the reception of an FrArTp
frame (N-PDU, please do not mistake this with a FlexRay frame) to the
FrArTp. The FrArTp then processes this frame.
FrArTp_TxConfirmation
By this API service, the FlexRay Interface confirms the (un)successful sending
of the frame containing the N-PDU over the FlexRay network.
16 of 101 Document ID 601: AUTOSAR_SWS_FlexRayARTransportLayer
Specification of FlexRay AUTOSAR Transport Layer
AUTOSAR CP R20-11
FrArTp_TriggerTransmit
By this API service, the FlexRay Interface makes the FrArTp to copy the N-
PDU into the buffer provided by the FlexRay Interface. The FlexRay interface
then can start sending the FlexRay frame containing the N-PDU.
The following services of the FrArTp are called by the ECU State Manager:
FrArTp_Init
By this API service, all global variables are initialized and each connection is
set into the idle state.
FrArTp_Shutdown
By this API service, all pending transport connections are closed, resources
are freed and the module is stopped.
For details, refer to the section 5.1.6 “Code file structure” in SWS_BSWGeneral.
[SWS_FrArTp_00213] ⌈The source code of the FrArTp shall not be processor and
compiler dependent.⌋(SRS_BSW_00006)
6 Requirements traceability
Requirement Description Satisfied by
SRS_BSW_00004 All Basic SW Modules shall perform a pre-processor SWS_FrArTp_00201
check of the versions of all imported include files
SRS_BSW_00006 The source code of software modules above the µC SWS_FrArTp_00213
Abstraction Layer (MCAL) shall not be processor
and compiler dependent.
SRS_BSW_00101 The Basic Software Module shall be able to initialize SWS_FrArTp_00147
variables and hardware in a separate initialization
function
SRS_BSW_00159 All modules of the AUTOSAR Basic Software shall SWS_FrArTp_00180,
support a tool based configuration SWS_FrArTp_00181
SRS_BSW_00323 All AUTOSAR Basic Software Modules shall check SWS_FrArTp_00291
passed API parameters for validity
SRS_BSW_00336 Basic SW module shall be able to shutdown SWS_FrArTp_00148
SRS_BSW_00337 Classification of development errors SWS_FrArTp_00179
SRS_BSW_00369 All AUTOSAR Basic Software Modules shall not SWS_FrArTp_00149,
return specific development error codes via the API SWS_FrArTp_00154
SRS_BSW_00411 All AUTOSAR Basic Software Modules shall apply a SWS_FrArTp_00215
naming rule for enabling/disabling the existence of
the API
SRS_Fr_05075 The FlexRay Transport Layer implementation shall SWS_FrArTp_00149
be independent of the network configuration
SRS_Fr_05088 FlexRay Transport Layer's variables shall be SWS_FrArTp_00147
initialized
SRS_Fr_05089 The FlexRay Transport Layer services shall not be SWS_FrArTp_00179
operational before initializing the module.
SRS_Fr_05090 The FlexRay Transport Layer shall support per SWS_FrArTp_00104
connection the ISO 10681-2 / ISO 15765-2 service
N_ChangeParameter
SRS_Fr_05093 A cancellation service of transmission shal be SWS_FrArTp_00099
provided at any time
7 Functional specification
The FlexRay AUTOSAR Transport Layer module (FrArTp) offers services for
segmentation, transmission with flow control, and reassembly of messages (N-
SDUs). Its main purpose is to transfer messages that may or may not fit in a single
FlexRay frame.
7.1 Overview
For the rest of this document, sections or features that are not compliant to ISO
15765-2 will be marked as “Not compliant to ISO 15765-2”.
7.1.2 Connections
Connections are used to transfer data from one sender to one (1:1) or more (1:n)
receivers. Connections with one sender and one receiver are bi-directional; data can
be transferred in both directions. To transport parts of a possibly much larger
message, connections use FlexRay PDUs that are grouped into PDU pools.
Connections may specify a number of prioritized PDUs that must be reserved for
exclusive use as long as the connection is active.
7.1.3 Channels
A PDU pool is a conceptional element, which groups the transport PDUs of several
channels. The PDUs in a PDU pool need to have identical PDU sizes and addressing
type. For a specific ECU, a PDU pool is either received or transmitted. The PDUs in a
PDU pool may be used by one or more channels. To ensure the pool semantics in a
configuration, channels must reference either all PDUs of a Pool, or none. It must
also be ensured that no two connections assigned to the same PDU pool have
identical addresses. The PDUs of a PDU pool are evenly distributed to all open
connections at runtime, but only after all PDU required by open connections with
prioritized PDUs have been assigned.
There are, as will be shown later on, different types of First Frames and Single
Frames, but in the sequence diagrams, always FF or SF will be used, regardless of
the concrete sub type.
This type of connections exists between two nodes and is bidirectional. Within the
FlexRay AUTOSAR Transport Layer, the following subtypes are possible.
20 of 101 Document ID 601: AUTOSAR_SWS_FlexRayARTransportLayer
Specification of FlexRay AUTOSAR Transport Layer
AUTOSAR CP R20-11
Unsegmented Transfer
When a message does not exceed the possible amount of payload for a SF (which
can be derived from the N-PDU length, FrArTpAdrType and FrArTpLm), there is no
need to segment this message.
The sending Transport Layer packs the payload (N-SDU) into an N-PDU and sends it
to the receiving Transport Layer. This is done via a Single Frame (SF).
Segmented Transfer
In case a message does not fit into an SF, it needs to be split up into several parts
and flow control is applied to control the data flow taking into account the needs of
the receiver.
The transfer starts with sending a First Frame (FF) from the sender to the receiver.
This frame contains the length of the whole message (e.g. 1000 Byte) and even the
first data bytes.
The receiving peer reacts to the reception of a FF with sending of a Flow Control
frame (FC) back to the sender. This FC frame contains the value of three
parameters: FS,BS and STmin.
There shall be a statically defined upper limit (FrArTpMaxWft) for the number of
allowed WT’s. If this number has been reached, the transmission shall be aborted
and within PduR_FrArTpTxConfirmation, the result E_NOT_OK shall be returned.
BS specifies the block size. This is the number of Consecutive Frames (CF) the
sender is allowed to send between two FC Frames. The possible range is from 0x00
to 0xFF, whereas 0x00 states that no more FC Frames will be transmitted by the
receiver, i.e. the whole message shall be sent in one big block.
STmin defines the minimum gap between two CFs in milliseconds or microseconds.
The valid values range from 0x00 to 0x7F and from 0xF1 to 0xF9. The range from
0x00 to 0x7F specifies the minimum gap in milliseconds (0ms .. 127ms), the one
from 0xF1 to 0xF9 defines the gap in microseconds (100 µs, 200 µs, .. 900 µs). The
supported values of STmin are restricted by the placement of N-PDUs in FlexRay
cycles, and are subject to the jitter created by the placement of N-PDUs in the slots
of a cycle.
The alternating transmission of CF blocks and a FC frame lasts, until the whole
message is sent.
The STmin parameter can be changed during runtime by using the respective API
call.
This section is Not compliant to ISO 15765-2 and describes how a simple
acknowledgement mechanism looks like.
Unsegmented Transfer
This is mostly done like in section Unsegmented Transfer of section 7.2.1.1, except
that there is an additional Acknowledge Frame (AF) which is sent from the receiver to
the sender. This is illustrated in Figure 5:
The AF contains among others the field ACK, which has two possible values,
Positive Acknowledgement (POS_ACK) or Negative Acknowledgement (NEG_ACK).
Thus, the sender is informed about the (un)successful reception of a message by the
receiving peer. If the FS field of an AF frame (see section 7.3.6) contains the value
WT, another AF, up to FrArTpMaxRn, will arrive.
Segmented Transfer
This is done very similar to section Segmented Transfer of section 7.2.1.1. There are
only three differences:
The first difference is the transmission of an AF after the last block, because this one
has to be acknowledged as well. This frame is similar to an ordinary Flow Control
frame but contains additionally the ACK parameter (for positive or negative
acknowledgement) and the sequence number of the first faulty frame of the
transmitted block.
The second difference is the transmission of an AF with a negative
acknowledgement after a block in which an error occurred. This AF also contains the
sequence number of the first faulty or missing frame.
The third difference is, that the block size shall be in the range from 1 to 16 (due to
the 4 bit sequence number, see section 7.3.4)
Unsegmented Transfer
This section is quite similar to the corresponding one in section 7.2.1.2. The only
difference is that in case of a negative acknowledgement the frame is retransmitted.
If in Figure 8 the second try of sending the message also failed, there would be a
third one and so on.
In order to prevent infinite retransmissions in the case of a permanent failure, an
upper limit (FrArTpMaxRn) has to be defined. If the number of retries has reached
this value, the transmission of the corresponding message shall be stopped and
within PduR_FrArTpTxConfirmation and PduR_FrArTpRxIndication, an adequate
result (see section 8.2.1) shall be returned.
Segmented Transfer
Compared to the segmented transfer in section 7.2.1.2, the difference is the Retry
mechanism and, coming with it, the alternating block mechanism.
In the case a negative acknowledge arrives at the sender, this also contains the
sequence number of the first faulty frame in the currently transmitted block. Now the
sender transmits, starting with the stated sequence number, all remaining frames of
the just transmitted block again.
The Retry mechanism is shown in Figure 9 for the case of a block size of 4:
If the retry starts with a lower sequence number than requested, this shall be
tolerated, i.e. all frames until the requested shall be ignored and errors within the
ignored frames shall be ignored, too. If it starts with a higher number than requested,
this shall lead to another negative acknowledgement after the block end.
When using the Retry mechanism, the FlexRay AUTOSAR Transport Layer module
transfers blocks using the Alternating Block Mechanism. This works as follows:
The first block is transferred using normal CF frames. The second block is
transferred using CF2 frames, the third one with CF frames and so on. When a retry
occurs, a CF block is again transferred with CF frames and, of course, a CF2 block is
retried with CF2 frames.
This mechanism ensures correct behavior in case at the block end an FC frame is
lost, especially if it is an FC with flow status CTS, by allowing the detection of the
unnecessary retries.
Unsegmented Transfer
This is exactly the same like in the section Unsegmented Transfer of section 7.2.1.1.
The only difference is the multiple receivers instead of one. Thus, the procedure
looks like the following:
When an error occurs, the reception will be terminated, and the appropriate result will
be given within PduR_FrArTpRxIndication().
As seen in section 7.2 there are different types of frames. A detailed explanation of
all the types follows below.
7.3.1 General
It is common to all frames that they are headed by address information. Depending
on static configuration (per channel), in a way whether 1 Byte or 2 Byte addressing is
used, this address information consists of 1 Byte for Target Address and 1 Byte for
Source Address or 2 Bytes for Target address and 2 Bytes for Source Address.
Since it depends on the interpretation of the address information, it is not further
29 of 101 Document ID 601: AUTOSAR_SWS_FlexRayARTransportLayer
Specification of FlexRay AUTOSAR Transport Layer
AUTOSAR CP R20-11
specified whether this address information is utilized for the in automotive area so
called “Physical” or for “Functional” addressing.
[SWS_FrArTp_00255] ⌈When the FrArTp frame does not require the whole length of
its N-PDU (in a SingleFrame, a FirstFrame, or the last ConsecutiveFrame in a
transfer), the remaining space (bits) in the N-PDU shall be set to 0.⌋()
For both target and source address 1 Byte is provided, so up to 256 receivers are
addressable.
As seen in Figure 12, frames generally consist of the address information, protocol
control information and the data. The length and content of the protocol control
information (PCI) varies from frame type to frame type.
Before explaining the details of each frame, a short overview is given by the following
table (the mentioned bytes and nibbles regard to the PCI):
[SWS_FrArTp_00021] ⌈
3rd Byte
4th Byte
5th Byte
15765-2
Nibble
Nibble
Name
Byte
2nd
2nd
ISO
1st
Description
Endianness
In case a protocol value transmitted over the bus consists of more than 1 Byte (e.g.
Source Address and Target Address when using 2-Byte addressing), the endianness
shall be Most Significant Byte first, Least Significant Byte last.
In a SF-I the PCI consists of only one byte. This byte is divided in two parts, called
FT (Frame Type) and DL (Data Length). Both parts are 4 Bit long.
The FT field is common to every frame type because it identifies the respective type.
[SWS_FrArTp_00024] ⌈For ISO 15765-2 Single Frames the FT field shall be set to
0x0.⌋()
[SWS_FrArTp_00025] ⌈The DL field states the amount of the actual data bytes,
according to ISO 15765-2 the values 0x1 – 0x7 (0x6 in FRARTP_ISO6 mode) are
valid, so in an ISO 15765-2 compliant connection the size of the associated N-PDU
has to be, depending on the addressing mode, 10 (9) or 12 (11) Bytes long, since the
SF has this length.⌋()
Including address information, the length of an SF-I reaches from 4 Byte (1 Byte
payload, 1 Byte addressing) to 12 Bytes. The actual frame length can be derived
considering the addressing mode and looking in the length statement of the
corresponding PduInfoType struct in the configuration.
Error Handling
[SWS_FrArTp_00028] DL field
⌈Incoming SF-I frames with an invalid DL value of 0x0 or higher than 0x7 (0x6 in
FRARTP_ISO6 mode) shall be ignored. This shall also be done if a value arrives
which is higher than the amount of payload that can be derived from the length
statement of the corresponding PduInfoType struct in the configuration and the
addressing mode.⌋()
If acknowledgement is configured, additionally an AF with a negative
acknowledgement shall be sent back to the sender in the cases above.
[SWS_FrArTp_00029] ⌈An SF-E allows using the whole possible FlexRay payload of
254 Bytes for an unsegmented transfer. It looks as depicted in Figure 16:
[SWS_FrArTp_00031] ⌈The next byte is the DL field and states the amount of
payload contained in the SF-E. Depending on the configuration of the addressing
mode (1 Byte or 2 Byte) and the length of the associated N-PDU, all values except
0x00 and above 0xFA (1 Byte addressing) or above 0xF8 (2 Byte addressing) are
valid here.⌋()
The minimum length of such a frame is 5 Byte (1 Byte addressing, 1 Byte payload),
the maximum is 254 Byte (FlexRay limit according to [15]). The actual frame length
can be derived considering the addressing mode and looking in the length statement
of the corresponding PduInfoType struct.
Error Handling
[SWS_FrArTp_00286] DL field
⌈If this field contains the value 0x00 or, depending on the addressing mode, a value
higher than 0xFA or higher than 0xF8, the SF-E shall be ignored.
If acknowledgement is configured, additionally an AF with a negative
acknowledgement shall be sent back to the sender.⌋()
[SWS_FrArTp_00287] General
⌈If messages longer than allowed by ISO 15765-2 are not configured (FrArTpLm) for
the corresponding channel, this frame shall be ignored. This shall also be done if a
value arrives which is higher than the amount of payload that can be derived from the
length statement of the corresponding PduInfoType struct and the addressing mode
or if a value different from 0x0 arrives in the reserved nibble.
If acknowledgement is configured, additionally an AF with a negative
acknowledgement shall be sent back to the sender in the cases above.⌋()
[SWS_FrArTp_00035] ⌈To enable compliance with ISO 15765-2 on the one hand
and to allow messages longer than 212-1 Byte on the other hand, there are several
types of First Frames.⌋()
In an FF-I the PCI consists of 2 Bytes. As in an SF, the FT field is 4 Bit long, the DL
field 12 Bit.
[SWS_FrArTp_00299] ⌈The DL field contains the length of the whole message. Due
to the 12 bit length of this field, messages up to 212-1 Bytes can be transferred. ⌋()
The overall length of a First Frame including address information lasts (depending on
the per channel configuration) from 4 Byte to a connection specific maximum.
This maximum on its part depends on the use case (e.g. for communication with
CAN for which full ISO 15765-2 compliance is necessary, it will be 10 or 12 (9 or 11
in FRARTP_ISO6 mode)) as well as on the size of the associated N-PDU. The actual
amount of payload of an FF-I can be derived by considering the addressing type (1 or
34 of 101 Document ID 601: AUTOSAR_SWS_FlexRayARTransportLayer
Specification of FlexRay AUTOSAR Transport Layer
AUTOSAR CP R20-11
2 Byte) and e.g. looking in the length designation of the corresponding PduInfoType
struct.
Error Handling
[SWS_FrArTp_00039] DL field
⌈Incoming FF-I frames with DL = 0x000 shall be ignored. Moreover, if the DL value is
lower than the possible (from the PDU size, the addressing type and the channel
specific Long Messages switch derivable) payload of a SF, the frame shall also be
ignored.
If acknowledgment is configured, in all the cases above additionally an AF with a
negative acknowledgement shall be sent back to the sender.⌋()
In an FF-E, the PCI consists of 5 Bytes. The FT field is 4 Bit long, 4 Bits are
reserved, the DL field 32 Bit.
The overall length of an FF-E reaches from 7 Byte to a connection specific maximum,
which depends on the size of the associated N-PDU.
Error Handling
[SWS_FrArTp_00057] DL field
⌈If the FR_DL value is lower than the possible (from the PDU size and the
addressing type derivable) payload of an SF, the frame shall be ignored.
If acknowledgement is configured for the corresponding channel, an AF with a
negative acknowledgement shall be sent back to the sender.⌋()
The PCI of a Consecutive Frame consists of one byte, which is divided in two 4-bit
parts.
[SWS_FrArTp_00060] ⌈The FT field again states the frame type, for a CF it shall be
set to 0x2, for a CF2 it shall be 0x6 (CF2 frames are Not compliant to ISO 15765-
2).⌋()
maximum. This maximum depends on the use case (e.g. for communication with
CAN for which full ISO 15765-2 compliance is necessary it will be 10 or 12 (9 or 11 in
FRARTP_ISO6 mode) as well as on the size of the associated PDU.
The receiving peer can derive the actual data length by looking in the associated
PduInfoType struct und considering the addressing mode.
Error Handling
[SWS_FrArTp_00063] SN field
⌈If no acknowledgement is configured, then in case of a wrong SN, i.e. after SN x
does not follow SN x+1, the transfer shall be aborted and within
PduR_FrArTpRxIndication the result E_NOT_OK shall be returned.If
acknowledgment is configured, after the block end, a negative acknowledgement
shall take place and then the transfer shall be aborted as described above.If Retry is
configured too, then the transfer shall not be aborted but the Retry shall take place
(up to FrArTpMaxRn times).⌋()
[SWS_FrArTp_00066]⌈As usual, the FT field states the frame type, thus for Flow
control frames, it shall be set to 0x3.⌋()
[SWS_FrArTp_00068] ⌈BS states the block size (the number of CFs between the
Flow Control frames). If no acknowledgement is configured, all values from 0x00 to
0xFF are valid whereas 0x00 indicates that no more flow control shall take place and
the rest of the pending message will be transmitted within one big block. Otherwise,
only the values 0x01 – 0x10 are valid.⌋()
[SWS_FrArTp_00069] ⌈The last byte contains STmin, which defines the minimum
gap between two CFs. The valid values range from 0x00 to 0x7F and from 0xF1 to
0xF9. The range from 0x00 to 0x7F specifies the minimum gap in milliseconds (0ms
.. 127ms), the one from 0xF1 to 0xF9 defines the gap in microseconds (100 µs, 200
µs, .. 900µs). The supported values of STmin are restricted by the placement of N-
PDUs in FlexRay cycles, and are subject to the jitter created by the placement of N-
PDUs in the slots of a cycle.⌋()
Error Handling
[SWS_FrArTp_00285] FS field
⌈If acknowledgment with Retry is configured, instead of abortion of the transfer, the
frame shall be ignored.⌋()
[SWS_FrArTp_00244] BS field
⌈All values are valid if no acknowledgement is configured. Otherwise, only the values
from 0x1 to 0x10 are valid. If no Retry is configured in the latter case, the transfer
[SWS_FrArTp_00075] ⌈BS field can only be set to the values 0x01 to 0x10 due to
the 4 Bit Sequence Number counter in a CF (section 7.3.4).⌋()
[SWS_FrArTp_00078] ⌈SN field contains the number of the first faulty CF within the
last block. All values are valid.⌋()
Error Handling
The following only holds if an AF arrives when it is expected. Otherwise, see section
7.3.7.
[SWS_FrArTp_00284] FS field
⌈In a segmented transfer, all values higher than 0x2 shall lead to the abortion of the
transfer and PduR_FrArTpTxConfirmation shall be called with the result E_NOT_OK.
If additionally Retry is configured, such values shall not lead to the abortion of the
transfer. Instead, the frame shall be ignored.⌋()
[SWS_FrArTp_00246] BS field
⌈The value 0x00 and all values higher than 0x10 shall cause the abortion of the
transfer and PduR_FrArTpTxConfirmation shall be called with the result E_NOT_OK.
If additionally Retry is configured, such values shall not lead to the abortion of the
transfer. Instead, the frame shall be ignored.⌋()
[SWS_FrArTp_00249] SN field
⌈If a frame arrives that contains an SN of a CF that has not been transmitted within
the block, e.g. block size is 10 and this field has value 12, the transfer shall be
aborted and PduR_FrArTpTxConfirmation shall be called with the result E_NOT_OK.
If additionally Retry is configured, the transfer shall not be aborted. Instead, the frame
shall be ignored.⌋()
[SWS_FrArTp_00250] General
⌈If for the channel no acknowledgement is configured, this frame type shall be
ignored.
In an unsegmented acknowledged transfer, the expected value for the fields BS,
STmin, and SN is 0x0. Other values shall be tolerated.⌋()
For a better understanding, the following table depicts the possible combinations
(and their meaning) of the FS and ACK field in an Acknowledgment Frame:
Possible
combinations of
Leads to Leads to
FS and ACK field Meaning / Meaning /
ACK = 0x0 Appearance
Retry (if ACK = 0x1 Appearance
Retry (if
in configured) configured)
Acknowledgement
Frames
Negative
Positive
Acknowledge
Acknowledge
after SF or
after SF or
FS = CTS X after end of
NO X after block YES
end in
Segmented
Segmented
Transfer
Transfer
Negative
Acknowledge
after SF (if
FS = WT -- -- NO X currently no NO
Receive
buffer is
available)
Negative
Acknowledge
after SF (if
FS = OVFLW -- -- NO X no Receive
NO
buffer is
available)
Not every frame type is accepted at any point in time and in any configuration of a
channel/connection. Thus, a detailed description is given below.
[SWS_FrArTp_00082] ⌈A value of the FR_FT field higher than 0x7 shall always be
ignored.⌋()
TP Layer
SF-I FF-I (1:1) CF (1:1) FC Other
Status
If reception is in If reception is in If reception is If awaited then Ignore
progress within progress within in progress process,
Segmented the connection, the connection, within the otherwise
Transmit see see connection, ignore it.
within this corresponding cell corresponding cell see
connection below. Otherwise, below. Otherwise, corresponding
in progress process the SF-I process the FF-I cell below.
as start of a new as start of a new Otherwise,
reception. reception. ignore it.
Terminate the Terminate the If awaited then If transmission Ignore
current reception, current reception, process, is in progress
Segmented report a report a otherwise within the
Receive PduR_FrArTpRxI PduR_FrArTpRxI ignore connection,
ndication with the ndication with the see
within this
result E_NOT_OK result E_NOT_OK corresponding
connection and process the and process the cell above.
in progress SF-I as the start FF-I as the start Otherwise
of a new of a new ignore it
reception. reception.
Process the SF-I Process the FF-I
Idle as the start of a as the start of a Ignore Ignore Ignore
new reception new reception
Table 3: FT Error Handling in ISO 15765-2 compliant channels/connections
Regarding CF and CF2 frames there is a special error handling in case Retry is
configured (otherwise CF2 frames are ignored):
If the sender starts a block with another frame than expected, i.e. CF instead of CF2
or CF2 instead of CF, then the sender is doing a Retry that has not been requested
by the receiver (maybe because of losing the FC-CTS frame on the bus). Therefore,
the receiver always has to remember the old block size and send another FC-CTS at
the end of this retransmitted block. Errors in the unnecessarily retransmitted block
shall be ignored.⌋()
[SWS_FrArTp_00252] AF frame
⌈If no acknowledgement is activated, this frame shall be ignored. Otherwise, on the
receiver side or in idle state, these frames shall be ignored, too.⌋()
On the sender side, the behavior in case of an incoming AF shall be the following:
SF-x frame
No restrictions.
As mentioned earlier in this specification, there are several factors influencing the
decision of the FlexRay AUTOSAR Transport Layer module to segment a message
(N-SDU) or not.
The values of the following parameters play a role hereby:
N-PDU length, FrArTpLm, FrArTpAdrType, FrArTpMultRec, FrArTpGrpSeg, and the
length of the to-be-transmitted message (N-SDU).
four bytes (FrArTpAdrType) are needed to state to address information. The frames
that are allowed to be utilized, and the payload they can carry depend on the value of
FrArTpLm (e.g. SF-E is allowed or not, SF-I can carry 7 or 6 bytes etc.). In case the
connection is a 1:n connection (FrArTpMultRec), the parameter FrArTpGrpSeg states
whether segmentation is allowed or not.
With all this information and the length of the to-be-transmitted N-SDU, the FrArTp
can decide whether it has to segment the N-SDU or not.⌋()
PDUs of a PDU pool must be assigned to all active connections in a way that no
connection freezes, while connections with prioritized PDUs are served first.
[SWS_FrArTp_00258] ⌈Each PDU assignment cycle shall start with the prioritized
PDUs. In this phase, PDUs are only assigned to active connections with prioritized
PDUs, until their needs are satisfied. Afterwards, PDU assignment continues for all
active connections.⌋()
[SWS_FrArTp_00259] ⌈It must be ensured that the last PDU of a PDU pool within a
FlexRay cycle is always used by the scheduling.⌋()
[SWS_FrArTp_00260] ⌈If not all PDUs of the pool are used, the positions of the
unused PDUs are not relevant; gaps are allowed in any place.⌋()
When an SF-x or FF-x frame is received, the N-PDU-ID is used to identify the
relevant pool. Because a PDU pool may only be used by channels with identical
addressing type, the address information can be extracted from the N-PDU, by which
the receiving connection can be identified, because no two connections using the
same PDU pool have identical addresses.
[SWS_FrArTp_00261] ⌈If the receiving connection is not active, and all state
machines of the associated channel are in use, the incoming message shall be
ignored.⌋()
[SWS_FrArTp_00262] ⌈No state machine shall be used for the reception of an SF-x.
When the corresponding connection is free, the single frame shall be forwarded
immediately by calling PduR_FrArTpStartOfReception and, upon successful return of
this function, PduRFrArTpCopyRxData and PduR_FrArTpRxIndication.⌋()
This feature is intended for connections in which sometimes one peer has to send
data and sometimes the other in order not to need two connections in this case.
[SWS_FrArTp_00226] ⌈The FrArTp shall abort the reception of the current N-SDU if
the service FrArTp_CancelReceive provides a valid FrArTpRxSduId.⌋()
[SWS_FrArTp_00227] ⌈The FrArTp shall reject the request for receive cancellation
by returning E_NOT_OK when
a) the cancelled connection is not active, or when
b) the FrArTp has already received the last frame of an unacknowledged
connection, or when
c) the FrArTp has already provided the final AF of an acknowledged
connection.⌋()
[SWS_FrArTp_00104] ⌈The FrArTp also supports the optional service for changing
the parameters FrArTpMaxBs and FrArTpStMin / FrArTpStMinGrpSeg mentioned in
[13] via the API call FrArTp_ChangeParameter. A change is not possible during an
ongoing reception and shall lead to the return value E_NOT_OK. ⌋(SRS_Fr_05090)
The FlexRay AUTOSAR Transport Layer does not provide message buffers, neither
for sending nor for receiving. Instead, it provides received data and requests
transmitted data chunk wise from/to the upper layer.
[SWS_FrArTp_00111] ⌈When Retry is enabled, the TP sends the FF-x without data.
After reception of an FC, the data for the first CF is acquired with
retry.TpDataState set to TP_DATACONF. For the following CFs,
retry.TpDataState shall be set to TP_CONFPENDING.⌋()
[SWS_FrArTp_00115] ⌈The block size used during reception is constant. The value
is configured via FrArTpMaxBs, and can be changed via the API
FrArTp_ChangeParameter.⌋()
[SWS_FrArTp_00117] ⌈In case of failing to copy the received data, the remaining
CFs of the current block shall be discarded. When the failure occured in the last
block, and acknowledgement is enabled, an AF with a negative acknowledgement
and FS = OVFLW shall be sent back to the sender. Otherwise, an FC with FS =
OVFLW shall be sent back, but only if the initial call to PduR_FrTpStartOfReception
returned BUFREQ_E_OVFL.⌋()
At the sender side, the originator of the transmission (e.g. DCM or COM) shall not
change the buffer after a successful Transmit call until the connection is closed by a
call to TxConfirmation. When a cyclic buffer is used, the data in this buffer must be
kept until it is explicitly freed by PduR_FrArTpCopyTxData with
retry.TpDataState set to TP_DATACONF.
At the receiver side, the module that provides the receive buffer (e.g. DCM or COM)
shall not change this buffer after a successful call to StartOfReception until the
connection is closed by a call to PduR_FrArTpRxIndication. When a cyclic buffer is
used, it may assume that all data provided via PduR_FrArTpCopyRxData is valid and
may be discarded immediately.
sent and therefore it is waited for the retry frame(s). In this case, the timer CR will be
reset by the erroneous frame.⌋()
[SWS_FrArTp_00179]⌈
Error
Type of error Related error code
value
FRARTP_E_INVALID_PDU_SDU_
API service called with invalid SDU or PDU ID 0x3
ID
⌋(SRS_BSW_00337, SRS_Fr_05089)
8 API specification
[SWS_FrArTp_00291] ⌈If development error detection is enabled, all APIs with a
parameter containing an SDU or a PDU identifier shall check the identifier and raise
the development error FRARTP_E_INVALID_PDU_SDU_ID when the identifier has
not been configured.⌋(SRS_BSW_00323)
The following types are defined within AUTOSAR and used for the FrArTp:
[SWS_FrArTp_00141]⌈
Module Header File Imported Type
ComStack_Types.h BufReq_ReturnType
ComStack_Types.h PduIdType
ComStack_Types.h PduInfoType
ComStack_Types.h RetryInfoType
ComStack_Types.h TPParameterType
ComStack_Types.h TpDataStateType
Std_Types.h Std_ReturnType
Std
Std_Types.h Std_VersionInfoType
⌋()
[SWS_FrArTp_00288]⌈
Name FrArTp_ConfigType
Kind Structure
implementation specific
Elements Type --
Comment --
This is the base type for the configuration of the FlexRay Transport Protocol.
A pointer to an instance of this structure will be used in the initialization of the Flex
Description
Ray Transport Protocol.
The outline of the structure is defined in chapter 10 Configuration Specification.
Available
FrArTp.h
via
56 of 101 Document ID 601: AUTOSAR_SWS_FlexRayARTransportLayer
Specification of FlexRay AUTOSAR Transport Layer
AUTOSAR CP R20-11
⌋()
8.3.1.1 FrArTp_GetVersionInfo
[SWS_FrArTp_00215]⌈
Service Name FrArTp_GetVersionInfo
void FrArTp_GetVersionInfo (
Syntax Std_VersionInfoType* versioninfo
)
Sync/Async Synchronous
Reentrancy Reentrant
Parameters (out) versioninfo Pointer to where to store the version information of this module.
⌋(SRS_BSW_00411)
8.3.2.1 FrArTp_Init
[SWS_FrArTp_00147]⌈
Service Name FrArTp_Init
void FrArTp_Init (
Syntax const FrArTp_ConfigType* configPtr
)
Sync/Async Synchronous
Parameters
None
(inout)
Parameters
None
(out)
This service initializes all global variables of the FlexRay AUTOSAR Transport
Description
Layer and sets all states to idle.
⌋(SRS_BSW_00101, SRS_Fr_05088)
Please note: The call of this service is mandatory before using the FrArTp for further
processing.
8.3.2.2 FrArTp_Shutdown
[SWS_FrArTp_00148]⌈
Service Name FrArTp_Shutdown
void FrArTp_Shutdown (
Syntax void
)
Service ID
0x01
[hex]
Sync/Async Synchronous
Parameters
None
(inout)
Parameters None
(out)
This service closes all pending transport protocol connections by simply stopping
Description
operation, frees all resources and stops the FrArTp Module
⌋(SRS_BSW_00336)
8.3.3.1 FrArTp_Transmit
[SWS_FrArTp_00149]⌈
Service Name FrArTp_Transmit
Std_ReturnType FrArTp_Transmit (
PduIdType TxPduId,
Syntax const PduInfoType* PduInfoPtr
)
Sync/Async Synchronous
Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters
None
(inout)
⌋(SRS_BSW_00369, SRS_Fr_05075)
8.3.3.2 FrArTp_CancelTransmit
[SWS_FrArTp_00150]⌈
Service Name FrArTp_CancelTransmit
Std_ReturnType FrArTp_CancelTransmit (
Syntax PduIdType TxPduId
)
Sync/Async Synchronous
Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters
None
(inout)
⌋()
Please note: When a transfer is successfully cancelled, the function
PduR_FrArTpTxConfirmation will be called with E_NOT_OK.
8.3.3.3 FrArTp_CancelReceive
[SWS_FrArTp_00229]⌈
Service Name FrArTp_CancelReceive
Std_ReturnType FrArTp_CancelReceive (
Syntax PduIdType RxPduId
)
Sync/Async Synchronous
Parameters
None
(inout)
⌋()
8.3.3.4 FrArTp_ChangeParameter
[SWS_FrArTp_00151]⌈
Service Name FrArTp_ChangeParameter
Std_ReturnType FrArTp_ChangeParameter (
PduIdType id,
Syntax TPParameterType parameter,
uint16 value
)
Sync/Async Synchronous
Parameters
None
(inout)
Description Request to change a specific transport protocol parameter (e.g. block size).
⌋()
Caveats: According to ISO 15765-2, it is not possible to change a parameter value
during an ongoing reception.
8.4.1 FrArTp_TriggerTransmit
[SWS_FrArTp_00154]⌈
Service FrArTp_TriggerTransmit
Name
Std_ReturnType FrArTp_TriggerTransmit (
PduIdType TxPduId,
Syntax PduInfoType* PduInfoPtr
)
Service ID
0x41
[hex]
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.
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
Description 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.
⌋(SRS_BSW_00369)
Please note: This function might be called in interrupt context
8.4.2 FrArTp_RxIndication
[SWS_FrArTp_00152]⌈
Service Name FrArTp_RxIndication
void FrArTp_RxIndication (
PduIdType RxPduId,
Syntax const PduInfoType* PduInfoPtr
)
Service ID
0x42
[hex]
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.
⌋()
8.4.3 FrArTp_TxConfirmation
[SWS_FrArTp_00153]⌈
Service Name FrArTp_TxConfirmation
void FrArTp_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)
⌋()
8.5.1 FrArTp_MainFunction
[SWS_FrArTp_00162]⌈
Service Name FrArTp_MainFunction
void FrArTp_MainFunction (
Syntax void
)
⌋()
Please note: This function is called directly by the Basic Software Scheduler (SchM).
This section defines all interfaces that are required to fulfill the core functionality of
the module.
[SWS_FrArTp_00219]⌈
Header
API Function Description
File
PduR_FrArTp- PduR_Fr Called after an I-PDU has been received via the TP API, the result
RxIndication ArTp.h indicates whether the transmission was successful or not.
PduR_FrArTp- PduR_Fr This function is called at the start of receiving an N-SDU. The N-SDU
StartOf- ArTp.h might be fragmented into multiple N-PDUs (FF with one or more
64 of 101 Document ID 601: AUTOSAR_SWS_FlexRayARTransportLayer
Specification of FlexRay AUTOSAR Transport Layer
AUTOSAR CP R20-11
Reception following CFs) or might consist of a single N-PDU (SF). The service
shall provide the currently available maximum buffer size when invoked
with TpSduLength equal to 0.
This function is called after the I-PDU has been transmitted on its
PduR_FrArTp- PduR_Fr
network, the result indicates whether the transmission was successful
TxConfirmation ArTp.h
or not.
⌋()
This section defines all interfaces that are required to fulfill an optional functionality of
the module.
[SWS_FrArTp_00220]⌈
API Function Header File Description
⌋()
9 Sequence diagrams
Although the following sequence diagrams are quite detailed, they do not depict
every detail. Thus, they should be seen as an addendum to this specification.
FrArTp_Transmit()
return: E_OK
ref
Mark 1 Frame Transmit Sender SF
[YES]
[WT]
[OVFLW]
PduR_FrArTpTxConfirmation()
Result: E_NOT_OK
PduR_FrArTpTxConfirmation()
Result: E_OK
FrArTp_Transmit()
return: E_OK
ref
Frame Transmit Sender FF
[FC(OVFLW)]
PduR_FrArTpTxConfirmation()
Result: E_NOT_OK
PduR_FrArTpTxConfirmation()
Result: E_OK
FrArTp_Transmit()
return: E_OK
ref
Frame Transmit Sender FF
[FC(OVFLW)]
PduR_FrArTpTxConfirmation()
Result: E_NOT_OK
[AF(NACK)]
Retransmit previous block, skip buffer request: Mark 2
PduR_FrArTpTxConfirmation()
Result: E_OK
[NO] ref
Data Copy Sender
FrIf_Transmit()
[YES] PduR_FrArTpTxConfirmation()
Result: E_NOT_OK
FrArTp_TxConfirmation()
Result E_OK
«module» «module»
PduR FrArTp
PduR_FrArTpCopyTxData() FrArTp_MainFunction()
[BUFREQ_E_NOT_OK]
PduR_FrArTpTxConfirmation()
Result: E_NOT_OK
[BUFREQ_OK or BUFREQ_E_BUSY]
[NO] PduR_FrArTpTxConfirmation()
Result: E_NOT_OK
«module» «module»
PduR FrArTp
FrArTp_Transmit()
return: E_OK
return: E_NOT_OK
PduR_FrArTpTxConfirmation()
Result: E_OK
[NO]
FrArTp_CancelTransmit()
PduR_FrArTpTxConfirmation()
Result: E_NOT_OK
FrArTp_CancelTransmit()
return: E_OK
FrArTp_RxIndication()
PduR_FrArTpStartOfReception()
SF
[BUFREQ_E_OVFL or BUFREQ_E_NOT_OK]
[YES] ref
Frame Transmit Receiver Transmit
AF(OVFLW)
[BUFREQ_OK]
ref
Data Copy Receiver Unsegmented SF
[YES] ref
Frame Transmit Receiver AF(ACK)
PduR_FrArTpRxIndication()
Result: E_OK
FrArTp_MainFunction()
PduR_FrArTpCopyRxData()
SduSize: 0
[YES]
ref
Frame Transmit Receiver Transmit
AF(OVFLW)
PduR_FrArTpRxIndication()
Result: E_NOT_OK
[BUFREQ_OK]
[YES]
[YES]
ref
Frame Transmit Receiver Transmit
AF(OVFLW)
PduR_FrArTpRxIndication()
Result: E_NOT_OK
[NO]
ref
Frame Transmit Receiver Transmit
AF(WT)
[NO]
PduR_FrArTpRxIndication()
Result: E_NOT_OK
PduR_FrArTpCopyRxData()
SF
[YES]
ref
Frame Transmit Receiver Transmit
AF(OVFLW)
PduR_FrArTpRxIndication()
Result: E_NOT_OK
FrArTp_RxIndication()
PduR_FrArTpStartOfReception()
FF
[BUFREQ_E_OVFL or BUFREQ_E_NOT_OK]
[YES] ref
Frame Transmit Receiver Transmit
AF(OVFLW)
[BUFREQ_OK]
ref
Mark 1 Wait For Buffer Receiver Segmented
ref
DataCopy Receiver Segmented CF(2)
[YES]
[YES] ref
Frame Transmit Receiver AF(NACK)
PduR_FrArTpRxIndication()
Result: E_NOT_OK
[YES] ref
Frame Transmit Receiver AF(Ack)
PduR_FrArTpRxIndication()
Result: E_OK
FrArTp_MainFunction()
PduR_FrArTpCopyRxData()
SduSize: 0
ref
Frame Transmit Receiver Transmit
FC(OVFLW)
PduR_FrArTpRxIndication()
Result: E_NOT_OK
[BUFREQ_OK]
Decrease FRTP_MAX_WFT ()
[NO]
ref
Frame Transmit Receiver Transmit
FC(OVFLW)
PduR_FrArTpRxIndication()
Result: E_NOT_OK
FrArTp_MainFunction()
PduR_FrArTpCopyRxData()
ref
Frame Transmit Receiver Transmit
FC(OVFLW)
PduR_FrArTpRxIndication()
Result: E_NOT_OK
[BUFREQ_OK]
FrIf_Transmit()
[YES]
PduR_FrArTpRxIndication()
Result: E_NOT_OK
[NO] FrArTp_TriggerTransmit()
FrArTp_TxConfirmation()
Result E_OK
«module» «module»
PduR FrArTp
PduR_FrArTpStartOfReception()
return: BUFREQ_OK
PduR_FrArTpRxIndication()
Result: E_OK
FrArTp_CancelReceive()
return: E_NOT_OK
[NO]
FrArTp_CancelReceive()
return: E_OK
PduR_FrArTpRxIndication()
Result: E_NOT_OK
10 Configuration specification
In general, this chapter defines configuration parameters and their clustering into
containers.
Sections 10.1 and 10.3 refer to the corresponding sections in the SWS BSW
General.
Section 10.2 specifies the structure (containers) and the parameters of the FlexRay
AUTOSAR Transport Layer module.
FrArTpDevErrorDetect:
FrArTp: EcucModuleDef FrArTpGeneral: +parameter EcucBooleanParamDef
EcucParamConfContainerDef
lowerMultiplicity = 0 defaultValue = false
upperMultiplicity = 1
+parameter FrArTpHaveAckRt:
EcucBooleanParamDef
+parameter FrArTpHaveGrpSeg:
EcucBooleanParamDef
+parameter FrArTpHaveTc:
+container EcucBooleanParamDef
+parameter FrArTpHaveLm:
EcucBooleanParamDef
+parameter FrArTpVersionInfoApi:
EcucBooleanParamDef
defaultValue = false
FrArTpMainFuncCycle:
+parameter EcucFloatParamDef
min = 0
max = INF
FrArTpMultipleConfig: FrArTpChannel:
+container +subContainer
EcucParamConfContainerDef EcucParamConfContainerDef
lowerMultiplicity = 1
upperMultiplicity = *
FrArTpMaxBs:
EcucIntegerParamDef
min = 0 +parameter
+literal FRARTP_ACK_WITHOUT_RT:
max = 255
EcucEnumerationLiteralDef
FRARTP_ISO: +literal
+literal
EcucEnumerationLiteralDef FrArTpLm: FRARTP_ACK_WITH_RT:
EcucEnumerationParamDef EcucEnumerationLiteralDef
+parameter min = 0
+literal max = 255
FRARTP_L4G: lowerMultiplicity = 0
EcucEnumerationLiteralDef upperMultiplicity = 1
defaultValue = 0 FrArTpConnection:
EcucParamConfContainerDef
+subContainer
FRARTP_OB: lowerMultiplicity = 1
+literal
EcucEnumerationLiteralDef FrArTpAdrType: upperMultiplicity = *
EcucEnumerationParamDef +parameter FrArTpPdu:
EcucParamConfContainerDef
+literal +subContainer
FRARTP_TB:
lowerMultiplicity = 1
EcucEnumerationLiteralDef
upperMultiplicity = *
FrArTpStMinGrpSeg:
FrArTpTimeBr: EcucFloatParamDef
EcucFloatParamDef +parameter +parameter
min = 0
min = 0 max = 0.127
max = 65.535 lowerMultiplicity = 0
upperMultiplicity = 1
FrArTpSduTxId:
FrArTpConnection: EcucIntegerParamDef
EcucParamConfContainerDef
FrArTpTxSdu: +parameter min = 0
lowerMultiplicity = 1 EcucParamConfContainerDef max = 65535
upperMultiplicity = * +subContainer symbolicNameValue = true
lowerMultiplicity = 0
upperMultiplicity = 1
+reference FrArTpTxSduRef:
EcucReferenceDef
FrArTpRxSdu: lowerMultiplicity = 0
FrArTpRxSduRef: +destination upperMultiplicity = *
EcucParamConfContainerDef
+reference EcucReferenceDef
lowerMultiplicity = 0
upperMultiplicity = 1 lowerMultiplicity = 1
+subContainer upperMultiplicity = 1
FrArTpSduRxId:
+parameter EcucIntegerParamDef
min = 0
max = 65535
symbolicNameValue = true
FrArTpLa:
EcucIntegerParamDef
+parameter
min = 0
max = 65535
lowerMultiplicity = 0
upperMultiplicity = 1
FrArTpRa:
EcucIntegerParamDef
+parameter
min = 0
max = 65535
lowerMultiplicity = 0
upperMultiplicity = 1
+parameter FrArTpMultRec:
EcucBooleanParamDef
FrArTpConPrioPdus:
EcucIntegerParamDef
+parameter
min = 0
max = 255
lowerMultiplicity = 0
upperMultiplicity = 1
defaultValue = 0
10.2.1 FrArTp
SWS Item ECUC_FrArTp_00001 :
Module Name FrArTp
Module Description Configuration of the FrArTp (FlexRay Transport Protocol) module.
Post-Build Variant Support true
Supported Config Variants VARIANT-POST-BUILD, VARIANT-PRE-COMPILE
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the general configuration (parameters)
FrArTpGeneral 1
of the FlexRay TP.
This container contains the configuration parameters and sub
FrArTpMultipleConfig 1
containers of the AUTOSAR FrArTp module.
10.2.2 FrArTpGeneral
SWS Item ECUC_FrArTp_00012 :
Container Name FrArTpGeneral
Parent Container FrArTp
This container contains the general configuration (parameters) of the
Description
FlexRay TP.
82 of 101 Document ID 601: AUTOSAR_SWS_FlexRayARTransportLayer
Specification of FlexRay AUTOSAR Transport Layer
AUTOSAR CP R20-11
Configuration Parameters
Link time --
Post-build time --
Scope / Dependency scope: local
No Included Containers
All parameters within section 10.2.3 are global and, of course, only present once for
the whole module.
10.2.3 FrArTpChannel
SWS Item ECUC_FrArTp_00005 :
Container Name FrArTpChannel
84 of 101 Document ID 601: AUTOSAR_SWS_FlexRayARTransportLayer
Specification of FlexRay AUTOSAR Transport Layer
AUTOSAR CP R20-11
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time --
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time --
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
Type EcucIntegerParamDef
Range 0 .. 255
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time --
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
Name FrArTpMaxWft
Parent Container FrArTpChannel
Description This parameter defines the maximal number of wait frames to be sent for a
pending connection.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 255
Default value --
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time --
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time --
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
Description This parameter defines the timeout in seconds for waiting for an FC or AF
on the sender side in a 1:1 connection.
Multiplicity 1
Type EcucFloatParamDef
Range [0 .. 65.535]
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time --
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration (parameters) of one
FrArTpConnection 1..* FlexRay TP connection.
A connection can only belong to one channel.
Container to hold the PDU parameters.
FrArTpPdu 1..*
ImplementationType: PduInfoType
All parameters within this section are present for each channel and read-only. They
shall be placed outside the source code of the module in order to be modifiable by a
flashing process without re-flashing the code itself.
10.2.4 FrArTpPdu
SWS Item ECUC_FrArTp_00029 :
Container Name FrArTpPdu
Parent Container FrArTpChannel
Container to hold the PDU parameters.
Description
ImplementationType: PduInfoType
Post-Build Variant
true
Multiplicity
91 of 101 Document ID 601: AUTOSAR_SWS_FlexRayARTransportLayer
Specification of FlexRay AUTOSAR Transport Layer
AUTOSAR CP R20-11
ImplementationType: PduIdType
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 65535
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU
No Included Containers
10.2.5 FrArTpConnection
SWS Item ECUC_FrArTp_00010 :
Container Name FrArTpConnection
Parent Container FrArTpChannel
This container contains the configuration (parameters) of one FlexRay TP
connection.
Description
A connection can only belong to one channel.
Post-Build Variant
true
Multiplicity
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time --
Post-build time X VARIANT-POST-BUILD
Configuration Parameters
Included Containers
Container Name Multiplicity Scope / Dependency
Describes the Rx N-SDU. This N-SDU can produce meta data
FrArTpRxSdu 0..1 items of type SOURCE_ADDRESS_16 and
TARGET_ADDRESS_16.
Describes the Tx N-SDU. This N-SDU can consume meta data
FrArTpTxSdu 0..1 items of type SOURCE_ADDRESS_16 and
TARGET_ADDRESS_16.
All parameters within this section are present for each connection and read-only.
They shall be placed outside the source code of the module in order to be modifiable
by a flashing process without re-flashing the code itself.
10.2.6 FrArTpTxSdu
SWS Item ECUC_FrArTp_00055 :
Container Name FrArTpTxSdu
Parent Container FrArTpConnection
Describes the Tx N-SDU. This N-SDU can consume meta data items of
Description
type SOURCE_ADDRESS_16 and TARGET_ADDRESS_16.
Post-Build Variant
true
Multiplicity
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time --
Post-build time X VARIANT-POST-BUILD
Configuration Parameters
No Included Containers
10.2.7 FrArTpRxSdu
SWS Item ECUC_FrArTp_00038 :
Container Name FrArTpRxSdu
95 of 101 Document ID 601: AUTOSAR_SWS_FlexRayARTransportLayer
Specification of FlexRay AUTOSAR Transport Layer
AUTOSAR CP R20-11
No Included Containers
10.2.8 FrArTpMultipleConfig
SWS Item ECUC_FrArTp_00028 :
Container Name FrArTpMultipleConfig
Parent Container FrArTp
This container contains the configuration parameters and sub containers of
Description
the AUTOSAR FrArTp module.
Configuration Parameters
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration (parameters) of one
FrArTpChannel 1..*
FlexRay TP channel.
Where VE is the time from starting the BS timer until recognition of the frame in the
receiver TP and VS is the time from starting the CR timer until recognition of the
frame in the sender TP.
[SWS_FrArTp_00276] ⌈All PDUs of a PDU pool must have the same size, and all
channels that reference these PDUs must have the same addressing type.⌋()
[SWS_FrArTp_00277] ⌈In the set of connections that are associated with a PDU
pool, no two connections have the same address information, not even with reversed
addresses.⌋()
[SWS_FrArTp_00174] ⌈If more than one N-PDU is used for one N-SDU within a
connection, the FrIf shall guarantee, that the N-PDUs (L-SDUs) are scheduled (sent
over the bus) in the same order the FlexRay AUTOSAR Transport Layer uses them,
i.e. in ascending order regarding the N-PDU IDs used in the FlexRay AUTOSAR
Transport Layer. To simplify configuration, all PDUs of a pool shall be arranged such
that they are always received in the same order in which they have been transmitted,
independent of the current cycle in the FlexRay communication round.⌋()
This is necessary to avoid Rx-Indication at the FrArTp for in the current transfer not
used N-PDUs or if e.g. in every 2nd FlexRay bus cycle an N-PDU is scheduled.
[SWS_FrArTp_00182] ⌈For the last PDU (in temporal order) of each PDU pool, a
TxConfirmation shall be configured.⌋()