Power_Ip_PMC_Irq.c 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral :
  5. * Dependencies : none
  6. *
  7. * Autosar Version : 4.4.0
  8. * Autosar Revision : ASR_REL_4_4_REV_0000
  9. * Autosar Conf.Variant :
  10. * SW Version : 1.0.0
  11. * Build Version : S32K1_RTD_1_0_0_HF01_D2109_ASR_REL_4_4_REV_0000_20210907
  12. *
  13. * (c) Copyright 2020-2021 NXP Semiconductors
  14. * All Rights Reserved.
  15. *
  16. * NXP Confidential. This software is owned or controlled by NXP and may only be
  17. * used strictly in accordance with the applicable license terms. By expressly
  18. * accepting such terms or by downloading, installing, activating and/or otherwise
  19. * using the software, you are agreeing that you have read, and that you agree to
  20. * comply with and are bound by, such license terms. If you do not agree to be
  21. * bound by the applicable license terms, then you may not retain, install,
  22. * activate or otherwise use the software.
  23. ==================================================================================================*/
  24. /**
  25. * @file Power_Ip_PMC_Irq.c
  26. * @version 1.0.0
  27. *
  28. * @brief
  29. * @brief POWER driver implementations.
  30. * @details POWER driver implementations.
  31. *
  32. * @addtogroup POWER_DRIVER Power Ip Driver
  33. * @{
  34. */
  35. #ifdef __cplusplus
  36. extern "C"{
  37. #endif
  38. /*==================================================================================================
  39. INCLUDE FILES
  40. 1) system and project includes
  41. 2) needed interfaces from external units
  42. 3) internal and external interfaces from this unit
  43. ==================================================================================================*/
  44. #include "Mcal.h"
  45. #include "Power_Ip_PMC.h"
  46. /*==================================================================================================
  47. SOURCE FILE VERSION INFORMATION
  48. =================================================================================================*/
  49. #define POWER_IP_PMC_IRQ_VENDOR_ID_C 43
  50. #define POWER_IP_PMC_IRQ_AR_RELEASE_MAJOR_VERSION_C 4
  51. #define POWER_IP_PMC_IRQ_AR_RELEASE_MINOR_VERSION_C 4
  52. #define POWER_IP_PMC_IRQ_AR_RELEASE_REVISION_VERSION_C 0
  53. #define POWER_IP_PMC_IRQ_SW_MAJOR_VERSION_C 1
  54. #define POWER_IP_PMC_IRQ_SW_MINOR_VERSION_C 0
  55. #define POWER_IP_PMC_IRQ_SW_PATCH_VERSION_C 0
  56. /*==================================================================================================
  57. FILE VERSION CHECKS
  58. ==================================================================================================*/
  59. /* Check if current file and Mcal header file are of the same version */
  60. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  61. #if ((POWER_IP_PMC_IRQ_AR_RELEASE_MAJOR_VERSION_C != MCAL_AR_RELEASE_MAJOR_VERSION) || \
  62. (POWER_IP_PMC_IRQ_AR_RELEASE_MINOR_VERSION_C != MCAL_AR_RELEASE_MINOR_VERSION) \
  63. )
  64. #error "AutoSar Version Numbers of Power_Ip_PMC_Irq.c and Mcal.h are different"
  65. #endif
  66. #endif
  67. /* Check if current file and Power_Ip_PMC_Irq header file are of the same Autosar version */
  68. #if (POWER_IP_PMC_IRQ_VENDOR_ID_C != POWER_IP_PMC_VENDOR_ID)
  69. #error "Power_Ip_PMC_Irq.c and Power_Ip_PMC.h have different vendor ids"
  70. #endif
  71. /* Check if current file and Power_Ip_PMC_Irq header file are of the same Autosar version */
  72. #if ((POWER_IP_PMC_IRQ_AR_RELEASE_MAJOR_VERSION_C != POWER_IP_PMC_AR_RELEASE_MAJOR_VERSION) || \
  73. (POWER_IP_PMC_IRQ_AR_RELEASE_MINOR_VERSION_C != POWER_IP_PMC_AR_RELEASE_MINOR_VERSION) || \
  74. (POWER_IP_PMC_IRQ_AR_RELEASE_REVISION_VERSION_C != POWER_IP_PMC_AR_RELEASE_REVISION_VERSION) \
  75. )
  76. #error "AutoSar Version Numbers of Power_Ip_PMC_Irq.c and Power_Ip_PMC.h are different"
  77. #endif
  78. /* Check if current file and Power_Ip_PMC_Irq header file are of the same Software version */
  79. #if ((POWER_IP_PMC_IRQ_SW_MAJOR_VERSION_C != POWER_IP_PMC_SW_MAJOR_VERSION) || \
  80. (POWER_IP_PMC_IRQ_SW_MINOR_VERSION_C != POWER_IP_PMC_SW_MINOR_VERSION) || \
  81. (POWER_IP_PMC_IRQ_SW_PATCH_VERSION_C != POWER_IP_PMC_SW_PATCH_VERSION) \
  82. )
  83. #error "Software Version Numbers of Power_Ip_PMC_Irq.c and Power_Ip_PMC.h are different"
  84. #endif
  85. /*==================================================================================================
  86. LOCAL TYPEDEFS (STRUCTURES, UNIONS, ENUMS)
  87. ==================================================================================================*/
  88. /*==================================================================================================
  89. * LOCAL MACROS
  90. ==================================================================================================*/
  91. /*==================================================================================================
  92. LOCAL CONSTANTS
  93. ==================================================================================================*/
  94. /*==================================================================================================
  95. LOCAL VARIABLES
  96. ==================================================================================================*/
  97. /*==================================================================================================
  98. GLOBAL CONSTANTS
  99. ==================================================================================================*/
  100. /*==================================================================================================
  101. GLOBAL VARIABLES
  102. ==================================================================================================*/
  103. /*==================================================================================================
  104. LOCAL FUNCTION PROTOTYPES
  105. ==================================================================================================*/
  106. #define MCU_START_SEC_CODE
  107. #include "Mcu_MemMap.h"
  108. #if (POWER_IP_VOLTAGE_ERROR_ISR_USED == STD_ON)
  109. ISR(Power_Ip_PMC_LowVoltage_ISR);
  110. #endif
  111. #ifdef MCU_TEMPERATURE_ERROR_ISR_USED
  112. #if (MCU_TEMPERATURE_ERROR_ISR_USED == STD_ON)
  113. ISR(Power_Ip_PMC_TemperatureError_ISR);
  114. #endif
  115. #endif
  116. /*==================================================================================================
  117. LOCAL FUNCTIONS
  118. ==================================================================================================*/
  119. /*==================================================================================================
  120. GLOBAL FUNCTIONS
  121. ==================================================================================================*/
  122. #if (POWER_IP_VOLTAGE_ERROR_ISR_USED == STD_ON)
  123. /**
  124. * @brief This function represents the ISR handler for PMC related events.
  125. * @details This interrupt is triggered if one of the enabled PMC's detect an out of range clock.
  126. *
  127. *
  128. * @isr
  129. *
  130. */
  131. ISR(Power_Ip_PMC_LowVoltage_ISR)
  132. {
  133. Power_Ip_PMC_VoltageErrorIsr();
  134. EXIT_INTERRUPT();
  135. }
  136. #endif /* (POWER_IP_VOLTAGE_ERROR_ISR_USED == STD_ON) */
  137. #ifdef MCU_TEMPERATURE_ERROR_ISR_USED
  138. #if (MCU_TEMPERATURE_ERROR_ISR_USED == STD_ON)
  139. /**
  140. * @brief This function represents the ISR handler for PMC related events.
  141. * @details This interrupt is triggered if one of the enabled PMC's detect an out of range clock.
  142. *
  143. *
  144. * @isr
  145. *
  146. */
  147. ISR(Power_Ip_PMC_TemperatureError_ISR)
  148. {
  149. Power_Ip_PMC_TemperatureErrorIsr();
  150. EXIT_INTERRUPT();
  151. }
  152. #endif /* (MCU_TEMPERATURE_ERROR_ISR_USED == STD_ON) */
  153. #endif
  154. #define MCU_STOP_SEC_CODE
  155. #include "Mcu_MemMap.h"
  156. #ifdef __cplusplus
  157. }
  158. #endif
  159. /** @} */