FuSa 8-Bit Libraries Safety Framework
Loading...
Searching...
No Matches
midware_error_manager_diag.c
Go to the documentation of this file.
1
22
23// Standard Library Includes
24#include <stdbool.h>
25#include <stdint.h>
26
27// Framework Includes
28#include <driver_cpuctrl.h>
29#include <driver_errctrl.h>
32
33// Device-specific Includes
34#include <xc.h>
35
36// Error channel masks
37static const uint32_t splimMask = 1UL << ERRCTRL_ESF_5_bp;
38static const uint32_t cfd0Mask = 1UL << ERRCTRL_ESF_9_bp;
39static const uint32_t cfd1Mask = 1UL << ERRCTRL_ESF_10_bp;
40static const uint32_t cfm0Mask = 1UL << ERRCTRL_ESF_11_bp;
41static const uint32_t cfm1Mask = 1UL << ERRCTRL_ESF_12_bp;
42static const uint32_t eepromMask = 1UL << ERRCTRL_ESF_14_bp;
43static const uint32_t evsys0Mask = 1UL << ERRCTRL_ESF_15_bp;
44static const uint32_t evsys1Mask = 1UL << ERRCTRL_ESF_16_bp;
45
46// Private function prototypes
47static bool VerifyDiagnosticResult(uint32_t channelMask);
48
49static bool InjectSplimError(void);
50static uint8_t DisableSplimChannel(void);
51static void RestoreSplimChannelConfig(uint8_t splimChBackup);
52
53static bool InjectCfd0Error(void);
54static uint8_t DisableCfd0Channel(void);
55static void RestoreCfd0ChannelConfig(uint8_t cfd0ChBackup);
56
57static bool InjectCfd1Error(void);
58static uint8_t DisableCfd1Channel(void);
59static void RestoreCfd1ChannelConfig(uint8_t cfd1ChBackup);
60
61static bool InjectCfm0Error(void);
62static uint8_t DisableCfm0Channel(void);
63static void RestoreCfm0ChannelConfig(uint8_t cfm0ChBackup);
64
65static bool InjectCfm1Error(void);
66static uint8_t DisableCfm1Channel(void);
67static void RestoreCfm1ChannelConfig(uint8_t cfm1ChBackup);
68
69static bool InjectEepromError(void);
70static uint8_t DisableEepromChannel(void);
71static void RestoreEepromChannelConfig(uint8_t eepromChBackup);
72
73static bool InjectEvsys0Error(void);
74static uint8_t DisableEvsys0Channel(void);
75static void RestoreEvsys0ChannelConfig(uint8_t evsys0ChBackup);
76
77static bool InjectEvsys1Error(void);
78static uint8_t DisableEvsys1Channel(void);
79static void RestoreEvsys1ChannelConfig(uint8_t evsys1ChBackup);
80
82{
83 const bool isConfigurable = IsErrChConfigurable(splimMask);
84 if (!isConfigurable)
85 {
86 /* cppcheck-suppress misra-c2012-15.5 */
87 return ERROR;
88 }
89
90 // Disable and backup global interrupts configuration to avoid timeout while in CONFIG state
92
93 const bool isChannelSet = InjectSplimError();
94
95 // Restore global interrupts configuration
97
98 errFlag_t flag = ERROR;
99 if (isChannelSet)
100 {
101 flag = NO_ERROR;
102 }
103
104 return flag;
105}
106
108{
109 const bool isConfigurable = IsErrChConfigurable(cfd0Mask);
110 if (!isConfigurable)
111 {
112 /* cppcheck-suppress misra-c2012-15.5 */
113 return ERROR;
114 }
115
116 // Disable and backup global interrupts configuration to avoid timeout while in CONFIG state
118
119 const bool isChannelSet = InjectCfd0Error();
120
121 // Restore global interrupts configuration
123
124 errFlag_t flag = ERROR;
125 if (isChannelSet)
126 {
127 flag = NO_ERROR;
128 }
129
130 return flag;
131}
132
134{
135 const bool isConfigurable = IsErrChConfigurable(cfd1Mask);
136 if (!isConfigurable)
137 {
138 /* cppcheck-suppress misra-c2012-15.5 */
139 return ERROR;
140 }
141
142 // Disable and backup global interrupts configuration to avoid timeout while in CONFIG state
144
145 const bool isChannelSet = InjectCfd1Error();
146
147 // Restore global interrupts configuration
149
150 errFlag_t flag = ERROR;
151 if (isChannelSet)
152 {
153 flag = NO_ERROR;
154 }
155
156 return flag;
157}
158
160{
161 const bool isConfigurable = IsErrChConfigurable(cfm0Mask);
162 if (!isConfigurable)
163 {
164 /* cppcheck-suppress misra-c2012-15.5 */
165 return ERROR;
166 }
167
168 // Disable and backup global interrupts configuration to avoid timeout while in CONFIG state
170
171 const bool isChannelSet = InjectCfm0Error();
172
173 // Restore global interrupts configuration
175
176 errFlag_t flag = ERROR;
177 if (isChannelSet)
178 {
179 flag = NO_ERROR;
180 }
181
182 return flag;
183}
184
186{
187 const bool isConfigurable = IsErrChConfigurable(cfm1Mask);
188 if (!isConfigurable)
189 {
190 /* cppcheck-suppress misra-c2012-15.5 */
191 return ERROR;
192 }
193
194 // Disable and backup global interrupts configuration to avoid timeout while in CONFIG state
196
197 const bool isChannelSet = InjectCfm1Error();
198
199 // Restore global interrupts configuration
201
202 errFlag_t flag = ERROR;
203 if (isChannelSet)
204 {
205 flag = NO_ERROR;
206 }
207
208 return flag;
209}
210
212{
213 const bool isConfigurable = IsErrChConfigurable(eepromMask);
214 if (!isConfigurable)
215 {
216 /* cppcheck-suppress misra-c2012-15.5 */
217 return ERROR;
218 }
219
220 // Disable and backup global interrupts configuration to avoid timeout while in CONFIG state
222
223 const bool isChannelSet = InjectEepromError();
224
225 // Restore global interrupts configuration
227
228 errFlag_t flag = ERROR;
229 if (isChannelSet)
230 {
231 flag = NO_ERROR;
232 }
233
234 return flag;
235}
236
238{
239 const bool isConfigurable = IsErrChConfigurable(evsys0Mask);
240 if (!isConfigurable)
241 {
242 /* cppcheck-suppress misra-c2012-15.5 */
243 return ERROR;
244 }
245
246 // Disable and backup global interrupts configuration to avoid timeout while in CONFIG state
248
249 const bool isChannelSet = InjectEvsys0Error();
250
251 // Restore global interrupts configuration
253
254 errFlag_t flag = ERROR;
255 if (isChannelSet)
256 {
257 flag = NO_ERROR;
258 }
259
260 return flag;
261}
262
264{
265 const bool isConfigurable = IsErrChConfigurable(evsys1Mask);
266 if (!isConfigurable)
267 {
268 /* cppcheck-suppress misra-c2012-15.5 */
269 return ERROR;
270 }
271
272 // Disable and backup global interrupts configuration to avoid timeout while in CONFIG state
274
275 const bool isChannelSet = InjectEvsys1Error();
276
277 // Restore global interrupts configuration
279
280 errFlag_t flag = ERROR;
281 if (isChannelSet)
282 {
283 flag = NO_ERROR;
284 }
285
286 return flag;
287}
288
289// Verifies that the expected flags are set and clears them, returns true if channel is set
290static bool VerifyDiagnosticResult(uint32_t channelMask)
291{
292 // Diagnostic is successful if flag is raised on the Error Channel
293 const uint32_t chStatus = ERRCTRL_ReadChannelStatus();
294 const bool isChannelSet = ((chStatus & channelMask) == channelMask);
295 ERRCTRL_WriteChannelStatus(channelMask); // Clear status flag
296
297 return isChannelSet;
298}
299
300// Configures SPLIM error channel for error injection and restores it after injection is complete
301static bool InjectSplimError(void)
302{
303 // Prevent error injection from triggering a real error response
304 const uint8_t splimChBackup = DisableSplimChannel();
305
306 // Start error injection
307 ERRCTRL_WriteChannelTest(splimMask);
308
309 const bool isChannelSet = VerifyDiagnosticResult(splimMask);
310
311 RestoreSplimChannelConfig(splimChBackup);
312
313 return isChannelSet;
314}
315
316// Sets SPLIM channel with NOTIFICATION severity and I/O float disabled, returns original config
317static uint8_t DisableSplimChannel(void)
318{
319 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
320 const uint8_t floatConfig = 0U << ERRCTRL_FLOAT_bp; // Disable I/O float
321 const uint8_t severityConfig = (uint8_t)ERRCTRL_ERRLVL_NOTIFICATION_gc;
322 const uint8_t disableChConfig = (floatConfig | severityConfig);
323
324 const uint8_t splimChBackup = ERRCTRL_ReadConfigSplim();
325
326 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
327 ERRCTRL_WriteConfigSplim(disableChConfig);
328 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
329
330 return splimChBackup;
331}
332
333static void RestoreSplimChannelConfig(uint8_t splimChBackup)
334{
335 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
336 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
337 ERRCTRL_WriteConfigSplim(splimChBackup);
338 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
339}
340
341// Configures CFD0 error channel for error injection and restores it after injection is complete
342static bool InjectCfd0Error(void)
343{
344 // Prevent error injection from triggering a real error response
345 const uint8_t cfd0ChBackup = DisableCfd0Channel();
346
347 // Start error injection
348 ERRCTRL_WriteChannelTest(cfd0Mask);
349
350 const bool isChannelSet = VerifyDiagnosticResult(cfd0Mask);
351
352 RestoreCfd0ChannelConfig(cfd0ChBackup);
353
354 return isChannelSet;
355}
356
357// Sets CFD0 channel with NOTIFICATION severity and I/O float disabled, returns original config
358static uint8_t DisableCfd0Channel(void)
359{
360 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
361 const uint8_t floatConfig = 0U << ERRCTRL_FLOAT_bp; // Disable I/O float
362 const uint8_t severityConfig = (uint8_t)ERRCTRL_ERRLVL_NOTIFICATION_gc;
363 const uint8_t disableChConfig = (floatConfig | severityConfig);
364
365 const uint8_t cfd0ChBackup = ERRCTRL_ReadConfigCfd0();
366
367 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
368 ERRCTRL_WriteConfigCfd0(disableChConfig);
369 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
370
371 return cfd0ChBackup;
372}
373
374static void RestoreCfd0ChannelConfig(uint8_t cfd0ChBackup)
375{
376 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
377 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
378 ERRCTRL_WriteConfigCfd0(cfd0ChBackup);
379 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
380}
381
382// Configures CFD1 error channel for error injection and restores it after injection is complete
383static bool InjectCfd1Error(void)
384{
385 // Prevent error injection from triggering a real error response
386 const uint8_t cfd1ChBackup = DisableCfd1Channel();
387
388 // Start error injection
389 ERRCTRL_WriteChannelTest(cfd1Mask);
390
391 const bool isChannelSet = VerifyDiagnosticResult(cfd1Mask);
392
393 RestoreCfd1ChannelConfig(cfd1ChBackup);
394
395 return isChannelSet;
396}
397
398// Sets CFD1 channel with NOTIFICATION severity and I/O float disabled, returns original config
399static uint8_t DisableCfd1Channel(void)
400{
401 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
402 const uint8_t floatConfig = 0U << ERRCTRL_FLOAT_bp; // Disable I/O float
403 const uint8_t severityConfig = (uint8_t)ERRCTRL_ERRLVL_NOTIFICATION_gc;
404 const uint8_t disableChConfig = (floatConfig | severityConfig);
405
406 const uint8_t cfd1ChBackup = ERRCTRL_ReadConfigCfd1();
407
408 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
409 ERRCTRL_WriteConfigCfd1(disableChConfig);
410 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
411
412 return cfd1ChBackup;
413}
414
415static void RestoreCfd1ChannelConfig(uint8_t cfd1ChBackup)
416{
417 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
418 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
419 ERRCTRL_WriteConfigCfd1(cfd1ChBackup);
420 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
421}
422
423// Configures CFM0 error channel for error injection and restores it after injection is complete
424static bool InjectCfm0Error(void)
425{
426 // Prevent error injection from triggering a real error response
427 const uint8_t cfm0ChBackup = DisableCfm0Channel();
428
429 // Start error injection
430 ERRCTRL_WriteChannelTest(cfm0Mask);
431
432 const bool isChannelSet = VerifyDiagnosticResult(cfm0Mask);
433
434 RestoreCfm0ChannelConfig(cfm0ChBackup);
435
436 return isChannelSet;
437}
438
439// Sets CFM0 channel with NOTIFICATION severity and I/O float disabled, returns original config
440static uint8_t DisableCfm0Channel(void)
441{
442 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
443 const uint8_t floatConfig = 0U << ERRCTRL_FLOAT_bp; // Disable I/O float
444 const uint8_t severityConfig = (uint8_t)ERRCTRL_ERRLVL_NOTIFICATION_gc;
445 const uint8_t disableChConfig = (floatConfig | severityConfig);
446
447 const uint8_t cfm0ChBackup = ERRCTRL_ReadConfigCfm0();
448
449 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
450 ERRCTRL_WriteConfigCfm0(disableChConfig);
451 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
452
453 return cfm0ChBackup;
454}
455
456static void RestoreCfm0ChannelConfig(uint8_t cfm0ChBackup)
457{
458 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
459 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
460 ERRCTRL_WriteConfigCfm0(cfm0ChBackup);
461 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
462}
463
464// Configures CFM1 error channel for error injection and restores it after injection is complete
465static bool InjectCfm1Error(void)
466{
467 // Prevent error injection from triggering a real error response
468 const uint8_t cfm1ChBackup = DisableCfm1Channel();
469
470 // Start error injection
471 ERRCTRL_WriteChannelTest(cfm1Mask);
472
473 const bool isChannelSet = VerifyDiagnosticResult(cfm1Mask);
474
475 RestoreCfm1ChannelConfig(cfm1ChBackup);
476
477 return isChannelSet;
478}
479
480// Sets CFM1 channel with NOTIFICATION severity and I/O float disabled, returns original config
481static uint8_t DisableCfm1Channel(void)
482{
483 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
484 const uint8_t floatConfig = 0U << ERRCTRL_FLOAT_bp; // Disable I/O float
485 const uint8_t severityConfig = (uint8_t)ERRCTRL_ERRLVL_NOTIFICATION_gc;
486 const uint8_t disableChConfig = (floatConfig | severityConfig);
487
488 const uint8_t cfm1ChBackup = ERRCTRL_ReadConfigCfm1();
489
490 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
491 ERRCTRL_WriteConfigCfm1(disableChConfig);
492 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
493
494 return cfm1ChBackup;
495}
496
497static void RestoreCfm1ChannelConfig(uint8_t cfm1ChBackup)
498{
499 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
500 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
501 ERRCTRL_WriteConfigCfm1(cfm1ChBackup);
502 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
503}
504
505// Configures EEPROM error channel for error injection and restores it after injection is complete
506static bool InjectEepromError(void)
507{
508 // Prevent error injection from triggering a real error response
509 const uint8_t eepromChBackup = DisableEepromChannel();
510
511 // Start error injection
512 ERRCTRL_WriteChannelTest(eepromMask);
513
514 const bool isChannelSet = VerifyDiagnosticResult(eepromMask);
515
516 RestoreEepromChannelConfig(eepromChBackup);
517
518 return isChannelSet;
519}
520
521// Sets EEPROM channel with NOTIFICATION severity and I/O float disabled, returns original config
522static uint8_t DisableEepromChannel(void)
523{
524 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
525 const uint8_t floatConfig = 0U << ERRCTRL_FLOAT_bp; // Disable I/O float
526 const uint8_t severityConfig = (uint8_t)ERRCTRL_ERRLVL_NOTIFICATION_gc;
527 const uint8_t disableChConfig = (floatConfig | severityConfig);
528
529 const uint8_t eepromChBackup = ERRCTRL_ReadConfigEeprom();
530
531 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
532 ERRCTRL_WriteConfigEeprom(disableChConfig);
533 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
534
535 return eepromChBackup;
536}
537
538static void RestoreEepromChannelConfig(uint8_t eepromChBackup)
539{
540 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
541 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
542 ERRCTRL_WriteConfigEeprom(eepromChBackup);
543 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
544}
545
546// Configures EVSYS0 error channel for error injection and restores it after injection is complete
547static bool InjectEvsys0Error(void)
548{
549 // Prevent error injection from triggering a real error response
550 const uint8_t evsys0ChBackup = DisableEvsys0Channel();
551
552 // Start error injection
553 ERRCTRL_WriteChannelTest(evsys0Mask);
554
555 const bool isChannelSet = VerifyDiagnosticResult(evsys0Mask);
556
557 RestoreEvsys0ChannelConfig(evsys0ChBackup);
558
559 return isChannelSet;
560}
561
562// Sets EVSYS0 channel with NOTIFICATION severity and I/O float disabled, returns original config
563static uint8_t DisableEvsys0Channel(void)
564{
565 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
566 const uint8_t floatConfig = 0U << ERRCTRL_FLOAT_bp; // Disable I/O float
567 const uint8_t severityConfig = (uint8_t)ERRCTRL_ERRLVL_NOTIFICATION_gc;
568 const uint8_t disableChConfig = (floatConfig | severityConfig);
569
570 const uint8_t evsys0ChBackup = ERRCTRL_ReadConfigEvsys0();
571
572 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
573 ERRCTRL_WriteConfigEvsys0(disableChConfig);
574 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
575
576 return evsys0ChBackup;
577}
578
579static void RestoreEvsys0ChannelConfig(uint8_t evsys0ChBackup)
580{
581 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
582 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
583 ERRCTRL_WriteConfigEvsys0(evsys0ChBackup);
584 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
585}
586
587// Configures EVSYS1 error channel for error injection and restores it after injection is complete
588static bool InjectEvsys1Error(void)
589{
590 // Prevent error injection from triggering a real error response
591 const uint8_t evsys1ChBackup = DisableEvsys1Channel();
592
593 // Start error injection
594 ERRCTRL_WriteChannelTest(evsys1Mask);
595
596 const bool isChannelSet = VerifyDiagnosticResult(evsys1Mask);
597
598 RestoreEvsys1ChannelConfig(evsys1ChBackup);
599
600 return isChannelSet;
601}
602
603// Sets EVSYS1 channel with NOTIFICATION severity and I/O float disabled, returns original config
604static uint8_t DisableEvsys1Channel(void)
605{
606 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
607 const uint8_t floatConfig = 0U << ERRCTRL_FLOAT_bp; // Disable I/O float
608 const uint8_t severityConfig = (uint8_t)ERRCTRL_ERRLVL_NOTIFICATION_gc;
609 const uint8_t disableChConfig = (floatConfig | severityConfig);
610
611 const uint8_t evsys1ChBackup = ERRCTRL_ReadConfigEvsys1();
612
613 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
614 ERRCTRL_WriteConfigEvsys1(disableChConfig);
615 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
616
617 return evsys1ChBackup;
618}
619
620static void RestoreEvsys1ChannelConfig(uint8_t evsys1ChBackup)
621{
622 const uint8_t stateMask = (uint8_t)ERRCTRL_STATE_gm;
623 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_CONFIG_gc);
624 ERRCTRL_WriteConfigEvsys1(evsys1ChBackup);
625 ERRCTRL_ModifyControlA(stateMask, (uint8_t)ERRCTRL_STATE_NORMAL_gc);
626}
errFlag_t
Defines the error flag used by Middleware services to indicate error detection.
@ NO_ERROR
uint8_t ERRCTRL_ReadConfigEvsys0(void)
Reads the ESCEVSYS0 register value.
uint8_t ERRCTRL_ReadConfigCfd1(void)
Reads the ESCCFD1 register value.
void ERRCTRL_WriteConfigSplim(uint8_t value)
Overwrites the ESCSPLIM register value.
void ERRCTRL_WriteConfigEeprom(uint8_t value)
Overwrites the ESCEEPROM register value.
void ERRCTRL_WriteConfigCfd0(uint8_t value)
Overwrites the ESCCFD0 register value.
void ERRCTRL_WriteConfigEvsys1(uint8_t value)
Overwrites the ESCEVSYS1 register value.
void ERRCTRL_WriteConfigCfd1(uint8_t value)
Overwrites the ESCCFD1 register value.
uint32_t ERRCTRL_ReadChannelStatus(void)
Reads the ESF register value.
uint8_t ERRCTRL_ReadConfigCfd0(void)
Reads the ESCCFD0 register value.
void ERRCTRL_WriteConfigCfm1(uint8_t value)
Overwrites the ESCCFM1 register value.
uint8_t ERRCTRL_ReadConfigSplim(void)
Reads the ESCSPLIM register value.
void ERRCTRL_WriteChannelTest(uint32_t value)
Overwrites the ESFTEST register value.
uint8_t ERRCTRL_ReadConfigEvsys1(void)
Reads the ESCEVSYS1 register value.
void ERRCTRL_WriteConfigEvsys0(uint8_t value)
Overwrites the ESCEVSYS0 register value.
uint8_t ERRCTRL_ReadConfigCfm0(void)
Reads the ESCCFM0 register value.
uint8_t ERRCTRL_ReadConfigCfm1(void)
Reads the ESCCFM1 register value.
uint8_t ERRCTRL_ReadConfigEeprom(void)
Reads the ESCEEPROM register value.
void ERRCTRL_WriteConfigCfm0(uint8_t value)
Overwrites the ESCCFM0 register value.
void ERRCTRL_WriteChannelStatus(uint32_t value)
Overwrites the ESF register value.
void ERRCTRL_ModifyControlA(uint8_t groupMask, uint8_t groupConfig)
Modifies specific bit field(s) in the CTRLA register.
errFlag_t MW_DiagErrorChannelCfd1(void)
Performs error injection diagnostic to detect faults in the CFD1 error channel.
errFlag_t MW_DiagErrorChannelEvsys0(void)
Performs error injection diagnostic to detect faults in the EVSYS0 error channel.
errFlag_t MW_DiagErrorChannelSplim(void)
Performs error injection diagnostic to detect faults in the SPLIM error channel.
errFlag_t MW_DiagErrorChannelCfm1(void)
Performs error injection diagnostic to detect faults in the CFM1 error channel.
errFlag_t MW_DiagErrorChannelCfm0(void)
Performs error injection diagnostic to detect faults in the CFM0 error channel.
errFlag_t MW_DiagErrorChannelEeprom(void)
Performs error injection diagnostic to detect faults in the EEPROM error channel.
errFlag_t MW_DiagErrorChannelCfd0(void)
Performs error injection diagnostic to detect faults in the CFD0 error channel.
errFlag_t MW_DiagErrorChannelEvsys1(void)
Performs error injection diagnostic to detect faults in the EVSYS1 error channel.
void AtomicSectionStart(void)
Backup and disable global interrupts.
void AtomicSectionEnd(void)
Restore global interrupts if previously enabled.
bool IsErrChConfigurable(uint32_t channelMask)
Check Error Controller state and error channels indicated by the channel mask input.
Contains API prototypes and defines for the Error Manager Diagnostics.