DEENESPTFRRUARHIKOZHNL

FlexRay Transport Layer (FrTp)

ModulFrTp (FlexRay Transport Layer)
BSW-Modul-ID36
Standard-Header#include "FrTp.h"
SWS-SpezifikationAUTOSAR_SWS_FlexRayISOTransportLayer.pdf
ClusterFlexRay

Module guideAI-GENERATED

Segments and reassembles large messages according to ISO 10681-2 between PDU Router and FlexRay Interface.
AI-GENERATED unreviewed Model: claude-opus-5-5 · Effort: high · Temperature: not controllable · Prompt: 74e3fa4a7265 Provenance Open questions (1)
Causal anchor: R20-11 Valid from R20-11 Synthesized for this specification release.
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Segments and reassembles large messages according to ISO 10681-2 between PDU Router and FlexRay Interface.

FrTp transmits large messages between PduR and FrIf according to ISO 10681-2 ([SWS_FrTp_01005]). It segments and reassembles them, controls flow, and distributes bandwidth via shared Tx PDU pools. FrTp_Transmit only accepts a transmit request; the actual work is performed by the cyclic FrTp_MainFunction, which must run at least once per FlexRay cycle ([SWS_FrTp_01152]). Acknowledged and unacknowledged transmissions as well as messages of unknown length are supported. In case of protocol errors or invalid segmentation, FrTp aborts and reports E_NOT_OK to the PduR.

FrTp is the transport layer for FlexRay according to ISO 10681-2. Where the specification does not specify its own requirements, the module follows this standard ([SWS_FrTp_01005]). It splits large N-SDUs from the PduR into N-PDUs, forwards them to FrIf using FrIf_Transmit, and reassembles received frames ([SWS_FrTp_01050], FrTp SWS p. 19). Processing only takes place in state FRTP_ON, i.e., between FrTp_Init and FrTp_Shutdown ([SWS_FrTp_01032], [SWS_FrTp_01036]). FrTp_MainFunction must run at least once per FlexRay cycle ([SWS_FrTp_01152]).

kontext EcuM EcuM FrTp FrTp EcuM->FrTp FrTp_Init / FrTp_Shutdown SchM BSW-Scheduler SchM->FrTp FrTp_MainFunction PduR PduR PduR->FrTp FrTp_Transmit, FrTp_CancelTransmit, FrTp_CancelReceive, FrTp_ChangeParameter FrTp->PduR PduR_FrTpStartOfReception, PduR_FrTpCopyRxData, PduR_FrTpRxIndication, PduR_FrTpCopyTxData, PduR_FrTpTxConfirmation FrIf FrIf FrTp->FrIf FrIf_Transmit Det DET FrTp->Det Det_ReportRuntimeError FrIf->FrTp FrTp_RxIndication, FrTp_TxConfirmation, FrTp_TriggerTransmit

Context diagram: FrTp between PduR and FrIf, controlled by EcuM and BSW scheduler. Sources: [SWS_FrTp_00577], FrTp SWS p. 21

Transmission always begins with FrTp_Transmit. The call only allocates a channel and sets TX_SDU_AVAILABLE ([SWS_FrTp_00136], [SWS_FrTp_01039]). The MainFunction handles the rest: it fetches the data via PduR_FrTpCopyTxData, allocates the first free pool PDU, and decides on segmentation ([SWS_FrTp_01045], [SWS_FrTp_01048]). In "Decoupled Buffer Access" mode, FrIf retrieves the data later via FrTp_TriggerTransmit ([SWS_FrTp_01060]). PduR_FrTpTxConfirmation follows after each accepted request ([SWS_FrTp_01058]).

Transmission of an N-SDU (Immediate / Decoupled Buffer Access)PduRFrTpFrIfFrTp_Transmit(TxPduId, PduInfoPtr)Check TxPduId, allocate free channelTX_SDU_AVAILABLE setzenAuftrag angenommenUse Case: FrTp_MainFunctionPduR_FrTpCopyTxData(available length)ersten freien FrTpTxPdu belegenSegmentierung entscheidenloopUntil all N-SDU data sentPduR_FrTpCopyTxData(length FrTpTxPdu)Prepare Address Information and PCIFrIf_Transmit(TxPduId)optDecoupled Buffer AccessFrTp_TriggerTransmit(TxPduId, PduInfoPtr)AI, PCI, and data copiedFrTp_TxConfirmation(TxPduId, E_OK)Set FrTpTxPdu to idleoptFlowControl erwartetwarten, bis FlowControl per FrTp_RxIndication eintrifftKanal freigebenReset TX_SDU_AVAILABLEPduR_FrTpTxConfirmation(E_OK)

Sequence diagram: Acceptance of the request, processing in the MainFunction, confirmation per N-PDU and finally to the PduR. Sources: FrTp SWS p. 44, [SWS_FrTp_01042]

Upon reception, FrTp checks RxPduId and addresses against the connection configuration ([SWS_FrTp_01069], [SWS_FrTp_01071]). For a new connection, it calls PduR_FrTpStartOfReception, copies the fragments upwards, and transmits FlowControl if required ([SWS_FrTp_01078], [SWS_FrTp_01080]). Six variants are supported: unsegmented or segmented, with or without acknowledgment, with known or unknown length ([SWS_FrTp_01007]–[SWS_FrTp_01012]). Multiple connections share Tx PDU pools and are served alternately ([SWS_FrTp_01020], [SWS_FrTp_01096]).

In the event of an error, FrTp aborts in three situations and reports E_NOT_OK to the PduR: in case of an invalid or aborting flow status and when segmentation is required on 1:n connections ([SWS_FrTp_01198], [SWS_FrTp_01208]). Runtime errors are FRTP_E_SEG_ERROR and FRTP_E_NO_CHANNEL. Timers and counters such as the FC.WAIT limit bound waiting times ([SWS_FrTp_01100], [SWS_FrTp_01114]). Ongoing transmissions can be aborted with FrTp_CancelTransmit and FrTp_CancelReceive ([SWS_FrTp_01116], [SWS_FrTp_01181]).

Role in the FlexRay Stack and Module State

FrTp is the FlexRay transport layer according to ISO 10681-2. Where the specification does not define its own requirements, the module follows this standard and supports its N-PDU formats ([SWS_FrTp_01005], [SWS_FrTp_01006]). Upwards, FrTp serves the PduR. The PduR starts transmissions with FrTp_Transmit, aborts them, or changes parameters. FrTp returns data and results via PduR_FrTpStartOfReception, PduR_FrTpCopyRxData, PduR_FrTpCopyTxData, PduR_FrTpRxIndication, and PduR_FrTpTxConfirmation (FrTp SWS p. 19). Downwards, FrTp passes N-PDUs with FrIf_Transmit ([SWS_FrTp_01050]). FrIf responds with FrTp_RxIndication, FrTp_TxConfirmation, and FrTp_TriggerTransmit (FrTp SWS p. 21). EcuM calls FrTp_Init and FrTp_Shutdown (FrTp SWS p. 19). The BSW scheduler calls FrTp_MainFunction ([SWS_FrTp_00162], FrTp SWS p. 81).

A difference between the releases: Later versions place an L-SDU router (LSduR) between FrTp and FrIf (FrTp SWS p. 19). For R20-11, the direct interface to FrIf applies, as defined by [SWS_FrTp_00577] and [SWS_FrTp_01050].

kontext EcuM EcuM FrTp FrTp EcuM->FrTp FrTp_Init / FrTp_Shutdown SchM BSW-Scheduler SchM->FrTp FrTp_MainFunction PduR PduR PduR->FrTp FrTp_Transmit, FrTp_CancelTransmit, FrTp_CancelReceive, FrTp_ChangeParameter FrTp->PduR PduR_FrTpStartOfReception, PduR_FrTpCopyRxData, PduR_FrTpRxIndication, PduR_FrTpCopyTxData, PduR_FrTpTxConfirmation FrIf FrIf FrTp->FrIf FrIf_Transmit Det DET FrTp->Det Det_ReportRuntimeError FrIf->FrTp FrTp_RxIndication, FrTp_TxConfirmation, FrTp_TriggerTransmit

Context diagram: FrTp is located between PduR and FrIf and is controlled by EcuM and BSW scheduler. Sources: FrTp SWS p. 19, FrTp SWS p. 21, [SWS_FrTp_00577]

The module knows two states, FRTP_OFF and FRTP_ON ([SWS_FrTp_01028]). Which one applies is recorded by the status variable FrTpState ([SWS_FrTp_01029], [SWS_FrTp_01106]). After power-on, FrTp is in FRTP_OFF ([SWS_FrTp_01030]). Only a successful FrTp_Init with a pointer to FrTp_ConfigType transitions to FRTP_ON ([SWS_FrTp_01032], [SWS_FrTp_00147], [SWS_FrTp_01194]). Segmentation and reassembly only run in FRTP_ON ([SWS_FrTp_01033]). FrTp_Shutdown terminates all open connections by simply stopping operation. It frees the resources and returns to FRTP_OFF ([SWS_FrTp_00148], [SWS_FrTp_01036]).

lebenszyklus start OFF FRTP_OFF (no processing) start->OFF Einschalten ON FRTP_ON (Segmentierung, Reassemblierung, Verbindungsverarbeitung) OFF->ON FrTp_Init(configPtr) erfolgreich ON->OFF FrTp_Shutdown() all connections terminated, resources released

State diagram: FrTp processes data only between FrTp_Init and FrTp_Shutdown. Sources: [SWS_FrTp_01030], [SWS_FrTp_01032], [SWS_FrTp_01036], FrTp SWS p. 38

FrTp_MainFunction schedules the module and is the entry point for all processing tasks ([SWS_FrTp_00203], [SWS_FrTp_00580]). It must run at least once per FlexRay cycle ([SWS_FrTp_01152]). In contrast, the callbacks essentially only set flags: TX_SDU_AVAILABLE exists per channel ([SWS_FrTp_00415], [SWS_FrTp_00416]). RX_PDU_AVAILABLE exists per receivable N-PDU and is cleared after processing ([SWS_FrTp_00418], [SWS_FrTp_00421]).

Transmission Variants According to ISO 10681-2

FrTp supports six frame sequences. They differ in three points: whether the message is segmented, whether the receiver acknowledges, and whether the length is known at the start of transmission (FrTp SWS p. 27, FrTp SWS p. 31):

VariantCharacteristic framesReference
unsegmented, without acknowledgment, length knownSTFU[SWS_FrTp_01007]
unsegmented, with acknowledgment, length knownSTFA → FC.ACK[SWS_FrTp_01008]
segmented, without acknowledgment, length knownSTFU, FC.CTS, CF, CFEOB, LF[SWS_FrTp_01009]
segmented, with acknowledgment, length knownSTFA, FC.CTS, CF, CFEOB, LF, FC.ACK[SWS_FrTp_01010]
segmented, without acknowledgment, length unknownas above, total length not until LF[SWS_FrTp_01011], [SWS_FrTp_01067]
segmented, with acknowledgment, length unknownas above, additionally FC.ACK[SWS_FrTp_01012]

In the segmented, acknowledged variants, the FC.ACK likely follows after the LastFrame, completing the transfer. Question Q-f3c70b1506e2cde4 (open) This is an interpretation of the diagram texts, whose sequence is not unambiguous (FrTp SWS p. 29). The following diagram shows the segmented baseline case without acknowledgment.

Segmented transfer without acknowledgment, length knownFrTp SenderFrTp receiverStartFrame (STFU)FlowControl_CTS (FC.CTS)Use Case: Block 1ConsecutiveFrame (CF)ConsecutiveFrame (CF)ConsecutiveFrame_EOB (CFEOB)Blockende: neue Flusssteuerung erforderlichFlowControl_CTS (FC.CTS)Use Case: Block 2ConsecutiveFrame (CF)LastFrame (LF)

Sequence diagram: The receiver enables each block via FC.CTS, and CFEOB completes a block. Sources: [SWS_FrTp_01009], FrTp SWS p. 28

Transmission with unknown length:

Connections, Channels, and PDU Pools

Each communication relationship is a dedicated FrTpConnection. Their number is post-build configurable ([SWS_FrTp_01014], [SWS_FrTp_01015]). Each connection has a module-wide unique address pair and a unique FRTP_SDUID ([SWS_FrTp_01017], [SWS_FrTp_01018]). Multiple connections can share a FrTpConnectionControl and a FrTpTxPduPool ([SWS_FrTp_01022], [SWS_FrTp_01020]). At runtime, multiple FrTpChannel operate in parallel; their number is defined by FrTpChanNum ([SWS_FrTp_00088], [SWS_FrTp_00228]). For transmission and reception, the channels alternate between "idle" and "busy" respectively ([SWS_FrTp_01117], [SWS_FrTp_01025]).

konfiguration Kanal FrTpChannel (Anzahl: FrTpChanNum) TxCon FrTpConnection (Tx) FrTpLa/FrTpRa, FRTP_SDUID Kanal->TxCon FrTpTxConRef RxCon FrTpConnection (Rx) FrTpLa/FrTpRa, FRTP_SDUID Kanal->RxCon FrTpRxConRef Ctrl FrTpConnectionControl (mehrfach referenzierbar) TxCon->Ctrl Referenz Pool FrTpTxPduPool (mehrfach referenzierbar) TxCon->Pool Referenz RxCon->Ctrl Referenz RxCon->Pool Reference (for FlowControl) NPdu Tx N-PDUs (ascending, individual length) Pool->NPdu contains FrIf FrIf NPdu->FrIf SF, CF, LF / FC

Context diagram: A half-duplex channel references a Tx and an Rx connection. Both reference control parameters and a Tx PDU pool. Sources: FrTp SWS p. 39, [SWS_FrTp_01020], [SWS_FrTp_01088]

Addresses:

  • During transmission, FrTp adopts addresses from metadata SOURCE_ADDRESS_16 and TARGET_ADDRESS_16. Configured FrTpLa/FrTpRa take precedence here ([SWS_FrTp_01204], [SWS_FrTp_01205]).
  • During reception, FrTp passes the addresses upwards as metadata. It uses the same addresses for FlowControl ([SWS_FrTp_01206]).

FrTp distributes bandwidth across the pools:

Transmit Path: From FrTp_Transmit to PduR_FrTpTxConfirmation

Every transmission begins with FrTp_Transmit ([SWS_FrTp_00136], [SWS_FrTp_00149]). The call sets TX_SDU_AVAILABLE only if the TxPduId is valid and a channel is available ([SWS_FrTp_01039]). Otherwise, it terminates with E_NOT_OK. The same applies if a transmission is already in progress for the same address ([SWS_FrTp_01041], [SWS_FrTp_01200]).

The actual work is performed by FrTp_MainFunction:

  1. It queries the available length via PduR_FrTpCopyTxData ([SWS_FrTp_01042]).
  2. It allocates the first free FrTpTxPdu ([SWS_FrTp_01045]).
  3. It decides on segmentation ([SWS_FrTp_01048]).
  4. It copies data in PDU length ([SWS_FrTp_01123]).
  5. It passes the N-PDU with the exact length to FrIf_Transmit ([SWS_FrTp_01051]).

FrTp SWS p. 44 shows the sequence.

segmentierung start laenge TX_SDU_AVAILABLE set: PduR_FrTpCopyTxData returns available length start->laenge frei Free FrTpTxPdu in pool? laenge->frei warten Defer connection until next FrTp_MainFunction frei->warten no groesse FrTpTxSdu.Length > FrTpTxPdu.Length - AI.Length - PCI.Length? frei->groesse yes unseg unsegmentiert (einzelner StartFrame) groesse->unseg no multi 1:n-Verbindung? groesse->multi yes senden Prepare AI and PCI, PduR_FrTpCopyTxData (length FrTpTxPdu), FrIf_Transmit unseg->senden fehler Report FRTP_E_SEG_ERROR, abort transmission, PduR_FrTpTxConfirmation(E_NOT_OK) multi->fehler yes seg segmentiert (StartFrame, CF ..., LastFrame) multi->seg no seg->senden

Activity diagram: Decision between unsegmented and segmented transmission, including abortion on 1:n connections. Sources: [SWS_FrTp_01047], [SWS_FrTp_01048], [SWS_FrTp_01208], FrTp SWS p. 51

Important for throughput: If no PDU is available, FrTp defers the connection until the next MainFunction call ([SWS_FrTp_01047]).

After each N-PDU, FrIf calls FrTp_TxConfirmation. This sets FrTpTxPdu to "idle" ([SWS_FrTp_01052], [SWS_FrTp_01054]). Channel and flag are released as soon as three conditions are met: all data transmitted, positively acknowledged, and, if configured, confirmed ([SWS_FrTp_01056], [SWS_FrTp_01057]). PduR_FrTpTxConfirmation follows after every accepted request, with E_OK only in case of success ([SWS_FrTp_01058]). Two buffer access types exist for transmission: "Immediate" and "Decoupled Buffer Access" ([SWS_FrTp_01084]). With "Decoupled", FrIf fetches the data later via FrTp_TriggerTransmit. This call copies address information, PCI, and payload into the provided buffer ([SWS_FrTp_01060], [SWS_FrTp_01061], FrTp SWS p. 50).

Transmission of an N-SDU (Immediate / Decoupled Buffer Access)PduRFrTpFrIfFrTp_Transmit(TxPduId, PduInfoPtr)Check TxPduId, allocate free channelTX_SDU_AVAILABLE setzenAuftrag angenommenUse Case: FrTp_MainFunctionPduR_FrTpCopyTxData(available length)ersten freien FrTpTxPdu belegenSegmentierung entscheidenloopUntil all N-SDU data sentPduR_FrTpCopyTxData(length FrTpTxPdu)Prepare Address Information and PCIFrIf_Transmit(TxPduId)optDecoupled Buffer AccessFrTp_TriggerTransmit(TxPduId, PduInfoPtr)AI, PCI, and data copiedFrTp_TxConfirmation(TxPduId, E_OK)Set FrTpTxPdu to idleoptFlowControl erwartetwarten, bis FlowControl per FrTp_RxIndication eintrifftKanal freigebenReset TX_SDU_AVAILABLEPduR_FrTpTxConfirmation(E_OK)

Sequence diagram: The request arrives synchronously and is processed asynchronously in the MainFunction; TriggerTransmit optionally follows (Decoupled). Sources: FrTp SWS p. 44, FrTp SWS p. 50, [SWS_FrTp_01058]

Receive Path and Reassembly

Reception begins with FrTp_RxIndication ([SWS_FrTp_00137]). FrTp processes an N-PDU only if two conditions are met ([SWS_FrTp_01069], [SWS_FrTp_01071]):

  • The RxPduId is valid.
  • The destination address matches FrTpLa and the source address matches FrTpRa.

Otherwise, the N-PDU is ignored ([SWS_FrTp_01072]). If no Rx channel is available, processing ends, and FrTp reports FRTP_E_NO_CHANNEL ([SWS_FrTp_01076], [SWS_FrTp_01186]). FrTp stores a StartFrame in a local buffer. This allows a gateway to process it correctly even in case of a temporary shortage of resources (FrTp SWS p. 56).

For a new connection, FrTp calls PduR_FrTpStartOfReception. The expected length as well as the content and size of the StartFrame are passed ([SWS_FrTp_01078], [SWS_FrTp_01193]). The R20-11 diagrams show where this call occurs in two variants: in FrTp_RxIndication (FrTp SWS p. 55) and in FrTp_MainFunction (FrTp SWS p. 86). R23-11 explicitly permits both (FrTp SWS p. 54).

Afterwards, FrTp copies the fragments via PduR_FrTpCopyRxData and transmits FlowControl where the protocol requires it ([SWS_FrTp_01138], [SWS_FrTp_01080]). It releases the channel once all data has been received and all FlowControls are confirmed ([SWS_FrTp_01081]). PduR_FrTpRxIndication always follows when PduR_FrTpStartOfReception was successful ([SWS_FrTp_01083]).

Reception and reassemblyFrIfFrTpPduRFrTp_RxIndication(RxPduId, PduInfoPtr)Check RxPduIdCheck destination/source against FrTpLa/FrTpRaaltStartFrame empfangenfreien Rx-Kanal belegenStartFrame in lokalen Puffer kopierenFolgerahmen (CF, LF)Look up associated channelRX_PDU_AVAILABLE setzenUse Case: FrTp_MainFunction (StartOfReception alternativ schon in FrTp_RxIndication)optneue VerbindungPduR_FrTpStartOfReception(RxSduId, data and size of StartFrame, length)Puffer bereitgestelltPduR_FrTpCopyRxData (N-SDU-Fragment)optFlowControl erforderlichFrIf_Transmit(FC N-PDU)FrTp_TxConfirmation(E_OK)Reset RX_PDU_AVAILABLEoptN-SDU completely receivedRx-Kanal freigebenPduR_FrTpRxIndication(RxSduId, E_OK)

Sequence diagram: The callback checks and buffers; the MainFunction reassembles and sends FlowControl. Sources: FrTp SWS p. 55, [SWS_FrTp_01074], [SWS_FrTp_01083]

Cancellation and Runtime Parameters

Whether transmit cancellation is available is determined statically by FrTpTransmitCancellation; it is triggered with FrTp_CancelTransmit ([SWS_FrTp_01097], [SWS_FrTp_00384]). The effect depends on the progress:

  • If the request is accepted but not yet started, the connection is released immediately. The receiver notices nothing ([SWS_FrTp_00385], FrTp SWS p. 63).
  • If transmission is in progress, FrTp stops it with E_OK ([SWS_FrTp_01116]).
  • E_NOT_OK follows if no connection is active or the last N-PDU of an unacknowledged transmission has already been passed to FrIf ([SWS_FrTp_01116]).

In the segmented case, a timeout expires at the receiver that terminates reception (FrTp SWS p. 59).

Transmission abort during segmented transferPduR (Sender)FrTp SenderFrTp receiverPduR (receiver)FrTp_TransmitUse Case: FrTp_MainFunctionStartFramePduR_FrTpStartOfReceptionFlowControlFrTp_CancelTransmit(TxPduId)E_OKTransmission stopped, no further CFTimeout (no CF arrived)PduR_FrTpRxIndication(Empfang abgebrochen)

Sequence diagram: If the transmitter cancels an ongoing segmented transmission, the receiver terminates reception via timeout. Sources: [SWS_FrTp_01116], FrTp SWS p. 69

FrTp_CancelReceive cancels an ongoing reception if the RxPduId is valid and then returns E_OK ([SWS_FrTp_01181], [SWS_FrTp_01183]). In case of unsegmented reception or an ongoing LastFrame, the function rejects ([SWS_FrTp_01182]). FrTp_ChangeParameter changes the BandwidthControl values FrTpSCexp and FrTpMaxNbrOfNPduPerCycle at runtime ([SWS_FrTp_00242]). The bit layout corresponds to that of the FC(CTS) frame ([SWS_FrTp_01195]). The parameter identifier for this is TP_BC (ComStack Types p. 18). During ongoing reception, the change is rejected ([SWS_FrTp_01115]). After a successful change, the connection uses the new values ([SWS_FrTp_01156]).

Behavior in the event of an error

Development errors are specified in [SWS_FrTp_01201]:

  • FRTP_E_UNINIT: Call without initialization; excluded are FrTp_Init and FrTp_GetVersionInfo.
  • FRTP_E_PARAM_POINTER: NULL pointer.
  • FRTP_E_INVALID_PDU_SDU_ID: Invalid SDU or PDU ID.
  • FRTP_E_INVALID_PARAMETER: Invalid parameter.
  • FRTP_E_UMSG_LENGTH_ERROR: Unknown length without appropriate configuration ([SWS_FrTp_01134]).
  • an error code for a failed initialization.

The APIs check IDs and pointers and, in case of errors, return E_NOT_OK where they have a return value ([SWS_FrTp_01139], [SWS_FrTp_01145], [SWS_FrTp_01147]). Runtime errors are FRTP_E_SEG_ERROR (0x05) and FRTP_E_NO_CHANNEL (0x07). They are routed via Det_ReportRuntimeError ([SWS_FrTp_01208], [SWS_FrTp_00577]).

In three cases, the transmitter aborts and reports PduR_FrTpTxConfirmation with E_NOT_OK:

A FrTp_TxConfirmation with E_NOT_OK releases the channel on both sides ([SWS_FrTp_01056], [SWS_FrTp_01081]). The flag RX_ERROR remembers a reception error until FlowControl may be sent. After the reaction (retry, negative acknowledgment, or cancellation), it is cleared ([SWS_FrTp_00429], [SWS_FrTp_00430]). On 1:n connections, there is neither acknowledgment nor retry ([SWS_FrTp_00598]).

Timers and timeouts follow the tables in the specification ([SWS_FrTp_01099], [SWS_FrTp_01100], FrTp SWS p. 67). The configuration must comply with the following conditions:

If the PduR returns BUFREQ_E_BUSY during transmission, FrTp retries up to FrTpTimeCs times ([SWS_FrTp_01196]). The counters are limited ([SWS_FrTp_01105], [SWS_FrTp_01114]). What happens upon reaching a limit is specified by [SWS_FrTp_01113]; the associated table is not available here. If the receiver lacks a buffer, it sends FC.WAIT. The number of these frames is limited by FrTpMaxFCWait (FrTp SWS p. 69).

Buffer bottleneck at receiver: FC.WAIT and counter limitFrTp SenderFrTp receiverPduR (receiver)StartFrameSender monitors Timeout_BSPduR_FrTpStartOfReceptionkein Pufferloopkein Puffer; COUNTER_FCWT begrenzt durch FrTpMaxFCWaitFlowControl (WAIT)Pufferanforderung wiederholenkein PufferPufferanforderungBuffer availablePduR_FrTpCopyRxDataFlowControl (CTS)ConsecutiveFrameReceiver monitors Timeout_CR

Sequence diagram: If the buffer is missing, the receiver sends FC.WAIT until the counter limit takes effect; afterwards, FC.CTS resumes transmission. Sources: [SWS_FrTp_01105], [SWS_FrTp_01114], FrTp SWS p. 70

Further detailed evidence

AI-generated guide based on the specification excerpts in the payload. The linked requirements are normative for R20-11; document passages from other releases are for explanatory purposes only.

FlexRay Transport Layer (FrTp)

Provides segmented data transmission over FlexRay (ISO 10681-2).

Funktionen — Übersicht

Typen — Übersicht

Funktionen & Typen — Detailansicht

function FrTp_Init [SWS_FrTp_00147] 📄 PDF

void FrTp_Init (const FrTp_ConfigType* configPtr);

This service initializes all global variables of a Flex Ray Transport Layer instance and set it in the idle state. It has no return value because software errors in initialisation data shall be detected during configuration time (e.g. by configuration tool ).

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: c550cdee4114 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function FrTp_Init initializes all global variables of an instance of the FlexRay transport layer and puts it into the idle state [SWS_FrTp_00147]. A pointer to the configuration of the FlexRay transport protocol is passed via configPtr as an input parameter (const FrTp_ConfigType*) [SWS_FrTp_00147]. The interface is declared via header FrTp.h with service ID 0x00 [SWS_FrTp_00147].

Regarding internal behavior and error handling, the following specifications apply:

  • After the transport layer has been initialized successfully by calling FrTp_Init, the FrTp module transitions to the internal state FRTP_ON [SWS_FrTp_01032].
  • The function has no return value (void), since software errors in the initialization data must already be detected during the configuration phase, for example by a configuration tool [SWS_FrTp_00147].

Regarding concurrency, the service is specified as non-reentrant (Non Reentrant) [SWS_FrTp_00147]. Parallel or multiple uncoordinated calls are therefore inadmissible. Interpretation: The call is typically likely to occur centrally during ECU startup before regular transport services are used. Question Q-9b7cf7fc6dac510e (open)

This usage note was generated automatically based on the specification requirements of AUTOSAR R20-11.

Implementer's Guide to follow (complexity I1)

function FrTp_Shutdown [SWS_FrTp_00148] 📄 PDF

void FrTp_Shutdown (void);

This service closes all pending transport pro tocol connections by simply stopping operation, frees all resources and stops the Fr Tp Module

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 00fb8d95a0be Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function FrTp_Shutdown terminates the operation of the FlexRay Transport Protocol module (FrTp) [SWS_FrTp_00148]. Upon the call, the service closes all still pending transport protocol connections immediately by discontinuing operation, releases all occupied resources, and stops the FrTp module completely [SWS_FrTp_00148].

With regard to the interface specification and behavior, the following properties apply:

  • Signature and header: The function is available via the header file FrTp.h, has service ID 0x01, expects no parameters, and provides no return value (void) [SWS_FrTp_00148].
  • Concurrency: FrTp_Shutdown is specified as non-reentrant (Non Reentrant) and must be executed synchronously [SWS_FrTp_00148]. A concurrent or multiple parallel call is therefore not permitted.
  • State transition: Through the successful execution of the service primitive FrTp_Shutdown(), the FrTp module transitions to the internal state FRTP_OFF [SWS_FrTp_01036].

Because the service closes pending connections merely by stopping operation, ongoing transmissions are expected to be aborted immediately and without a separate completion notification. Question Q-35555515f521d0c3 (open)

This usage note was generated automatically based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function FrTp_Transmit [SWS_FrTp_00149] 📄 PDF

Std_ReturnType FrTp_Transmit (PduIdType TxPduId, const PduInfoType* PduInfoPtr);

Requests transmission of a PDU.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: ad193864f748 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Semantics

The synchronous function FrTp_Transmit requests the transmission of a PDU via the FlexRay transport layer module [SWS_FrTp_00149]. The identifier of the PDU to be transmitted is passed via parameter TxPduId, while PduInfoPtr points to the payload data, metadata, and length [SWS_FrTp_00149]. If a transmission with a message length still unknown to the upper layer is to be initiated, FrTp_Transmit must be called with parameter value PduLength = 0 [SWS_FrTp_01064]. Acceptance of the transmit request is confirmed synchronously with E_OK; if the request cannot be accepted, the function returns E_NOT_OK [SWS_FrTp_00149].

Concurrency and Channel Availability

The function is reentrant for calls with different PDU IDs, but non-reentrant for the same identifier TxPduId [SWS_FrTp_00149]. In addition, execution requires an idle transmission channel: If no channel is available because the state is not idle (FrTpTxChannelState ≠ Idle), the function aborts and returns E_NOT_OK [SWS_FrTp_01041].

Error handling

If the development error detection interface is active, FrTp_Transmit validates the passed parameters:

  • If an unsupported or invalid TxPduId is passed, the service aborts with E_NOT_OK and reports the development error FRTP_E_INVALID_PDU_SDU_ID [SWS_FrTp_01040], [SWS_FrTp_01139].
  • If the pointer PduInfoPtr is invalid, error FRTP_E_PARAM_POINTER is reported and execution likewise aborts with E_NOT_OK [SWS_FrTp_01140].

This text was generated by an AI based on the AUTOSAR specification.

Implementer's Guide to follow (complexity I1)

function FrTp_CancelTransmit [SWS_FrTp_00150] 📄 PDF

Std_ReturnType FrTp_CancelTransmit (PduIdType TxPduId);

Requests cancellation of an ongoing transmission of a PDU in a lower layer communication module.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: ce8fe8bc8ce1 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous service function FrTp_CancelTransmit requests the cancellation of an ongoing PDU transmission in an underlying communication module [SWS_FrTp_00150]. The transmission to be aborted is addressed via input parameter TxPduId [SWS_FrTp_00150].

State-Dependent Behavior and Return Values

The cancellation behavior depends on the current state of the connection:

  • If the transmit request is pending but the transmission itself has not yet started, FrTp_CancelTransmit releases the connection immediately [SWS_FrTp_00385].
  • If the transmission is already in progress, the function stops the transmission process and confirms the successful cancellation with the return value E_OK [SWS_FrTp_01116].
  • If the connection is not active or if the last N-PDU of an unconfirmed transmission has already been forwarded to the FrIf, the cancellation fails and the function returns E_NOT_OK [SWS_FrTp_01116].

Error Handling and Concurrency

If development error detection is enabled for FrTp_CancelTransmit, the function checks the parameter TxPduId for validity. If this check fails, the development error FRTP_E_INVALID_PDU_SDU_ID is reported and E_NOT_OK is returned [SWS_FrTp_01141].

The function is reentrant for calls with different PDU IDs, but must not be executed concurrently for the same TxPduId [SWS_FrTp_00150].

This usage note was created automatically based on the AUTOSAR CP R20-11 specification.

Implementer's Guide to follow (complexity I2)

function FrTp_ChangeParameter [SWS_FrTp_00151] 📄 PDF

Std_ReturnType FrTp_ChangeParameter (PduIdType id, TPParameterType parameter, uint16 value);

Request to change a specific transport protocol parameter (e.g. block size).

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: a8ec21fec13d Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

According to [SWS_FrTp_00151], the synchronous function FrTp_ChangeParameter serves the request to change specific transport protocol parameters at runtime. The parameter id references the affected PDU, while parameter passes the identifier of the parameter and value passes the new value. Upon successful adjustment, the function returns E_OK; otherwise, the change request is rejected with E_NOT_OK [SWS_FrTp_00151].

Specifically, this service is used to modify parameters of the FlowControl PDU for bandwidth control (BandwidthControl, BC) according to ISO 10681-2 at runtime [SWS_FrTp_00242]. This affects:

On the sender side, an additional FlowControl PDU triggered thereby is received as an unexpected N-PDU and ignored [SWS_FrTp_00242].

Error handling

If development error detection is enabled for the function, formal parameter checks are performed:

  • Check of the PDU identifier id: If the value is invalid, the function reports the development error FRTP_E_INVALID_PDU_SDU_ID and returns E_NOT_OK [SWS_FrTp_01143].
  • Check of the parameter parameter: If the identifier is invalid, the function reports FRTP_E_INVALID_PARAMETER and returns E_NOT_OK [SWS_FrTp_01144].

Concurrency and Limitations

The function is specified as non-reentrant (Non Reentrant) [SWS_FrTp_00151]. Callers must therefore ensure that calls proceed sequentially; external synchronization is presumably required for accesses from different tasks. Question Q-fe82be70448a3e0b (open)

This usage note was generated automatically based on the specification AUTOSAR CP R20-11.

Implementer's Guide to follow (complexity I1)

function FrTp_CancelReceive [SWS_FrTp_01172] 📄 PDF

Std_ReturnType FrTp_CancelReceive (PduIdType RxPduId);

Requests cancellation of an ongoing reception of a PDU in a lower layer transport protocol module.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 0a137ff0f510 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function FrTp_CancelReceive requests the abort of an ongoing PDU reception in the FlexRay transport layer [SWS_FrTp_01172]. It is available via the header FrTp.h and makes it possible to stop an active receive operation in a targeted manner.

Parameters and Return Values

RxPduId of type PduIdType is passed as the input parameter, thereby uniquely identifying the PDU to be aborted [SWS_FrTp_01172]. Additional input or output parameters do not exist. The function returns a status value of type Std_ReturnType:

Concurrency and Limitations

The function is classified as non-reentrant (Non Reentrant) [SWS_FrTp_01172]. Callers must therefore ensure that no parallel or nested calls occur in order to avoid inconsistencies in the internal PDU state management.

This usage note was generated automatically based on the specification.

Implementer's Guide to follow (complexity I1)

function FrTp_TriggerTransmit [SWS_FrTp_00154] 📄 PDF

Std_ReturnType FrTp_TriggerTransmit (PduIdType TxPduId, PduInfoType* PduInfoPtr);

Within this API , the upper layer module (called module) shall check whether the available data fits into the buffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and update the length of the actual copied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without changing Pdu Info Ptr.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: fdebe9a74064 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function [SWS_FrTp_00154] serves to provide SDU data for transmission. The parameter TxPduId identifies the SDU to be transmitted, while PduInfoPtr references a structure containing the destination buffer (SduDataPtr) and the available buffer size (SduLength) [SWS_FrTp_00154].

Within the function, it is checked whether the provided data fits into the destination buffer reported via PduInfoPtr->SduLength [SWS_FrTp_00154]:

  • Successful copy operation: If the buffer capacity is sufficient, the function copies the address information, PCI, and N-SDU data into the buffer PduInfoPtr->SduDataPtr [SWS_FrTp_01060]. The data length in PduInfoPtr->SduLength is set to the exact length of the copied data, and the function returns E_OK [SWS_FrTp_00154], [SWS_FrTp_01061].
  • Insufficient buffer: If the data does not fit into the buffer, the function aborts and returns E_NOT_OK without modifying PduInfoPtr [SWS_FrTp_00154]. In case of an error, PduInfoPtr must not be used by the caller, as it may contain invalid data or a null pointer [SWS_FrTp_00154].

When development error detection (DET) is enabled, the function performs preliminary checks on the passed parameters:

  • If TxPduId is invalid, the function reports the error FRTP_E_INVALID_PDU_SDU_ID to the DET and returns E_NOT_OK [SWS_FrTp_01145].
  • If PduInfoPtr is invalid, it reports the error FRTP_E_PARAM_POINTER to the DET and likewise returns E_NOT_OK [SWS_FrTp_01146].

Regarding concurrency, the function is reentrant for different PDU-IDs, but must not be called concurrently for the same TxPduId [SWS_FrTp_00154].

This usage note was generated automatically based on the AUTOSAR CP R20-11 specification.

Implementer's Guide to follow (complexity I2)

function FrTp_RxIndication [SWS_FrTp_00152] 📄 PDF

void FrTp_RxIndication (PduIdType RxPduId, const PduInfoType* PduInfoPtr);

Indication of a received PDU from a lower layer communication interface module.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: e20d38175b0c Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Semantics

The synchronous callback function FrTp_RxIndication serves to indicate a received PDU from an underlying communication interface module to the FlexRay ISO Transport Layer module and initiates the entire reception process [SWS_FrTp_00152], [SWS_FrTp_00137]. It is available via the header FrTp.h and has the service ID 0x42 with no return value [SWS_FrTp_00152]. As parameters, it expects the identifier of the received PDU (RxPduId) as well as a pointer to a structure of type PduInfoType (PduInfoPtr) [SWS_FrTp_00152]. This pointer provides the length of the received PDU (SduLength), a buffer pointer to the payload data (SduDataPtr), and the associated metadata [SWS_FrTp_00152].

Error handling

Regarding error handling, if development error detection (DET) is active, the function checks both input parameters: If RxPduId is invalid, it reports the development error FRTP_E_INVALID_PDU_SDU_ID [SWS_FrTp_01147]. If PduInfoPtr is invalid, the error FRTP_E_PARAM_POINTER is reported [SWS_FrTp_01148]. If an unsupported RxPduId is passed, execution terminates without further action [SWS_FrTp_01075]. If no free reception channel is available at the time of the call because the channel state is not Idle (FrTpRxChannelState ≠ Idle), the function likewise aborts without further processing [SWS_FrTp_01076] and the module raises the runtime error FRTP_E_NO_CHANNEL [SWS_FrTp_01186].

Concurrency and Interaction

Regarding concurrency, FrTp_RxIndication is reentrant for different PDU IDs, but not reentrant for identical PDU IDs [SWS_FrTp_00152]. The call must be performed synchronously by the underlying interface to properly start reception in the FrTp module [SWS_FrTp_00152], [SWS_FrTp_00137].

This usage note was generated automatically based on the specification requirements of AUTOSAR R20-11.

Implementer's Guide to follow (complexity I2)

function FrTp_TxConfirmation [SWS_FrTp_00153] 📄 PDF

void FrTp_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);

The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 9cfd8edaa6b0 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function [SWS_FrTp_00153] is used by the lower communication layer to notify the FrTp module of the successful transmission or failure of a PDU. Upon invocation, the lower layer passes the configured identifier FrTpTxConfirmationPduId in the parameter TxPduId as well as the transmission result result ([SWS_FrTp_01053]). Valid values for result are E_OK upon successful transmission and E_NOT_OK upon failed transmission ([SWS_FrTp_00153]).

If development error detection (DET) is enabled, the function performs a parameter check: An invalid identifier TxPduId triggers the development error FRTP_E_INVALID_PDU_SDU_ID ([SWS_FrTp_01149]), whereas an invalid value for result results in the error FRTP_E_INVALID_PARAMETER ([SWS_FrTp_01203]).

Regarding concurrency, the function is reentrant for different PDU IDs, but must not be called concurrently for the same TxPduId ([SWS_FrTp_00153]). With each call with the associated FrTpTxConfirmationPduId, the module decrements the counter TxPduPendingCounter ([SWS_FrTp_01092]).

In conjunction with the transmission status, the confirmation causes the following state transitions:

  • On the sender side, the occupied channel is transitioned to the state Idle (FrTpTxChannelState = Idle) and the flags TX_SDU_AVAILABLE and TX_SDU_UNKNOWN_MSG_LENGTH are reset as soon as all N-SDU data has been sent, result has the value E_OK, and an acknowledgment, if configured, has been received—or immediately if result equals E_NOT_OK ([SWS_FrTp_01056], [SWS_FrTp_01057], [SWS_FrTp_01124]).
  • On the receiver side, the occupied receive channel (FrTpRxChannelState = Idle) is released when all data has been received and all required Flow Control PDUs have been confirmed with E_OK, or when the confirmation occurs with E_NOT_OK ([SWS_FrTp_01081]).

This text was created by an AI and is based on the specifications of AUTOSAR release R20-11.

Implementer's Guide to follow (complexity I2)

function FrTp_MainFunction [SWS_FrTp_00162] 📄 PDF

void FrTp_MainFunction (void);

Schedules the Flex Ray TP. (Entry point for scheduling)

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 74855f22061c Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Call Context

The function FrTp_MainFunction has the signature void FrTp_MainFunction (void); and is specified with service ID 0x10 [SWS_FrTp_00162]. It accepts no input parameters and returns no return value to the caller [SWS_FrTp_00162]. The declaration is available via header SchM_FrTp.h [SWS_FrTp_00162]. As an interpretation, the function is thus typically expected to be called cyclically by the BSW Scheduler (Schedule Manager). Question Q-aaa6251bd84aef94 (open)

Interaction and tasks

The main task of the function consists in scheduling the FlexRay Transport Protocol module [SWS_FrTp_00162], [SWS_FrTp_00203]. According to [SWS_FrTp_00580], FrTp_MainFunction represents the mandatory entry point for pending processing tasks of the FrTp module, whereby the internal protocol processes are cyclically processed and managed.

Timing conditions and constraints

For the temporal integration into the overall system, the specification defines a fixed minimum call rate for the scheduling:

  • FrTp_MainFunction must be called at least once per FlexRay cycle [SWS_FrTp_01152].

Specific error handlings, DET or DEM notifications, as well as explicit requirements for reentrancy or concurrency are not described in the present specification scope.

This usage note was generated automatically based on the specification AUTOSAR R20-11.

Implementer's Guide to follow (complexity I1)

type FrTp_ConfigType [SWS_FrTp_01194] 📄 PDF

This is the base type for the configuration of the Flex Ray Transport Protocol A pointer to an instance of this structure will be used in the initialization of the Flex Ray Transport Protocol. The outline of the structure is defined in chapter 10 Configura tion Specification

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/CP_MOD_FrTp
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_FrTp@rel:R20-11#451f6b94
Content hash
451f6b94
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_FlexRayISOTransportLayer.pdf#nameddest=SWS_FrTp_00215

Initialization and status

Returns the version information.

void FrTp_GetVersionInfo (Std_VersionInfoType* versioninfo);
FrTp_Init function

This service initializes all global variables of a Flex Ray Transport Layer instance and set it in the idle state. It has no return value because software errors in initialisation data shall be detected during configuration time (e.g. by configuration tool ).

void FrTp_Init (const FrTp_ConfigType* configPtr);

Services

Requests cancellation of an ongoing reception of a PDU in a lower layer transport protocol module.

Std_ReturnType FrTp_CancelReceive (PduIdType RxPduId);

Requests cancellation of an ongoing transmission of a PDU in a lower layer communication module.

Std_ReturnType FrTp_CancelTransmit (PduIdType TxPduId);

Request to change a specific transport protocol parameter (e.g. block size).

Std_ReturnType FrTp_ChangeParameter (PduIdType id, TPParameterType parameter, uint16 value);
FrTp_Shutdown function

This service closes all pending transport pro tocol connections by simply stopping operation, frees all resources and stops the Fr Tp Module

void FrTp_Shutdown (void);
FrTp_Transmit function

Requests transmission of a PDU.

Std_ReturnType FrTp_Transmit (PduIdType TxPduId, const PduInfoType* PduInfoPtr);

Callbacks

Indication of a received PDU from a lower layer communication interface module.

void FrTp_RxIndication (PduIdType RxPduId, const PduInfoType* PduInfoPtr);

Within this API , the upper layer module (called module) shall check whether the available data fits into the buffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and update the length of the actual copied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without changing Pdu Info Ptr.

Std_ReturnType FrTp_TriggerTransmit (PduIdType TxPduId, PduInfoType* PduInfoPtr);

The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

void FrTp_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);

Cyclic

Schedules the Flex Ray TP. (Entry point for scheduling)

void FrTp_MainFunction (void);

Types

This is the base type for the configuration of the Flex Ray Transport Protocol A pointer to an instance of this structure will be used in the initialization of the Flex Ray Transport Protocol. The outline of the structure is defined in chapter 10 Configura tion Specification