DEENESPTFRRUARHIKOZHNL

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.

Mapa de temas

Vista de detalle

Selecciona una entrada en el índice.

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);
Fr_AllSlots función

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

Service Fr_GetSyncFrameList.

Std_ReturnType Fr_GetSyncFrameList (uint8 Fr_CtrlIdx, uint8 Fr_ListSize, uint16* Fr_ChannelAEvenListPtr, uint16* Fr_ChannelBEvenListPtr, uint16* Fr_ChannelAOddListPtr, uint16* Fr_ChannelBOddListPtr);

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);
Fr_Init función

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); ⚠️
Fr_SendWUP función

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);
FrArTp_Init función

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

<Free_Op_A> función

User defined communication operation in order to support hardware specific or additional communication controller features to increase performance.

void <Free_Op_A> (uint8 FrIf_CtrlIdx, uint16 FrIf_LPduIdx);
<Free_Op_B> función

User defined communication operation in order to support hardware specific or additional communication controller features to increase performance.

void <Free_Op_B> (uint8 FrIf_CtrlIdx, uint16 FrIf_LPduIdx);

Notification in case a Tx Conflict has been detected.

void <UL_TxConflictNotification> (uint8 FrIf_CtrlIdx, uint16 FrIf_LPduIdx);

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);
FrIf_AllSlots función

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

This API returns the configured time of the configuration parameter "Gd Cycle" in nanoseconds for the Flex Ray controller with index Fr If_ Ctrl Idx.

uint32 FrIf_GetCycleLength (uint8 FrIf_CtrlIdx);

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

Retrieves the Duration of a Macrotick in ns

uint16 FrIf_GetMacrotickDuration (uint8 FrIf_CtrlIdx);

Retrieves the amount of Macroticks per Cycle

uint16 FrIf_GetMacroticksPerCycle (uint8 FrIf_CtrlIdx);

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);
FrIf_GetState función

Get current Fr If state.

Std_ReturnType FrIf_GetState (uint8 FrIf_ClstIdx, FrIf_StateType* FrIf_StatePtr);

Service FrIf_GetSyncFrameList.

Std_ReturnType FrIf_GetSyncFrameList (uint8 FrIf_CtrlIdx, uint8 FrIf_ListSize, uint16* FrIf_ChannelAEvenListPtr, uint16* FrIf_ChannelBEvenListPtr, uint16* FrIf_ChannelAOddListPtr, uint16* FrIf_ChannelBOddListPtr);

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);
FrIf_Init función

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); ⚠️
FrIf_SendWUP función

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);
FrIf_SetState función

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);
FrIf_Transmit función

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);
FrNm_GetState función

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);
FrNm_Init función

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);
FrNm_Transmit función

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

FrSm_AllSlots función

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);
FrSm_Init función

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);
FrTp_Init función

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);
FrTp_Shutdown función

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);
FrTp_Transmit función

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);
FrTrcv_Init función

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.

Guía del clústerGENERADO POR IA

Coordina la comunicación determinista de FlexRay, los modos de bus y el transporte de datos segmentado a lo largo de ciclos TDMA.
GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 1e01dd1630aa Procedencia Preguntas abiertas (2)
Ancla causal: R20-11 Válido desde R20-11 Sintetizado para esta versión de especificación.
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

Coordina la comunicación determinista de FlexRay, los modos de bus y el transporte de datos segmentado a lo largo de ciclos TDMA.

El clúster de módulos FlexRay Communication implementa el intercambio de datos determinista según el procedimiento TDMA, así como transferencias de diagnóstico segmentadas según ISO 10681-2 en AUTOSAR Classic R20-11 [SWS_FrIf_05001] SWS FlexRayInterface p. 170. Coordina, a través de los módulos Fr, FrTrcv, FrIf, FrSM y FrTp, la gestión de modos de todo el clúster, los patrones de wakeup del bus y la sincronización del hardware. Una restricción temporal estricta exige invocar la función principal de transporte al menos una vez por ciclo de comunicación FlexRay [SWS_FrTp_01152].

El clúster de módulos FlexRay Communication garantiza en AUTOSAR Classic R20-11 la comunicación determinista basada en TDMA a través del sistema de bus FlexRay SWS FlexRayInterface p. 170. Se divide en los controladores de hardware fr (Communication Controller) y frtrcv (transceptor), la capa de abstracción central frif, el gestor de estados frsm y el protocolo de transporte ISO 10681-2 frtp [SWS_FrIf_05001] [SWS_FrTp_01028].

FrClusterArch ComM ComM FrSM FrSM ComM->FrSM FrIf FrIf FrSM->FrIf BswM BswM BswM->FrSM PduR PduR FrTp FrTp PduR->FrTp PduR->FrIf FrTp->FrIf Fr Fr FrIf->Fr FrTrcv FrTrcv FrIf->FrTrcv HW_CC HW_CC Fr->HW_CC HW_Trcv HW_Trcv FrTrcv->HW_Trcv

Diagrama de arquitectura: estructura de capas y relaciones de interfaz de los módulos FlexRay. Fuentes: [SWS_FrIf_05001], [SWS_FrSM_00199].

La ruta de datos se controla mediante FrIf_Transmit, donde FrTp proporciona servicios de segmentación y reensamblaje para mensajes de diagnóstico y datos útiles de mayor tamaño [SWS_FrIf_05033] [SWS_FrTp_01009]. En tiempo de ejecución, la sincronización se realiza mediante la trama cíclica de TDMA; normativamente, FrTp_MainFunction debe invocarse al menos una vez por ciclo de FlexRay [SWS_FrTp_01152] SWS FlexRayISOTransportLayer p. 88. Interpretación: presumiblemente, esto asegura la ejecución puntual de los temporizadores de control de flujo y confirmación de ISO 10681-2. Pregunta (abierta)

Las transiciones de estado, las secuencias de wakeup (de un canal y de doble canal) y el startup del clúster son orquestados por FrSM, que controla los estados POC del controlador a través de FrIf y Fr y transmite el estado a ComM y BswM [SWS_FrSM_00013] [SWS_Fr_00010] SWS FlexRayStateManager p. 50.

Inicio y reactivación del clúster de FlexRayComMBswMFrSMFrIfFrFrTrcvFrSM_RequestComMode(Network, COMM_FULL_COM)FrIf_SetTransceiverMode(Ctrl, Chnl, NORMAL)FrTrcv_SetTransceiverMode(TrcvIdx, NORMAL)FrIf_SendWUP(CtrlIdx)Fr_SendWUP(CtrlIdx)BswM_FrSM_CurrentState(FRSM_WAKEUP)Use Case: Inicio y sincronizaciónFrIf_StartCommunication(CtrlIdx)Fr_StartCommunication(CtrlIdx)FrIf_GetPOCStatus(CtrlIdx, POCStatusPtr)Fr_GetPOCStatus(CtrlIdx, POCStatusPtr)POC:normal activeE_OK (POC:normal active)FrIf_SetState(ClstIdx, FRIF_GOTO_ONLINE)BswM_FrSM_CurrentState(FRSM_ONLINE)

Diagrama de secuencias: desarrollo de wakeup y startup de clúster a través de FrSM, FrIf, Fr y FrTrcv. Fuentes: [SWS_FrSM_00013], [SWS_FrIf_05005].

Los errores de hardware y en tiempo de ejecución se aíslan a través de DET (p. ej., índices no válidos a través de FRIF_E_INV_CTRL_IDX) y DEM (p. ej., FR_E_CTRL_TESTRESULT, FRSM_E_CLUSTER_STARTUP) [SWS_FrIf_05158] [SWS_Fr_00181]. En caso de perturbaciones, las ramas de acopladores en estrella activos pueden desactivarse selectivamente a través de FrTrcv_DisableTransceiverBranch [SWS_FrTrcv_00442] SWS FlexRayTransceiverDriver p. 50.

Arquitectura del sistema & rol del clúster de módulos

El clúster de módulos FlexRay Communication proporciona en la AUTOSAR Classic Platform (versión R20-11) la comunicación determinista, en tiempo real y tolerante a fallos a través del sistema de bus FlexRay SWS FlexRayInterface p. 170. Implementa el procedimiento de transmisión basado en TDMA (Time Division Multiple Access), así como la capa de transporte según ISO 10681-2. El clúster comprende cinco módulos principales: el controlador FlexRay (fr), el controlador del transceptor FlexRay (frtrcv), la interfaz FlexRay (frif), el FlexRay State Manager (frsm) y la FlexRay ISO Transport Layer (frtp) [SWS_FrIf_05001].

Los módulos se distribuyen entre las capas del Basic Software de AUTOSAR: el controlador FlexRay fr pertenece a la Microcontroller Abstraction Layer (MCAL) y controla directamente el Communication Controller (CC), así como su Protocol Operation Control (POC) [SWS_Fr_00510]. El controlador del transceptor frtrcv abstrae los transceptores de bus físicos y admite tanto canales estándar como acopladores en estrella activos (Active Stars) [SWS_FrTrcv_00487]. La interfaz FlexRay frif desacopla, como instancia central de abstracción, las capas superiores respecto al hardware, encapsulando los accesos a los controladores y proporcionando operaciones de clúster intercontrolador SWS FlexRayDriver p. 36.

En el nivel del sistema, el FlexRay State Manager frsm actúa como nexo de unión entre los servicios del sistema (Communication Manager ComM, Basic Software Mode Manager BswM) y la interfaz frif para controlar y notificar el estado de comunicación de clústeres FlexRay completos [SWS_FrSM_00199]. La FlexRay ISO Transport Layer frtp se sitúa en los Communication Services y ofrece servicios de segmentación, reensamblaje y control de flujo para grandes volúmenes de datos (p. ej., para diagnóstico a través de DCM o SDUs de aplicación complejas) por encima del enrutador de PDU (PduR) [SWS_FrTp_01028] SWS FlexRayStateManager p. 35.

FrClusterArch ComM ComM FrSM FrSM ComM->FrSM FrIf FrIf FrSM->FrIf BswM BswM BswM->FrSM PduR PduR FrTp FrTp PduR->FrTp PduR->FrIf FrTp->FrIf Fr Fr FrIf->Fr FrTrcv FrTrcv FrIf->FrTrcv HW_CC HW_CC Fr->HW_CC HW_Trcv HW_Trcv FrTrcv->HW_Trcv

Diagrama de arquitectura: estructura estática de capas y relaciones de interacción de los cinco módulos en el clúster FlexRay de AUTOSAR. Fuentes: [SWS_FrIf_05001], [SWS_FrSM_00199], [SWS_FrTp_01028].

Interacción y rutas de interacción entre los módulos

El flujo regular de datos de transmisión comienza en las capas superiores (p. ej., COM o FrTp), que transfieren PDUs mediante FrIf_Transmit [SWS_FrIf_05033]. FrIf comprueba el estado online del clúster y reenvía la solicitud al controlador FlexRay. En el caso de PDUs de transporte, FrTp solicita datos mediante el flag TX_SDU_AVAILABLE y la interfaz PduR_FrTpCopyTxData, y controla la asignación de recursos Tx-PDU libres [SWS_FrTp_00416] [SWS_FrTp_01038]. Interpretación: en la interacción entre FrTp y FrIf, es de suponer que la configuración de grupos de PDU y modos de acceso al búfer (Immediate frente a Decoupled Buffer Access) determina principalmente si los datos útiles se proporcionan directamente en el contexto de llamada o desacoplados en el tiempo mediante Trigger-Transmit SWS FlexRayInterface p. 68. Pregunta Q-f84c2cfb8cc303a6 (abierta)

En el lado de recepción, tras la recepción por parte del controlador y el driver, las tramas FlexRay se transfieren a la interfaz FlexRay, la cual invoca las indicaciones de recepción configuradas (como FrTp_RxIndication) [SWS_FrTp_00152]. Para flujos de datos segmentados, FrTp almacena en búfer las N-PDUs recibidas, procesa la información de control de protocolo (PCI) y solicita áreas de búfer de la capa superior mediante PduR_FrTpStartOfReception y PduR_FrTpCopyRxData [SWS_FrTp_01074] SWS FlexRayISOTransportLayer p. 92.

El protocolo de transporte según ISO 10681-2 distingue entre transmisiones no segmentadas mediante StartFrame (STFU sin confirmación, STFA con confirmación) y secuencias segmentadas [SWS_FrTp_01007] [SWS_FrTp_01008]. En las transferencias segmentadas, tras el StartFrame el receptor envía tramas de control de flujo (Flow Control, FC.CTS o FC.WAIT), tras lo cual el emisor transmite Consecutive Frames (CF, CFEOB) y finalmente un Last Frame (LF) [SWS_FrTp_01009]. En tiempo de ejecución, el control de flujo se puede adaptar dinámicamente mediante parámetros de Bandwidth Control (BC) a través de FrTp_ChangeParameter [SWS_FrTp_00242] AUTOSAR SWS FlexRay ISO TP p. 27.

Transmisión de datos y control de flujo de FrTp (ISO 10681-2)PduRFrTpFrIfFrTp_Transmit(TxSduId, PduInfo)Kanal belegen & TX_SDU_AVAILABLE setzenPduR_FrTpCopyTxData(TxSduId, ...)BUFREQ_OK (StartFrame Payload)FrIf_Transmit(TxPduId, PduInfo)FrTp_TxConfirmation(TxPduId, E_OK)Use Case: Empfang von Flow Control (FC)FrTp_RxIndication(RxPduId, FC.CTS)PduR_FrTpCopyTxData(TxSduId, ...)BUFREQ_OK (ConsecutiveFrame)FrIf_Transmit(TxPduId, CF N-PDU)FrTp_TxConfirmation(TxPduId, E_OK)PduR_FrTpTxConfirmation(TxSduId, E_OK)

Diagrama de secuencias: transferencia de datos segmentada y control de flujo según ISO 10681-2 entre PduR, FrTp y FrIf. Fuentes: [SWS_FrTp_01009], [SWS_FrTp_00152], [SWS_FrIf_05033].

Sincronización, reentrancia y contextos de tareas

La ejecución en el clúster FlexRay está estrechamente acoplada a la base de tiempo estática de comunicación. Funciones principales cíclicas controlan tareas periódicas: FrTrcv_MainFunction sondea los estados de los transceptores y los eventos de wakeup [SWS_FrTrcv_00330], mientras que FrTp_MainFunction debe ejecutarse al menos una vez por ciclo de comunicación FlexRay [SWS_FrTp_01152] [SWS_FrTp_00162]. Interpretación: la ejecución de FrTp_MainFunction al menos una vez por ciclo de comunicación FlexRay presumiblemente garantiza una actualización puntual de los temporizadores de protocolo (como Timeout_BS y Timeout_CR) de forma síncrona con la trama TDMA estática SWS FlexRayISOTransportLayer p. 88. Pregunta Q-c7a18cbb3c37b980 (abierta)

Para la sincronización temporal y el control de la secuencia en la trama TDMA, el clúster proporciona temporizadores absolutos. A través de FrIf_SetAbsoluteTimer, FrIf_EnableAbsoluteTimerIRQ y FrIf_AckAbsoluteTimerIRQ se configuran y confirman interrupciones de temporizador en el CC [SWS_Fr_00034] [SWS_FrIf_05021]. Además, FrIf proporciona servicios síncronos para consultar el tiempo global (FrIf_GetGlobalTime), la duración del ciclo (FrIf_GetCycleLength) y los macroticks (FrIf_GetMacrotickDuration, FrIf_GetMacroticksPerCycle) [SWS_FrIf_05015] [SWS_FrIf_05018] SWS FlexRayInterface p. 56.

En cuanto a la reentrancia y los contextos se aplica lo siguiente: las APIs de controlador del módulo fr por regla general no son reentrantes para una misma instancia de controlador (Non Reentrant for the same device) [SWS_Fr_00034]. Las interfaces de frif están diseñadas para ser reentrantes para diferentes índices de clúster o controlador. Ciertas funciones de consulta como FrIf_GetGlobalTime pueden invocarse explícitamente dentro de áreas exclusivas [SWS_FrIf_05015] SWS FlexRayInterface p. 64.

Ciclos de vida típicos y modos de funcionamiento

La inicialización del clúster se realiza de forma jerárquica: la secuencia de inicialización del BSW comienza con FrSM_Init, por lo que todas las máquinas de estados de clúster pasan al estado base FRSM_READY [SWS_FrSM_00013] [SWS_FrSM_00126]. A continuación, los controladores se inicializan mediante FrIf_ControllerInit [SWS_FrIf_05004], y el módulo FrTp cambia del estado FRTP_OFF a FRTP_ON mediante FrTp_Init [SWS_FrTp_01032] SWS FlexRayStateManager p. 35.

El Communication Controller pasa por la máquina de estados POC (Protocol Operation Control) según la especificación de FlexRay: desde el estado POC:ready, el comando RUN inicia a través de Fr_StartCommunication la transición hacia POC:startup [SWS_Fr_00010]. Si la ECU está configurada como nodo de coldstart, se emite el comando CHI ALLOW_COLDSTART a través de Fr_AllowColdstart [SWS_Fr_00114]. Tras una integración y sincronización correctas, el controlador alcanza POC:normal active o POC:normal passive [SWS_Fr_00507] [SWS_Fr_00509] SWS FlexRayDriver p. 42.

Antes del inicio de la comunicación, un bus inactivo requiere una secuencia de wakeup: FrSM coordina wakeups de canal único o de doble canal. El canal de wakeup se parametriza a través de FrIf_SetWakeupChannel, los transceptores se conmutan a FRTRCV_TRCVMODE_NORMAL y el patrón de wakeup (WUP) se envía al bus mediante FrIf_SendWUP o Fr_SendWUP [SWS_Fr_00009] [SWS_FrIf_05011] [SWS_FrIf_05034]. La causa del wakeup se puede evaluar mediante FrTrcv_GetTransceiverWUReason [SWS_FrTrcv_00325] SWS FlexRayStateManager p. 50.

Durante el apagado, FrSM cambia de COMM_FULL_COM a COMM_NO_COM a petición de ComM. La comunicación se detiene mediante FrIf_HaltCommunication, FrIf pasa al modo offline mediante FrIf_SetState(FRIF_GOTO_OFFLINE) y los transceptores se ponen en STANDBY [SWS_FrIf_05006]. Para casos de diagnóstico o seguridad, los clústeres pueden ponerse en modo de solo recepción (ECU Passive) a través de FrSM_SetEcuPassive [SWS_FrSM_00174]. Una detención completa de FrTp se realiza mediante FrTp_Shutdown [SWS_FrTp_00148] SWS FlexRayStateManager p. 58.

Inicio y reactivación del clúster de FlexRayComMBswMFrSMFrIfFrFrTrcvFrSM_RequestComMode(Network, COMM_FULL_COM)FrIf_SetTransceiverMode(Ctrl, Chnl, NORMAL)FrTrcv_SetTransceiverMode(TrcvIdx, NORMAL)FrIf_SendWUP(CtrlIdx)Fr_SendWUP(CtrlIdx)BswM_FrSM_CurrentState(FRSM_WAKEUP)Use Case: Inicio y sincronizaciónFrIf_StartCommunication(CtrlIdx)Fr_StartCommunication(CtrlIdx)FrIf_GetPOCStatus(CtrlIdx, POCStatusPtr)Fr_GetPOCStatus(CtrlIdx, POCStatusPtr)POC:normal activeE_OK (POC:normal active)FrIf_SetState(ClstIdx, FRIF_GOTO_ONLINE)BswM_FrSM_CurrentState(FRSM_ONLINE)

Diagrama de secuencias: interacción de ComM, BswM, FrSM, FrIf, Fr y FrTrcv en el startup de clúster y wakeup. Fuentes: [SWS_FrSM_00013], [SWS_FrIf_05005], [SWS_Fr_00010].

Tratamiento de errores, rastreo en DET y degradación

Los manejos incorrectos y los parámetros de API no válidos se registran mediante el Development Error Tracer (DET). Si se pasan índices de controlador o canal no válidos o se invocan APIs antes de la inicialización del módulo, FrIf, FrTp, FrTrcv y FrSM notifican errores estandarizados como FRIF_E_INV_CTRL_IDX, FRTP_E_INVALID_PDU_SDU_ID, FRTRCV_E_UNINIT o FRSM_E_INV_HANDLE al DET [SWS_FrIf_05158] [SWS_FrTp_01143] [SWS_FrTrcv_00462] [SWS_FrSM_00168] SWS FlexRayISOTransportLayer p. 77.

Los errores graves de hardware y en tiempo de ejecución se notifican al Diagnostic Event Manager (DEM). Las pruebas de hardware del controlador señalan errores a través del evento FR_E_CTRL_TESTRESULT con el estado DEM_EVENT_STATUS_FAILED [SWS_Fr_00181] [SWS_Fr_00297]. Si el startup del clúster falla dentro de FrSM, se notifica el evento de diagnóstico FRSM_E_CLUSTER_STARTUP SWS FlexRayStateManager p. 50.

Para degradación y tolerancia a fallos, el clúster ofrece mecanismos de aislamiento específicos: en transceptores con acopladores en estrella activos (Active Star), las ramas de línea defectuosas pueden desactivarse mediante FrTrcv_DisableTransceiverBranch o FrIf_DisableTransceiverBranch para evitar perturbaciones en todo el clúster [SWS_FrTrcv_00442] [SWS_FrIf_05028]. Las transmisiones en curso pueden cancelarse selectivamente mediante FrTp_CancelTransmit y FrIf_CancelTransmit, y los búferes de hardware individuales pueden bloquearse mediante FrIf_DisableLPdu [SWS_FrTp_00150] [SWS_FrIf_05710] SWS FlexRayTransceiverDriver p. 50.

Esta guía fue generada mediante inteligencia artificial sobre la base de las especificaciones AUTOSAR para la versión R20-11.

Module im Cluster

FlexRay Driver (Fr)

Provides hardware-dependent access to FlexRay communication controllers.

BSW ID 81 42 APIs (32 Funktionen, 10 Typen) #include "Fr.h"

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

BSW ID 38 10 APIs (10 Funktionen, 0 Typen) #include "FrArTp.h"

FlexRay Interface (FrIf)

Abstracts FlexRay hardware controllers for upper layers.

BSW ID 61 52 APIs (49 Funktionen, 3 Typen) #include "FrIf.h"

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

BSW ID 32 32 APIs (32 Funktionen, 0 Typen) #include "FrNm.h"

FlexRay State Manager (FrSM)

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

BSW ID 142 8 APIs (6 Funktionen, 2 Typen) #include "FrSM.h"

FlexRay Transport Layer (FrTp)

Provides segmented data transmission over FlexRay (ISO 10681-2).

BSW ID 36 12 APIs (11 Funktionen, 1 Typen) #include "FrTp.h"

FlexRay Transceiver Driver (FrTrcv)

Controls physical bus transceiver states and bus diagnostics on FlexRay lines.

BSW ID 71 15 APIs (11 Funktionen, 4 Typen) #include "FrTrcv.h"