
UM1915 Rev 3
17/43
UM1915
STM8AF safety architecture
42
called functions. This method is relevant in case the combination between the final
application software structure and the compiler settings requires a significant use of the
stack for passing function parameters.
The guidelines for the implementation of the method are the following:
•
Pass also the redundant copy of the passed parameters values (possibly inverted)
and execute a coherence check in the function.
•
Pass also the redundant copy of the passed pointers and execute a coherence
check in the function.
•
For parameters that are not protected by redundancy, implement defensive
programming techniques such as the plausibility check of the passed values (for
example to check the consistency of enumerated fields).
Information redundancy for safety-related variables in application software -
RAM_SM_2
To address transient faults affecting RAM controller and RAM cells, it is required to
implement information redundancy of the safety-related system variables stored in the
RAM.
The guidelines for the implementation of this method are the following:
•
The system variables that are safety-related (in the sense that a wrong value read
in the RAM affects the safety functions) are well-identified and documented.
•
The arithmetic computation and/or decision based on such variables are/is executed
twice and the two final results are compared.
•
Non-numeric variables uses enumerated-type constant values for coding, avoiding
trivial patterns (all 0x00 or all 0xFF); application software checks for consistence the
value assumed by the variables, when used
•
Numeric variables are grouped and protected by means of a checksum (for
instance, computed by XOR), updated each variable overwriting and checked at least
once per FTTI.
Note that the implementation of this safety method shows a partial overlap with an already
planned method for STM8AFcore (
CPU_SM_1
); optimizations in implementing both
methods are therefore possible (see the description of the
CPU_SM_1
).
3.6.5 Boot
ROM
Control flow monitoring in application software - ROM_SM_0
The boot loader starts executing after reset. Permanent and transient faults affecting the
boot ROM can leads to wrong execution of the application software at the end of the boot
procedure. Such alteration is detected by a strong control flow mechanism linked to a
system watchdog. For more detailed implementation guidelines o f this technique refer to
safety mechanism
CPU_SM_1
.
Note:
The implementation of the
CPU_SM_1
automatically involves the ROM_SM_0
implementation.