1 /***************************************************************************//**
2 * \file cy_sysfault.h
3 * \version 1.30
4 *
5 * \brief
6 * Provides an API declaration of the SysFault driver.
7 *
8 ********************************************************************************
9 * \copyright
10 * Copyright (c) (2020-2022), Cypress Semiconductor Corporation (an Infineon company) or
11 * an affiliate of Cypress Semiconductor Corporation.
12 * SPDX-License-Identifier: Apache-2.0
13 *
14 * Licensed under the Apache License, Version 2.0 (the "License");
15 * you may not use this file except in compliance with the License.
16 * You may obtain a copy of the License at
17 *
18 *     http://www.apache.org/licenses/LICENSE-2.0
19 *
20 * Unless required by applicable law or agreed to in writing, software
21 * distributed under the License is distributed on an "AS IS" BASIS,
22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 * See the License for the specific language governing permissions and
24 * limitations under the License.
25 *******************************************************************************/
26 
27 /**
28 * \addtogroup group_sysfault
29 * \{
30 *
31 * The SysFault driver provides an API to configure the Fault reporting structure.
32 * The functions and other declarations used in this driver are in cy_sysfault.h.
33 * You can include cy_pdl.h to get access to all functions and declarations in the PDL.
34 * This driver is only available for CAT1C, CAT1D devices.
35 *
36 * The Fault subsystem contains information about faults that occur in the system.
37 * The fault subsystem captures only faults and it does not take any action to correct it.
38 * The subsystem can cause a reset, give a pulse indication, or trigger another peripheral.
39 * CAT1C, CAT1D uses a centralized fault report structure. The centralized nature allows for a
40 * system-wide consistent handling of faults, which simplifies software development as
41 * follows only a single fault interrupt handler is required. The fault report structure
42 * provides the fault source and additional fault-specific information from a single set
43 * of memory mapped input/output (MMIO) registers, no iterative search is required for
44 * the fault source and fault information.
45 * All pending faults are available from a single set of MMIO registers. Below is the block
46 * diagram.
47 * \image html fault.png
48 *
49 * Fault IP provides fault report structure. Fault report structures capture faults.
50 * The number of fault report structures is specified by a design time configuration
51 * parameter (FAULT_NR). In CAT1C, CAT1D there are two instances of fault structures, each fault
52 * report structure has a dedicated set of MMIO control and status registers and captures
53 * a single fault. A fault report structure provides the fault source and additional fault
54 * specific information from a single set of MMIO registers. The fault structures capture
55 * faults like MPU/SMPU/PPI protection violations, peripheral specific errors, memory
56 * controller specific errors. E.g., SRAM controller ECC errors,
57 * FLASH controller read while program and ECC errors, Processor tightly coupled
58 * memory (TCM) ECC errors.
59 *
60 * System fault will be captured by fault report structures. A fault report structure
61 * provides the fault source and additional fault specific information from a single
62 * set of MMIO registers.
63 * The captured fault information includes:
64 * * A validity bit field that indicates a fault is captured.
65 * * A fault index that identifies the fault source.
66 * * Additional fault information describing fault specifics.
67 *
68 * \section group_sysfault_configuration Configuration Considerations
69 *
70 * Fault configuration includes clearing the existing fault status, enabling fault source,
71 * setting interrupt mask, and fault initialization.
72 * Below is the code snippet for the fault configuration.
73 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_Config
74 *
75 * Once the configured fault occurs, the interrupt handler will be triggered where the
76 * fault information can be captured.
77 * Below is the code snippet that can be part of a interrupt handler.
78 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_Handle_Fault
79 *
80 * \section group_sysfault_section_more_information More Information
81 *
82 * For more information on the System Fault, refer to the technical reference
83 * manual (TRM).
84 *
85 * \section group_sysfault_changelog Changelog
86 * <table class="doxtable">
87 *   <tr><th>Version</th><th>Changes</th><th>Reason for Change</th></tr>
88 *   <tr>
89 *     <td>1.30</td>
90 *     <td>Added enum \ref en_sysfault_source_t and new macros.</td>
91 *     <td>Support added for CAT1D and enabled sysfault compilation for PSoC C3 (CAT1B).</td>
92 *   </tr>
93 *   <tr>
94 *     <td>1.20</td>
95 *     <td>Updated \ref Cy_SysFault_GetErrorSource API and added new macro</td>
96 *     <td>MISRA 10.8 fix and code enhancement</td>
97 *   </tr>
98 *    <tr>
99 *     <td>1.10</td>
100 *     <td>Updated macro related to driver enablement for CAT1C without any functional impact</td>
101 *     <td>Code Enhancement</td>
102 *   </tr>
103 *   <tr>
104 *     <td>1.0</td>
105 *     <td>Initial version</td>
106 *     <td></td>
107 *   </tr>
108 * </table>
109 *
110 * \defgroup group_sysfault_macros Macros
111 * \defgroup group_sysfault_enums Enums
112 * \defgroup group_sysfault_data_structures Data Structures
113 * \defgroup group_sysfault_functions Functions
114 *
115 */
116 
117 #if !defined(CY_SYSFAULT_H)
118 #define CY_SYSFAULT_H
119 
120 #include "cy_device.h"
121 
122 #if defined(CY_IP_MXS40FAULT) || defined (CY_IP_MXFAULT)
123 #include "cy_syslib.h"
124 #include "cy_device_headers.h"
125 
126 #if defined(__cplusplus)
127 extern "C" {
128 #endif
129 
130 #if defined (CY_IP_MXS22SRSS)
131 #define cy_en_SysFault_source_t en_sysfault_source_t
132 #define CY_SYSFAULT_NO_FAULT (((uint8_t)M33SYSCPUSS_RRAMC_MMIO_PC_LOCK_FAULT) + 1U)
133 #endif
134 
135 /*******************************************************************************
136 *       Function Constants
137 *******************************************************************************/
138 
139 /**
140 * \addtogroup group_sysfault_macros
141 * \{
142 */
143 
144 /** Driver major version */
145 #define CY_SYSFAULT_DRV_VERSION_MAJOR    1
146 
147 /** Driver minor version */
148 #define CY_SYSFAULT_DRV_VERSION_MINOR    30
149 
150 /** Driver ID */
151 #define CY_SYSFAULT_ID CY_PDL_DRV_ID     (0x76U)
152 
153 /** \cond INTERNAL */
154 
155 /* Macro to validate parameters in Cy_SysFault_GetFaultData() function */
156 #define CY_SYSFAULT_IS_DATA_SET_VALID(dataSet)     (((dataSet) == CY_SYSFAULT_DATA0) || \
157                                                     ((dataSet) == CY_SYSFAULT_DATA1) || \
158                                                     ((dataSet) == CY_SYSFAULT_DATA2) || \
159                                                     ((dataSet) == CY_SYSFAULT_DATA3))
160 
161 /* Macro to validate parameters in Cy_SysFault_GetPendingFault() function */
162 #define CY_SYSFAULT_IS_FAULT_SET_VALID(pendingFault)  (((pendingFault) == CY_SYSFAULT_SET0) || \
163                                                        ((pendingFault) == CY_SYSFAULT_SET1) || \
164                                                        ((pendingFault) == CY_SYSFAULT_SET2))
165 #if defined (CY_IP_MXS40SSRSS)
166 #define cy_en_SysFault_source_t en_sysfault_source_t
167 #define CY_SYSFAULT_NO_FAULT (((uint8_t)SRSS_FAULT_SSV) + 1U)
168 #endif
169 
170 /** \endcond */
171 
172 
173 /** \} group_sysfault_macros */
174 
175 
176 /**
177 * \addtogroup group_sysfault_enums
178 * \{
179 */
180 
181 /**
182 * SysFault driver error codes
183 */
184 typedef enum
185 {
186     CY_SYSFAULT_SUCCESS   = 0x0UL, /**< Returned successful */
187     CY_SYSFAULT_BAD_PARAM = CY_SYSFAULT_ID | CY_PDL_STATUS_ERROR | 0x1UL, /**< Bad parameter was passed */
188 } cy_en_SysFault_status_t;
189 
190 /**
191 * SysFault pending Fault source set.
192 */
193 typedef enum
194 {
195     CY_SYSFAULT_SET0 = 0UL, /**< Set of Faults in the range of 0-31 Fault ID */
196     CY_SYSFAULT_SET1 = 1UL, /**< Set of Faults in the range of 32-63  Fault ID */
197     CY_SYSFAULT_SET2 = 2UL, /**< Set of Faults in the range of 64-95 Fault ID */
198 } cy_en_SysFault_Set_t;
199 
200 /**
201 * Instances of Fault data register.
202 */
203 typedef enum
204 {
205     CY_SYSFAULT_DATA0 = 0UL, /**< Used to get the Fault data for DATA0 register */
206     CY_SYSFAULT_DATA1=  1UL, /**< Used to get the Fault data for DATA1 register */
207     CY_SYSFAULT_DATA2 = 2UL, /**< Used to get the Fault data for DATA2 register */
208     CY_SYSFAULT_DATA3=  3UL, /**< Used to get the Fault data for DATA3 register */
209 } cy_en_SysFault_Data_t;
210 
211 /** \cond INTERNAL */
212 /* Enumeration below is only for documentation purpose.
213  * Actual enumeration values come from generated headers. */
214 /** \endcond */
215 
216 #if defined(CY_DOXYGEN)
217 /**
218 * SysFault sources for CAT1D Family of devices.
219 */
220 typedef enum
221 {   PERI_0_PERI_MS0_PPC_VIO         = 0x0000u, /**< PERI0 master interface PPC violation */
222     PERI_0_PERI_MS1_PPC_VIO         = 0x0001u, /**< PERI0 master interface PPC violation */
223     PERI_0_PERI_PPC_PC_MASK_VIO     = 0x0002u, /**< PERI0 peripheral PPC PC mask violation */
224     PERI_0_PERI_GP1_TIMEOUT_VIO     = 0x0003u, /**< PERI0 peripheral group 1 AHB timeout */
225     PERI_0_PERI_GP2_TIMEOUT_VIO     = 0x0004u, /**< PERI0 peripheral group 2 AHB timeout */
226     PERI_0_PERI_GP3_TIMEOUT_VIO     = 0x0005u, /**< PERI0 peripheral group 3 AHB timeout */
227     PERI_0_PERI_GP4_TIMEOUT_VIO     = 0x0006u, /**<    PERI0 peripheral group 4 AHB timeout */
228     PERI_0_PERI_GP5_TIMEOUT_VIO     = 0x0007u, /**<    PERI0 peripheral group 5 AHB timeout */
229     PERI_0_PERI_GP0_AHB_VIO         = 0x0008u, /**< PERI0 peripheral group 0 AHB violation */
230     PERI_0_PERI_GP1_AHB_VIO         = 0x0009u, /**< PERI0 peripheral group 1 AHB violation */
231     PERI_0_PERI_GP2_AHB_VIO         = 0x000Au, /**< PERI0 peripheral group 2 AHB violation */
232     PERI_0_PERI_GP3_AHB_VIO         = 0x000Bu, /**< PERI0 peripheral group 3 AHB violation */
233     PERI_0_PERI_GP4_AHB_VIO         = 0x000Cu, /**< PERI0 peripheral group 4 AHB violation */
234     PERI_0_PERI_GP5_AHB_VIO         = 0x000Du, /**< PERI0 peripheral group 5 AHB violation */
235     PERI_1_PERI_MS0_PPC_VIO         = 0x000Eu, /**< PERI1 master interface PPC violation */
236     PERI_1_PERI_MS1_PPC_VIO         = 0x000Fu, /**< PERI1 master interface PPC violation */
237     PERI_1_PERI_PPC_PC_MASK_VIO     = 0x0010u, /**< PERI1 peripheral PPC PC mask violation */
238     PERI_1_PERI_GP1_TIMEOUT_VIO     = 0x0011u, /**< PERI1 peripheral group 1 AHB timeout */
239     PERI_1_PERI_GP2_TIMEOUT_VIO     = 0x0012u, /**< PERI1 peripheral group 2 AHB timeout */
240     PERI_1_PERI_GP3_TIMEOUT_VIO     = 0x0013u, /**< PERI1 peripheral group 3 AHB timeout */
241     PERI_1_PERI_GP4_TIMEOUT_VIO     = 0x0014u, /**<    PERI1 peripheral group 4 AHB timeout */
242     PERI_1_PERI_GP0_AHB_VIO         = 0x0015u, /**< PERI1 peripheral group 0 AHB violation */
243     PERI_1_PERI_GP1_AHB_VIO         = 0x0016u, /**< PERI1 peripheral group 1 AHB violation */
244     PERI_1_PERI_GP2_AHB_VIO         = 0x0017u, /**< PERI1 peripheral group 2 AHB violation */
245     PERI_1_PERI_GP3_AHB_VIO         = 0x0018u, /**< PERI1 peripheral group 3 AHB violation */
246     PERI_1_PERI_GP4_AHB_VIO         = 0x0019u, /**< PERI1 peripheral group 4 AHB violation */
247     M33SYSCPUSS_RAMC0_MPC_FAULT_MMIO = 0x001Au, /**< RAMC-0 MPC Fault */
248     M33SYSCPUSS_RAMC1_MPC_FAULT_MMIO = 0x001Bu, /**< RAMC-1 MPC Fault */
249     M33SYSCPUSS_RRAMC_HOST_IF_MPC_FAULT = 0x001Cu, /**< RRAM Controller Host interface MPC Fault */
250     M33SYSCPUSS_RRAMC_HOST_IF_OTP_WR_TAG_ERROR_FAULT = 0x001Du, /**<     RRAMC OTP tag bit violation*/
251     M33SYSCPUSS_RRAMC_POST_READ_TAG_MISMATCH_FAULT = 0x001Eu, /**< RRAMC post-read tag bit violation */
252     M33SYSCPUSS_RRAMC_POST_READ_ADDR_CHECKER_ALARM_FAULT = 0x001Fu, /**< RRAMC post-read address violation */
253     M33SYSCPUSS_RRAMC_INCOMPLETE_WRITE_FAULT = 0x0020u, /**<     RRAMC NVM indirect sequence incomplete */
254     M33SYSCPUSS_RRAMC_NVM_ADDRESS_MISMATCH_FAULT = 0x0021u, /**< RRAMC SFR NVM address mismatch */
255     M33SYSCPUSS_RRAMC_MMIO_PROTECTED_LOCKABLE_FAULT = 0x0022u, /**< RRAMC protected NVM lock fault */
256     M33SYSCPUSS_RRAMC_MMIO_UDS_CTRL_FAULT = 0x0023u, /**< RRAMC invalid unique device secret lock */
257     M33SYSCPUSS_RRAMC_NVM_TRAP_FAULT = 0x0024u, /**< Trap signal from RRAM */
258     M33SYSCPUSS_RRAMC_NVM_IR_ECCLOG_FAULT = 0x0025u, /**< RRAM ECC failure threshold exceeded */
259     M33SYSCPUSS_EXP_MS_AHB_ERROR_MMIO = 0x0026u, /**< Fault generated due to AHB error on EXP bridge*/
260     M55APPCPUSS_APP_SYS_BR_ERROR_MMIO = 0x0027u, /**< sys to app bridge error fault interface */
261     M55APPCPUSS_SYS_APP_BR_ERROR_MMIO = 0x0028u, /**< app to sys bridge error fault interface */
262     M0SECCPUSS_FAULT_M0SEC          = 0x0029u, /**< Secure Enclave Fault Interface */
263     SRSS_FAULT_CSV                  = 0x002Au, /**< SRSS clock supervision fault */
264     SMIF_FAULT_MXSMIF_TOP           = 0x002Du, /**< SMIF MPC violation */
265     SOCMEM_SOCMEM_MPC               = 0x002Eu, /**< SOCMEM MPC violation */
266     SOCMEM_SOCMEM_AHB_ERROR         = 0x002Fu, /**< SocMEM AHB error */
267     M33SYSCPUSS_RRAMC_INVALID_LCS_FAULT = 0x0030u, /**< RRAMC invalid life cycle state */
268     M33SYSCPUSS_RRAMC_MMIO_RECLAIMED_REGION_SIZE_FAULT = 0x0031u, /**< RRAMC invalid reclaimed size */
269     M33SYSCPUSS_RRAMC_RRAM_SFR_NVM_HRESP_FAULT = 0x0032u, /**< RRAMC AHB bus error*/
270     M33SYSCPUSS_RRAMC_BANK_MAPPING_FAULT = 0x0033u, /**< RRAMC invalid bank mapping */
271     M33SYSCPUSS_RRAMC_MMIO_TB_GATING_CTL_FAULT = 0x0034u, /**< RRAMC invalid turn-off tag bit gating control */
272     M33SYSCPUSS_RRAMC_MMIO_PC_LOCK_FAULT = 0x0035u /**< RRAMC invalid protection context lock */
273 } en_sysfault_source_t;
274 #endif
275 
276 /** \} group_sysfault_enums */
277 
278 
279 /***************************************
280 *       Configuration Structure
281 ***************************************/
282 
283 /**
284 * \addtogroup group_sysfault_data_structures
285 * \{
286 */
287 
288 /**
289 * Configuration structure for a Fault control register.
290 */
291 typedef struct {
292     bool       TriggerEnable;    /**< Enables the trigger output when it is True */
293     bool       OutputEnable;    /**< Enables the output signal when it is True */
294     bool       ResetEnable;     /**< Enables the Reset request  when it is True */
295 } cy_stc_SysFault_t;
296 
297 /** \} group_sysfault_data_structures */
298 
299 
300 /***************************************
301 *       Function Prototypes
302 ***************************************/
303 
304 /**
305 * \addtogroup group_sysfault_functions
306 * \{
307 */
308 
309 /*******************************************************************************
310 * Function Name: Cy_SysFault_Init
311 ****************************************************************************//**
312 *
313 * \brief
314 * Initializes the SysFault for recording faults.
315 *
316 * \param base
317 * The pointer to a Fault structure instance.
318 *
319 * \param config
320 * The pointer to a Configuration structure.
321 *
322 * \return
323 * Fault status. Refer \ref cy_en_SysFault_status_t
324 *
325 * \funcusage
326 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_Config
327 *
328 *******************************************************************************/
329 cy_en_SysFault_status_t Cy_SysFault_Init(FAULT_STRUCT_Type *base, cy_stc_SysFault_t *config);
330 
331 
332 /*******************************************************************************
333 * Function Name: Cy_SysFault_ClearStatus
334 ****************************************************************************//**
335 *
336 * \brief
337 * Clears status register.
338 *
339 * \param base
340 * The pointer to a Fault structure instance.
341 *
342 * \funcusage
343 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_Config
344 *
345 *******************************************************************************/
346 void Cy_SysFault_ClearStatus(FAULT_STRUCT_Type *base);
347 
348 
349 /*******************************************************************************
350 * Function Name: Cy_SysFault_GetErrorSource
351 ****************************************************************************//**
352 *
353 * \brief
354 * Returns the source of error for the Fault.
355 *
356 * \param  base
357 * The pointer to a Fault structure instance.
358 *
359 * \return
360 * Fault source.
361 *
362 * \funcusage
363 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_Handle_Fault
364 *
365 *******************************************************************************/
366 cy_en_SysFault_source_t Cy_SysFault_GetErrorSource(FAULT_STRUCT_Type *base);
367 
368 
369 /*******************************************************************************
370 * Function Name: Cy_SysFault_GetFaultData
371 ****************************************************************************//**
372 *
373 * \brief
374 * Returns the Fault information for the provided dataSet.
375 *
376 * \param base
377 * The pointer to a Fault structure instance.
378 *
379 * \param dataSet
380 * Instance of data register.
381 *
382 * \return
383 * Fault information.
384 *
385 * \funcusage
386 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_Handle_Fault
387 *
388 *******************************************************************************/
389 uint32_t Cy_SysFault_GetFaultData(FAULT_STRUCT_Type *base, cy_en_SysFault_Data_t dataSet);
390 
391 
392 /*******************************************************************************
393 * Function Name: Cy_SysFault_GetPendingFault
394 ****************************************************************************//**
395 *
396 * \brief
397 * Returns the sources of pending fault that are not captured.
398 *
399 * \param base
400 * The pointer to a Fault structure instance.
401 *
402 * \param pendingFault
403 * Instance of PENDING register. PENDING0 returns the occurred pending Faults in the range of 0-31 Fault ID.
404 *
405 * \return
406 * The status of pending Faults.
407 *
408 * \funcusage
409 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_PendingFault
410 *
411 *******************************************************************************/
412 uint32_t Cy_SysFault_GetPendingFault(FAULT_STRUCT_Type *base, cy_en_SysFault_Set_t pendingFault);
413 
414 
415 /*******************************************************************************
416 * Function Name: Cy_SysFault_SetMaskByIdx
417 ****************************************************************************//**
418 *
419 * \brief
420 * Enable the Fault to be captured.
421 *
422 * \param base
423 * The pointer to a Fault structure instance.
424 *
425 * \param idx
426 * The Fault id to be set in the mask register.
427 *
428 * \return
429 * None.
430 *
431 * \funcusage
432 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_Config
433 *
434 *******************************************************************************/
435 void Cy_SysFault_SetMaskByIdx(FAULT_STRUCT_Type *base, cy_en_SysFault_source_t idx);
436 
437 
438 /*******************************************************************************
439 * Function Name: Cy_SysFault_ClearMaskByIdx
440 ****************************************************************************//**
441 *
442 * \brief
443 * Disable the faults to be captured.
444 *
445 * \param base
446 * The pointer to a Fault structure instance.
447 *
448 * \param idx
449 * The fault id to be cleared in the mask register.
450 *
451 * \return
452 * None.
453 *
454 * \funcusage
455 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_PendingFault
456 *
457 *******************************************************************************/
458 void Cy_SysFault_ClearMaskByIdx(FAULT_STRUCT_Type *base, cy_en_SysFault_source_t idx);
459 
460 
461 /*******************************************************************************
462 * Function Name: Cy_SysFault_GetInterruptStatus
463 ****************************************************************************//**
464 *
465 * \brief
466 * Returns the status of the interrupt.
467 *
468 * \param base
469 * The pointer to a Fault structure instance.
470 *
471 * \return
472 * Interrupt status.
473 *
474 * \funcusage
475 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_Handle_Fault
476 *
477 *******************************************************************************/
478 uint32_t Cy_SysFault_GetInterruptStatus(FAULT_STRUCT_Type *base);
479 
480 
481 /*******************************************************************************
482 * Function Name: Cy_SysFault_ClearInterrupt
483 ****************************************************************************//**
484 *
485 * \brief
486 * Clears Active Interrupt Source.
487 *
488 * \param base
489 * The pointer to a Fault structure instance.
490 *
491 * \return
492 * None.
493 *
494 * \funcusage
495 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_Handle_Fault
496 *
497 *******************************************************************************/
498 void Cy_SysFault_ClearInterrupt(FAULT_STRUCT_Type *base);
499 
500 
501 /*******************************************************************************
502 * Function Name: Cy_SysFault_SetInterrupt
503 ****************************************************************************//**
504 *
505 * \brief
506 * Triggers an interrupt via a software write.
507 *
508 * \param base
509 * The pointer to a Fault structure instance.
510 *
511 * \return
512 * None.
513 *
514 * \funcusage
515 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_Config
516 *
517 *******************************************************************************/
518 void Cy_SysFault_SetInterrupt(FAULT_STRUCT_Type *base);
519 
520 
521 /*******************************************************************************
522 * Function Name: Cy_SysFault_SetInterruptMask
523 ****************************************************************************//**
524 *
525 * \brief
526 * Sets an interrupt mask.
527 *
528 * \param base
529 * The pointer to a Fault structure instance.
530 *
531 * \return
532 * None.
533 *
534 * \funcusage
535 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_Config
536 *
537 *******************************************************************************/
538 void Cy_SysFault_SetInterruptMask(FAULT_STRUCT_Type *base);
539 
540 
541 /*******************************************************************************
542 * Function Name: Cy_SysFault_ClearInterruptMask
543 ****************************************************************************//**
544 *
545 * \brief
546 * Clears an interrupt mask.
547 *
548 * \param base
549 * The pointer to a Fault structure instance.
550 *
551 * \return
552 * None.
553 *
554 * \funcusage
555 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_Handle_Fault
556 *
557 *******************************************************************************/
558 void Cy_SysFault_ClearInterruptMask(FAULT_STRUCT_Type *base);
559 
560 
561 /*******************************************************************************
562 * Function Name: Cy_SysFault_GetInterruptMask
563 ****************************************************************************//**
564 *
565 * \brief Returns the interrupt mask.
566 *
567 * \param  base
568 * The pointer to a Fault structure instance.
569 *
570 * \return
571 * Interrupt Mask.
572 *
573 * \funcusage
574 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_Handle_Fault
575 *
576 *******************************************************************************/
577 uint32_t Cy_SysFault_GetInterruptMask(FAULT_STRUCT_Type *base);
578 
579 
580 /*******************************************************************************
581 * Function Name: Cy_SysFault_GetInterruptStatusMasked
582 ****************************************************************************//**
583 *
584 * \brief
585 * Returns whether masked interrupt triggered the interrupt.
586 *
587 * \param base
588 * The pointer to a Fault structure instance.
589 *
590 * \return
591 * Interrupt Mask.
592 *
593 * \funcusage
594 * \snippet sysfault/snippet/main.c snippet_Cy_SysFault_Handle_Fault
595 *
596 *******************************************************************************/
597 uint32_t Cy_SysFault_GetInterruptStatusMasked(FAULT_STRUCT_Type *base);
598 
599 /** \} group_sysfault_functions */
600 
601 
602 #if defined(__cplusplus)
603 }
604 #endif
605 
606 #endif /* CY_IP_M7CPUSS */
607 
608 #endif /* CY_SYSFAULT_H */
609 
610 /** \} group_sysfault */
611 
612 /* [] END OF FILE */
613