DEENESPTFRRUARHIKOZHNL

AUTOSAR Classic Operating System

集群指南人工智能生成

提供确定性实时调度、内存保护、多核同步和错误包容。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 9b7f8380b9ff 来源
因果锚点:R20-11 自 R20-11 起有效 为此规范版本重新合成。
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

提供确定性实时调度、内存保护、多核同步和错误包容。

模块集群 Operating System 为 Task 和 ISR 提供确定性实时调度,并在分区的 OS-Application 中提供内存保护和错误隔离 [SWS_Os_00445]。它通过跨核自旋锁、异步任务激活以及跨 OS-Application 通信器(IOC)支持多核系统 [SWS_Os_00686]、[SWS_Os_00824]。当发生保护违规时,OS 允许在运行时通过可配置的钩子有针对性地终止或受控重启单个分区 ApplicationLevelErrorHandling 第53页。

模块集群“Operating System”在 AUTOSAR Classic 中为软件组件和基础软件模块提供基础的执行与保护基础设施。操作系统将任务、ISR、报警和计数器等资源封装在 OS-Applications [SWS_Os_00445] 中,并在此过程中区分可信(trusted)与非可信分区 [SWS_Os_00446],以确保基于 MPU 内存保护的严格错误遏制 SafetyConceptStatusReport 第49页。在多核系统中,OS 通过标准化的核 ID 管理逻辑核 [SWS_Os_00790],并提供核间/分区通信器(IOC),用于在各核与分区之间进行基于数据和事件的交换 [SWS_Os_00824]。

os_architecture cluster_os Operating System (OS) RTE Runtime Environment (RTE) OS_KERNEL OS Core / Scheduler (Tasks, ISRs, Events) RTE->OS_KERNEL ActivateTask(), SetEvent(), CallTrustedFunction() IOC Inter-OS-Application Communicator (IOC) RTE->IOC IocSend(), IocWrite(), IocReceive(), IocRead() ECUM ECU State Manager (EcuM) ECUM->OS_KERNEL StartCore(), StartOS(), ShutdownAllCores() STBM Synchronized Time-Base Manager (StbM) ST_MGM Schedule Table & Counter Management STBM->ST_MGM SyncScheduleTable(), GetScheduleTableStatus() PROT Protection & Memory Access Control OS_KERNEL->PROT Fault containment HW Microcontroller / MPU / Core HW OS_KERNEL->HW Spinlocks, Timer, IRQ Ctrl PROT->HW MPU-Konfiguration, Privilege Level

上下文图:OS 集群在 AUTOSAR 基础软件架构中的嵌入情况以及与 EcuM、StbM、RTE 和硬件的接口。来源:[SWS_Os_00445]、[SWS_Os_00790]、SWS_BSWGeneral 第48页。

除事件驱动的任务调度外,OS 还支持通过调度表(Schedule Tables)进行时间驱动的执行跟踪 [SWS_Os_00783]。这些调度表可通过同步时基管理器(StbM)借助 SyncScheduleTable 同步到全局车辆时基 [SWS_Os_00199]、SWS_SynchronizedTimeBaseManager 第220页。为了跨核边界进行同步,该模块提供了具有集成死锁检测功能的硬件级自旋锁 [SWS_Os_00686],而跨核任务激活则可通过 ActivateTaskAsyn 异步执行 [SWS_Os_91022]。

发生错误时(例如内存违规),OS 会激活 ProtectionHook [SWS_Os_00538]。通过其返回值,可以在不复位整个系统的情况下隔离故障 OS-Application 并进行受控终止,或者通过专用的重启任务对其进行重新初始化 [SWS_Os_00787]、ApplicationLevelErrorHandling 第53页。

app_lifecycle init ACCESSIBLE APPLICATION_ACCESSIBLE (Normalbetrieb, Tasks/ISRs aktiv) init->ACCESSIBLE StartOS() RESTARTING APPLICATION_RESTARTING (隔离,仅 OsRestartTask 处于活动状态) ACCESSIBLE->RESTARTING ProtectionHook() -> PRO_TERMINATEAPPL_RESTART 或 TerminateApplication(RESTART) TERMINATED APPLICATION_TERMINATED (Endzustand, Partition deaktiviert) ACCESSIBLE->TERMINATED ProtectionHook() -> PRO_TERMINATEAPPL 或 TerminateApplication(NO_RESTART) RESTARTING->ACCESSIBLE OsRestartTask beendet Bereinigung & schaltet Partition frei RESTARTING->TERMINATED 重新启动期间出错 或升级

状态图:AUTOSAR OS-Application 在发生错误时的生命周期和分区状态。来源:[SWS_Os_00773]、[SWS_Os_00258]、ApplicationLevelErrorHandling 第53页。

1. 系统架构与模块群集的作用

模块集群“Operating System”在 AUTOSAR 分层模型中构成了系统服务(System Services)的基础基石,用于执行和协调所有实时软件组件以及基础软件模块。核心模块 [SWS_Os_00445] 将任务、中断服务例程(ISR)、报警、计数器(Counter)和调度表(Schedule Tables)封装在可配置的执行单元(即所谓的 OS-Applications)中。在此过程中,操作系统严格区分可信(trusted)和非可信(non-trusted)OS-Applications [SWS_Os_00446],以根据所需的可扩展性类别提供功能安全和内存保护 SafetyConceptStatusReport 第49页。

在多核架构中,OS 管理通过 CoreIdType 类型的唯一标识符引用的逻辑核 [SWS_Os_00790]。核 ID 从零开始且连续排列 [SWS_Os_00825],其中常量 OS_CORE_ID_MASTER 标识主核 SWS_OS 第111页。通过集成的核间/分区通信器(IOC),操作系统提供了用于安全、跨分区和跨核数据传输的机制 [SWS_Os_00824]。通过根据 OSEK OS 对接口进行标准化及其 AUTOSAR 专用扩展,OS 为上层模块(如 ECU 状态管理器 (EcuM)、同步时基管理器 (StbM) 以及运行时环境 RTE)保证了确定性的实时行为 SWS_BSWGeneral 第48页。

os_architecture cluster_os Operating System (OS) RTE Runtime Environment (RTE) OS_KERNEL OS Core / Scheduler (Tasks, ISRs, Events) RTE->OS_KERNEL ActivateTask(), SetEvent(), CallTrustedFunction() IOC Inter-OS-Application Communicator (IOC) RTE->IOC IocSend(), IocWrite(), IocReceive(), IocRead() ECUM ECU State Manager (EcuM) ECUM->OS_KERNEL StartCore(), StartOS(), ShutdownAllCores() STBM Synchronized Time-Base Manager (StbM) ST_MGM Schedule Table & Counter Management STBM->ST_MGM SyncScheduleTable(), GetScheduleTableStatus() PROT Protection & Memory Access Control OS_KERNEL->PROT Fault containment HW Microcontroller / MPU / Core HW OS_KERNEL->HW Spinlocks, Timer, IRQ Ctrl PROT->HW MPU-Konfiguration, Privilege Level

上下文图:OS 集群在 AUTOSAR 基础软件架构中的嵌入情况以及与 EcuM、StbM、RTE 和硬件的接口。来源:[SWS_Os_00445]、[SWS_Os_00790]、SWS_BSWGeneral 第48页。

2. 模块间的相互协作与交互路径

OS 对象与 AUTOSAR 架构各层之间的交互通过严格区分的控制和数据路径进行。对于跨分区数据交换,IOC 生成具有非排队(“data”,IocWrite / IocRead)或排队语义(“event”,IocSend / IocReceive)的类型化通信函数 [SWS_Os_00718]、[SWS_Os_00738]。在组传输中,使用服务 IocSendGroup 或 IocReceiveGroup [SWS_Os_00728]、[SWS_Os_00746]。如果接收方的内部缓冲区变满,IOC 会通过状态 IOC_E_LIMIT 向发送方发出信号,并针对后续读取操作记录 IOC_E_LOST_DATA SWS_OS 第225页。

当非可信 OS-Application 必须访问可信分区的特权服务时,受控的上下文切换通过系统服务 CallTrustedFunction [SWS_Os_00097] 进行。在此过程中,参数通过 TrustedFunctionParameterRefType 类型的指针结构传递 [SWS_Os_00776]。操作系统临时将 MPU 权限切换为目标应用程序的权限 SWS_OS 第172页。函数 GetCurrentApplicationID 在此执行期间返回被调用的 Trusted Application 的标识符,而 GetApplicationID 则返回原始调用方应用程序 [SWS_Os_00797]。

为了与外部时基进行时间协调,StbM 模块通过 OS 接口同步显式配置的调度表。StbM 首先通过 GetScheduleTableStatus 周期性地查询同步状态 [SWS_Os_00227],随后通过 SyncScheduleTable 将当前同步值传递给 OS [SWS_Os_00199]。操作系统随后计算与到期点(Expiry Points)的偏差并逐步调整延迟时间,直到调度表与全局时基同步运行 SWS_OS 第57页、SWS_SynchronizedTimeBaseManager 第220页。

OS 调度表的显式同步StbMOsGetScheduleTableStatus(ScheduleTableID, &ScheduleStatus)E_OK (Status: SCHEDULETABLE_RUNNING / WAITING)altStatus == WAITING | RUNNING | RUNNING_AND_SYNCHRONOUSSyncScheduleTable(ScheduleTableID, GlobalTimeTick)计算本地调度表与时基之间的漂移在 Expiry Points 处引入延迟调整E_OKAbweichung <= OsScheduleTblExplicitPrecisionSetze Zustand: SCHEDULETABLE_RUNNING_AND_SYNCHRONOUS

时序图:同步时基管理器 (StbM) 对 OS 调度表进行的显式同步。来源:[SWS_Os_00199]、[SWS_Os_00227]、SWS_SynchronizedTimeBaseManager 第220页。

3. 同步、可重入性与任务上下文

运行时模型清晰地区分了任务级别、类别 1 中断级别(Cat 1 ISR)、类别 2 中断级别(Cat 2 ISR)以及 Hook 例程。Cat 1 ISR 在没有操作系统开销的情况下运行且不允许调用 OS 服务,而 Cat 2 ISR 则完全由 OS 管理 [SWS_Os_00782]。活动 ISR 标识符可通过 GetISRID 确定;在 Cat 2 ISR 之外调用时,该服务返回 INVALID_ISR [SWS_Os_00511]。单个中断源可在中断控制器级别通过 EnableInterruptSource、DisableInterruptSource 以及 ClearPendingInterrupt 进行针对性控制 [SWS_Os_91020]、[SWS_Os_91019]、[SWS_Os_91021]。

为了跨处理器核边界同步临界区,OS 提供了自旋锁 [SWS_Os_00791]。自旋锁通过 GetSpinlock 进行同步阻塞占用 [SWS_Os_00686],或通过 TryToGetSpinlock 进行非阻塞查询 [SWS_Os_00703]。释放通过 ReleaseSpinlock 进行 [SWS_Os_00695]。为杜绝死锁,OS 在扩展状态下检查嵌套和重叠错误(E_OS_INTERFERENCE_DEADLOCK、E_OS_NESTING_DEADLOCK)SWS_OS 第199页。

对于跨核任务激活和事件设置,OS 提供了异步 API 变体:ActivateTaskAsyn 和 SetEventAsyn 立即返回给调用方,而无需等待目标核上的执行 [SWS_Os_91022]、[SWS_Os_91023]。此时可能的错误不会返回给调用方,而是通过配置的 Error-Hooks 进行记录 [SWS_Os_00816]、SWS_OS 第203页。

4. 典型生命周期与运行模式

系统启动主要由 ECU 状态管理器 (EcuM) 协调。在主核上,EcuM 在操作系统启动前通过 OS 服务 StartCore 启动从属核 [SWS_Os_00676]、SWS_ECUStateManager 第82页。随后,每个已启动的核自主调用 StartOS。在调用 StartOS 之后,操作系统在执行 Startup-Hooks 之前将所有已配置的 OS-Applications 转换到状态 APPLICATION_ACCESSIBLE SWS_OS 第62页。成功启动的核数量可在运行时使用 GetNumberOfActivatedCores 查询 SWS_OS 第196页。

调度表遵循明确定义的状态机。它们可以通过 StartScheduleTableAbs 绝对启动 [SWS_Os_00358]、通过 StartScheduleTableRel 相对启动 [SWS_Os_00347] 或通过 StartScheduleTableSynchron 同步启动 [SWS_Os_00201]。调度表可以链接(NextScheduleTable,状态 SCHEDULETABLE_NEXT)[SWS_Os_00191],或使用 StopScheduleTable 立即转换为待机状态 SCHEDULETABLE_STOPPED [SWS_Os_00006]。正在进行的显式同步可以通过 SetScheduleTableAsync 中止,同时 Expiry Points 的处理将继续进行 [SWS_Os_00422]。

对于空闲时的节能模式,OS 提供了接口 ControlIdle,EcuM 可借此配置各个核的待机状态 [SWS_Os_00769]。在关机时,EcuM 协调所有层的去初始化,并最终调用 ShutdownAllCores 或 ShutdownOS,以受控方式停止整个系统 SWS_ECUStateManager 第90页。

5. 错误处理、DET 跟踪与降级

保护违规(例如内存超限或时序违规)会导致全局 ProtectionHook 被激活 [SWS_Os_00538]。根据错误情况,该 Hook 通过 ProtectionReturnType 类型的返回值决定恢复策略 [SWS_Os_00787]:终止触发实体(PRO_TERMINATETASKISR)、完全终止受影响的分区(PRO_TERMINATEAPPL)、发起受控的分区重启(PRO_TERMINATEAPPL_RESTART)或关闭控制器(PRO_SHUTDOWN)ApplicationLevelErrorHandling 第60页。

当 OS-Application 被终止或重启时,OS 会将其从状态 APPLICATION_ACCESSIBLE 置于 APPLICATION_RESTARTING 或 APPLICATION_TERMINATED [SWS_Os_00773]。该分区的全部活动任务、ISR、报警和调度表都会立即停止,并且所有中断都会被禁用 [SWS_Os_00447]。在状态 APPLICATION_RESTARTING 下,将排他性地执行 OsRestartTask 以执行清理工作,然后再重新放行正常运行 ApplicationLevelErrorHandling 第53页、ApplicationLevelErrorHandling 第76页。

app_lifecycle init ACCESSIBLE APPLICATION_ACCESSIBLE (Normalbetrieb, Tasks/ISRs aktiv) init->ACCESSIBLE StartOS() RESTARTING APPLICATION_RESTARTING (隔离,仅 OsRestartTask 处于活动状态) ACCESSIBLE->RESTARTING ProtectionHook() -> PRO_TERMINATEAPPL_RESTART 或 TerminateApplication(RESTART) TERMINATED APPLICATION_TERMINATED (Endzustand, Partition deaktiviert) ACCESSIBLE->TERMINATED ProtectionHook() -> PRO_TERMINATEAPPL 或 TerminateApplication(NO_RESTART) RESTARTING->ACCESSIBLE OsRestartTask beendet Bereinigung & schaltet Partition frei RESTARTING->TERMINATED 重新启动期间出错 或升级

状态图:AUTOSAR OS-Application 在发生错误时的生命周期和分区状态。来源:[SWS_Os_00773]、[SWS_Os_00258]、ApplicationLevelErrorHandling 第53页。

为了预防性地避免错误,操作系统提供了内存保护检查函数(如 CheckTaskMemoryAccess 和 CheckISRMemoryAccess)[SWS_Os_00512]、[SWS_Os_00513],以及通过 CheckObjectAccess 和 CheckObjectOwnership 的访问权限检查 [SWS_Os_00256]、[SWS_Os_00017]。通过这些标准化检查,可以确保非可信组件不会在内存中执行未经允许的写入或执行访问 SWS_OS 第73页。

本指南的上下文:基于 R20-11 版本的 AUTOSAR Classic 规范创建。所有接口和状态转换均严格由引用的 SWS 需求所证实。

Das AUTOSAR Operating System ist ein statisch konfiguriertes, echtzeitfähiges preemptives Betriebssystem nach OSEK/VDX mit Tasks, Events, Alarmen, Schedule-Tables und Speicherschutz.

Module im Cluster

AUTOSAR OS

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

BSW ID 1 79 APIs (48 Funktionen, 31 Typen) #include "Os.h"

Os

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);

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);

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);

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);

Service ClearPendingInterrupt.

StatusType ClearPendingInterrupt (ISRType ISRID);

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 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 函数

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 函数

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);

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);

This service increments a software counter.

StatusType IncrementCounter (CounterType CounterID);
IocInit 函数

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

void IocInit (void);

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);

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);

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);

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);

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);
StartCore 函数

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);

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);

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);
AccessType 类型

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

AlarmType 类型

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.

AreaIdType 类型

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

CoreIdType 类型

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 类型

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.

ObjectType 类型

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.

StatusType 类型

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

typedef uint8 StatusType;
TaskType 类型

This data type identifies an AUTOSAR OS task.

typedef uint8 TaskType;
TickType 类型

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.