メインコンテンツまでスキップ

Communication Configuration

What You Will Do​

In the AUTOSAR System Tutorial you connected the node ECU to the CAN cluster CanCluster, so PRTE Platform Import in chapter 6 brought the modules of the CAN communication stack as empty documents. In this chapter you fill those ten modules by hand, from the bottom up.

  • EcuC holds the PDUs that several modules share. You create the two network management PDUs PduNmTx and PduNmRx here.
  • Can is the driver of the CAN controller and its two hardware objects, one for transmitting and one for receiving.
  • CanIf is the interface between the driver and the modules above it. It gives each PDU its CAN id.
  • ComM manages the communication channels of the ECU.
  • CanSM manages the state of the CAN network and its recovery from bus-off.
  • Nm is the network management layer that does not depend on the bus type. It hands the channel to CanNm.
  • CanNm is the network management of CAN. It sends and receives the NM PDUs PduNmTx and PduNmRx of EcuC.
  • LSduR passes the NM PDUs between CanIf and CanNm. You declare the two modules it talks to and one path for each NM PDU.
  • PduR routes application PDUs between the communication modules. This design has none, so it gets only its two mandatory containers.
  • Com packs signals into PDUs and unpacks them. It also gets only its two mandatory containers.

Before You Begin​

  • Start after finishing Rte Configuration.
  • Click Configuration under MODULE to open the ECU Configuration editor.
  • Configure the modules in this order. A module further down picks containers of the modules above it from its lists.
OrderModuleContainers you addRefers to
1EcuC6—
2Can6Mcu (from PRTE Setup)
3CanIf12Can, EcuC
4ComM4—
5CanSM4ComM, CanIf
6Nm7ComM
7CanNm4ComM, EcuC
8LSduR10CanIf, CanNm, EcuC
9PduR2—
10Com2—

The tables of each section list every value you enter. Time values are in seconds.

Note. The + at the right end of a row in the CONFIGURATION tree adds a container of that definition and selects it. The new container already holds the definition's default values, so change only the values in the tables. Press Tab after typing into a text field, and pick a reference from its list. Make one container at a time: +, the name if the table gives another one, every value, then the next container. Save each module once with Ctrl+S when it is done.

Caution. Do not press the PRTE Auto Configuration icon next to ECU in the module list. This tutorial configures the BSW by hand, and that icon writes values on its own.

Caution. Many TRUE/FALSE items of Nm and CanNm have no default value, so + leaves them empty and PRTE stops on each empty one. Click FALSE (or TRUE where the table says so) on every one of them. Clicking a button that is already selected clears the value; click it once more in that case.

EcuC Configuration​

Configure EcuC first. CanIf, CanNm and LSduR pick its PDUs from their lists. EcuC itself produces no generated file.

ContainerHow you add itItemValue
EcucConfigSet+ on EcucConfigSetAdd only
EcucPduCollection+ on EcucPduCollection under EcucConfigSetPduIdTypeEnumUINT16
PduLengthTypeEnumUINT32
PduNmTx+ on Pdu under EcucPduCollectionNamePduNmTx
PduLength8
PduNmRx+ on Pdu under EcucPduCollectionNamePduNmRx
PduLength8
EcucHardware+ on EcucHardwareAdd only
Core0+ on EcucCoreDefinition under EcucHardwareNameCore0
EcucCoreId0
  1. Click EcuC in the module list. Add EcucConfigSet with its +, then EcucPduCollection under it, and pick its two values from the table.

  2. Under EcucPduCollection, click the + on the Pdu row.

    Adding a Pdu

    Figure 9-1. ① EcuC, ② Pdu, ③ +.

  3. The editor adds Pdu_0 and selects it. Type PduNmTx into Name and press Tab. Type 8 into PduLength and press Tab.

    The values of PduNmTx

    Figure 9-2. ① PduNmTx, ② Name, ③ PduLength.

  4. Create PduNmRx the same way. The + gives Pdu_0 again, because that name is free, and you rename it to PduNmRx.

  5. Add EcucHardware with its +. Under it, click the + on the EcucCoreDefinition row, rename the new EcucCoreDefinition_0 to Core0 and type 0 into EcucCoreId. EcuC needs this core as soon as it holds anything. Save with Ctrl+S.

Can Configuration​

ContainerHow you add itItemValue
CanGeneral+ on CanGeneralCanGlobalTimeSupportFALSE
CanIndex0
CanMainFunctionModePeriod0.01
CanMultiplexedTransmissionFALSE
CanTimeoutDuration0.001
CanConfigSet+ on CanConfigSetAdd only
CanController_0+ on CanController under CanConfigSetCanBusoffProcessingPOLLING
CanControllerActivationTRUE
CanControllerBaseAddress0
CanControllerId0
CanRxProcessingPOLLING
CanTxProcessingPOLLING
CanWakeupProcessingPOLLING
CanWakeupSupportFALSE
CanControllerDefaultBaudrateCan/CanConfigSet/CanController_0/CanControllerBaudrateConfig_0
CanCpuClockRefMcu/McuModuleConfiguration/Default/CoreClock
CanControllerBaudrateConfig_0+ on CanControllerBaudrateConfig under CanController_0CanControllerBaudRate500
CanControllerPropSeg, CanControllerSeg1, CanControllerSeg2, CanControllerSyncJumpWidth0
CanHardwareObject_0+ on CanHardwareObject under CanConfigSetCanHandleTypeBASIC
CanIdTypeSTANDARD
CanObjectId0
CanObjectTypeTRANSMIT
CanControllerRefCan/CanConfigSet/CanController_0
CanHardwareObject_1+ on CanHardwareObject under CanConfigSetCanHandleTypeBASIC
CanIdTypeSTANDARD
CanObjectId1
CanObjectTypeRECEIVE
CanControllerRefCan/CanConfigSet/CanController_0
  1. Click Can in the module list. In the CONFIGURATION tree, click the + on the CanGeneral row.

    Adding CanGeneral

    Figure 9-3. ① Can, ② CanGeneral, ③ +.

  2. Enter the five values of CanGeneral from the table.

    Caution. Clicking a TRUE or FALSE button that is already selected clears the value, and the row gets a red border. Click the same button once more in that case.

    The values of CanGeneral

    Figure 9-4. ① CanGeneral, ② CanGlobalTimeSupport, ③ CanIndex, ④ CanMainFunctionModePeriod, ⑤ CanMultiplexedTransmission, ⑥ CanTimeoutDuration.

  3. Click the + on the CanConfigSet row. Under it, click the + on the CanController row, and under the new CanController_0, the + on the CanControllerBaudrateConfig row. The controller picks this baud rate configuration, so it must exist first.

  4. Click CanController_0 and enter its ten values from the table. CanControllerDefaultBaudrate picks the CanControllerBaudrateConfig_0 of step 3.

    The values of CanController_0

    Figure 9-5. ① CanController_0, ② CanBusoffProcessing, ③ CanControllerActivation, ④ CanControllerBaseAddress, ⑤ CanControllerId, ⑥ CanRxProcessing, ⑦ CanTxProcessing, ⑧ CanWakeupProcessing, ⑨ CanWakeupSupport, ⑩ CanControllerDefaultBaudrate, ⑪ CanCpuClockRef.

  5. Click CanControllerBaudrateConfig_0 and enter its five values.

    The values of CanControllerBaudrateConfig_0

    Figure 9-6. ① CanControllerBaudrateConfig_0, ② CanControllerBaudRate, ③ CanControllerPropSeg, ④ CanControllerSeg1, ⑤ CanControllerSeg2, ⑥ CanControllerSyncJumpWidth.

  6. Under CanConfigSet, click the + on the CanHardwareObject row.

    Adding CanHardwareObject_0

    Figure 9-7. ① Can, ② CanHardwareObject, ③ +.

  7. Enter the five values of CanHardwareObject_0 from the table. This is the transmit object.

    The values of CanHardwareObject_0

    Figure 9-8. ① CanHardwareObject_0, ② CanHandleType, ③ CanIdType, ④ CanObjectId, ⑤ CanObjectType, ⑥ CanControllerRef.

  8. Create the receive object CanHardwareObject_1 the same way from the table. Save with Ctrl+S.

CanIf Configuration​

ContainerHow you add itItemValue
CanIfPublicCfg+ on CanIfPublicCfgCanIfGlobalTimeSupportFALSE
CanIfPublicHandleTypeEnumUINT16
CanIfPublicTxConfirmPollingSupportTRUE
CanIfPublicTxBufferingTRUE
CanIfPrivateCfg+ on CanIfPrivateCfgCanIfPrivateSoftwareFilterTypeLINEAR
CanIfDispatchCfg+ on CanIfDispatchCfgCanIfDispatchUserCtrlBusOffULCAN_SM
CanIfDispatchUserCtrlModeIndicationULCAN_SM
CanIfInitCfg+ on CanIfInitCfgCanIfInitCfgSetCanIf_Config
CanIfInitHohCfg_0+ on CanIfInitHohCfg under CanIfInitCfgAdd only
CanIfCtrlDrvCfg_0+ on CanIfCtrlDrvCfgCanIfCtrlDrvNameRefCan/CanGeneral
CanIfCtrlDrvInitHohConfigRefCanIf/CanIfInitCfg/CanIfInitHohCfg_0
CanIfCtrlCfg_0+ on CanIfCtrlCfg under CanIfCtrlDrvCfg_0CanIfCtrlId0
CanIfCtrlCanCtrlRefCan/CanConfigSet/CanController_0
CanIfHthCfg_0+ on CanIfHthCfg under CanIfInitHohCfg_0CanIfHthCanCtrlIdRefCanIf/CanIfCtrlDrvCfg_0/CanIfCtrlCfg_0
CanIfHthIdSymRefCan/CanConfigSet/CanHardwareObject_0
CanIfHrhCfg_0+ on CanIfHrhCfg under CanIfInitHohCfg_0CanIfHrhSoftwareFilterTRUE
CanIfHrhCanCtrlIdRefCanIf/CanIfCtrlDrvCfg_0/CanIfCtrlCfg_0
CanIfHrhIdSymRefCan/CanConfigSet/CanHardwareObject_1
CanIfBufferCfg_0+ on CanIfBufferCfg under CanIfInitCfgCanIfBufferSize1
CanIfBufferHthRefCanIf/CanIfInitCfg/CanIfInitHohCfg_0/CanIfHthCfg_0
CanIfTxPduCfg_0+ on CanIfTxPduCfg under CanIfInitCfgCanIfTxPduCanId1281
CanIfTxPduId0
CanIfTxPduTypeSTATIC
CanIfTxPduBufferRefCanIf/CanIfInitCfg/CanIfBufferCfg_0
CanIfTxPduRefEcuC/EcucConfigSet/EcucPduCollection/PduNmTx
CanIfRxPduCfg_0+ on CanIfRxPduCfg under CanIfInitCfgCanIfRxPduCanId1282
CanIfRxPduDataLength8
CanIfRxPduId0
CanIfRxPduHrhIdRefCanIf/CanIfInitCfg/CanIfInitHohCfg_0/CanIfHrhCfg_0
CanIfRxPduRefEcuC/EcucConfigSet/EcucPduCollection/PduNmRx
  1. Click CanIf in the module list. Add CanIfPublicCfg with its + and enter its four values. CanIfPublicTxBuffering must be TRUE: the transmit PDU uses the buffer CanIfBufferCfg_0, and without buffering PRTE stops with CANIF_BUFFERING_GATE_INCONSISTENT.

    The values of CanIfPublicCfg

    Figure 9-9. ① CanIfPublicCfg, ② CanIfGlobalTimeSupport, ③ CanIfPublicHandleTypeEnum, ④ CanIfPublicTxConfirmPollingSupport, ⑤ CanIfPublicTxBuffering.

  2. Add CanIfPrivateCfg and pick LINEAR. Then click the + on the CanIfDispatchCfg row.

    Adding CanIfDispatchCfg

    Figure 9-10. ① CanIf, ② CanIfDispatchCfg, ③ +.

  3. Pick CAN_SM in both lists. CanSM then receives the bus-off and mode reports of the controller.

    The values of CanIfDispatchCfg

    Figure 9-11. ① CanIfDispatchCfg, ② CanIfDispatchUserCtrlBusOffUL, ③ CanIfDispatchUserCtrlModeIndicationUL.

  4. Add CanIfInitCfg, type CanIf_Config into CanIfInitCfgSet, and add CanIfInitHohCfg_0 under it.

  5. Add CanIfCtrlDrvCfg_0 and pick its two references from the table.

  6. Under CanIfCtrlDrvCfg_0, add CanIfCtrlCfg_0, type 0 into CanIfCtrlId and pick Can/CanConfigSet/CanController_0 in CanIfCtrlCanCtrlRef.

    The values of CanIfCtrlCfg_0

    Figure 9-12. ① CanIfCtrlCfg_0, ② CanIfCtrlId, ③ CanIfCtrlCanCtrlRef.

  7. Create CanIfHthCfg_0, CanIfHrhCfg_0 and CanIfBufferCfg_0 the same way from the table. The transmit handle points to CanHardwareObject_0, the receive handle to CanHardwareObject_1, and the buffer to the transmit handle.

  8. Under CanIfInitCfg, click the + on the CanIfTxPduCfg row.

    Adding CanIfTxPduCfg_0

    Figure 9-13. ① CanIf, ② CanIfTxPduCfg, ③ +.

  9. Enter the five values of CanIfTxPduCfg_0 from the table. 1281 is the CAN id 0x501. CanIfTxPduRef picks the PduNmTx you made in EcuC.

    The values of CanIfTxPduCfg_0

    Figure 9-14. ① CanIfTxPduCfg_0, ② CanIfTxPduCanId, ③ CanIfTxPduId, ④ CanIfTxPduType, ⑤ CanIfTxPduBufferRef, ⑥ CanIfTxPduRef.

  10. Create CanIfRxPduCfg_0 the same way from the table. 1282 is the CAN id 0x502, and CanIfRxPduRef picks PduNmRx. Save with Ctrl+S.

ComM Configuration​

ContainerHow you add itItemValue
ComMGeneral+ on ComMGeneralAdd only
ComMConfigSet+ on ComMConfigSetAdd only
ComMChannel_0+ on ComMChannel under ComMConfigSetComMBusTypeCOMM_BUS_TYPE_CAN
ComMChannelId0
ComMNoWakeUpInhibitionNvmStorageFALSE
ComMNetworkManagement+ on ComMNetworkManagement under ComMChannel_0ComMNmVariantFULL
  1. Click ComM in the module list. Add ComMGeneral and ComMConfigSet with their +. Under ComMConfigSet, click the + on the ComMChannel row.

    Adding ComMChannel_0

    Figure 9-15. ① ComM, ② ComMChannel, ③ +.

  2. Enter the three values of ComMChannel_0 from the table.

    The values of ComMChannel_0

    Figure 9-16. ① ComMChannel_0, ② ComMBusType, ③ ComMChannelId, ④ ComMNoWakeUpInhibitionNvmStorage.

  3. Under ComMChannel_0, add ComMNetworkManagement. ComMNmVariant must be FULL, because this ECU runs CanNm. The + already writes FULL; check it and leave it. Save with Ctrl+S.

    The value of ComMNetworkManagement

    Figure 9-17. ① ComMNetworkManagement, ② ComMNmVariant.

CanSM Configuration​

The four bus-off recovery values of CanSMManagerNetwork_0 are the values you entered on CanCluster in the System tutorial (L1 100 ms, L2 200 ms, counter 2, Tx ensured 100 ms). Type them here by hand and keep them equal.

ContainerHow you add itItemValue
CanSMGeneral+ on CanSMGeneralCanSMMainFunctionTimePeriod0.01
CanSMConfiguration+ on CanSMConfigurationCanSMModeRequestRepetitionMax3
CanSMModeRequestRepetitionTime0.02
CanSMManagerNetwork_0+ on CanSMManagerNetwork under CanSMConfigurationCanSMBorCounterL1ToL22
CanSMBorTimeL10.1
CanSMBorTimeL20.2
CanSMBorTimeTxEnsured0.1
CanSMBorTxConfirmationPollingTRUE
CanSMComMNetworkHandleRefComM/ComMConfigSet/ComMChannel_0
CanSMController_0+ on CanSMController under CanSMManagerNetwork_0CanSMControllerIdCanIf/CanIfCtrlDrvCfg_0/CanIfCtrlCfg_0
  1. Click CanSM in the module list. Add CanSMGeneral and CanSMConfiguration with their + and enter their values from the table. Under CanSMConfiguration, click the + on the CanSMManagerNetwork row.

    Adding CanSMManagerNetwork_0

    Figure 9-18. ① CanSM, ② CanSMManagerNetwork, ③ +.

  2. Enter the six values of CanSMManagerNetwork_0 from the table. CanSMComMNetworkHandleRef picks the channel you made in ComM.

    The values of CanSMManagerNetwork_0

    Figure 9-19. ① CanSMManagerNetwork_0, ② CanSMBorCounterL1ToL2, ③ CanSMBorTimeL1, ④ CanSMBorTimeL2, ⑤ CanSMBorTimeTxEnsured, ⑥ CanSMBorTxConfirmationPolling, ⑦ CanSMComMNetworkHandleRef.

  3. Under CanSMManagerNetwork_0, add CanSMController_0 and pick CanIf/CanIfCtrlDrvCfg_0/CanIfCtrlCfg_0 in CanSMControllerId. Save with Ctrl+S.

    The value of CanSMController_0

    Figure 9-20. ① CanSMController_0, ② CanSMControllerId.

Nm Configuration​

ContainerHow you add itItemValue
NmGlobalConfig+ on NmGlobalConfigAdd only
NmGlobalConstants+ on NmGlobalConstants under NmGlobalConfigNmNumberOfChannels1
NmGlobalFeatures+ on NmGlobalFeatures under NmGlobalConfigNmBusSynchronizationEnabled, NmComControlEnabled, NmCoordinatorSyncSupport, NmDynamicPncToChannelMappingSupport, NmPduRxIndicationEnabled, NmRemoteSleepIndEnabled, NmStateChangeIndEnabled, NmUserDataEnabledFALSE
NmGlobalProperties+ on NmGlobalProperties under NmGlobalConfigNmCycletimeMainFunction0.01
NmChannelConfig_0+ on NmChannelConfigNmChannelSleepMaster, NmPassiveModeEnabled, NmStateReportEnabled, NmSynchronizingNetworkFALSE
NmComMChannelRefComM/ComMConfigSet/ComMChannel_0
NmBusType+ on NmBusType under NmChannelConfig_0Add only
NmStandardBusNmConfig+ on NmStandardBusNmConfig under NmBusTypeNmStandardBusTypeNM_BUSNM_CANNM
  1. Click Nm in the module list. Add NmGlobalConfig with its +. Under it, add NmGlobalConstants and type 1 into NmNumberOfChannels.

  2. Under NmGlobalConfig, add NmGlobalFeatures and click FALSE on each of its eight items in the table. None of them has a default value.

    The values of NmGlobalFeatures

    Figure 9-21. ① NmGlobalFeatures, ② NmBusSynchronizationEnabled, ③ NmComControlEnabled, ④ NmCoordinatorSyncSupport, ⑤ NmDynamicPncToChannelMappingSupport, ⑥ NmPduRxIndicationEnabled, ⑦ NmRemoteSleepIndEnabled, ⑧ NmStateChangeIndEnabled, ⑨ NmUserDataEnabled.

  3. Under NmGlobalConfig, add NmGlobalProperties and type 0.01 into NmCycletimeMainFunction. Then click the + on the NmChannelConfig row at the top of the tree.

    Adding NmChannelConfig_0

    Figure 9-22. ① Nm, ② NmChannelConfig, ③ +.

  4. Click FALSE on the four items of NmChannelConfig_0 and pick ComM/ComMConfigSet/ComMChannel_0 in NmComMChannelRef.

    The values of NmChannelConfig_0

    Figure 9-23. ① NmChannelConfig_0, ② NmChannelSleepMaster, ③ NmPassiveModeEnabled, ④ NmStateReportEnabled, ⑤ NmSynchronizingNetwork, ⑥ NmComMChannelRef.

  5. Under NmChannelConfig_0, add NmBusType, and under it NmStandardBusNmConfig. Pick NM_BUSNM_CANNM in NmStandardBusType. Save with Ctrl+S.

    The value of NmStandardBusNmConfig

    Figure 9-24. ① NmStandardBusNmConfig, ② NmStandardBusType.

CanNm Configuration​

ContainerHow you add itItemValue
CanNmGlobalConfig+ on CanNmGlobalConfigCanNmBusLoadReductionEnabled, CanNmBusSynchronizationEnabled, CanNmComControlEnabled, CanNmComUserDataSupport, CanNmCoordinatorSyncSupport, CanNmDynamicPncToChannelMappingSupport, CanNmImmediateRestartEnabled, CanNmImmediateTxconfEnabled, CanNmPassiveModeEnabled, CanNmPduRxIndicationEnabled, CanNmRemoteSleepIndEnabled, CanNmStateChangeIndEnabled, CanNmUserDataEnabledFALSE
CanNmMainFunctionPeriod0.01
CanNmChannelConfig_0+ on CanNmChannelConfig under CanNmGlobalConfigCanNmMsgCycleTime0.1
CanNmTimeoutTime1.0
CanNmRepeatMessageTime0.4
CanNmWaitBusSleepTime0.5
CanNmRemoteSleepIndTime1.0
CanNmImmediateNmCycleTime0.02
CanNmImmediateNmTransmissions5
CanNmMsgCycleOffset0.0
CanNmMsgReducedTime0.05
CanNmNodeId1
CanNmNodeIdEnabledTRUE
CanNmPduCbvPositionCANNM_PDU_BYTE_0
CanNmPduNidPositionCANNM_PDU_BYTE_1
CanNmBusLoadReductionActive, CanNmNodeDetectionEnabled, CanNmRepeatMsgIndEnabledFALSE
CanNmCarWakeUpFilterEnabledNo value (clear it)
CanNmComMNetworkHandleRefComM/ComMConfigSet/ComMChannel_0
CanNmRxPdu_0+ on CanNmRxPdu under CanNmChannelConfig_0CanNmRxPduId0
CanNmRxPduRefEcuC/EcucConfigSet/EcucPduCollection/PduNmRx
CanNmTxPdu+ on CanNmTxPdu under CanNmChannelConfig_0CanNmTxConfirmationPduId0
CanNmTxPduRefEcuC/EcucConfigSet/EcucPduCollection/PduNmTx
  1. Click CanNm in the module list. Add CanNmGlobalConfig with its +. Click FALSE on its thirteen items in the table, which have no default value, and type 0.01 into CanNmMainFunctionPeriod.

    The values of CanNmGlobalConfig

    Figure 9-25. ① CanNmGlobalConfig, ② CanNmBusLoadReductionEnabled, ③ CanNmBusSynchronizationEnabled, ④ CanNmComControlEnabled, ⑤ CanNmComUserDataSupport, ⑥ CanNmCoordinatorSyncSupport, ⑦ CanNmDynamicPncToChannelMappingSupport, ⑧ CanNmImmediateRestartEnabled, ⑨ CanNmImmediateTxconfEnabled, ⑩ CanNmPassiveModeEnabled, ⑪ CanNmPduRxIndicationEnabled, ⑫ CanNmRemoteSleepIndEnabled, ⑬ CanNmStateChangeIndEnabled, ⑭ CanNmUserDataEnabled, ⑮ CanNmMainFunctionPeriod.

  2. Under CanNmGlobalConfig, click the + on the CanNmChannelConfig row.

    Adding CanNmChannelConfig_0

    Figure 9-26. ① CanNm, ② CanNmChannelConfig, ③ +.

  3. Enter the values of CanNmChannelConfig_0 from the table: the times and numbers, TRUE on CanNmNodeIdEnabled, the two byte positions, FALSE on the three items without a default value, and the channel of ComM in CanNmComMNetworkHandleRef.

  4. CanNmCarWakeUpFilterEnabled must stay empty. The + writes a value into it, so click its selected button once more to clear it. With a value there, PRTE stops with CANNM_CARWAKEUP_LAYOUT.

    The values of CanNmChannelConfig_0

    Figure 9-27. ① CanNmChannelConfig_0, ② CanNmMsgCycleTime, ③ CanNmImmediateNmCycleTime, ④ CanNmImmediateNmTransmissions, ⑤ CanNmMsgCycleOffset, ⑥ CanNmMsgReducedTime, ⑦ CanNmNodeDetectionEnabled, ⑧ CanNmCarWakeUpFilterEnabled with neither button selected.

  5. Under CanNmChannelConfig_0, add CanNmRxPdu_0, type 0 into CanNmRxPduId and pick PduNmRx in CanNmRxPduRef.

    The values of CanNmRxPdu_0

    Figure 9-28. ① CanNmRxPdu_0, ② CanNmRxPduId, ③ CanNmRxPduRef.

  6. Create CanNmTxPdu the same way from the table, with PduNmTx in CanNmTxPduRef. Save with Ctrl+S.

LSduR Configuration​

The values of LSduR, PduR and Com are in this table.

ModuleContainerHow you add itItemValue
LSduRLSduRGeneral+ on LSduRGeneralLSduRMetaDataSupportFALSE
LSduRZeroCostOperationFALSE
LSduRLSduRConfig+ on LSduRConfigAdd only
LSduRLSduRBswModules_0+ on LSduRBswModulesLSduRRxIndicationTRUE
LSduRTransmitTRUE
LSduRTxConfirmationTRUE
LSduRProvideTxBufferFALSE
LSduRReleaseRxBufferFALSE
LSduRLowerModuleTRUE
LSduRUpperModuleFALSE
LSduRBswModuleRefECU/CanIf (picked)
LSduRLSduRBswModules_1+ on LSduRBswModulesLSduRRxIndicationTRUE
LSduRTransmitTRUE
LSduRTxConfirmationTRUE
LSduRProvideTxBufferFALSE
LSduRReleaseRxBufferFALSE
LSduRLowerModuleFALSE
LSduRUpperModuleTRUE
LSduRBswModuleRefECU/CanNm (picked)
LSduRLSduRConfig/LSduRPath_0+ on LSduRPathAdd only
LSduRLSduRPath_0/LSduRPathSourcePdu+ on LSduRPathSourcePduLSduRPathSourcePduId0
LSduRPathSourcePduRefEcuC/EcucConfigSet/EcucPduCollection/PduNmRx
LSduRLSduRPath_0/LSduRPathDestinationPdu_0+ on LSduRPathDestinationPduLSduRPathDestinationPduRefEcuC/EcucConfigSet/EcucPduCollection/PduNmRx
LSduRLSduRConfig/LSduRPath_1+ on LSduRPathAdd only
LSduRLSduRPath_1/LSduRPathSourcePdu+ on LSduRPathSourcePduLSduRPathSourcePduId1
LSduRPathSourcePduRefEcuC/EcucConfigSet/EcucPduCollection/PduNmTx
LSduRLSduRPath_1/LSduRPathDestinationPdu_0+ on LSduRPathDestinationPduLSduRPathDestinationPduRefEcuC/EcucConfigSet/EcucPduCollection/PduNmTx
PduRPduRGeneral+ on PduRGeneralPduRZeroCostOperationFALSE
PduRPduRRoutingPaths+ on PduRRoutingPathsPduRConfigurationId0
ComComGeneral+ on ComGeneralComSupportedIPduGroups0
ComComConfig+ on ComConfigAdd only
ComComConfig/ComMainFunctionRx+ on ComMainFunctionRxComMainRxTimeBase0.01 (filled in)
ComComConfig/ComMainFunctionTx+ on ComMainFunctionTxComMainTxTimeBase0.01 (filled in)

Caution. Clicking a TRUE or FALSE button that is already selected clears the value. Click the same button once more in that case.

  1. Click LSduR in the module list. In the CONFIGURATION tree, click the + on the LSduRGeneral row.

    Adding LSduRGeneral

    Figure 9-29. ① LSduR, ② LSduRGeneral, ③ +.

  2. Click the + on the LSduRConfig row.

  3. Click LSduRGeneral. Click FALSE of LSduRMetaDataSupport and of LSduRZeroCostOperation.

    The values of LSduRGeneral

    Figure 9-30. ① LSduRGeneral, ② LSduRMetaDataSupport, ③ LSduRZeroCostOperation.

  4. Click the + on the LSduRBswModules row. The editor adds LSduRBswModules_0 and selects it.

    Adding LSduRBswModules

    Figure 9-31. ① LSduR, ② LSduRBswModules, ③ +.

  5. In LSduRBswModules_0, click TRUE of LSduRRxIndication, LSduRTransmit and LSduRTxConfirmation, FALSE of LSduRProvideTxBuffer and LSduRReleaseRxBuffer, TRUE of LSduRLowerModule and FALSE of LSduRUpperModule.

  6. Open the LSduRBswModuleRef dropdown and pick ECU/CanIf. Pick it from the list: a typed CanIf does not resolve, and PRTE stops with LSDUR_PATH_SOURCE_UNRESOLVED.

    The values of LSduRBswModules_0

    Figure 9-32. ① LSduRBswModules_0, ② LSduRRxIndication, ③ LSduRTransmit, ④ LSduRTxConfirmation, ⑤ LSduRProvideTxBuffer, ⑥ LSduRReleaseRxBuffer, ⑦ LSduRLowerModule, ⑧ LSduRUpperModule, ⑨ LSduRBswModuleRef.

  7. Click the + on the LSduRBswModules row again. In LSduRBswModules_1, set the same values except FALSE of LSduRLowerModule and TRUE of LSduRUpperModule, and pick ECU/CanNm in LSduRBswModuleRef.

    The values of LSduRBswModules_1

    Figure 9-33. ① LSduRBswModules_1, ② LSduRRxIndication, ③ LSduRTransmit, ④ LSduRTxConfirmation, ⑤ LSduRProvideTxBuffer, ⑥ LSduRReleaseRxBuffer, ⑦ LSduRLowerModule, ⑧ LSduRUpperModule, ⑨ LSduRBswModuleRef.

  8. Under LSduRConfig, click the + on the LSduRPath row. The editor adds LSduRPath_0.

  9. Under LSduRPath_0, click the + on the LSduRPathSourcePdu row. Type 0 into LSduRPathSourcePduId and press the Tab key. In LSduRPathSourcePduRef, pick EcuC/EcucConfigSet/EcucPduCollection/PduNmRx.

    The values of LSduRPathSourcePdu

    Figure 9-34. ① LSduRPathSourcePdu, ② LSduRPathSourcePduId, ③ LSduRPathSourcePduRef.

  10. Under LSduRPath_0, click the + on the LSduRPathDestinationPdu row. In LSduRPathDestinationPduRef of LSduRPathDestinationPdu_0, pick EcuC/EcucConfigSet/EcucPduCollection/PduNmRx.

  11. Create LSduRPath_1 the same way from the table, with 1 and PduNmTx. Save with Ctrl+S.

PduR Configuration​

  1. Click PduR in the module list. Click the + on the PduRGeneral row.

    Adding PduRGeneral

    Figure 9-35. ① PduR, ② PduRGeneral, ③ +.

  2. Click the + on the PduRRoutingPaths row.

  3. Click PduRGeneral and click FALSE of PduRZeroCostOperation.

    The value of PduRGeneral

    Figure 9-36. ① PduRGeneral, ② PduRZeroCostOperation.

  4. Click PduRRoutingPaths, type 0 into PduRConfigurationId and press the Tab key. Save with Ctrl+S.

    The value of PduRRoutingPaths

    Figure 9-37. ① PduRRoutingPaths, ② PduRConfigurationId.

Com Configuration​

  1. Click Com in the module list. Click the + on the ComGeneral row.

    Adding ComGeneral

    Figure 9-38. ① Com, ② ComGeneral, ③ +.

  2. Click the + on the ComConfig row.

  3. Click ComGeneral, type 0 into ComSupportedIPduGroups and press the Tab key.

    The value of ComGeneral

    Figure 9-39. ① ComGeneral, ② ComSupportedIPduGroups.

  4. Under ComConfig, click the + on the ComMainFunctionRx row.

    Adding ComMainFunctionRx

    Figure 9-40. ① Com, ② ComMainFunctionRx, ③ +.

  5. Check that ComMainRxTimeBase is 0.01. Keep the name ComMainFunctionRx: the Rte mapping of chapter 8 names it.

    The value of ComMainFunctionRx

    Figure 9-41. ① ComMainFunctionRx, ② ComMainRxTimeBase.

  6. Click the + on the ComMainFunctionTx row the same way and check that ComMainTxTimeBase is 0.01. Save with Ctrl+S.

Why Is It Designed This Way?​

  • PDUs live in EcuC. One PDU is used by several modules, so it is defined once in EcuC and every module refers to it. EcuC therefore comes before CanIf.
  • One object per direction. CanHardwareObject_0 transmits and CanHardwareObject_1 receives; CanIf reaches them through CanIfHthCfg_0 and CanIfHrhCfg_0.
  • CAN ids in CanIf. The CAN ids 0x501 and 0x502 of the two PDUs are typed only in CanIf.
  • Bus-off reports go to CanSM. CAN_SM in CanIfDispatchCfg prepares for CanSM, which handles the controller.
  • ComM first. CanSM, Nm and CanNm all pick ComMChannel_0, so the channel must exist before them.
  • Two NM modules. Nm is the layer above the bus; NM_BUSNM_CANNM hands its channel to CanNm, which carries the NM PDUs.
  • Bus-off values by hand. Nothing copies the cluster values into CanSM in this tutorial, so you type the same numbers yourself.
  • NM only in the ECU configuration. The System tutorial keeps NM off on CanCluster and has no NM frame, so the NM PDUs and their CAN ids 0x501/0x502 exist only in EcuC and CanIf. This tutorial checks them by validation and code generation; how NM behaves on a running bus is not measured.
  • NM PDUs do not pass through PduR. They go CanIf ↔ LSduR ↔ CanNm, so the NM routes are in LSduR and PduR routes nothing.
  • One LSduRBswModules per neighbour. CanIf is the lower module and CanNm the upper one. LSduR finds each through LSduRBswModuleRef, which must be picked from the dropdown.
  • One path per NM PDU. LSduRPath_0 carries PduNmRx and LSduRPath_1 carries PduNmTx. The source and the destination name the same EcuC PDU, the one CanIf and CanNm also refer to.
  • Two main functions for Com. ComMainFunctionRx and ComMainFunctionTx each give Com one main function, which the Rte mappings of chapter 8 call. Without them PRTE stops with RTE_BSWMD_REF_UNRESOLVED.
  • PduR and Com carry no PDU. The two SW-Cs talk only inside the ECU, so no application PDU or signal is configured. The modules still belong to the CAN stack of the ECU and are generated with it.

Checklist​

  • EcuC holds PduNmTx and PduNmRx with PduLength 8, and Core0.
  • Can holds CanGeneral, CanController_0 with CanControllerBaudrateConfig_0, and the two hardware objects.
  • CanIfPublicTxBuffering is TRUE.
  • CanIfTxPduCfg_0 points to PduNmTx with 1281, and CanIfRxPduCfg_0 to PduNmRx with 1282.
  • ComMNmVariant of ComMNetworkManagement is FULL.
  • CanSMManagerNetwork_0 holds 2, 0.1, 0.2, 0.1 and points to ComMChannel_0.
  • Every TRUE/FALSE item of NmGlobalFeatures, NmChannelConfig_0, CanNmGlobalConfig and CanNmChannelConfig_0 in the tables has a value, except CanNmCarWakeUpFilterEnabled.
  • CanNmCarWakeUpFilterEnabled has no value.
  • CanNmRxPdu_0 points to PduNmRx and CanNmTxPdu to PduNmTx.
  • LSduR holds LSduRGeneral, LSduRConfig, LSduRBswModules_0 (ECU/CanIf) and LSduRBswModules_1 (ECU/CanNm).
  • LSduRPath_0 names PduNmRx and LSduRPath_1 names PduNmTx, each in its source and its destination.
  • PduR holds PduRGeneral and PduRRoutingPaths.
  • Com holds ComGeneral and ComConfig with ComMainFunctionRx and ComMainFunctionTx.
  • The tab VehicleDesign:Configuration carries no modified mark.

Next Step​

In Validation and Code Generation you validate the design and generate the code of the ECU.