DEENESPTFRRUARHIKOZHNL

ECU State Manager (EcuM)

ModulEcuM (ECU State Manager)
BSW-Modul-ID10
Standard-Header#include "EcuM.h"
SWS-SpezifikationAUTOSAR_SWS_ECUStateManager.pdf
ClusterSystem Services

Module guideAI-GENERATED

Controls startup, shutdown, sleep phases, and wakeup sources of the ECU in interaction with BswM.
AI-GENERATED unreviewed Model: claude-opus-5-5 · Effort: high · Temperature: not controllable · Prompt: c4073030eea4 Provenance Open questions (1)
Causal anchor: R20-11 Valid from R20-11 Synthesized for this specification release.
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Controls startup, shutdown, sleep phases, and wakeup sources of the ECU in interaction with BswM.

The ECU State Manager controls the lifecycle of a Classic ECU. It initializes the basic software up to the OS start, transitions the ECU into the shutdown targets SLEEP, RESET, or OFF, and manages the wakeup sources including validation [SWS_EcuM_04136]. Hardware-related steps are handled by the integration code via callouts. EcuM arbitrates the RUN and POST_RUN requests of the users, but BswM decides on the state transitions and reports them back via EcuM_SetState [SWS_EcuM_04116]. The most important constraint is that no wakeup event must be lost during the SLEEP phase.

In the Classic Platform, the ECU State Manager (EcuM) is responsible for startup, shutdown, and sleep phases of the ECU. EcuM_Init executes the StartPreOS sequence with Init Blocks 0 and 1. In doing so, EcuM selects and checks the post-build configuration and finally calls StartOS. After that, EcuM_StartupTwo starts SchM and BswM [SWS_EcuM_02684] [SWS_EcuM_02906] [SWS_EcuM_02932]. The integration code provides hardware-related steps as callouts, for example EcuM_AL_DriverInitZero [SWS_EcuM_02905].

phasen start Power On / Reset STARTUP STARTUP (StartPreOS, StartPostOS) start->STARTUP UP UP (RUN / POST_RUN, optional) STARTUP->UP EcuM_StartupTwo, BswM takes over SHUTDOWN SHUTDOWN (OffPreOS, OffPostOS) UP->SHUTDOWN target RESET or OFF SLEEP SLEEP (GoSleep, Halt, or Poll) UP->SLEEP Ziel SLEEP, EcuM_GoDownHaltPoll OFF OFF SHUTDOWN->OFF EcuM_AL_SwitchOff RESET RESET SHUTDOWN->RESET EcuM_AL_Reset SLEEP->STARTUP Hardware-Reset / Power-Cycle SLEEP->UP Weckereignis: WakeupRestart RESET->STARTUP Neustart

State diagram: The ECU transitions through STARTUP, UP, SHUTDOWN, and SLEEP. From SLEEP, it returns to UP via WakeupRestart. Sources: RS ModeManagement p. 15, [SWS_EcuM_91005], [SWS_EcuM_02963]

EcuM does not decide on state transitions itself. It collects the RUN and POST_RUN requests of the configured users and reports the result to BswM. It applies its state changes via EcuM_SetState and forwards them to the RTE [SWS_EcuM_04144] [SWS_EcuM_04117] [SWS_EcuM_04116] SWS EcuM p. 103. EcuM_SelectShutdownTarget only stores the target SLEEP, RESET, or OFF for later [SWS_EcuM_02585]. During shutdown, OffPreOS de-initializes BswM and SchM, checks wakeup events, and terminates the OS. The shutdown hook then calls EcuM_Shutdown, which ends with EcuM_AL_Reset or EcuM_AL_SwitchOff [SWS_EcuM_03021] [SWS_EcuM_04074] [SWS_EcuM_04075].

The SLEEP phase begins with EcuM_GoDownHaltPoll. First, GoSleep activates the wakeup sources of the sleep mode. This is followed either by Halt with RAM hash check or Poll with a loop over EcuM_SleepActivity and EcuM_CheckWakeup. WakeupRestart concludes the sequence with EcuM_AL_DriverRestart [SWS_EcuM_91002] [SWS_EcuM_02389] [SWS_EcuM_02863] [SWS_EcuM_03020] [SWS_EcuM_02963]. In this phase, no wakeup event must be lost [SWS_EcuM_02188].

Wakeup sources are individual bits in EcuM_WakeupSourceType and each have one of the states NONE, PENDING, VALIDATED, or EXPIRED [SWS_EcuM_04040] [SWS_EcuM_04091]. Drivers report events with EcuM_SetWakeupEvent. If validation is configured, EcuM starts a timeout. Only a EcuM_ValidateWakeupEvent before its expiration leads to VALIDATED; if a channel reference is configured, ComM is then also informed. Otherwise, the source becomes EXPIRED [SWS_EcuM_02709] [SWS_EcuM_02645] [SWS_EcuM_04082].

validierung a Treiber erkennt Weckereignis: EcuM_SetWakeupEvent(sources) b source belongs to the selected sleep mode? a->b x Ereignis ignorieren b->x no c Validierung konfiguriert? (EcuMValidationTimeout) b->c yes e Bits in Pending-Variable setzen, quellenspezifischen Timeout starten c->e yes h Timeout stoppen, Validated-Bits setzen, BswM_EcuM_CurrentWakeup(VALIDATED), ComM_EcuM_WakeUpIndication / PNCWakeUpIndication (falls Kanal/PNC konfiguriert) c->h nein: impliziter EcuM_ValidateWakeupEvent f EcuM_MainFunction: EcuM_CheckValidation(wakeupSource) e->f g EcuM_ValidateWakeupEvent eingetroffen? f->g g->h yes i Timeout abgelaufen? g->i no i->f no j Expired-Bit setzen, BswM_EcuM_CurrentWakeup(EXPIRED), EcuM_StopWakeupSources() i->j yes

Activity diagram: A wakeup event is validated immediately or remains PENDING until a confirmation arrives or the timeout expires. Sources: SWS EcuM p. 63, [SWS_EcuM_02566], [SWS_EcuM_04082]

In case of error, EcuM calls the callout EcuM_ErrorHook if the configuration is inconsistent or the RAM check fails [SWS_EcuM_04033] [SWS_EcuM_91003]. It reports development errors, such as multiple requests or unknown wakeup sources, to DET [SWS_EcuM_03024] [SWS_EcuM_02867].

Role and System Boundary of the ECU State Manager

In the Classic Platform, the ECU State Manager (EcuM) defines the framework for the ECU lifecycle. It initializes the basic software up to the start of the operating system. Thereafter, it guides the ECU in a controlled manner into one of the shutdown targets SLEEP, RESET, or OFF [SWS_EcuM_04136]. EcuM_StateType defines its states: STARTUP, RUN, POST_RUN, SHUTDOWN, and SLEEP [SWS_EcuM_91005]. It reports them to the SW-Cs via the mode declaration group EcuM_Mode, whose initial mode is STARTUP [SWS_EcuM_04107] [SWS_EcuM_04132].

phasen start Power On / Reset STARTUP STARTUP (StartPreOS, StartPostOS) start->STARTUP UP UP (RUN / POST_RUN, optional) STARTUP->UP EcuM_StartupTwo, BswM takes over SHUTDOWN SHUTDOWN (OffPreOS, OffPostOS) UP->SHUTDOWN target RESET or OFF SLEEP SLEEP (GoSleep, Halt, or Poll) UP->SLEEP Ziel SLEEP, EcuM_GoDownHaltPoll OFF OFF SHUTDOWN->OFF EcuM_AL_SwitchOff RESET RESET SHUTDOWN->RESET EcuM_AL_Reset SLEEP->STARTUP Hardware-Reset / Power-Cycle SLEEP->UP Weckereignis: WakeupRestart RESET->STARTUP Neustart

State diagram: The ECU transitions through STARTUP, UP, SHUTDOWN, and SLEEP. From SLEEP, it returns to UP via WakeupRestart; after a hardware reset or power cycle, it restarts in STARTUP. Sources: RS ModeManagement p. 15, [SWS_EcuM_91005], [SWS_EcuM_02963], [SWS_EcuM_04001]

EcuM does not decide on the state transitions itself. It has no state machine of its own, only arbitrates the requests, and leaves the transitions to the BSW Mode Manager (BswM) SWS EcuM p. 103. It delegates hardware-related and project-specific steps to callouts of the integration code, which are provided via EcuM_Externals.h. Examples are EcuM_AL_DriverInitZero and EcuM_AL_SwitchOff [SWS_EcuM_02905] [SWS_EcuM_02920]. The interfaces of neighboring modules are listed in the tables of imported functions, such as BswM_EcuM_CurrentWakeup, Can_Init, and Det_ReportError [SWS_EcuM_02858] [SWS_EcuM_02859].

kontext EcuM EcuM SWC SW-Cs (via RTE ports) EcuM->SWC currentMode (EcuM_Mode) BswM BswM EcuM->BswM BswM_Init / BswM_Deinit, BswM_EcuM_CurrentWakeup, RequestedState, CurrentState IC Integration Code (Callouts in EcuM_Externals.h) EcuM->IC EcuM_AL_DriverInit*, EcuM_AL_DriverRestart, EcuM_AL_Reset, EcuM_AL_SwitchOff, EcuM_*WakeupSources Os Os EcuM->Os StartOS, ShutdownOS, GetResource Mcu Mcu EcuM->Mcu Mcu_GetResetReason, Mcu_SetMode SchM SchM EcuM->SchM SchM_Init / Start / Deinit ComM ComM EcuM->ComM ComM_EcuM_WakeUpIndication, ComM_EcuM_PNCWakeUpIndication Det Det EcuM->Det Det_ReportError SWC->EcuM RequestRUN / ReleaseRUN, SelectShutdownTarget, AlarmClock, BootTarget BswM->EcuM EcuM_SetState, EcuM_SelectShutdownTarget, EcuM_GoDownHaltPoll Os->EcuM EcuM_Shutdown (Shutdown-Hook) Drv drivers with wakeup sources (e.g. CanTrcv, Icu, Gpt) Drv->EcuM EcuM_SetWakeupEvent, EcuM_ValidateWakeupEvent

Context diagram: EcuM is positioned between SW-Cs, BswM, integration code, OS, MCAL drivers, and ComM. BswM decides on transitions; the integration code executes the hardware steps. Sources: SWS EcuM p. 34, [SWS_EcuM_02858], [SWS_EcuM_04135]

Startup: StartPreOS, StartPostOS, and Configuration Data

Prior to EcuM_Init, EcuM requires only minimal MCU initialization: a stack is set up and C variables are initialized SWS EcuM p. 39. EcuM_Init executes the StartPreOS sequence and does not return because it calls StartOS [SWS_EcuM_02811] [SWS_EcuM_02684]. In doing so, all modules required for starting the OS are initialized [SWS_EcuM_02603].

Init Block 0 (EcuM_AL_DriverInitZero) prepares the loading of post-build data. Therefore, it may only use modules configured at pre-compile or link time [SWS_EcuM_02905]. Subsequently, EcuM_DeterminePbConfiguration provides a pointer to EcuM_ConfigType. This structure references the configurations of all further BSW modules [SWS_EcuM_02906] [SWS_EcuM_02801]. It contains a variant identifier and a hash. EcuM checks the hash against ECUM_CONFIGCONSISTENCY_HASH for all post-build configurable modules before the first of them is initialized [SWS_EcuM_02794] [SWS_EcuM_02798] [SWS_EcuM_02796].

Init Block 1 (EcuM_AL_DriverInitOne) initializes the drivers after a power-on reset, including the MCU [SWS_EcuM_02907] SWS EcuM p. 146. EcuMDriverInitListZero and EcuMDriverInitListOne define the sequence in both blocks. Each init function receives its parameters from the associated EcuMModuleService container [SWS_EcuM_02559] [SWS_EcuM_02730]. EcuM translates the reset reason of the Mcu driver into a wakeup source and memorizes it. If the reason cannot be determined, it sets ECUM_WKSOURCE_RESET [SWS_EcuM_02623] [SWS_EcuM_02601]. If EcuMResetLoopDetection is set, EcuM calls the callout EcuM_LoopDetection at every start [SWS_EcuM_04137].

startup: StartPreOS and StartPostOSBootloaderEcuMIntegration CodeMcuOsSchMBswMUse Case: StartPreOS (EcuM_Init)EcuM_Init()EcuM_AL_DriverInitZero()EcuM_DeterminePbConfiguration()const EcuM_ConfigType*check consistency of configuration dataoptKonfigurationsdaten inkonsistentEcuM_ErrorHook(ECUM_E_CONFIGURATION_DATA_INCONSISTENT)EcuM_AL_DriverInitOne()Mcu_GetResetReason()map reset reason to wakeup sourceStartOS(ECUM_DEFAULT_APP_MODE)Use Case: StartPostOS (EcuM_StartupTwo)EcuM_StartupTwo()(from task after StartOS)SchM_Init / SchM_Start / SchM_StartTimingBswM_Init()

Sequence diagram: EcuM_Init passes through Init Block 0, the selection and checking of the configuration, Init Block 1, and the reset evaluation up to StartOS. After that, EcuM_StartupTwo starts SchM and BswM. Sources: SWS EcuM p. 38, SWS EcuM p. 78, [SWS_EcuM_02684], [SWS_EcuM_02932]

After the OS start, a task that was started directly as a result of StartOS calls EcuM_StartupTwo [SWS_EcuM_02806]. This function executes StartPostOS: it initializes and starts SchM and calls BswM_Init [SWS_EcuM_02932] SWS EcuM p. 42. BswM handles further initializations via the generated functions EcuM_AL_DriverInitBswM_<x> [SWS_EcuM_04114].

On multicore ECUs, one EcuM instance runs per core, and the master EcuM starts the remaining cores. Init Blocks 0 and 1 run on each core, but only initialize its MCAL modules there. SchM, OS, and all core-local BswM are started on each core [SWS_EcuM_04145] [SWS_EcuM_04093] [SWS_EcuM_04014] SWS EcuM p. 71.

RUN and POST_RUN: User Requests and Arbitration with BswM

If EcuMModeHandling is active, users can request and release RUN and POST_RUN [SWS_EcuM_04115] [SWS_EcuM_04130]. EcuM_RequestRUN, EcuM_ReleaseRUN, EcuM_RequestPOST_RUN, and EcuM_ReleasePOST_RUN serve this purpose. All four expect a configured user ID of type EcuM_UserType [SWS_EcuM_04124] [SWS_EcuM_04127] [SWS_EcuM_04128] [SWS_EcuM_04129]. EcuM tracks requests per user, and a user cannot nest them. It maintains RUN and POST_RUN requests in separate variables [SWS_EcuM_04126] [SWS_EcuM_04125] SWS EcuM p. 116. SW-Cs access these services via port StateRequest_{UserName} [SWS_EcuM_04135].

EcuM reports the first RUN or POST_RUN request to BswM with BswM_EcuM_RequestedState(ECUM_STATE_APP_RUN, ECUM_RUNSTATUS_REQUESTED). It reports the last release of RUN or POST_RUN with the respective state and ECUM_RUNSTATUS_RELEASED [SWS_EcuM_04144] [SWS_EcuM_04117] [SWS_EcuM_04119]. BswM evaluates its rules and sets the new state using EcuM_SetState. EcuM then indicates the matching mode to the RTE and, after its feedback, reports BswM_EcuM_CurrentState [SWS_EcuM_04122] [SWS_EcuM_04116] [SWS_EcuM_04143]. The Mode Management Guide shows suitable BswM rules, for example the transition to POST_RUN as soon as RUN is released Mode-Management-Guide p. 34.

RUN/POST_RUN arbitration between EcuM and BswMSW-C (EcuM-Nutzer)RTEEcuMBswMUse Case: AnforderungEcuM_RequestRUN(user)via port StateRequest_{UserName}E_OKfirst RUN or POST_RUN requestBswM_EcuM_RequestedState(ECUM_STATE_APP_RUN, ECUM_RUNSTATUS_REQUESTED)rule evaluation decides on the transitionEcuM_SetState(state)Rte_Switch_currentMode_currentMode(mode)acknowledgement via acknowledgement portBswM_EcuM_CurrentState(state)Use Case: ApprovalEcuM_ReleaseRUN(user)letzte RUN-Anforderung freigegebenBswM_EcuM_RequestedState(ECUM_STATE_APP_RUN, ECUM_RUNSTATUS_RELEASED)EcuM_SetState(state)e.g. switch to POST_RUN

Sequence diagram: EcuM arbitrates the user requests and reports the result to BswM. BswM returns the state via EcuM_SetState, and EcuM forwards it to the RTE. Sources: [SWS_EcuM_04144], [SWS_EcuM_04117], [SWS_EcuM_04116], [SWS_EcuM_04143]

Shutdown Targets and Shutdown via OffPreOS and OffPostOS

EcuM_SelectShutdownTarget only stores the target and mode for the subsequent SHUTDOWN or SLEEP phase and does not initiate anything itself [SWS_EcuM_02822] [SWS_EcuM_00624] [SWS_EcuM_02585]. For target SLEEP, the mode parameter selects a configured sleep mode, and for target RESET, a reset mode. For OFF, it is ignored [SWS_EcuM_02979] [SWS_EcuM_02185]. The reset modes include at least Mcu_PerformReset, WdgM_PerformReset, and toggling an I/O pin [SWS_EcuM_04005] [SWS_EcuM_04044]. The cause of a shutdown is recorded with EcuM_SelectShutdownCause [SWS_EcuM_04007] [SWS_EcuM_04050]. EcuM_GetLastShutdownTarget returns the target from which wakeup or startup last occurred. This value remains unchanged until the next shutdown [SWS_EcuM_02156].

The SHUTDOWN phase ends either in OFF or in RESET [SWS_EcuM_03022]. When the target is set is typically determined by BswM SWS EcuM p. 66. In OffPreOS, BswM and SchM are de-initialized and wakeup events are checked. If events are pending, RESET is set as the target. The final action is ShutdownOS [SWS_EcuM_03021] [SWS_EcuM_02952] SWS EcuM p. 49.

Subsequently, the shutdown hook calls EcuM_Shutdown, which does not return. After EcuM_OnGoOffTwo, EcuM_AL_Reset follows for target RESET and EcuM_AL_SwitchOff follows for target OFF [SWS_EcuM_02953] [SWS_EcuM_02917] [SWS_EcuM_04074] [SWS_EcuM_04075]. Interpretation: For RESET and OFF as well, BswM is likely to trigger the phase via EcuM_GoDownHaltPoll, as its return description distinguishes according to the shutdown target [SWS_EcuM_91002]. Question Q-29bca5a7c6e82c98 (open)

shutdown via OffPreOS and OffPostOSBswMEcuMSchMOsIntegration CodeEcuM_SelectShutdownTarget(target, mode)E_OKEcuM_GoDownHaltPoll(UserID)Interpretation: trigger also upon RESET/OFFUse Case: OffPreOSBswM_Deinit()SchM_Deinit()check wakeup events (pending or validated,depending on EcuMIgnoreWakeupEvValOffPreOS)optWeckereignisse anstehendShutdown-Ziel RESET setzen(EcuMDefaultResetModeRef)ShutdownOS()Use Case: OffPostOSEcuM_Shutdown()from the shutdown hookEcuM_OnGoOffTwo()altShutdown-Ziel RESETEcuM_AL_Reset(EcuM_ResetType)Shutdown-Ziel OFFEcuM_AL_SwitchOff()

Sequence diagram: OffPreOS de-initializes BswM and SchM, checks the wakeup events, and terminates the OS. OffPostOS then branches into reset or shutdown depending on the shutdown target. Sources: SWS EcuM p. 49, SWS EcuM p. 49, [SWS_EcuM_02953], [SWS_EcuM_91002]

SLEEP Phase: GoSleep, Halt or Poll, and WakeupRestart

If SLEEP is selected as the target, EcuM_GoDownHaltPoll initiates the SLEEP phase. The caller must have previously set the appropriate target [SWS_EcuM_91002] SWS EcuM p. 54. In GoSleep, EcuM activates all wakeup sources from EcuMWakeupSourceMask of the target sleep mode via EcuM_EnableWakeupSources. On multicore ECUs, it additionally acquires the core-specific resource RES_AUTOSAR_ECUM. Unlike during shutdown, the OS remains active [SWS_EcuM_02389] [SWS_EcuM_03010] [SWS_EcuM_02951]. No wakeup event must be lost. If one has already occurred during GoSleep, Halt and Poll are skipped [SWS_EcuM_02188].

Sleep modes that halt the microcontroller execute the Halt sequence. Before that, EcuM calls EcuM_GenerateRamHash, and afterwards EcuM_CheckRamHash [SWS_EcuM_02960] [SWS_EcuM_02863]. In contrast, sleep modes with reduced clock speed use the Poll sequence. It calls EcuM_SleepActivity and EcuM_CheckWakeup in a blocking loop until an event is reported as pending or validated [SWS_EcuM_02962] [SWS_EcuM_03020]. In R20-11, EcuM_CheckWakeup is still a callout. Only starting with R21-11 is this callout named EcuM_CheckWakeupHook [SWS_EcuM_02929] SWS EcuM p. 145.

A wakeup event leads to the WakeupRestart sequence [SWS_EcuM_02963] SWS EcuM p. 56:

  1. The MCU returns to normal mode.
  2. EcuM_DisableWakeupSources disables the currently pending wakeup sources; all others remain armed [SWS_EcuM_02922].
  3. EcuM_AL_DriverRestart re-initializes the affected drivers [SWS_EcuM_02923].
  4. The scheduler is released again.

If a hardware reset or power cycle occurs during sleep, the ECU restarts in STARTUP instead [SWS_EcuM_04001].

SLEEP phase: GoSleep, Halt or Poll, WakeupRestartBswMEcuMIntegration CodeOsMcuWeckquelle (Treiber)EcuM_SelectShutdownTarget(SLEEP, Schlafmodus)EcuM_GoDownHaltPoll(UserID)Use Case: GoSleepEcuM_EnableWakeupSources(EcuMWakeupSourceMask of the sleep mode)BswM_EcuM_CurrentWakeup(sources, ECUM_WKSTATUS_NONE)GetResource(RES_AUTOSAR_ECUM_<core#>)altsleep mode stops the µC (Halt)EcuM_GenerateRamHash()Mcu_SetMode(Schlafmodus)HALT until wakeup interruptEcuM_CheckRamHash()sleep mode with reduced clock rate (Poll)Mcu_SetMode(Schlafmodus)loopno event pending or validatedEcuM_SleepActivity()EcuM_CheckWakeup(wakeupSource)<Module>_CheckWakeup()EcuM_SetWakeupEvent(sources)falls Weckereignis erkanntUse Case: WakeupRestartMcu_SetMode(EcuMNormalMcuModeRef)EcuM_GetPendingWakeupEvents()EcuM_DisableWakeupSources(pending)EcuM_AL_DriverRestart()ReleaseResource(RES_AUTOSAR_ECUM_<core#>)

Sequence diagram: GoSleep prepares the wakeup sources, Halt or Poll implement sleep, and WakeupRestart leads back to the UP state. Sources: SWS EcuM p. 52, SWS EcuM p. 85, SWS EcuM p. 87, SWS EcuM p. 58

Optionally, EcuM maintains a clock that counts the seconds since the battery was connected [SWS_EcuM_04069]. Each user can set at most one wakeup alarm. The master alarm always corresponds to the earliest user alarm [SWS_EcuM_04070] [SWS_EcuM_04072]. EcuM_SetAbsWakeupAlarm rejects a later point in time with ECUM_E_EARLIER_ACTIVE and one that has already passed with ECUM_E_PAST [SWS_EcuM_04059] [SWS_EcuM_04060]. When leaving SLEEP, EcuM discards all alarms [SWS_EcuM_04009].

Wakeup Sources: States, Validation, and Querying

EcuM manages up to 32 wakeup sources as a bitmask of type EcuM_WakeupSourceType. Five bits are predefined, including ECUM_WKSOURCE_POWER and ECUM_WKSOURCE_RESET. Further sources are assigned bits 5 through 31 via EcuMWakeupSourceId [SWS_EcuM_04040] [SWS_EcuM_02165] [SWS_EcuM_02166] SWS EcuM p. 63. Each source is in one of the states NONE, PENDING, VALIDATED, or EXPIRED [SWS_EcuM_04091] [SWS_EcuM_04041]. EcuM reports every state transition to BswM as a mode request [SWS_EcuM_04003].

weckzustaende start Power On NONE ECUM_WKSTATUS_NONE entry: BswM_EcuM_CurrentWakeup(sources, NONE) start->NONE PENDING ECUM_WKSTATUS_PENDING entry: BswM_EcuM_CurrentWakeup(sources, PENDING) entry: EcuM_StartWakeupSources() do: Validierungssequenz NONE->PENDING EcuM_SetWakeupEvent [with validation] VALIDATED ECUM_WKSTATUS_VALIDATED entry: BswM_EcuM_CurrentWakeup(sources, VALIDATED) entry: ComM_EcuM_WakeUpIndication() NONE->VALIDATED EcuM_SetWakeupEvent [without validation] PENDING->NONE EcuM_ClearWakeupEvent PENDING->VALIDATED EcuM_ValidateWakeupEvent EXPIRED ECUM_WKSTATUS_EXPIRED entry: BswM_EcuM_CurrentWakeup(sources, EXPIRED) entry: EcuM_StopWakeupSources() PENDING->EXPIRED Validierungs-Timeout (EcuM_MainFunction) VALIDATED->NONE EcuM_ClearWakeupEvent EXPIRED->NONE EcuM_ClearWakeupEvent

State diagram: A wakeup source transitions from NONE via PENDING to VALIDATED or EXPIRED. Every state transition is reported to BswM, and EcuM_ClearWakeupEvent resets the source to NONE. Sources: SWS EcuM p. 60, [SWS_EcuM_04091], [SWS_EcuM_02683]

A driver reports a detected event exactly once with EcuM_SetWakeupEvent SWS EcuM p. 71. The function may also be called from interrupt context and from OS-free context. It ORs the passed bits into the pending variable. It ignores sources that do not belong to the selected sleep mode [SWS_EcuM_02826] [SWS_EcuM_02171] [SWS_EcuM_01117] [SWS_EcuM_04138].

If the event must be validated, EcuM starts a source-specific timeout according to EcuMValidationTimeout. If the same source is reported again, the timeout does not restart [SWS_EcuM_02975] [SWS_EcuM_02565] [SWS_EcuM_02709] [SWS_EcuM_02712]. If no validation is configured for a source, EcuM_SetWakeupEvent simultaneously acts like EcuM_ValidateWakeupEvent. The five predefined sources are never validated [SWS_EcuM_02566] [SWS_EcuM_02625].

Validation itself runs in EcuM_MainFunction, which calls the callout EcuM_CheckValidation for this purpose [SWS_EcuM_02539] [SWS_EcuM_02925] SWS EcuM p. 64. EcuM_ValidateWakeupEvent has the following effect [SWS_EcuM_02710] [SWS_EcuM_04078] [SWS_EcuM_04079] [SWS_EcuM_02645] [SWS_EcuM_04140]:

  • It stops the timeout and sets the bits in the validated variable.
  • It reports ECUM_WKSTATUS_VALIDATED to BswM.
  • If a channel or PNC is configured, it calls ComM_EcuM_WakeUpIndication or ComM_EcuM_PNCWakeUpIndication, respectively.

If the timeout expires, the main function sets the expired bit and reports ECUM_WKSTATUS_EXPIRED [SWS_EcuM_04081] [SWS_EcuM_04082]. In the RUN state, validation only takes effect for communication channels [SWS_EcuM_02790] [SWS_EcuM_02791].

validierung a Treiber erkennt Weckereignis: EcuM_SetWakeupEvent(sources) b source belongs to the selected sleep mode? a->b x Ereignis ignorieren b->x no c Validierung konfiguriert? (EcuMValidationTimeout) b->c yes e Bits in Pending-Variable setzen, quellenspezifischen Timeout starten c->e yes h Timeout stoppen, Validated-Bits setzen, BswM_EcuM_CurrentWakeup(VALIDATED), ComM_EcuM_WakeUpIndication / PNCWakeUpIndication (falls Kanal/PNC konfiguriert) c->h nein: impliziter EcuM_ValidateWakeupEvent f EcuM_MainFunction: EcuM_CheckValidation(wakeupSource) e->f g EcuM_ValidateWakeupEvent eingetroffen? f->g g->h yes i Timeout abgelaufen? g->i no i->f no j Expired-Bit setzen, BswM_EcuM_CurrentWakeup(EXPIRED), EcuM_StopWakeupSources() i->j yes

Activity diagram: For sources without validation requirement, an event is validated immediately. For the remaining sources, it remains PENDING until EcuM_ValidateWakeupEvent arrives or the timeout expires and the source becomes EXPIRED. Sources: SWS EcuM p. 63, SWS EcuM p. 78, [SWS_EcuM_02566], [SWS_EcuM_04082]

EcuM_GetPendingWakeupEvents, EcuM_GetValidatedWakeupEvents, and EcuM_GetExpiredWakeupEvents query the current state. EcuM_ClearWakeupEvent clears the passed bits from all three variables [SWS_EcuM_01156] [SWS_EcuM_02533] [SWS_EcuM_04076] [SWS_EcuM_02683].

Some wakeup sources have an integrated power supply, so their wakeup acts like a power-on reset. For them, EcuM_StartCheckWakeup starts a CheckWakeupTimer that prevents premature shutdown. EcuM_SetWakeupEvent or EcuM_EndCheckWakeup stops the timer again [SWS_EcuM_04096] [SWS_EcuM_04098] [SWS_EcuM_02927] SWS EcuM p. 70.

Behavior in the event of an error

EcuM reports unrecoverable errors via the callout EcuM_ErrorHook with the associated error code [SWS_EcuM_04033] [SWS_EcuM_02904]. In R20-11, there are two codes for this [SWS_EcuM_91003] [SWS_EcuM_02987]:

  • ECUM_E_CONFIGURATION_DATA_INCONSISTENT in case of inconsistent post-build data.
  • ECUM_E_RAM_CHECK_FAILED if the RAM check after wakeup fails.

If an OS call fails, EcuM maintains the requested state and likewise calls the ErrorHook [SWS_EcuM_04139]. A dedicated code ECUM_E_OS_CALL_FAILED and the note that the hook does not return are only included in a later version of the specification SWS EcuM p. 102. EcuM ignores errors during initialization, for example the return values of init functions [SWS_EcuM_02980].

When development error detection is enabled, all functions check their parameters and execution conditions. ECUM_E_UNINIT, ECUM_E_SERVICE_DISABLED, ECUM_E_PARAM_POINTER, and ECUM_E_INVALID_PAR are available for this purpose [SWS_EcuM_03009]. EcuM reports further cases to DET:

If a wakeup event occurs during shutdown, EcuM completes the shutdown and restarts immediately [SWS_EcuM_02756]. If the ECU cannot de-energize itself in EcuM_AL_SwitchOff, a reset is an appropriate response [SWS_EcuM_02920] SWS EcuM p. 141.

Further detailed evidence

This guide was created with AI assistance from specification excerpts for the module EcuM (Classic Platform, R20-11). The linked requirements are authoritative; statements marked as interpretations are not normatively verified.

ECU State Manager (EcuM)

Controls ECU lifecycle states: Startup, Run, PostRun, Sleep, and Shutdown.

Funktionen — Übersicht

Typen — Übersicht

Funktionen & Typen — Detailansicht

function EcuM_GoDownHaltPoll [SWS_EcuM_91002] 📄 PDF

Std_ReturnType EcuM_GoDownHaltPoll (EcuM_UserType UserID);

Instructs the ECU State Manager module to go into a sleep mode, Reset or OFF depending on the previously selected shutdown target.

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

The synchronous and reentrant function EcuM_GoDownHaltPoll instructs the ECU State Manager module to transition into a sleep mode, a reset, or the OFF state depending on the previously selected shutdown target [SWS_EcuM_91002]. It is available via the header file EcuM.h and has the service ID 0x2c [SWS_EcuM_91002].

Parameters and call authorization

UserID of type EcuM_UserType is passed as the sole input parameter. This identifies the calling user. Calling is strictly regulated: Only preconfigured users may execute this function [SWS_EcuM_91002].

Return values and execution behavior

The return behavior largely depends on the type of shutdown target set [SWS_EcuM_91002]:

  • E_NOT_OK: The request was not accepted [SWS_EcuM_91002].
  • E_OK: If the target is SLEEP, the function returns successfully with this status after leaving the sleep state [SWS_EcuM_91002].
  • No return: If RESET or OFF was selected as the shutdown target, the function call no longer returns to the caller [SWS_EcuM_91002].

Restrictions and Error Handling

Although the function is formally declared as reentrant, its intended execution requires the prior definition of a valid shutdown target [SWS_EcuM_91002]. Specific DET or DEM error codes are not listed in the interface specification; a failure or rejection of the request is indicated directly via the return value E_NOT_OK [SWS_EcuM_91002].

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

Implementer's Guide to follow (complexity I1)

function EcuM_Init [SWS_EcuM_02811] 📄 PDF

void EcuM_Init (void);

Initializes the ECU state manager and carries out the startup procedure. The function will never return (it calls StartOS)

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

The synchronous service function EcuM_Init initializes the ECU State Manager and initiates the orderly startup sequence of the ECU ([SWS_EcuM_02811]). It is declared via the header EcuM.h with the service ID 0x01, takes no parameters, and returns no return value ([SWS_EcuM_02811]). Formally classified as reentrant, EcuM_Init never returns to the caller after being called because it transfers execution to the operating system by calling StartOS ([SWS_EcuM_02811]).

As part of its execution, the function processes the defined StartPreOS sequence and its activities in the exact specified order ([SWS_EcuM_02411], [SWS_EcuM_02684]). An essential component of this phase is checking the configuration consistency: Within EcuM_Init, the module checks whether the corresponding structure field is identical to the value of ECUM_CONFIGCONSISTENCY_HASH ([SWS_EcuM_02798]).

In addition, EcuM_Init controls the initialization of the drivers on multicore systems ([SWS_EcuM_04145]). The function calls the callouts EcuM_AL_DriverInitZero and EcuM_AL_DriverInitOne on each individual core ([SWS_EcuM_04145]). For the callout implementations, the requirement applies to ensure that on the respective active core, only those MCAL modules are initialized that are actually executed on this core ([SWS_EcuM_04145]).

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

Implementer's Guide to follow (complexity I2)

function EcuM_StartupTwo [SWS_EcuM_02838] 📄 PDF

void EcuM_StartupTwo (void);

This function implements the STARTUP II state.

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

The synchronous and non-reentrant function EcuM_StartupTwo implements the STARTUP II state of the ECU State Manager [SWS_EcuM_02838]. The interface is declared via the header file EcuM.h and has the service ID 0x1a [SWS_EcuM_02838]. According to the function signature void EcuM_StartupTwo(void), the call accepts neither input parameters nor input/output or output parameters and returns no return value to the caller [SWS_EcuM_02838].

When the ECU Manager module is activated by the function EcuM_StartupTwo, it executes the actions of the StartPostOS sequence [SWS_EcuM_02932].

Essential requirements exist for integration regarding the call context and concurrency: The function must imperatively be called from a task that is started directly as a consequence of StartOS [SWS_EcuM_02806]. This requires that the call of EcuM_StartupTwo takes place either from an autostart task or from a task that is explicitly started [SWS_EcuM_02806]. Since the function is specified as non-reentrant, no concurrent or multiple calls may take place [SWS_EcuM_02838].

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

Implementer's Guide to follow (complexity I1)

function EcuM_Shutdown [SWS_EcuM_02812] 📄 PDF

void EcuM_Shutdown (void);

Typically called from the shutdown hook, this function takes over execution control and will carry out GO OFF II activities.

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

The synchronous service function EcuM_Shutdown (service ID 0x02) is provided via the header file EcuM.h and takes over execution control for carrying out the activities of the "GO OFF II" phase [SWS_EcuM_02812]. It serves for the final termination of the shutdown process [SWS_EcuM_02953].

Call Context and Semantics

Typically, the function is called from the shutdown hook [SWS_EcuM_02812]. According to the requirements, this hook is explicitly obligated to call EcuM_Shutdown in order to terminate the shutdown procedure [SWS_EcuM_02953].

Concurrency and Control Flow

In the specification, EcuM_Shutdown is declared as reentrant [SWS_EcuM_02812]. For the program flow, however, the strict requirement applies that EcuM_Shutdown must not return to the caller [SWS_EcuM_02953]. After execution, the function shuts down the ECU permanently or alternatively triggers a reset [SWS_EcuM_02953].

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

Implementer's Guide to follow (complexity I1)

function EcuM_SetState [SWS_EcuM_04122] 📄 PDF

void EcuM_SetState (EcuM_StateType state);

Function called by BswM to notify about State Switch.

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

Usage and Call Context

The synchronous function EcuM_SetState serves the BswM to notify the EcuM of a state change [SWS_EcuM_04122]. The input parameter passed is state of type EcuM_StateType, which specifies the state predetermined by the BswM [SWS_EcuM_04122]. The function has no return value [SWS_EcuM_04122].

Functional principle and interaction

When called, the function sets the internal state of the EcuM to the value of parameter state [SWS_EcuM_04123]. If the BswM sets a state of the EcuM in this way, the EcuM indicates the corresponding mode to the RTE [SWS_EcuM_04116].

Error handling

If the passed value of parameter state is invalid, EcuM_SetState does not change the EcuM state [SWS_EcuM_04123]. If development error reporting is enabled, the function additionally reports the error ECUM_E_STATE_PAR_OUT_OF_RANGE to the DET module in this error case [SWS_EcuM_04123].

Concurrency and interface

Execution is synchronous and reentrant [SWS_EcuM_04122]. The service is declared via the header file EcuM.h [SWS_EcuM_04122].

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

Implementer's Guide to follow (complexity I1)

function EcuM_RequestRUN [SWS_EcuM_04124] 📄 PDF

Std_ReturnType EcuM_RequestRUN (EcuM_UserType user);

Places a request for the RUN state. Requests can be placed by every user made known to the state manager at configuration time.

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

use

The synchronous and reentrant function EcuM_RequestRUN serves to request the RUN state from the ECU State Manager [SWS_EcuM_04124]. The identifier of the requesting entity is passed as a parameter via user of type EcuM_UserType; only users that have already been made known to the state manager at configuration time are authorized [SWS_EcuM_04124]. The function returns E_OK if the EcuM accepted the request, otherwise E_NOT_OK [SWS_EcuM_04124]. The service is declared via the header EcuM.h [SWS_EcuM_04124].

Error Handling and Restrictions

Requests must not be nested: A single user can hold at most one active RUN request at a time [SWS_EcuM_04125]. If EcuM_RequestRUN detects repeated or duplicate calls by the same user, the error code ECUM_E_MULTIPLE_RUN_REQUESTS is reported to the DET if development error detection is enabled [SWS_EcuM_03024], [SWS_EcuM_04125].

Interaction

Each state request successfully set with EcuM_RequestRUN must be released again after completion of the activity. For this purpose, the complementary, likewise synchronous and reentrant service EcuM_ReleaseRUN is available, to which the same user ID is passed [SWS_EcuM_04127].

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

Implementer's Guide to follow (complexity I2)

function EcuM_ReleaseRUN [SWS_EcuM_04127] 📄 PDF

Std_ReturnType EcuM_ReleaseRUN (EcuM_UserType user);

Releases a RUN request previously done with a call to EcuM_RequestRUN. The service is intended for implementing AUTOSAR ports.

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

use

The synchronous function EcuM_ReleaseRUN (service ID 0x04) serves to release a RUN state request previously registered via EcuM_RequestRUN [SWS_EcuM_04127]. The interface is provided via header EcuM.h and is primarily intended for the implementation of AUTOSAR ports [SWS_EcuM_04127]. As an input parameter, the function expects the user identifier user of type EcuM_UserType, which uniquely identifies the releasing entity within the module [SWS_EcuM_04127].

The return value of type Std_ReturnType signals with E_OK that the release request was successfully accepted by the module [SWS_EcuM_04127]. If the release could not be processed, the service returns the error value E_NOT_OK [SWS_EcuM_04127].

Error Handling and Concurrency

Specific error codes, development errors (DET), or production errors (DEM) are not listed in the specification; the rejection of a request manifests exclusively via the return of E_NOT_OK [SWS_EcuM_04127]. It is to be assumed (Interpretation:) that a return of E_NOT_OK presumably occurs when there is no active request for the specified user ID or an invalid parameter value was passed. Question Q-cbe9031cffe1be81 (open)

The function is declared as reentrant and may therefore be called in concurrent execution contexts [SWS_EcuM_04127]. As a functional sequencing constraint, the call strictly requires that the corresponding user has previously requested the state via EcuM_RequestRUN [SWS_EcuM_04127].

Interaction

The EcuM module provides this service to terminate holding the RUN state via defined ports [SWS_EcuM_04127]. For RTE configuration and interaction with local RTE runtime behavior, the specification defines the internal behavior of the EcuStateManager with multiple concurrently executable runnable entities [SWS_EcuM_03018].

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

Implementer's Guide to follow (complexity I1)

function EcuM_RequestPOST_RUN [SWS_EcuM_04128] 📄 PDF

Std_ReturnType EcuM_RequestPOST_RUN (EcuM_UserType user);

Places a request for the POST RUN state. Requests can be placed by every user made known to the state manager at configuration time. Requests for RUN and POST RUN must be tracked independently (in other words: two independent variables). The service is intended for implementing AUTOSAR ports.

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

use

The synchronous function EcuM_RequestPOST_RUN serves to request the POST RUN state from the ECU State Manager ([SWS_EcuM_04128]). The caller identifies itself via the parameter user, whereby each requesting entity must have already been made known to the state manager at configuration time ([SWS_EcuM_04128]). The service is declared in the header EcuM.h, intended for the implementation of AUTOSAR ports, and acknowledges successful acceptance with E_OK or rejection with E_NOT_OK ([SWS_EcuM_04128]).

Error handling

If the detection of development errors is enabled, a repeated call by the same user causes EcuM_RequestPOST_RUN to report the error ECUM_E_MULTIPLE_RUN_REQUESTS to the DET ([SWS_EcuM_03025]). Interpretation: In the case of such multiple requests or with invalid user IDs, the service would presumably respond with E_NOT_OK ([SWS_EcuM_04128]). Question Q-b5bbd7d5b53e76ba (open)

Concurrency and Interaction

The function is designed to be reentrant ([SWS_EcuM_04128]). In the module, the requests for RUN and POST RUN must be tracked strictly independently of each other via two separate variables ([SWS_EcuM_04128]). Each request registered via this service keeps the POST RUN state active until it is explicitly revoked again by the complementary call of EcuM_ReleasePOST_RUN ([SWS_EcuM_04129]).

This text was generated automatically. All technical content is based on the AUTOSAR specification.

Implementer's Guide to follow (complexity I2)

function EcuM_ReleasePOST_RUN [SWS_EcuM_04129] 📄 PDF

Std_ReturnType EcuM_ReleasePOST_RUN (EcuM_UserType user);

Releases a POST RUN request previously done with a call to EcuM_RequestPOST_RUN. The service is intended for implementing AUTOSAR ports.

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

Usage and Semantics

The synchronous and reentrant function EcuM_ReleasePOST_RUN ([SWS_EcuM_04129]) serves to release a POST-RUN request previously set via EcuM_RequestPOST_RUN. The identifier of the entity that releases the POST-RUN status is passed via input parameter user of type EcuM_UserType. The interface is available via header file EcuM.h and is primarily designed for realizing AUTOSAR ports ([SWS_EcuM_04129]).

Return Values and Error Handling

The function returns the status Std_ReturnType ([SWS_EcuM_04129]):

  • E_OK: The release request was successfully accepted by the ECU State Manager.
  • E_NOT_OK: The release request was rejected. Interpretation: A rejection with E_NOT_OK is likely to occur if no active request was registered for the specified user or an invalid user identifier was passed. Question Q-67bd8594612defca (open)

Concurrency and Interaction

The service is specified as reentrant ([SWS_EcuM_04129]), so that concurrent calls by multiple entities are permissible. The function is part of the internal behavior of module EcuM ([SWS_EcuM_03018]). The call logically requires that the entity has previously requested the POST RUN phase ([SWS_EcuM_04129]). Interpretation: The call is typically expected to occur from software components via RTE ports as soon as their post-run activities before shutdown are completed. Question Q-81f71656d4debb4a (open)

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

Implementer's Guide to follow (complexity I1)

function EcuM_SelectShutdownTarget [SWS_EcuM_02822] 📄 PDF

Std_ReturnType EcuM_SelectShutdownTarget (EcuM_ShutdownTargetType shutdownTarget, EcuM_ShutdownModeType shutdownMode);

EcuM_SelectShutdownTarget selects the shutdown target. EcuM_SelectShutdownTarget is part of the ECU Manager Module port interface.

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

The synchronous service function EcuM_SelectShutdownTarget serves to select the shutdown target for the ECU and is provided via the header file EcuM.h as well as part of the port interface of the ECU Manager module [SWS_EcuM_02822]. Calling it sets the internal shutdown target to the value of the passed parameter shutdownTarget [SWS_EcuM_00624].

The function expects two input parameters [SWS_EcuM_02822]:

  • shutdownTarget: Determines the selected shutdown target [SWS_EcuM_02822].
  • shutdownMode: Contains the identifier of a sleep mode (if the target is ECUM_SHUTDOWN_TARGET_SLEEP) or a reset mechanism (if the target is ECUM_SHUTDOWN_TARGET_RESET) according to configuration [SWS_EcuM_02822].

The call does not trigger any immediate setup or execution activities, but merely stores the values for later use in phase SHUTDOWN or SLEEP [SWS_EcuM_02585].

Regarding concurrency, the function is specified as reentrant [SWS_EcuM_02822]. In the RTE internal behavior of the ECU State Manager, the corresponding runnable entity SelectShutdownTarget is declared with canbeInvokedConcurrently = TRUE [SWS_EcuM_03018], which permits parallel calls.

The return value of type Std_ReturnType signals with E_OK that the new shutdown target was successfully set, and with E_NOT_OK that the adoption failed [SWS_EcuM_02822]. The specification does not mention concrete error causes for E_NOT_OK or DET reports at this point; presumably, invalid or unconfigured combinations of target and mode lead to rejection. Question Q-e916f3a6ac0bf47e (open)

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

Implementer's Guide to follow (complexity I2)

function EcuM_SelectShutdownCause [SWS_EcuM_04050] 📄 PDF

Std_ReturnType EcuM_SelectShutdownCause (EcuM_ShutdownCauseType target);

EcuM_SelectShutdownCause elects the cause for a shutdown. EcuM_SelectShutdownCause is part of the ECU Manager Module port interface.

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

The synchronous function EcuM_SelectShutdownCause serves to select the cause for a shutdown of the ECU and is available via the header file EcuM.h [SWS_EcuM_04050].

Usage and semantics:

  • Parameters: The input parameter target of type EcuM_ShutdownCauseType passes the selected shutdown cause [SWS_EcuM_04050].
  • Return value: A return value of type Std_ReturnType signals with E_OK that the new cause was successfully set, and with E_NOT_OK that setting failed [SWS_EcuM_04050].
  • Execution: The service operates synchronously under the service ID 0x1b and is specified as reentrant [SWS_EcuM_04050].

Concurrency and Interaction:

The function is part of the port interface of the ECU Manager module [SWS_EcuM_04050]. For the configuration of the local RTE, the runnable entity SelectShutdownCause with the symbol EcuM_SelectShutdownCause is defined in the internal behavior EcuStateManager, where the property canbeInvokedConcurrently = TRUE is assigned [SWS_EcuM_03018].

Error handling:

No specific DET or DEM messages are identified within the scope of the specification; error states when setting the cause are indicated exclusively via the return value E_NOT_OK [SWS_EcuM_04050].

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

Implementer's Guide to follow (complexity I1)

function EcuM_GetShutdownCause [SWS_EcuM_04051] 📄 PDF

Std_ReturnType EcuM_GetShutdownCause (EcuM_ShutdownCauseType* shutdownCause);

EcuM_GetShutdownCause returns the selected shutdown cause as set by EcuM_Select ShutdownCause. EcuM_GetShutdownCause is part of the ECU Manager Module port interface.

function EcuM_ClearWakeupEvent [SWS_EcuM_02828] 📄 PDF

void EcuM_ClearWakeupEvent (EcuM_WakeupSourceType sources);

Clears wakeup events.

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

The synchronous service function EcuM_ClearWakeupEvent (service ID 0x16) serves to reset wakeup events and is available via the header file EcuM.h [SWS_EcuM_02828]. As a parameter, it takes the bitmask sources of type EcuM_WakeupSourceType and has no return value [SWS_EcuM_02828].

Upon being called, all pending events set as bits in sources are cleared from three internal variables of the module [SWS_EcuM_02683]:

  • from the internal variable for pending wakeup events (pending wakeup events),
  • from the internal variable for validated wakeup events (validated events), and
  • from the internal variable for expired wakeup events (expired events) [SWS_EcuM_02683].

Regarding the call context, EcuM_ClearWakeupEvent may be called flexibly from the interrupt context, from the regular OS context, as well as from an OS-free context [SWS_EcuM_02807]. At the same time, however, the function is mandatorily specified as non-reentrant (Non-Reentrant) and non-interruptible (Non-Interruptible) [SWS_EcuM_02828]. Interpretation: Since the function is permitted in different contexts but is non-interruptible, the integrator or caller is likely required to ensure organizationally that no concurrent or mutually interrupting calls take place. Question Q-71a4b1b218505a1c (open)

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

function EcuM_AbortWakeupAlarm [SWS_EcuM_04061] 📄 PDF

Std_ReturnType EcuM_AbortWakeupAlarm (EcuM_UserType user);

Ecum_AbortWakeupAlarm aborts the wakeup alarm previously set by this user. EcuM_Abort WakeupAlarm is part of the ECU Manager Module port interface.

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

The synchronous function EcuM_AbortWakeupAlarm serves to cancel a wakeup alarm previously set by a user [SWS_EcuM_04061]. The interface is available via the header file EcuM.h and forms part of the port interface of the ECU Manager module [SWS_EcuM_04061].

Parameters and Return Values

  • user (In): Identifier of the user of type EcuM_UserType who wishes to cancel the wakeup alarm [SWS_EcuM_04061]. Input/output or pure output parameters do not exist [SWS_EcuM_04061].
  • E_OK: The service was executed successfully and the alarm was canceled [SWS_EcuM_04061].
  • ECUM_E_NOT_ACTIVE: No active alarm belonging to the passed user was found [SWS_EcuM_04061].
  • E_NOT_OK: Execution of the service failed [SWS_EcuM_04061].

Concurrency and Interaction

The function has the service ID 0x24 and is specified as reentrant [SWS_EcuM_04061]. Calls can thus take place concurrently for different users. The internal behavior of the ECU Manager defines the executable entities for configuring the local RTE [SWS_EcuM_03018]; as part of the module port interface, the call is typically expected to be initiated by software components via the RTE. Question Q-2c8f004d9f00bbd3 (open)

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

Implementer's Guide to follow (complexity I1)

function EcuM_GetCurrentTime [SWS_EcuM_04062] 📄 PDF

Std_ReturnType EcuM_GetCurrentTime (EcuM_TimeType* time);

EcuM_GetCurrentTime returns the current value of the EcuM clock (i.e. the time since battery connect). EcuM_GetCurrentTime is part of the ECU Manager Module port interface.

function EcuM_GetWakeupTime [SWS_EcuM_04063] 📄 PDF

Std_ReturnType EcuM_GetWakeupTime (EcuM_TimeType* time);

EcuM_GetWakeupTime returns the current value of the master alarm clock (the minimum absolute time of all user alarm clocks). EcuM_GetWakeupTime is part of the ECU Manager Module port interface.

function EcuM_SetClock [SWS_EcuM_04064] 📄 PDF

Std_ReturnType EcuM_SetClock (EcuM_UserType user, EcuM_TimeType time);

EcuM_SetClock sets the EcuM clock time to the provided value. This API is useful for testing the alarm services; Alarms that take days to expire can be tested. EcuM_SetClock is part of the ECU Manager Module port interface.

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

According to [SWS_EcuM_04064], the synchronous and reentrant function EcuM_SetClock serves to set the internal time of the ECU State Manager to a predetermined value. As part of the port interface of the ECU Manager, the function can be included and called via the header file EcuM.h [SWS_EcuM_04064].

The main application purpose of the interface is testing alarm services: alarms whose regular expiration would take days can be verified in test operation by deliberately setting the time [SWS_EcuM_04064]. In doing so, two input parameters are passed:

  • user (type EcuM_UserType): Identifier of the caller or user wishing to set the time.
  • time (type EcuM_TimeType): Absolute time specification in seconds since connecting the battery (Battery Connect).

As a return value, the service returns the status Std_ReturnType with E_OK upon successful execution or E_NOT_OK in case of error [SWS_EcuM_04064]. Concrete error causes or DET messages are not specified at the interface; presumably, passing unauthorized user IDs or invalid time values leads to the return of E_NOT_OK. Question Q-248768580c0309e8 (open)

With regard to the internal module behavior and the RTE configuration, the function integrates into the structure of the runnable entities of the EcuStateManager [SWS_EcuM_03018].

This text was generated by an AI and serves for technical orientation.

Implementer's Guide to follow (complexity I1)

function EcuM_SelectBootTarget [SWS_EcuM_02835] 📄 PDF

Std_ReturnType EcuM_SelectBootTarget (EcuM_BootTargetType target);

EcuM_SelectBootTarget selects a boot target. EcuM_SelectBootTarget is part of the ECU Manager Module port interface.

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

The synchronous function EcuM_SelectBootTarget serves to select a boot target for the ECU and is part of the port interface of the ECU Manager as well as available via the header EcuM.h [SWS_EcuM_02835]. The desired target is passed via the input parameter target of type EcuM_BootTargetType [SWS_EcuM_02835].

As a return value, the function signals E_OK if the new boot target was accepted by the EcuM, otherwise E_NOT_OK [SWS_EcuM_02835]. The implementation must store the selected target in a manner that is compatible with the bootloader [SWS_EcuM_02247]. The currently set value can be queried via the complementary service EcuM_GetBootTarget [SWS_EcuM_02836].

The function is specified as reentrant [SWS_EcuM_02835]; within the internal behavior for the RTE configuration, the runnable entity SelectBootTarget is declared with canbeInvokedConcurrently = TRUE [SWS_EcuM_03018]. As a restriction, this service is intended exclusively for software components (SW-Cs) related to diagnostics or boot management and may depend on the specifically deployed bootloader [SWS_EcuM_03000].

This text was generated by an AI and is based on the requirements of the AUTOSAR specification.

Implementer's Guide to follow (complexity I1)

function EcuM_GetBootTarget [SWS_EcuM_02836] 📄 PDF

Std_ReturnType EcuM_GetBootTarget (EcuM_BootTargetType* target);

EcuM_GetBootTarget returns the current boot target - see EcuM_SelectBootTarget. EcuM_Get BootTarget is part of the ECU Manager Module port interface.

function EcuM_ValidateWakeupEvent [SWS_EcuM_02829] 📄 PDF

void EcuM_ValidateWakeupEvent (EcuM_WakeupSourceType sources);

After wakeup, the ECU State Manager will stop the process during the WAKEUP VALIDATION state/sequence to wait for validation of the wakeup event.This API service is used to indicate to the ECU Manager module that the wakeup events indicated in the sources parameter have been validated.

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

EcuM_ValidateWakeupEvent is a synchronous service (service ID 0x14) that signals to the ECU Manager that the wakeup sources passed in parameter sources have been successfully validated ([SWS_EcuM_02829]). After wakeup, the ECU State Manager waits for this confirmation in the validation sequence. Upon being called, the function stops the running timeout timer of the validation ([SWS_EcuM_02710]) and enters the passed events into the internal variable for validated wakeup events by ORing the bitmask ([SWS_EcuM_04078]).

The function is reentrant ([SWS_EcuM_02829]) and may be called from both the task and the interrupt context ([SWS_EcuM_02345]). If the ECU Manager is in the state RUN, the call remains without effect for all wakeup sources, provided they are not communication channels ([SWS_EcuM_02790]). For sources assigned to a communication channel, by contrast, the service takes full effect in every phase of the ECU ([SWS_EcuM_02791]).

In the overall sequence, the service interacts closely with wakeup validation and communication management:

  • Validation Check: For checking, the ECU Manager calls the callout EcuM_CheckValidation; if a valid wakeup event is detected, feedback is provided via EcuM_ValidateWakeupEvent ([SWS_EcuM_02925]).
  • Configuration: If no validation protocol is configured for a wakeup source (EcuMValidationTimeout), EcuM_SetWakeupEvent already implies calling EcuM_ValidateWakeupEvent ([SWS_EcuM_02566]).
  • Notification: If EcuMComMChannelRef is configured for the wakeup source, the service calls ComM_EcuM_WakeUpIndication ([SWS_EcuM_02645]). If EcuMComMPNCRef is configured, ComM_EcuM_PNCWakeUpIndication is additionally triggered for each referenced PNC ([SWS_EcuM_04140]).

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

Implementer's Guide to follow (complexity I2)

function EcuM_ErrorHook [SWS_EcuM_02904] 📄 PDF

void EcuM_ErrorHook (uint16 reason);

The ECU State Manager will call the error hook if the error codes "ECUM_E_RAM_CHECK_ FAILED" or "ECUM_E_CONFIGURATION_DATA_INCONSISTENT" occur. In this situation it is not possible to continue processing and the ECU must be stopped. The integrator may choose the modality how the ECU is stopped, i.e. reset, halt, restart, safe state etc.

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

The synchronous and non-reentrant callback function EcuM_ErrorHook (provided via EcuM_Externals.h) is called by the ECU State Manager as soon as severe errors occur that make regular further processing impossible and require stopping the ECU [SWS_EcuM_02904]. Via the parameter reason, the specific error cause is transmitted [SWS_EcuM_02904].

The defined error causes include ECUM_E_RAM_CHECK_FAILED and ECUM_E_CONFIGURATION_DATA_INCONSISTENT [SWS_EcuM_02904]. If the RAM check fails during wakeup, the ECU Manager is obliged to trigger EcuM_ErrorHook with the reason ECUM_E_RAM_CHECK_FAILED [SWS_EcuM_02987]. In addition, error handling is performed via this hook if a call to an operating system function fails and no other error reaction is specified; in this case, the EcuM remains in the previous state [SWS_EcuM_04139].

The following constraints apply to the system integrator during implementation:

  • ECU Stop Modality: The integrator chooses the manner in which the ECU is shut down (e.g. reset, halt, restart, or safe state) [SWS_EcuM_02904]. Interpretation: In the case of drastic measures such as a reset or halt, the function is typically not expected to return to regular control flow. Question Q-59c23e3a2569f670 (open)
  • Error Notification to the DEM: It is at the discretion of the integrator whether the error is forwarded to the DEM, provided it is ensured that the DEM does not write to corrupt NVRAM blocks [SWS_EcuM_02987].

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

Implementer's Guide to follow (complexity I1)

function EcuM_AL_SetProgrammableInterrupts [SWS_EcuM_04085] 📄 PDF

void EcuM_AL_SetProgrammableInterrupts (void);

If the configuration parameter EcuMSetProgrammableInterrupts is set to true, this callout Ecu M_AL_SetProgrammableInterrupts is executed and shall set the interrupts on ECUs with programmable interrupts.

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

Usage and Call Conditions

The callout function EcuM_AL_SetProgrammableInterrupts is called by the module ECU State Manager to configure and set the corresponding interrupts on ECUs with programmable interrupt controllers [SWS_EcuM_04085]. However, execution of this callout only takes place if the configuration parameter EcuMSetProgrammableInterrupts is set to the value true [SWS_EcuM_04085]. If this parameter is not enabled, the call is omitted [SWS_EcuM_04085]. For integrators and platform drivers, the declaration of the interface is provided via the header file EcuM_Externals.h [SWS_EcuM_04085].

The interface has the syntax void EcuM_AL_SetProgrammableInterrupts (void) and is assigned to the service ID 0x4A [SWS_EcuM_04085]. The call is completely parameterless: Neither input, input/output, nor output parameters are passed, and the function returns no return value to the calling module [SWS_EcuM_04085].

Concurrency and Limitations

For EcuM_AL_SetProgrammableInterrupts, an asynchronous execution behavior (Asynchronous) is defined in the specification [SWS_EcuM_04085]. Regarding concurrency, the function is classified as non-reentrant (Non Reentrant) [SWS_EcuM_04085]. For integration, this means that parallel or nested calls to the interface are inadmissible and the interrupt-related configuration must run without concurrent reentrancy [SWS_EcuM_04085].

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

function EcuM_AL_DriverInitZero [SWS_EcuM_02905] 📄 PDF

void EcuM_AL_DriverInitZero (void);

This callout shall provide driver initialization and other hardware-related startup activities for loading the post-build configuration data. Beware: Here only pre-compile and link-time configurable modules may be used.

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

use

The callout function EcuM_AL_DriverInitZero (service ID 0x31) is called synchronously, has neither parameters nor a return value, and is non-reentrant [SWS_EcuM_02905]. It is declared via the header EcuM_Externals.h [SWS_EcuM_02905]. The function serves to provide early driver initializations as well as fundamental hardware-related startup activities that are strictly necessary in order to subsequently load the post-build configuration data [SWS_EcuM_02905].

Constraints and Multicore Operation

Specific specifications and restrictions apply to the implementation and execution:

  • Configuration classes: At this early stage, only modules that are configurable as pre-compile or link-time may be used [SWS_EcuM_02905]. Post-build-configurable drivers are not yet available here.
  • Call context: The function is called by EcuM_Init on each Core of the system [SWS_EcuM_04145].
  • Core-specific initialization: The implementation of the callout must ensure that on the currently active Core, only those MCAL modules are initialized that are actually executed on this specific Core [SWS_EcuM_04145].

Return values, specific error codes, or notifications via DET or DEM are not defined for this callout [SWS_EcuM_02905].

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

Implementer's Guide to follow (complexity I1)

function EcuM_DeterminePbConfiguration [SWS_EcuM_02906] 📄 PDF

const EcuM_ConfigType* EcuM_DeterminePbConfiguration (void);

This callout should evaluate some condition, like port pin or NVRAM value, to determine which post-build configuration shall be used in the remainder of the startup process. It shall load this configuration data into a piece of memory that is accessible by all BSW modules and shall return a pointer to the EcuM post-build configuration as a base for all BSW module post-build configrations.

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

The function EcuM_DeterminePbConfiguration ([SWS_EcuM_02906]) is a synchronous callout of the ECU State Manager that is provided via the header file EcuM_Externals.h and has the service ID 0x32. The interface has no input, output, or input/output parameters ([SWS_EcuM_02906]). Its central purpose is to determine during the startup process, based on hardware or memory conditions, which post-build configuration data set shall be used for the further course of system startup ([SWS_EcuM_02906]).

To determine the configuration, the callout shall evaluate external or resident criteria such as the status of a port pin or a value in NVRAM ([SWS_EcuM_02906]). Subsequently, the function must load this configuration data into a memory segment that all BSW modules can access ([SWS_EcuM_02906]). As a return value, it returns a pointer of type const EcuM_ConfigType* to the EcuM post-build configuration ([SWS_EcuM_02906]). This pointer forms the common starting point for the entire BSW, since the structure contains pointers to the respective post-build configurations of all other BSW modules ([SWS_EcuM_02906]).

Regarding calling behavior, the function is specified as synchronous and non-reentrant (Non Reentrant) ([SWS_EcuM_02906]). Specific error codes, special error return values, as well as interfaces to DET or DEM are not defined for this callout ([SWS_EcuM_02906]). It should therefore be considered an interpretation of the requirements that an application-specific callout implementation must handle error states independently, since the absence of a valid configuration pointer would presumably prevent orderly startup of the dependent BSW modules. Question Q-b9487647fb39a2e2 (open)

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

Implementer's Guide to follow (complexity I1)

function EcuM_AL_DriverInitOne [SWS_EcuM_02907] 📄 PDF

void EcuM_AL_DriverInitOne (void);

This callout shall provide driver initialization and other hardware-related startup activities in case of a power on reset.

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

Usage and Semantics

The function EcuM_AL_DriverInitOne is a callout function of the ECU State Manager (EcuM), which is provided via the header file EcuM_Externals.h [SWS_EcuM_02907]. Its primary task is to perform the initialization of drivers as well as further hardware-related startup activities of the control unit in the event of a power-on reset [SWS_EcuM_02907]. Since this is a callout, the actual implementation of the hardware and driver initialization is likely performed by the respective system integrator. Question Q-e22baf2fa31cf075 (open)

The interface has the C signature void EcuM_AL_DriverInitOne (void) and is assigned to the service ID 0x33 [SWS_EcuM_02907]. It accepts no input parameters and also returns no return value to the caller [SWS_EcuM_02907].

Concurrency and Limitations

According to [SWS_EcuM_02907], the following boundary conditions apply to the call and runtime behavior:

  • Synchronism: Execution is synchronous (Synchronous), so the caller waits for the startup activities to complete.
  • Reentrancy: The function is defined as non-reentrant (Non Reentrant); concurrent or interrupting multiple calls are not permitted.
  • Call context: Activation is specified exclusively for the initialization phase immediately after a power-on reset.

Error handling

Since EcuM_AL_DriverInitOne has the return type void, there is no direct feedback regarding success or failure of the initialization at the interface level [SWS_EcuM_02907]. Specific error codes, DET, or DEM messages are not defined for this callout in the present specification scope.

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

Implementer's Guide to follow (complexity I1)

function EcuM_LoopDetection [SWS_EcuM_04137] 📄 PDF

void EcuM_LoopDetection (void);

If the configuration parameter EcuMResetLoopDetection is set to true, this callout EcuM_Loop Detection is called on every startup.

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

The function EcuM_LoopDetection is a callout of the ECU State Manager with the service ID 0x4B, which is provided via the header file EcuM_Externals.h [SWS_EcuM_04137].

Usage and Call Context

If the configuration parameter EcuMResetLoopDetection is set to true, this callout is called synchronously at each startup [SWS_EcuM_04137]. The function has neither input, input/output, nor output parameters and returns no return value (signature: void EcuM_LoopDetection (void)) [SWS_EcuM_04137].

Concurrency and Limitations

Execution of EcuM_LoopDetection is specified as synchronous and non-reentrant (Non Reentrant) [SWS_EcuM_04137]. Since this is a callout, the concrete implementation of the loop detection is typically the responsibility of the integrator or user to detect repeated reset loops during system startup.

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

Implementer's Guide to follow (complexity I1)

function EcuM_OnGoOffOne [SWS_EcuM_02916] 📄 PDF

void EcuM_OnGoOffOne (void);

This call allows the system designer to notify that the GO OFF I state is about to be entered.

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

use

The function EcuM_OnGoOffOne serves to announce the reaching of the system state GO OFF I and to give the system designer the opportunity to take appropriate measures immediately before the transition [SWS_EcuM_02916]. The function is executed synchronously, expects no passed parameters (neither in nor inout), and returns no return value (void) [SWS_EcuM_02916]. Since the interface is declared via the header file EcuM_Externals.h, it is plausibly a user-specific callout function implemented in the integration code [SWS_EcuM_02916]. Question Q-93de53c47a5a6142 (open)

Error handling

In the specification for EcuM_OnGoOffOne, neither development errors (DET) nor production errors (DEM) or specific error return values are listed [SWS_EcuM_02916]. From this it can be concluded that the caller does not expect standardized error management and any exceptional cases must be handled autonomously within the user-specific implementation [SWS_EcuM_02916].

Concurrency and Limitations

The following properties are defined for the call context and runtime behavior [SWS_EcuM_02916]:

  • Reentrancy: The function is specified as non-reentrant (Non Reentrant) and must under no circumstances be called in parallel or nested [SWS_EcuM_02916].
  • Synchronicity: The semantics are strictly synchronous (Synchronous), so that the caller waits for the complete return of the function [SWS_EcuM_02916].
  • Service ID: The service is represented internally by the hexadecimal identifier 0x3C [SWS_EcuM_02916].

Due to the synchronous behavior and the impending transition into the GO OFF I state, it can be assumed that blocking operations should be avoided so as not to impermissibly delay the shutdown or transition process [SWS_EcuM_02916]. Question Q-93f5e23c581f0c38 (open)

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

Implementer's Guide to follow (complexity I1)

function EcuM_OnGoOffTwo [SWS_EcuM_02917] 📄 PDF

void EcuM_OnGoOffTwo (void);

This call allows the system designer to notify that the GO OFF II state is about to be entered.

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

According to the specification, the synchronous function EcuM_OnGoOffTwo serves to allow the system designer to be notified that the GO OFF II state is imminent [SWS_EcuM_02917]. The call takes place parameterless without in, inout, or out parameters and returns no return value to the caller [SWS_EcuM_02917].

With regard to execution context and concurrency, the interface is assigned the service ID 0x3D and specified as non-reentrant (Non Reentrant) [SWS_EcuM_02917]. It is provided via the header EcuM_Externals.h [SWS_EcuM_02917]. Interpretation: Since the declaration is located in EcuM_Externals.h and serves to notify the system designer, the function is likely designed as a synchronous callout of the ECU management that is called prior to transitioning to the GO OFF II state. Question Q-bb0ae6e4632de827 (open)

Due to the property as a non-reentrant interface, the call must not be repeated concurrently or interrupting [SWS_EcuM_02917]. Specific error codes, notifications to DET or DEM, and separate error handling mechanisms are not defined in the specification scope [SWS_EcuM_02917].

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

Implementer's Guide to follow (complexity I1)

function EcuM_AL_SwitchOff [SWS_EcuM_02920] 📄 PDF

void EcuM_AL_SwitchOff (void);

This callout shall take the code for shutting off the power supply of the ECU. If the ECU cannot unpower itself, a reset may be an adequate reaction.

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

use

The callout function EcuM_AL_SwitchOff is part of the ECU State Manager (EcuM) module and serves to hold the user-specific code for switching off the power supply of the ECU [SWS_EcuM_02920]. The interface is defined as synchronous, has the service ID 0x3E, and is provided via the header file EcuM_Externals.h [SWS_EcuM_02920].

According to the specification, the function accepts neither input, input/output, nor output parameters and has no return value (void) [SWS_EcuM_02920]. If the ECU hardware cannot power itself down, the specification provides that triggering a reset can instead represent an adequate response [SWS_EcuM_02920].

Interaction and Concurrency

The call of EcuM_AL_SwitchOff is performed mandatorily by the module ECU Manager as soon as the selected shutdown target is OFF [SWS_EcuM_04075]. Regarding concurrency behavior, the callout is specified as non-reentrant (Non Reentrant) [SWS_EcuM_02920]. Interpretation: Since the objective of the function is the complete disconnection of the power supply or alternatively a reset, this callout likely represents the final step of the shutdown sequence, after which no further regular program execution takes place. Question Q-e8a1aaa1413bbea9 (open)

Error handling

Neither specific error codes nor error handling mechanisms or messages to DET or DEM are provided for the callout in the specification [SWS_EcuM_02920].

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

Implementer's Guide to follow (complexity I1)

function EcuM_AL_Reset [SWS_EcuM_04065] 📄 PDF

void EcuM_AL_Reset (EcuM_ResetType reset);

This callout shall take the code for resetting the ECU.

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

The callout EcuM_AL_Reset serves to hold the integration-specific code responsible for resetting the ECU ([SWS_EcuM_04065]). The interface is declared via the header file EcuM_Externals.h and has the service ID 0x4C ([SWS_EcuM_04065]).

The function is called synchronously and is defined as non-reentrant (Non Reentrant) ([SWS_EcuM_04065]). As the only input parameter, reset of type EcuM_ResetType is passed, which specifies the concrete type of reset to be performed ([SWS_EcuM_04065]). The function has no return value (void) and has no parameters for output or input/output ([SWS_EcuM_04065]).

In the interaction of the shutdown phase, it is specified that the module ECU Manager must mandatorily call the callout EcuM_AL_Reset when the target of the shutdown is set to RESET ([SWS_EcuM_04074]). Neither error codes nor notifications to DET or DEM are provided for the callout in the specification ([SWS_EcuM_04065]). Interpretation: The callout is likely to execute hardware-related control commands that directly cause the MCU to reset. Question Q-1e318404843faabd (open)

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

Implementer's Guide to follow (complexity I1)

function EcuM_EnableWakeupSources [SWS_EcuM_02918] 📄 PDF

void EcuM_EnableWakeupSources (EcuM_WakeupSourceType wakeupSource);

The ECU Manager Module calls EcuM_EnableWakeupSource to allow the system designer to notify wakeup sources defined in the wakeupSource bitfield that SLEEP will be entered and to adjust their source accordingly.

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

The function EcuM_EnableWakeupSources is a synchronous callout of the ECU Manager with the service ID 0x3F, which is declared via the header EcuM_Externals.h [SWS_EcuM_02918]. It serves to inform the system developer that the state SLEEP is imminent so that the wakeup sources specified in the bit field wakeupSource (type EcuM_WakeupSourceType) can be appropriately prepared and configured [SWS_EcuM_02918].

Usage and Interaction

The ECU Manager executes EcuM_EnableWakeupSources to configure the wakeup sources for the next sleep mode; this is done for each wakeup source configured in EcuMWakeupSourceMask for the targeted sleep mode [SWS_EcuM_02389]. The function has no return value (void) and expects the bit field wakeupSource as an input parameter [SWS_EcuM_02918].

Concurrency and Limitations

  • Reentrancy: The function is specified as non-reentrant (Non Reentrant) [SWS_EcuM_02918].
  • Synchronism: Processing is synchronous [SWS_EcuM_02918].
  • Error handling: No specific DET or DEM error messages are defined in the specification scope of the interface [SWS_EcuM_02918].

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

function EcuM_GenerateRamHash [SWS_EcuM_02919] 📄 PDF

void EcuM_GenerateRamHash (void);

see EcuM_CheckRamHash

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

The function EcuM_GenerateRamHash serves to generate a RAM check value in the context of the ECU State Manager, with the specification referring to EcuM_CheckRamHash regarding its operation [SWS_EcuM_02919]. The generated check value presumably serves for the subsequent integrity check of the RAM in connection with sleep or low-power states. Question Q-7f316b389e1609c0 (open)

Usage and Interface

The service has the service ID 0x40 and the signature void EcuM_GenerateRamHash(void) [SWS_EcuM_02919]. The function has neither input, output, nor input/output parameters and returns no return value. Execution is synchronous.

Concurrency and Limitations

The function is specified as non-reentrant (Non Reentrant) [SWS_EcuM_02919]. Consequently, it must not be called interrupting or concurrently from multiple contexts. The declaration is provided via the header file EcuM_Externals.h [SWS_EcuM_02919]. Interpretation: Due to the definition in EcuM_Externals.h, it is likely a user-specifically implemented callout that is called by the ECU State Manager at an appropriate point in the state sequence. Question Q-2f53f1a19cee079c (open)

Error handling

No specific error codes as well as neither DET nor DEM messages are defined for EcuM_GenerateRamHash in [SWS_EcuM_02919].

This usage note was generated automatically based on the specification of the module EcuM.

function EcuM_SleepActivity [SWS_EcuM_02928] 📄 PDF

void EcuM_SleepActivity (void);

This callout is invoked periodically in all reduced clock sleep modes. It is explicitely allowed to poll wakeup sources from this callout and to call wakeup notification functions to indicate the end of the sleep state to the ECU State Manager.

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

Usage and Call Context

The function EcuM_SleepActivity represents a callout of the ECU State Manager, provided in the header file EcuM_Externals.h with the service ID 0x41 [SWS_EcuM_02928]. The call takes place periodically in all reduced clock sleep modes (reduced clock sleep modes) [SWS_EcuM_02928]. The function has the signature void EcuM_SleepActivity(void), operates synchronously, and accepts neither input, output, nor input/output parameters [SWS_EcuM_02928].

Functional Tasks and Interaction

The purpose of this callout is to carry out activities during sleep: It is explicitly intended and permitted to cyclically query (poll) wakeup sources within EcuM_SleepActivity [SWS_EcuM_02928]. Furthermore, wakeup notification functions may be called directly from the callout to indicate the termination of the sleep state to the ECU State Manager [SWS_EcuM_02928].

Concurrency and Limitations

The interface is specified as non-reentrant (Non Reentrant) [SWS_EcuM_02928]. Since the callout returns no return value and no error parameters are defined, no direct error handling via error codes or error reporters such as DET or DEM takes place via the function interface [SWS_EcuM_02928].

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

Implementer's Guide to follow (complexity I1)

function EcuM_StartCheckWakeup [SWS_EcuM_04096] 📄 PDF

void EcuM_StartCheckWakeup (EcuM_WakeupSourceType WakeupSource);

This API is called by the ECU Firmware to start the CheckWakeupTimer for the corresponding WakeupSource. If EcuMCheckWakeupTimeout > 0 the CheckWakeupTimer for the Wakeup Source is started. If EcuMCheckWakeupTimeout <= 0 the API call is ignored by the EcuM.

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

Usage and Call Context

According to [SWS_EcuM_04096], the synchronous interface EcuM_StartCheckWakeup is called by the ECU firmware to start the timer CheckWakeupTimer for a specific wakeup source. For this purpose, the parameter WakeupSource of type EcuM_WakeupSourceType is passed to the function. It has no return value (void) and is provided via the header file EcuM_Externals.h.

Sequence and conditions

The execution of the function depends on the configuration of the wakeup source [SWS_EcuM_04096]:

  • If EcuMCheckWakeupTimeout > 0 is configured for the respective wakeup source, the associated CheckWakeupTimer is started.
  • If EcuMCheckWakeupTimeout <= 0 holds, the function call is completely ignored by the EcuM.

Concurrency and Error Handling

The function is specified as non-reentrant (Non Reentrant) [SWS_EcuM_04096]. Consequently, the caller must ensure that calls for the same or other wakeup sources do not take place concurrently. Specific error codes and notifications to DET or DEM are not specified for this call; according to the specification, a call with a non-positive timeout remains without effect, which can presumably be interpreted as tolerant interception of irrelevant timer checks [SWS_EcuM_04096]. Question Q-19d98b03d3ee7504 (open)

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

Implementer's Guide to follow (complexity I1)

function EcuM_CheckWakeup [SWS_EcuM_02929] 📄 PDF

void EcuM_CheckWakeup (EcuM_WakeupSourceType wakeupSource);

This callout is called by the EcuM to poll a wakeup source. It shall also be called by the ISR of a wakeup source to set up the PLL and check other wakeup sources that may be connected to the same interrupt.

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

The callout EcuM_CheckWakeup serves to check and poll wakeup sources as well as to configure the PLL after a wakeup event [SWS_EcuM_02929]. The function is provided via the header file EcuM_Externals.h and has the service ID 0x42 [SWS_EcuM_02929].

Call Context and Semantics

  • Signature and parameters: The function is executed synchronously (Synchronous), has no return value, and expects wakeupSource of type EcuM_WakeupSourceType as an input parameter [SWS_EcuM_02929].
  • Callers: The callout is called by EcuM to cyclically poll a wakeup source. In addition, it must be called mandatorily by the interrupt service routine (ISR) of a wakeup source to set up the PLL and check further wakeup sources that are tied to the same interrupt [SWS_EcuM_02929].
  • Polling loop: In the polling sequence, the EcuM repeatedly calls the callouts EcuM_SleepActivity and EcuM_CheckWakeup in a blocking loop until a wakeup event is reported as pending or validated [SWS_EcuM_03020].

Restrictions and Error Handling

The function is specified as non-reentrant (Non Reentrant) [SWS_EcuM_02929]. Since calls occur both from the blocking sequence of the polling loop and from ISR contexts, the integration will likely need to ensure that no uncoordinated concurrent calls take place. Question Q-8bc8f164670a0911 (open) Specific error codes or error notifications to DET or DEM are not defined for this callout.

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

Implementer's Guide to follow (complexity I1)

function EcuM_EndCheckWakeup [SWS_EcuM_02927] 📄 PDF

void EcuM_EndCheckWakeup (EcuM_WakeupSourceType WakeupSource);

This API is called by any SW Module whose wakeup source is checked asynchronously (e.g. asynchronous Can Trcv Driver) and the Check of the Wakeup returns a negative Result (no Wakeup by this Source). The API cancels the CheckWakeupTimer for the WakeupSource. If the correponding CheckWakeupTimer is canceled the check of this wakeup source is finished.

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

The synchronous function EcuM_EndCheckWakeup is called by software modules when the asynchronous check of a wakeup source (such as with an asynchronous CAN transceiver driver) yields a negative result, meaning no wakeup event was caused by this source [SWS_EcuM_02927].

Usage and Parameters

Via the input parameter WakeupSource of type EcuM_WakeupSourceType, the wakeup source is passed for which the associated monitoring timer is to be canceled [SWS_EcuM_02927]. The function returns no return value (void) and has no input/output or output parameters [SWS_EcuM_02927].

Functional principle and concurrency

  • The function cancels the timer CheckWakeupTimer for the specified wakeup source; upon cancellation of this timer, the check of the wakeup source is considered completed [SWS_EcuM_02927].
  • The interface is defined as synchronous and non-reentrant (Non Reentrant) [SWS_EcuM_02927].
  • The declaration is provided via the header file EcuM_Externals.h [SWS_EcuM_02927].

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

function EcuM_CheckRamHash [SWS_EcuM_02921] 📄 PDF

uint8 EcuM_CheckRamHash (void);

This callout is intended to provide a RAM integrity test. The goal of this test is to ensure that after a long SLEEP duration, RAM contents is still consistent. The check does not need to be exhaustive since this would consume quite some processing time during wakeups. A well designed check will execute quickly and detect RAM integrity defects with a sufficient probability. This specification does not make any assumption about the algorithm chosen for a particular ECU. The areas of RAM which will be checked have to be chosen carefully. It depends on the check algorithm itself and the task structure. Stack contents of the task executing the RAM check e.g. very likely cannot be checked. It is good practice to have the hash generation and checking in the same task and that this task is not preemptible and that there is only little activity between hash generation and hash check. The RAM check itself is provided by the system designer. In case of applied multi core and existence of Satellite-Ecu M(s): this API will be called by the Master-EcuM only.

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

The function EcuM_CheckRamHash is a synchronous, non-reentrant callout (declared in EcuM_Externals.h) that provides an integrity test of the RAM memory [SWS_EcuM_02921]. The function has no parameters and returns a status value of type uint8: The value 0 signals a test failure, while any other value indicates a successful pass [SWS_EcuM_02921].

According to [SWS_EcuM_02863], the module EcuM first calls [SWS_EcuM_02919] before halting the microcontroller and executes EcuM_CheckRamHash after returning from the halt state. The objective is to verify that the RAM content has remained consistent even after a long SLEEP phase [SWS_EcuM_02921].

The following boundary conditions apply to the implementation and the process:

  • Algorithm and check range: The check function is provided by the system designer; it does not need to be exhaustive, but should execute quickly and detect errors with sufficient certainty [SWS_EcuM_02921]. Areas to be checked must be selected carefully; stack contents of the executing task can generally not be checked [SWS_EcuM_02921].
  • Task structure: As a best practice, hash generation and checking should be executed in the same, non-preemptible task with minimal intermediate activity [SWS_EcuM_02921].
  • Multi-Core: In the case of multiple processor cores with satellite EcuMs, the callout is called exclusively by the master EcuM and checks only data within its scope [SWS_EcuM_02863], [SWS_EcuM_02921].

Specific DET or DEM messages are not defined for this callout; the error response for return value 0 is presumably at the discretion of the higher-level system design [SWS_EcuM_02921]. Question Q-473ef8617db29fe3 (open)

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

function EcuM_DisableWakeupSources [SWS_EcuM_02922] 📄 PDF

void EcuM_DisableWakeupSources (EcuM_WakeupSourceType wakeupSource);

The ECU Manager Module calls EcuM_DisableWakeupSources to set the wakeup source(s) defined in the wakeupSource bitfield so that they are not able to wake the ECU up.

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

The synchronous interface EcuM_DisableWakeupSources with the service ID 0x44 serves to configure the wakeup sources defined in the bit field parameter wakeupSource of type EcuM_WakeupSourceType such that they can no longer wake up the ECU [SWS_EcuM_02922]. The function signature is void EcuM_DisableWakeupSources (EcuM_WakeupSourceType wakeupSource) [SWS_EcuM_02922].

According to the specification, the following properties apply to the call context and integration:

  • Caller and header: The function is called by the ECU Manager module and provided via the header file EcuM_Externals.h [SWS_EcuM_02922].
  • Parameters and return values: The bit field wakeupSource is passed as the only input parameter. The function has neither input/output nor output parameters and returns no return value (void) [SWS_EcuM_02922].
  • Execution semantics and concurrency: Processing is synchronous. In addition, the function is specified as non-reentrant (Non Reentrant), so that concurrent or nested calls must be avoided [SWS_EcuM_02922].

Regarding error handling, the specification contains neither specific error codes nor notifications to the DET or DEM for this function call [SWS_EcuM_02922].

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

function EcuM_AL_DriverRestart [SWS_EcuM_02923] 📄 PDF

void EcuM_AL_DriverRestart (void);

This callout shall provide driver initialization and other hardware-related startup activities in the wakeup case.

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

The callout EcuM_AL_DriverRestart is declared via the header file EcuM_Externals.h and has the service ID 0x45 [SWS_EcuM_02923]. The function has the signature void EcuM_AL_DriverRestart (void), requires no transfer parameters, and returns no return value [SWS_EcuM_02923]. The purpose of this interface is to provide driver initialization as well as further hardware-related activities during the startup phase in the wakeup case [SWS_EcuM_02923].

Mandatory requirements apply to the integration and interaction with the module EcuM:

  • For re-initialization during phase WakeupRestart, the integrator must include a restart block in the integration code for EcuM_AL_DriverRestart, which uses the configured list EcuMDriverRestartList [SWS_EcuM_02947] [SWS_EcuM_02923].
  • The list EcuMDriverRestartList can contain drivers that function as wakeup sources [SWS_EcuM_02562]. In this case, EcuM_AL_DriverRestart must re-arm the trigger mechanism of the callback for wakeup detection (“wakeup detected”) of these drivers [SWS_EcuM_02562].

Regarding runtime behavior, the function is defined as synchronous and non-reentrant [SWS_EcuM_02923]. Since this is application-specific integration code, the specification defines no dedicated error codes as well as no standardized messages to DET or DEM at this interface.

This text was created by an AI. Details may be incomplete and do not replace the official AUTOSAR specification.

Implementer's Guide to follow (complexity I2)

function EcuM_StartWakeupSources [SWS_EcuM_02924] 📄 PDF

void EcuM_StartWakeupSources (EcuM_WakeupSourceType wakeupSource);

The callout shall start the given wakeup source(s) so that they are ready to perform wakeup validation.

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

The callout function EcuM_StartWakeupSources serves to start and put the passed wakeup source(s) into operation such that they are prepared for the subsequent execution of the wakeup validation [SWS_EcuM_02924].

Usage and Call Context

The function is specified as a synchronous call with the service ID 0x46, has no return value (void), and is provided via the header file EcuM_Externals.h [SWS_EcuM_02924].

  • Parameter wakeupSource (in): Passes the wakeup source to be started or a bitmask of multiple wakeup sources of type EcuM_WakeupSourceType to the callout function [SWS_EcuM_02924]. Additional input or output parameters (inout/out) do not exist [SWS_EcuM_02924].

Concurrency and Limitations

With regard to the execution environment, EcuM_StartWakeupSources is classified as non-reentrant (Non Reentrant) [SWS_EcuM_02924]. Callers must therefore ensure that the function is not executed concurrently from interrupting interrupt service routines or parallel tasks.

Interaction and Error Handling

Since EcuM_StartWakeupSources is declared as a callout, the hardware-related activation of the affected sources is the responsibility of the application-specific implementation by the system integrator [SWS_EcuM_02924]. The specification provides neither error messages to DET or DEM nor specific error return values for this interface [SWS_EcuM_02924]; any error states when starting the sources are therefore presumably handled in an integration-specific manner within the callout. Question Q-b595e7175c34a831 (open)

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

Implementer's Guide to follow (complexity I2)

function EcuM_CheckValidation [SWS_EcuM_02925] 📄 PDF

void EcuM_CheckValidation (EcuM_WakeupSourceType wakeupSource);

This callout is called by the EcuM to validate a wakeup source. If a valid wakeup has been detected, it shall be reported to EcuM via EcuM_ValidateWakeupEvent().

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

The function EcuM_CheckValidation serves as a callout interface of the ECU State Manager for validating a wake-up source [SWS_EcuM_02925]. The EcuM calls this function to determine whether a detected wake-up event is valid [SWS_EcuM_02925].

use

The callout has the service ID 0x47 and is provided via the header file EcuM_Externals.h [SWS_EcuM_02925]. wakeupSource of type EcuM_WakeupSourceType serves as the passed parameter, by which the wake-up source to be validated is identified [SWS_EcuM_02925]. The function returns no value (void) and has no output or input/output parameters [SWS_EcuM_02925]. Execution is synchronous [SWS_EcuM_02925].

Error handling

Specific error codes, return values in case of error, or reports to DET or DEM are not defined for this callout in the specification.

Concurrency and Limitations

Regarding concurrency, EcuM_CheckValidation is specified as non-reentrant (Non Reentrant) [SWS_EcuM_02925]. The calling context of the EcuM must ensure that no parallel or nested calls occur for the same or different wake-up sources.

Interaction

If a valid wake-up event was detected during execution, it must mandatorily be reported back to the EcuM via the function call EcuM_ValidateWakeupEvent() [SWS_EcuM_02925]. Interpretation: The device-specific logic for checking the hardware and deciding on validity is likely implemented entirely in integration code. Question Q-08061e09b474728d (open)

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

Implementer's Guide to follow (complexity I1)

function EcuM_StopWakeupSources [SWS_EcuM_02926] 📄 PDF

void EcuM_StopWakeupSources (EcuM_WakeupSourceType wakeupSource);

The callout shall stop the given wakeup source(s) after unsuccessful wakeup validation.

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

The callout function EcuM_StopWakeupSources of the module EcuM (Classic Platform) serves to deliberately stop the passed wakeup source(s) after an unsuccessful wakeup validation [SWS_EcuM_02926]. The declaration of this synchronous interface is available via the header file EcuM_Externals.h and carries the service ID 0x48 [SWS_EcuM_02926].

Usage and interface parameters:

  • Input parameter: As the only parameter, wakeupSource of type EcuM_WakeupSourceType is passed, which specifies the wakeup source(s) to be stopped [SWS_EcuM_02926].
  • Return value and inputs/outputs: There exist neither input/output parameters (inout) nor output parameters (out) [SWS_EcuM_02926]. The function returns no return value (void) to the caller [SWS_EcuM_02926].
  • Execution behavior: Function execution is specified as synchronous (Synchronous) [SWS_EcuM_02926].

Concurrency and error handling:

The interface is specified as non-reentrant (Non Reentrant) [SWS_EcuM_02926]. Parallel calls are therefore not permitted and must be avoided by the caller. The specification defines neither specific error codes nor return values or notifications to the Default Error Tracer (DET) or the Diagnostic Event Manager (DEM) module for this callout [SWS_EcuM_02926]. Interpretation: Since the function is provided as an external callout via EcuM_Externals.h, the hardware-related deactivation of the relevant wakeup hardware as well as the internal error handling is the responsibility of the user-specific implementation. Question Q-b537c805bed751ab (open)

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

Implementer's Guide to follow (complexity I1)

function EcuM_MainFunction [SWS_EcuM_02837] 📄 PDF

void EcuM_MainFunction (void);

The purpose of this service is to implement all activities of the ECU State Manager while the OS is up and running.

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

Usage and Call Context

The function EcuM_MainFunction has the signature void EcuM_MainFunction(void) with the service ID 0x18 and is provided via the header file SchM_EcuM.h [SWS_EcuM_02837]. It takes no parameters and returns no return value [SWS_EcuM_02837]. Its task is to process all activities of the ECU State Manager while the operating system is running ("OS is up and running") [SWS_EcuM_02837]. In doing so, the function is typically expected to be called periodically by the scheduler (interpretation: integration via SchM_EcuM.h). Question Q-ca471f22bdb1f11d (open)

Interaction and tasks

During ongoing operation, EcuM_MainFunction assumes central coordination tasks:

  • Validation of wakeup sources: If a list of wakeup source candidates is present after completion of the WakeupRestart sequence, the EcuM module validates these candidates within EcuM_MainFunction [SWS_EcuM_02539].
  • Expiration of the validation timeout: If the validation timeout for a pending wakeup event expires, the function OR-combines the associated bit into the internal variable for expired wakeup events [SWS_EcuM_04081]. In addition, it notifies the BSW management via BswM_EcuM_Current_Wakeup with a EcuM_WakeupSourceType bitmask of the event and the status ECUM_WKSTATUS_EXPIRED [SWS_EcuM_04082].
  • Alarm Clock Service: If the service is present via EcuMAlarmClockPresent, EcuM_MainFunction updates the alarm clock timer [SWS_EcuM_04002].

Constraints and Instances

As an essential constraint for multi-core or multi-instance architectures, EcuM_MainFunction must be executed in all instances of the EcuM [SWS_EcuM_04011].

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

Implementer's Guide to follow (complexity I2)

type EcuM_ConfigType [SWS_EcuM_04038] 📄 PDF

A pointer to such a structure shall be provided to the ECU State Manager initialization routine for configuration.

type EcuM_RunStatusType [SWS_EcuM_04120] 📄 PDF

Result of the Run Request Protocol sent to BswM

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

The data type EcuM_RunStatusType is defined as uint8 and is provided via the header EcuM.h ([SWS_EcuM_04120]). It serves for the formal representation of the current status of the run request protocol in the ECU Manager and is transmitted as a result to the Basic Software Mode Manager (BswM) ([SWS_EcuM_04120]).

The permissible value range comprises three discrete states ([SWS_EcuM_04120]):

  • ECUM_RUNSTATUS_UNKNOWN (value 0): Represents an unknown status and simultaneously serves as the defined initialization value (Init Value).
  • ECUM_RUNSTATUS_REQUESTED (value 1): Identifies the state that the RUN status was actively requested by the ECU Manager.
  • ECUM_RUNSTATUS_RELEASED (value 2): Signals that the RUN status was released again by the ECU Manager.

Regarding interaction, requirement [SWS_EcuM_04121] obligates the ECU Manager module to bindingly inform the BswM about the current state of the run request protocol based on the status values listed in EcuM_RunStatusType. Interpretation: Since the requirement does not specify a particular function signature or calling convention for the message flow, the status information is typically expected to be passed to the BswM module via an internal notification function or callback interface. Question Q-e136b90c2edbc29c (open) Specific error codes, DET or DEM reports, as well as special reentrancy conditions are not provided for this elementary data type in the present requirements.

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

Implementer's Guide to follow (complexity I1)

type EcuM_WakeupSourceType [SWS_EcuM_04040] 📄 PDF

EcuM_WakeupSourceType defines a bitfield with 5 pre-defined positions (see Range). The bitfield provides one bit for each wakeup source. In WAKEUP, all bits cleared indicates that no wakeup source is known. In STARTUP, all bits cleared indicates that no reason for restart or reset is known. In this case, ECUM_WKSOURCE_RESET shall be assumed.

type EcuM_WakeupStatusType [SWS_EcuM_04041] 📄 PDF

The type describes the possible states of a wakeup source.

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

According to [SWS_EcuM_04041], the data type EcuM_WakeupStatusType describes the possible states of a wakeup source in the ECU State Manager. The type is derived from the base type uint8 and is provided via the header EcuM.h [SWS_EcuM_04041].

The range of values represents the lifecycle of a wakeup event across four states [SWS_EcuM_04041]:

  • ECUM_WKSTATUS_NONE (value 0): No pending wakeup event was detected [SWS_EcuM_04041].
  • ECUM_WKSTATUS_PENDING (value 1): A wakeup event was detected, but is not yet validated [SWS_EcuM_04041].
  • ECUM_WKSTATUS_VALIDATED (value 2): The wakeup event is valid and has been successfully confirmed [SWS_EcuM_04041].
  • ECUM_WKSTATUS_EXPIRED (value 3): The wakeup event was not validated in time and has consequently expired [SWS_EcuM_04041].

Usage and interaction: The type serves as a central status representation for wakeup sources. Interpretation: Callers are likely to evaluate this status within status queries to determine whether a wakeup source is actively being validated, has already signaled a valid wakeup, or the validation time window has been exceeded. Question Q-a3f721e8f1753eb1 (open)

This text was generated automatically. All details are based exclusively on the specification requirements of the respective release.

Implementer's Guide to follow (complexity I1)

type EcuM_ResetType [SWS_EcuM_04044] 📄 PDF

This type describes the reset mechanisms supported by the ECU State Manager. It can be extended by configuration.

type EcuM_StateType [SWS_EcuM_91005] 📄 PDF

ECU State Manager states.

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

The type EcuM_StateType is a data type derived from uint8, which is provided via the header EcuM.h and represents the operating states of the ECU State Manager [SWS_EcuM_91005]. The EcuM module is required to define all states listed in EcuM_StateType [SWS_EcuM_02664]. The range of values comprises the substate mask ECUM_SUBSTATE_MASK (0x0f) as well as the main states ECUM_STATE_STARTUP (0x10), ECUM_STATE_RUN (0x32), ECUM_STATE_POST_RUN (0x33), ECUM_STATE_SHUTDOWN (0x40), and ECUM_STATE_SLEEP (0x50) [SWS_EcuM_91005].

Usage and Interaction

The data type functions as a central parameter for state communication between the BswM and the EcuM:

  • State change to EcuM: Via the synchronous and reentrant function call EcuM_SetState(EcuM_StateType state) with the service ID 0x2b, the BswM notifies the EcuM module of a state change [SWS_EcuM_04122].
  • State reporting to BswM: The EcuM reports the current state to the BswM by calling the interface BswM_EcuM_CurrentState(EcuM_StateType State) [SWS_EcuM_04143].

Concurrency, ordering, and error handling

With regard to temporal ordering, the requirement applies that a new state may only be set by the EcuM once the RTE has provided its feedback via the corresponding acknowledgement port [SWS_EcuM_04143]. Specific error codes, return values, or DET/DEM messages are not provided for this data type in the present sources.

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

Implementer's Guide to follow (complexity I1)

type EcuM_Mode [SWS_EcuM_04107] 📄 PDF

–

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

The type EcuM_Mode is defined as ModeDeclarationGroup according to [SWS_EcuM_04107] and represents the central states of the ECU State Manager. STARTUP is defined as the initial mode. In addition, the group includes the defined modes POST_RUN, RUN, SHUTDOWN, and SLEEP [SWS_EcuM_04107].

In the system composite, EcuM_Mode serves as the type base for the mode group currentMode within the service interface EcuM_CurrentMode [SWS_EcuM_04108]. Via this interface, the current ECU mode can be queried or signaled to other software components via the RTE mode mechanism.

With regard to call context and concurrency, the specification of the type itself contains no explicit restrictions regarding reentrancy or error codes; management of state transitions takes place via the associated service interfaces of the EcuM.

This note was generated automatically and is based on AUTOSAR R20-11 specification data.

Implementer's Guide to follow (complexity I1)

type currentMode [SWS_EcuM_04112] 📄 PDF

–

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

The element currentMode is defined as a provided port of the module EcuM and provides the service interface EcuM_CurrentMode for the software architecture [SWS_EcuM_04112]. This service interface is used to read out the current ECU mode and encapsulates the mode group currentMode based on the data type EcuM_Mode [SWS_EcuM_04108].

During ongoing system operation, it is used to signal state changes:

  • Invocation and usage: As soon as a mode switch occurs, the EcuM reports it via RTE mode ports to software components (SW-Cs) [SWS_EcuM_04133]. Under the specification assumption of the port name currentMode and when using the direct RTE API, the function Rte_Switch_currentMode_currentMode( Rte_ModeType_EcuM_Mode mode) is called for this purpose [SWS_EcuM_04133].
  • Parameters and return value: Parameter mode passes the mode to be newly entered to the RTE [SWS_EcuM_04133]. The return value of type Rte_StatusType provided by the switch API is not evaluated, but according to the specification must imperatively be ignored [SWS_EcuM_04133].
  • Interaction: A software component that is to be informed about mode changes must request the mode switch interface EcuM_CurrentMode as a required port [SWS_EcuM_04133].

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

Implementer's Guide to follow (complexity I1)

type EcuM_ShutdownCauseType [SWS_EcuM_04045] 📄 PDF

This type describes the cause for a shutdown by the ECU State Manager. It can be extended by configuration.

type EcuM_ShutdownModeType [SWS_EcuM_04101] 📄 PDF

This data type represents the modes of the ECU Manager module.

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

Usage and Value Range

The data type EcuM_ShutdownModeType is based on uint16 and is provided via the header file Rte_EcuM_Type.h [SWS_EcuM_04101]. It maps the modes configured in the ECU State Manager. Its value range includes:

  • the configured sleep modes according to EcuMSleepModeId [SWS_EcuM_04101] as well as
  • the configured reset modes, calculated from the offset 256 + EcuMResetModeId [SWS_EcuM_04101].

Interaction and Call Context

The type is used in synchronous and reentrant services of the ECU Manager:

  • EcuM_SelectShutdownTarget takes shutdownMode as an input parameter to define the concrete sleep mode (for target ECUM_SHUTDOWN_TARGET_SLEEP) or reset mechanism (for target ECUM_SHUTDOWN_TARGET_RESET) [SWS_EcuM_02822].
  • EcuM_GetShutdownTarget returns via a pointer parameter to EcuM_ShutdownModeType which configured sleep or reset mode is selected for the current shutdown target [SWS_EcuM_02824].
  • EcuM_GetLastShutdownTarget outputs the shutdown mode of the preceding shutdown process via an output parameter [SWS_EcuM_02825]. Via the service interface EcuM_ShutdownTarget, this functionality is also available to software components (SW-Cs) [SWS_EcuM_03011].

Error Handling and Boundary Conditions

The functions return Std_ReturnType. If, for example, a NULL pointer is passed to EcuM_GetShutdownTarget or EcuM_GetLastShutdownTarget, the call fails with E_NOT_OK [SWS_EcuM_02824], [SWS_EcuM_02825]. Upon successful execution, the services report E_OK [SWS_EcuM_02822], [SWS_EcuM_03011].

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

Implementer's Guide to follow (complexity I1)

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

Record
AUTOSAR/AP/record/CP_MOD_EcuM
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_EcuM@rel:R20-11#6fa680cb
Content hash
6fa680cb
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_ECUStateManager.pdf#nameddest=SWS_EcuM_02813

Topic map

Detail view

Select an entry in the outline.

Initialization and status

Returns the version information of this module.

void EcuM_GetVersionInfo (Std_VersionInfoType* versioninfo);
EcuM_Init function

Initializes the ECU state manager and carries out the startup procedure. The function will never return (it calls StartOS)

void EcuM_Init (void);

Services · Get…

EcuM_GetBootTarget returns the current boot target - see EcuM_SelectBootTarget. EcuM_Get BootTarget is part of the ECU Manager Module port interface.

Std_ReturnType EcuM_GetBootTarget (EcuM_BootTargetType* target);

EcuM_GetCurrentTime returns the current value of the EcuM clock (i.e. the time since battery connect). EcuM_GetCurrentTime is part of the ECU Manager Module port interface.

Std_ReturnType EcuM_GetCurrentTime (EcuM_TimeType* time);

Gets expired wakeup events.

EcuM_WakeupSourceType EcuM_GetExpiredWakeupEvents (void);

EcuM_GetLastShutdownTarget returns the shutdown target of the previous shutdown process. EcuM_GetLastShutdownTarget is part of the ECU Manager Module port interface.

Std_ReturnType EcuM_GetLastShutdownTarget (EcuM_ShutdownTargetType* shutdownTarget, EcuM_ShutdownModeType* shutdownMode);

Gets pending wakeup events.

EcuM_WakeupSourceType EcuM_GetPendingWakeupEvents (void);

EcuM_GetShutdownCause returns the selected shutdown cause as set by EcuM_Select ShutdownCause. EcuM_GetShutdownCause is part of the ECU Manager Module port interface.

Std_ReturnType EcuM_GetShutdownCause (EcuM_ShutdownCauseType* shutdownCause);

EcuM_GetShutdownTarget returns the currently selected shutdown target as set by EcuM_ SelectShutdownTarget. EcuM_GetShutdownTarget is part of the ECU Manager Module port interface.

Std_ReturnType EcuM_GetShutdownTarget (EcuM_ShutdownTargetType* shutdownTarget, EcuM_ShutdownModeType* shutdownMode);

Gets validated wakeup events.

EcuM_WakeupSourceType EcuM_GetValidatedWakeupEvents (void);

EcuM_GetWakeupTime returns the current value of the master alarm clock (the minimum absolute time of all user alarm clocks). EcuM_GetWakeupTime is part of the ECU Manager Module port interface.

Std_ReturnType EcuM_GetWakeupTime (EcuM_TimeType* time);

Services · A…

This callout shall provide driver initialization and other hardware-related startup activities in case of a power on reset.

void EcuM_AL_DriverInitOne (void);

This callout shall provide driver initialization and other hardware-related startup activities for loading the post-build configuration data. Beware: Here only pre-compile and link-time configurable modules may be used.

void EcuM_AL_DriverInitZero (void);

This callout shall provide driver initialization and other hardware-related startup activities in the wakeup case.

void EcuM_AL_DriverRestart (void);
EcuM_AL_Reset function

This callout shall take the code for resetting the ECU.

void EcuM_AL_Reset (EcuM_ResetType reset);

If the configuration parameter EcuMSetProgrammableInterrupts is set to true, this callout Ecu M_AL_SetProgrammableInterrupts is executed and shall set the interrupts on ECUs with programmable interrupts.

void EcuM_AL_SetProgrammableInterrupts (void);

This callout shall take the code for shutting off the power supply of the ECU. If the ECU cannot unpower itself, a reset may be an adequate reaction.

void EcuM_AL_SwitchOff (void);

Services · Set…

EcuM_SetAbsWakeupAlarm sets the user's wakeup alarm to an absolute point in time. EcuM_ SetAbsWakeupAlarm is part of the ECU Manager Module port interface.

Std_ReturnType EcuM_SetAbsWakeupAlarm (EcuM_UserType user, EcuM_TimeType time);
EcuM_SetClock function

EcuM_SetClock sets the EcuM clock time to the provided value. This API is useful for testing the alarm services; Alarms that take days to expire can be tested. EcuM_SetClock is part of the ECU Manager Module port interface.

Std_ReturnType EcuM_SetClock (EcuM_UserType user, EcuM_TimeType time);

EcuM_SetRelWakeupAlarm sets a user's wakeup alarm relative to the current point in time. EcuM_SetRelWakeupAlarm is part of the ECU Manager Module port interface.

Std_ReturnType EcuM_SetRelWakeupAlarm (EcuM_UserType user, EcuM_TimeType time);
EcuM_SetState function

Function called by BswM to notify about State Switch.

void EcuM_SetState (EcuM_StateType state);

Sets the wakeup event.

void EcuM_SetWakeupEvent (EcuM_WakeupSourceType sources);

Services · Check…

This callout is intended to provide a RAM integrity test. The goal of this test is to ensure that after a long SLEEP duration, RAM contents is still consistent. The check does not need to be exhaustive since this would consume quite some processing time during wakeups. A well designed check will execute quickly and detect RAM integrity defects with a sufficient probability. This specification does not make any assumption about the algorithm chosen for a particular ECU. The areas of RAM which will be checked have to be chosen carefully. It depends on the check algorithm itself and the task structure. Stack contents of the task executing the RAM check e.g. very likely cannot be checked. It is good practice to have the hash generation and checking in the same task and that this task is not preemptible and that there is only little activity between hash generation and hash check. The RAM check itself is provided by the system designer. In case of applied multi core and existence of Satellite-Ecu M(s): this API will be called by the Master-EcuM only.

uint8 EcuM_CheckRamHash (void);

This callout is called by the EcuM to validate a wakeup source. If a valid wakeup has been detected, it shall be reported to EcuM via EcuM_ValidateWakeupEvent().

void EcuM_CheckValidation (EcuM_WakeupSourceType wakeupSource);

This callout is called by the EcuM to poll a wakeup source. It shall also be called by the ISR of a wakeup source to set up the PLL and check other wakeup sources that may be connected to the same interrupt.

void EcuM_CheckWakeup (EcuM_WakeupSourceType wakeupSource);

Services · Select…

EcuM_SelectBootTarget selects a boot target. EcuM_SelectBootTarget is part of the ECU Manager Module port interface.

Std_ReturnType EcuM_SelectBootTarget (EcuM_BootTargetType target);

EcuM_SelectShutdownCause elects the cause for a shutdown. EcuM_SelectShutdownCause is part of the ECU Manager Module port interface.

Std_ReturnType EcuM_SelectShutdownCause (EcuM_ShutdownCauseType target);

EcuM_SelectShutdownTarget selects the shutdown target. EcuM_SelectShutdownTarget is part of the ECU Manager Module port interface.

Std_ReturnType EcuM_SelectShutdownTarget (EcuM_ShutdownTargetType shutdownTarget, EcuM_ShutdownModeType shutdownMode);

Services · On…

This call allows the system designer to notify that the GO OFF I state is about to be entered.

void EcuM_OnGoOffOne (void);

This call allows the system designer to notify that the GO OFF II state is about to be entered.

void EcuM_OnGoOffTwo (void);

Services · Release…

Releases a POST RUN request previously done with a call to EcuM_RequestPOST_RUN. The service is intended for implementing AUTOSAR ports.

Std_ReturnType EcuM_ReleasePOST_RUN (EcuM_UserType user);

Releases a RUN request previously done with a call to EcuM_RequestRUN. The service is intended for implementing AUTOSAR ports.

Std_ReturnType EcuM_ReleaseRUN (EcuM_UserType user);

Services · Request…

Places a request for the POST RUN state. Requests can be placed by every user made known to the state manager at configuration time. Requests for RUN and POST RUN must be tracked independently (in other words: two independent variables). The service is intended for implementing AUTOSAR ports.

Std_ReturnType EcuM_RequestPOST_RUN (EcuM_UserType user);

Places a request for the RUN state. Requests can be placed by every user made known to the state manager at configuration time.

Std_ReturnType EcuM_RequestRUN (EcuM_UserType user);

Services · Start…

This API is called by the ECU Firmware to start the CheckWakeupTimer for the corresponding WakeupSource. If EcuMCheckWakeupTimeout > 0 the CheckWakeupTimer for the Wakeup Source is started. If EcuMCheckWakeupTimeout <= 0 the API call is ignored by the EcuM.

void EcuM_StartCheckWakeup (EcuM_WakeupSourceType WakeupSource);

The callout shall start the given wakeup source(s) so that they are ready to perform wakeup validation.

void EcuM_StartWakeupSources (EcuM_WakeupSourceType wakeupSource);

Services · More

Ecum_AbortWakeupAlarm aborts the wakeup alarm previously set by this user. EcuM_Abort WakeupAlarm is part of the ECU Manager Module port interface.

Std_ReturnType EcuM_AbortWakeupAlarm (EcuM_UserType user);

Clears wakeup events.

void EcuM_ClearWakeupEvent (EcuM_WakeupSourceType sources);

This callout should evaluate some condition, like port pin or NVRAM value, to determine which post-build configuration shall be used in the remainder of the startup process. It shall load this configuration data into a piece of memory that is accessible by all BSW modules and shall return a pointer to the EcuM post-build configuration as a base for all BSW module post-build configrations.

const EcuM_ConfigType* EcuM_DeterminePbConfiguration (void);

The ECU Manager Module calls EcuM_DisableWakeupSources to set the wakeup source(s) defined in the wakeupSource bitfield so that they are not able to wake the ECU up.

void EcuM_DisableWakeupSources (EcuM_WakeupSourceType wakeupSource);

The ECU Manager Module calls EcuM_EnableWakeupSource to allow the system designer to notify wakeup sources defined in the wakeupSource bitfield that SLEEP will be entered and to adjust their source accordingly.

void EcuM_EnableWakeupSources (EcuM_WakeupSourceType wakeupSource);

This API is called by any SW Module whose wakeup source is checked asynchronously (e.g. asynchronous Can Trcv Driver) and the Check of the Wakeup returns a negative Result (no Wakeup by this Source). The API cancels the CheckWakeupTimer for the WakeupSource. If the correponding CheckWakeupTimer is canceled the check of this wakeup source is finished.

void EcuM_EndCheckWakeup (EcuM_WakeupSourceType WakeupSource);

The ECU State Manager will call the error hook if the error codes "ECUM_E_RAM_CHECK_ FAILED" or "ECUM_E_CONFIGURATION_DATA_INCONSISTENT" occur. In this situation it is not possible to continue processing and the ECU must be stopped. The integrator may choose the modality how the ECU is stopped, i.e. reset, halt, restart, safe state etc.

void EcuM_ErrorHook (uint16 reason);

see EcuM_CheckRamHash

void EcuM_GenerateRamHash (void);

Instructs the ECU State Manager module to go into a sleep mode, Reset or OFF depending on the previously selected shutdown target.

Std_ReturnType EcuM_GoDownHaltPoll (EcuM_UserType UserID);

If the configuration parameter EcuMResetLoopDetection is set to true, this callout EcuM_Loop Detection is called on every startup.

void EcuM_LoopDetection (void);
EcuM_Shutdown function

Typically called from the shutdown hook, this function takes over execution control and will carry out GO OFF II activities.

void EcuM_Shutdown (void);

This callout is invoked periodically in all reduced clock sleep modes. It is explicitely allowed to poll wakeup sources from this callout and to call wakeup notification functions to indicate the end of the sleep state to the ECU State Manager.

void EcuM_SleepActivity (void);

This function implements the STARTUP II state.

void EcuM_StartupTwo (void);

The callout shall stop the given wakeup source(s) after unsuccessful wakeup validation.

void EcuM_StopWakeupSources (EcuM_WakeupSourceType wakeupSource);

After wakeup, the ECU State Manager will stop the process during the WAKEUP VALIDATION state/sequence to wait for validation of the wakeup event.This API service is used to indicate to the ECU Manager module that the wakeup events indicated in the sources parameter have been validated.

void EcuM_ValidateWakeupEvent (EcuM_WakeupSourceType sources);

Cyclic

The purpose of this service is to implement all activities of the ECU State Manager while the OS is up and running.

void EcuM_MainFunction (void);

Types

A pointer to such a structure shall be provided to the ECU State Manager initialization routine for configuration.

–

This type describes the reset mechanisms supported by the ECU State Manager. It can be extended by configuration.

Result of the Run Request Protocol sent to BswM

This type describes the cause for a shutdown by the ECU State Manager. It can be extended by configuration.

This data type represents the modes of the ECU Manager module.

ECU State Manager states.

This data type represents the time of the ECU Manager module.

Unique value for each user.

EcuM_WakeupSourceType defines a bitfield with 5 pre-defined positions (see Range). The bitfield provides one bit for each wakeup source. In WAKEUP, all bits cleared indicates that no wakeup source is known. In STARTUP, all bits cleared indicates that no reason for restart or reset is known. In this case, ECUM_WKSOURCE_RESET shall be assumed.

The type describes the possible states of a wakeup source.