Contents
Overview
In this article it is possible to find a reference to configure an interaction between Dcm, BswM and application SWC. The same workflow can be used to configure different diagnostic notifications to SWC (e.g. diagnostic session, reprogramming requests, etc...).
The use case that is covered in this article is the following:
"Notification to SWC that a SOFT, KEYONOFF, or HARD ECU Reset (0x11) has been requested by the tester"
In this article the following assumption is made:
- ECU Reset service has been correctly configured in Dcm
To achieve the desired result it is needed to:
- Create a Mode User port in SWC to receive BswM notification of active ECU Reset request
- Configure the BswM in order to monitor the ECU Reset status, forwarding the relevant information to SWC
SWC configuration
Firstly, a Mode Declaration group must be created. To satisfy the requirements, it is sufficient to have two mode declarations:
- SUM_RESREQ_ACTIVE: A SOFT, KEYONOFF or HARD EcuReset has been requested
- SUM_RESREQ_INACTIVE: A SOFT, KEYONOFF or HARD EcuReset has not been requested
The initial mode, thus, is set to SUM_RESREQ_INACTIVE.
It is now possible to create a mode interface that references to this mode group
And the relative port that should be connected to BswM
It is also needed to create the data mapping for this mode group, and refer to this data mapping in the Internal Behavior of the SWC
BswM configuration
Dcm module manages multiple mode groups. Among these, it is possible to find the AUTOSAR standard mode group "DcmEcuReset". BswM can request the status of this mode group to monitor the status of ECU Reset requests.
A BswMModeRequestPort must be created to monitor the status of this mode group
BswM must be able to notify the SWC when a SOFT, KEYONOFF or HARD EcuReset has been requested, thus the following BswMModeConditions are created
HARD
KEYONOFF
SOFT
At this point of time it is possible to create a logical expression that computes the OR between these conditions (BswMLogicalExpression)
When this logical expression is satisfied, BswM must notify the SWC, switching the SWC mode group. For this purpose it is created a BswMSwitchPort
And also the BswMAction, with the corresponding BswMActionList that is used to switch the mode of this switch port to SUM_RESREQ_ACTIVE when the logical expression is satisfied
At this point it is possible to create the BswMRule that triggers that action list, when the logical expression is satisfied
It is also important to configure the BswMDataTypeMappingSets of the two mode groups in BswM
Port connections
After the BswM configuration, it is possible to generate the BSW.
The following connections must be done after the generation:
- Dcm to BswM: notification of ECU Reset status
- BswM to SWC: notification of active SOFT, HARD or KEYONOFF Ecu Reset