Software Requirement Reference ID : SW_CPU_SELF_TEST_LIB_01.
This diagnostic API executes CPU self-test subsets.
This periodic self-test algorithm is used to verify the functional correctness of all CPU instructions, blocks and features. The self-test algorithm is designed to provide test coverage of overall CPU functionality, which includes: (a) all available instruction opcodes, (b) all addressing modes, (c) all CPU-registers, (d) all bits of every address and data bus structure (in both '0' and '1' bit states), (e) the logical functionality of all control and status bits in CPU registers, and (f) all blocks of the Arithmetic and Logic Unit. The overall test suite is subdivided into three Test Subset functions (each representing a different subset of CPU functionality), which are executed in a cyclic manner. For example, a different Test Subset function may be called by the application every 2 ms, thereby completing the entire test suite every 6 ms; since each Test Subset generates a unique 16-bit data result, three such test results are generated during the 6 ms window.Each Test Subset function performs a series of tests, incrementally generating a unique 16-bit result at the end of the function execution.
This self-test API works in two modes indicated by diag_cpu_execution_mode_t Enum. With DIAG_CPU_SELF_TEST_ALL, all the Test Subset functions may be executed during a single API call. And with DIAG_CPU_SELF_TEST_SUBSET_1, DIAG_CPU_SELF_TEST_SUBSET_2 and DIAG_CPU_SELF_TEST_SUBSET_3, only a single Test subset function is executed during a single API call.
This API also updates the DIAG_CPU_SelfTestErrorMask variable which contains the error status of all subsets together.
uint8_t DIAG_CPU_SelfTest(
diag_cpu_execution_mode_t executionMode
)
[in] executionMode |
diag_cpu_execution_mode_t Enum
- indicates the operating mode in which the DIAG_CPU_SelfTest diagnostic API function will be executed |
uint8_t | 8-bit Error Mask <- - - - - S3 S2 S1>. Test bit = 1: Subset execution is successful; Test bit = 0: Subset execution is failed. |