FuSa 8-Bit Libraries Safety Framework
Loading...
Searching...
No Matches
midware_cpu_manager_diag.c
Go to the documentation of this file.
1
22
23// Standard Library Includes
24#include <stdint.h>
25
26// Framework Includes
27#include <driver_cpuctrl.h>
29
30// Device-specific Includes
31#include <xc.h>
32
34{
35 // Inject a compare error in the CPU lockstep comparator
36 CPUCTRL_SetControlA((uint8_t)CPU_INJCOMP_bm);
37
38 // A successful diagnostic will reset the device, preventing the return
39 return ERROR;
40}
errFlag_t
Defines the error flag used by Middleware services to indicate error detection.
errFlag_t MW_DiagCpuLockstep(void)
Performs error injection diagnostic to detect faults in the CPU lockstep mechanism.
void CPUCTRL_SetControlA(uint8_t bitmask)
Sets specific bits in the CTRLA register.