IntCtrl_Ip_Cfg.c 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /*==================================================================================================
  28. INCLUDE FILES
  29. ==================================================================================================*/
  30. #include "IntCtrl_Ip_Cfg.h"
  31. /*==================================================================================================
  32. * SOURCE FILE VERSION INFORMATION
  33. ==================================================================================================*/
  34. #define PLATFORM_INTCTRL_IP_CFG_VENDOR_ID_C 43
  35. #define PLATFORM_INTCTRL_IP_CFG_SW_MAJOR_VERSION_C 1
  36. #define PLATFORM_INTCTRL_IP_CFG_SW_MINOR_VERSION_C 0
  37. #define PLATFORM_INTCTRL_IP_CFG_SW_PATCH_VERSION_C 0
  38. /*==================================================================================================
  39. FILE VERSION CHECKS
  40. ==================================================================================================*/
  41. /* Check if current file and IntCtrl_Ip_Cfg header file are of the same vendor */
  42. #if (PLATFORM_INTCTRL_IP_CFG_VENDOR_ID_C != PLATFORM_INTCTRL_IP_CFG_VENDOR_ID)
  43. #error "IntCtrl_Ip_Cfg.c and IntCtrl_Ip_Cfg.h have different vendor ids"
  44. #endif
  45. /* Check if current file and IntCtrl_Ip_Cfg header file are of the same Software version */
  46. #if ((PLATFORM_INTCTRL_IP_CFG_SW_MAJOR_VERSION_C != PLATFORM_INTCTRL_IP_CFG_SW_MAJOR_VERSION) || \
  47. (PLATFORM_INTCTRL_IP_CFG_SW_MINOR_VERSION_C != PLATFORM_INTCTRL_IP_CFG_SW_MINOR_VERSION) || \
  48. (PLATFORM_INTCTRL_IP_CFG_SW_PATCH_VERSION_C != PLATFORM_INTCTRL_IP_CFG_SW_PATCH_VERSION) \
  49. )
  50. #error "Software Version Numbers of IntCtrl_Ip_Cfg.c and IntCtrl_Ip_Cfg.h are different"
  51. #endif
  52. /*==================================================================================================
  53. GLOBAL VARIABLES
  54. ==================================================================================================*/
  55. #define PLATFORM_START_SEC_CONFIG_DATA_UNSPECIFIED
  56. #include "Platform_MemMap.h"
  57. /* List of configurations for interrupts */
  58. static const IntCtrl_Ip_IrqConfigType aIrqConfiguration[] = {
  59. {DMA0_IRQn, (boolean)TRUE, 0U},
  60. {DMA1_IRQn, (boolean)TRUE, 0U},
  61. {DMA2_IRQn, (boolean)TRUE, 0U},
  62. {DMA3_IRQn, (boolean)TRUE, 3U},
  63. {DMA4_IRQn, (boolean)TRUE, 3U},
  64. {DMA5_IRQn, (boolean)TRUE, 3U},
  65. {DMA6_IRQn, (boolean)FALSE, 0U},
  66. {DMA7_IRQn, (boolean)FALSE, 0U},
  67. {DMA8_IRQn, (boolean)FALSE, 0U},
  68. {DMA9_IRQn, (boolean)FALSE, 0U},
  69. {DMA10_IRQn, (boolean)FALSE, 0U},
  70. {DMA11_IRQn, (boolean)FALSE, 0U},
  71. {DMA12_IRQn, (boolean)FALSE, 0U},
  72. {DMA13_IRQn, (boolean)FALSE, 0U},
  73. {DMA14_IRQn, (boolean)FALSE, 0U},
  74. {DMA15_IRQn, (boolean)FALSE, 0U},
  75. {DMA_Error_IRQn, (boolean)FALSE, 0U},
  76. {MCM_IRQn, (boolean)FALSE, 0U},
  77. {FTFC_CMD_IRQn, (boolean)FALSE, 0U},
  78. {FTFC_Read_Collision_IRQn, (boolean)FALSE, 0U},
  79. {LVD_LVW_IRQn, (boolean)FALSE, 0U},
  80. {FTFC_Fault_IRQn, (boolean)FALSE, 0U},
  81. {WDOG_EWM_IRQn, (boolean)FALSE, 0U},
  82. {RCM_IRQn, (boolean)FALSE, 0U},
  83. {LPI2C0_Master_IRQn, (boolean)TRUE, 0U},
  84. {LPI2C0_Slave_IRQn, (boolean)TRUE, 0U},
  85. {LPSPI0_IRQn, (boolean)FALSE, 0U},
  86. {LPSPI1_IRQn, (boolean)FALSE, 0U},
  87. {LPSPI2_IRQn, (boolean)TRUE, 0U},
  88. {LPUART0_RxTx_IRQn, (boolean)TRUE, 3U},
  89. {LPUART1_RxTx_IRQn, (boolean)TRUE, 3U},
  90. {LPUART2_RxTx_IRQn, (boolean)TRUE, 3U},
  91. {ADC0_IRQn, (boolean)FALSE, 0U},
  92. {ADC1_IRQn, (boolean)FALSE, 0U},
  93. {CMP0_IRQn, (boolean)FALSE, 0U},
  94. {ERM_single_fault_IRQn, (boolean)FALSE, 0U},
  95. {ERM_double_fault_IRQn, (boolean)FALSE, 0U},
  96. {RTC_IRQn, (boolean)FALSE, 0U},
  97. {RTC_Seconds_IRQn, (boolean)FALSE, 0U},
  98. {LPIT0_Ch0_IRQn, (boolean)FALSE, 0U},
  99. {LPIT0_Ch1_IRQn, (boolean)FALSE, 0U},
  100. {LPIT0_Ch2_IRQn, (boolean)FALSE, 0U},
  101. {LPIT0_Ch3_IRQn, (boolean)FALSE, 0U},
  102. {PDB0_IRQn, (boolean)FALSE, 0U},
  103. {SCG_IRQn, (boolean)FALSE, 0U},
  104. {LPTMR0_IRQn, (boolean)FALSE, 0U},
  105. {PORTA_IRQn, (boolean)FALSE, 0U},
  106. {PORTB_IRQn, (boolean)FALSE, 0U},
  107. {PORTC_IRQn, (boolean)FALSE, 0U},
  108. {PORTD_IRQn, (boolean)FALSE, 0U},
  109. {PORTE_IRQn, (boolean)FALSE, 0U},
  110. {SWI_IRQn, (boolean)FALSE, 0U},
  111. {PDB1_IRQn, (boolean)FALSE, 0U},
  112. {FLEXIO_IRQn, (boolean)FALSE, 0U},
  113. {CAN0_ORed_IRQn, (boolean)TRUE, 0U},
  114. {CAN0_Error_IRQn, (boolean)TRUE, 0U},
  115. {CAN0_Wake_Up_IRQn, (boolean)TRUE, 0U},
  116. {CAN0_ORed_0_15_MB_IRQn, (boolean)TRUE, 0U},
  117. {CAN0_ORed_16_31_MB_IRQn, (boolean)TRUE, 0U},
  118. {CAN1_ORed_IRQn, (boolean)TRUE, 0U},
  119. {CAN1_Error_IRQn, (boolean)TRUE, 0U},
  120. {CAN1_ORed_0_15_MB_IRQn, (boolean)TRUE, 0U},
  121. {CAN1_ORed_16_31_MB_IRQn, (boolean)TRUE, 0U},
  122. {CAN2_ORed_IRQn, (boolean)FALSE, 0U},
  123. {CAN2_Error_IRQn, (boolean)FALSE, 0U},
  124. {CAN2_ORed_0_15_MB_IRQn, (boolean)FALSE, 0U},
  125. {FTM0_Ch0_Ch1_IRQn, (boolean)FALSE, 0U},
  126. {FTM0_Ch2_Ch3_IRQn, (boolean)FALSE, 0U},
  127. {FTM0_Ch4_Ch5_IRQn, (boolean)FALSE, 0U},
  128. {FTM0_Ch6_Ch7_IRQn, (boolean)FALSE, 0U},
  129. {FTM0_Fault_IRQn, (boolean)FALSE, 0U},
  130. {FTM0_Ovf_Reload_IRQn, (boolean)FALSE, 0U},
  131. {FTM1_Ch0_Ch1_IRQn, (boolean)FALSE, 0U},
  132. {FTM1_Ch2_Ch3_IRQn, (boolean)FALSE, 0U},
  133. {FTM1_Ch4_Ch5_IRQn, (boolean)FALSE, 0U},
  134. {FTM1_Ch6_Ch7_IRQn, (boolean)FALSE, 0U},
  135. {FTM1_Fault_IRQn, (boolean)FALSE, 0U},
  136. {FTM1_Ovf_Reload_IRQn, (boolean)FALSE, 0U},
  137. {FTM2_Ch0_Ch1_IRQn, (boolean)FALSE, 0U},
  138. {FTM2_Ch2_Ch3_IRQn, (boolean)FALSE, 0U},
  139. {FTM2_Ch4_Ch5_IRQn, (boolean)FALSE, 0U},
  140. {FTM2_Ch6_Ch7_IRQn, (boolean)FALSE, 0U},
  141. {FTM2_Fault_IRQn, (boolean)FALSE, 0U},
  142. {FTM2_Ovf_Reload_IRQn, (boolean)FALSE, 0U},
  143. {FTM3_Ch0_Ch1_IRQn, (boolean)FALSE, 0U},
  144. {FTM3_Ch2_Ch3_IRQn, (boolean)FALSE, 0U},
  145. {FTM3_Ch4_Ch5_IRQn, (boolean)FALSE, 0U},
  146. {FTM3_Ch6_Ch7_IRQn, (boolean)FALSE, 0U},
  147. {FTM3_Fault_IRQn, (boolean)FALSE, 0U},
  148. {FTM3_Ovf_Reload_IRQn, (boolean)FALSE, 0U},
  149. {FTM4_Ch0_Ch1_IRQn, (boolean)FALSE, 0U},
  150. {FTM4_Ch2_Ch3_IRQn, (boolean)FALSE, 0U},
  151. {FTM4_Ch4_Ch5_IRQn, (boolean)FALSE, 0U},
  152. {FTM4_Ch6_Ch7_IRQn, (boolean)FALSE, 0U},
  153. {FTM4_Fault_IRQn, (boolean)FALSE, 0U},
  154. {FTM4_Ovf_Reload_IRQn, (boolean)FALSE, 0U},
  155. {FTM5_Ch0_Ch1_IRQn, (boolean)FALSE, 0U},
  156. {FTM5_Ch2_Ch3_IRQn, (boolean)FALSE, 0U},
  157. {FTM5_Ch4_Ch5_IRQn, (boolean)FALSE, 0U},
  158. {FTM5_Ch6_Ch7_IRQn, (boolean)FALSE, 0U},
  159. {FTM5_Fault_IRQn, (boolean)FALSE, 0U},
  160. {FTM5_Ovf_Reload_IRQn, (boolean)FALSE, 0U},
  161. };
  162. /* Configuration structure for interrupt controller */
  163. const IntCtrl_Ip_CtrlConfigType intCtrlConfig = {
  164. 102U,
  165. aIrqConfiguration
  166. };
  167. /* List of configurations for routing interrupts */
  168. static const IntCtrl_Ip_IrqRouteConfigType aIrqRouteConfig[] = {
  169. {DMA0_IRQn, 0U, Dma0_Ch0_IRQHandler},
  170. {DMA1_IRQn, 0U, Dma0_Ch1_IRQHandler},
  171. {DMA2_IRQn, 0U, Dma0_Ch2_IRQHandler},
  172. {DMA3_IRQn, 0U, Dma0_Ch3_IRQHandler},
  173. {DMA4_IRQn, 0U, Dma0_Ch4_IRQHandler},
  174. {DMA5_IRQn, 0U, Dma0_Ch5_IRQHandler},
  175. {DMA6_IRQn, 0U, undefined_handler},
  176. {DMA7_IRQn, 0U, undefined_handler},
  177. {DMA8_IRQn, 0U, undefined_handler},
  178. {DMA9_IRQn, 0U, undefined_handler},
  179. {DMA10_IRQn, 0U, undefined_handler},
  180. {DMA11_IRQn, 0U, undefined_handler},
  181. {DMA12_IRQn, 0U, undefined_handler},
  182. {DMA13_IRQn, 0U, undefined_handler},
  183. {DMA14_IRQn, 0U, undefined_handler},
  184. {DMA15_IRQn, 0U, undefined_handler},
  185. {DMA_Error_IRQn, 0U, undefined_handler},
  186. {MCM_IRQn, 0U, undefined_handler},
  187. {FTFC_CMD_IRQn, 0U, undefined_handler},
  188. {FTFC_Read_Collision_IRQn, 0U, undefined_handler},
  189. {LVD_LVW_IRQn, 0U, undefined_handler},
  190. {FTFC_Fault_IRQn, 0U, undefined_handler},
  191. {WDOG_EWM_IRQn, 0U, undefined_handler},
  192. {RCM_IRQn, 0U, undefined_handler},
  193. {LPI2C0_Master_IRQn, 0U, undefined_handler},
  194. {LPI2C0_Slave_IRQn, 0U, undefined_handler},
  195. {LPSPI0_IRQn, 0U, undefined_handler},
  196. {LPSPI1_IRQn, 0U, undefined_handler},
  197. {LPSPI2_IRQn, 0U, undefined_handler},
  198. {LPUART0_RxTx_IRQn, 0U, LPUART_UART_IP_0_IRQHandler},
  199. {LPUART1_RxTx_IRQn, 0U, LPUART_UART_IP_1_IRQHandler},
  200. {LPUART2_RxTx_IRQn, 0U, LPUART_UART_IP_2_IRQHandler},
  201. {ADC0_IRQn, 0U, undefined_handler},
  202. {ADC1_IRQn, 0U, undefined_handler},
  203. {CMP0_IRQn, 0U, undefined_handler},
  204. {ERM_single_fault_IRQn, 0U, undefined_handler},
  205. {ERM_double_fault_IRQn, 0U, undefined_handler},
  206. {RTC_IRQn, 0U, undefined_handler},
  207. {RTC_Seconds_IRQn, 0U, undefined_handler},
  208. {LPIT0_Ch0_IRQn, 0U, undefined_handler},
  209. {LPIT0_Ch1_IRQn, 0U, undefined_handler},
  210. {LPIT0_Ch2_IRQn, 0U, undefined_handler},
  211. {LPIT0_Ch3_IRQn, 0U, undefined_handler},
  212. {PDB0_IRQn, 0U, undefined_handler},
  213. {SCG_IRQn, 0U, undefined_handler},
  214. {LPTMR0_IRQn, 0U, undefined_handler},
  215. {PORTA_IRQn, 0U, undefined_handler},
  216. {PORTB_IRQn, 0U, undefined_handler},
  217. {PORTC_IRQn, 0U, undefined_handler},
  218. {PORTD_IRQn, 0U, undefined_handler},
  219. {PORTE_IRQn, 0U, undefined_handler},
  220. {SWI_IRQn, 0U, undefined_handler},
  221. {PDB1_IRQn, 0U, undefined_handler},
  222. {FLEXIO_IRQn, 0U, MCL_FLEXIO_ISR},
  223. {CAN0_ORed_IRQn, 0U, CAN0_ORED_IRQHandler},
  224. {CAN0_Error_IRQn, 0U, CAN0_Error_IRQHandler},
  225. {CAN0_Wake_Up_IRQn, 0U, CAN0_Wake_Up_IRQHandler},
  226. {CAN0_ORed_0_15_MB_IRQn, 0U, CAN0_ORED_0_15_MB_IRQHandler},
  227. {CAN0_ORed_16_31_MB_IRQn, 0U, CAN0_ORED_16_31_MB_IRQHandler},
  228. {CAN1_ORed_IRQn, 0U, CAN1_ORED_IRQHandler},
  229. {CAN1_Error_IRQn, 0U, CAN1_Error_IRQHandler},
  230. {CAN1_ORed_0_15_MB_IRQn, 0U, CAN1_ORED_0_15_MB_IRQHandler},
  231. {CAN1_ORed_16_31_MB_IRQn, 0U, CAN1_ORED_16_31_MB_IRQHandler},
  232. {CAN2_ORed_IRQn, 0U, undefined_handler},
  233. {CAN2_Error_IRQn, 0U, undefined_handler},
  234. {CAN2_ORed_0_15_MB_IRQn, 0U, undefined_handler},
  235. {FTM0_Ch0_Ch1_IRQn, 0U, undefined_handler},
  236. {FTM0_Ch2_Ch3_IRQn, 0U, undefined_handler},
  237. {FTM0_Ch4_Ch5_IRQn, 0U, undefined_handler},
  238. {FTM0_Ch6_Ch7_IRQn, 0U, undefined_handler},
  239. {FTM0_Fault_IRQn, 0U, undefined_handler},
  240. {FTM0_Ovf_Reload_IRQn, 0U, undefined_handler},
  241. {FTM1_Ch0_Ch1_IRQn, 0U, undefined_handler},
  242. {FTM1_Ch2_Ch3_IRQn, 0U, undefined_handler},
  243. {FTM1_Ch4_Ch5_IRQn, 0U, undefined_handler},
  244. {FTM1_Ch6_Ch7_IRQn, 0U, undefined_handler},
  245. {FTM1_Fault_IRQn, 0U, undefined_handler},
  246. {FTM1_Ovf_Reload_IRQn, 0U, undefined_handler},
  247. {FTM2_Ch0_Ch1_IRQn, 0U, undefined_handler},
  248. {FTM2_Ch2_Ch3_IRQn, 0U, undefined_handler},
  249. {FTM2_Ch4_Ch5_IRQn, 0U, undefined_handler},
  250. {FTM2_Ch6_Ch7_IRQn, 0U, undefined_handler},
  251. {FTM2_Fault_IRQn, 0U, undefined_handler},
  252. {FTM2_Ovf_Reload_IRQn, 0U, undefined_handler},
  253. {FTM3_Ch0_Ch1_IRQn, 0U, undefined_handler},
  254. {FTM3_Ch2_Ch3_IRQn, 0U, undefined_handler},
  255. {FTM3_Ch4_Ch5_IRQn, 0U, undefined_handler},
  256. {FTM3_Ch6_Ch7_IRQn, 0U, undefined_handler},
  257. {FTM3_Fault_IRQn, 0U, undefined_handler},
  258. {FTM3_Ovf_Reload_IRQn, 0U, undefined_handler},
  259. {FTM4_Ch0_Ch1_IRQn, 0U, undefined_handler},
  260. {FTM4_Ch2_Ch3_IRQn, 0U, undefined_handler},
  261. {FTM4_Ch4_Ch5_IRQn, 0U, undefined_handler},
  262. {FTM4_Ch6_Ch7_IRQn, 0U, undefined_handler},
  263. {FTM4_Fault_IRQn, 0U, undefined_handler},
  264. {FTM4_Ovf_Reload_IRQn, 0U, undefined_handler},
  265. {FTM5_Ch0_Ch1_IRQn, 0U, undefined_handler},
  266. {FTM5_Ch2_Ch3_IRQn, 0U, undefined_handler},
  267. {FTM5_Ch4_Ch5_IRQn, 0U, undefined_handler},
  268. {FTM5_Ch6_Ch7_IRQn, 0U, undefined_handler},
  269. {FTM5_Fault_IRQn, 0U, undefined_handler},
  270. {FTM5_Ovf_Reload_IRQn, 0U, undefined_handler},
  271. };
  272. /* Configuration structure for routing interrupt */
  273. const IntCtrl_Ip_GlobalRouteConfigType intRouteConfig = {
  274. 102U,
  275. aIrqRouteConfig
  276. };
  277. #define PLATFORM_STOP_SEC_CONFIG_DATA_UNSPECIFIED
  278. #include "Platform_MemMap.h"
  279. #ifdef __cplusplus
  280. }
  281. #endif