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
>
28
#include <
midware_cpu_manager_diag.h
>
29
30
// Device-specific Includes
31
#include <xc.h>
32
33
errFlag_t
MW_DiagCpuLockstep
(
void
)
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
errFlag_t
Defines the error flag used by Middleware services to indicate error detection.
Definition
define_error_flags.h:42
ERROR
@ ERROR
Definition
define_error_flags.h:44
driver_cpuctrl.h
MW_DiagCpuLockstep
errFlag_t MW_DiagCpuLockstep(void)
Performs error injection diagnostic to detect faults in the CPU lockstep mechanism.
Definition
midware_cpu_manager_diag.c:33
CPUCTRL_SetControlA
void CPUCTRL_SetControlA(uint8_t bitmask)
Sets specific bits in the CTRLA register.
Definition
driver_cpuctrl.c:35
midware_cpu_manager_diag.h
safety_framework
src
middleware
midware_cpu_manager_diag.c
Generated by
1.15.0