DEENESPTFRRUARHIKOZHNL

AUTOSAR OS

ModulOs (AUTOSAR OS)
BSW-Modul-ID1
Standard-Header#include "Os.h"
SWS-SpezifikationAUTOSAR_SWS_OS.pdf
ClusterOperating System

Module guideAI-GENERATED

Controls time-triggered operations, protects OS-Applications from each other, and coordinates the cores of an ECU.
AI-GENERATED unreviewed Model: claude-opus-5-5 · Effort: high · Temperature: not controllable · Prompt: 5b459e21507a Provenance
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

Controls time-triggered operations, protects OS-Applications from each other, and coordinates the cores of an ECU.

The operating system executes tasks and ISRs, drives counters and schedule tables, and partitions software into protected OS-Applications. The EcuM starts the cores with StartCore; thereafter, StartOS is called on each core [SWS_Os_00676]. Schedule tables can be explicitly synchronized with a global time via the StbM. Accesses to foreign objects are possible only with configured permissions SWS OS p. 62. Upon protection violations, the ProtectionHook decides whether a task, an OS-Application, or the entire system is terminated.

The operating system is the execution core of the Classic stack. It manages tasks, ISRs, alarms, counters, and schedule tables, grouping them into OS-Applications that are trusted or non-trusted SWS OS p. 61. The EcuM starts the cores with StartCore and subsequently the OS with StartOS; each started core calls StartOS itself SWS EcuM p. 82, [SWS_Os_00676]. ShutdownAllCores shuts down the OS on all cores and does not return [SWS_Os_00713]. Software components use OS services via the RTE, and for BSW modules, the services they are permitted to use are restricted SWS BSWGeneral p. 48.

Kontext swc Software-Komponente rte RTE swc->rte Port os: OsService os Os (Tasks, ISRs, Counter, ScheduleTables, OS-Applications) rte->os OS-Dienste ioc IOC (part of the Os) rte->ioc IocSend / IocWrite, IocReceive / IocRead bsw BSW-Module bsw->os only permitted services according to SWS BSWGeneral ecum EcuM ecum->os StartCore, StartOS, GetCoreID, ShutdownAllCores stbm StbM stbm->os GetScheduleTableStatus, SyncScheduleTable, GetCounterValue os->ioc contains hw Hardware (Timer, Interrupt-Controller, Prozessor) os->hw Timer initialisieren, Interrupt-Quellen steuern hw->os Exception on protection violation

Context diagram: EcuM, StbM, RTE, and BSW modules access the Os via separate service groups; the IOC is part of the Os. Sources: SWS EcuM p. 34, SWS OS p. 119

Counters form the time base; hardware values are corrected such that they start at zero and increase monotonically SWS OS p. 39. The application starts schedule tables absolutely or relatively to the counter, and a stop takes effect immediately SWS OS p. 46. In the case of explicit synchronization, the StbM supplies the value of the global time with SyncScheduleTable. The OS subsequently adjusts the expiry points until the deviation is within the configured precision [SWS_Os_00199], SWS OS p. 57.

ScheduleTable start Start STOPPED SCHEDULETABLE_STOPPED start->STOPPED NEXT SCHEDULETABLE_NEXT STOPPED->NEXT NextScheduleTable() WAITING SCHEDULETABLE_WAITING STOPPED->WAITING StartScheduleTableSynchron() RUNNING SCHEDULETABLE_RUNNING STOPPED->RUNNING StartScheduleTableAbs() StartScheduleTableRel() NEXT->STOPPED StopScheduleTable() NEXT->RUNNING vorherige Tabelle endet WAITING->STOPPED StopScheduleTable() SYNC SCHEDULETABLE_RUNNING_AND_SYNCHRONOUS WAITING->SYNC SyncScheduleTable() RUNNING->STOPPED StopScheduleTable() or table ends RUNNING->SYNC |Abweichung| <= Precision SYNC->STOPPED StopScheduleTable() SYNC->RUNNING SetScheduleTableAsync() or |deviation| > Precision

State diagram: Lifecycle of a schedule table from start via synchronization to stop. Sources: [SWS_Os_00784], SWS OS p. 49

The protection concept prohibits accesses to objects of other OS-Applications unless the configuration permits them SWS OS p. 62. Controlled transitions between OS-Applications are enabled by CallTrustedFunction [SWS_Os_00097]. Multiple cores coordinate via spinlocks with deadlock detection and via the IOC [SWS_Os_00686], [SWS_Os_00718].

For fatal errors, the return value of the ProtectionHook determines what follows [SWS_Os_00538]:

  • Ignore error,
  • Terminate task or ISR,
  • Terminate OS-Application, with or without restart,
  • Shut down system.

A restarted OS-Application releases itself again with AllowAccess [SWS_Os_00501].

Role of the Operating System and Its Neighbors in the ECU

The operating system is the execution core of the Classic stack. It manages tasks, ISRs, alarms, counters, and schedule tables. It bundles these objects together with hooks and trusted functions into configurable OS-Applications, which are either trusted or non-trusted SWS OS p. 61. In addition, it initializes and configures all timers that it uses itself and that are not managed by the GPT driver SWS OS p. 39.

The neighboring modules access it via delimited interfaces:

  • The EcuM controls startup and shutdown via StartOS, StartCore, GetCoreID, and ShutdownAllCores SWS EcuM p. 34.
  • The StbM uses GetCounterValue, GetElapsedValue, GetScheduleTableStatus, and SyncScheduleTable SWS StbM p. 152.
  • Software components reach OS services via an RTE port with the service interface OsService TR VFB p. 89. For counters with configured OsSecondsPerTick, this interface provides GetCounterValue and GetElapsedValue, among others [SWS_Os_00560].

For BSW modules, a table specifies which OS services they are allowed to use at all SWS BSWGeneral p. 48. Communication between OS-Applications is handled by the IOC. It is part of the operating system and is invoked by the RTE SWS OS p. 119, [SWS_Os_00718].

Kontext swc Software-Komponente rte RTE swc->rte Port os: OsService os Os (Tasks, ISRs, Counter, ScheduleTables, OS-Applications) rte->os OS-Dienste ioc IOC (part of the Os) rte->ioc IocSend / IocWrite, IocReceive / IocRead bsw BSW-Module bsw->os only permitted services according to SWS BSWGeneral ecum EcuM ecum->os StartCore, StartOS, GetCoreID, ShutdownAllCores stbm StbM stbm->os GetScheduleTableStatus, SyncScheduleTable, GetCounterValue os->ioc contains hw Hardware (Timer, Interrupt-Controller, Prozessor) os->hw Timer initialisieren, Interrupt-Quellen steuern hw->os Exception on protection violation

Context diagram: The Os is used by EcuM, StbM, RTE, and BSW modules via their respective service groups and encapsulates the IOC as well as hardware accesses. Sources: SWS EcuM p. 34, SWS StbM p. 152, TR VFB p. 89, SWS OS p. 119

Startup, Core Management, and Shutdown

In multi-core operation, the EcuM starts all configured cores in a loop on the master core using StartCore. Afterwards, it calls StartOS(ECUM_DEFAULT_APP_MODE) SWS EcuM p. 82. On each started core, StartOS must also be called [SWS_Os_00676]. This is handled by the EcuM of the respective slave core after GetCoreID SWS EcuM p. 83.

The following rules apply to StartCore SWS OS p. 166:

  • The service is not reentrant.
  • A call after StartOS returns E_OS_ACCESS, and the core is not started.
  • An already started core results in E_OS_STATE.

For cores outside the control of the AUTOSAR OS, StartNonAutosarCore exists [SWS_Os_00682].

Cores are identified via CoreIdType. The logical IDs are zero-based and consecutive, and OS_CORE_ID_MASTER designates the master core [SWS_Os_00790], [SWS_Os_00825]. GetCoreID returns the logical ID of the calling core [SWS_Os_00674]. The service can already be called before StartOS SWS OS p. 111.

After StartOS and before the first StartupHook, the OS sets all OS-Applications to APPLICATION_ACCESSIBLE SWS OS p. 62. This is followed by the system-wide StartupHook. Only then do the application-specific StartupHook_<App> run, each with the permissions of their OS-Application SWS OS p. 134, [SWS_Os_00539].

Multi-core startup of the OsEcuM (Master-Kern)Os (Master-Kern)Os (Slave-Kern)EcuM (Slave-Kern)GetCoreID()CoreIdTypeloopfor all configured coresStartCore(CoreID, &Status)Start core under controlof the AUTOSAR OSStatus = E_OKStartOS(ECUM_DEFAULT_APP_MODE)GetCoreID()StartOS(ECUM_DEFAULT_APP_MODE)After StartOS: OS-Applications to APPLICATION_ACCESSIBLE,then StartupHook, thereafter StartupHook_<App>optStartCore after StartOSStartCore(CoreID, &Status)Status = E_OS_ACCESS,Core is not started

Sequence diagram: The master core starts the remaining cores before its own StartOS; each core calls StartOS itself, a later StartCore is rejected. Sources: SWS EcuM p. 82, SWS EcuM p. 83, SWS OS p. 166, SWS OS p. 188

In R20-11, GetNumberOfActivatedCores returns the number of cores activated with StartCore [SWS_Os_00672]. Later versions speak instead of "cores on which the AUTOSAR OS is running" SWS OS p. 196.

With ControlIdle, the action for the idle time is selected per core, for example to save power. The default is IDLE_NO_HALT. An unknown core or mode results in E_OS_ID [SWS_Os_00769], [SWS_Os_00771], [SWS_Os_00793].

ShutdownAllCores shuts down the OS on all AUTOSAR cores, forces the other cores into shutdown, and never returns [SWS_Os_00713]. In doing so, the ShutdownHook_<App> run first. Then the cores synchronize, and only after that does the global ShutdownHook follow SWS OS p. 98, [SWS_Os_00541].

Counters and ScheduleTables as Time Base

GetCounterValue returns the timer value for hardware counters and the software ticks for software counters. The OS corrects hardware values so that they start at zero and increase up to the modulus SWS OS p. 39, [SWS_Os_00383].

GetElapsedValue returns the ticks since a previously read value. If Value is greater than the maximum allowed counter value, E_OS_VALUE follows SWS OS p. 192, [SWS_Os_00392].

IncrementCounter only increments software counters; for hardware counters, it returns E_OS_ID. If an alarm action fails during this, the OS calls the error hooks, but the service itself returns E_OK SWS OS p. 190, [SWS_Os_00399].

Starting and stopping a ScheduleTable is the task of the application SWS OS p. 46. The Initial Expiry Point is processed at the following counter value:

For relative start, an offset of 0 or greater than OsCounterMaxAllowedValue − InitialOffset results in the error E_OS_VALUE. An already started table results in E_OS_STATE SWS OS p. 179.

StopScheduleTable aborts immediately; an already stopped table results in E_OS_NOFUNC [SWS_Os_00006]. A later restart begins at the start of the table SWS OS p. 46.

NextScheduleTable chains a subsequent table. Both tables must be driven by the same counter; otherwise, E_OS_ID follows [SWS_Os_00191], SWS OS p. 184.

For a table that has not been started, GetScheduleTableStatus reports SCHEDULETABLE_STOPPED together with E_OK SWS OS p. 189, [SWS_Os_00784].

ScheduleTable start Start STOPPED SCHEDULETABLE_STOPPED start->STOPPED NEXT SCHEDULETABLE_NEXT STOPPED->NEXT NextScheduleTable() WAITING SCHEDULETABLE_WAITING STOPPED->WAITING StartScheduleTableSynchron() RUNNING SCHEDULETABLE_RUNNING STOPPED->RUNNING StartScheduleTableAbs() StartScheduleTableRel() NEXT->STOPPED StopScheduleTable() NEXT->RUNNING vorherige Tabelle endet WAITING->STOPPED StopScheduleTable() SYNC SCHEDULETABLE_RUNNING_AND_SYNCHRONOUS WAITING->SYNC SyncScheduleTable() RUNNING->STOPPED StopScheduleTable() or table ends RUNNING->SYNC |Abweichung| <= Precision SYNC->STOPPED StopScheduleTable() SYNC->RUNNING SetScheduleTableAsync() or |deviation| > Precision

State diagram: Lifecycle of a ScheduleTable with all states of ScheduleTableStatusType; WAITING and RUNNING occur only with explicit synchronization, implicitly synchronized tables only know STOPPED, NEXT, and RUNNING_AND_SYNCHRONOUS. Sources: [SWS_Os_00784], SWS OS p. 43, SWS OS p. 49, SWS OS p. 48

Synchronization of ScheduleTables with Global Time

With implicit synchronization, the driving counter itself is the synchronization counter. The table then knows only three states SWS OS p. 48. StartScheduleTableRel returns the error E_OS_ID for OsScheduleTblSyncStrategy = IMPLICIT SWS OS p. 179. Explicit synchronization, on the other hand, aligns a locally driven table to an external synchronization counter. It is listed as a safety measure for coupling to the time base of the StbM Safety Measures p. 66.

There are two ways to start SWS OS p. 49, [SWS_Os_00201]:

  • Asynchronously via StartScheduleTableAbs or StartScheduleTableRel, relative to the driving counter.
  • Synchronously via StartScheduleTableSynchron. Here, the Initial Expiry Point is processed (Duration − Value) + InitialOffset ticks after provision of the synchronization value.

SyncScheduleTable passes the current value of the synchronization counter. Its modulus corresponds to the table duration SWS OS p. 52, [SWS_Os_00199].

The OS calculates the deviation from this and adjusts the delay at each expiry point. If the deviation is within OsScheduleTblExplicitPrecision, the table is considered "running and synchronous" SWS OS p. 57. SetScheduleTableAsync stops tracking until the next SyncScheduleTable; the expiry points continue to run during this SWS OS p. 188, [SWS_Os_00422].

Explicit synchronization of a ScheduleTable by the StbMBSW task (OS task or cyclic call)StbMOsStbM_MainFunction()GetScheduleTableStatus(ScheduleTableID, &ScheduleStatus)E_OK, ScheduleStatusaltScheduleStatus == WAITING, RUNNING or RUNNING_AND_SYNCHRONOUSSyncScheduleTable(ScheduleTableID, GlobalTimeTick)Abweichung berechnen,Adjust delay to next expiry pointOtherwisekein SyncScheduleTableSequence repeats on every call of StbM_MainFunction()

Sequence diagram: The StbM cyclically queries the table status and provides a synchronization value only if the table is started. Sources: SWS StbM p. 220, SWS StbM p. 117, [SWS_Os_00227], [SWS_Os_00199]

Protection Concept: OS-Applications, Access Rights, and Trusted Functions

The OS prevents an OS-Application from accessing foreign objects unless the configuration explicitly permits it SWS OS p. 62. If the permissions are missing, a service returns E_OS_ACCESS. Excluded are the checking services for memory and object access, which are always permitted SWS OS p. 73.

The following queries are available at runtime:

  • GetApplicationID names the OS-Application to which the caller is configured [SWS_Os_00016].
  • GetCurrentApplicationID names the OS-Application in which the caller is currently being executed. Both values differ only within CallTrustedFunction [SWS_Os_00797], [SWS_Os_00798].
  • CheckObjectOwnership returns the owner of an object or INVALID_OSAPPLICATION SWS OS p. 178.
  • CheckObjectAccess returns ACCESS or NO_ACCESS; for invalid arguments, always NO_ACCESS SWS OS p. 177.

CheckTaskMemoryAccess and CheckISRMemoryAccess return, as AccessType, the access rights to a memory area and whether it belongs to the stack. A right that does not apply to the entire area is denied. An invalid ID results in no rights at all SWS OS p. 175, SWS OS p. 174. The result is evaluated using macros such as OSMEMORY_IS_WRITEABLE SWS OS p. 160.

CallTrustedFunction executes a function with the protection settings of the providing OS-Application. If the index is not configured, E_OS_SERVICEID and a call to ErrorHook follow SWS OS p. 85, SWS OS p. 172. In R20-11, the synchronous behavior depends on the called function, and the call can trigger a rescheduling [SWS_Os_00097]. Write access must also be restrictable for trusted OS-Applications [SWS_Os_00795].

Call of a Trusted Functionaufrufende OS-ApplicationTrusted-Function-StubBetriebssystem (System-Call-Dispatcher)bereitstellende OS-ApplicationDienstaufrufArgumente in Parameterstruktur packenCallTrustedFunction(FunID, FunParPtr)Check permissionaltverweigertE_OS_SERVICEIDakzeptiert<trusted function>with protection settings of the providing OS-ApplicationCheckTaskMemoryAccess(...)AccessTypeReturnE_OKReturn value

Sequence diagram: A stub wraps the arguments; the OS checks authorization and only then switches to the providing OS-Application, whose function in turn checks memory rights. Sources: SWS OS p. 185, SWS OS p. 396, [SWS_Os_00097]

For protected hardware accesses, ReadPeripheral, WritePeripheral, and ModifyPeripheral are available in 8, 16, and 32 bits. They operate on peripheral areas of type AreaIdType [SWS_Os_91000]. The modify variant computes *Address = (*Address & Clearmask) | Setmask SWS OS p. 209.

For each Category 2 ISR, DisableInterruptSource, EnableInterruptSource, and ClearPendingInterrupt exist [SWS_Os_00808]. ClearPendingInterrupt clears only the pending flag in the interrupt controller [SWS_Os_00814].

Difference between the versions: In R20-11, EnableInterruptSource always clears the pending flag [SWS_Os_00811], even though the signature contains a parameter ClearPending. Later versions describe clearing as optional SWS OS p. 177.

Coordination Across Cores and Partitions

Spinlocks operate across core boundaries. GetSpinlock busy-waits without unscheduling the caller and can be called at task and Category 2 ISR level SWS OS p. 115. In Extended Status, it detects two deadlock cases [SWS_Os_00686]:

  • E_OS_INTERFERENCE_DEADLOCK: A task on the same core already holds the lock.
  • E_OS_NESTING_DEADLOCK: Nesting with another held spinlock is not allowed.

TryToGetSpinlock returns when a task on another core occupies the lock. It then returns E_OK with TRYTOGETSPINLOCK_NOSUCCESS [SWS_Os_00703], [SWS_Os_00792]. Before terminating a task and before WaitEvent, all spinlocks must be released in the correct order [SWS_Os_00695]. Enclosing with SuspendAllInterrupts or the setting OsSpinlockLockMethod helps against interference SWS OS p. 101.

ActivateTask across core boundaries operates synchronously. The error handler runs on the calling core SWS OS p. 103. In contrast, ActivateTaskAsyn and SetEventAsyn do not return any errors to the caller, but only report them to the global error hook [SWS_Os_00816], [SWS_Os_00817]. Both exist only in systems with OS-Applications [SWS_Os_00818], [SWS_Os_00819]. If the caller no longer exists, the notification is omitted SWS OS p. 179.

The IOC generates its functions per sender and receiver:

If the buffer is full, the sender reports IOC_E_LIMIT, and the receiver receives IOC_E_LOST_DATA on the next read SWS OS p. 219. IocInit and the separate generation of OS and IOC code still have the status DRAFT in R20-11 [SWS_Os_00835], [SWS_Os_00831], [SWS_Os_00834].

Behavior in the event of an error

Many checks, such as for E_OS_ID, are performed only in Extended Status. Pointer arguments are checked there for NULL_PTR and rejected with E_OS_ILLEGAL_ADDRESS SWS OS p. 38. Additional error identifiers such as E_OS_PROTECTION_MEMORY and E_OS_STACKFAULT are defined centrally [SWS_Os_91025]. If a service does not return E_OK, the OS calls the ErrorHook and the ErrorHook_<App> SWS OS p. 186, [SWS_Os_00540].

In the event of severe errors, the OS calls the ProtectionHook. Its ProtectionReturnType determines the further reaction [SWS_Os_00538], [SWS_Os_00787]. If no ProtectionHook is configured, the OS calls ShutdownOS EXP ALEH p. 60. When terminating an OS-Application, the OS stops all associated objects SWS OS p. 62:

  • all tasks and ISRs,
  • their interrupts,
  • their alarms,
  • their schedule tables.
Reaction to a protection violation via the ProtectionHooktask / category 2 ISR of the OS-Application <App>ProzessorBetriebssystemUse Case: SchutzverletzungExecution with protection violation«Exception»ProtectionHook(Fatalerror)altPRO_TERMINATETASKISRforced termination of the task / ISRPRO_TERMINATEAPPLforced termination of the OS-ApplicationPRO_TERMINATEAPPL_RESTARTforced termination of the OS-Application,Restart-Task startenPRO_IGNORENo further actionPRO_SHUTDOWNShutdownOS()

Sequence diagram: The return value of the ProtectionHook selects between ignoring, terminating the task/ISR, terminating the OS-Application (with or without restart), and shutdown. Sources: SWS OS p. 187, [SWS_Os_00538], [SWS_Os_00787]

An OS-Application is APPLICATION_ACCESSIBLE, APPLICATION_RESTARTING, or APPLICATION_TERMINATED. The state is returned by GetApplicationState [SWS_Os_00773], [SWS_Os_00499]. In R20-11, TerminateApplication accepts RESTART or NO_RESTART [SWS_Os_00258], [SWS_Os_00788]. Later versions ignore this parameter SWS OS p. 194.

In the RESTARTING state, only the OSRestartTask runs; other OS-Applications have no access. An OS-Application leaves the state APPLICATION_TERMINATED only via a reset of the ECU EXP ALEH p. 53. If necessary, the OSRestartTask cleans up via CallTrustedFunction and then releases the OS-Application again with AllowAccess EXP ALEH p. 76, [SWS_Os_00501]. The integrator provides the code for the ECU-wide ProtectionHook and the restart task EXP ALEH p. 79.

OsApplication start Start ACC APPLICATION_ACCESSIBLE start->ACC StartOS (before the first StartupHook) RES APPLICATION_RESTARTING ACC->RES PRO_TERMINATEAPPL_RESTART or TerminateApplication(AppID, RESTART) TER APPLICATION_TERMINATED ACC->TER PRO_TERMINATEAPPL or TerminateApplication(AppID, NO_RESTART) RES->ACC AllowAccess() (from the restart task) RES->TER TerminateApplication(self, NO_RESTART)

State diagram: StartOS makes each OS-Application accessible; protection reactions or TerminateApplication lead into RESTARTING or TERMINATED, only AllowAccess leads back. Sources: EXP ALEH p. 61, [SWS_Os_00773], [SWS_Os_00501]

Further detailed evidence

AI-generated guide based on the requirements and document locations contained in the payload; the requirements of release R20-11 are normative, deviations in later versions are identified.

AUTOSAR OS

Real-time operating system managing priority-based preemptive task scheduling, events, alarms, and schedule tables (OSEK/VDX derivative).

Funktionen — Übersicht

Typen — Übersicht

Funktionen & Typen — Detailansicht

function GetApplication [SWS_Os_00016] 📄 PDF

ApplicationType GetApplicationID (void);

This service determines the OS - Application (a unique identifier has to be allocated to each application) where the caller originally belongs to (was configured t o).

function GetCurrentApplication [SWS_Os_00797] 📄 PDF

ApplicationType GetCurrentApplicationID (void);

This service determines the OS - Application where the caller of the service is currently executing. Note that if the caller is not within a Call Trusted Function() call the value is eq ual to the result of Get Application ID().

function CallTrustedFunction [SWS_Os_00097] 📄 PDF

StatusType CallTrustedFunction (TrustedFunctionIndexType FunctionIndex, TrustedFunctionParameterRefType FunctionParams);

A (trusted or non - trusted) OS - Application uses this service to call a trusted function

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

Via the system service CallTrustedFunction (service ID 0x02), a trusted or non-trusted OS-Application can call a defined trusted function for execution [SWS_Os_00097]. The interface is provided via the header Os.h [SWS_Os_00097].

The call requires passing two input parameters [SWS_Os_00097]:

  • FunctionIndex (type TrustedFunctionIndexType): Designates the index of the function to be called [SWS_Os_00097].
  • FunctionParams (type TrustedFunctionParameterRefType): Passes a pointer to the parameters of the target function; if no arguments are required, a NULL pointer must be passed [SWS_Os_00097].

With regard to timing behavior, execution depends on the target routine: If the called function is synchronous, the service behaves synchronously as well [SWS_Os_00097]. The function is implemented reentrantly, but may cause rescheduling of the operating system during execution [SWS_Os_00097].

As return value, the service provides a status value of type StatusType [SWS_Os_00097]:

  • E_OK: Execution was successful and error-free [SWS_Os_00097].
  • E_OS_SERVICEID: No valid function is assigned to the passed index [SWS_Os_00097].

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

Implementer's Guide to follow (complexity I2)

function CheckISRMemoryAccess [SWS_Os_00512] 📄 PDF

AccessType CheckISRMemoryAccess (ISRType ISRID, MemoryStartAddressType Address, MemorySizeType Size);

This service checks if a memory region is write/ read/ execute accessible and also returns information if the memory region is part of the stack space.

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

The function CheckISRMemoryAccess is a synchronous and reentrant system service of the OS module ([SWS_Os_00512]). It serves to check the memory access rights of a specified ISR for a specific memory area at runtime.

Usage and Parameters

The call of CheckISRMemoryAccess expects three input parameters ([SWS_Os_00512]):

  • ISRID: Reference to the ISR to be checked (ISRType).
  • Address: Start address of the memory area to be examined (MemoryStartAddressType).
  • Size: Size of the memory area (MemorySizeType).

As return value, the service provides the type AccessType. This return value contains the access rights (read, write, execute) to the specified area and additionally indicates whether the memory area is part of the stack area ([SWS_Os_00512]).

Concurrency and Integration

According to the specification, the function has the service ID 0x03 and is declared as reentrant ([SWS_Os_00512]). It is available via header Os.h ([SWS_Os_00512]). Specific error codes or explicit feedback to DET/DEM are not listed in the present specification excerpt.

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

Implementer's Guide to follow (complexity I2)

function CheckTaskMemoryAccess [SWS_Os_00513] 📄 PDF

AccessType CheckTaskMemoryAccess (TaskType TaskID, MemoryStartAddressType Address, MemorySizeType Size);

This service checks if a memory region is write/ read/ execu te accessible and also returns information if the memory region is part of the stack space.

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

The function CheckTaskMemoryAccess represents a synchronous service of the operating system that is provided via the header Os.h and has the service ID 0x04 [SWS_Os_00513]. It serves to query the memory access rights of a specific task for a particular memory segment [SWS_Os_00513].

Parameters and Return Values

When called, the service accepts three input parameters [SWS_Os_00513]:

  • Task ID (of type TaskType): Reference to the task whose access rights are to be checked.
  • Address (of type MemoryStartAddressType): The start address of the memory area to be checked.
  • Size (of type MemorySizeType): The size of the memory area to be checked.

As a return value, the service returns a variable of type AccessType [SWS_Os_00513]. This return value contains information as to whether the specified memory area is accessible to the task with write, read, or execute permissions, and additionally indicates whether the area is part of the stack area [SWS_Os_00513]. Additional error codes or DET notifications are not specified for this service.

Concurrency and Interaction

The service is specified as reentrant and can therefore be used safely in concurrent execution contexts [SWS_Os_00513]. While CheckTaskMemoryAccess queries the permissions for memory areas at runtime, the AUTOSAR standard defines interfaces and data structures in ARTI module descriptions through which debugging tools can acquire and evaluate states and attributes of operating system objects [SWS_Os_00829].

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

Implementer's Guide to follow (complexity I2)

function CheckObjectAccess [SWS_Os_00256] 📄 PDF

ObjectAccessType CheckObjectAccess (ApplicationType ApplID, ObjectTypeType ObjectType, void ...);

This service determines if the OS - Applications, given by Appl ID, is allowed to use the IDs of a Task, Resource, Counter, Alarm or Schedule Table in API calls.

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

Usage and Semantics

The function CheckObjectAccess ([SWS_Os_00256]) synchronously determines whether a specific OS-Application has the authorization to use the ID of an operating system object in API calls. The input parameter ApplID of type ApplicationType ([SWS_Os_00256]) serves to identify the application. ObjectType (type ObjectTypeType) defines which type of object is to be checked; Task, Resource, Counter, Alarm, and Schedule Table are supported ([SWS_Os_00256]). The third parameter is the object to be examined itself via the variable parameter list ... ([SWS_Os_00256]).

As a return value, the function provides the type ObjectAccessType: If access by the application to the object is permitted, ACCESS is returned, otherwise NO_ACCESS ([SWS_Os_00256]). The service is declared via the header Os.h and has the service ID 0x05 ([SWS_Os_00256]).

Concurrency, Error Handling, and Interaction

The service is specified as reentrant and can therefore be called in concurrent execution contexts ([SWS_Os_00256]). Specific error codes, return values for error states, or notifications to DET or DEM are not provided for this function in the specification ([SWS_Os_00256]).

Interpretation: The variable argument ... is likely to pass the concrete identifier of the object matching ObjectType in the implementation. Question Q-5cb52ff94bb07826 (open) The checked operating system objects are also reflected in the ARTI debugging information, which captures and evaluates attributes and states of operating system objects ([SWS_Os_00829]).

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

Implementer's Guide to follow (complexity I1)

function CheckObjectOwnership [SWS_Os_00017] 📄 PDF

ApplicationType CheckObjectOwnership (ObjectTypeType ObjectType, void ...);

This service determines to which OS - Application a given Task, ISR, Counter, Alarm or Schedule Table belongs

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

use

The synchronous system function CheckObjectOwnership serves to determine which OS-Application a specific operating system object belongs to [SWS_Os_00017]. Objects queryable via this service include tasks, interrupt service routines (ISRs), counters, alarms, and schedule tables [SWS_Os_00017].

The function is available via the header file Os.h and has the service ID 0x06 [SWS_Os_00017]. When used, the function accepts two input parameters:

  • ObjectType: As an input parameter of type ObjectTypeType, identifies the type of the subsequently passed operating system object [SWS_Os_00017].
  • ...: Passes the concrete object to be examined to the service [SWS_Os_00017].

As a return value, the function provides the data type ApplicationType [SWS_Os_00017]. This contains the identifier of the OS-Application to which the checked object is assigned [SWS_Os_00017].

Error Handling and Execution Properties

If the queried object does not exist in the system, the service returns the return value INVALID_OSAPPLICATION [SWS_Os_00017].

With regard to concurrency behavior, CheckObjectOwnership is specified as reentrant and operates completely synchronously [SWS_Os_00017]. Input and output parameters (inout or out) do not exist besides the return value [SWS_Os_00017].

This usage note is based on the specification SWS_Os_00017 from AUTOSAR Classic R20-11.

Implementer's Guide to follow (complexity I1)

function StartScheduleTableRel [SWS_Os_00347] 📄 PDF

StatusType StartScheduleTableRel (ScheduleTableType ScheduleTableID, TickType Offset);

This service starts the processing of a schedule table at "Offset" relative to the "Now" value on the underlying counter.

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

Usage and Parameters

The system service StartScheduleTableRel starts the processing of a schedule table relative to the current counter value (\"Now\") of the underlying counter [SWS_Os_00347]. The call is executed synchronously and is available via interface Os.h with service ID 0x07 [SWS_Os_00347].

  • ScheduleTableID (input, ScheduleTableType): Identifier of the schedule table to be started [SWS_Os_00347].
  • Offset (input, TickType): Relative number of counter ticks on the counter before processing of the table begins [SWS_Os_00347].

Return Values and Error Handling

The function returns a status code of type StatusType [SWS_Os_00347]:

  • E_OK: The schedule table was started without error [SWS_Os_00347].
  • E_OS_STATE: The specified schedule table has already been started [SWS_Os_00347].
  • E_OS_ID (only with status EXTENDED): The specified ScheduleTableID is invalid [SWS_Os_00347].
  • E_OS_VALUE (only with status EXTENDED): The parameter Offset is equal to 0 or exceeds the value (OsCounterMaxAllowedValue - InitialOffset) [SWS_Os_00347].

Concurrency and Limitations

The function is specified as reentrant [SWS_Os_00347]. No output or input/output parameters exist [SWS_Os_00347].

This usage note is based on the AUTOSAR CP R20-11 specification.

Implementer's Guide to follow (complexity I2)

function StartScheduleTableAbs [SWS_Os_00358] 📄 PDF

StatusType StartScheduleTableAbs (ScheduleTableType ScheduleTableID, TickType Start);

This service starts the processing o f a schedule table at an absolute value "Start" on the underlying counter.

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

The synchronous and reentrant function StartScheduleTableAbs serves to start a Schedule Table at a specified absolute counter value on the underlying counter ([SWS_Os_00358]). The service is available via header Os.h and is identified via service ID 0x08 ([SWS_Os_00358]).

Two input parameters are passed upon the call ([SWS_Os_00358]):

  • ScheduleTableID: Identifier of the Schedule Table to be started.
  • Start: Absolute counter tick value at which the Schedule Table is started.

As return value, the function provides the status of type StatusType ([SWS_Os_00358]):

  • E_OK: The start operation was successful.
  • E_OS_STATE: The specified Schedule Table was already started previously.
  • E_OS_ID: The passed ScheduleTableID is invalid (only returned in status EXTENDED).
  • E_OS_VALUE: The value of Start exceeds the maximum permitted counter value OsCounterMaxAllowedValue (only returned in status EXTENDED).

Regarding interaction, the state and dynamic attributes of operating system objects such as Schedule Tables can be evaluated and displayed by connected debugging tools via ARTI module descriptions ([SWS_Os_00829]). Interpretation: The call context is likely to comprise primarily task levels, since no explicit restriction is stated in the specification excerpt. Question Q-213de28d0345ccb1 (open)

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

Implementer's Guide to follow (complexity I2)

function StopScheduleTable [SWS_Os_00006] 📄 PDF

StatusType StopScheduleTable (ScheduleTableType ScheduleTableID);

This service cancels the processing of a schedule table immediately at any point while the schedule table is running.

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

The synchronous system function StopScheduleTable ([SWS_Os_00006]) immediately aborts the processing of a running schedule table at any processing point. The service is declared in header Os.h and has the service ID 0x09 ([SWS_Os_00006]). The only input parameter is ScheduleTableID of type ScheduleTableType, which specifies the schedule table to be stopped; input/output or pure output parameters do not exist ([SWS_Os_00006]).

The synchronous call provides a status code of type StatusType as return value ([SWS_Os_00006]):

  • E_OK: Processing of the schedule table was stopped without error ([SWS_Os_00006]).
  • E_OS_NOFUNC: The specified schedule table was already in the stopped state ([SWS_Os_00006]).
  • E_OS_ID: The passed identifier ScheduleTableID is invalid. According to the specification, this return value is only generated in status EXTENDED ([SWS_Os_00006]).

The function is defined as reentrant ([SWS_Os_00006]). Interpretation: Given the declared reentrancy, the synchronous call is likely permissible from multiple OS contexts, although specific context restrictions are missing in the present specification excerpt. Question Q-9cb147c4bc7dba7e (open) For runtime monitoring, the state and dynamic attributes of OS objects such as schedule tables can be transmitted to connected debugging and analysis tools via ARTI description files ([SWS_Os_00829]).

Note: This explanation was generated automatically based on the specification of AUTOSAR Classic Release R20-11.

Implementer's Guide to follow (complexity I2)

function NextScheduleTable [SWS_Os_00191] 📄 PDF

StatusType NextScheduleTable (ScheduleTableType ScheduleTableID_From, ScheduleTableType ScheduleTableID_To);

This service switches the processing from one schedule table to another schedule table.

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

The function NextScheduleTable serves to synchronously switch processing from a running schedule table to a next schedule table [SWS_Os_00191]. The service is designed to be reentrant and is declared via header Os.h [SWS_Os_00191].

Parameters and Call

Two input parameters of type ScheduleTableType are passed to the call [SWS_Os_00191]:

  • ScheduleTableID_From: Identifier of the currently processed schedule table [SWS_Os_00191].
  • ScheduleTableID_To: Identifier of the schedule table that provides the subsequent sequence of expiry points [SWS_Os_00191].

Return Values and Error Handling

The function returns a status value of type StatusType [SWS_Os_00191]:

  • E_OK: The switch request was issued without error [SWS_Os_00191].
  • E_OS_ID: Returned exclusively when EXTENDED status is configured, if at least one of the passed table identifiers is invalid [SWS_Os_00191].
  • E_OS_NOFUNC: The source table ScheduleTableID_From is not in the started state [SWS_Os_00191].
  • E_OS_STATE: The target table ScheduleTableID_To is already actively started or already marked as next schedule table [SWS_Os_00191].

Interaction and Diagnosis

For observation and analysis of the operating system, ARTI module descriptions support corresponding ORTI containers, allowing debugging tools to evaluate and display, among other things, dynamic states of operating system objects [SWS_Os_00829].

This text was generated automatically. All information is based exclusively on the specifications of AUTOSAR Release R20-11.

Implementer's Guide to follow (complexity I2)

function StartScheduleTableSynchron [SWS_Os_00201] 📄 PDF

StatusType StartScheduleTableSynchron (ScheduleTableType ScheduleTableID);

This service starts an explicitly synchronized schedule table synchronously.

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

use

The system service StartScheduleTableSynchron serves to synchronously start an explicitly synchronized schedule table [SWS_Os_00201]. The function is declared in header file Os.h and has the service ID 0x0b [SWS_Os_00201]. As its only passed parameter, the function expects the input parameter ScheduleTableID of type ScheduleTableType, which uniquely references the table to be started [SWS_Os_00201]. Input/output or pure output parameters are not present [SWS_Os_00201]. Processing is synchronous and returns a return value of type StatusType [SWS_Os_00201].

Error handling

In the error-free execution flow, the function call returns the status code E_OK [SWS_Os_00201]. In the event of errors, the following return values are specified:

  • E_OS_STATE: The specified schedule table is already in the started state and cannot be synchronously started again [SWS_Os_00201].
  • E_OS_ID: The passed ScheduleTableID is invalid [SWS_Os_00201]. This error check and error message is active exclusively in EXTENDED status [SWS_Os_00201].

Concurrency and Limitations

The function is specified as reentrant [SWS_Os_00201]. Since repeated calls for an already active table are rejected with E_OS_STATE, the caller must ensure that the target table is not already running prior to the call [SWS_Os_00201].

Interaction

State transitions and dynamic properties of operating system objects can be tracked for test and diagnostic tools via ARTI module description files and ORTI containers [SWS_Os_00829]. External debuggers use these descriptions to evaluate the internal status of OS objects at runtime [SWS_Os_00829].

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

Implementer's Guide to follow (complexity I2)

function SyncScheduleTable [SWS_Os_00199] 📄 PDF

StatusType SyncScheduleTable (ScheduleTableType ScheduleTableID, TickType Value);

Service SyncScheduleTable.

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

The synchronous and reentrant operating system service SyncScheduleTable serves to pass a counter value to a schedule table and start the synchronization process ([SWS_Os_00199]). The function is provided via header file Os.h ([SWS_Os_00199]).

Parameters and Return Values

The function expects two input parameters ([SWS_Os_00199]):

  • Schedule Table ID: Identifier of the schedule table to be synchronized of type ScheduleTableType ([SWS_Os_00199]).
  • Value: Current counter value of the synchronization counter of type TickType ([SWS_Os_00199]).

The return value of type StatusType indicates error-free execution with E_OK ([SWS_Os_00199]).

Error Handling and Boundary Conditions

If the table is in state SCHEDULETABLE_STOPPED at the time of the call, the error E_OS_STATE is returned ([SWS_Os_00199]). If the operating system is configured in EXTENDED status, further checks take effect ([SWS_Os_00199]):

  • E_OS_ID: The specified table ID is invalid, or the table cannot be synchronized because Os Schedule Tbl Sync Strategy is unconfigured or set to IMPLICIT ([SWS_Os_00199]).
  • E_OS_VALUE: The passed counter value Value is outside the permitted range ([SWS_Os_00199]).

Interaction and Diagnosis

States and dynamic attributes of operating system objects such as schedule tables can be evaluated by connected debugging and diagnostic tools via ARTI module descriptions and ORTI containers ([SWS_Os_00829]).

This text was generated by an AI based on AUTOSAR R20-11.

Implementer's Guide to follow (complexity I2)

function SetScheduletableAsync [SWS_Os_00422] 📄 PDF

StatusType SetScheduletableAsync (ScheduleTableType ScheduleTableID);

This service stops synchronization of a schedule table.

function GetScheduleTableStatusof [SWS_Os_00227] 📄 PDF

StatusType GetScheduleTableStatus (ScheduleTableType ScheduleTableID, ScheduleTableStatusRefType ScheduleStatus);

This service queries the state of a schedule table (also with respect to synchronization).

function IncrementCounter [SWS_Os_00399] 📄 PDF

StatusType IncrementCounter (CounterType CounterID);

This service increments a software counter.

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

use

The synchronous operating system function IncrementCounter serves to explicitly advance a software counter [SWS_Os_00399]. It expects the identifier CounterID of type CounterType as an input parameter, modifies no further parameters, and is available via the header Os.h [SWS_Os_00399]. It must be noted that the call can cause an immediate rescheduling of the operating system [SWS_Os_00399].

Error handling

The return value of type StatusType provides information about the success of the operation: In normal operation, E_OK reports error-free execution [SWS_Os_00399]. When extended status checking (EXTENDED status) is activated, the service returns E_OS_ID if an invalid counter ID was specified or if the referenced counter is implemented in hardware and therefore cannot be incremented by software [SWS_Os_00399].

Concurrency and Diagnostics

The function is designed as reentrant and may thus be called concurrently [SWS_Os_00399]. Possible rescheduling is likely to Interpretation: occur when advancing the counter triggers dependent actions such as alarm expiries or task activations. Question Q-9004b5ced9b96230 (open) For observing operating system objects such as counters as well as their dynamic state, ARTI module descriptions support connected analysis tools during runtime monitoring [SWS_Os_00829].

This usage note was generated automatically and is based on the specifications of the AUTOSAR release R20-11.

Implementer's Guide to follow (complexity I2)

function GetCounterValue [SWS_Os_00383] 📄 PDF

StatusType GetCounterValue (CounterType CounterID, TickRefType Value);

This service reads the current count value of a counte r (returning either the hardware timer ticks if counter is driven by hardware or the software ticks when user drives counter).

function GetElapsedValue [SWS_Os_00392] 📄 PDF

StatusType GetElapsedValue (CounterType CounterID, TickRefType Value, TickRefType ElapsedValue);

This service gets the number of ticks between the current tick value and a previously read tick value.

function TerminateApplication [SWS_Os_00258] 📄 PDF

StatusType TerminateApplication (ApplicationType Application, RestartType RestartOption);

Service TerminateApplication.

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

The synchronous and reentrant function TerminateApplication serves to terminate an OS-Application and is available via header file Os.h [SWS_Os_00258]. The call is permitted from the context of a task, a category 2 ISR, as well as an application-specific error hook [SWS_Os_00258].

The identifier of the target application (Application) and the restart behavior (Restart Option) are passed as input parameters [SWS_Os_00258]:

  • If the caller itself belongs to the application specified in Application, the execution leads to self-termination [SWS_Os_00258].
  • Via Restart Option, it is defined whether the OS-Application is to be restarted subsequently (RESTART) or not (NO_RESTART) [SWS_Os_00258].

The function returns a status value of type StatusType [SWS_Os_00258]:

  • E_OK indicates error-free termination [SWS_Os_00258].
  • E_OS_STATE indicates that the current state of Application does not allow termination [SWS_Os_00258].
  • In EXTENDED status, additional error checks are performed: E_OS_ID for an invalid application ID, E_OS_VALUE for an invalid parameter value for Restart Option, and E_OS_ACCESS if the caller lacks permission to terminate Application [SWS_Os_00258].

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

Implementer's Guide to follow (complexity I2)

function AllowAccess [SWS_Os_00501] 📄 PDF

StatusType AllowAccess (void);

This service sets the own state of an OS - Application from AP PLICATION_ RESTARTING to APPLICATION_ ACCESSIBLE.

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

use

The synchronous system service AllowAccess (service ID 0x13) serves to set the state of the caller's own OS-Application from APPLICATION_RESTARTING to APPLICATION_ACCESSIBLE ([SWS_Os_00501]). The function is available via the header file Os.h, expects no parameters, and returns a status value of type StatusType ([SWS_Os_00501]). Upon successful execution of the state change, the call returns the return value E_OK ([SWS_Os_00501]).

Error Handling and Concurrency

If the calling OS-Application is not in the state APPLICATION_RESTARTING, execution fails and the function returns the error value E_OS_STATE ([SWS_Os_00501]). Specific DET or DEM notifications are not defined in the specification for this service. With regard to concurrency behavior, the function is classified as reentrant and can therefore be executed safely in parallel sequences ([SWS_Os_00501]).

Interaction and Diagnosis

Interpretation: The call is likely to take place typically at the end of an application's restart phase, as soon as all preparations are completed and other applications are permitted to access the resources again. Question Q-f43a3f702d5d2428 (open) Within the scope of system diagnostics, the dynamic states of the operating system and the associated OS objects can be evaluated and visualized via standardized ARTI description files and associated debug tools ([SWS_Os_00829]).

This text was created by an AI and is based on specification status R20-11.

Implementer's Guide to follow (complexity I1)

function GetNumberActivatedCores [SWS_Os_00672] 📄 PDF

uint32 GetNumberOfActivatedCores (void);

The function returns the number of cores activated by the Start Core function. This function might be a macro. AUTOSAR CP R20 - o f Document ID : AUTOSAR_SWS_OS

function StartCore [SWS_Os_00676] 📄 PDF

void StartCore (CoreIdType CoreID, StatusType* Status);

It is not supported to call this function after Start OS(). The function starts the core specified by the parameter Core ID. The OUT parameter allows the caller to check whether the operation was successful or no t. If a core is started by means of this function Start OS shall be called on the core.

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

The synchronous function StartCore starts the processor core specified via parameter Core ID [SWS_Os_00676]. The function has no direct return value, but instead passes the result of the execution to the caller via the OUT parameter Status [SWS_Os_00676]. If a core was started using this function, Start OS must subsequently be called on the core concerned [SWS_Os_00676].

Fixed restrictions apply to the call context and concurrency: StartCore is specified as non-reentrant (Non Reentrant) [SWS_Os_00676]. A call after starting the operating system via Start OS() is not supported [SWS_Os_00676]. The service is implemented synchronously and is provided via header file Os.h with service ID 0x17 [SWS_Os_00676].

Error handling is performed via parameter Status, which can take the following values depending on the status configuration [SWS_Os_00676]:

  • In standard status, E_OK indicates error-free execution [SWS_Os_00676].
  • In extended status (extended status), E_OK likewise confirms a successful start [SWS_Os_00676].
  • E_OS_ID reports that the passed Core ID is invalid [SWS_Os_00676].
  • E_OS_ACCESS indicates an impermissible call after the start of the operating system [SWS_Os_00676].
  • E_OS_STATE indicates that the requested processor core is already activated [SWS_Os_00676].

This usage note was generated by an AI and relies exclusively on the specification of the AUTOSAR Classic operating system from Release R20-11.

Implementer's Guide to follow (complexity I2)

function StartNonCore [SWS_Os_00682] 📄 PDF

void StartNonAutosarCore (CoreIdType CoreID, StatusType* Status);

The function start s the core specified by the parameter Core ID. It is allowed to call this function after Start OS(). The OUT parameter allows the caller to check whether the operation was successful or not. It is not allowed to call Start OS on cores activated by Start No n Autosar Core. Otherwise the behaviour is unspecified.

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

Usage and Call Context

The synchronous and non-reentrant function StartNonCore starts the processor core specified via the parameter CoreID [SWS_Os_00682]. It may be called after the start of the operating system via StartOS() and is available via the header file Os.h [SWS_Os_00682]. Via the output parameter Status, the caller can check whether the startup procedure was successful [SWS_Os_00682].

Error Handling and Status Values

The function has no direct return value, but reports the result of the execution back via the pointer parameter Status [SWS_Os_00682]:

  • E_OK: The operation was executed successfully and without error [SWS_Os_00682].
  • E_OS_ID: The specified CoreID is invalid (in standard status) [SWS_Os_00682].
  • E_OS_STATE: The specified processor core is already activated (in standard status) [SWS_Os_00682].

Restrictions and Sequence Conditions

As a non-reentrant interface, StartNonCore must not be executed concurrently [SWS_Os_00682]. In addition, there is a strict requirement that StartOS must under no circumstances be called on processor cores that have been activated via this function; otherwise, system behavior is unspecified [SWS_Os_00682].

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

Implementer's Guide to follow (complexity I1)

function GetSpinlock [SWS_Os_00686] 📄 PDF

StatusType GetSpinlock (SpinlockIdType SpinlockId);

Get Spinlock tries to occupy a spin - lock variable. If the function returns, either the lock is successfully taken or an error has occurred. The spinlock mechanism is an active polling mechanism. The function does not cause a de - scheduling.

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

The synchronous and reentrant operating system function GetSpinlock ([SWS_Os_00686]) serves to occupy a spinlock variable via the passed parameter SpinlockId (type SpinlockIdType). During execution, the function uses an active polling mechanism (\"busy waiting\") without triggering de-scheduling of the calling task ([SWS_Os_00686]).

The function returns only after the lock has been successfully acquired or an error has occurred. As return value, GetSpinlock provides the StatusType ([SWS_Os_00686]):

  • E_OK: The lock was occupied without error (in standard and extended status).
  • E_OS_ID: The passed SpinlockId is invalid (only in extended status).
  • E_OS_INTERFERENCE_DEADLOCK: A task attempts to occupy the spinlock while it is already occupied by a task on the same Core (only in Extended status).
  • E_OS_NESTING_DEADLOCK: A task attempts to request the spinlock while a task of the same core already holds another spinlock, which could cause a deadlock (only in extended status).
  • E_OS_ACCESS: The specified spinlock cannot be accessed (only in extended status).

In the context of system monitoring and error analysis, the operating system provides dynamic status information about OS objects, which, according to [SWS_Os_00829], can be evaluated for debug tools via ARTI and ORTI containers; spinlock blocking situations can presumably also be traced in this way. Question Q-bac194d4132f6e88 (open)

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

Implementer's Guide to follow (complexity I2)

function ReleaseSpinlock [SWS_Os_00695] 📄 PDF

StatusType ReleaseSpinlock (SpinlockIdType SpinlockId);

Release Spinlock releases a spinlock variable that was occupied before. Before terminating a TASK all spinlock variables that have been occupied with Get Spinlock() shall be released. Before calling Wait EVENT all Spinlocks shall be released.

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

The synchronous and reentrant function ReleaseSpinlock releases a previously occupied spinlock variable ([SWS_Os_00695]). The spinlock instance to be released is specified via the input parameter SpinlockId of type SpinlockIdType ([SWS_Os_00695]).

Sequence Conditions and Restrictions

Strict timing and structural requirements apply to the call ([SWS_Os_00695]):

  • Before terminating a task, all spinlock variables previously occupied using GetSpinlock() must be released again ([SWS_Os_00695]).
  • Before calling WaitEvent, all held spinlocks must be released without exception ([SWS_Os_00695]).
  • The release must take place in the correct nesting order; an attempt to release while superior spinlocks or resources are still occupied fails ([SWS_Os_00695]).

Return Values and Error Handling

In case of success, the service returns E_OK in both standard and extended status ([SWS_Os_00695]). In extended status, specific error codes are defined ([SWS_Os_00695]):

  • E_OS_ID: The passed SpinlockId is invalid ([SWS_Os_00695]).
  • E_OS_STATE: The spinlock is not occupied by the calling task ([SWS_Os_00695]).
  • E_OS_ACCESS: The spinlock cannot be accessed ([SWS_Os_00695]).
  • E_OS_NOFUNC: Attempt to release the spinlock while another spinlock or resource must still be released first ([SWS_Os_00695]).

The function is available via the header Os.h ([SWS_Os_00695]). ARTI description files support ORTI containers for the dynamic status and performance evaluation of operating system objects ([SWS_Os_00829]).

This text was created by an AI and curated by autodocs.

Implementer's Guide to follow (complexity I2)

function TryToGetSpinlock [SWS_Os_00703] 📄 PDF

StatusType TryToGetSpinlock (SpinlockIdType SpinlockId, TryToGetSpinlockType* Success);

Try To Get Spinlock has the same functionality as Get Spinlock with the difference that if the spinlock is already occupied by a TASK on a d ifferent core the function sets the OUT parameter "Success" and returns with E_ OK.

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

The synchronous and reentrant operating system function TryToGetSpinlock serves to occupy a spinlock instance non-blockingly via the header Os.h [SWS_Os_00703]. It provides the same basic functionality as GetSpinlock, but does not busy-wait if the requested spinlock is already occupied by a TASK on another Core [SWS_Os_00703].

Parameters and Return Values

  • SpinlockId (input): References the specific spinlock instance to be locked [SWS_Os_00703].
  • Success (output): Indicates via type TryToGetSpinlockType* whether the lock could be occupied or not [SWS_Os_00703]. If the lock is occupied on another Core, the function sets this parameter accordingly and returns with E_OK [SWS_Os_00703].
  • Return value: Returns E_OK in standard and extended status if no error is present [SWS_Os_00703].

Error Handling and Boundary Conditions

In extended status, the operating system checks for invalid calls and deadlock scenarios [SWS_Os_00703]:

  • E_OS_ID: The passed SpinlockId is invalid [SWS_Os_00703].
  • E_OS_ACCESS: The spinlock cannot be accessed [SWS_Os_00703].
  • E_OS_INTERFERENCE_DEADLOCK: A TASK attempts to occupy the lock while the same lock is already held by a TASK on the same Core [SWS_Os_00703].
  • E_OS_NESTING_DEADLOCK: A TASK attempts to occupy a spinlock while already holding another spinlock, which could lead to a deadlock [SWS_Os_00703].

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

Implementer's Guide to follow (complexity I2)

function ShutdownAllCores [SWS_Os_00713] 📄 PDF

void ShutdownAllCores (StatusType Error);

After this service the OS on all AUTOSAR cores is shut down. Allowed at TASK level and ISR level and also internally by the OS. The function will never return. The function will force other cores into a shutdown.

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

The synchronous system function ShutdownAllCores with the service ID 0x1c serves the controlled and complete shutdown of the AUTOSAR operating system across all available processor cores ([SWS_Os_00713]). As soon as the service is called, the function forces a shutdown on all other Cores, so that the operating system is shut down on all AUTOSAR cores ([SWS_Os_00713]).

Call Context and Concurrency

The function is declared in the header Os.h and specified as reentrant ([SWS_Os_00713]). Calling ShutdownAllCores is unrestricted and permitted both at task level (TASK level) and at interrupt level (ISR level) ([SWS_Os_00713]). In addition, the service can also be executed internally by the operating system directly through the AUTOSAR OS ([SWS_Os_00713]).

Parameters and Control Flow

The interface expects Error of type StatusType as its only input parameter ([SWS_Os_00713]). A valid error code supported by the AUTOSAR operating system must mandatory be passed for this parameter ([SWS_Os_00713]). Output or input/output parameters do not exist ([SWS_Os_00713]). Since the function never returns to the caller after triggering the system-wide shutdown, it has no return value (void) ([SWS_Os_00713]).

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

Implementer's Guide to follow (complexity I2)

function ControlIdle [SWS_Os_00769] 📄 PDF

StatusType ControlIdle (CoreIdType CoreID, IdleModeType IdleMode);

This API allows the caller to select the idle mode action which is performed during idle time of t he OS (e.g. if no Task/ ISR is active). It can be used to implement energy savings. The real idle modes are hardware dependent and not standardized. The default idle mode on each core is IDLE_ NO_ HALT.

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

The synchronous function ControlIdle allows the caller to define the action that is executed during the idle time of the operating system (when neither a task nor an ISR is active) [SWS_Os_00769]. This primarily serves to implement energy saving measures. The actual idle modes are hardware-dependent and not standardized; the default mode on each processor core is IDLE_NO_HALT [SWS_Os_00769]. The interface is provided via the header file Os.h [SWS_Os_00769].

The function expects two input parameters:

  • CoreID (of type CoreIdType): Selects the processor core whose idle mode is to be set [SWS_Os_00769].
  • IdleMode (of type IdleModeType): Determines the mode to be executed during the idle time [SWS_Os_00769].

If valid parameters were passed and no error occurred, the function returns E_OK [SWS_Os_00769], [SWS_Os_00770]. If the specified CoreID or IdleMode is invalid—for example because the referenced core does not exist or the mode is unknown—the call in the EXTENDED status returns the error code E_OS_ID [SWS_Os_00769], [SWS_Os_00771]. On single-core systems, the check of parameter CoreID is omitted [SWS_Os_00771].

Regarding concurrency, the function is specified as non-reentrant (Non Reentrant) [SWS_Os_00769]. Interpretation: Callers must therefore ensure that calls to ControlIdle do not occur simultaneously or uncoordinated from different execution contexts. Question Q-7f239cb54752e826 (open)

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

Implementer's Guide to follow (complexity I1)

function ReadPeripheral [SWS_Os_91013] 📄 PDF

StatusType ReadPeripheral8 (AreaIdType Area, const uint8* Address, uint8* ReadValue);

This service returns the content of a given memory location (

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

use

The function ReadPeripheral (listed in the declaration as ReadPeripheral8) serves to synchronously read out a memory address within a defined hardware peripheral area [SWS_Os_91013]. The interface is available via the header file Os.h [SWS_Os_91013]. As input parameters, the service expects the area reference Area of type AreaIdType and the destination address Address as a pointer to const uint8 [SWS_Os_91013]. The read content of the memory location is provided via the output parameter ReadValue [SWS_Os_91013].

Error handling

The service returns a status code of type StatusType, where E_OK indicates error-free execution [SWS_Os_91013]. When extended status checking (EXTENDED status) is activated, erroneous calls are differentiated on the basis of specific error values [SWS_Os_91013]:

Concurrency and Limitations

The API service has the service ID 0x28, operates synchronously, and is designed to be reentrant [SWS_Os_91013]. Calls are only permitted from permissible task or ISR contexts; inadmissible calls are rejected in extended status with E_OS_CALLEVEL [SWS_Os_91013].

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

Implementer's Guide to follow (complexity I1)

function ReadPeripheral16 [SWS_Os_91015] 📄 PDF

StatusType ReadPeripheral16 (AreaIdType Area, const uint16* Address, uint16* ReadValue);

This service returns the content of a given memory location (

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

The synchronous and reentrant operating system function ReadPeripheral16 serves to read the 16-bit value of a specified memory address within a defined peripheral area [SWS_Os_91015]. The system service is defined under service ID 0x29 and available via the header file Os.h [SWS_Os_91015].

Usage and Parameters

The reference to the hardware peripheral area (Area of type AreaIdType) as well as the target address in memory (Address of type const uint16*) are passed to the service as input parameters [SWS_Os_91015]. The 16-bit content determined at the memory address is provided via the output parameter Read Value of pointer type uint16* [SWS_Os_91015]. Upon error-free execution, the function returns the return value E_OK of type StatusType [SWS_Os_91015].

Error Handling and Access Restrictions

In EXTENDED status, the operating system checks the validity of the call and reports errors via specific status codes [SWS_Os_91015]:

  • E_OS_ID: The passed area identifier Area lies outside the valid range [SWS_Os_91015].
  • E_OS_VALUE: The specified memory address Address does not belong to the specified peripheral area Area [SWS_Os_91015].
  • E_OS_CALLEVEL: The call was made from a context not permitted for the API function [SWS_Os_91015].
  • E_OS_ACCESS: The calling task or interrupt service routine (ISR) is not authorized to access the specified area [SWS_Os_91015].

This usage note was generated automatically and is based exclusively on the specifications of AUTOSAR Classic R20-11.

Implementer's Guide to follow (complexity I1)

function ReadPeripheral32 [SWS_Os_91014] 📄 PDF

StatusType ReadPeripheral32 (AreaIdType Area, const uint32* Address, uint32* ReadValue);

This service returns the content of a given memory location (

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

use

The synchronous and reentrant function ReadPeripheral32 reads the content of a specified memory address ([SWS_Os_91014]). The caller passes the reference to the hardware peripheral area via the parameter Area and the desired memory address via Address ([SWS_Os_91014]). The 32-bit value read at this address is provided synchronously via the output parameter ReadValue ([SWS_Os_91014]). The interface is made available via the header Os.h ([SWS_Os_91014]).

Error handling

The service returns a status value of type StatusType. Upon error-free execution, it returns E_OK ([SWS_Os_91014]). If the extended status is configured (EXTENDED status), the following error codes are returned ([SWS_Os_91014]):

  • E_OS_ID: The passed area identifier Area is outside the valid range ([SWS_Os_91014]).
  • E_OS_VALUE: The specified address Address does not belong to the specified area Area ([SWS_Os_91014]).
  • E_OS_CALLEVEL: The function was called from an invalid call context ([SWS_Os_91014]).
  • E_OS_ACCESS: The calling task or calling ISR does not have the required access permission; according to interpretation, this likely refers to the peripheral area ([SWS_Os_91014]). Question Q-e5893b29acc5133a (open)

Concurrency and Limitations

ReadPeripheral32 is specified as reentrant and can be called in parallel by multiple control flows ([SWS_Os_91014]). Since the service operates synchronously, the call only returns after the read operation is complete ([SWS_Os_91014]). Callers must pass valid memory pointers and ensure that the call originates from a context permitted for the OS API ([SWS_Os_91014]).

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

Implementer's Guide to follow (complexity I1)

function WritePeripheral [SWS_Os_91010] 📄 PDF

StatusType WritePeripheral8 (AreaIdType Area, uint8* Address, uint8 WriteValue);

This service writes the to a given memory location (). Available vi a Os.h

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

use

The function WritePeripheral (also referred to in the specification as Write Peripheral8) is a synchronous and reentrant service of the operating system to write a value to a specified memory address of a peripheral area [SWS_Os_91010]. The declaration is provided via the header file Os.h [SWS_Os_91010]. The call expects as parameters the reference to the hardware peripheral area (Area of type AreaIdType), the memory address (Address of type uint8*), and the value to be written (Write Value of type uint8) [SWS_Os_91010]. Interpretation: Although Write Value is listed in tabular form among the output parameters in the specification text, based on the pass-by-value in the signature and the description it is likely the input value to be written. Question Q-619c69ba7a85ed92 (open)

Error handling

The function returns a status of type StatusType [SWS_Os_91010]:

  • E_OK: The write operation was performed without error [SWS_Os_91010].
  • E_OS_ID: The passed area ID is outside the valid range (in extended status) [SWS_Os_91010].
  • E_OS_VALUE: The target address does not belong to the specified area (in extended status) [SWS_Os_91010].
  • E_OS_CALLEVEL: Invalid call context of the API function (in extended status) [SWS_Os_91010].
  • E_OS_ACCESS: The calling task or ISR does not have access permission for the area [SWS_Os_91010].

Concurrency and Limitations

The call is processed synchronously and is reentrant [SWS_Os_91010]. Callers must ensure that the executing task or ISR acts from a valid context and has the necessary access rights for the addressed peripheral area [SWS_Os_91010].

This text was generated automatically. All information is based on the referenced AUTOSAR specifications.

Implementer's Guide to follow (complexity I1)

function WritePeripheral16 [SWS_Os_91012] 📄 PDF

StatusType WritePeripheral16 (AreaIdType Area, uint16* Address, uint16 WriteValue);

This service writes the to a given memory location (). Available vi a Os.h

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

The synchronous and reentrant operating system function WritePeripheral16 ([SWS_Os_91012]) serves to write a 16-bit value to a memory address of a peripheral area. The service is provided via the header Os.h and has the service ID 0x2c.

Usage and Parameters

When calling WritePeripheral16, the caller passes the identifier of the target hardware area (Area of type AreaIdType), the destination address (Address of type uint16*), and the value to be written (Write Value of type uint16, which, despite being designated in tabular form as an out parameter in the signature, presumably serves as pass-by-value) according to [SWS_Os_91012]. Question Q-2edc50ae2e7fd0b0 (open) The service is executed synchronously and returns a status value of type StatusType.

Error handling

In case of success, the function returns E_OK. Under status EXTENDED, the following error codes are specified ([SWS_Os_91012]):

  • E_OS_ID: The passed area identifier (Area) lies outside the valid range.
  • E_OS_VALUE: The destination address (Address) does not belong to the specified peripheral area.
  • E_OS_CALLEVEL: The function was called from an inadmissible context.
  • E_OS_ACCESS: The calling task or ISR presumably does not possess permission to access the specified area. Question (open)

Restrictions and Interaction

The function is reentrant ([SWS_Os_91012]), but requires compliance with the permissible call context (task or ISR) to avoid error states such as E_OS_CALLEVEL. For monitoring and analyzing operating system objects, AUTOSAR provides for the provisioning of ARTI description files ([SWS_Os_00829]).

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

Implementer's Guide to follow (complexity I1)

function WritePeripheral32 [SWS_Os_91011] 📄 PDF

StatusType WritePeripheral32 (AreaIdType Area, uint32* Address, uint32 WriteValue);

This service writes the to a given memory location ().

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

The synchronous and reentrant function WritePeripheral32 from module Os serves to write a 32-bit value to a specified memory address of a peripheral area [SWS_Os_91011]. The service is available via the header Os.h and has the service ID 0x2d [SWS_Os_91011].

Parameters and Call

To execute the write access, the function requires three input parameters [SWS_Os_91011]:

  • Area (AreaIdType): Reference to the target hardware peripheral area [SWS_Os_91011].
  • Address (uint32*): Memory address to which the value is to be written [SWS_Os_91011].
  • Write Value (uint32): The concrete 32-bit value that is transferred to the destination address [SWS_Os_91011].

Return Values and Error Handling

The call returns a status value of type StatusType [SWS_Os_91011]. In the event of success, E_OK is reported [SWS_Os_91011]. When EXTENDED status is active, E_OS_ID signals an invalid area ID, E_OS_VALUE an address not belonging to the area, and E_OS_CALLEVEL an inadmissible call context [SWS_Os_91011]. If the calling task or ISR does not possess access permission for the area, E_OS_ACCESS is returned [SWS_Os_91011].

Concurrency

Since WritePeripheral32 is reentrant, the service can be used in concurrent execution contexts provided that the respective caller possesses the required access permission at runtime [SWS_Os_91011].

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

Implementer's Guide to follow (complexity I1)

function ModifyPeripheral [SWS_Os_91016] 📄 PDF

StatusType ModifyPeripheral8 (AreaIdType Area, uint8* Address, uint8 Clearmask, uint8 Setmask);

This service modifies a given memory location () with the formula: *

= ((*
& ) | )

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

Usage and Semantics

The synchronous and reentrant operating system function ModifyPeripheral8 ([SWS_Os_91016]) modifies a byte at a specified memory address Address. In doing so, the existing memory content is updated bitwise via the mask Clearmask by AND operation and via the mask Setmask by OR operation according to the formula *Address = ((*Address & Clearmask) | Setmask) ([SWS_Os_91016]). As input parameters, the function expects the peripheral area reference Area of type AreaIdType, the target address Address (type uint8*), and the two mask values of type uint8. The function is provided via the header file Os.h and has the service ID 0x2e ([SWS_Os_91016]).

Error Handling and Return Values

The return value of type StatusType indicates the success of the operation with E_OK ([SWS_Os_91016]). When extended status is enabled, specific error conditions can occur:

  • E_OS_ID: The passed area identifier Area is outside the valid range ([SWS_Os_91016]).
  • E_OS_VALUE: The target address Address does not belong to the specified area Area ([SWS_Os_91016]).
  • E_OS_CALLEVEL: The service was called from an invalid call context ([SWS_Os_91016]).
  • E_OS_ACCESS: The calling task or ISR has no access permission for the target area ([SWS_Os_91016]).

Concurrency and call conditions

Since ModifyPeripheral8 is specified as reentrant, the call can be made safely in parallel executions ([SWS_Os_91016]). Callers must ensure that both the context and the access rights for Area and Address are valid in order to avoid error states ([SWS_Os_91016]).

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

Implementer's Guide to follow (complexity I1)

function ModifyPeripheral16 [SWS_Os_91018] 📄 PDF

StatusType ModifyPeripheral16 (AreaIdType Area, uint16* Address, uint16 Clearmask, uint16 Setmask);

This service modifies a given memory location () with the formula: *

= ((*
& ) | )

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

The synchronous and reentrant function ModifyPeripheral16 modifies a 16-bit memory location within a defined peripheral area according to the calculation formula *Address = ((*Address & Clearmask) | Setmask) [SWS_Os_91018]. The peripheral area reference Area (type AreaIdType), the target address Address (type uint16*), and the bitmasks Clearmask for a bitwise AND and Setmask for a bitwise OR are passed as parameters [SWS_Os_91018]. The declaration is available via the header Os.h [SWS_Os_91018].

In the regular success case, the service returns the return value E_OK [SWS_Os_91018]. When extended status checking (EXTENDED status) is activated, erroneous calls are detected and rejected based on specific error codes [SWS_Os_91018]:

  • E_OS_ID: The passed area identifier Area is outside the valid value range [SWS_Os_91018].
  • E_OS_VALUE: The passed memory address Address does not belong to the specified area Area [SWS_Os_91018].
  • E_OS_CALLEVEL: The service was called from an invalid context [SWS_Os_91018].
  • E_OS_ACCESS: The calling task or calling ISR does not have access permission for the specified area [SWS_Os_91018].

Prior to execution, callers must ensure that both the context and the permissions for the referenced area are present in order to avoid access violations [SWS_Os_91018].

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

Implementer's Guide to follow (complexity I1)

function ModifyPeripheral32 [SWS_Os_91017] 📄 PDF

StatusType ModifyPeripheral32 (AreaIdType Area, uint32* Address, uint32 Clearmask, uint32 Setmask);

This service modifies a given memory location () with the formula: *

= ((*
& ) | )

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

The synchronous and reentrant operating system function ModifyPeripheral32 serves, according to [SWS_Os_91017], for the targeted bitwise manipulation of a 32-bit memory address. Provided via the interface Os.h, the function applies the fixed calculation formula *Address = ((*Address & Clearmask) | Setmask) to the target address Address. In this process, bits are first reset via the bitmask Clearmask using an AND operation and subsequently set via Setmask using an OR operation.

As input parameters, the service expects the peripheral area reference Area, the address pointer Address, and the two 32-bit masks [SWS_Os_91017]. Upon error-free execution, the status code E_OK is returned. In EXTENDED status, the function performs plausibility checks and reports the following error codes:

Concurrent calls are permitted thanks to reentrancy, provided that the call context is maintained [SWS_Os_91017]. In the overall system, this direct register modification differs from calculation formulas for dynamic data determination that are evaluated, for example, within the scope of ARTI debug information according to [SWS_Os_00829].

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

Implementer's Guide to follow (complexity I1)

function EnableInterruptSource [SWS_Os_91020] 📄 PDF

StatusType EnableInterruptSource (ISRType ISRID, boolean ClearPending);

Service EnableInterruptSource.

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

The synchronous and reentrant system function EnableInterruptSource enables an interrupt source by modifying the registers of the interrupt controller [SWS_Os_91020], [SWS_Os_00811]. The operating system provides this service for each configured category 2 interrupt source [SWS_Os_00808].

Parameters and Call

The identifier of the category 2 ISR is passed via the parameter ISRID [SWS_Os_91020]. The boolean parameter ClearPending determines whether a pending interrupt flag is to be cleared upon activation (TRUE) or remains unchanged (FALSE) [SWS_Os_91020], [SWS_Os_00811]. The function is available via the header file Os.h [SWS_Os_91020].

Error Handling and Return Values

If no error is detected, the call returns E_OK [SWS_Os_91020], [SWS_Os_00810]. If the operating system detects an error, it returns the corresponding status code of type StatusType and calls the ErrorHook() [SWS_Os_00810]. The following error states are defined:

  • E_OS_ID: The parameter ISRID is not a valid identifier of a category 2 ISR (in status EXTENDED) [SWS_Os_91020].
  • E_OS_CALLEVEL: The function was called from an invalid call context (in status EXTENDED) [SWS_Os_91020].
  • E_OS_ACCESS: Within the scope of service protection, the calling application does not own the specified ISRID [SWS_Os_91020].

Interaction

Together with DisableInterruptSource and ClearPendingInterrupt, the function forms the API trio for the targeted control of individual category 2 interrupt sources (OsIsrCategory == CATEGORY_2) in the operating system [SWS_Os_00808], [SWS_Os_00810].

This text was generated automatically based on the specifications of Release R20-11.

Implementer's Guide to follow (complexity I2)

function DisableInterruptSource [SWS_Os_91019] 📄 PDF

StatusType DisableInterruptSource (ISRType ISRID);

Disables the interrupt source by modifying the interrupt controller registers.

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

use

The synchronous and reentrant function DisableInterruptSource disables a specific interrupt source directly via the registers of the interrupt controller [SWS_Os_91019], [SWS_Os_00812]. It is available via the header file Os.h and is provided for each category 2 interrupt source (OsIsrCategory == CATEGORY_2) [SWS_Os_91019], [SWS_Os_00808]. The identifier of the relevant ISR (ISRID) is passed as a parameter. Upon successful execution, the service returns E_OK [SWS_Os_91019], [SWS_Os_00810].

Error handling

If the operating system detects an error during execution, the corresponding StatusType is returned and the ErrorHook() is called [SWS_Os_00810]. Possible error codes are:

  • E_OS_ID: The passed ISRID is not a valid identifier of a category 2 ISR (in EXTENDED status) [SWS_Os_91019].
  • E_OS_CALLEVEL: Invalid call context of the API function (in EXTENDED status) [SWS_Os_91019].
  • E_OS_ACCESS: The calling OS-Application does not own the specified ISR (service protection) [SWS_Os_91019].
  • E_OS_NOFUNC: The requested interrupt source is already disabled (in EXTENDED status with nested calls) [SWS_Os_00809].

Interaction and Boundary Conditions

Together with EnableInterruptSource and ClearPendingInterrupt, the function forms the API trio for controlling category 2 interrupt sources [SWS_Os_00808]. Concurrent or repeated calls are secured in the extended status by returning E_OS_NOFUNC, whereby redundant disablements remain controllable [SWS_Os_00809]. Callers must also have the appropriate access rights to prevent runtime errors caused by service protection [SWS_Os_91019].

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

Implementer's Guide to follow (complexity I1)

function ClearPendingInterrupt [SWS_Os_91021] 📄 PDF

StatusType ClearPendingInterrupt (ISRType ISRID);

Service ClearPendingInterrupt.

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

Usage and Call Context

The function ClearPendingInterrupt serves to clear a pending interrupt for category 2 sources [SWS_Os_00808]. It takes the identifier ISRID of a category 2 ISR as its only input parameter and directly modifies the associated registers of the interrupt controller [SWS_Os_91021], [SWS_Os_00813]. The call is processed synchronously and is available via the header file Os.h [SWS_Os_91021].

Error Handling and Return Values

In the error-free case, the status code E_OK is returned [SWS_Os_91021]. If the operating system detects an error during execution, the service returns the corresponding error code of type StatusType and mandatorily calls the ErrorHook() [SWS_Os_00810]. The following error states are specified for the interface [SWS_Os_91021]:

  • E_OS_ID: The passed parameter ISRID is not a valid identifier of a category 2 ISR (returned in status EXTENDED) [SWS_Os_91021].
  • E_OS_CALLEVEL: The function was called from an invalid call context (returned in status EXTENDED) [SWS_Os_91021].
  • E_OS_ACCESS: Within the scope of service protection, the calling application is not authorized as the owner of the passed ISR [SWS_Os_91021].

Concurrency and interaction in the operating system

The interface is defined as reentrant and can thus be called safely concurrently [SWS_Os_91021]. The operating system provides ClearPendingInterrupt for each category 2 interrupt source (OsIsrCategory == CATEGORY_2) as an integral part of the control APIs, which also include DisableInterruptSource and EnableInterruptSource [SWS_Os_00808].

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

Implementer's Guide to follow (complexity I2)

function ActivateTaskAsyn [SWS_Os_91022] 📄 PDF

void ActivateTaskAsyn (TaskType id);

Asynchronous version of the Activate Task() function. Intended to be used for cross core task activation. Possible errors are not returned to the caller, but may be reported via error hooks.

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

The function ActivateTaskAsyn (service ID 0x33) represents the asynchronous variant for task activation and is provided via the header file Os.h ([SWS_Os_91022]). It is primarily intended for cross-core task activation in multicore systems ([SWS_Os_91022]).

id of type TaskType is passed as the only input parameter, specifying the task to be activated ([SWS_Os_91022]). The interface has no return value (void) and defines neither input/output nor pure output parameters ([SWS_Os_91022]).

Possible errors during activation are not reported back to the caller ([SWS_Os_91022], [SWS_Os_00816]). Instead, occurring errors are reported exclusively via the global error hook, provided that one is configured ([SWS_Os_00816]).

With regard to concurrency, the function is reentrant and operates completely asynchronously ([SWS_Os_91022]), whereby the calling context does not block on execution. The operating system is required to provide this interface in accordance with [SWS_Os_00816].

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

Implementer's Guide to follow (complexity I1)

function SetEventAsyn [SWS_Os_91023] 📄 PDF

void SetEventAsyn (TaskType id, EventMaskType m);

Asynchronous version of the Set Event() function. Intended to be used for cross core event setting. Possible errors are not returned to the caller, but may be reported via error hooks.

function Ioc [SWS_Os_91026] 📄 PDF

void IocInit (void);

This service initializes the data structures of the IOC. Tags: atp.Status=draft

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

Usage and Operation

The function Ioc Init (marked as draft in release R20-11) initializes the internal data structures of the Inter-OS-Application Communication (IOC) [SWS_Os_91026]. The call is synchronous, accepts no input parameters, and has no return value [SWS_Os_91026]. If the operating system generator is executed in "IOC mode", it exclusively generates the IOC code in the source file Ioc.c and declares the associated interfaces in the header file Ioc.h [SWS_Os_00834], through which Ioc Init is also provided [SWS_Os_91026].

Error Handling and Concurrency

For Ioc Init, the specification defines neither specific error return values nor error notifications to DET or DEM [SWS_Os_91026]. The service is explicitly defined as non-reentrant (Non Reentrant) [SWS_Os_91026]. Interpretation: Due to the lack of reentrancy and its initialization task, the service likely has to be called sequentially during the system startup phase before concurrent communication accesses take place. Question Q-47f99a4725b57c89 (open)

Interplay with IOC Communication Functions

Proper initialization of the data structures is the prerequisite for using the generated IOC communication interfaces:

  • Sending and writing: Senders transmit data asynchronously via single-value services such as Ioc Send [SWS_Os_00718] and Ioc Write [SWS_Os_91003] or group functions such as Ioc Send Group [SWS_Os_00728] and Ioc Write Group [SWS_Os_91004].
  • Receiving and reading: Receivers retrieve data synchronously via Ioc Receive [SWS_Os_00738], Ioc Read [SWS_Os_91005], or corresponding group services [SWS_Os_00746] [SWS_Os_91006].
  • Queue management and notification: If buffered communication is configured, the contents of an internal queue can be emptied synchronously with Ioc Empty Queue [SWS_Os_00754]. Additionally, upon data reception, a configured receiver callback <Receiver Pull CB> can be executed on the target core [SWS_Os_00757].

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

Implementer's Guide to follow (complexity I1)

function <ReceiverPullCB> [SWS_Os_00757] 📄 PDF

void <ReceiverPullCB> (void);

This callback function can be configured for the receiver of a communication. If configured, IOC calls this callback on the receiving core for each data reception. is the callback function name configured by the receiver in the Os Ioc Re ceiver Pull CB attribute to be called on data reception."

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

The callback function <Receiver Pull CB> can optionally be configured for the receiver of a communication and is declared via the header Os.h [SWS_Os_00757]. If this callback is configured, the IOC (Inter-OS-Application Communicator) calls the function synchronously on the receiving Core upon each data reception [SWS_Os_00757]. The specific identifier of the callback function is defined on the receiver side via the configuration attribute OsIocReceiverPullCB [SWS_Os_00757].

The following specifications apply to the call and interface properties:

  • Signature and parameters: The function has the prototype void <Receiver Pull CB> ( void ); it takes no parameters (neither input, in-out, nor output parameters) and returns no value [SWS_Os_00757].
  • Synchronicity and reentrancy: The call by the IOC takes place with synchronous semantics directly on the receiver Core [SWS_Os_00757]. In addition, the callback function is specified as reentrant [SWS_Os_00757].
  • Error handling: The specification provides neither return values nor specific error codes or error notifications for this function [SWS_Os_00757].

Since the signature does not pass any payload data, the call is likely to serve primarily as a notification signal to inform the receiver about the arrival of new data and trigger the subsequent retrieval of the payload data. Question Q-2365bb46ad77a476 (open) Developers should note that execution occurs synchronously on the receiver Core [SWS_Os_00757].

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

function ProtectionHook [SWS_Os_00538] 📄 PDF

ProtectionReturnType ProtectionHook (StatusType Fatalerror);

The protection hook is always called if a serious error occurs. E.g. exceeding the worst case execution time or violating against the memory protection.

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

The function ProtectionHook serves as a central callback of the operating system and is always called synchronously when a fatal error occurs [SWS_Os_00538]. As typical error scenarios, the specification explicitly cites exceeding the worst-case execution time (Worst Case Execution Time) as well as memory protection violations [SWS_Os_00538]. The declaration of the interface is provided via header Os_Externals.h [SWS_Os_00538].

As input parameter, the routine accepts Fatalerror of type StatusType, which passes the triggering cause of the hook call [SWS_Os_00538]. Additional input/output parameters or pure output parameters are not defined in the signature [SWS_Os_00538].

Via the return value of type ProtectionReturnType, ProtectionHook bindingly determines which action the operating system shall initiate for further error handling after execution of the hook [SWS_Os_00538]. The following actions are available as return values [SWS_Os_00538]:

With respect to concurrency and execution behavior, ProtectionHook is specified as reentrant and synchronous [SWS_Os_00538]. The call occurs immediately upon occurrence of the fatal error, whereupon the operating system executes the defined action [SWS_Os_00538].

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

Implementer's Guide to follow (complexity I2)

type AppModeType [SWS_Os_91007] 📄 PDF

App Mode of the core shall be inherited from another core.

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

The enumeration type AppModeType is defined in the header file Os.h and is used to define the application mode in the operating system [SWS_Os_91007]. In multi-core systems, this type allows the application mode of a processor core to be inherited from another Core [SWS_Os_91007].

The value DONOTCARE is specified for the range of values [SWS_Os_91007]. Interpretation: This value is likely intended to explicitly configure a Core so that it does not start an independent mode, but instead adopts the behavior of the parent Core. Question Q-2b7d9f1c8e5f1a3f (open) Specific error codes or return values are not defined for the type itself.

With regard to diagnostics and system state, the interaction with analysis tools is relevant. According to [SWS_Os_00829], the ARTI module description file must support all ORTI containers in order to enable connected debug tools to evaluate and display information about the operating system and its objects. The ARTI debug information provides dynamic attributes that are resolved via formulas [SWS_Os_00829]. Interpretation: The state of the application mode is therefore likely mapped and read at the tool level via corresponding ARTI object attributes. Question Q-410d011cbcf1b158 (open)

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

Implementer's Guide to follow (complexity I1)

type ApplicationStateType [SWS_Os_00773] 📄 PDF

This data type identifies the state of an OS - Application. AUTOSAR CP R20 - o f Document ID : AUTOSAR_SWS_OS

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

The data type ApplicationStateType is used in the Classic AUTOSAR operating system for uniquely identifying the state of an OS-Application [SWS_Os_00773]. It is specified as a scalar base type and is provided via the header file Os.h [SWS_Os_00773].

The permissible value range of ApplicationStateType comprises three discrete states for an OS-Application [SWS_Os_00773]:

  • APPLICATION_ACCESSIBLE: Indicates that the OS-Application is ready for operation and its resources can be accessed [SWS_Os_00773].
  • APPLICATION_RESTARTING: Signals that the OS-Application is currently in a restart phase [SWS_Os_00773].
  • APPLICATION_TERMINATED: Indicates that the OS-Application has been terminated and performs no further actions [SWS_Os_00773].

Regarding usage and interaction with other components, the type is presumably likely to serve as a return value or output parameter in corresponding OS system services for state monitoring to inform callers about the current lifecycle status of an application. Question Q-9a4f2254f4013853 (open) Since it is an elementary type definition, the standard specifies no dedicated error codes, DET or DEM messages for it, and formulates no separate restrictions regarding call context or reentrancy [SWS_Os_00773].

This text was created by an AI and is based on AUTOSAR R20-11 specification data.

Implementer's Guide to follow (complexity I1)

type ApplicationStateRefType [SWS_Os_00774] 📄 PDF

This data type points to location where a Application State Type can be stored.

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

The data type ApplicationStateRefType is part of the operating system (module Os) in the AUTOSAR Classic Platform and is made available via the header file Os.h [SWS_Os_00774]. The type is derived from a pointer and points directly to a memory location where a state of an OS application (Application State) can be stored [SWS_Os_00774].

With regard to practical usage, this pointer type serves to reference application states: Interpretation: As a pointer type, ApplicationStateRefType is likely primarily used as a reference or output parameter in operating system query functions via which the state of an OS application is conveyed to the caller. Question Q-948bb914d3672a38 (open) Callers must therefore ensure that a valid, writable memory area is reserved for the destination state prior to parameter passing in order to avoid erroneous pointer accesses at runtime.

Specific error handling mechanisms, error codes for DET or DEM, as well as separate requirements for reentrancy and concurrency are not designated separately for this base type in the specification [SWS_Os_00774]. Any restrictions regarding the permitted call context or synchronization duties to be observed arise exclusively from those operating system interfaces that use this type in their function signatures.

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

Implementer's Guide to follow (complexity I1)

type TrustedFunctionParameterRefType [SWS_Os_00776] 📄 PDF

This data type points to a structure which holds the arguments for a call to a trusted function.

type AccessType [SWS_Os_00777] 📄 PDF

This type holds information how a specific memory region can be accessed.

type ObjectAccessType [SWS_Os_00778] 📄 PDF

This data type identifies if an OS - Application has access to an object.

type MemoryStartAddressType [SWS_Os_00780] 📄 PDF

This data type is a pointer which is able to point to any location in the MCU address space.

type ScheduleTableStatusType [SWS_Os_00784] 📄 PDF

This type describes the status of a schedule. The status can be one of the following: o The schedule table is not started (SCHEDULETABLE_ STOPPED) o The schedule table will be started after the end of currently running schedule table (sched ule table was used in Next Schedule Table() service) (SCHEDULETABLE_ NEXT) o The schedule table uses explicit synchronization, has been started and is waiting for the global time. (SCHEDULETABLE_ WAITING) o The schedule table is running, but is currently n ot synchronous to a global time source (SCHEDULETABLE_ RUNNING) o The schedule table is running and is synchronous to a global time source (SCHEDULETABLE_ RUNNING_ AND_ SYNCHRONOUS)

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

According to [SWS_Os_00784], the type ScheduleTableStatusType maps the current execution and synchronization status of a schedule table in the AUTOSAR operating system. It is provided via the header file Os.h and is based on an implementation-specific range of values.

The following status values are specified:

  • SCHEDULETABLE_STOPPED: The schedule table is not started.
  • SCHEDULETABLE_NEXT: The schedule table is started after expiry of the currently active schedule table (Interpretation: this occurs after handover to the service NextScheduleTable()). Question Q-8cbcfc83969eea23 (open)
  • SCHEDULETABLE_WAITING: The schedule table uses explicit synchronization, has already been started, and is waiting for synchronization with the global time.
  • SCHEDULETABLE_RUNNING: The schedule table is running, but is currently not synchronous with a global time source.
  • SCHEDULETABLE_RUNNING_AND_SYNCHRONOUS: The schedule table is running and is synchronized with the global time source.

As a pure status data type, ScheduleTableStatusType defines no runtime errors or DET/DEM notifications of its own. In interaction with analysis tools, the type serves according to [SWS_Os_00829] for the ARTI-supported evaluation and display of dynamic operating system objects, allowing state and synchronization deviations in the system to be captured transparently.

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

Implementer's Guide to follow (complexity I1)

type ScheduleTableStatusRefType [SWS_Os_00785] 📄 PDF

This data type points to a variable of the data type Schedule Table Status Type.

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

Usage and definition

According to [SWS_Os_00785], the data type ScheduleTableStatusRefType is defined as a pointer type to a variable of the data type Schedule Table Status Type. The type is provided via the header Os.h and serves in the AUTOSAR operating system as a reference type for the status of a schedule table [SWS_Os_00785].

Usage and Boundary Conditions

In typical operating system calls, this pointer type is likely to act as an output parameter via which an OS system function reports the current state of the referenced schedule table back to the caller. Question Q-53364f3a9953dae3 (open) Because the specification merely defines the type definition, calling components must observe the following when using it:

  • Memory provisioning: Before passing a reference of this type, the caller must ensure that the pointer points to a valid and writable memory area that remains valid throughout the entire call.
  • Validity and null pointer: Passing a null pointer (NULL) is likely to result in corresponding error responses from the called OS services, depending on the operating system configuration (Standard or Extended status). Question Q-63d77f8c7857e6c4 (open)
  • Memory protection: In safety-critical multicore or memory-protected OS environments, the referenced memory area must be accessible to the calling task or OS instance.

Since [SWS_Os_00785] designates no further runtime properties or specific error codes for the base type, reentrancy and call context result from the respective OS services that use this pointer type as a parameter.

This usage note was created automatically and is based exclusively on the specification data from release R20-11.

Implementer's Guide to follow (complexity I1)

type ProtectionReturnType [SWS_Os_00787] 📄 PDF

This data type identifies a value which controls further actions of the OS on return from the protection hook.

type RestartType [SWS_Os_00788] 📄 PDF

This data type defines the use of a Restart Task after terminating an OS - Application.

type PhysicalTimeType [SWS_Os_00789] 📄 PDF

This data type is used for values returned by the conversion macro (see SWS_ Os_00393) OS_ TICKS2_(). AUTOSAR CP R20 - o f Document ID : AUTOSAR_SWS_OS

type CoreIdType [SWS_Os_00790] 📄 PDF

Core Id Type is a scalar that allows identifying a single core. The Core Id Type shall represent t he logical Core ID

type SpinlockIdType [SWS_Os_00791] 📄 PDF

Spinlock Id Type identifies a spinlock instance and is used by the API functions: Get Spinlock, Release Spinlock and Try To Get Spinlock.

type TryToGetSpinlockType [SWS_Os_00792] 📄 PDF

The Try To Get Spinlock Type indicates if the spinlock has been occupied or not.

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

Usage and Value Range

The enumeration type TryToGetSpinlockType is provided via the header file Os.h and serves as a status indicator of whether a spinlock could be successfully occupied by the caller or not [SWS_Os_00792]. It defines the result of corresponding occupation operations in the operating system [SWS_Os_00792].

The value range comprises exactly two specified literals [SWS_Os_00792]:

  • TRYTOGETSPINLOCK_SUCCESS: Signals that the spinlock could be successfully occupied [SWS_Os_00792].
  • TRYTOGETSPINLOCK_NOSUCCESS: Indicates that the spinlock could not be occupied [SWS_Os_00792].

Concurrency and System Context

The type is used for synchronization in multi-core systems. Interpretation: The caller is likely to evaluate the return value synchronously to determine immediately whether the protected critical section may be entered or whether an alternative program branch must be chosen in the case of TRYTOGETSPINLOCK_NOSUCCESS without blocking wait [SWS_Os_00792]. Question Q-a04e72802dc41325 (open) Dedicated error codes or error messages via DET or DEM are not specified for this type [SWS_Os_00792].

Interaction with Diagnostic Tools

In the context of tool connections, the ARTI module description file supports all ORTI containers to display information about the operating system, its states, and operating system objects and to determine dynamic values [SWS_Os_00829]. Interpretation: Spinlocks and their occupation states are also likely to be visualizable for debugging and tracing tools via such interfaces [SWS_Os_00829]. Question Q-a488e055eb7d402e (open)

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

Implementer's Guide to follow (complexity I1)

type IdleModeType [SWS_Os_00793] 📄 PDF

This data type identifies the idle mode behavior.

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

Usage and Value Range

The scalar data type IdleModeType is provided via the header Os.h and serves to specify the behavior of a processor core in idle mode [SWS_Os_00793]. In the defined value range, the mode IDLE_NO_HALT is established, upon selection of which the processor core performs no special actions during idle time [SWS_Os_00793].

Interpretation: Since IdleModeType is derived from a scalar base type, it is likely to serve in the operating system context as a configuration value or call parameter for control services of the core idle behavior. Question Q-911a39efb537f1bc (open) Interpretation: In addition to the standard value IDLE_NO_HALT, concrete operating system implementations or microcontroller architectures are likely to potentially provide additional halt or power-saving modes, even though the specification excerpt merely mentions the absence of specific actions. Question Q-b6688f74cacbab45 (open)

Restrictions and Error Handling

For IdleModeType, no specific error codes, DET or DEM notifications, or requirements regarding reentrancy or call contexts are identified in the present scope of the specification [SWS_Os_00793]. Any functional restrictions or preconditions therefore result exclusively from the higher-level operating system interfaces that process this type.

This text was generated by an AI on the basis of specification SWS_Os_00793.

Implementer's Guide to follow (complexity I1)

type AreaIdType [SWS_Os_91000] 📄 PDF

Area Id Type identifies a peripheral area and is used by the API functions: Read Peripheral X, Write Peripheral X and Modify Peripheral X AUTOSAR CP R20 - o f Document ID : AUTOSAR_SWS_OS

type StatusType [SWS_Os_00002] 📄 PDF

typedef uint8 StatusType;

This data type represents standard OSEK OS status codes (e.g. E_OK, E_OS_ACCESS).

Implementer's Guide to follow (complexity I2)

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

Record
AUTOSAR/AP/record/CP_MOD_Os
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_Os@rel:R20-11#8230d301
Content hash
8230d301
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_OS.pdf#nameddest=SWS_Os_00016

Topic map

Detail view

Select an entry in the outline.

Services · Get…

This service determines the OS - Application (a unique identifier has to be allocated to each application) where the caller originally belongs to (was configured t o).

ApplicationType GetApplicationID (void);

This service returns the current state of an OS - Application.

StatusType GetApplicationState (ApplicationType Application, ApplicationStateRefType Value);
GetCoreID function

The function returns a unique core identifier.

CoreIdType GetCoreID (void);

This service reads the current count value of a counte r (returning either the hardware timer ticks if counter is driven by hardware or the software ticks when user drives counter).

StatusType GetCounterValue (CounterType CounterID, TickRefType Value);

This service determines the OS - Application where the caller of the service is currently executing. Note that if the caller is not within a Call Trusted Function() call the value is eq ual to the result of Get Application ID().

ApplicationType GetCurrentApplicationID (void);

This service gets the number of ticks between the current tick value and a previously read tick value.

StatusType GetElapsedValue (CounterType CounterID, TickRefType Value, TickRefType ElapsedValue);
GetISRID function

This service returns the identifier of the currently executing ISR.

ISRType GetISRID (void);

The function returns the number of cores activated by the Start Core function. This function might be a macro. AUTOSAR CP R20 - o f Document ID : AUTOSAR_SWS_OS

uint32 GetNumberOfActivatedCores (void);

This service queries the state of a schedule table (also with respect to synchronization).

StatusType GetScheduleTableStatus (ScheduleTableType ScheduleTableID, ScheduleTableStatusRefType ScheduleStatus);
GetSpinlock function

Get Spinlock tries to occupy a spin - lock variable. If the function returns, either the lock is successfully taken or an error has occurred. The spinlock mechanism is an active polling mechanism. The function does not cause a de - scheduling.

StatusType GetSpinlock (SpinlockIdType SpinlockId);

Services · Start…

StartCore function

It is not supported to call this function after Start OS(). The function starts the core specified by the parameter Core ID. The OUT parameter allows the caller to check whether the operation was successful or no t. If a core is started by means of this function Start OS shall be called on the core.

void StartCore (CoreIdType CoreID, StatusType* Status);

The function start s the core specified by the parameter Core ID. It is allowed to call this function after Start OS(). The OUT parameter allows the caller to check whether the operation was successful or not. It is not allowed to call Start OS on cores activated by Start No n Autosar Core. Otherwise the behaviour is unspecified.

void StartNonAutosarCore (CoreIdType CoreID, StatusType* Status);

This service starts the processing o f a schedule table at an absolute value "Start" on the underlying counter.

StatusType StartScheduleTableAbs (ScheduleTableType ScheduleTableID, TickType Start);

This service starts the processing of a schedule table at "Offset" relative to the "Now" value on the underlying counter.

StatusType StartScheduleTableRel (ScheduleTableType ScheduleTableID, TickType Offset);

This service starts an explicitly synchronized schedule table synchronously.

StatusType StartScheduleTableSynchron (ScheduleTableType ScheduleTableID);

Services · Check…

This service checks if a memory region is write/ read/ execute accessible and also returns information if the memory region is part of the stack space.

AccessType CheckISRMemoryAccess (ISRType ISRID, MemoryStartAddressType Address, MemorySizeType Size);

This service determines to which OS - Application a given Task, ISR, Counter, Alarm or Schedule Table belongs

ApplicationType CheckObjectOwnership (ObjectTypeType ObjectType, void ...);

This service checks if a memory region is write/ read/ execu te accessible and also returns information if the memory region is part of the stack space.

AccessType CheckTaskMemoryAccess (TaskType TaskID, MemoryStartAddressType Address, MemorySizeType Size);

Services · Modify…

This service modifies a given memory location () with the formula: * = ((* & ) | )

StatusType ModifyPeripheral16 (AreaIdType Area, uint16* Address, uint16 Clearmask, uint16 Setmask);

This service modifies a given memory location () with the formula: * = ((* & ) | )

StatusType ModifyPeripheral32 (AreaIdType Area, uint32* Address, uint32 Clearmask, uint32 Setmask);

This service modifies a given memory location () with the formula: * = ((* & ) | )

StatusType ModifyPeripheral8 (AreaIdType Area, uint8* Address, uint8 Clearmask, uint8 Setmask);

Services · Read…

This service returns the content of a given memory location (

StatusType ReadPeripheral16 (AreaIdType Area, const uint16* Address, uint16* ReadValue);

This service returns the content of a given memory location (

StatusType ReadPeripheral32 (AreaIdType Area, const uint32* Address, uint32* ReadValue);

This service returns the content of a given memory location (

StatusType ReadPeripheral8 (AreaIdType Area, const uint8* Address, uint8* ReadValue);

Services · Write…

This service writes the to a given memory location (). Available vi a Os.h

StatusType WritePeripheral16 (AreaIdType Area, uint16* Address, uint16 WriteValue);

This service writes the to a given memory location ().

StatusType WritePeripheral32 (AreaIdType Area, uint32* Address, uint32 WriteValue);

This service writes the to a given memory location (). Available vi a Os.h

StatusType WritePeripheral8 (AreaIdType Area, uint8* Address, uint8 WriteValue);

Services · More

This service determines if the OS - Applications, given by Appl ID, is allowed to use the IDs of a Task, Resource, Counter, Alarm or Schedule Table in API calls.

ObjectAccessType CheckObjectAccess (ApplicationType ApplID, ObjectTypeType ObjectType, void ...);

Asynchronous version of the Activate Task() function. Intended to be used for cross core task activation. Possible errors are not returned to the caller, but may be reported via error hooks.

void ActivateTaskAsyn (TaskType id);
AllowAccess function

This service sets the own state of an OS - Application from AP PLICATION_ RESTARTING to APPLICATION_ ACCESSIBLE.

StatusType AllowAccess (void);

A (trusted or non - trusted) OS - Application uses this service to call a trusted function

StatusType CallTrustedFunction (TrustedFunctionIndexType FunctionIndex, TrustedFunctionParameterRefType FunctionParams);

Service ClearPendingInterrupt.

StatusType ClearPendingInterrupt (ISRType ISRID);
ControlIdle function

This API allows the caller to select the idle mode action which is performed during idle time of t he OS (e.g. if no Task/ ISR is active). It can be used to implement energy savings. The real idle modes are hardware dependent and not standardized. The default idle mode on each core is IDLE_ NO_ HALT.

StatusType ControlIdle (CoreIdType CoreID, IdleModeType IdleMode);

Disables the interrupt source by modifying the interrupt controller registers.

StatusType DisableInterruptSource (ISRType ISRID);

Service EnableInterruptSource.

StatusType EnableInterruptSource (ISRType ISRID, boolean ClearPending);

This service increments a software counter.

StatusType IncrementCounter (CounterType CounterID);
IocInit function

This service initializes the data structures of the IOC. Tags: atp.Status=draft

void IocInit (void);

This service switches the processing from one schedule table to another schedule table.

StatusType NextScheduleTable (ScheduleTableType ScheduleTableID_From, ScheduleTableType ScheduleTableID_To);

The protection hook is always called if a serious error occurs. E.g. exceeding the worst case execution time or violating against the memory protection.

ProtectionReturnType ProtectionHook (StatusType Fatalerror);

Release Spinlock releases a spinlock variable that was occupied before. Before terminating a TASK all spinlock variables that have been occupied with Get Spinlock() shall be released. Before calling Wait EVENT all Spinlocks shall be released.

StatusType ReleaseSpinlock (SpinlockIdType SpinlockId);
SetEventAsyn function

Asynchronous version of the Set Event() function. Intended to be used for cross core event setting. Possible errors are not returned to the caller, but may be reported via error hooks.

void SetEventAsyn (TaskType id, EventMaskType m);

This service stops synchronization of a schedule table.

StatusType SetScheduletableAsync (ScheduleTableType ScheduleTableID);

After this service the OS on all AUTOSAR cores is shut down. Allowed at TASK level and ISR level and also internally by the OS. The function will never return. The function will force other cores into a shutdown.

void ShutdownAllCores (StatusType Error);

This service cancels the processing of a schedule table immediately at any point while the schedule table is running.

StatusType StopScheduleTable (ScheduleTableType ScheduleTableID);

Service SyncScheduleTable.

StatusType SyncScheduleTable (ScheduleTableType ScheduleTableID, TickType Value);

Service TerminateApplication.

StatusType TerminateApplication (ApplicationType Application, RestartType RestartOption);

Try To Get Spinlock has the same functionality as Get Spinlock with the difference that if the spinlock is already occupied by a TASK on a d ifferent core the function sets the OUT parameter "Success" and returns with E_ OK.

StatusType TryToGetSpinlock (SpinlockIdType SpinlockId, TryToGetSpinlockType* Success);

Callouts and expected interfaces

This callback function can be configured for the receiver of a communication. If configured, IOC calls this callback on the receiving core for each data reception. is the callback function name configured by the receiver in the Os Ioc Re ceiver Pull CB attribute to be called on data reception."

void <ReceiverPullCB> (void);

Types

This type holds information how a specific memory region can be accessed.

This data type represents an AUTOSAR OS alarm identifier.

typedef uint8 AlarmType;

This data type points to location where a Application State Type can be stored.

This data type identifies the state of an OS - Application. AUTOSAR CP R20 - o f Document ID : AUTOSAR_SWS_OS

This data type identifies the OS - Application.

App Mode of the core shall be inherited from another core.

Area Id Type identifies a peripheral area and is used by the API functions: Read Peripheral X, Write Peripheral X and Modify Peripheral X AUTOSAR CP R20 - o f Document ID : AUTOSAR_SWS_OS

Core Id Type is a scalar that allows identifying a single core. The Core Id Type shall represent t he logical Core ID

This data type identifies a counter.

This data type represents an event mask for extended tasks.

This data type identifies the idle mode behavior.

ISRType type

This data type identifies an interrupt service routine (ISR).

This data type holds the size (in bytes) of a memory region.

This data type is a pointer which is able to point to any location in the MCU address space.

This data type identifies if an OS - Application has access to an object.

This data type identifies an object.

This data type is used for values returned by the conversion macro (see SWS_ Os_00393) OS_ TICKS2_(). AUTOSAR CP R20 - o f Document ID : AUTOSAR_SWS_OS

This data type identifies a value which controls further actions of the OS on return from the protection hook.

This data type defines the use of a Restart Task after terminating an OS - Application.

This data type points to a variable of the data type Schedule Table Status Type.

This type describes the status of a schedule. The status can be one of the following: o The schedule table is not started (SCHEDULETABLE_ STOPPED) o The schedule table will be started after the end of currently running schedule table (sched ule table was used in Next Schedule Table() service) (SCHEDULETABLE_ NEXT) o The schedule table uses explicit synchronization, has been started and is waiting for the global time. (SCHEDULETABLE_ WAITING) o The schedule table is running, but is currently n ot synchronous to a global time source (SCHEDULETABLE_ RUNNING) o The schedule table is running and is synchronous to a global time source (SCHEDULETABLE_ RUNNING_ AND_ SYNCHRONOUS)

This data type identifies a schedule table.

Spinlock Id Type identifies a spinlock instance and is used by the API functions: Get Spinlock, Release Spinlock and Try To Get Spinlock.

This data type represents standard OSEK OS status codes (e.g. E_OK, E_OS_ACCESS).

typedef uint8 StatusType;

This data type identifies an AUTOSAR OS task.

typedef uint8 TaskType;

This data type represents count values in ticks.

typedef uint32 TickType;

The total number of cores

This data type identifies a trusted function.

This data type points to a structure which holds the arguments for a call to a trusted function.

The Try To Get Spinlock Type indicates if the spinlock has been occupied or not.