1 Introduction
Test Name: CPU Register Test
Purpose of test: Integrity check of all CPU Control registers by diagnosing the stuck bits in the CPU registers. Description: CPU registers are tested for stuck bits and neighboring Coupling Faults (CF). This diagnostic writes a checkerboard pattern and inverse checkerboard pattern to the testable bits in the CPU registers (R0-R31), Status Register (SREG) and the Stack Pointer (SP). If an error is detected, the registers are restored before the test result is returned.The diagnostic is built up in the following order:
-
The global interrupts status is backed up and disabled.
-
The CPU register context is pushed to the stack.
-
The Zero Flag of the SREG is tested to ensure that branching is working correctly.
-
The R16 CPU register is tested as it is used for the rest of the test.
-
The remaining CPU registers are tested (R0 to R15 and R17 to R31).
-
The SREG is tested, except for the Global Interrupt Enabled bit.
-
The SP is backed up, tested and restored.
-
The CPU register context is restored from the stack.
-
Global interrupts status is restored.
-
The test result is returned.
API Documentation:
CPU Registers