English
Language : 

AN3181 Datasheet, PDF (24/31 Pages) STMicroelectronics – Guidelines for obtaining IEC 60335 Class B certification in an STM8 application
Class B solution structure
AN3181
Figure 12. Periodic run mode self test and time base interrupt service structure
&ROMMAIN
4"&LAG 4RUE
&ALSE
4"&LAG&ALSE
0ARTIAL#05CORETEST
&AIL
3TACKBOUNDARIESTEST
&AIL
.OT
IMPLEMENTED
#LOCKTEST
&AIL
!$-58TEST
&AIL
#OMMPERIPHERALSTEST
&AIL
)NTERRUPTRATETEST
&AIL
0ARTIAL&LASHTEST
&AIL
#ONTROLFLOWCHECK
&AIL
)7$'AND77$'REFRESH
4IME"ASE)32
4ICK
4ICK4IME 9E S
"ASE
.O
4ICK
4"&LAG4RUE
0ARTIAL
&AIL
2!-TEST
2ETURN
2ESUMEMAIN
&AIL3AFE ROUTINE
!)
4.4.2
CPU light run mode self test
CPU core run mode self test is a simplified startup test where the flags and stack pointer are
not tested. In case of error, FailSafe() routine is called.
Figure 13. CPU light run mode self test structure
4.4.3
4EST ! 8 9
6ERIFYRAMPPATTERN! 8 9
4E ST/+
&AIL
&AIL
&AIL3AFE ROUTINE
!)
Stack boundaries run mode test
The magic pattern stored at the top of the stack is checked here. In case the original pattern
is corrupted, FailSafe() routine is called. The pattern is placed at the lowest address
dedicated for stack area.Overflow and underflow are detected as the stack pointer rolls over
24/31
Doc ID 17286 Rev 2