Technical Reference Basic Software Mode Manager
© 2019 Vector Informatik GmbH Version 10.00.00 15
based on template version 4.11.3
3.2 Initialization
The BswM is initialized via the service functions BswM_PreInit and BswM_Init (refer
to chapter 5.2.2). On platforms in which the Random Access Memory (RAM) is not initialized
to zero by the start-up code the function BswM_InitMemory has to be called first and then
a call to BswM_PreInit and BswM_Init can be realized. All available modes are set
to the configured initialization state, which can either be undefined or set to a specific value.
If the initialization state is undefined the mode is not arbitrated until the mode
request/indication function occurs for the first time.
Note
In case of Multi Partition, each instance of the BswM must be initialized. The
BswM_PreInit function should only be called once.
3.3 States
The state machine diagram in Figure 3-1 shows the general handling of the BswM. Each
state is described as follows:
> BSWM_INIT
The BswM is initialized and ready for immediate mode arbitration requests. Deferred mode
arbitration is done within the cyclically called function BswM_MainFunction.
> BSWM_WAIT_IMMEDIATE_REQUEST
In this state the BswM waits for a mode arbitration request. The state is left if immediate
mode arbitration is requested or when BswM_MainFunction is called.
> BSWM_MAIN_FUNCTION
This state is entered when the BswM_MainFunction is called. Within
BswM_MainFunction the deferred mode arbitration is done. Immediate mode arbitration
requests which occur during the execution of BswM_MainFunction are queued and will be
executed at the end of BswM_MainFunction, when all deferred mode arbitration and
control is finished. Mode arbitration requests of type “forced immediate” are not queued and
interrupt the deferred mode arbitration.
> BSWM_MODE_ARBITRATION_AND_CONTROL
In this state the configured mode rule arbitration is done and the true-/false-action lists are
executed. New mode arbitration requests of type “immediate” are queued, arbitration
requests of type “forced immediate” are arbitrated immediately.