EasyManua.ls Logo

ST STM32F2 Series - Arm Cortex -M3 CPU; Table 5. CPU_SM_0; Table 6. CPU_SM_1

ST STM32F2 Series
108 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
3.6.1
Arm
®
Cortex
®
-M3 CPU
Table 5. CPU_SM_0
SM CODE CPU_SM_0
Description
Periodical core self-test software for Arm
®
Cortex
®
-M3 CPU
Ownership End user or ST
Detailed implementation
The software test is built around well-known techniques already addressed by IEC 61508:7, A.3.2
(Self-test by software: walking bit one-channel). To reach the required values of coverage, the self-test
software is specified by means of a detailed analysis of all the CPU failure modes and related failure
modes distribution
Error reporting Depending on implementation
Fault detection time Depending on implementation
Addressed fault model Permanent
Dependency on MCU configuration None
Initialization None
Periodicity Periodic
Test for the diagnostic
Self-diagnostic capabilities can be embedded in the software, according the test implementation design
strategy chosen. The adoption of checksum protection on results variables and defensive programming
are recommended
Multiple faults protection CPU_SM_5 : external watchdog
Recommendations and known
limitations
This method is the main asset in STM32F2 Series safety concept. CPU integrity is a key factor, given
that the major part of defined diagnostics for MCU peripherals are software-based
Table 6. CPU_SM_1
SM CODE CPU_SM_1
Description Control flow monitoring in application software
Ownership End user
Detailed implementation
A significant part of the failure distribution of CPU core for permanent faults is related to failure modes
directly related to program counter loss of control or hang-up. Due to their intrinsic nature, such failure
modes are not addressed by a standard software test method like SM_CPU_0. Therefore it is necessary to
implement a run-time control of the application software flow, in order to monitor and detect deviation from
the expected behavior due to such faults. Linking this mechanism to watchdog firing assures that severe
loss of control (or, in the worst case, a program counter hang-up) is detected.
The guidelines for the implementation of the method are the following:
• The different internal states of the application software is well documented and described (the use of
a dynamic state transition graph is encouraged).
• The monitoring of the correctness of each transition between different states of the application
software is implemented.
• The transition through all expected states during the normal application software program loop is
checked.
• The function in charge of triggering the system watchdog is implemented in order to constrain the
triggering (preventing the issue of CPU reset by watchdog) also to the correct execution of the above-
described method for program flow monitoring.
• The use of the window feature of the independent watchdog (IWDG) (or an external one) helps to
implement a more robust control flow mechanism fed by a different clock source.
in any case safety metrics do not depend on the kind of watchdog in use (the adoption of independent or
external watchdog contributes to the mitigation of dependent failures, see Section 4.2.2 Clock)
Error reporting Depends on implementation
UM1845
Description of hardware and software diagnostics
UM1845 - Rev 4
page 13/108

Table of Contents