STM8 RunTime Core Validation Library
STM8 RunTime Core Validation Library (RCVL) is a Software Test Library that provides diagnostic coverage for the STM8 Core.
Linking the RCVL with your application and calling it periodically helps you guarantee that the microcontroller is operating as designed at all times.
RCVL is especially suitable for the STM8 since it has few dedicated hardware safety mechanism and, in conjunction with your own safety software and/or other Software Test Libraries dedicated to other purposes (including some libraries from ST that focus more on the memories and other parts of the chip) can help you meet common embedded safety standards like IEC 60335 Class B or ISO 26262.
STM8 RunTime Core Validation Library comes in two possible forms: a Generic Form that test all of the core components (registers and flags) for the most common combinations of STM8 instructions and addressing modes and a Custom Form that tests exactly the instructions used in the critical part of your application.
Test the STM8 core
STM8 RunTime Core Validation Library is the only library that test the STM8 core in detail: for every instruction all registers and flags are tested, both in positive (what should be set/reset is) and negative (what should be left untouched is) way.
The RunTime Core Validation Library can be called at specific points in your application (for example at startup or before entering a critical section) to check the whole instruction set or just some sub-sections of it.
The RunTime Core Validation Library can be called periodically (for example in the main loop or in a timer interrupt): in this mode a new instruction is checked at each iteration, in a cyclic way.
The RunTime Core Validation Library can be customized to test only and exactly the code that is used in your application (or in the critical part of it). A utility program (still under development) analyse your application and automatically produce a Custom version of the library that is a perfect fit for your own application.
The RunTime Core Validation Library uses only 6 bytes in memory and 12 bytes on the stack. The code size is around 4kb for a typical application (customized library for the critical section of an automotive application).
Every check of the RunTime Core Validation Library takes from 100 to 130 cycles, and can be interrupted. The Security Library can also be called from within an interrupt.