![]() |
AVR SD Safety Framework 1.0.0
|
Contains API prototype for the CPU Manager Diagnostic. More...
Files | |
| file | midware_cpu_manager_diag.c |
| Implements API for the CPU Manager Diagnostic. | |
| file | midware_cpu_manager_diag.h |
| Contains API prototype for the CPU Manager Diagnostic. | |
Functions | |
| errFlag_t | MW_DiagCpuLockstep (void) |
| Performs error injection diagnostic to detect faults in the CPU lockstep mechanism. | |
Contains API prototype for the CPU Manager Diagnostic.
The CPU Manager provides services to Tasks to ensure correct interaction with diagnostic features of the dual core lockstep CPU. Note that most of the other CPU register interface functionality is provided in other middleware managers, such as setting the Stack Pointer Limit (SPLIM) in the Memory Manager, global interrupt enable/disable in the Interrupt Manager and Configuration Change Protected (CCP) register unlocking in a separate utility (since it is needed by all safety related Drivers).
| errFlag_t MW_DiagCpuLockstep | ( | void | ) |
Performs error injection diagnostic to detect faults in the CPU lockstep mechanism.
This function injects a CPU lockstep comparator error to test that a mismatch is detected, which should result in an immediate Machine Check Reset. Should the reset not occur, the diagnostic failed and an error is returned.
This function will reset the device and should only be called while in a Safe State.
A successful diagnostic sets the DCLS flag in the RSTCTRL.MCFLAGSA register. This flag does not distinguish an injected mismatch from a genuine lockstep mismatch, so the calling function must separately confirm that an error injection was ongoing before this function was called.
| ERROR | Fault detected in the CPU lockstep mechanism. |