3.1.2.1 DIAG_CPU_Registers()
diag_result_t DIAG_CPU_Registers (void )
Validates the CPU Registers for stuck bits and coupling Faults.
The registers are tested in the following order:
-
WREG
-
WREG_SHAD
-
BSR_SHAD
-
FSR0L_SHAD
-
FSR0H_SHAD
-
FSR1L_SHAD
-
FSR1H_SHAD
-
BSR
-
FSR
This test checks the integrity of the registers by testing for stuck-at Faults, insuring that the register bits are not stuck at a certain value. The test works in a sequential order by doing a write, read and check of the 0x55 and 0xAA values into the CPU registers. The register is saved into RAM before the test is performed and restored after the test is done.
Parameters: None. Returns: DIAG_PASS - CPU register test did not detect a Fault.
DIAG_FAIL - CPU register detected a Fault.
