FuSa 8-Bit Libraries Safety Framework
Loading...
Searching...
No Matches
tasks_interrupts.c
Go to the documentation of this file.
1
22
23// Standard Library Includes
24#include <stdbool.h>
25
26// Framework Includes
27#include <define_error_flags.h>
28#include <define_error_ids.h>
29#include <define_tasks_config.h>
30#include <error_handler.h>
38#include <tasks_config.h>
39#include <tasks_interrupts.h>
40
41// Private function prototypes
42static void ReportEndOvervoltageDiag(void);
43static void ReportEndUndervoltageDiag(void);
44static void ReportClearVregfailErrors(void);
45static void ReportClearVregwarnErrors(void);
46static errCh_t FindSetErrorChannel(void);
47static void HandleErrorChVregfail(void);
48static void HandleErrorChBuserr(void);
49static void HandleErrorChRam2(void);
50static void HandleErrorChFlash2(void);
51static void HandleErrorChOpc(void);
52static void HandleErrorChSplim(void);
53static void HandleErrorChRam1(void);
54static void HandleErrorChFlash1(void);
55static void HandleErrorChVregwarn(void);
56static void HandleErrorChCdf0(void);
57static void HandleErrorChCfd1(void);
58static void HandleErrorChCfm0(void);
59static void HandleErrorChCfm1(void);
60static void HandleErrorChSwdt(void);
61static void HandleErrorChEeprom(void);
62static void HandleErrorChEvsys0(void);
63static void HandleErrorChEvsys1(void);
64
66{
67 errFlag_t busFlag = NO_ERROR;
68 errFlag_t splimFlag = NO_ERROR;
69 errFlag_t opcFlag = NO_ERROR;
70 busFlag = MW_GetClearBusError();
72 const bool notBusError = (busFlag == NO_ERROR);
73
74 splimFlag = MW_GetClearRamStackError();
75 EH_HandleError(splimFlag, ERRID_SPLIM_CH); // Report channel ID when channel only has one source
76 const bool notSplimError = (splimFlag == NO_ERROR);
77
78 opcFlag = MW_GetClearCpuOpcodeError();
80 const bool notOpcError = (opcFlag == NO_ERROR);
81
82 const bool unkownErrorSource = (notBusError && notSplimError && notOpcError);
83 if (unkownErrorSource)
84 {
86 }
87
88 // Report one last error in case none of the former reports resulted in a device reset
90
91 /*
92 * An NMI should always lead to a device reset. If the Error IDs have been configured to their
93 * correct criticality, the device should already have transitioned into a Safe State before
94 * reaching this point. However, as a safety mechanism, the function will halt further execution
95 * and wait for one of the device timeout mechanisms to trigger a device reset.
96 */
97 while (FOREVER)
98 {
99 }
100}
101
103{
105
107}
108
110{
111 errFlag_t flag = NO_ERROR;
112
113 // The CFM Done flags are cleared without further action
115
118
121
124
127
128 /*
129 * To prevent double reporting of errors, the error channel connected to the source must be
130 * cleared. It is assumed that all sources are correctly cleared in this function and clearing
131 * the channel will succeed. For this reason, the returned error flag is always discarded.
132 * However, should the clearing fail due to a hardware fault, the redundant error channel
133 * interrupt handler or the notification error handler Task will report this error.
134 */
135 (void)MW_ClearErrorChannel(ERRCH_CFD0); // CFD0 error source
136 (void)MW_ClearErrorChannel(ERRCH_CFD1); // CFD1 error source
137 (void)MW_ClearErrorChannel(ERRCH_CFM0); // CFM0 error source
138 (void)MW_ClearErrorChannel(ERRCH_CFM1); // CFM1 error source
139}
140
142{
143 // Only compile diagnostic code if VMON diagnostics are enabled
144#if (DIAG_PERIODIC_VMON == ENABLED)
145 if (MW_IsDiagVmonOverDone()) // Check if diagnostic completion caused the interrupt
146 {
147 ReportEndOvervoltageDiag();
148 /* cppcheck-suppress misra-c2012-15.5 */
149 return; // True error flag interrupts are handled by calling the function again
150 }
151
152 if (MW_IsDiagVmonUnderDone()) // Check if diagnostic completion caused the interrupt
153 {
154 ReportEndUndervoltageDiag();
155 /* cppcheck-suppress misra-c2012-15.5 */
156 return; // True error flag interrupts are handled by calling the function again
157 }
158#endif // DIAG_PERIODIC_VMON == ENABLED
159
160 ReportClearVregfailErrors();
161 ReportClearVregwarnErrors();
162
163 /*
164 * To prevent double reporting of errors, the error channel connected to the source must be
165 * cleared. It is assumed that all sources are correctly cleared in this function and clearing
166 * the channel will succeed. For this reason, the returned error flag is always discarded.
167 * However, should the clearing fail due to a hardware fault, the redundant error channel
168 * interrupt handler or the notification error handler Task will report this error.
169 */
170 (void)MW_ClearErrorChannel(ERRCH_VREGFAIL); // VOV and VUV sources
171 (void)MW_ClearErrorChannel(ERRCH_VREGWARN); // VDENTER, VDEXIT, VERR, VSLP, VDIS, SERR sources
172}
173
175{
176 errFlag_t flag = NO_ERROR;
177
178 // Check each interrupt source and handle the error
181
182 flag = MW_GetSwdtClearError();
184
187
190
191 MW_ClearSwdtErrors(); // The error flags cannot be cleared individually in hardware
192
193 /*
194 * To prevent double reporting of errors, the error channel connected to the source must be
195 * cleared. It is assumed that all sources are correctly cleared in this function and clearing
196 * the channel will succeed. For this reason, the returned error flag is always discarded.
197 * However, should the clearing fail due to a hardware fault, the redundant error channel
198 * interrupt handler or the notification error handler Task will report this error.
199 */
201}
202
204{
205 errFlag_t flag = NO_ERROR;
206
209
212
215
218
221
224
225 /*
226 * To prevent double reporting of errors, the error channel connected to the source must be
227 * cleared. It is assumed that all sources are correctly cleared in this function and clearing
228 * the channel will succeed. For this reason, the returned error flag is always discarded.
229 * However, should the clearing fail due to a hardware fault, the redundant error channel
230 * interrupt handler or the notification error handler Task will report this error.
231 */
232 (void)MW_ClearErrorChannel(ERRCH_FLASH1); // Flash ECC1 error source
233 (void)MW_ClearErrorChannel(ERRCH_FLASH2); // Flash ECC2 and COMP error sources
234 (void)MW_ClearErrorChannel(ERRCH_EEPROM); // EEPROM ECC1 and ECC2 error sources
235}
236
238{
239 errFlag_t flag = NO_ERROR;
240
242 EH_HandleError(flag, ERRID_RAM1_CH); // Report channel ID due to singular source
243
246
249
252
253 /*
254 * To prevent double reporting of errors, the error channel connected to the source must be
255 * cleared. It is assumed that all sources are correctly cleared in this function and clearing
256 * the channel will succeed. For this reason, the returned error flag is always discarded.
257 * However, should the clearing fail due to a hardware fault, the redundant error channel
258 * interrupt handler or the notification error handler Task will report this error.
259 */
260 (void)MW_ClearErrorChannel(ERRCH_RAM1); // RAM ECC1 error source
261 (void)MW_ClearErrorChannel(ERRCH_RAM2); // RAM ECC2 and COMP error sources
262}
263
265{
266 // Assumes no further action is required after clearing the PERIOD bit
268
269 // If the CRCSCAN is done, check whether an error was detected
272}
273
275{
276 // Always report interrupt requests without an ISR as an error
278}
279
281{
282 // Lookup table for quickly facilitating which private function to call for which channel
283 static void (*channelHandler[ERRCH_MAX])(void)
284 = { [ERRCH_VREGFAIL] = &HandleErrorChVregfail, [ERRCH_BUSERR] = &HandleErrorChBuserr,
285 [ERRCH_RAM2] = &HandleErrorChRam2, [ERRCH_FLASH2] = &HandleErrorChFlash2,
286 [ERRCH_OPC] = &HandleErrorChOpc, [ERRCH_SPLIM] = &HandleErrorChSplim,
287 [ERRCH_RAM1] = &HandleErrorChRam1, [ERRCH_FLASH1] = &HandleErrorChFlash1,
288 [ERRCH_VREGWARN] = &HandleErrorChVregwarn, [ERRCH_CFD0] = &HandleErrorChCdf0,
289 [ERRCH_CFD1] = &HandleErrorChCfd1, [ERRCH_CFM0] = &HandleErrorChCfm0,
290 [ERRCH_CFM1] = &HandleErrorChCfm1, [ERRCH_SWDT] = &HandleErrorChSwdt,
291 [ERRCH_EEPROM] = &HandleErrorChEeprom, [ERRCH_EVSYS0] = &HandleErrorChEvsys0,
292 [ERRCH_EVSYS1] = &HandleErrorChEvsys1 };
293
294 /*
295 * Returns the first set error channel, starting from the lowest numbered channel in the errCh_t
296 * enum. This may handle channels set to NOTIFICATION before those set to NON_CRITICAL,
297 * requiring multiple executions to clear the interrupt source. In practice, simultaneously set
298 * error channels are rare, and higher priority channels are placed in lower enum values.
299 */
300 const errCh_t setChannel = FindSetErrorChannel();
301
302 // Call channel specific handler or skip if no channel is set
303 if (setChannel < ERRCH_MAX)
304 {
305 // Check and report all error channel sources before clearing it
306 void (*setChannelHandler)(void) = channelHandler[setChannel];
307 setChannelHandler();
308 }
309}
310
311// Completes the VMON Overvoltage diagnostic and reports the result
312static void ReportEndOvervoltageDiag(void)
313{
314 errFlag_t flag = MW_DiagVmonOverEnd(); // Read the result of the diag
316}
317
318// Completes the VMON Undervoltage diagnostic and reports the result
319static void ReportEndUndervoltageDiag(void)
320{
321 errFlag_t flag = MW_DiagVmonUnderEnd(); // Read the result of the diag
323}
324
325// Checks, clears and reports all SLPCTRL error flags connected to the VREGFAIL error channel
326static void ReportClearVregfailErrors(void)
327{
328 errFlag_t flag = NO_ERROR;
329
332
335}
336
337// Checks, clears and reports all SLPCTRL error flags connected to the VREGWARN error channel
338static void ReportClearVregwarnErrors(void)
339{
340 errFlag_t flag = NO_ERROR;
341
344
347
350
353
356
357 flag = MW_GetClearSleepError();
359}
360
361// Returns the first channel with an error, or ERRCH_MAX if none is found
362static errCh_t FindSetErrorChannel(void)
363{
364 errCh_t channel = ERRCH_VREGFAIL; // First channel in enum
365
366 while (channel < ERRCH_MAX)
367 {
368 errFlag_t flag = MW_GetErrorChannel(channel);
369
370 // First set channel is found, break and return
371 if (flag == ERROR)
372 {
373 break;
374 }
375
376 /* Intentional misra-c2012-10.1 deviation */
377 channel++;
378 }
379
380 return channel;
381}
382
383// Checks, clears and reports error sources and clears error channel
384static void HandleErrorChVregfail(void)
385{
386 errFlag_t flag = NO_ERROR;
387
390
393
394 // The channel can only be cleared after all error sources are cleared
396 EH_HandleError(flag, ERRID_VREGFAIL_CH); // In case the channel was not cleared
397}
398
399// Checks, clears and reports error sources and clears error channel
400static void HandleErrorChBuserr(void)
401{
402 errFlag_t flag = NO_ERROR;
403
404 flag = MW_GetClearBusError();
406
407 // Check and report if the bus error was due to a RAM or NVM bus parity error
408 if (flag == ERROR)
409 {
412
415 }
416
419
420 // The channel can only be cleared after all error sources are cleared
422 EH_HandleError(flag, ERRID_BUSERR_CH); // In case the channel was not cleared
423}
424
425// Checks, clears and reports error sources and clears error channel
426static void HandleErrorChRam2(void)
427{
428 errFlag_t flag = NO_ERROR;
429
432
435
436 // The channel can only be cleared after all error sources are cleared
438 EH_HandleError(flag, ERRID_RAM2_CH); // In case the channel was not cleared
439}
440
441// Checks, clears and reports error sources and clears error channel
442static void HandleErrorChFlash2(void)
443{
444 errFlag_t flag = NO_ERROR;
445
448
451
452 // The channel can only be cleared after all error sources are cleared
454 EH_HandleError(flag, ERRID_FLASH2_CH); // In case the channel was not cleared
455}
456
457// Checks, clears and reports error sources and clears error channel
458static void HandleErrorChOpc(void)
459{
460 errFlag_t flag = NO_ERROR;
461
464
467
468 // The channel can only be cleared after all error sources are cleared
470 EH_HandleError(flag, ERRID_OPC_CH); // In case the channel was not cleared
471}
472
473// Checks, clears and reports error sources and clears error channel
474static void HandleErrorChSplim(void)
475{
476 errFlag_t flag = NO_ERROR;
477
479 EH_HandleError(flag, ERRID_SPLIM_CH); // Report channel ID due to singular source
480
481 // The channel can only be cleared after all error sources are cleared
483 EH_HandleError(flag, ERRID_SPLIM_CH); // In case the channel was not cleared
484}
485
486// Checks, clears and reports error sources and clears error channel
487static void HandleErrorChRam1(void)
488{
489 errFlag_t flag = NO_ERROR;
490
492 EH_HandleError(flag, ERRID_RAM1_CH); // Report channel ID due to singular source
493
494 // The channel can only be cleared after all error sources are cleared
496 EH_HandleError(flag, ERRID_RAM1_CH); // In case the channel was not cleared
497}
498
499// Checks, clears and reports error sources and clears error channel
500static void HandleErrorChFlash1(void)
501{
502 errFlag_t flag = NO_ERROR;
503
505 EH_HandleError(flag, ERRID_FLASH1_CH); // Report channel ID due to singular source
506
507 // The channel can only be cleared after all error sources are cleared
509 EH_HandleError(flag, ERRID_FLASH1_CH); // In case the channel was not cleared
510}
511
512// Checks, clears and reports error sources and clears error channel
513static void HandleErrorChVregwarn(void)
514{
515 errFlag_t flag = NO_ERROR;
516
519
522
525
528
531
532 flag = MW_GetClearSleepError();
534
535 // The channel can only be cleared after all error sources are cleared
537 EH_HandleError(flag, ERRID_VREGWARN_CH); // In case the channel was not cleared
538}
539
540// Checks, clears and reports error sources and clears error channel
541static void HandleErrorChCdf0(void)
542{
543 errFlag_t flag = NO_ERROR;
544
546 EH_HandleError(flag, ERRID_CFD0_CH); // Report channel ID due to singular source
547
548 // The channel can only be cleared after all error sources are cleared
550 EH_HandleError(flag, ERRID_CFD0_CH); // In case the channel was not cleared
551}
552
553// Checks, clears and reports error sources and clears error channel
554static void HandleErrorChCfd1(void)
555{
556 errFlag_t flag = NO_ERROR;
557
559 EH_HandleError(flag, ERRID_CFD1_CH); // Report channel ID due to singular source
560
561 // The channel can only be cleared after all error sources are cleared
563 EH_HandleError(flag, ERRID_CFD1_CH); // In case the channel was not cleared
564}
565
566// Checks, clears and reports error sources and clears error channel
567static void HandleErrorChCfm0(void)
568{
569 errFlag_t flag = NO_ERROR;
570
572 EH_HandleError(flag, ERRID_CFM0_CH); // Report channel ID due to singular source
573
574 // The channel can only be cleared after all error sources are cleared
576 EH_HandleError(flag, ERRID_CFM0_CH); // In case the channel was not cleared
577}
578
579// Checks, clears and reports error sources and clears error channel
580static void HandleErrorChCfm1(void)
581{
582 errFlag_t flag = NO_ERROR;
583
585 EH_HandleError(flag, ERRID_CFM1_CH); // Report channel ID due to singular source
586
587 // The channel can only be cleared after all error sources are cleared
589 EH_HandleError(flag, ERRID_CFM1_CH); // In case the channel was not cleared
590}
591
592// Checks, clears and reports error sources and clears error channel
593static void HandleErrorChSwdt(void)
594{
597
598 flag = MW_GetSwdtClearError();
600
603
606
607 MW_ClearSwdtErrors(); // The error flags cannot be cleared individually in hardware
608
609 // The channel can only be cleared after all error sources are cleared
611 EH_HandleError(flag, ERRID_SWDT_CH); // In case the channel was not cleared
612}
613
614// Checks, clears and reports error sources and clears error channel
615static void HandleErrorChEeprom(void)
616{
617 errFlag_t flag = NO_ERROR;
618
621
624
625 // The channel can only be cleared after all error sources are cleared
627 EH_HandleError(flag, ERRID_EEPROM_CH); // In case the channel was not cleared
628}
629
630/*
631 * Clear and report the error channel directly, without attempting to clear the source,
632 * as it is unknown. When the event type is a "pulse", the source will be automatically
633 * cleared unless there is an error. For a "level" event type, it is assumed that the
634 * channel and the source is cleared in the error handler callback.
635 */
636static void HandleErrorChEvsys0(void)
637{
640 EH_HandleError(flag, ERRID_EVSYS0_CLEAR); // In case the channel was not cleared
641}
642
643/*
644 * Clear and report the error channel directly, without attempting to clear the source,
645 * as it is unknown. When the event type is a "pulse", the source will be automatically
646 * cleared unless there is an error. For a "level" event type, it is assumed that the
647 * channel and the source is cleared in the error handler callback.
648 */
649static void HandleErrorChEvsys1(void)
650{
653 EH_HandleError(flag, ERRID_EVSYS1_CLEAR); // In case the channel was not cleared
654}
Defines error flag type for indicating detected errors in Middleware services.
errFlag_t
Defines the error flag used by Middleware services to indicate error detection.
@ NO_ERROR
Defines for IDs associated with specific errors.
@ ERRID_EVSYS1_CLEAR
@ ERRID_NMI_UNKNOWN
@ ERRID_FLASH2_COMP
@ ERRID_SWDT_EXP
@ ERRID_EEPROM_ECC1
@ ERRID_CFD1_CH
@ ERRID_SWDT_CH
@ ERRID_BUSERR_PARITYD
@ ERRID_OPC_PARITYI
@ ERRID_VREGFAIL_VUV
@ ERRID_CFM1_CH
@ ERRID_VREGWARN_CH
@ ERRID_SWDT_UC
@ ERRID_VREGWARN_VSLP
@ ERRID_RAM2_COMP
@ ERRID_VREGFAIL_VOV
@ ERRID_VREGWARN_SERR
@ ERRID_BUSERR_CH
@ ERRID_EVSYS0_CLEAR
@ ERRID_FLASH1_CH
@ ERRID_RAM1_CH
@ ERRID_VREGFAIL_CH
@ ERRID_SPLIM_CH
@ ERRID_VREGWARN_VDEXIT
@ ERRID_EEPROM_CH
@ ERRID_NMI
@ ERRID_SWDT_BADPC
@ ERRID_CFD0_CH
@ ERRID_EVSYS0_CH
@ ERRID_SWDT_BADC
@ ERRID_RAM_PARITY
@ ERRID_VREGWARN_VDENTER
@ ERRID_DIAG_VMON_OVER
@ ERRID_BAD_IRQ
@ ERRID_FLASH2_ECC2
@ ERRID_CRC_FLASH
@ ERRID_BOD_VLM
@ ERRID_VREGWARN_VERR
@ ERRID_OPC_OPC
@ ERRID_OPC_CH
@ ERRID_BUSERR_BUSERR
@ ERRID_RAM2_ECC2
@ ERRID_VREGWARN_VDIS
@ ERRID_NVM_PARITY
@ ERRID_FLASH2_CH
@ ERRID_EEPROM_ECC2
@ ERRID_RAM2_CH
@ ERRID_CFM0_CH
@ ERRID_EVSYS1_CH
@ ERRID_DIAG_VMON_UNDER
void MW_ClearCrcPeriodInterrupt(void)
Clears the flag indicating that a CRC scan period is done.
errFlag_t MW_GetClearCrcDoneError(void)
Reads and clears the flag indicating a CRC scan of Flash is done and returns the scan result.
errFlag_t MW_GetClearClockCfd0Error(void)
Reads and clears the flag indicating a clock failure detected by CFD0.
errFlag_t MW_GetClearClockCfm1Error(void)
Reads and clears the flag indicating a clock frequency error measured by CFM1.
void MW_ClearClockCfmDoneFlags(void)
Clears the Clock Frequency Measure Done (CFMDn) flags indicating that a clock frequency measurement i...
errFlag_t MW_GetClearClockCfd1Error(void)
Reads and clears the flag indicating a clock failure detected by CFD1.
errFlag_t MW_GetClearClockCfm0Error(void)
Reads and clears the flag indicating a clock frequency error measured by CFM0.
void EH_HandleError(errFlag_t flag, errId_t id)
Handles error based on configured Error ID criticality if the error flag is set.
errFlag_t MW_ClearErrorChannel(errCh_t ch)
Clears the specified error channel and confirms that the channel is cleared.
errFlag_t MW_GetErrorChannel(errCh_t ch)
Reads the status of the specified error channel.
errCh_t
Hardware error channels found in the Error Controller.
@ ERRCH_VREGFAIL
@ ERRCH_VREGWARN
void T_HandleBadInterrupt(void)
Handles bad interrupt requests that do not have a corresponding ISR for handling it.
void T_HandleErrorChInterrupt(void)
Handles Error Channel interrupts by reporting the sources of the first set Error Channel.
void T_HandleClockInterrupt(void)
Handles Clock interrupts by reporting the Error ID of any detected faults and clearing CFM done flags...
void T_HandleBodInterrupt(void)
Handles Brown-out Detector (BOD) Voltage Level Monitor (VLM) interrupt by reporting the associated Er...
void T_HandleCrcInterrupt(void)
Handles CRC Flash scanning interrupts by clearing the periodic interrupt bit and reporting the Error ...
void T_HandleNmiInterrupt(void)
Handles Non-Maskable Interrupts (NMI) by reporting the Error ID of any detected faults.
void T_HandlePowerInterrupt(void)
Handles power related interrupts by reporting the Error ID of any detected faults.
void T_HandleNvmInterrupt(void)
Handles NVM interrupts by reporting the Error ID of any detected faults.
void T_HandleSwdtInterrupt(void)
Handles SWDT interrupts by reporting the Error ID of any detected faults.
void T_HandleRamInterrupt(void)
Handles RAM interrupts by reporting the Error ID of any detected faults.
errFlag_t MW_GetClearRamParityError(void)
Reads and clears the flag indicating a bus parity error detected in the RAM controller.
errFlag_t MW_GetClearNvmEepromEcc2Error(void)
Reads and clears the flag indicating an ECC multi-bit error in EEPROM.
errFlag_t MW_GetClearNvmFlashEcc1Error(void)
Reads and clears the flag indicating a ECC single-bit error in Flash.
errFlag_t MW_GetClearCpuDataParityError(void)
Reads and clears the flag indicating a data bus parity error in the CPU.
errFlag_t MW_GetClearNvmEccCompError(void)
Reads and clears the flag indicating a ECC comparator error in the NVM controller.
errFlag_t MW_GetClearCpuInstrParityError(void)
Reads and clears the flag indicating a instruction bus parity error in the CPU.
errFlag_t MW_GetClearNvmEepromEcc1Error(void)
Reads and clears the flag indicating an ECC single-bit error in EEPROM.
errFlag_t MW_GetClearNvmParityError(void)
Reads and clears the flag indicating a bus parity error detected in the NVM controller.
errFlag_t MW_GetClearNvmFlashEcc2Error(void)
Reads and clears the flag indicating a ECC multi-bit error in Flash.
errFlag_t MW_GetClearCpuOpcodeError(void)
Reads and clears the flag indicating an illegal opcode error in the CPU.
errFlag_t MW_GetClearRamStackError(void)
Reads and clears the flag indicating a stack pointer limit error in SRAM.
errFlag_t MW_GetClearRamEccCompError(void)
Reads and clears the flag indicating a ECC comparator error in the RAM controller.
errFlag_t MW_GetClearRamEcc1Error(void)
Reads and clears the flag indicating an ECC single-bit error in SRAM.
errFlag_t MW_GetClearBusError(void)
Reads and clears the flag indicating an error in the Bus Matrix.
errFlag_t MW_GetClearRamEcc2Error(void)
Reads and clears the flag indicating an ECC multi-bit error in SRAM.
errFlag_t MW_DiagVmonOverEnd(void)
Completes error injection diagnostic to detect faults in the VMON overvoltage detector.
errFlag_t MW_GetClearVmonOverError(void)
Reads and clears the flag indicating an overvoltage error detected by the Voltage Monitor.
errFlag_t MW_GetClearVmonDiagEntryError(void)
Reads and clears the flag indicating a Diagnostic Mode entry error in the Voltage Monitor.
errFlag_t MW_GetClearVmonDiagExitError(void)
Reads and clears the flag indicating an Diagnostic Mode exit error in the Voltage Monitor.
errFlag_t MW_GetClearVmonUnderError(void)
Reads and clears the flag indicating an undervoltage error detected by the Voltage Monitor.
errFlag_t MW_GetClearVlmError(void)
Reads and clears the flag indicating a supply voltage trigger error detected by the Voltage Level Mon...
errFlag_t MW_DiagVmonUnderEnd(void)
Completes error injection diagnostic to detect faults in the VMON undervoltage detector.
errFlag_t MW_GetClearSleepError(void)
Reads and clears the flag indicating a Sleep Aborted error in the Sleep Controller.
bool MW_IsDiagVmonOverDone(void)
Checks if the VMON overvoltage error injection has been completed.
errFlag_t MW_GetClearVmonSleepEntryError(void)
Reads and clears the flag indicating a sleep mode entry error in the Voltage Monitor.
errFlag_t MW_GetClearVmonInternalError(void)
Reads and clears the flag indicating internal error in the Voltage Monitor.
bool MW_IsDiagVmonUnderDone(void)
Checks if the VMON undervoltage error injection has been completed.
errFlag_t MW_GetClearVmonDisabledError(void)
Reads and clears the flag indicating a disabled Voltage Monitor error.
#define FOREVER
Allows testing of infinite while loops by replacing the definition during testing.
errFlag_t MW_GetSwdtClearError(void)
Reads the error flag indicating a non-clear command received while expecting a clear command in the S...
errFlag_t MW_GetSwdtCounterExpiredError(void)
Reads the error flag indicating that the Synchronous Watchdog counter expired.
errFlag_t MW_GetSwdtPreclearError(void)
Reads the error flag indicating a non-preclear command received while expecting a preclear command in...
void MW_ClearSwdtErrors(void)
Clears all the error flags in the Synchronous Watchdog.
errFlag_t MW_GetSwdtUnexpectedCmdError(void)
Reads the error flag indicating a clear command received in the closed window after a preclear comman...
Implements APIs for the Power Manager Diagnostics.