6.8. System¶
The (sys
module) takes care of all system related tasks. Periodic system checks
can be implemented here. In the default configuration, it starts other
important statemachines (e.g., ILCK
, CONT
, BMS
)
6.8.1. Module Files¶
- Driver:
embedded-software\mcu-primary\src\engine\sys\sys.c
(sys.c (primary))embedded-software\mcu-primary\src\engine\sys\sys.h
(sys.h (primary))embedded-software\mcu-secondary\src\engine\sys\sys.c
(sys.c (secondary))embedded-software\mcu-secondary\src\engine\sys\sys.h
(sys.h (secondary))
- Driver Configuration:
embedded-software\mcu-primary\src\engine\config\sys_cfg.c
(sys_cfg.c (primary))embedded-software\mcu-primary\src\engine\config\sys_cfg.h
(sys_cfg.h (primary))embedded-software\mcu-secondary\src\engine\config\sys_cfg.c
(sys_cfg.c (secondary))embedded-software\mcu-secondary\src\engine\config\sys_cfg.h
(sys_cfg.h (secondary))
6.8.2. Structure¶
Fig. 6.13 shows the statemachine implementing the sys
module.

Fig. 6.13 System Control state machine
First, the following statemachines are initialized with state requests:
ILCK
CONT
BAL
The state of these modules is checked to ensure that the initialization was
successful. A timeout mechanism is used: the SYS
statemachine goes into an
error state goes in case one of the initializations goes wrong.
The next step is to wait until a complete measurement cycle of the cell voltages and temperatures has taken place before enabling the periodic sending of values per CAN, to avoid the transmission of invalid data at startup.
The presence of a current sensor is then checked.
The last step is the initialization of BMS
state machine with a state
request.
- After all these steps, the system is fully running. If necessary, additional
- periodic system checks can be implemented in the
SYS
state machine.