CLASSIC
Modul: modemanagementguide
Rolle: heuristic
Konfidenz: 85%
SNIP_CLASSIC_MODEMANAGEMENTGUIDE_SECTION_3_3_2_Startup
Wortlaut
3.3.2 Startup
The
ECUM
starts
the
operating
system
and
afterwards
its
post
OS
sequence
starts the Schedule Manager (SchM_Start()),
initializes the BswM
(BswM_Init()) and afterwards finishes the initilization of the SchM (SchM_Init()
and SchM_StartTiming()). The BswM after its initialization has to take care, that
all necessary init routines of the basic software modules are called and that the RTE is
started (First Rte_Start(), then Rte_Init() and at last Rte_StartTiming()).
In this scenario it is expected that the BswM has the following providedModeGroup.
The purpose of this modeGroup is to track the current state/mode of the ECU similar
to the states of the ECU State manager in previous AUTOSAR releases.
Rule InitBlockII specifies the initialization of basic drivers to access the NVRAM
and initiates NvM_ReadAll. As the EcuMode source has the processing attribute set
to DEFERRED this rule will be evaluated every time the main function of the BswM is
called. After the first run it sets the EcuMode to ECU_STARTUP_TWO so that the action
list will never be invoked again.
If the NvMReadAll job is finsihed the NvMReadAllFinished rule is triggered, which
initiates the remaining initialization and switches the EcuMode to ECU_RUN.
Listing 3.10: Rules and ActionLists for Startup
rule InitBlockII initially false {
if ( EcuMode == MDG_EcuMode.ECU_STARTUP_ONE ) {
actionlist InitBlockIIActions
}
}
actions InitBlockIIActions on condition {
custom "Spi_Init(null)"
custom "Eep_Init(null)"
custom "Fls_Init(null)"
custom "NvM_Init(null)"
SchMSwitch EcuMode : ECU_STARTUP_TWO
custom "NvM_ReadAll()"
}
rule NvMReadAllFinished initially false {
if ( NvMReadAllJobMode == NVM_REQ_OK && EcuMode == MDG_EcuMode.
ECU_STARTUP_TWO) {
actionlist NvMReadAllFinishedActions
}
}
actions NvMReadAllFinishedActions on condition {
custom "Can_Init(null)"
custom "CanIf_Init(null)"
custom "CanSM_Init(null)"
custom "CanTp_Init(null)"
custom "Lin_Init(null)"
custom "LinIf_Init(null)"
Guide to Mode Management
custom "LinSM_Init(null)"
custom "LinTp_Init(null)"
custom "Fr_Init(null)"
custom "FrIf_Init(null)"
custom "FrSM_Init(null)"
custom "FrTp_Init(null)"
custom "PduR_Init(null)"
custom "CANNM_Init(null)"
custom "FrNM_Init(null)"
custom "NmIf_Init(null)"
custom "IpduM_Init(null)"
custom "COM_Init(null)"
custom "DCM_Init(null)"
custom "ComM_Init(null)"
custom "DEM_Init(null)"
custom "StartRte()"
SchMSwitch EcuMode : ECU_RUN
}
In order to ensure that the RTE is properly initialized before runnables in service modules call RTE API functions, those runnables can be disabled by a mode disabling dependency deactivating the runnable in all modes except EcuM mode RUN. For server
runnables - which cannot be disabled - the Rte will ignore incoming client server requests as long as it is not initialized.
When the RTE is started the runnables will be started. Now it is up to the application to keep the ECU running. To achieve this the BswM can for example provide a
ModeRequestPort as depicted in example 3.4. For the further reading is is expected,
that the application software requests the mode APP1_ACTIVE from the BswM. If this
mode is requested the BswM shall not shutdown the ECU.
Listing 3.11: Application runs, enable communication
rule checkApp1Request initially false {
if ( App1ModeRequest == MDG_ApplicationModes.ModeA && EcuMode ==
MDG_EcuMode.ECU_RUN) {
actionlist checkApp1RequestTrueActions
}
}
actions checkApp1RequestTrueActions on condition {
ComMAllowCom MyComM.CanNet1 true
SchMSwitch EcuMode : ECU_RUN
}
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
Specifies SchM_StartTiming API called during startup.
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | ModeManagementGuide.pdf |
|---|---|
| Dokumentseite | Seite 36 |
| Ziel-Modul | modemanagementguide (classic) |
| Ziel-Anforderung | SWS_Rte_91172 |
| Semantische Rolle | heuristic |
| Automatisierungs-Konfidenz | 0.85 |