DEENESPTFRRUARHIKOZHNL

FlexRay State Manager (FrSM)

ModulFrSM (FlexRay State Manager)
BSW-Modul-ID142
Standard-Header#include "FrSM.h"
SWS-SpezifikationAUTOSAR_SWS_FlexRayStateManager.pdf
ClusterFlexRay

Module guideAI-GENERATED

Controls wake-up, startup, and shutdown of bus communication per FlexRay cluster on behalf of ComM and BswM.
AI-GENERATED unreviewed Model: claude-opus-5-5 · Effort: high · Temperature: not controllable · Prompt: a3de1ac25c5e Provenance Open questions (6)
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 wake-up, startup, and shutdown of bus communication per FlexRay cluster on behalf of ComM and BswM.

The FlexRay State Manager maintains a state machine per FlexRay cluster that translates the communication requests of the ComM into wake-up, startup, and shutdown via the FlexRay Interface. FrSM_RequestComMode only stores the request; it is processed only in the cyclic main function of the cluster [SWS_FrSM_00020]. The FrSM reports reached modes to ComM and BswM. The BswM can terminate key-slot-only operation or switch all clusters to receive mode. Only FRSM_ONLINE and FRSM_LOW_NUMBER_OF_COLDSTARTERS are considered FullCom (SWS FrSM p. 38).

The FlexRay State Manager translates the communication requests of the ComM for each FlexRay cluster into calls to the FlexRay Interface. In return, it reports the bus mode via ComM_BusSM_ModeIndication and its detailed state via BswM_FrSM_CurrentState [SWS_FrSM_00096]. Optionally, it uses DEM, DET, and FrNm as well as further FrIf services [SWS_FrSM_00097]. FrSm_Init transitions all cluster state machines to FRSM_READY (SWS FrSM p. 35).

frsm_kontext ComM ComM FrSM FrSM (one state machine per FlexRay cluster) ComM->FrSM FrSM_RequestComMode FrSM_GetCurrentComMode BswM BswM BswM->FrSM FrSm_SetEcuPassive FrSm_AllSlots SchM SchM SchM->FrSM FrSM_MainFunction_<FrSMCluster.ShortName> FrSM->ComM ComM_BusSM_ModeIndication FrSM->BswM BswM_FrSM_CurrentState FrIf FrIf FrSM->FrIf FrIf_StartCommunication, FrIf_AllowColdstart, FrIf_HaltCommunication, FrIf_SetTransceiverMode, FrIf_SendWUP, FrIf_AllSlots, … Dem Dem FrSM->Dem Dem_SetEventStatus Det Det FrSM->Det Det_ReportError FrNm FrNm FrSM->FrNm FrNm_StartupError CDD <Cdd> (optional) FrSM->CDD <Cdd>_SyncLossErrorIndication

Context diagram: ComM and BswM control, SchM clocks, FrIf executes; errors go to DEM, DET, FrNm, and optionally to a CDD. Sources: [SWS_FrSM_00096], [SWS_FrSM_00097]

FrSM_RequestComMode only stores the request. Only the main function of the cluster processes it (SWS FrSM p. 36, [SWS_FrSM_00118]). In the event of a FullCom request, the condition WUReason determines whether the FrSM sends wake-up patterns itself, forwards a single-channel wake-up to the second channel, or starts up directly. During startup, it calls FrIf_StartCommunication and, for coldstart ECUs, additionally FrIf_AllowColdstart. On POC normal active, it transitions to FRSM_ONLINE (SWS FrSM p. 20, SWS FrSM p. 52). If NoCom is requested from a FullCom state, the FrSM halts communication already during the call. After t_TrcvStdbyDelay, it sets the transceivers to standby and returns to FRSM_READY [SWS_FrSM_00209].

frsm_zustand cluster_haupt Hauptautomat je FlexRay-Cluster cluster_ecu Parallel: ECU passive mode (all clusters) start READY FRSM_READY start->READY FrSm_Init (T00) WAKEUP FRSM_WAKEUP READY->WAKEUP FullCom angefordert, eigenes Wecken STARTUP FRSM_STARTUP READY->STARTUP FullCom angefordert, kein eigenes Wecken WAKEUP->STARTUP wakeupFinished KEYSLOT FRSM_KEYSLOT_ONLY STARTUP->KEYSLOT POC normal active, key slots only ONLINE FRSM_ONLINE (FullCom) STARTUP->ONLINE POC normal active KEYSLOT->ONLINE FrSm_AllSlots HALT FRSM_HALT_REQ KEYSLOT->HALT NoCom LOWNUM FRSM_LOW_NUMBER_OF_COLDSTARTERS (FullCom) ONLINE->LOWNUM Interpretation: lowNumberOfColdstarters OPASSIVE FRSM_ONLINE_PASSIVE ONLINE->OPASSIVE Interpretation: POC normal passive ONLINE->HALT NoCom LOWNUM->ONLINE Interpretation: genug Kaltstarter LOWNUM->HALT NoCom OPASSIVE->ONLINE Interpretation: wieder normal active OPASSIVE->HALT NoCom HALT->READY t_TrcvStdbyDelay expired or FrSMTrcvStdbyDelay = 0 ECUACT FRSM_ECU_ACTIVE ECUPAS FRSM_ECU_PASSIVE ECUACT->ECUPAS FrSm_SetEcuPassive(TRUE) ECUPAS->ECUACT FrSm_SetEcuPassive(FALSE)

State diagram: Eight main states per cluster and the parallel ECU passive mode. The transitions to FRSM_ONLINE_PASSIVE and FRSM_LOW_NUMBER_OF_COLDSTARTERS are interpreted. Sources: SWS FrSM p. 18, SWS FrSM p. 27

For ComM, FullCom applies only in FRSM_ONLINE and FRSM_LOW_NUMBER_OF_COLDSTARTERS (SWS FrSM p. 38). Two special operating modes are available to the BswM. FrSm_AllSlots terminates key-slot-only operation [SWS_FrSM_00172]. FrSm_SetEcuPassive switches all clusters to pure receive mode [SWS_FrSM_00174]. FrSM_BswM_StateType reports both dimensions combined [SWS_FrSM_00199]. In R20-11, some functions are still named FrSm_…, and the service IDs differ from later releases [SWS_FrSM_00020].

In the event of an error, the FrSM reports development errors such as FRSM_E_UNINIT or FRSM_E_INV_HANDLE [SWS_FrSM_91001]. If synchronization is not successful, it calls FrNm_StartupError. It optionally reports a loss of synchronization via <Cdd>_SyncLossErrorIndication [SWS_FrSM_00190].

Role: bus state manager between ComM, BswM, and FlexRay Interface

The FlexRay State Manager (FrSM) translates the communication requests of the ComM for each FlexRay cluster into control calls to the FlexRay Interface. ComM requests a ComM_ModeType for a NetworkHandleType via FrSM_RequestComMode [SWS_FrSM_00020]. The FrSM reports the reached bus mode back via ComM_BusSM_ModeIndication, and its detailed state to the BswM via BswM_FrSM_CurrentState [SWS_FrSM_00096]. It never controls controllers and transceivers directly. Instead, it uses FrIf functions bundled in the specification into functional elements such as FE_START (FrIf_StartCommunication) or FE_HALT (FrIf_HaltCommunication) (SWS FrSM p. 22).

In addition, FrSM uses optional services: Dem_SetEventStatus, Det_ReportError, FrIf_AllSlots, FrIf_GetNumOfStartupFrames, FrIf_GetWakeupRxStatus, FrIf_SetWakeupChannel, and FrNm_StartupError [SWS_FrSM_00097]. It imports its types from ComM, ComStack_Types, DEM, Fr, and FrIf, among others [SWS_FrSM_00095]. BswM also actively controls FrSM. For example, it can set it to passive mode via FrSm_SetEcuPassive() for diagnostic use cases (EXP ModeMgmt p. 36).

frsm_kontext ComM ComM FrSM FrSM (one state machine per FlexRay cluster) ComM->FrSM FrSM_RequestComMode FrSM_GetCurrentComMode BswM BswM BswM->FrSM FrSm_SetEcuPassive FrSm_AllSlots SchM SchM SchM->FrSM FrSM_MainFunction_<FrSMCluster.ShortName> FrSM->ComM ComM_BusSM_ModeIndication FrSM->BswM BswM_FrSM_CurrentState FrIf FrIf FrSM->FrIf FrIf_StartCommunication, FrIf_AllowColdstart, FrIf_HaltCommunication, FrIf_SetTransceiverMode, FrIf_SendWUP, FrIf_AllSlots, … Dem Dem FrSM->Dem Dem_SetEventStatus Det Det FrSM->Det Det_ReportError FrNm FrNm FrSM->FrNm FrNm_StartupError CDD <Cdd> (optional) FrSM->CDD <Cdd>_SyncLossErrorIndication

Context diagram: FrSM is located between the requesters ComM/BswM, the clock generator SchM, and the executing FrIf, and reports errors to DEM, DET, FrNm, and an optional CDD. Sources: [SWS_FrSM_00096], [SWS_FrSM_00097], [SWS_FrSM_00118], [SWS_FrSM_00190]

State machine per cluster and parallel ECU passive mode

FrSM maintains a separate state machine with eight states for each cluster: FRSM_READY, FRSM_WAKEUP, FRSM_STARTUP, FRSM_HALT_REQ, FRSM_ONLINE, FRSM_ONLINE_PASSIVE, FRSM_KEYSLOT_ONLY, and FRSM_LOW_NUMBER_OF_COLDSTARTERS. Each state is assigned to a POC state of the controller:

  • FRSM_ONLINE corresponds to POC:normal active with full communication.
  • FRSM_ONLINE_PASSIVE corresponds to POC:normal passive. Due to clock synchronization errors, no data is transmitted or received there.
  • In FRSM_KEYSLOT_ONLY, transmission is only permitted in the key slots.

SWS FrSM p. 18 describes this mapping. The transitions are defined in tabular form, and FrSM executes their actions in the sequence specified there (SWS FrSM p. 24).

In parallel, there are the states FRSM_ECU_ACTIVE and FRSM_ECU_PASSIVE (SWS FrSM p. 18). FrSm_SetEcuPassive switches all clusters of the ECU jointly to receive-only mode or back [SWS_FrSM_00174]. If a cluster is not in FRSM_READY during this, FrSM executes FE_TRCV_NORMAL for it (SWS FrSM p. 40). FrSM_BswM_StateType maps both dimensions: for each main state, there is a value with suffix _ECU_PASSIVE, from FRSM_BSWM_READY (0x00) to FRSM_LOW_NUMBER_OF_COLDSTARTERS_ECU_PASSIVE (0x0F) [SWS_FrSM_00199]. The two passive concepts must not be confused. ONLINE_PASSIVE is a fault consequence of synchronization, whereas ECU_PASSIVE is intentional receive mode.

Externally, only the mode provided by FrSM_GetCurrentComMode counts. COMM_FULL_COMMUNICATION applies exclusively in FRSM_ONLINE and FRSM_LOW_NUMBER_OF_COLDSTARTERS; in all other states, COMM_NO_COMMUNICATION applies (SWS FrSM p. 38, [SWS_FrSM_00024]). SilentCom is not supported on FlexRay (SWS FrSM p. 18).

frsm_zustand cluster_haupt Hauptautomat je FlexRay-Cluster cluster_ecu Parallel: ECU passive mode (all clusters) start READY FRSM_READY start->READY FrSm_Init (T00) WAKEUP FRSM_WAKEUP READY->WAKEUP FullCom angefordert, eigenes Wecken STARTUP FRSM_STARTUP READY->STARTUP FullCom angefordert, kein eigenes Wecken WAKEUP->STARTUP wakeupFinished KEYSLOT FRSM_KEYSLOT_ONLY STARTUP->KEYSLOT POC normal active, key slots only ONLINE FRSM_ONLINE (FullCom) STARTUP->ONLINE POC normal active KEYSLOT->ONLINE FrSm_AllSlots HALT FRSM_HALT_REQ KEYSLOT->HALT NoCom LOWNUM FRSM_LOW_NUMBER_OF_COLDSTARTERS (FullCom) ONLINE->LOWNUM Interpretation: lowNumberOfColdstarters OPASSIVE FRSM_ONLINE_PASSIVE ONLINE->OPASSIVE Interpretation: POC normal passive ONLINE->HALT NoCom LOWNUM->ONLINE Interpretation: genug Kaltstarter LOWNUM->HALT NoCom OPASSIVE->ONLINE Interpretation: wieder normal active OPASSIVE->HALT NoCom HALT->READY t_TrcvStdbyDelay expired or FrSMTrcvStdbyDelay = 0 ECUACT FRSM_ECU_ACTIVE ECUPAS FRSM_ECU_PASSIVE ECUACT->ECUPAS FrSm_SetEcuPassive(TRUE) ECUPAS->ECUACT FrSm_SetEcuPassive(FALSE)

State diagram: Main state machine per cluster with the paths Wakeup → Startup → Online as well as Halt → Ready, alongside the ECU passive mode common to all clusters. Interpretation: The transitions to FRSM_ONLINE_PASSIVE and FRSM_LOW_NUMBER_OF_COLDSTARTERS are derived from the state table and conditions. Sources: SWS FrSM p. 27, SWS FrSM p. 18, SWS FrSM p. 20, [SWS_FrSM_00209]

From FrSm_Init to full communication: Wakeup and startup

FrSm_Init is synchronous and non-reentrant. The function receives a pointer to FrSM_ConfigType, the implementation-specific post-build configuration ([SWS_FrSM_00013], [SWS_FrSM_00198]). It sets all cluster state machines to FRSM_READY (transition T00) and stores the configuration address. If FrSMDevErrorDetect is active, it also notes the successful initialization (SWS FrSM p. 35).

FrSM_RequestComMode operates asynchronously. The function stores the requested mode as reqComMode. It is only processed during the next run of FrSM_MainFunction_<FrSMCluster.ShortName> in the state machine of the affected cluster (SWS FrSM p. 36). There is one main function per cluster, provided via SchM_FrSm.h [SWS_FrSM_00118]. Its call rate likely follows parameter FrSMMainFunctionCycleTime (SWS FrSM p. 62). Question (open)

Upon a FullCom request in FRSM_READY, FrSM evaluates condition WUReason. If FrSMCheckWakeupReason is set, it queries each transceiver via FrIf_GetTransceiverWUReason. The result is NO_WU_BY_BUS, PARTIAL_WU_BY_BUS, or ALL_WU_BY_BUS; without checking, NO_WU_BY_BUS applies (SWS FrSM p. 20). If the ECU was woken up by the bus, it starts up without its own wakeup (SWS FrSM p. 52). If wakeup arrived on only one channel in a dual-channel node, FE_SET_WU_CHANNEL_FORWARD forwards it to the other channel (SWS FrSM p. 22, SWS FrSM p. 56).

frsm_weckentscheidung start req reqComMode = FullCom in FRSM_READY start->req chk FrSMCheckWakeupReason? req->chk nobus WUReason := NO_WU_BY_BUS chk->nobus false query FrIf_GetTransceiverWUReason je Transceiver chk->query true wuecu Interpretation: FrSMIsWakeupEcu? nobus->wuecu wu WUReason? query->wu wu->wuecu NO_WU_BY_BUS forward FRSM_WAKEUP: FE_SET_WU_CHANNEL_FORWARD, FE_WAKEUP (anderer Kanal) wu->forward PARTIAL_WU_BY_BUS (Zweikanalknoten) startup FRSM_STARTUP: FE_START, ggf. FE_ALLOW_COLDSTART wu->startup ALL_WU_BY_BUS wakeup FRSM_WAKEUP: FE_SET_WU_CHANNEL_INITIAL, FE_WAKEUP wuecu->wakeup yes wuecu->startup no wakeup->startup wakeupFinished forward->startup wakeupFinished

Activity diagram: WUReason determines whether FrSM wakes up itself, forwards a wakeup, or starts up directly. Interpretation: The branch for non-wakeup ECUs is derived from FrSMIsWakeupEcu. Sources: SWS FrSM p. 20, SWS FrSM p. 22, SWS FrSM p. 54

In FRSM_WAKEUP, FrSM transmits wakeup patterns via FE_WAKEUP, i.e., FrIf_SendWUP per controller. It repeats this until FrSMNumWakeupPatterns is reached or bus traffic was detected (busTrafficDetected). If a controller transitions to HALT due to an error, transmission is aborted (SWS FrSM p. 27).

frsm_weckmuster start init Eintritt in FRSM_WAKEUP: wakeupCounter := 1 start->init cond wakeupCounter < FrSMNumWakeupPatterns und busTrafficDetected = false? init->cond wait Warten, bis alle Controller des Clusters in FR_READY cond->wait yes done wakeupFinished = true cond->done no halt Controller wegen Fehler im HALT? wait->halt status vPOC!WakeupStatus? halt->status no halt->done ja: Abbruch bus busTrafficDetected := true status->bus FR_WAKEUP_RECEIVED_HEADER oder FR_WAKEUP_RECEIVED_WUP tx wakeupTransmitted := true status->tx FR_WAKEUP_TRANSMITTED notx wakeupTransmitted := false status->notx Otherwise again busTrafficDetected = false und wakeupCounter < FrSMNumWakeupPatterns? bus->again tx->again notx->again fe FE_WAKEUP: FrIf_SendWUP je Controller again->fe yes inc wakeupCounter erhöhen again->inc no fe->inc inc->cond

Activity diagram: Repeated transmission of wakeup patterns with evaluation of vPOC!WakeupStatus and abort upon controller HALT. Sources: SWS FrSM p. 27, SWS FrSM p. 18

Startup begins with FrIf_StartCommunication. FrSM calls FrIf_AllowColdstart only in FrSMIsColdstartEcu (SWS FrSM p. 22). Afterwards, it reports FRSM_STARTUP to BswM. As soon as the POC status is normal active, FrIf_SetState(FRIF_GOTO_ONLINE), the indication FRSM_ONLINE, and the mode indication to ComM follow (SWS FrSM p. 50, SWS FrSM p. 52).

Single-channel wakeup and startup up to FRSM_ONLINEComMBswMSchMFrSMFrIfDemFrSM_RequestComMode(NetworkHandle,COMM_FULL_COMMUNICATION)E_OKreqComMode gespeichert,Evaluation in the main functionUse Case: Wecken (FRSM_WAKEUP)FrSM_MainFunction_<FrSMCluster.ShortName>loopFor all controllers of the clusterFrIf_GetTransceiverWUReason(CtrlIdx, ChnlIdx,TrcvWUReasonPtr)FRTRCV_WU_POWER_ONFrIf_SetTransceiverMode(CtrlIdx, ChnlIdx,FRTRCV_TRCVMODE_NORMAL)FrIf_SendWUP(CtrlIdx)BswM_FrSM_CurrentState(FRSM_BSWM_WAKEUP)FrSM_MainFunction_<FrSMCluster.ShortName>FrIf_GetPOCStatus(CtrlIdx, POCStatusPtr)FrIf_GetWakeupRxStatus(CtrlIdx)FR_POCSTATE_WAKEUPUse Case: Anlauf (FRSM_STARTUP)FrSM_MainFunction_<FrSMCluster.ShortName>loopFor all controllers of the clusterFrIf_StartCommunication(CtrlIdx)optFrSMIsColdstartEcuFrIf_AllowColdstart(CtrlIdx)BswM_FrSM_CurrentState(FRSM_BSWM_STARTUP)Use Case: Vollkommunikation (FRSM_ONLINE)FrSM_MainFunction_<FrSMCluster.ShortName>FrIf_GetPOCStatus(CtrlIdx, POCStatusPtr)FR_POCSTATE_NORMAL_ACTIVEDem_SetEventStatus(FRSM_E_CLUSTER_STARTUP,PASSED)FrIf_SetState(ClstIdx, FRIF_GOTO_ONLINE)BswM_FrSM_CurrentState(FRSM_BSWM_ONLINE)ComM_BusSM_ModeIndication(NetworkHandle,COMM_FULL_COMMUNICATION)

Sequence diagram: Single-channel wakeup and startup up to FRSM_ONLINE, distributed across several runs of the main function. Interpretation: The order within the runs is reconstructed from the specification figures and simplified. Sources: SWS FrSM p. 50, SWS FrSM p. 52, [SWS_FrSM_00118]

Key-slot-only operation, enabling of all slots, and few coldstarters

If the controller is configured with pKeySlotOnlyEnabled, startup initially ends in FRSM_KEYSLOT_ONLY. This state corresponds to POC:normal active with vPOCSlotMode ≠ AllSlots (SWS FrSM p. 18, SWS FrSM p. 55). It is exited via FrSm_AllSlots [SWS_FrSM_00172]. The function calls FrIf_AllSlots for each controller of the cluster and only returns E_OK if all calls resulted in E_OK. It can be disabled at pre-compile time via FrSMAllSlotsSupport (SWS FrSM p. 41). According to the specification figure, BswM enables full operation. Only then does FrSM report FRSM_ONLINE and FullCom to ComM (SWS FrSM p. 57).

Startup in key-slot-only mode and release of all slotsComMBswMSchMFrSMFrIfUse Case: Anlauf endet in FRSM_KEYSLOT_ONLYFrSM_MainFunction_<FrSMCluster.ShortName>loopFor all controllers of the clusterFrIf_GetPOCStatus(CtrlIdx, POCStatusPtr)FR_POCSTATE_NORMAL_ACTIVE,SlotMode = FR_SLOTMODE_KEYSLOTFrIf_SetState(ClstIdx, FRIF_GOTO_ONLINE)BswM_FrSM_CurrentState(FRSM_BSWM_KEYSLOT_ONLY)NoCom still applies to ComM(FrSM_GetCurrentComMode)Use Case: Freigabe aller SlotsFrSm_AllSlots(NetworkHandle)loopFor all controllers of the clusterFrIf_AllSlots(CtrlIdx)E_OKE_OK (only if all calls E_OK)FrSM_MainFunction_<FrSMCluster.ShortName>FrIf_GetPOCStatus(CtrlIdx, POCStatusPtr)FR_POCSTATE_NORMAL_ACTIVE,SlotMode = FR_SLOTMODE_ALLBswM_FrSM_CurrentState(FRSM_BSWM_ONLINE)ComM_BusSM_ModeIndication(NetworkHandle,COMM_FULL_COMMUNICATION)

Sequence diagram: Two-stage ramp-up: first key slots only, then enabling of all slots via FrSm_AllSlots. The specification figure labels the BswM indication as FRSM_ONLINE_KEYSLOT_ONLY; here, the R20-11 value FRSM_BSWM_KEYSLOT_ONLY is used. Sources: SWS FrSM p. 57, SWS FrSM p. 55, [SWS_FrSM_00172], [SWS_FrSM_00199]

FRSM_LOW_NUMBER_OF_COLDSTARTERS denotes full communication where the cluster is synchronized only via sync frames (SWS FrSM p. 18). Condition lowNumberOfColdstarters is fulfilled if FrIf_GetNumOfStartupFrames() reports fewer startup frames than specified by the optional parameter FrSMMinNumberOfColdstarter (SWS FrSM p. 20).

Return to NoCom and cluster timers

NoCom can be requested while the state machine is in FRSM_ONLINE, FRSM_KEYSLOT_ONLY, FRSM_LOW_NUMBER_OF_COLDSTARTERS, or FRSM_ONLINE_PASSIVE. In this case, FrSM_RequestComMode already processes the transition without waiting for the main function (SWS FrSM p. 36). This includes FrIf_SetState(FRIF_GOTO_OFFLINE), FrIf_HaltCommunication, and the indication HALT_REQ to BswM. In later runs, FrSM reports NoCom to ComM, reinitializes the controllers, sets the transceivers to STANDBY, and reports READY (SWS FrSM p. 58).

Transition from FullCom to NoComComMBswMSchMFrSMFrIfFrSM_RequestComMode(NetworkHandle,COMM_NO_COMMUNICATION)Source state is a FullCom state:Transition immediately within the callFrIf_SetState(CtrlIdx, FRIF_GOTO_OFFLINE)FrIf_HaltCommunication(CtrlIdx)BswM_FrSM_CurrentState(FRSM_BSWM_HALT_REQ)E_OKFrSM_MainFunction_<FrSMCluster.ShortName>FrIf_GetPOCStatus(CtrlIdx, POCStatusPtr)ComM_BusSM_ModeIndication(NetworkHandle,COMM_NO_COMMUNICATION)After expiry of t_TrcvStdbyDelay or immediately,if FrSMTrcvStdbyDelay is missing or 0FrIf_ControllerInit(CtrlIdx)FrIf_SetTransceiverMode(CtrlIdx, ChnlIdx,STANDBY)BswM_FrSM_CurrentState(FRSM_BSWM_READY)

Sequence diagram: From FullCom to NoCom. The halt takes place synchronously in the request call; reinitialization and standby follow with a delay in the main function. Interpretation: The order is reconstructed from the specification figure. Sources: SWS FrSM p. 58, SWS FrSM p. 36, [SWS_FrSM_00209]

FrSM operates with multiple timers per cluster (SWS FrSM p. 21):

  • t1 delays FrIf_AllowColdstart. With FrSMDurationT1 = 0, the call directly follows FrIf_StartCommunication.
  • t2 determines the time after which startup is repeated.
  • t3 monitors the transition to FullCom.
  • t4 ensures that a dual-channel node clears its coldstart inhibit bit.
  • t_TrcvStdbyDelay delays reinitialization and standby. If FrSMTrcvStdbyDelay is not configured or 0, the state machine transitions immediately from FRSM_HALT_REQ to FRSM_READY [SWS_FrSM_00209].

Configuration per FrSMCluster and interface status R20-11

The container FrSMCluster (1..*) describes a cluster that can comprise multiple controllers on an ECU. It contains:

  • the timers FrSMDurationT1 to FrSMDurationT4,
  • the roles FrSMIsColdstartEcu and FrSMIsWakeupEcu,
  • FrSMNumWakeupPatterns and FrSMStartupRepetitions,
  • the references FrSMComMNetworkHandleRef and FrSMFrIfClusterRef.

SWS FrSM p. 62 describes these contents. In addition, FrSMVersionInfoApi for FrSM_GetVersionInfo and FrSMSyncLossErrorIndicationName are globally configurable (SystemTemplate p. 1528, [SWS_FrSM_00029]).

Many detailed passages originate from later releases. For R20-11, the requirements apply, and they deviate in some points:

  • The functions are named FrSm_Init, FrSm_AllSlots, and FrSm_SetEcuPassive and are available via FrSm.h.
  • FrSM_RequestComMode has the service ID 0x02 and is reentrant for different clusters. Later passages mention 0x40 and other parameter names.
  • FrSM_GetCurrentComMode has the service ID 0x03 in R20-11.

References: [SWS_FrSM_00013], [SWS_FrSM_00020], [SWS_FrSM_00024], SWS FrSM p. 36.

Behavior in the event of an error

The following codes are defined for development errors [SWS_FrSM_91001]:

  • FRSM_E_PARAM_POINTER: invalid pointer. The service returns immediately.
  • FRSM_E_INV_HANDLE: invalid network handle.
  • FRSM_E_UNINIT: module not initialized.
  • FRSM_E_INV_MODE: invalid communication mode.
  • FRSM_INIT_FAILED: initialization failed.

Some cases are explicitly regulated. FrSm_AllSlots reports FRSM_E_INV_HANDLE upon an invalid handle and returns E_NOT_OK (SWS FrSM p. 41). FrSm_SetEcuPassive reports a development error prior to initialization (SWS FrSM p. 40). FrSM_GetCurrentComMode returns E_NOT_OK in R20-11 without prior initialization [SWS_FrSM_00024].

FrSM responds at the bus level as follows:

  • Upon clock synchronization errors, the cluster drops into FRSM_ONLINE_PASSIVE (SWS FrSM p. 18).
  • If synchronization fails, FrSM calls FrNm_StartupError [SWS_FrSM_00097].
  • Startup is repeated after t2 (SWS FrSM p. 21). FrSMStartupRepetitions is presumed to limit the number of repetitions. Question (open)

FrSM reports the startup status as DEM event FRSM_E_CLUSTER_STARTUP, in case of success with PASSED (SWS FrSM p. 52). The event IDs are located in FrSMClusterDemEventParameterRefs (SWS FrSM p. 62). Optionally, <Cdd>_SyncLossErrorIndication informs about a loss of synchronization with true. With false, the function indicates that synchronization has been restored or the FullCom request was withdrawn [SWS_FrSM_00190]. Without a configured function name, this notification is omitted (SystemTemplate p. 1528).

Further detailed evidence

AI-generated guide based on the requirements of R20-11 and associated specification passages, partly from later releases. The linked requirements are authoritative; interpretations are marked as such.

FlexRay State Manager (FrSM)

Controls the operational states and startup/wakeup of FlexRay clusters.

Funktionen — Übersicht

Typen — Übersicht

Funktionen & Typen — Detailansicht

function FrSm_Init [SWS_FrSM_00013] 📄 PDF

void FrSm_Init (const FrSM_ConfigType* FrSM_ConfigPtr);

Initializes the Flex Ray State Manager.

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

The function FrSm_Init serves, according to specification [SWS_FrSM_00013], to initialize the FlexRay State Manager (FrSM). It has service ID 0x01 and is declared via the header file FrSm.h.

Usage and Parameters

The execution of FrSm_Init takes place synchronously [SWS_FrSM_00013]. The call expects exactly one input parameter:

  • FrSM_ConfigPtr: Pointer to the selected configuration structure of type const FrSM_ConfigType*, via which the initialization data of the module are provided [SWS_FrSM_00013].

The function has no return value (void) and defines neither input/output parameters (inout) nor pure output parameters (out) [SWS_FrSM_00013].

Concurrency and Limitations

With regard to the execution context, the interface is classified as non-reentrant (Non Reentrant) [SWS_FrSM_00013]. Simultaneous or nested calls of the function are therefore not permitted. Interpretation: The call is typically expected to occur during system initialization before regular communication or control services of the FrSM are used. Question Q-881936607a7268bd (open)

Error handling

In the element specification [SWS_FrSM_00013], no return codes or specific mechanisms for error handling such as DET or DEM notifications are identified.

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

Implementer's Guide to follow (complexity I1)

function FrSM_RequestComMode [SWS_FrSM_00020] 📄 PDF

Std_ReturnType FrSM_RequestComMode (NetworkHandleType NetworkHandle, ComM_ModeType ComM_Mode);

This API function is used by the Com M to startup or shutdown the communication on a Flex Ray cluster.

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

Usage and Semantics

The function FrSM_RequestComMode is called by the Communication Manager (ComM) to start or shut down communication on a specific FlexRay cluster [SWS_FrSM_00020]. The interface is declared via the header FrSm.h and has the service ID 0x02 [SWS_FrSM_00020]. Since the service is specified as asynchronous, the function merely acknowledges the acceptance of the switch request, while the actual state transition is processed downstream [SWS_FrSM_00020].

Parameters and Return Values

The function expects two input parameters for controlling the communication mode [SWS_FrSM_00020]:

  • NetworkHandle (type NetworkHandleType): Determines the FlexRay cluster for which a communication mode is requested [SWS_FrSM_00020].
  • ComM_Mode (type ComM_ModeType): Contains the communication mode requested by the ComM for the specified network [SWS_FrSM_00020].

The return value of type Std_ReturnType indicates the result of the request check [SWS_FrSM_00020]:

Concurrency and Limitations

According to the specification, FrSM_RequestComMode is implemented reentrantly for different FlexRay clusters [SWS_FrSM_00020]. For the same FlexRay cluster, the call is presumably non-reentrant, which is why competing calls for the same instance must be avoided. Specific error codes such as DET or DEM messages are not defined in the payload [SWS_FrSM_00020].

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

Implementer's Guide to follow (complexity I1)

function FrSM_GetCurrentComMode [SWS_FrSM_00024] 📄 PDF

Std_ReturnType FrSM_GetCurrentComMode (NetworkHandleType NetworkHandle, ComM_ModeType* ComM_ModePtr);

This API function can be used to determine the current communication mode of a Flex Ray cluster.

function FrSM_GetVersionInfo [SWS_FrSM_00029] 📄 PDF

void FrSM_GetVersionInfo (Std_VersionInfoType* versioninfo);

This service returns the version information of this module. The version information includes:  Module Id  Vendor Id  Vendor specific version numbers (BSW00407 ). This function shall be pre compile time configurable On/ Off by the configuration parameter: FRSM_ VERSION_ INFO_ API Hint: If source code for caller and callee of this function is available this function should be realized as a macro. The macro should be defined in the modules header file.

function FrSm_AllSlots [SWS_FrSM_00172] 📄 PDF

Std_ReturnType FrSm_AllSlots (NetworkHandleType NetworkHandle);

Service FrSm_AllSlots.

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

The asynchronous service function FrSm_AllSlots is provided via header FrSm.h and serves to exit the so-called “Key Slot Only Mode” for a specified FlexRay cluster [SWS_FrSM_00172].

Call and parameters: To identify the communication network, parameter NetworkHandle is passed the respective FlexRay cluster for which the switching mode is to be requested [SWS_FrSM_00172]. No further parameters exist [SWS_FrSM_00172].

Return value and semantics: The call returns E_OK if the switch request was accepted successfully, or E_NOT_OK if the request was rejected [SWS_FrSM_00172]. Since this is an asynchronous operation, E_OK merely acknowledges the acceptance of the request; the actual transition into full operation of all slots is likely to take effect with a time delay in the state manager context. Question Q-d559e4ea5183ff7c (open)

Concurrency and constraints: The function is reentrant for different FlexRay clusters [SWS_FrSM_00172]. For identical clusters, it is designed to be non-reentrant, which is why callers must synchronize parallel requests to the same cluster. Specific error codes for DET or DEM are not mentioned in the function description.

This usage note was created automatically. It is based on AUTOSAR CP R20-11.

function FrSm_SetEcuPassive [SWS_FrSM_00174] 📄 PDF

Std_ReturnType FrSm_SetEcuPassive (boolean FrSM_Passive);

This API function can be used to set all Flex Ray clusters of the ECU to a receive AUTOSAR CP R20 - of Document ID : AUTOSAR_S WS_FlexRayStateManager only mode.

type FrSM_ConfigType [SWS_FrSM_00198] 📄 PDF

This type contains the implementation - specific post build time configuration structure AUTOSAR CP R20 - of Document ID : AUTOSAR_S WS_FlexRayStateManager that is for Fr SM_ Init.

type FrSM_BswM_StateType [SWS_FrSM_00199] 📄 PDF

This type defines the states that are reported to the Bsw

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

use

According to [SWS_FrSM_00199], the enumeration type FrSM_BswM_StateType defines the states of the FlexRay State Manager (FrSM) that are reported to the BswM (Basic Software Mode Manager). The declaration and provision of the type takes place via the header file FrSm.h [SWS_FrSM_00199].

Interaction and Value Range

The values of this type are used in interaction with the interface BswM_FrSM_CurrentState to transmit the current operating and communication state to the BswM module [SWS_FrSM_00199]. The value range comprises the following enumeration values:

  • FRSM_BSWM_READY (0x00) and FRSM_BSWM_READY_ECU_PASSIVE (0x01)
  • FRSM_BSWM_STARTUP (0x02) and FRSM_BSWM_STARTUP_ECU_PASSIVE (0x03)
  • FRSM_BSWM_WAKEUP (0x04) and FRSM_BSWM_WAKEUP_ECU_PASSIVE (0x05)
  • FRSM_BSWM_HALT_REQ (0x06) and FRSM_BSWM_HALT_REQ_ECU_PASSIVE (0x07)
  • FRSM_BSWM_KEYSLOT_ONLY (0x08) and FRSM_BSWM_KEYSLOT_ONLY_ECU_PASSIVE (0x09)
  • FRSM_BSWM_ONLINE (0x0A) and FRSM_BSWM_ONLINE_ECU_PASSIVE (0x0B)
  • FRSM_BSWM_ONLINE_PASSIVE (0x0C) and FRSM_BSWM_ONLINE_PASSIVE_ECU_PASSIVE (0x0D)
  • FRSM_LOW_NUMBER_OF_COLDSTARTERS (0x0E) and FRSM_LOW_NUMBER_OF_COLDSTARTERS_ECU_PASSIVE (0x0F)

The pairwise structuring of the states is striking: Each basic state has a regular counterpart and a variant with the suffix _ECU_PASSIVE. This presumably serves to report the communication state of the FlexRay cluster combined with the passive mode of the ECU to the BswM, so that the latter can coordinate corresponding mode changes. Question Q-f2d9296e40782b5a (open)

This text was generated by an AI and serves as guidance. The referenced AUTOSAR specifications are authoritative.

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_FrSM
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_FrSM@rel:R20-11#3a56e560
Content hash
3a56e560
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_FlexRayStateManager.pdf#nameddest=SWS_FrSM_00013

Topic map

Detail view

Select an entry in the outline.

Initialization and status

This service returns the version information of this module. The version information includes:  Module Id  Vendor Id  Vendor specific version numbers (BSW00407 ). This function shall be pre compile time configurable On/ Off by the configuration parameter: FRSM_ VERSION_ INFO_ API Hint: If source code for caller and callee of this function is available this function should be realized as a macro. The macro should be defined in the modules header file.

void FrSM_GetVersionInfo (Std_VersionInfoType* versioninfo);
FrSm_Init function

Initializes the Flex Ray State Manager.

void FrSm_Init (const FrSM_ConfigType* FrSM_ConfigPtr);

Services

FrSm_AllSlots function

Service FrSm_AllSlots.

Std_ReturnType FrSm_AllSlots (NetworkHandleType NetworkHandle);

This API function can be used to determine the current communication mode of a Flex Ray cluster.

Std_ReturnType FrSM_GetCurrentComMode (NetworkHandleType NetworkHandle, ComM_ModeType* ComM_ModePtr);

This API function is used by the Com M to startup or shutdown the communication on a Flex Ray cluster.

Std_ReturnType FrSM_RequestComMode (NetworkHandleType NetworkHandle, ComM_ModeType ComM_Mode);

This API function can be used to set all Flex Ray clusters of the ECU to a receive AUTOSAR CP R20 - of Document ID : AUTOSAR_S WS_FlexRayStateManager only mode.

Std_ReturnType FrSm_SetEcuPassive (boolean FrSM_Passive);

Types

This type defines the states that are reported to the Bsw

This type contains the implementation - specific post build time configuration structure AUTOSAR CP R20 - of Document ID : AUTOSAR_S WS_FlexRayStateManager that is for Fr SM_ Init.