AUTOSAR Classic FlexRay
Das FlexRay-Cluster bietet deterministische, fehlertolerante High-Speed-Kommunikation mit statischen und dynamischen Segmenten, Bus-Synchronisation, ISO 10681 Transportprotokoll und Transceiver-Diagnose.
初始化与状态
Fr_GetVersionInfoFr_InitFrArTp_GetVersionInfoFrArTp_InitFrIf_GetVersionInfoFrIf_InitFrNm_GetVersionInfoFrNm_InitFrSM_GetVersionInfoFrSm_InitFrTp_GetVersionInfoFrTp_InitFrTrcv_GetVersionInfoFrTrcv_Init服务 · Get…
服务 · Set…
服务 · Cancel…
服务 · Disable…
服务 · Enable…
服务 · Transmit…
服务 · Check…
服务 · All…
服务 · Request…
服务 · 其他
Fr_AbortCommunicationFr_AckAbsoluteTimerIRQFr_AllowColdstartFr_ControllerInitFr_HaltCommunicationFr_PrepareLPduFr_ReadCCConfigFr_ReceiveRxLPduFr_ReconfigLPduFr_SendWUPFr_StartCommunicationFrArTp_ChangeParameterFrArTp_ShutdownFrIf_AbortCommunicationFrIf_AckAbsoluteTimerIRQFrIf_AllowColdstartFrIf_ClearTransceiverWakeupFrIf_ControllerInitFrIf_HaltCommunicationFrIf_ReadCCConfigFrIf_ReconfigLPduFrIf_SendWUPFrIf_StartCommunicationFrNm_ActivateTxPnShutdownMsgFrNm_DeactivateTxPnShutdownMsgFrNm_NetworkReleaseFrNm_NetworkRequestFrNm_PassiveStartUpFrNm_PnLearningRequestFrNm_RepeatMessageRequestFrNm_StartupErrorFrTp_ChangeParameterFrTp_ShutdownFrTrcv_ClearTransceiverWakeup回调
FrArTp_RxIndicationFrArTp_TxConfirmationFrNm_RxIndicationFrNm_TriggerTransmitFrNm_TxConfirmationFrTp_RxIndicationFrTp_TriggerTransmitFrTp_TxConfirmationCallout 与预期接口
<Fr Nm Channel.Short Name><Free_Op_A><Free_Op_B><Nm_Network Start Indication><Nm_Pdu RxIndication><UL_Remote Sleep Cancellation><UL_Remote Sleep Indication><UL_Transmission Timeout Exception><UL_TxConflictNotification><User_RxIndication><User_TriggerTransmit><User_TxConfirmation>周期性
FrArTp_MainFunctionFrTp_MainFunctionFrTrcv_MainFunction类型
Fr_ChannelTypeFr_ConfigTypeFr_ErrorModeTypeFr_POCStatusTypeFr_RxLPduStatusTypeFr_SlotAssignmentTypeFr_SlotModeTypeFr_StartupStateTypeFr_TxLPduStatusTypeFr_WakeupStatusTypeFrArTp_ConfigTypeFrIf_ConfigTypeFrIf_StateTransitionTypeFrIf_StateTypeFrNm_ConfigTypeFrSM_BswM_StateTypeFrSM_ConfigTypeFrTp_ConfigTypeFrTrcv_ConfigTypeFrTrcv_TrcvModeTypeFrTrcv_TrcvWUReasonTypeofaCfunctionwhichsubstitutesMultiplicityType函数
<Fr Nm Channel.Short Name><Free_Op_A><Free_Op_B><Nm_Network Start Indication><Nm_Pdu RxIndication><UL_Remote Sleep Cancellation><UL_Remote Sleep Indication><UL_Transmission Timeout Exception><UL_TxConflictNotification><User_RxIndication><User_TriggerTransmit><User_TxConfirmation>Fr_AbortCommunicationFr_AckAbsoluteTimerIRQFr_AllowColdstartFr_AllSlotsFr_CancelAbsoluteTimerFr_CancelTxLPduFr_CheckTxLPduStatusFr_ControllerInitFr_DisableAbsoluteTimerIRQFr_DisableLPduFr_EnableAbsoluteTimerIRQFr_GetAbsoluteTimerIRQStatusFr_GetChannelStatusFr_GetClockCorrectionFr_GetGlobalTimeFr_GetNmVectorFr_GetNumOfStartupFramesFr_GetPOCStatusFr_GetSyncFrameListFr_GetVersionInfoFr_GetWakeupRxStatusFr_HaltCommunicationFr_InitFr_PrepareLPduFr_ReadCCConfigFr_ReceiveRxLPduFr_ReconfigLPduFr_SendWUPFr_SetAbsoluteTimerFr_SetWakeupChannelFr_StartCommunicationFr_TransmitTxLPduFrArTp_CancelReceiveFrArTp_CancelTransmitFrArTp_ChangeParameterFrArTp_GetVersionInfoFrArTp_InitFrArTp_MainFunctionFrArTp_RxIndicationFrArTp_ShutdownFrArTp_TransmitFrArTp_TxConfirmationFrIf_AbortCommunicationFrIf_AckAbsoluteTimerIRQFrIf_AllowColdstartFrIf_AllSlotsFrIf_CancelAbsoluteTimerFrIf_CancelTransmitFrIf_CheckWakeupByTransceiverFrIf_ClearTransceiverWakeupFrIf_ControllerInitFrIf_DisableAbsoluteTimerIRQFrIf_DisableLPduFrIf_DisableTransceiverBranchFrIf_EnableAbsoluteTimerIRQFrIf_EnableBusMirroringFrIf_EnableTransceiverBranchFrIf_GetAbsoluteTimerIRQStatusFrIf_GetChannelStatusFrIf_GetClockCorrectionFrIf_GetCycleLengthFrIf_GetGlobalTimeFrIf_GetMacrotickDurationFrIf_GetMacroticksPerCycleFrIf_GetNmVectorFrIf_GetNumOfStartupFramesFrIf_GetPOCStatusFrIf_GetStateFrIf_GetSyncFrameListFrIf_GetTransceiverErrorFrIf_GetTransceiverModeFrIf_GetTransceiverWUReasonFrIf_GetVersionInfoFrIf_GetWakeupRxStatusFrIf_HaltCommunicationFrIf_InitFrIf_ReadCCConfigFrIf_ReconfigLPduFrIf_SendWUPFrIf_SetAbsoluteTimerFrIf_SetStateFrIf_SetTransceiverModeFrIf_SetWakeupChannelFrIf_StartCommunicationFrIf_TransmitFrNm_ActivateTxPnShutdownMsgFrNm_CheckRemoteSleepIndicationFrNm_DeactivateTxPnShutdownMsgFrNm_DisableCommunicationFrNm_EnableCommunicationFrNm_GetLocalNodeIdentifierFrNm_GetNodeIdentifierFrNm_GetPduDataFrNm_GetStateFrNm_GetUserDataFrNm_GetVersionInfoFrNm_InitFrNm_NetworkReleaseFrNm_NetworkRequestFrNm_PassiveStartUpFrNm_PnLearningRequestFrNm_RepeatMessageRequestFrNm_RequestBusSynchronizationFrNm_RequestSynchronizedPncShutdownFrNm_RxIndicationFrNm_SetSleepReadyBitFrNm_SetUserDataFrNm_StartupErrorFrNm_TransmitFrNm_TriggerTransmitFrNm_TxConfirmationFrSm_AllSlotsFrSM_GetCurrentComModeFrSM_GetVersionInfoFrSm_InitFrSM_RequestComModeFrSm_SetEcuPassiveFrTp_CancelReceiveFrTp_CancelTransmitFrTp_ChangeParameterFrTp_GetVersionInfoFrTp_InitFrTp_MainFunctionFrTp_RxIndicationFrTp_ShutdownFrTp_TransmitFrTp_TriggerTransmitFrTp_TxConfirmationFrTrcv_CheckWakeupByTransceiverFrTrcv_ClearTransceiverWakeupFrTrcv_DisableTransceiverBranchFrTrcv_EnableTransceiverBranchFrTrcv_GetTransceiverErrorFrTrcv_GetTransceiverModeFrTrcv_GetTransceiverWUReasonFrTrcv_GetVersionInfoFrTrcv_InitFrTrcv_MainFunctionFrTrcv_SetTransceiverMode类型
Fr_ChannelTypeFr_ConfigTypeFr_ErrorModeTypeFr_POCStatusTypeFr_RxLPduStatusTypeFr_SlotAssignmentTypeFr_SlotModeTypeFr_StartupStateTypeFr_TxLPduStatusTypeFr_WakeupStatusTypeFrArTp_ConfigTypeFrIf_ConfigTypeFrIf_StateTransitionTypeFrIf_StateTypeFrNm_ConfigTypeFrSM_BswM_StateTypeFrSM_ConfigTypeFrTp_ConfigTypeFrTrcv_ConfigTypeFrTrcv_TrcvModeTypeFrTrcv_TrcvWUReasonTypeofaCfunctionwhichsubstitutesMultiplicityType主题图
Fr
42FrArTp
11FrIf
52FrNm
33FrSM
8FrTp
12FrTrcv
15此版本没有元素数据
Fr
Invokes the CC CHI command 'FREEZE'.
Std_ReturnType Fr_AbortCommunication (uint8 Fr_CtrlIdx);Service Fr_AckAbsoluteTimerIRQ.
Std_ReturnType Fr_AckAbsoluteTimerIRQ (uint8 Fr_CtrlIdx, uint8 Fr_AbsTimerIdx);Invokes the CC CHI command 'ALLOW_ COLDSTART'.
Std_ReturnType Fr_AllowColdstart (uint8 Fr_CtrlIdx);Invokes the CC CHI command 'ALL_ SLOTS'.
Std_ReturnType Fr_AllSlots (uint8 Fr_CtrlIdx);Stops an absolute timer.
Std_ReturnType Fr_CancelAbsoluteTimer (uint8 Fr_CtrlIdx, uint8 Fr_AbsTimerIdx);Cancels the already pending transmission of a LPdu contained in a controllers p hysical transmit resource (e.g. message buffer).
Std_ReturnType Fr_CancelTxLPdu (uint8 Fr_CtrlIdx, uint16 Fr_LPduIdx);Checks the transmit status of the LSdu.
Std_ReturnType* Fr_CheckTxLPduStatus (uint8 Fr_CtrlIdx, uint16 Fr_LPduIdx, Fr_TxLPduStatusType* Fr_TxLPduStatusPtr, Fr_SlotAssignmentType* Fr_SlotAssignmentPtr);Initialzes a F lex Ray CC.
Std_ReturnType Fr_ControllerInit (uint8 Fr_CtrlIdx);Disables the in terrupt line of an absolute timer.
Std_ReturnType Fr_DisableAbsoluteTimerIRQ (uint8 Fr_CtrlIdx, uint8 Fr_AbsTimerIdx);Disables the hardware resource of a LPdu for transmission/ reception.
Std_ReturnType Fr_DisableLPdu (uint8 Fr_CtrlIdx, uint16 Fr_LPduIdx);Service Fr_EnableAbsoluteTimerIRQ.
Std_ReturnType Fr_EnableAbsoluteTimerIRQ (uint8 Fr_CtrlIdx, uint8 Fr_AbsTimerIdx);Gets IRQ status of an absolute timer.
Std_ReturnType Fr_GetAbsoluteTimerIRQStatus (uint8 Fr_CtrlIdx, uint8 Fr_AbsTimerIdx, boolean* Fr_IRQStatusPtr);Gets the channe l status information. Specification of FlexRay Driver AUTOSAR CP R20 - of Document ID : AUTOSAR_SWS_FlexRayDriver
Std_ReturnType Fr_GetChannelStatus (uint8 Fr_CtrlIdx, uint16* Fr_ChannelAStatusPtr, uint16* Fr_ChannelBStatusPtr);Gets the current clock correction values. See variables v Interim Rate Correction and v Interim Offset Correction of [12] for details.
Std_ReturnType Fr_GetClockCorrection (uint8 Fr_CtrlIdx, sint16* Fr_RateCorrectionPtr, sint32* Fr_OffsetCorrectionPtr);Gets the current global Flex Ray time. Important Note: Fr_ Get Global Time may be called within an exclusive area.
Std_ReturnType Fr_GetGlobalTime (uint8 Fr_CtrlIdx, uint8* Fr_CyclePtr, uint16* Fr_MacroTickPtr);Gets the network management vector of the last communication cycle.
Std_ReturnType Fr_GetNmVector (uint8 Fr_CtrlIdx, uint8* Fr_NmVectorPtr);Gets the current number of startup frames seen on the cluster. See variable v Startup Pairs of [12] for details.
Std_ReturnType Fr_GetNumOfStartupFrames (uint8 Fr_CtrlIdx, uint8* Fr_NumOfStartupFramesPtr);Gets the POC status.
Std_ReturnType Fr_GetPOCStatus (uint8 Fr_CtrlIdx, Fr_POCStatusType* Fr_POCStatusPtr);Returns the version information of this module.
void Fr_GetVersionInfo (Std_VersionInfoType* VersioninfoPtr);Gets the wakeup received information from the Flex Ray controller.
Std_ReturnType Fr_GetWakeupRxStatus (uint8 Fr_CtrlIdx, uint8* Fr_WakeupRxStatusPtr);Invokes the CC CHI command 'DEFERRED_ HALT'.
Std_ReturnType Fr_HaltCommunication (uint8 Fr_CtrlIdx);Initializes the Fr.
void Fr_Init (const Fr_ConfigType* Fr_ConfigPtr);Prepares a LPdu.
Std_ReturnType Fr_PrepareLPdu (uint8 Fr_CtrlIdx, uint16 Fr_LPduIdx);Service Fr_ReadCCConfig.
Std_ReturnType Fr_ReadCCConfig (uint8 Fr_CtrlIdx, uint8 Fr_Config ParamIdx, uint32* Fr_Config ParamValuePtr); ⚠️Service Fr_ReceiveRxLPdu.
Std_ReturnType Fr_ReceiveRxLPdu (uint8 Fr_CtrlIdx, uint16 Fr_LPduIdx, uint8* Fr_LSduPtr, Fr_RxLPduStatusType* Fr_LPduStatusPtr, uint8* Fr_LSduLengthPtr, Fr_SlotAssignmentType* Fr_SlotAssignmentPtr);Service Fr_ReconfigLPdu.
Std_ReturnType Fr_ReconfigLPdu (uint8 Fr_CtrlIdx, uint16 Fr_LPduIdx, uint16 Fr_FrameId, Fr_ChannelType Fr_ChnlIdx, uint8 Fr_CycleRepetition, uint8 Fr_CycleOffset, uint8 Fr_PayloadLength, uint16 Fr_Header CRC); ⚠️Invokes the CC CHI command 'WAKEUP'.
Std_ReturnType Fr_SendWUP (uint8 Fr_CtrlIdx);Sets the absolute Flex Ray timer.
Std_ReturnType Fr_SetAbsoluteTimer (uint8 Fr_CtrlIdx, uint8 Fr_AbsTimerIdx, uint8 Fr_Cycle, uint16 Fr_Offset);Sets a wakeup channel.
Std_ReturnType Fr_SetWakeupChannel (uint8 Fr_CtrlIdx, Fr_ChannelType Fr_ChnlIdx);Starts communication.
Std_ReturnType Fr_StartCommunication (uint8 Fr_CtrlIdx);Transmits data on the Flex Ray network.
Std_ReturnType Fr_TransmitTxLPdu (uint8 Fr_CtrlIdx, uint16 Fr_LPduIdx, const uint8* Fr_LSduPtr, uint8 Fr_LSduLength, Fr_SlotAssignmentType* Fr_SlotAssignmentPtr);FlexRay channel identifier: FR_CHANNEL_A, FR_CHANNEL_B, or FR_CHANNEL_AB.
This type contains the implementation - specific post build configuration structure.
This formal definition refers to the description of type T_ Error Mode in chapter 2.2.1.3 POC status of [12].
This formal definition refers to the description of type T_ POCStatus in chapter 2.2.1.3 POC status of [12].
These values are used to determine if a LPdu has been received or not.
This structure contains information about the assignment of a Flex Ray frame to a cycle and a slot ID.
This formal definition refers to the description of type T_ Slot Mode in chapter 2.2.1.3 POC status of [12]. Available Fr_ General Types.h For FlexRay 2.1 Rev A compliant FlexRay controllers see literal SINGL ESLOT instead of KEYSLOT in [14] . Specification of FlexRay Driver AUTOSAR CP R20 - of Document ID : AUTOSAR_SWS_FlexRayDriver via
Type Fr_StartupStateType.
These values are used to determine whether a LPdu has been transmitted or not.
This formal definition refers to the description of type T_ Wakeup Status in chapter Specification of FlexRay Driver AUTOSAR CP R20 - of Document ID : AUTOSAR_SWS_FlexRayDriver 2.2.1.3 POC status of [12].
FrArTp
Requests cancellation of an ongoing reception of a PDU in a lower layer transport protocol module.
Std_ReturnType FrArTp_CancelReceive(PduIdType RxPduId);Requests cancellation of an ongoing transmission of a PDU in a lower layer communication module.
Std_ReturnType FrArTp_CancelTransmit(PduIdType TxPduId);Request to change a specific transport protocol parameter (e.g. block size).
Std_ReturnType FrArTp_ChangeParameter(PduIdType id, TPParameterType parameter, uint16 value);Returns the version information.
void FrArTp_GetVersionInfo(Std_VersionInfoType* versioninfo);This service initializes all global variables of the Flex Ray AUTOSAR Transport Layer and sets all states to idle.
void FrArTp_Init(const FrArTp_ConfigType* configPtr);Schedules the Flex Ray TP. (Entry point for scheduling)
void FrArTp_MainFunction(void);Indication of a received PDU from a lower layer communication interface module.
void FrArTp_RxIndication(PduIdType RxPduId, const PduInfoType* PduInfoPtr);This service closes all pending transport protocol connections by simply stopping operation, frees all resources and stops the Fr Ar Tp Module
void FrArTp_Shutdown(void);Requests transmission of a PDU.
Std_ReturnType FrArTp_Transmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr);The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.
void FrArTp_TxConfirmation(PduIdType TxPduId, Std_ReturnType result);This is the base type for the configuration of the Flex Ray Transport Protocol. A pointer to an instance of this structure will be used in the initialization of the Flex Ray Transport Protocol. The outline of the structure is defined in chapter 10 Configuration Specification.
FrIf
Indication of a received PDU from a lower layer communication interface module.
void <User_RxIndication> (PduIdType RxPduId, const PduInfoType* PduInfoPtr);Within this API, the upper lay er module (called module) shall check whether the AUTOSAR CP R20 - of Document ID : AUTOSAR_SWS_FlexRayInterface available data fits into the buffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and update the length of the actual c opied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without changing Pdu Info Ptr.
Std_ReturnType <User_TriggerTransmit> (PduIdType TxPduId, PduInfoType* PduInfoPtr);The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.
void <User_TxConfirmation> (PduIdType TxPduId, Std_ReturnType result);Wraps the Flex Ray Driver API function Fr_ Abort Communication().
Std_ReturnType FrIf_AbortCommunication (uint8 FrIf_CtrlIdx);Wraps the Flex Ray Driver API function Fr_ Ack Absolute Timer IRQ()
Std_ReturnType FrIf_AckAbsoluteTimerIRQ (uint8 FrIf_CtrlIdx, uint8 FrIf_AbsTimerIdx);Wraps the Flex Ray Driver API function Fr_ Allow Coldstart().
Std_ReturnType FrIf_AllowColdstart (uint8 FrIf_CtrlIdx);Wraps the Flex Ray Driver API function Fr_ All Slots
Std_ReturnType FrIf_AllSlots (uint8 FrIf_CtrlIdx);Wraps the Flex Ray Driver API function Fr_ Cancel Absolute Timer() .
Std_ReturnType FrIf_CancelAbsoluteTimer (uint8 FrIf_CtrlIdx, uint8 FrIf_AbsTimerIdx);Requests cancellation of an ongoing transmission o f a PDU in a lower layer communication module.
Std_ReturnType FrIf_CancelTransmit (PduIdType TxPduId);Wraps the Flex Ray Transceiver Driver API function Fr Trcv_ Check Wakeup By Transceiver(). The enum value "FR_ CHANNEL_ AB" shall not be used.
void FrIf_CheckWakeupByTransceiver (uint8 FrIf_CtrlIdx, Fr_ChannelType FrIf_ChnlIdx);Wraps the Flex Ray Transceiver Driver API function Fr Trcv_ Clear Transceiver Wakeup(). The enum value "FR_ CHANNEL_ AB" shall not be used. A vailable via Fr If.h
Std_ReturnType FrIf_ClearTransceiverWakeup (uint8 FrIf_CtrlIdx, Fr_ChannelType FrIf_ChnlIdx);Initialized a Flex Ray CC.
Std_ReturnType FrIf_ControllerInit (uint8 FrIf_CtrlIdx);Wraps the Flex Ray Driver API function Fr_ Disable Absolute Timer IRQ().
Std_ReturnType FrIf_DisableAbsoluteTimerIRQ (uint8 FrIf_CtrlIdx, uint8 FrIf_AbsTimerIdx);Wraps the Flex Ray Driver Function Fr_ Disable LPdu. It disables the hardware resource of an LPdu for transmission/ recept ion.
Std_ReturnType FrIf_DisableLPdu (uint8 FrIf_CtrlIdx, uint16 FrIf_LPduIdx);Wraps the Flex Ray Transceiver Driver API function Fr Trcv_ Disable Transceiver Branch. The enum value "FR_ CHANNEL_ AB" shall not be used.
Std_ReturnType FrIf_DisableTransceiverBranch (uint8 FrIf_CtrlIdx, Fr_ChannelType FrIf_ChnlIdx, uint8 FrIf_BranchIdx);Service FrIf_EnableAbsoluteTimerIRQ.
Std_ReturnType FrIf_EnableAbsoluteTimerIRQ (uint8 FrIf_CtrlIdx, uint8 FrIf_AbsTimerIdx);Enables or disables mirroring for all Flex Ray controllers connected to the addressed Flex Ray cluster.
Std_ReturnType FrIf_EnableBusMirroring (uint8 FrIf_ClstIdx, boolean FrIf_MirroringActive);Wraps the Flex Ray Transceiver Driver API function Fr Trcv_ Enable Transceiver Branch. The enum value "FR_ CHANNEL_ AB" shall not be used.
Std_ReturnType FrIf_EnableTransceiverBranch (uint8 FrIf_CtrlIdx, Fr_ChannelType FrIf_ChnlIdx, uint8 FrIf_BranchIdx);Wraps the Flex Ray Driver API function Fr_ Get Absolute Timer IRQStatus()
Std_ReturnType FrIf_GetAbsoluteTimerIRQStatus (uint8 FrIf_CtrlIdx, uint8 FrIf_AbsTimerIdx, boolean* FrIf_IRQStatusPtr);Wraps the Flex Ray Driver API function Fr_ Get Channel Status() and gets the channel status information.
Std_ReturnType FrIf_GetChannelStatus (uint8 FrIf_CtrlIdx, uint16* FrIf_ChannelAStatusPtr, uint16* FrIf_ChannelBStatusPtr);Wraps the Flex Ray Driver API function Fr_ Get Clock Correction () and gets the current clock correction values.
Std_ReturnType FrIf_GetClockCorrection (uint8 FrIf_CtrlIdx, sint16* FrIf_RateCorrectionPtr, sint32* FrIf_OffsetCorrectionPtr);Wraps the Flex Ray Driver API function Fr_ Get Global Time(). Impo rtant Note: Fr If_ Get Global Time may be called within an exclusive area.
Std_ReturnType FrIf_GetGlobalTime (uint8 FrIf_CtrlIdx, uint8* FrIf_CyclePtr, uint16* FrIf_MacroTickPtr);Derives the Flex Ray NM Vector. Av ailable via Fr If.h
Std_ReturnType FrIf_GetNmVector (uint8 FrIf_CtrlIdx, uint8* FrIf_NmVectorPtr);Wraps the Flex Ray Driver API function Fr_ Get Num Of Startup Frames and gets a list of the current number of startup frames seen on the cluster. See variable v Startup Pairs of [12] for details.
Std_ReturnType FrIf_GetNumOfStartupFrames (uint8 FrIf_CtrlIdx, uint8* FrIf_NumOfStartupFramesPtr);Wraps the Flex Ray Driver API function Fr_ Get POCStatus().
Std_ReturnType FrIf_GetPOCStatus (uint8 FrIf_CtrlIdx, Fr_POCStatusType* FrIf_POCStatusPtr);Get current Fr If state.
Std_ReturnType FrIf_GetState (uint8 FrIf_ClstIdx, FrIf_StateType* FrIf_StatePtr);Wraps the Flex Ray Transceiver Driver API function Fr Trcv_ Get Transceiver Error. The enum value "FR_ CHANNEL_ AB" shall not be used.
Std_ReturnType FrIf_GetTransceiverError (uint8 FrIf_CtrlIdx, Fr_ChannelType FrIf_ChnlIdx, uint8 FrIf_BranchIdx, uint32* FrIf_BusErrorState);Wraps the Flex Ray Transceiver Driver API function Fr Trcv_ Get Transceiver Mode(). The enum value "FR_ CHANNEL_ AB" shall not be used.
Std_ReturnType FrIf_GetTransceiverMode (uint8 FrIf_CtrlIdx, Fr_ChannelType FrIf_ChnlIdx, FrTrcv_TrcvModeType* FrIf_TrcvModePtr);Wraps the Flex Ray Transceiver Driver API function Fr Trcv_ Get Transceiver WUReason(). The enum value "FR_ CHANNEL_ AB" shall not be used.
Std_ReturnType FrIf_GetTransceiverWUReason (uint8 FrIf_CtrlIdx, Fr_ChannelType FrIf_ChnlIdx, FrTrcv_TrcvWUReasonType* FrIf_TrcvWUReasonPtr);Returns the version information of this module.
void FrIf_GetVersionInfo (Std_VersionInfoType* FrIf_VersionInfoPtr);Wraps the Flex Ray Driver API function Fr_ Get Wakeup Rx Status and gets the wakeup received information from the Flex Ray controller.
Std_ReturnType FrIf_GetWakeupRxStatus (uint8 FrIf_CtrlIdx, uint8* FrIf_WakeupRxStatusPtr);Wraps the Flex Ray Driver API function Fr_ Halt Communication().
Std_ReturnType FrIf_HaltCommunication (uint8 FrIf_CtrlIdx);Initializes the Flex Ray Interface.
void FrIf_Init (const FrIf_ConfigType* FrIf_ConfigPtr);Wraps the Flex Ray Driver API function Fr_ Read CCConfig().
Std_ReturnType FrIf_ReadCCConfig (uint8 FrIf_CtrlIdx, uint8 FrIf_Config ParamIdx, uint32* FrIf_Config ParamValuePtr); ⚠️Service FrIf_ReconfigLPdu.
Std_ReturnType FrIf_ReconfigLPdu (uint8 FrIf_CtrlIdx, uint16 FrIf_LPduIdx, uint16 FrIf_FrameId, Fr_ChannelType FrIf_ChnlIdx, uint8 FrIf_CycleRepetition, uint8 FrIf_CycleOffset, uint8 FrIf_PayloadLength, uint16 FrIf_Header CRC); ⚠️Wraps the Flex Ray Driver API function Fr_ Send WUP().
Std_ReturnType FrIf_SendWUP (uint8 FrIf_CtrlIdx);Wraps the Flex Ray Driver API function Fr_ Set Absolute Timer().
Std_ReturnType FrIf_SetAbsoluteTimer (uint8 FrIf_CtrlIdx, uint8 FrIf_AbsTimerIdx, uint8 FrIf_Cycle, uint16 FrIf_Offset);Requests Fr If state machine transition.
Std_ReturnType FrIf_SetState (uint8 FrIf_ClstIdx, FrIf_StateTransitionType FrIf_StateTransition);Wraps the Flex Ray Transceiver Driver API function Fr
Std_ReturnType FrIf_SetTransceiverMode (uint8 FrIf_CtrlIdx, Fr_ChannelType FrIf_ChnlIdx, Limited by st atic configuration [Configuration Parameter FrIfCounterLimit, see FrIf06076 ]); ⚠️Wraps the Flex Ray Driver API functi on Fr_ Set Wakeup Channel(). The enum value "FR_ CHANNEL_ AB" shall not be used.
Std_ReturnType FrIf_SetWakeupChannel (uint8 FrIf_CtrlIdx, Fr_ChannelType FrIf_ChnlIdx);Wraps the Flex Ray Driver API function Fr_ Start Communication().
Std_ReturnType FrIf_StartCommunication (uint8 FrIf_CtrlIdx);Requests transmission of a PDU.
Std_ReturnType FrIf_Transmit (PduIdType TxPduId, const PduInfoType* PduInfoPtr);This type contains the implementation - specific post build time configuration structure. Only pointers of this type are allowed.
Variables of this type are used to represent the Fr If_ State of a Flex Ray CC.
Variables of this type are used to represent the Fr If_ State of a Flex Ray CC.
FrNm
Main function of Flex Ray NM.
void FrNm_MainFunction_< Fr Nm Channel.Short Name>(void);This API service of an upper layer Nm is called by the Flex Ray Network Management to indicate to this upper layer BSW module that a NM - message was successfully received and the Fr Nm is in the Bus - Sleep Mode.
void <Nm_Network Start Indication>(NetworkHandleType nmNetworkHandle);This API service of an upper NM is called by the Flex Ray Network Management to indicate to this upper layer BSW module Nm that a NM - message was successfully received (see FRNM190) This function is only available on the definition of _ PDU_ RX_ INDICATION_ ENABLED
void <Nm_Pdu RxIndication>(NetworkHandleType nmNetworkHandle);This API service of an upper layer BSW module <UL> (e.g. Com M) is called by the Flex Ray Network Management to indicate to this upper layer BSW module that the "Remote Sleep" has been cancelled as an NM - message with an indication to keep the bus awake has been received and the Remote Sleep indication has been previously detected .
void <UL_Remote Sleep Cancellation>(NetworkHandleType nmNetworkHandle);This API service of an upper layer BSW module <UL> (e.g. Com M) is called by the Flex Ray Network Management to indicate to this upper layer BSW module that all other nodes in the cluster are ready to sleep (the 'Remote Sleep Indication'), as no NM - messages with an indication to keep the bus awake are rece ived in the Normal Operation State for a configurable amount of time determined by the FRNM_ REMOTE_ SLEEP_ IND_ TIME (configuration parameter).
void <UL_Remote Sleep Indication>(NetworkHandleType nmNetworkHandle);This API service of an upper layer BSW module <UL> is called by the Flex Ray Network Management when Fr If calls Fr Nm_ Tx Confirmation with result E_ NOT_ OK to indicate to this upper layer BSW module that NM - message could not be transmitted successfully.
void <UL_Transmission Timeout Exception>(NetworkHandleType nmNetworkHandle);NM indicate to activate the transmission of PN shutdown messages on the given NM - Channel. This results in transmission of a NM - PDU wi th PNSR bit set to 1 (PN shutdown message).
Std_ReturnType FrNm_ActivateTxPnShutdownMsg(NetworkHandleType nmChannelHandle);This function checks if remote sleep indication has taken place or not.
Std_ReturnType FrNm_CheckRemoteSleepIndication(NetworkHandleType NetworkHandle, boolean* nmRemoteSleepIndPtr);NM indicate to deactive the transmission of PN shutdown messages on the given NM - Channel. This result in transmission of a usual NM - PDUs with PNSR bit set to 0.
Std_ReturnType FrNm_DeactivateTxPnShutdownMsg(NetworkHandleType nmChannelHandle);Disable the NM PDU transmission ability due to a ISO14229 Communication Control (28hex) service
Std_ReturnType FrNm_DisableCommunication(NetworkHandleType nmChannelHandle);Enable the NM PDU transmission ability due to a ISO14229 Communication Control (28hex) service
Std_ReturnType FrNm_EnableCommunication(NetworkHandleType nmChannelHandle);This function gets the node identifier configured for the local node.
Std_ReturnType FrNm_GetLocalNodeIdentifier(NetworkHandleType NetworkHandle, uint8* nmNodeIdPtr);This function gets the node identifier from the last successfully received NM - message.
Std_ReturnType FrNm_GetNodeIdentifier(NetworkHandleType NetworkHandle, uint8* nmNodeIdPtr);Gets PDU data.
Std_ReturnType FrNm_GetPduData(NetworkHandleType NetworkHandle, uint8* nmPduData);This function returns the state and the mode of the network management.
Std_ReturnType FrNm_GetState(NetworkHandleType NetworkHandle, Nm_StateType* nmStatePtr, Nm_ModeType* nmModePtr);This function gets user da ta from the last successfully received NM message.
Std_ReturnType FrNm_GetUserData(NetworkHandleType NetworkHandle, uint8* nmUserDataPtr);Returns the version information.
void FrNm_GetVersionInfo(Std_VersionInfoType* NmVerInfoPtr);Initializes the Flex Ray NM and its internal state machine.
void FrNm_Init(const FrNm_ConfigType* nmConfigPtr);This function releases the network because the ECU doesn't have to communicate on the bus. Network state shall be changed to 'released'.
Std_ReturnType FrNm_NetworkRelease(NetworkHandleType NetworkHandle);This function requests the network because the ECU needs to communicate on the bus. Network state shall be changed to 'requested'.
Std_ReturnType FrNm_NetworkRequest(NetworkHandleType NetworkHandle);Initiates the Passive Startup of the Flex Ray NM.
Std_ReturnType FrNm_PassiveStartUp(NetworkHandleType NetworkHandle);Set Repeat Message Request Bit and Partial Network Learning Bit for NM messa ges transmitted next on the bus. This will force all nodes to enter the PNC Learning Phase. This is needed for the optional Dynamic PNC - to - channel - mapping feature. Tags: atp.Status=draft
Std_ReturnType FrNm_PnLearningRequest(NetworkHandleType NetworkHandle);This function causes a Repeat Message Request to be transmitted next on the bus.
Std_ReturnType FrNm_RepeatMessageRequest(NetworkHandleType NetworkHandle);This function has no functionality - the service is provided only to be compatible to future extensions and to be compatible to the CAN - NM interface.
Std_ReturnType FrNm_RequestBusSynchronization(NetworkHandleType NetworkHandle);Requests transmission of a NM - PDU with PNSR bit set to 1 (PN shutdown message) Tags: atp.Status=draft
Std_ReturnType FrNm_RequestSynchronizedPncShutdown(NetworkHandleType nmChannelHandle, PNCHandleType pncId);Indication of a receive d PDU from a lower layer communication interface module.
void FrNm_RxIndication(PduIdType RxPduId, const PduInfoType* PduInfoPtr);Set the NM Coordinator Sleep Ready bit in t he Control Bit Vector
Std_ReturnType FrNm_SetSleepReadyBit(NetworkHandleType nmChannelHandle, boolean nmSleepReadyBit);This function sets user data for NM - Data transmitted next on the bus.
Std_ReturnType FrNm_SetUserData(NetworkHandleType NetworkHandle, const uint8* nmUserDataPtr);This function is called by the Fr SM when synchronization of the Flex Ray cluster could not be achieved.
void FrNm_StartupError(NetworkHandleType NetworkHandle);Requests transmission of a PDU.
Std_ReturnType FrNm_Transmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr);Within this API, the upper layer module (called module) shall check whether the available data fits into the buffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and upd ate the length of the actual copied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without changing Pdu Info Ptr.
Std_ReturnType FrNm_TriggerTransmit(PduIdType TxPduId, PduInfoType* PduInfoPtr);The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.
void FrNm_TxConfirmation(PduIdType TxPduId, Std_ReturnType result);Contains configuration parameters.
FrSM
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 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);Initializes the Flex Ray State Manager.
void FrSm_Init (const FrSM_ConfigType* FrSM_ConfigPtr);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);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.
FrTp
Requests cancellation of an ongoing reception of a PDU in a lower layer transport protocol module.
Std_ReturnType FrTp_CancelReceive (PduIdType RxPduId);Requests cancellation of an ongoing transmission of a PDU in a lower layer communication module.
Std_ReturnType FrTp_CancelTransmit (PduIdType TxPduId);Request to change a specific transport protocol parameter (e.g. block size).
Std_ReturnType FrTp_ChangeParameter (PduIdType id, TPParameterType parameter, uint16 value);Returns the version information.
void FrTp_GetVersionInfo (Std_VersionInfoType* versioninfo);This service initializes all global variables of a Flex Ray Transport Layer instance and set it in the idle state. It has no return value because software errors in initialisation data shall be detected during configuration time (e.g. by configuration tool ).
void FrTp_Init (const FrTp_ConfigType* configPtr);Schedules the Flex Ray TP. (Entry point for scheduling)
void FrTp_MainFunction (void);Indication of a received PDU from a lower layer communication interface module.
void FrTp_RxIndication (PduIdType RxPduId, const PduInfoType* PduInfoPtr);This service closes all pending transport pro tocol connections by simply stopping operation, frees all resources and stops the Fr Tp Module
void FrTp_Shutdown (void);Requests transmission of a PDU.
Std_ReturnType FrTp_Transmit (PduIdType TxPduId, const PduInfoType* PduInfoPtr);Within this API , the upper layer module (called module) shall check whether the available data fits into the buffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and update the length of the actual copied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without changing Pdu Info Ptr.
Std_ReturnType FrTp_TriggerTransmit (PduIdType TxPduId, PduInfoType* PduInfoPtr);The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.
void FrTp_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);This is the base type for the configuration of the Flex Ray Transport Protocol A pointer to an instance of this structure will be used in the initialization of the Flex Ray Transport Protocol. The outline of the structure is defined in chapter 10 Configura tion Specification
FrTrcv
-
void FrTrcv_CheckWakeupByTransceiver (uint8 FrTrcv_TrcvIdx);This function clears a pending wake up event.
Std_ReturnType FrTrcv_ClearTransceiverWakeup (uint8 FrTrcv_TrcvIdx);This function disable s the specified branch on the addressed (active star) transceiver.
Std_ReturnType FrTrcv_DisableTransceiverBranch (uint8 FrTrcv_TrcvIdx, uint8 FrTrcv_BranchIdx);This function enables the specified branch on the addressed (active star) transceiver.
Std_ReturnType FrTrcv_EnableTransceiverBranch (uint8 FrTrcv_TrcvIdx, uint8 FrTrcv_BranchIdx);All mandatory errors defined by the Flex Ray EPL [5] which are supported by the Flex Ray transceiver hardware can be acce ssed via this API:In addition to errors on the physical layer and local to the ECU hardware, a global error flag is provided.
Std_ReturnType FrTrcv_GetTransceiverError (uint8 FrTrcv_TrcvIdx, uint8 FrTrcv_BranchIdx, uint32* FrTrcv_BusErrorState);This function returns the actual state of the transceiver.
Std_ReturnType FrTrcv_GetTransceiverMode (uint8 FrTrcv_TrcvIdx, FrTrcv_TrcvModeType* FrTrcv_TrcvModePtr);This function returns the wakeup reason.
Std_ReturnType FrTrcv_GetTransceiverWUReason (uint8 FrTrcv_TrcvIdx, FrTrcv_TrcvWUReasonType* FrTrcv_TrcvWUReasonPtr);This service returns the version information of this module.
void FrTrcv_GetVersionInfo (Std_VersionInfoType* versioninfo);This service initializes the Fr Trcv.
void FrTrcv_Init (const FrTrcv_ConfigType* ConfigPtr);-
void FrTrcv_MainFunction (void);This service sets the transceiver mode.
Std_ReturnType FrTrcv_SetTransceiverMode (uint8 FrTrcv_TrcvIdx, FrTrcv_TrcvModeType FrTrcv_TrcvMode);Configuration data structure of the Fr Trcv module.
Transceiver modes in state ACTIVE. AUTOSAR CP R20 - of Document ID : AUTOSAR_SWS_FlexRayTransceiverDriver
This type to be used to specify the wake up reason detected by the FR transceiver in detail.
Type ofaCfunctionwhichsubstitutesMultiplicityType.
集群指南人工智能生成
协调确定性FlexRay通信、总线模式以及跨TDMA周期的分段数据传输。
协调确定性FlexRay通信、总线模式以及跨TDMA周期的分段数据传输。
FlexRay Communication模块集群在AUTOSAR Classic R20-11中实现了基于TDMA方法的确定性数据交换以及符合ISO 10681-2的分段诊断传输[SWS_FrIf_05001] SWS FlexRayInterface 第170页。它通过Fr、FrTrcv、FrIf、FrSM和FrTp模块协调集群范围内的模式管理、总线唤醒模式和硬件同步。严格的时间边界条件要求每个FlexRay通信周期至少调用一次传输主函数[SWS_FrTp_01152]。
模块集群FlexRay Communication在AUTOSAR Classic R20-11中确保通过FlexRay总线系统进行确定性的、基于TDMA的通信SWS FlexRayInterface 第170页。它细分为硬件驱动fr(Communication Controller)和frtrcv(收发器)、中央抽象层frif、状态管理器frsm以及ISO-10681-2传输协议frtp [SWS_FrIf_05001] [SWS_FrTp_01028]。
架构图:FlexRay模块的分层结构和接口关系。来源:[SWS_FrIf_05001]、[SWS_FrSM_00199]。
数据路径由FrIf_Transmit控制,其中FrTp为诊断报文和较大有效载荷提供分段与重组服务[SWS_FrIf_05033] [SWS_FrTp_01009]。在运行时,同步通过循环TDMA栅格进行;规范上必须每个FlexRay周期至少调用一次FrTp_MainFunction [SWS_FrTp_01152] SWS FlexRayISOTransportLayer 第88页。Interpretation:这很可能是为了确保ISO 10681-2流控制定时器和确认定时器的按时处理。 问题 (未决)
状态迁移、唤醒序列(单通道和双通道)以及集群启动由FrSM编排,FrSM经由FrIf和Fr控制控制器的POC状态,并将状态传输给ComM和BswM [SWS_FrSM_00013] [SWS_Fr_00010] SWS FlexRayStateManager 第50页。
时序图:通过FrSM、FrIf、Fr和FrTrcv进行唤醒和集群启动的流程。来源:[SWS_FrSM_00013]、[SWS_FrIf_05005]。
运行时错误和硬件错误通过DET(例如通过FRIF_E_INV_CTRL_IDX报告的无效索引)和DEM(例如FR_E_CTRL_TESTRESULT、FRSM_E_CLUSTER_STARTUP)进行隔离[SWS_FrIf_05158] [SWS_Fr_00181]。在发生故障时,活动星型耦合器分支可通过FrTrcv_DisableTransceiverBranch被选择性停用[SWS_FrTrcv_00442] SWS FlexRayTransceiverDriver 第50页。
系统架构 & 模块集群的角色
模块集群FlexRay Communication在AUTOSAR Classic Platform(Release R20-11)中提供通过FlexRay总线系统的确定性、实时且容错的通信SWS FlexRayInterface 第170页。它实现了基于TDMA的传输机制(Time Division Multiple Access)以及符合ISO 10681-2的传输层。该集群包含五个核心模块:FlexRay驱动(fr)、FlexRay收发器驱动(frtrcv)、FlexRay接口(frif)、FlexRay State Manager(frsm)和FlexRay ISO Transport Layer(frtp)[SWS_FrIf_05001]。
这些模块分布在AUTOSAR Basic Software的各层中:FlexRay驱动fr属于Microcontroller Abstraction Layer(MCAL),并直接控制Communication Controller(CC)及其Protocol Operation Control(POC)[SWS_Fr_00510]。收发器驱动frtrcv抽象物理总线收发器,除标准通道外还支持活动星型耦合器(Active Stars)[SWS_FrTrcv_00487]。FlexRay接口frif作为中央抽象实体,通过封装驱动访问并提供跨控制器的集群操作,将上层与硬件解耦SWS FlexRayDriver 第36页。
在系统层级,FlexRay State Manager frsm充当系统服务(Communication Manager ComM、Basic Software Mode Manager BswM)与接口frif之间的纽带,以控制并反馈整个FlexRay集群的通信状态[SWS_FrSM_00199]。FlexRay ISO Transport Layer frtp位于Communication Services中,在PDU路由器(PduR)之上为较大数据量(例如通过DCM进行的诊断或复杂应用程序SDU)提供分段、重组和流控制服务[SWS_FrTp_01028] SWS FlexRayStateManager 第35页。
架构图:AUTOSAR FlexRay集群中五个模块的静态分层结构和交互关系。来源:[SWS_FrIf_05001]、[SWS_FrSM_00199]、[SWS_FrTp_01028]。
各模块之间的交互配合与交互路径
常规发送数据流始于上层(例如COM或FrTp),这些上层通过FrIf_Transmit传递PDU [SWS_FrIf_05033]。FrIf检查集群的在线状态,并将请求转发给FlexRay驱动。对于传输PDU,FrTp通过标志位TX_SDU_AVAILABLE和接口PduR_FrTpCopyTxData请求数据,并控制空闲Tx-PDU资源的分配[SWS_FrTp_00416] [SWS_FrTp_01038]。Interpretation:在FrTp和FrIf的协作中,PDU池和缓冲区访问模式(Immediate与Decoupled Buffer Access)的配置很可能主要决定了有效数据是在调用上下文中直接提供,还是通过Trigger-Transmit在时间上解耦提供SWS FlexRayInterface 第68页。 问题 Q-f84c2cfb8cc303a6 (未决)
在接收端,FlexRay帧由控制器和驱动接收后传递给FlexRay接口,后者调用配置的接收指示(如FrTp_RxIndication)[SWS_FrTp_00152]。对于分段数据流,FrTp缓冲接收到的N-PDU,处理协议控制信息(PCI),并通过PduR_FrTpStartOfReception以及PduR_FrTpCopyRxData向上层请求缓冲区空间[SWS_FrTp_01074] SWS FlexRayISOTransportLayer 第92页。
符合ISO 10681-2的传输协议区分通过StartFrame进行的非分段传输(无确认的STFU,有确认的STFA)与分段流程[SWS_FrTp_01007] [SWS_FrTp_01008]。在分段传输中,接收方在StartFrame之后发送流控制帧(Flow Control,FC.CTS或FC.WAIT),随后发送方传输连续帧(CF、CFEOB),最后传输Last Frame(LF)[SWS_FrTp_01009]。在运行时,流控制可通过带宽控制参数(BC)经由FrTp_ChangeParameter动态调整[SWS_FrTp_00242] AUTOSAR SWS FlexRay ISO TP 第27页。
时序图:PduR、FrTp与FrIf之间符合ISO 10681-2的分段数据传输和流控制。来源:[SWS_FrTp_01009]、[SWS_FrTp_00152]、[SWS_FrIf_05033]。
同步、重入性与任务上下文
FlexRay集群中的执行与静态通信时基紧密耦合。周期性主函数控制周期性任务:FrTrcv_MainFunction对收发器状态和唤醒事件进行采样[SWS_FrTrcv_00330],而FrTp_MainFunction必须每个FlexRay通信周期至少执行一次[SWS_FrTp_01152] [SWS_FrTp_00162]。Interpretation:每个FlexRay通信周期至少执行一次FrTp_MainFunction,很可能是为了确保协议定时器(如Timeout_BS和Timeout_CR)与静态TDMA栅格同步及时更新SWS FlexRayISOTransportLayer 第88页。 问题 Q-c7a18cbb3c37b980 (未决)
为了在TDMA栅格中进行时间同步和流程控制,集群提供了绝对定时器。通过FrIf_SetAbsoluteTimer、FrIf_EnableAbsoluteTimerIRQ和FrIf_AckAbsoluteTimerIRQ在CC中配置并确认定时器中断[SWS_Fr_00034] [SWS_FrIf_05021]。此外,FrIf提供同步服务以查询全局时间(FrIf_GetGlobalTime)、周期长度(FrIf_GetCycleLength)和宏微拍(FrIf_GetMacrotickDuration、FrIf_GetMacroticksPerCycle)[SWS_FrIf_05015] [SWS_FrIf_05018] SWS FlexRayInterface 第56页。
在可重入性和上下文方面:模块fr的驱动API对于同一控制器实例通常是不可重入的(Non Reentrant for the same device)[SWS_Fr_00034]。frif的接口设计为针对不同集群或控制器索引可重入。特定查询函数(如FrIf_GetGlobalTime)明确允许在互斥区内调用[SWS_FrIf_05015] SWS FlexRayInterface 第64页。
典型的生命周期和操作模式
集群的初始化分层进行:BSW初始化序列从FrSM_Init开始,使所有集群状态机进入基本状态FRSM_READY [SWS_FrSM_00013] [SWS_FrSM_00126]。随后,通过FrIf_ControllerInit初始化控制器[SWS_FrIf_05004],并且模块FrTp通过FrTp_Init从状态FRTP_OFF切换到FRTP_ON [SWS_FrTp_01032] SWS FlexRayStateManager 第35页。
在此过程中,Communication Controller根据FlexRay规范运行POC状态机(Protocol Operation Control):在状态POC:ready下,命令RUN经由Fr_StartCommunication触发向POC:startup的迁移[SWS_Fr_00010]。若ECU被配置为冷启动节点,则通过Fr_AllowColdstart发出CHI命令ALLOW_COLDSTART [SWS_Fr_00114]。在成功集成并同步后,控制器达到POC:normal active或POC:normal passive [SWS_Fr_00507] [SWS_Fr_00509] SWS FlexRayDriver 第42页。
在启动通信之前,处于休眠状态的总线需要唤醒流程:FrSM协调单通道或双通道唤醒。唤醒通道通过FrIf_SetWakeupChannel进行参数化,收发器被切换到FRTRCV_TRCVMODE_NORMAL,并且唤醒模式(WUP)通过FrIf_SendWUP或Fr_SendWUP发送到总线上[SWS_Fr_00009] [SWS_FrIf_05011] [SWS_FrIf_05034]。唤醒原因可通过FrTrcv_GetTransceiverWUReason进行评估[SWS_FrTrcv_00325] SWS FlexRayStateManager 第50页。
在关闭时,FrSM应ComM的要求从COMM_FULL_COM切换到COMM_NO_COM。通信通过FrIf_HaltCommunication停止,FrIf通过FrIf_SetState(FRIF_GOTO_OFFLINE)切换到离线模式,收发器被置于STANDBY [SWS_FrIf_05006]。对于诊断或安全防护情况,集群可通过FrSM_SetEcuPassive置于纯接收模式(ECU Passive)[SWS_FrSM_00174]。FrTp的完全停止通过FrTp_Shutdown进行[SWS_FrTp_00148] SWS FlexRayStateManager 第58页。
时序图:ComM、BswM、FrSM、FrIf、Fr和FrTrcv在集群启动和唤醒时的相互协作。来源:[SWS_FrSM_00013]、[SWS_FrIf_05005]、[SWS_Fr_00010]。
错误处理、DET 跟踪与降级
错误操作和无效API参数由Development Error Tracer(DET)记录。若传递了无效的控制器索引或通道索引,或者在模块初始化之前调用了API,FrIf、FrTp、FrTrcv和FrSM会向DET报告标准化错误,如FRIF_E_INV_CTRL_IDX、FRTP_E_INVALID_PDU_SDU_ID、FRTRCV_E_UNINIT或FRSM_E_INV_HANDLE [SWS_FrIf_05158] [SWS_FrTp_01143] [SWS_FrTrcv_00462] [SWS_FrSM_00168] SWS FlexRayISOTransportLayer 第77页。
严重的运行时错误和硬件错误会报告给Diagnostic Event Manager(DEM)。控制器的硬件测试通过事件FR_E_CTRL_TESTRESULT以状态DEM_EVENT_STATUS_FAILED发出故障信号[SWS_Fr_00181] [SWS_Fr_00297]。若FrSM内的集群启动失败,则报告诊断事件FRSM_E_CLUSTER_STARTUP SWS FlexRayStateManager 第50页。
对于降级和容错,该集群提供了针对性的隔离机制:对于带有活动星型耦合器(Active Star)的收发器,可以通过FrTrcv_DisableTransceiverBranch或FrIf_DisableTransceiverBranch停用故障线路分支,以防止干扰整个集群[SWS_FrTrcv_00442] [SWS_FrIf_05028]。正在进行的传输可以通过FrTp_CancelTransmit和FrIf_CancelTransmit选择性终止,单个硬件缓冲区可以通过FrIf_DisableLPdu锁定[SWS_FrTp_00150] [SWS_FrIf_05710] SWS FlexRayTransceiverDriver 第50页。
本指南由人工智能基于Release R20-11的AUTOSAR规范生成。
Module im Cluster
FlexRay Driver (Fr)
Provides hardware-dependent access to FlexRay communication controllers.
FlexRay AUTOSAR Transport Layer (FrArTp)
AUTOSAR Classic Communication Services-Modul FlexRay AUTOSAR Transport Layer (FrArTp, Spezifikation: AUTOSAR_CP_SWS_FlexRayARTransportLayer.pdf, AUTOSAR_SWS_FlexRayARTransportLayer.pdf).
FlexRay Interface (FrIf)
Abstracts FlexRay hardware controllers for upper layers.
FlexRay Network Management (FrNm)
AUTOSAR Classic Communication Services-Modul FlexRay Network Management (FrNm, Spezifikation: AUTOSAR_CP_SWS_FlexRayNetworkManagement.pdf, AUTOSAR_SWS_FlexRayNetworkManagement.pdf, AUTOSAR_SWS_FlexrayNM.pdf).
FlexRay State Manager (FrSM)
Controls the operational states and startup/wakeup of FlexRay clusters.
FlexRay Transport Layer (FrTp)
Provides segmented data transmission over FlexRay (ISO 10681-2).
FlexRay Transceiver Driver (FrTrcv)
Controls physical bus transceiver states and bus diagnostics on FlexRay lines.
gemini-3.8-flash-low· 2026-10-13 · 德文原文