DEENESPTFRRUARHIKOZHNL

AUTOSAR RTE

ModulRte (Runtime Environment)
BSW-Modul-ID2
Standard-Header#include "Rte.h"
SWS-SpezifikationAUTOSAR_SWS_RTE.pdf
ClusterRuntime Environment (RTE)

Module guideAI-GENERATED

Connects software components with each other as well as with Basic Software and coordinates their execution.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: db6362f39e13 Provenance Open questions (2)
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

Connects software components with each other as well as with Basic Software and coordinates their execution.

The Runtime Environment (RTE) connects AUTOSAR software components with each other as well as with the Basic Software modules and governs deterministic scheduling on the Classic Platform via the Basic Software Scheduler (SchM) (SWS_RTE p. 100). The lifecycle is coordinated via standardized interfaces from SchM_Init and Rte_Start through to Rte_Stop and SchM_Deinit [SWS_Rte_08060], [SWS_Rte_03015]. In addition to sender-receiver and client-server patterns, software pointer mechanisms for calibration parameters as well as memory protection checks at partition boundaries ensure robust real-time operation [SWS_Rte_03914], [SWS_Rte_02752].

The Runtime Environment (RTE) decouples AUTOSAR software components from the ECU hardware and, together with the Basic Software Scheduler (SchM), coordinates the execution of all application and basic software processes (SWS_RTE p. 100). Controlled startup takes place in stages via the EcuStateManager: First, SchM_Init initializes the scheduler structures, followed by SchM_Start prior to calling BswM_Init, as well as SchM_StartTiming to enable periodic BSW events [SWS_Rte_08060], [SWS_Rte_07273], [SWS_Rte_04548]. The application SWCs are subsequently started via Rte_Start and, during shutdown, stopped by Rte_Stop prior to deinitialization via SchM_Deinit [SWS_Rte_03015], [SWS_Rte_01262], [SWS_Rte_04551].

Startup and shutdown coordination between EcuM, SchM, and RTEEcuMSchMBswMRTEUse Case: BSW-Scheduler HochlaufphaseSchM_Init(ConfigPtr)Interne Datenstrukturen & initial ModeMachines initialisierenSchM_Start()BswM_Init(ConfigPtr)SchM_StartTiming()BswTimingEvents periodisch aktivierenUse Case: RTE ApplikationsstartRte_Start()Applikations-Runnables & ModeTransitions freigebenRTE_E_OKUse Case: Herunterfahren (Shutdown)Rte_Stop()Runnables stoppen, Kommunikation ignorierenRTE_E_OKSchM_Deinit()Rte_Rips_SchM_Deinit() & Ressourcen freigeben

Sequence diagram: Timing coordination of startup and shutdown between EcuM, SchM, and RTE. Sources: [SWS_Rte_08060], [SWS_Rte_07273], [SWS_Rte_04548], [SWS_Rte_03015], [SWS_Rte_01262], [SWS_Rte_04551], [SWS_Rte_89019].

Communication covers sender-receiver and client-server patterns both intra- and inter-ECU (SWS_RTE p. 286). Unbuffered data elements ensure consistent initial values via initValue, while buffered events are processed via FIFO queues [SWS_Rte_06009], [SWS_Rte_02521]. In client-server interactions, two-part transaction handles link asynchronous requests to the associated responses [SWS_Rte_02649]. Mode switches via Rte_Switch execute a deterministic ten-step sequence, with Distributed Shared Mode Queues guaranteeing the strict processing order of multiple mode machines [SWS_Rte_02631], [SWS_Rte_02665], [SWS_Rte_91102].

CalprmPointered cluster_single Single Pointered Method cluster_double Double Pointered Method refTabSingle <RteParameterRefTab> (array of void pointers in RAM) grpSingle1 ParameterElementGroup 1 (RAM / PIM / Flash) refTabSingle->grpSingle1 grpSingle2 ParameterElementGroup 2 (RAM / PIM / Flash) refTabSingle->grpSingle2 baseRef Base reference (pointer variable in RAM) refTabRom Calibration reference table (ROM / Flash) baseRef->refTabRom Initial refTabRam Calibration reference table (copy in RAM) baseRef->refTabRam After switchover grpRom ParameterElementGroup (Flash-Originaldaten) refTabRom->grpRom grpRam ParameterElementGroup (Modifizierte RAM-Kopie) refTabRam->grpRam

Context diagram: Addressing and indirection structures of the Single Pointered and Double Pointered calibration methods. Sources: [SWS_Rte_03913], [SWS_Rte_03914], [SWS_Rte_03947], AUTOSAR_SWS_RTE p. 180, AUTOSAR_SWS_RTE p. 181.

For online calibration, the RTE generates pointer structures according to the Single Pointered or Double Pointered principle, allowing parameter groups to be modified in RAM without hardware emulation [SWS_Rte_03913], [SWS_Rte_03914]. Erroneous out-of-bounds violations or timeouts are reported to the calling component via Std_ReturnType, while memory protection checks at partition boundaries prevent unauthorized manipulations [SWS_Rte_01034], [SWS_Rte_03845], [SWS_Rte_02752].

Role and System Boundaries of the RTE in the Classic Platform

The Runtime Environment (RTE) forms the functional backbone of the AUTOSAR Classic architecture by completely decoupling software components (SWCs) from the underlying computing hardware as well as from the hardware-related Basic Software modules (BSW) (SWS_RTE p. 100). For each ECU, the RTE generator produces a tailored interface that resolves all communication relationships—both locally on a microcontroller (intra-ECU) and network-wide across communication buses (inter-ECU)—via standardized API calls such as Rte_Read, Rte_Write, or Rte_Call [SWS_Rte_01091], [SWS_Rte_01102]. By providing a generated BswModuleDescription element and associated BswInternalBehavior descriptions, the RTE integrates as an integral component into the configuration and packaging scheme of AUTOSAR [SWS_Rte_05165], [SWS_Rte_05166].

Multiple instantiations of the same software component are handled by the RTE exclusively via code-sharing reentrant runnable entities; code duplication is explicitly not supported [SWS_Rte_03015], [SWS_Rte_02002]. In C code, a unique instance identifier is passed for each instance or addressed via the Component Data Structure (CDS), thereby ensuring parallel instance executions in shared task contexts without mutual data corruption (SWS_RTE p. 126, SWS_RTE p. 804). In addition to application SWCs, the RTE covers the cyclic scheduling and mode management of all BSW modules via the Basic Software Scheduler (SchM) [SWS_Rte_08060], [SWS_Rte_07273].

Lifecycle and Startup Coordination of SchM and RTE

System startup requires a strictly regulated sequence between the BSW Scheduler (SchM) and the application-oriented RTE (SWS_RTE p. 459). Before the SchM is initialized, only the locking functions SchM_Enter and SchM_Exit are available due to system safety reasons. The EcuStateManager first calls the function SchM_Init, which initializes internal data structures and mode machines and starts BswSchedulableEntities with background events [SWS_Rte_08060], [SWS_Rte_07584]. Prior to calling BswM_Init, SchM_Start must be called [SWS_Rte_07273], [SWS_Rte_04548]. The activation of periodic BSW processes (BswTimingEvents) is then enabled via SchM_StartTiming [SWS_Rte_04548], [SWS_Rte_04551], [SWS_Rte_07574].

Startup and shutdown coordination between EcuM, SchM, and RTEEcuMSchMBswMRTEUse Case: BSW-Scheduler HochlaufphaseSchM_Init(ConfigPtr)Interne Datenstrukturen & initial ModeMachines initialisierenSchM_Start()BswM_Init(ConfigPtr)SchM_StartTiming()BswTimingEvents periodisch aktivierenUse Case: RTE ApplikationsstartRte_Start()Applikations-Runnables & ModeTransitions freigebenRTE_E_OKUse Case: Herunterfahren (Shutdown)Rte_Stop()Runnables stoppen, Kommunikation ignorierenRTE_E_OKSchM_Deinit()Rte_Rips_SchM_Deinit() & Ressourcen freigeben

Sequence diagram: Timing coordination of startup and shutdown between EcuM, SchM, and RTE. Sources: [SWS_Rte_08060], [SWS_Rte_07273], [SWS_Rte_04548], [SWS_Rte_03015], [SWS_Rte_01262], [SWS_Rte_04551], [SWS_Rte_89019].

Only when the required basic services are running does the EcuStateManager activate the execution of application SWCs with Rte_Start and initiate mode transitions for unbundled on-entry runnables [SWS_Rte_03015], [SWS_Rte_06766]. If resource allocation fails during Rte_Start, the function returns the error code RTE_E_LIMIT [SWS_Rte_01262]. During ECU shutdown, Rte_Stop first terminates application execution and ignores incoming requests and data from that point forward [SWS_Rte_02538], [SWS_Rte_02535], [SWS_Rte_02536]. Only after the complete termination of Rte_Stop may SchM_Deinit be called, which releases all system resources of the scheduler and initiates plug-in-specific cleanups via Rte_Rips_SchM_Deinit [SWS_Rte_04551], [SWS_Rte_07277], [SWS_Rte_89019].

Communication Patterns: Sender-Receiver and Client-Server

In the sender-receiver paradigm, the RTE fundamentally distinguishes between data semantics and event semantics (SWS_RTE p. 286). With data semantics (swImplPolicy != queued), the most recently written value is kept in the buffer and is consumed explicitly via Rte_Read or implicitly via Rte_IRead [SWS_Rte_01091], [SWS_Rte_06000]. With implicit reading, the RTE guarantees a consistent copy of the data value throughout the entire execution time of the runnable entity [SWS_Rte_06001]. Prior to the first reception, the RTE provides the configured initValue so that no uninitialized memory states are processed [SWS_Rte_06009], [SWS_Rte_06010].

Inter-ECU sender-receiver communication with DataSemanticsSender-SWCSender-RTECOM-StackEmpfaenger-RTEEmpfaenger-SWCUse Case: InitialisierungsphasePre-assign buffer with initValueRte_Read_p_o(&data)data = initValue (RTE_E_OK)Use Case: Data transmissionRte_Write_p_o(data)Com_SendSignal(signalId, &data)RTE_E_OKSignalempfang via Bus & Rte_COMCbkUpdate of the internal signal bufferRte_Read_p_o(&data)data = empfangener Wert (RTE_E_OK)

Sequence diagram: Inter-ECU sender-receiver communication for unbuffered signals with initial value protection. Sources: [SWS_Rte_01091], [SWS_Rte_06009], [SWS_Rte_01289], AUTOSAR_SWS_RTE p. 148.

In contrast, event semantics (swImplPolicy = queued) processes data sequences losslessly via FIFO buffer structures that are filled using Rte_Send and decremented by Rte_Receive [SWS_Rte_01072], [SWS_Rte_01092], [SWS_Rte_02521]. If the buffer limit defined via RteQueuedReceiverQueueLength is reached, the RTE discards incoming new data and sets a corresponding error flag [SWS_Rte_08940], [SWS_Rte_02523]. For large data volumes, the RTE uses specialized transport paths such as LdCom or Large Data COM with signal buffer locking [SWS_Rte_01376], [SWS_Rte_01379].

Client-server communication supports synchronous calls (Rte_Call) as well as asynchronous interactions with separate result retrieval via Rte_Result [SWS_Rte_01102], [SWS_Rte_01111]. On the server side, the RTE buffers incoming requests in a FIFO queue unless a direct call is configured, whereas the response is temporarily stored in a buffer of length 1 on the client side [SWS_Rte_02527], [SWS_Rte_02528]. For cross-partition or cross-ECU calls, a two-part transaction handle consisting of a client identifier and sequence counter ensures the exact correlation of response packets to the original request [SWS_Rte_02649], [SWS_Rte_08711].

Mode Management, State Transitions, and Distributed Shared Mode Queues

Mode management enables the coordinated switching of operating states via dedicated mode machines (ModeMachineInstances) that are controlled via Rte_Switch [SWS_Rte_02631]. Each state transition undergoes a deterministic sequence of ten individual steps, which includes, among others, activating mode locks, controlled waiting for affected runnables to terminate, and the sequential execution of OnExit, OnTransition, and OnEntry entities [SWS_Rte_02665]. Only after all phases have fully completed is the acknowledgment event ModeSwitchedAckEvent triggered, the status of which can be queried via Rte_SwitchAck [SWS_Rte_02679], [SWS_Rte_02725], [SWS_Rte_02758].

ModeTransition s1 1. Activation of mode disablings s2 2. Waiting for termination of affected ExecutableEntities s1->s2 s3 3. Execution of the OnExit ExecutableEntities s2->s3 s4 4. Waiting for termination of all OnExit Entities s3->s4 s5 5. Execution of the OnTransition ExecutableEntities s4->s5 s6 6. Waiting for termination of all OnTransition Entities s5->s6 s7 7. Execution of the OnEntry ExecutableEntities s6->s7 s8 8. Waiting for termination of all OnEntry Entities s7->s8 s9 9. Switching the mode disablings s8->s9 s10 10. Triggering the ModeSwitchAckEvents s9->s10

Activity diagram: Deterministic ten-step sequence of a mode transition within a ModeMachineInstance. Sources: [SWS_Rte_02665], [SWS_Rte_02679], EXP_ModeManagementGuide p. 16.

To enforce a strict order of mode switches across multiple mode machines—for example, between ignition state and engine state—the RTE provides Distributed Shared Mode Queues (DSMQ) (SWS_RTE p. 442). The status of enqueue and dequeue operations in such queues is signaled via the type Rte_DsmqStatusType [SWS_Rte_91102]. For software cluster transitions, Rte_Rips_SwitchNotificationStatusType maps the corresponding enqueue and dequeue states [SWS_Rte_91113]. Interpretation: In the BSW Scheduler, the configuration of synchronization points prior to Rte_Start is likely chosen to establish deterministic system states before enabling cyclic tasks [SWS_Rte_06767]. Question Q-d194460a04c885f3 (open)

Calibration, Data Emulation, and Memory Topology

Calibration parameters are centrally placed in memory by the RTE, as only the RTE generator knows the overall allocation of all components and partitions on the ECU [SWS_Rte_03961]. To enable online calibration without specialized emulation hardware, the RTE supports software emulation methods such as the Single Pointered Method and the Double Pointered Method (SWS_RTE p. 236, SWS_RTE p. 237). In the Single Pointered Method, a pointer table (<RteParameterRefTab>) composed of void* entries exists in RAM, pointing to ParameterElementGroups [SWS_Rte_03913], [SWS_Rte_03947].

CalprmPointered cluster_single Single Pointered Method cluster_double Double Pointered Method refTabSingle <RteParameterRefTab> (array of void pointers in RAM) grpSingle1 ParameterElementGroup 1 (RAM / PIM / Flash) refTabSingle->grpSingle1 grpSingle2 ParameterElementGroup 2 (RAM / PIM / Flash) refTabSingle->grpSingle2 baseRef Base reference (pointer variable in RAM) refTabRom Calibration reference table (ROM / Flash) baseRef->refTabRom Initial refTabRam Calibration reference table (copy in RAM) baseRef->refTabRam After switchover grpRom ParameterElementGroup (Flash-Originaldaten) refTabRom->grpRom grpRam ParameterElementGroup (Modifizierte RAM-Kopie) refTabRam->grpRam

Context diagram: Addressing and indirection structures of the Single Pointered and Double Pointered calibration methods. Sources: [SWS_Rte_03913], [SWS_Rte_03914], [SWS_Rte_03947], AUTOSAR_SWS_RTE p. 180, AUTOSAR_SWS_RTE p. 181.

The Double Pointered Method, by contrast, uses two-stage indirection: A reference table stored in ROM/flash points to parameter groups, while a modifiable base pointer (Base reference) in RAM initially points to this flash table and can be redirected to a modified RAM copy during calibration [SWS_Rte_03914]. In this process, ParameterDataPrototypes are separated into distinct groups based on their swAddrMethod [SWS_Rte_03908]. The RTE generator exports all structure and pointer information in container McSupportData via McSwEmulationMethodSupport to provide calibration tools (such as INCA or CANape) with precise access to A2L addressing [SWS_Rte_05118], [SWS_Rte_05137], [SWS_Rte_05138]. Interpretation: For highly integrated safety ECUs, the Double Pointered Method is likely to be preferred, since the pointer table itself primarily remains in protected flash and binds RAM buffers only during active calibration. Question Q-fb532d79c1eb906d (open)

Partitioning, Memory Protection, and Inter-OS-Application Communication

In multi-core and memory-protected architectures, the RTE connects software components across partition boundaries (OS-Applications) using Inter-OS-Application Communication (IOC) (SWS_RTE p. 372). Here, the RTE replaces internal signal buffers with hardware-related IOC buffers and generated protection functions. To access exclusive areas (ExclusiveAreas), the integrator selects mechanism-specific configuration parameters (RteExclusiveAreaImplMechanism) ranging from interrupt locks to OS spinlocks for cross-core accesses (SWS_RTE p. 203).

If an untested or non-trusted partition passes pointer parameters to a trusted BSW or SWC partition, the RTE mandatorily performs address and memory area checks [SWS_Rte_02752], [SWS_Rte_02753]. The pointer is forwarded only if the entire referenced memory object belongs to the calling partition, effectively preventing protection area violations and unauthorized overwriting of external memory areas (SWS_RTE p. 378).

Behavior in the event of an error

RTE error handling strictly separates infrastructure errors from application errors (SWS_RTE p. 579). All error states are directly signaled to the caller via the return type Std_ReturnType [SWS_Rte_01034]. Immediate infrastructure errors include, among others, RTE_E_TIMEOUT (129), RTE_E_LIMIT (130), RTE_E_NO_DATA (131), RTE_E_UNCONNECTED (134), RTE_E_IN_EXCLUSIVE_AREA (135), and RTE_E_SEG_FAULT (136) (SWS_RTE p. 586).

Range check and error propagation for Rte_ReadCOM-StackRTE-EmpfangRTE-PufferApplikations-SWCNeuer Signalwert empfangenPerform DataSemantics range checkaltValue within the defined rangePufferwert aktualisieren, Status = RTE_E_OKValue outside the range (out of range)Pufferstatus = RTE_E_OUT_OF_RANGERte_Read_p_o(&data)Return: RTE_E_OUT_OF_RANGE

Sequence diagram: Detection and propagation of range errors via Rte_Read. Sources: [SWS_Rte_01091], [SWS_Rte_01371], [SWS_Rte_03845], AUTOSAR_CP_SWS_RTE p. 409.

When data validation is enabled (DataSemantics range check), the RTE checks incoming signal values against defined ranges [SWS_Rte_01371]. If a received value is outside the boundaries, the read API returns RTE_E_OUT_OF_RANGE [SWS_Rte_03845], [SWS_Rte_03846]. For signals with an invalidation policy, the RTE replaces the value with the initValue upon replace or, upon keep, retains the previous value and sets an error event [SWS_Rte_05030], [SWS_Rte_05049]. During timeout monitoring via aliveTimeout, the RTE registers the absence via Rte_COMCbkRxTOut and propagates RTE_E_TIMEOUT to waiting SWCs [SWS_Rte_08061], [SWS_Rte_03763].

Further detailed evidence

The exact technical design of the RTE and the scheduler is based on the following core requirements of the payload:

This module guide was created by an AI curation assistant based on the AUTOSAR specification for R20-11.

AUTOSAR RTE

The RTE realizes the Virtual Functional Bus (VFB) on a specific ECU, providing communication between Software Components and basic software.

Funktionen — Übersicht

Typen — Übersicht

Funktionen & Typen — Detailansicht

function Rte_Start [SWS_Rte_03015] 📄 PDF

Std_ReturnType Rte_Start (void);

Rte_Start is intended to allocate and initialize system resources and communication resources used by the RTE.

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

The function Rte_Start allocates and initializes the system and communication resources used by the RTE [SWS_Rte_03015]. The API is always generated [SWS_Rte_01309], has the signature Std_ReturnType Rte_Start (void) [SWS_Rte_02569], and must unconditionally return within finite execution time without an infinite loop [SWS_Rte_02585].

The function may be called on each Core only exactly once by the EcuStateManager from a trusted OS context after all Basic Software modules required by the RTE have been initialized [SWS_Rte_CONSTR_09035]. The call is executed independently on each Core [SWS_Rte_07615] and executes the partition-specific startup activities for all partitions assigned to this Core [SWS_Rte_07616].

During the sequence, the RTE initializes the variables allocated for RAM blocks depending on the configured strategy [SWS_Rte_07632]. After variable initialization, but prior to the execution of runnables, the RTE calls the initialization functions Rte_Rips_Rte_Start of all participating RTE implementation plug-ins [SWS_Rte_80052]. Subsequently, the RTE activates all runnables triggered by InitEvent once [SWS_Rte_06761] and initiates the transition into the initial modes [SWS_Rte_06766]. If the API Rte_StartTiming does not exist, Rte_Start also starts the activation of runnables triggered by TimingEvent [SWS_Rte_07575] or BackgroundEvent [SWS_Rte_07178].

For error handling, if RteDevErrorDetectUninit is enabled, the RTE or SchM reports the error RTE_E_UNINIT (0x07) if Rte_Start is called before SchM_Init [SWS_Rte_07683]. Prior to the execution of Rte_Start, runtime APIs of the RTE must not be called, as this otherwise likewise leads to RTE_E_UNINIT [SWS_Rte_07682]; Rte_SetMirror, however, may already be called before Rte_Start [SWS_Rte_07319].

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

Implementer's Guide to follow (complexity I2)

function Rte_Stop [SWS_Rte_01262] 📄 PDF

Std_ReturnType Rte_Stop (void);

Rte_Stop is used to finalize the RTE on the core it is called. This service releases all system and communication resources allocated by the RTE on that core.

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

The function Rte_Stop ([SWS_Rte_02570]) is generated in every configuration ([SWS_Rte_01310]) and serves to finalize the RTE on the executing Core ([SWS_Rte_01262]). In doing so, all system and communication resources allocated by the RTE on this Core are released ([SWS_Rte_01262]). The synchronous call is guaranteed to return within a finite runtime ([SWS_Rte_02584]).

In the overall system, Rte_Stop must be called by the EcuStateManager before the Basic Software modules required by the RTE are shut down ([SWS_Rte_CONSTR_09038]). During the process, the RTE calls the stop functions Rte_Rips_Rte_Stop of all participating RTE implementation plug-ins ([SWS_Rte_80053]), which must provide these lifecycle interfaces ([SWS_Rte_70047]). Only after complete termination of Rte_Stop may SchM_Deinit be executed ([SWS_Rte_CONSTR_09056]).

After calling Rte_Stop on a Core, no further RunnableEntity instances are activated, started, or released there by the RTE ([SWS_Rte_02538]). Unaffected by this, Rte_GetMirror remains callable as long as the underlying operating system is active ([SWS_Rte_07350]).

In case of an error, the function returns RTE_E_LIMIT if an internal limit was exceeded or the allocation of a required resource fails ([SWS_Rte_01262]). If RteDevErrorDetectUninit is enabled, the RTE reports the error RTE_E_UNINIT (0x07) when illegal APIs are called after Rte_Stop ([SWS_Rte_07682]).

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

Implementer's Guide to follow (complexity I2)

function Rte_StartTiming [SWS_Rte_06753] 📄 PDF

void Rte_StartTiming (void);

Rte_StartTiming API is intended to release the activation of RunnableEntitys triggered by TimingEvents and BackgroundEvents after the last call of a Rte_Init function.

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

The function Rte_StartTiming serves to enable the activation of RunnableEntitys triggered by TimingEvents or BackgroundEvents after completion of the RTE initialization ([SWS_Rte_06753], [SWS_Rte_06756]). It is implemented as a function without parameters and without a return value ([SWS_Rte_06754], [SWS_Rte_06758]) and must return within a finite execution time ([SWS_Rte_06757]).

Regarding the call context and the sequence, the API is subject to strict constraints:

  • The function may only be called after the RTE has been completely initialized, specifically after the call to Rte_Start has finished ([SWS_Rte_CONSTR_09061]).
  • It is intended to be executed after the last call of an Rte_Init function ([SWS_Rte_06753]).
  • The API is generated or provided as soon as at least one Rte_Init API is generated ([SWS_Rte_06755]).

When Rte_StartTiming is called, it immediately starts the periodic and background-based activations ([SWS_Rte_06759], [SWS_Rte_06760]). If, on the other hand, the API does not exist in the configuration, the call to Rte_Start instead already assumes the enablement of runnables triggered by TimingEvents and BackgroundEvents ([SWS_Rte_07178], [SWS_Rte_07575]). Specific error codes or return values are not defined for this call ([SWS_Rte_06754]).

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

Implementer's Guide to follow (complexity I2)

function SchM_Init [SWS_Rte_08060] 📄 PDF

void SchM_Init (const SchM_ConfigType* ConfigPtr);

SchM_Init is intended to allocate and initialize system resources used by the Basic Software Scheduler part of the RTE for the core on which it is called.

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

Usage and Semantics

The function SchM_Init allocates and initializes the system resources used by the Basic Software Scheduler (SchM) of the RTE on the calling Core ([SWS_Rte_08060]). The interface is always generated ([SWS_Rte_07271]) and has the signature void SchM_Init(const SchM_ConfigType* ConfigPtr) ([SWS_Rte_07270]). It is executed synchronously and must mandatory return within a finite execution time without entering an infinite loop ([SWS_Rte_07273]).

During the initialization sequence, SchM_Init performs the following steps:

  • It initiates the transition to the initial mode for every mode machine instance belonging to the Basic Software Scheduler ([SWS_Rte_07532]).
  • It starts the activation of BswSchedulableEntity instances triggered by BswBackgroundEvent events ([SWS_Rte_07584]).
  • It calls the initialization functions Rte_Rips_SchM_Init of all participating RTE Implementation Plug-Ins ([SWS_Rte_80051]).

Call Context and Ordering Requirements

SchM_Init may only be called exactly once on each Core by the EcuStateManager as soon as the BSW modules required by the Basic Software Scheduler have been initialized ([SWS_Rte_CONSTR_09055]). Subsequent APIs such as Rte_Start may only be called after complete termination of SchM_Init ([SWS_Rte_CONSTR_09036]).

Error handling

If SchM_Init is called with a NULL pointer as parameter, the Basic Software Scheduler reports the error RTE_E_DET_ILLEGAL_VARIANT_CRITERION_VALUE (0x02) ([SWS_Rte_07684]). If scheduler APIs (such as SchM_Switch, SchM_Mode, or SchM_Start) or Rte_Start are called before SchM_Init, the error RTE_E_UNINIT (0x07) is reported when RteDevErrorDetectUninit is activated ([SWS_Rte_07683]).

This usage note was generated by an AI system based on the AUTOSAR specification.

Implementer's Guide to follow (complexity I2)

function SchM_Start [SWS_Rte_07273] 📄 PDF

void SchM_Start (void);

Basic Software Scheduler initialized. Shall be called before BswM_Init().

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

use

The function SchM_Start serves to start up the Basic Software Scheduler in the RTE module and is always provided as part of the interface generation [SWS_Rte_04547]. It has the parameterless C signature void SchM_Start(void) [SWS_Rte_04546] and returns no value. For execution, the binding requirement applies that the call must return within a finite runtime and must under no circumstances enter an infinite loop [SWS_Rte_04548]. In the absence of asynchronous callback mechanisms, it is likely to be a synchronously blocking initialization call. Question Q-b6ad9ed696841d7a (open)

Call Context and Concurrency

Strict restrictions apply to the call context and the interaction with other system components:

  • Caller and frequency: The function may be called on each processor core exclusively by the EcuStateManager and only exactly once there [SWS_Rte_CONSTR_09055].
  • Sequence conditions: The call may only take place after all Basic Software modules required by the Basic Software Scheduler part of the RTE have been completely initialized [SWS_Rte_CONSTR_09055].
  • Interaction during system startup: After execution, the Basic Software Scheduler is operational; the call must unconditionally take place before the initialization of the BSW Manager via BswM_Init() [SWS_Rte_07273].

Error handling

Specific error codes, return values, or notifications to the DET or DEM are not defined in the payload for this function.

This text was created by an AI based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I2)

function SchM_StartTiming [SWS_Rte_04548] 📄 PDF

void SchM_StartTiming (void);

Start periodical events for BSW/SWCs. SchM_Init() has to be called before.

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

use

The function SchM_StartTiming has the parameterless signature void SchM_StartTiming(void) [SWS_Rte_04549] and is always generated by the RTE generator [SWS_Rte_04550]. Its call starts periodic events for BSW and SWCs [SWS_Rte_04548] by initiating the activation of BswSchedulableEntity instances triggered by BswTimingEvents [SWS_Rte_07574]. The function must return within a finite execution time and must not execute an infinite loop [SWS_Rte_04551].

Call Context and Restrictions

Prior to calling SchM_StartTiming, SchM_Init must have been called mandatorily [SWS_Rte_04548]. In addition, the mandatory restriction applies that SchM_StartTiming may be called on each Core only exactly once by EcuStateManager after all Basic Software modules required for the Basic Software Scheduler have been initialized [SWS_Rte_CONSTR_09055].

Error handling

If SchM_StartTiming is called before SchM_Init, the Basic Software Scheduler or the RTE reports error RTE_E_UNINIT (0x07), provided development error detection RteDevErrorDetectUninit is enabled [SWS_Rte_07683].

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

Implementer's Guide to follow (complexity I2)

function SchM_Deinit [SWS_Rte_04551] 📄 PDF

void SchM_Deinit (void);

SchM_Deinit is used to finalize Basic Software Scheduler part of the RTE of the core on which it is called. This service releases all system resources allocated by the Basic Software Scheduler part on that core.

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

Usage and Functional Scope

The function SchM_Deinit serves to finalize the Basic Software Scheduler part of the RTE on the Core on which it is called [SWS_Rte_04551]. During this process, the service releases all system resources allocated by the BSW scheduler on this Core [SWS_Rte_04551]. The function has neither parameters nor a return value (void SchM_Deinit(void)) [SWS_Rte_07274] and is generally always generated by the RTE generator [SWS_Rte_07275]. Regarding timing behavior, the specification requires that SchM_Deinit must return within a finite execution time [SWS_Rte_07277].

Call Context and Ordering Requirements

Mandatory sequencing requirements apply for invocation during the ECU shutdown phase:

  • The function SchM_Deinit may only be used after the RTE has been completely finalized, that is, after the termination of Rte_Stop [SWS_Rte_CONSTR_09056].
  • The call must be made by EcuStateManager before the basic layers required for operating the Basic Software Scheduler are shut down [SWS_Rte_CONSTR_09057].
  • After SchM_Deinit has been called on a Core, the BSW scheduler on this Core may no longer activate or start any instances of BswSchedulableEntity [SWS_Rte_07586].

Plug-In Cleanup

As part of deinitialization, the RTE mandatorily calls the functions Rte_Rips_SchM_Deinit of all participating RTE Implementation Plug-Ins within SchM_Deinit in order to complete their cleanup [SWS_Rte_80054].

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

Implementer's Guide to follow (complexity I1)

function <name of the Invocation Handler> [SWS_Rte_89015] 📄 PDF

void <name of the Invocation Handler> (void);

Performs invocation of server runnables, hard error runnables, ASCR runnables and triggered runnables via a transformer".

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

In the Rte module, the handler function <name of the Invocation Handler> handles the synchronous invocation of various runnable types via a transformer [SWS_Rte_89015]. The supported entities include server runnables, hard error runnables, ASCR runnables, and triggered runnables [SWS_Rte_89015].

The interface has neither input, input/output, nor output parameters and returns no value (signature void (void)) [SWS_Rte_89015]. The call is handled synchronously and is identified by the service ID 0xEE [SWS_Rte_89015]. The declaration is provided via the header file Rte_Rips_<PlugIn>.h [SWS_Rte_89015].

Regarding concurrency, the function is declared as conditionally reentrant (Conditional Reentrant) [SWS_Rte_89015]. This likely means that a concurrent call is only permitted if different execution contexts or separate plug-in instances are present. Question Q-24aabb36a2be58f4 (open) The identifier <name of the Invocation Handler> as well as the header designation <PlugIn> represent placeholders; the actual name is presumably determined during plug-in configuration.

This usage note was generated by an AI based on the specification of AUTOSAR R20-11.

function Rte_Rips_SchM_Deinit [SWS_Rte_89019] 📄 PDF

void Rte_Rips_SchM_Deinit (void);

Rte_Rips_SchM_Deinit deinitializes those RTE Implementation Plug-In parts which are relevant for the SchM related operations.

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

The function Rte_Rips_SchM_Deinit serves to deinitialize those components of an RTE Implementation Plug-In that are relevant to the operations of the Basic Software Scheduler (SchM) [SWS_Rte_89019]. It is one of the mandatory lifecycle interfaces that must be provided by every RTE Implementation Plug-In alongside Rte_Rips_SchM_Init, Rte_Rips_Rte_Start, and Rte_Rips_Rte_Stop [SWS_Rte_70047].

The following specifications apply to integration and usage:

  • Call context and sequence: The interface has the signature void Rte_Rips_SchM_Deinit (void), takes no parameters, and provides no return value [SWS_Rte_89019]. It is executed synchronously [SWS_Rte_89019]. The call is not made by software components, but is coordinated by the RTE within SchM_Deinit for all participating plug-ins [SWS_Rte_80054].
  • File inclusion and identifier: The declaration is available via the header Rte_Rips_<PlugIn>.h; the function has the service ID 0xF3 [SWS_Rte_89019].
  • Concurrency and restrictions: The function is specified as non-reentrant (Non Reentrant) [SWS_Rte_89019]. From this it is likely to follow that during the call in SchM_Deinit, competing SchM activities may no longer access the plug-in. Question Q-60aec1abc9e891b2 (open)
  • Error handling: The specification provides neither error codes nor return values for Rte_Rips_SchM_Deinit and defines no error messages to DET or DEM [SWS_Rte_89019].

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

type Rte_Rips_SwitchNotificationStatusType [SWS_Rte_91113] 📄 PDF

Status of the en- and dequeue operation on a mode queue Tags: atp.Status=draft

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

The data type Rte_Rips_SwitchNotificationStatusType ([SWS_Rte_91113]) is based on uint8 and is provided via Rte_Type.h. It serves to signal the status of enqueue and dequeue operations on a mode queue in the context of RTE Implementation Plug-Ins.

The value range comprises status codes for both directions of operation ([SWS_Rte_91113]):

  • RTE_SWITCH_NOTIFICATION_SKIP (0x00): The mode switch notification cannot be dequeued.
  • RTE_SWITCH_NOTIFICATION_ENQUEUED_FIRST (0x01): The notification was enqueued into an empty queue.
  • RTE_SWITCH_NOTIFICATION_ENQUEUED_NOT_FIRST (0x02): The notification was enqueued into an already occupied queue.
  • RTE_SWITCH_NOTIFICATION_ENQUEUE_FAILED (0x03): Enqueueing into a non-empty queue has failed.
  • RTE_SWITCH_NOTIFICATION_DEQUEUED_LAST (0x04): The last mode switch notification was dequeued from the queue.
  • RTE_SWITCH_NOTIFICATION_DEQUEUED_NOT_LAST (0x05): A notification was dequeued; further notifications remain in the queue.

In usage, the type appears in two synchronous, reentrant interfaces: The function Rte_Rips_<PlugIn>_Switch_<BswSwcI>_<MMI> ([SWS_Rte_91114]) receives the status as an input parameter switchNotificationStatus to notify the plug-in about enqueue operations. In contrast, the function Rte_Rips_<PlugIn>_DequeueModeSwitch_<MMI>_<OsTask> ([SWS_Rte_91115]) returns the type as a return value when a notification is dequeued from the queue after completion of the last on-entry ExecutableEntity.

Errors during enqueuing are reported functionally via the state value RTE_SWITCH_NOTIFICATION_ENQUEUE_FAILED ([SWS_Rte_91113]); separate DET or DEM entries are not indicated in the payload. Interpretation: The specification text "was enqueued from mode queue" for the dequeue constants is likely editorial and refers to the dequeue operation. Question Q-6e9e040dcd341f66 (open) The element and the associated interfaces are marked as draft ([SWS_Rte_91113]).

This usage note was generated automatically and is based exclusively on the specification data of AUTOSAR version R20-11.

Implementer's Guide to follow (complexity I1)

type Rte_DsmqStatusType [SWS_Rte_91102] 📄 PDF

Status of the enqueue operation on a distributed shared mode queue

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

The data type Rte_DsmqStatusType is based on uint8 and is defined together with its literals in the header file Rte_Type.h in accordance with [SWS_Rte_80085] and [SWS_Rte_91102]. It serves to signal the status of enqueue and dequeue operations for mode switch notifications in a Distributed Shared Mode Queue (DSMQ) [SWS_Rte_91102].

The value range comprises the following literals [SWS_Rte_91102]:

  • RTE_DSMQ_ENQUEUED_FIRST (0x01): The notification was enqueued into a previously empty DSMQ.
  • RTE_DSMQ_ENQUEUED_NOT_FIRST (0x02): The enqueuing occurred into an already populated (non-empty) DSMQ.
  • RTE_DSMQ_ENQUEUE_FAILED (0x03): Enqueuing into a non-empty DSMQ failed.
  • RTE_DSMQ_DEQUEUED_LAST (0x04): The last mode switch notification was dequeued from the DSMQ.
  • RTE_DSMQ_DEQUEUED_NOT_LAST (0x05): A notification was dequeued while further notifications remain in the queue.

For error handling, the literal RTE_DSMQ_ENQUEUE_FAILED signals a failure of the enqueuing operation when the queue is not empty [SWS_Rte_91102].

The type is used as a passing parameter dsmqstatus to interfaces of the RTE Implementation Plug-In (RIPS). The function Rte_Rips_<PlugIn>_DsmqSwitch_<BswSwcI>_<MMI> synchronously informs the plug-in about enqueuing into a DSMQ [SWS_Rte_91103]. In addition, Rte_Rips_<PlugIn>_DsmqTransitionEnd_<BswSwcI>_<MMI> synchronously reports the completion of a mode transition in a DSMQ transition OsTask to the RIPS [SWS_Rte_91106]. Both callback services are declared as synchronous and reentrant [SWS_Rte_91103], [SWS_Rte_91106].

This usage note was generated by an AI based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

type RteCalibrationSwAddrMethodRefParentContainerRteComponentType [SWS_Rte_05145] 📄 PDF

Reference to the SwAddrMethod for which software calibration support shall be enabled. Multiplicity 0..* Type Foreign reference to SW-ADDR-METHOD Post-Build Variant Multiplicity false Post-Build Variant Value false Multiplicity Configuration Class Pre-compile time X All Variants Link time – Post-build time – Value Configuration Class Pre-compile time X All Variants Link time – Post-build time – Scope / Dependency scope: local No Included Containers 8.7 Implicit communication configuration Figure 8.22: Configuration of the implicit communication SWS Item [ECUC_Rte_09034] Container Name

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

Record
AUTOSAR/AP/record/CP_MOD_Rte
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_Rte@rel:R20-11#1839fa7c
Content hash
1839fa7c
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_RTE.pdf#nameddest=SWS_Rte_03015

Initialization and status

Rte_Rips_SchM_Deinit deinitializes those RTE Implementation Plug-In parts which are relevant for the SchM related operations.

void Rte_Rips_SchM_Deinit (void);
SchM_Deinit function

SchM_Deinit is used to finalize Basic Software Scheduler part of the RTE of the core on which it is called. This service releases all system resources allocated by the Basic Software Scheduler part on that core.

void SchM_Deinit (void);

Returns the version information of the Basic Software Scheduler.

void SchM_GetVersionInfo (Std_VersionInfoType* versioninfo);
SchM_Init function

SchM_Init is intended to allocate and initialize system resources used by the Basic Software Scheduler part of the RTE for the core on which it is called.

void SchM_Init (const SchM_ConfigType* ConfigPtr);

Services

Rte_Start function

Rte_Start is intended to allocate and initialize system resources and communication resources used by the RTE.

Std_ReturnType Rte_Start (void);

Rte_StartTiming API is intended to release the activation of RunnableEntitys triggered by TimingEvents and BackgroundEvents after the last call of a Rte_Init function.

void Rte_StartTiming (void);
Rte_Stop function

Rte_Stop is used to finalize the RTE on the core it is called. This service releases all system and communication resources allocated by the RTE on that core.

Std_ReturnType Rte_Stop (void);
SchM_Start function

Basic Software Scheduler initialized. Shall be called before BswM_Init().

void SchM_Start (void);

Start periodical events for BSW/SWCs. SchM_Init() has to be called before.

void SchM_StartTiming (void);

Callouts and expected interfaces

Performs invocation of server runnables, hard error runnables, ASCR runnables and triggered runnables via a transformer".

void <name of the Invocation Handler> (void);

Types

Status of the enqueue operation on a distributed shared mode queue

Status of the en- and dequeue operation on a mode queue Tags: atp.Status=draft

Reference to the SwAddrMethod for which software calibration support shall be enabled. Multiplicity 0..* Type Foreign reference to SW-ADDR-METHOD Post-Build Variant Multiplicity false Post-Build Variant Value false Multiplicity Configuration Class Pre-compile time X All Variants Link time – Post-build time – Value Configuration Class Pre-compile time X All Variants Link time – Post-build time – Scope / Dependency scope: local No Included Containers 8.7 Implicit communication configuration Figure 8.22: Configuration of the implicit communication SWS Item [ECUC_Rte_09034] Container Name