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.
EcuCholds the PDUs that several modules share. You create the two network management PDUsPduNmTxandPduNmRxhere.Canis the driver of the CAN controller and its two hardware objects, one for transmitting and one for receiving.CanIfis the interface between the driver and the modules above it. It gives each PDU its CAN id.ComMmanages the communication channels of the ECU.CanSMmanages the state of the CAN network and its recovery from bus-off.Nmis the network management layer that does not depend on the bus type. It hands the channel toCanNm.CanNmis the network management of CAN. It sends and receives the NM PDUsPduNmTxandPduNmRxofEcuC.LSduRpasses the NM PDUs betweenCanIfandCanNm. You declare the two modules it talks to and one path for each NM PDU.PduRroutes application PDUs between the communication modules. This design has none, so it gets only its two mandatory containers.Compacks 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.
| Order | Module | Containers you add | Refers to |
|---|---|---|---|
| 1 | EcuC | 6 | — |
| 2 | Can | 6 | Mcu (from PRTE Setup) |
| 3 | CanIf | 12 | Can, EcuC |
| 4 | ComM | 4 | — |
| 5 | CanSM | 4 | ComM, CanIf |
| 6 | Nm | 7 | ComM |
| 7 | CanNm | 4 | ComM, EcuC |
| 8 | LSduR | 10 | CanIf, CanNm, EcuC |
| 9 | PduR | 2 | — |
| 10 | Com | 2 | — |
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
Tabafter 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 withCtrl+Swhen it is done.
Caution. Do not press the PRTE Auto Configuration icon next to
ECUin the module list. This tutorial configures the BSW by hand, and that icon writes values on its own.
Caution. Many TRUE/FALSE items of
NmandCanNmhave 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.
| Container | How you add it | Item | Value |
|---|---|---|---|
EcucConfigSet | + on EcucConfigSet | Add only | |
EcucPduCollection | + on EcucPduCollection under EcucConfigSet | PduIdTypeEnum | UINT16 |
| PduLengthTypeEnum | UINT32 | ||
PduNmTx | + on Pdu under EcucPduCollection | Name | PduNmTx |
| PduLength | 8 | ||
PduNmRx | + on Pdu under EcucPduCollection | Name | PduNmRx |
| PduLength | 8 | ||
EcucHardware | + on EcucHardware | Add only | |
Core0 | + on EcucCoreDefinition under EcucHardware | Name | Core0 |
| EcucCoreId | 0 |
-
Click
EcuCin the module list. AddEcucConfigSetwith its +, thenEcucPduCollectionunder it, and pick its two values from the table. -
Under
EcucPduCollection, click the + on thePdurow.
Figure 9-1. ①
EcuC, ②Pdu, ③ +. -
The editor adds
Pdu_0and selects it. TypePduNmTxinto Name and pressTab. Type8into PduLength and pressTab.
Figure 9-2. ①
PduNmTx, ② Name, ③ PduLength. -
Create
PduNmRxthe same way. The + givesPdu_0again, because that name is free, and you rename it toPduNmRx. -
Add
EcucHardwarewith its +. Under it, click the + on theEcucCoreDefinitionrow, rename the newEcucCoreDefinition_0toCore0and type0into EcucCoreId.EcuCneeds this core as soon as it holds anything. Save withCtrl+S.
Can Configuration
| Container | How you add it | Item | Value |
|---|---|---|---|
CanGeneral | + on CanGeneral | CanGlobalTimeSupport | FALSE |
| CanIndex | 0 | ||
| CanMainFunctionModePeriod | 0.01 | ||
| CanMultiplexedTransmission | FALSE | ||
| CanTimeoutDuration | 0.001 | ||
CanConfigSet | + on CanConfigSet | Add only | |
CanController_0 | + on CanController under CanConfigSet | CanBusoffProcessing | POLLING |
| CanControllerActivation | TRUE | ||
| CanControllerBaseAddress | 0 | ||
| CanControllerId | 0 | ||
| CanRxProcessing | POLLING | ||
| CanTxProcessing | POLLING | ||
| CanWakeupProcessing | POLLING | ||
| CanWakeupSupport | FALSE | ||
| CanControllerDefaultBaudrate | Can/CanConfigSet/CanController_0/CanControllerBaudrateConfig_0 | ||
| CanCpuClockRef | Mcu/McuModuleConfiguration/Default/CoreClock | ||
CanControllerBaudrateConfig_0 | + on CanControllerBaudrateConfig under CanController_0 | CanControllerBaudRate | 500 |
| CanControllerPropSeg, CanControllerSeg1, CanControllerSeg2, CanControllerSyncJumpWidth | 0 | ||
CanHardwareObject_0 | + on CanHardwareObject under CanConfigSet | CanHandleType | BASIC |
| CanIdType | STANDARD | ||
| CanObjectId | 0 | ||
| CanObjectType | TRANSMIT | ||
| CanControllerRef | Can/CanConfigSet/CanController_0 | ||
CanHardwareObject_1 | + on CanHardwareObject under CanConfigSet | CanHandleType | BASIC |
| CanIdType | STANDARD | ||
| CanObjectId | 1 | ||
| CanObjectType | RECEIVE | ||
| CanControllerRef | Can/CanConfigSet/CanController_0 |
-
Click
Canin the module list. In the CONFIGURATION tree, click the + on theCanGeneralrow.
Figure 9-3. ①
Can, ②CanGeneral, ③ +. -
Enter the five values of
CanGeneralfrom 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.

Figure 9-4. ①
CanGeneral, ② CanGlobalTimeSupport, ③ CanIndex, ④ CanMainFunctionModePeriod, ⑤ CanMultiplexedTransmission, ⑥ CanTimeoutDuration. -
Click the + on the
CanConfigSetrow. Under it, click the + on theCanControllerrow, and under the newCanController_0, the + on theCanControllerBaudrateConfigrow. The controller picks this baud rate configuration, so it must exist first. -
Click
CanController_0and enter its ten values from the table. CanControllerDefaultBaudrate picks theCanControllerBaudrateConfig_0of step 3.
Figure 9-5. ①
CanController_0, ② CanBusoffProcessing, ③ CanControllerActivation, ④ CanControllerBaseAddress, ⑤ CanControllerId, ⑥ CanRxProcessing, ⑦ CanTxProcessing, ⑧ CanWakeupProcessing, ⑨ CanWakeupSupport, ⑩ CanControllerDefaultBaudrate, ⑪ CanCpuClockRef. -
Click
CanControllerBaudrateConfig_0and enter its five values.
Figure 9-6. ①
CanControllerBaudrateConfig_0, ② CanControllerBaudRate, ③ CanControllerPropSeg, ④ CanControllerSeg1, ⑤ CanControllerSeg2, ⑥ CanControllerSyncJumpWidth. -
Under
CanConfigSet, click the + on theCanHardwareObjectrow.
Figure 9-7. ①
Can, ②CanHardwareObject, ③ +. -
Enter the five values of
CanHardwareObject_0from the table. This is the transmit object.
Figure 9-8. ①
CanHardwareObject_0, ② CanHandleType, ③ CanIdType, ④ CanObjectId, ⑤ CanObjectType, ⑥ CanControllerRef. -
Create the receive object
CanHardwareObject_1the same way from the table. Save withCtrl+S.
CanIf Configuration
| Container | How you add it | Item | Value |
|---|---|---|---|
CanIfPublicCfg | + on CanIfPublicCfg | CanIfGlobalTimeSupport | FALSE |
| CanIfPublicHandleTypeEnum | UINT16 | ||
| CanIfPublicTxConfirmPollingSupport | TRUE | ||
| CanIfPublicTxBuffering | TRUE | ||
CanIfPrivateCfg | + on CanIfPrivateCfg | CanIfPrivateSoftwareFilterType | LINEAR |
CanIfDispatchCfg | + on CanIfDispatchCfg | CanIfDispatchUserCtrlBusOffUL | CAN_SM |
| CanIfDispatchUserCtrlModeIndicationUL | CAN_SM | ||
CanIfInitCfg | + on CanIfInitCfg | CanIfInitCfgSet | CanIf_Config |
CanIfInitHohCfg_0 | + on CanIfInitHohCfg under CanIfInitCfg | Add only | |
CanIfCtrlDrvCfg_0 | + on CanIfCtrlDrvCfg | CanIfCtrlDrvNameRef | Can/CanGeneral |
| CanIfCtrlDrvInitHohConfigRef | CanIf/CanIfInitCfg/CanIfInitHohCfg_0 | ||
CanIfCtrlCfg_0 | + on CanIfCtrlCfg under CanIfCtrlDrvCfg_0 | CanIfCtrlId | 0 |
| CanIfCtrlCanCtrlRef | Can/CanConfigSet/CanController_0 | ||
CanIfHthCfg_0 | + on CanIfHthCfg under CanIfInitHohCfg_0 | CanIfHthCanCtrlIdRef | CanIf/CanIfCtrlDrvCfg_0/CanIfCtrlCfg_0 |
| CanIfHthIdSymRef | Can/CanConfigSet/CanHardwareObject_0 | ||
CanIfHrhCfg_0 | + on CanIfHrhCfg under CanIfInitHohCfg_0 | CanIfHrhSoftwareFilter | TRUE |
| CanIfHrhCanCtrlIdRef | CanIf/CanIfCtrlDrvCfg_0/CanIfCtrlCfg_0 | ||
| CanIfHrhIdSymRef | Can/CanConfigSet/CanHardwareObject_1 | ||
CanIfBufferCfg_0 | + on CanIfBufferCfg under CanIfInitCfg | CanIfBufferSize | 1 |
| CanIfBufferHthRef | CanIf/CanIfInitCfg/CanIfInitHohCfg_0/CanIfHthCfg_0 | ||
CanIfTxPduCfg_0 | + on CanIfTxPduCfg under CanIfInitCfg | CanIfTxPduCanId | 1281 |
| CanIfTxPduId | 0 | ||
| CanIfTxPduType | STATIC | ||
| CanIfTxPduBufferRef | CanIf/CanIfInitCfg/CanIfBufferCfg_0 | ||
| CanIfTxPduRef | EcuC/EcucConfigSet/EcucPduCollection/PduNmTx | ||
CanIfRxPduCfg_0 | + on CanIfRxPduCfg under CanIfInitCfg | CanIfRxPduCanId | 1282 |
| CanIfRxPduDataLength | 8 | ||
| CanIfRxPduId | 0 | ||
| CanIfRxPduHrhIdRef | CanIf/CanIfInitCfg/CanIfInitHohCfg_0/CanIfHrhCfg_0 | ||
| CanIfRxPduRef | EcuC/EcucConfigSet/EcucPduCollection/PduNmRx |
-
Click
CanIfin the module list. AddCanIfPublicCfgwith its + and enter its four values. CanIfPublicTxBuffering must be TRUE: the transmit PDU uses the bufferCanIfBufferCfg_0, and without buffering PRTE stops withCANIF_BUFFERING_GATE_INCONSISTENT.
Figure 9-9. ①
CanIfPublicCfg, ② CanIfGlobalTimeSupport, ③ CanIfPublicHandleTypeEnum, ④ CanIfPublicTxConfirmPollingSupport, ⑤ CanIfPublicTxBuffering. -
Add
CanIfPrivateCfgand pickLINEAR. Then click the + on theCanIfDispatchCfgrow.
Figure 9-10. ①
CanIf, ②CanIfDispatchCfg, ③ +. -
Pick
CAN_SMin both lists.CanSMthen receives the bus-off and mode reports of the controller.
Figure 9-11. ①
CanIfDispatchCfg, ② CanIfDispatchUserCtrlBusOffUL, ③ CanIfDispatchUserCtrlModeIndicationUL. -
Add
CanIfInitCfg, typeCanIf_Configinto CanIfInitCfgSet, and addCanIfInitHohCfg_0under it. -
Add
CanIfCtrlDrvCfg_0and pick its two references from the table. -
Under
CanIfCtrlDrvCfg_0, addCanIfCtrlCfg_0, type0into CanIfCtrlId and pickCan/CanConfigSet/CanController_0in CanIfCtrlCanCtrlRef.
Figure 9-12. ①
CanIfCtrlCfg_0, ② CanIfCtrlId, ③ CanIfCtrlCanCtrlRef. -
Create
CanIfHthCfg_0,CanIfHrhCfg_0andCanIfBufferCfg_0the same way from the table. The transmit handle points toCanHardwareObject_0, the receive handle toCanHardwareObject_1, and the buffer to the transmit handle. -
Under
CanIfInitCfg, click the + on theCanIfTxPduCfgrow.
Figure 9-13. ①
CanIf, ②CanIfTxPduCfg, ③ +. -
Enter the five values of
CanIfTxPduCfg_0from the table.1281is the CAN id0x501. CanIfTxPduRef picks thePduNmTxyou made inEcuC.
Figure 9-14. ①
CanIfTxPduCfg_0, ② CanIfTxPduCanId, ③ CanIfTxPduId, ④ CanIfTxPduType, ⑤ CanIfTxPduBufferRef, ⑥ CanIfTxPduRef. -
Create
CanIfRxPduCfg_0the same way from the table.1282is the CAN id0x502, and CanIfRxPduRef picksPduNmRx. Save withCtrl+S.
ComM Configuration
| Container | How you add it | Item | Value |
|---|---|---|---|
ComMGeneral | + on ComMGeneral | Add only | |
ComMConfigSet | + on ComMConfigSet | Add only | |
ComMChannel_0 | + on ComMChannel under ComMConfigSet | ComMBusType | COMM_BUS_TYPE_CAN |
| ComMChannelId | 0 | ||
| ComMNoWakeUpInhibitionNvmStorage | FALSE | ||
ComMNetworkManagement | + on ComMNetworkManagement under ComMChannel_0 | ComMNmVariant | FULL |
-
Click
ComMin the module list. AddComMGeneralandComMConfigSetwith their +. UnderComMConfigSet, click the + on theComMChannelrow.
Figure 9-15. ①
ComM, ②ComMChannel, ③ +. -
Enter the three values of
ComMChannel_0from the table.
Figure 9-16. ①
ComMChannel_0, ② ComMBusType, ③ ComMChannelId, ④ ComMNoWakeUpInhibitionNvmStorage. -
Under
ComMChannel_0, addComMNetworkManagement. ComMNmVariant must beFULL, because this ECU runsCanNm. The + already writesFULL; check it and leave it. Save withCtrl+S.
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.
| Container | How you add it | Item | Value |
|---|---|---|---|
CanSMGeneral | + on CanSMGeneral | CanSMMainFunctionTimePeriod | 0.01 |
CanSMConfiguration | + on CanSMConfiguration | CanSMModeRequestRepetitionMax | 3 |
| CanSMModeRequestRepetitionTime | 0.02 | ||
CanSMManagerNetwork_0 | + on CanSMManagerNetwork under CanSMConfiguration | CanSMBorCounterL1ToL2 | 2 |
| CanSMBorTimeL1 | 0.1 | ||
| CanSMBorTimeL2 | 0.2 | ||
| CanSMBorTimeTxEnsured | 0.1 | ||
| CanSMBorTxConfirmationPolling | TRUE | ||
| CanSMComMNetworkHandleRef | ComM/ComMConfigSet/ComMChannel_0 | ||
CanSMController_0 | + on CanSMController under CanSMManagerNetwork_0 | CanSMControllerId | CanIf/CanIfCtrlDrvCfg_0/CanIfCtrlCfg_0 |
-
Click
CanSMin the module list. AddCanSMGeneralandCanSMConfigurationwith their + and enter their values from the table. UnderCanSMConfiguration, click the + on theCanSMManagerNetworkrow.
Figure 9-18. ①
CanSM, ②CanSMManagerNetwork, ③ +. -
Enter the six values of
CanSMManagerNetwork_0from the table. CanSMComMNetworkHandleRef picks the channel you made inComM.
Figure 9-19. ①
CanSMManagerNetwork_0, ② CanSMBorCounterL1ToL2, ③ CanSMBorTimeL1, ④ CanSMBorTimeL2, ⑤ CanSMBorTimeTxEnsured, ⑥ CanSMBorTxConfirmationPolling, ⑦ CanSMComMNetworkHandleRef. -
Under
CanSMManagerNetwork_0, addCanSMController_0and pickCanIf/CanIfCtrlDrvCfg_0/CanIfCtrlCfg_0in CanSMControllerId. Save withCtrl+S.
Figure 9-20. ①
CanSMController_0, ② CanSMControllerId.
Nm Configuration
| Container | How you add it | Item | Value |
|---|---|---|---|
NmGlobalConfig | + on NmGlobalConfig | Add only | |
NmGlobalConstants | + on NmGlobalConstants under NmGlobalConfig | NmNumberOfChannels | 1 |
NmGlobalFeatures | + on NmGlobalFeatures under NmGlobalConfig | NmBusSynchronizationEnabled, NmComControlEnabled, NmCoordinatorSyncSupport, NmDynamicPncToChannelMappingSupport, NmPduRxIndicationEnabled, NmRemoteSleepIndEnabled, NmStateChangeIndEnabled, NmUserDataEnabled | FALSE |
NmGlobalProperties | + on NmGlobalProperties under NmGlobalConfig | NmCycletimeMainFunction | 0.01 |
NmChannelConfig_0 | + on NmChannelConfig | NmChannelSleepMaster, NmPassiveModeEnabled, NmStateReportEnabled, NmSynchronizingNetwork | FALSE |
| NmComMChannelRef | ComM/ComMConfigSet/ComMChannel_0 | ||
NmBusType | + on NmBusType under NmChannelConfig_0 | Add only | |
NmStandardBusNmConfig | + on NmStandardBusNmConfig under NmBusType | NmStandardBusType | NM_BUSNM_CANNM |
-
Click
Nmin the module list. AddNmGlobalConfigwith its +. Under it, addNmGlobalConstantsand type1into NmNumberOfChannels. -
Under
NmGlobalConfig, addNmGlobalFeaturesand click FALSE on each of its eight items in the table. None of them has a default value.
Figure 9-21. ①
NmGlobalFeatures, ② NmBusSynchronizationEnabled, ③ NmComControlEnabled, ④ NmCoordinatorSyncSupport, ⑤ NmDynamicPncToChannelMappingSupport, ⑥ NmPduRxIndicationEnabled, ⑦ NmRemoteSleepIndEnabled, ⑧ NmStateChangeIndEnabled, ⑨ NmUserDataEnabled. -
Under
NmGlobalConfig, addNmGlobalPropertiesand type0.01into NmCycletimeMainFunction. Then click the + on theNmChannelConfigrow at the top of the tree.
Figure 9-22. ①
Nm, ②NmChannelConfig, ③ +. -
Click FALSE on the four items of
NmChannelConfig_0and pickComM/ComMConfigSet/ComMChannel_0in NmComMChannelRef.
Figure 9-23. ①
NmChannelConfig_0, ② NmChannelSleepMaster, ③ NmPassiveModeEnabled, ④ NmStateReportEnabled, ⑤ NmSynchronizingNetwork, ⑥ NmComMChannelRef. -
Under
NmChannelConfig_0, addNmBusType, and under itNmStandardBusNmConfig. PickNM_BUSNM_CANNMin NmStandardBusType. Save withCtrl+S.
Figure 9-24. ①
NmStandardBusNmConfig, ② NmStandardBusType.
CanNm Configuration
| Container | How you add it | Item | Value |
|---|---|---|---|
CanNmGlobalConfig | + on CanNmGlobalConfig | CanNmBusLoadReductionEnabled, CanNmBusSynchronizationEnabled, CanNmComControlEnabled, CanNmComUserDataSupport, CanNmCoordinatorSyncSupport, CanNmDynamicPncToChannelMappingSupport, CanNmImmediateRestartEnabled, CanNmImmediateTxconfEnabled, CanNmPassiveModeEnabled, CanNmPduRxIndicationEnabled, CanNmRemoteSleepIndEnabled, CanNmStateChangeIndEnabled, CanNmUserDataEnabled | FALSE |
| CanNmMainFunctionPeriod | 0.01 | ||
CanNmChannelConfig_0 | + on CanNmChannelConfig under CanNmGlobalConfig | CanNmMsgCycleTime | 0.1 |
| CanNmTimeoutTime | 1.0 | ||
| CanNmRepeatMessageTime | 0.4 | ||
| CanNmWaitBusSleepTime | 0.5 | ||
| CanNmRemoteSleepIndTime | 1.0 | ||
| CanNmImmediateNmCycleTime | 0.02 | ||
| CanNmImmediateNmTransmissions | 5 | ||
| CanNmMsgCycleOffset | 0.0 | ||
| CanNmMsgReducedTime | 0.05 | ||
| CanNmNodeId | 1 | ||
| CanNmNodeIdEnabled | TRUE | ||
| CanNmPduCbvPosition | CANNM_PDU_BYTE_0 | ||
| CanNmPduNidPosition | CANNM_PDU_BYTE_1 | ||
| CanNmBusLoadReductionActive, CanNmNodeDetectionEnabled, CanNmRepeatMsgIndEnabled | FALSE | ||
| CanNmCarWakeUpFilterEnabled | No value (clear it) | ||
| CanNmComMNetworkHandleRef | ComM/ComMConfigSet/ComMChannel_0 | ||
CanNmRxPdu_0 | + on CanNmRxPdu under CanNmChannelConfig_0 | CanNmRxPduId | 0 |
| CanNmRxPduRef | EcuC/EcucConfigSet/EcucPduCollection/PduNmRx | ||
CanNmTxPdu | + on CanNmTxPdu under CanNmChannelConfig_0 | CanNmTxConfirmationPduId | 0 |
| CanNmTxPduRef | EcuC/EcucConfigSet/EcucPduCollection/PduNmTx |
-
Click
CanNmin the module list. AddCanNmGlobalConfigwith its +. Click FALSE on its thirteen items in the table, which have no default value, and type0.01into CanNmMainFunctionPeriod.
Figure 9-25. ①
CanNmGlobalConfig, ② CanNmBusLoadReductionEnabled, ③ CanNmBusSynchronizationEnabled, ④ CanNmComControlEnabled, ⑤ CanNmComUserDataSupport, ⑥ CanNmCoordinatorSyncSupport, ⑦ CanNmDynamicPncToChannelMappingSupport, ⑧ CanNmImmediateRestartEnabled, ⑨ CanNmImmediateTxconfEnabled, ⑩ CanNmPassiveModeEnabled, ⑪ CanNmPduRxIndicationEnabled, ⑫ CanNmRemoteSleepIndEnabled, ⑬ CanNmStateChangeIndEnabled, ⑭ CanNmUserDataEnabled, ⑮ CanNmMainFunctionPeriod. -
Under
CanNmGlobalConfig, click the + on theCanNmChannelConfigrow.
Figure 9-26. ①
CanNm, ②CanNmChannelConfig, ③ +. -
Enter the values of
CanNmChannelConfig_0from 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 ofComMin CanNmComMNetworkHandleRef. -
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.
Figure 9-27. ①
CanNmChannelConfig_0, ② CanNmMsgCycleTime, ③ CanNmImmediateNmCycleTime, ④ CanNmImmediateNmTransmissions, ⑤ CanNmMsgCycleOffset, ⑥ CanNmMsgReducedTime, ⑦ CanNmNodeDetectionEnabled, ⑧ CanNmCarWakeUpFilterEnabled with neither button selected. -
Under
CanNmChannelConfig_0, addCanNmRxPdu_0, type0into CanNmRxPduId and pickPduNmRxin CanNmRxPduRef.
Figure 9-28. ①
CanNmRxPdu_0, ② CanNmRxPduId, ③ CanNmRxPduRef. -
Create
CanNmTxPduthe same way from the table, withPduNmTxin CanNmTxPduRef. Save withCtrl+S.
LSduR Configuration
The values of LSduR, PduR and Com are in this table.
| Module | Container | How you add it | Item | Value |
|---|---|---|---|---|
LSduR | LSduRGeneral | + on LSduRGeneral | LSduRMetaDataSupport | FALSE |
| LSduRZeroCostOperation | FALSE | |||
LSduR | LSduRConfig | + on LSduRConfig | Add only | |
LSduR | LSduRBswModules_0 | + on LSduRBswModules | LSduRRxIndication | TRUE |
| LSduRTransmit | TRUE | |||
| LSduRTxConfirmation | TRUE | |||
| LSduRProvideTxBuffer | FALSE | |||
| LSduRReleaseRxBuffer | FALSE | |||
| LSduRLowerModule | TRUE | |||
| LSduRUpperModule | FALSE | |||
| LSduRBswModuleRef | ECU/CanIf (picked) | |||
LSduR | LSduRBswModules_1 | + on LSduRBswModules | LSduRRxIndication | TRUE |
| LSduRTransmit | TRUE | |||
| LSduRTxConfirmation | TRUE | |||
| LSduRProvideTxBuffer | FALSE | |||
| LSduRReleaseRxBuffer | FALSE | |||
| LSduRLowerModule | FALSE | |||
| LSduRUpperModule | TRUE | |||
| LSduRBswModuleRef | ECU/CanNm (picked) | |||
LSduR | LSduRConfig/LSduRPath_0 | + on LSduRPath | Add only | |
LSduR | LSduRPath_0/LSduRPathSourcePdu | + on LSduRPathSourcePdu | LSduRPathSourcePduId | 0 |
| LSduRPathSourcePduRef | EcuC/EcucConfigSet/EcucPduCollection/PduNmRx | |||
LSduR | LSduRPath_0/LSduRPathDestinationPdu_0 | + on LSduRPathDestinationPdu | LSduRPathDestinationPduRef | EcuC/EcucConfigSet/EcucPduCollection/PduNmRx |
LSduR | LSduRConfig/LSduRPath_1 | + on LSduRPath | Add only | |
LSduR | LSduRPath_1/LSduRPathSourcePdu | + on LSduRPathSourcePdu | LSduRPathSourcePduId | 1 |
| LSduRPathSourcePduRef | EcuC/EcucConfigSet/EcucPduCollection/PduNmTx | |||
LSduR | LSduRPath_1/LSduRPathDestinationPdu_0 | + on LSduRPathDestinationPdu | LSduRPathDestinationPduRef | EcuC/EcucConfigSet/EcucPduCollection/PduNmTx |
PduR | PduRGeneral | + on PduRGeneral | PduRZeroCostOperation | FALSE |
PduR | PduRRoutingPaths | + on PduRRoutingPaths | PduRConfigurationId | 0 |
Com | ComGeneral | + on ComGeneral | ComSupportedIPduGroups | 0 |
Com | ComConfig | + on ComConfig | Add only | |
Com | ComConfig/ComMainFunctionRx | + on ComMainFunctionRx | ComMainRxTimeBase | 0.01 (filled in) |
Com | ComConfig/ComMainFunctionTx | + on ComMainFunctionTx | ComMainTxTimeBase | 0.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.
-
Click
LSduRin the module list. In the CONFIGURATION tree, click the + on theLSduRGeneralrow.
Figure 9-29. ①
LSduR, ②LSduRGeneral, ③ +. -
Click the + on the
LSduRConfigrow. -
Click
LSduRGeneral. Click FALSE of LSduRMetaDataSupport and of LSduRZeroCostOperation.
Figure 9-30. ①
LSduRGeneral, ② LSduRMetaDataSupport, ③ LSduRZeroCostOperation. -
Click the + on the
LSduRBswModulesrow. The editor addsLSduRBswModules_0and selects it.
Figure 9-31. ①
LSduR, ②LSduRBswModules, ③ +. -
In
LSduRBswModules_0, click TRUE of LSduRRxIndication, LSduRTransmit and LSduRTxConfirmation, FALSE of LSduRProvideTxBuffer and LSduRReleaseRxBuffer, TRUE of LSduRLowerModule and FALSE of LSduRUpperModule. -
Open the LSduRBswModuleRef dropdown and pick
ECU/CanIf. Pick it from the list: a typedCanIfdoes not resolve, and PRTE stops withLSDUR_PATH_SOURCE_UNRESOLVED.
Figure 9-32. ①
LSduRBswModules_0, ② LSduRRxIndication, ③ LSduRTransmit, ④ LSduRTxConfirmation, ⑤ LSduRProvideTxBuffer, ⑥ LSduRReleaseRxBuffer, ⑦ LSduRLowerModule, ⑧ LSduRUpperModule, ⑨ LSduRBswModuleRef. -
Click the + on the
LSduRBswModulesrow again. InLSduRBswModules_1, set the same values except FALSE of LSduRLowerModule and TRUE of LSduRUpperModule, and pickECU/CanNmin LSduRBswModuleRef.
Figure 9-33. ①
LSduRBswModules_1, ② LSduRRxIndication, ③ LSduRTransmit, ④ LSduRTxConfirmation, ⑤ LSduRProvideTxBuffer, ⑥ LSduRReleaseRxBuffer, ⑦ LSduRLowerModule, ⑧ LSduRUpperModule, ⑨ LSduRBswModuleRef. -
Under
LSduRConfig, click the + on theLSduRPathrow. The editor addsLSduRPath_0. -
Under
LSduRPath_0, click the + on theLSduRPathSourcePdurow. Type0into LSduRPathSourcePduId and press theTabkey. In LSduRPathSourcePduRef, pickEcuC/EcucConfigSet/EcucPduCollection/PduNmRx.
Figure 9-34. ①
LSduRPathSourcePdu, ② LSduRPathSourcePduId, ③ LSduRPathSourcePduRef. -
Under
LSduRPath_0, click the + on theLSduRPathDestinationPdurow. In LSduRPathDestinationPduRef ofLSduRPathDestinationPdu_0, pickEcuC/EcucConfigSet/EcucPduCollection/PduNmRx. -
Create
LSduRPath_1the same way from the table, with1andPduNmTx. Save withCtrl+S.
PduR Configuration
-
Click
PduRin the module list. Click the + on thePduRGeneralrow.
Figure 9-35. ①
PduR, ②PduRGeneral, ③ +. -
Click the + on the
PduRRoutingPathsrow. -
Click
PduRGeneraland click FALSE of PduRZeroCostOperation.
Figure 9-36. ①
PduRGeneral, ② PduRZeroCostOperation. -
Click
PduRRoutingPaths, type0into PduRConfigurationId and press theTabkey. Save withCtrl+S.
Figure 9-37. ①
PduRRoutingPaths, ② PduRConfigurationId.
Com Configuration
-
Click
Comin the module list. Click the + on theComGeneralrow.
Figure 9-38. ①
Com, ②ComGeneral, ③ +. -
Click the + on the
ComConfigrow. -
Click
ComGeneral, type0into ComSupportedIPduGroups and press theTabkey.
Figure 9-39. ①
ComGeneral, ② ComSupportedIPduGroups. -
Under
ComConfig, click the + on theComMainFunctionRxrow.
Figure 9-40. ①
Com, ②ComMainFunctionRx, ③ +. -
Check that ComMainRxTimeBase is
0.01. Keep the nameComMainFunctionRx: the Rte mapping of chapter 8 names it.
Figure 9-41. ①
ComMainFunctionRx, ② ComMainRxTimeBase. -
Click the + on the
ComMainFunctionTxrow the same way and check that ComMainTxTimeBase is0.01. Save withCtrl+S.
Why Is It Designed This Way?
- PDUs live in EcuC. One PDU is used by several modules, so it is defined once in
EcuCand every module refers to it.EcuCtherefore comes beforeCanIf. - One object per direction.
CanHardwareObject_0transmits andCanHardwareObject_1receives;CanIfreaches them throughCanIfHthCfg_0andCanIfHrhCfg_0. - CAN ids in CanIf. The CAN ids
0x501and0x502of the two PDUs are typed only inCanIf. - Bus-off reports go to CanSM.
CAN_SMinCanIfDispatchCfgprepares forCanSM, which handles the controller. - ComM first.
CanSM,NmandCanNmall pickComMChannel_0, so the channel must exist before them. - Two NM modules.
Nmis the layer above the bus;NM_BUSNM_CANNMhands its channel toCanNm, which carries the NM PDUs. - Bus-off values by hand. Nothing copies the cluster values into
CanSMin this tutorial, so you type the same numbers yourself. - NM only in the ECU configuration. The System tutorial keeps NM off on
CanClusterand has no NM frame, so the NM PDUs and their CAN ids0x501/0x502exist only inEcuCandCanIf. 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 inLSduRandPduRroutes nothing. - One
LSduRBswModulesper neighbour.CanIfis the lower module andCanNmthe upper one.LSduRfinds each through LSduRBswModuleRef, which must be picked from the dropdown. - One path per NM PDU.
LSduRPath_0carriesPduNmRxandLSduRPath_1carriesPduNmTx. The source and the destination name the sameEcuCPDU, the oneCanIfandCanNmalso refer to. - Two main functions for Com.
ComMainFunctionRxandComMainFunctionTxeach giveComone main function, which the Rte mappings of chapter 8 call. Without them PRTE stops withRTE_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
-
EcuCholdsPduNmTxandPduNmRxwith PduLength8, andCore0. -
CanholdsCanGeneral,CanController_0withCanControllerBaudrateConfig_0, and the two hardware objects. - CanIfPublicTxBuffering is TRUE.
-
CanIfTxPduCfg_0points toPduNmTxwith1281, andCanIfRxPduCfg_0toPduNmRxwith1282. - ComMNmVariant of
ComMNetworkManagementisFULL. -
CanSMManagerNetwork_0holds2,0.1,0.2,0.1and points toComMChannel_0. - Every TRUE/FALSE item of
NmGlobalFeatures,NmChannelConfig_0,CanNmGlobalConfigandCanNmChannelConfig_0in the tables has a value, except CanNmCarWakeUpFilterEnabled. - CanNmCarWakeUpFilterEnabled has no value.
-
CanNmRxPdu_0points toPduNmRxandCanNmTxPdutoPduNmTx. -
LSduRholdsLSduRGeneral,LSduRConfig,LSduRBswModules_0(ECU/CanIf) andLSduRBswModules_1(ECU/CanNm). -
LSduRPath_0namesPduNmRxandLSduRPath_1namesPduNmTx, each in its source and its destination. -
PduRholdsPduRGeneralandPduRRoutingPaths. -
ComholdsComGeneralandComConfigwithComMainFunctionRxandComMainFunctionTx. - The tab
VehicleDesign:Configurationcarries no modified mark.
Next Step
In Validation and Code Generation you validate the design and generate the code of the ECU.