Dma_Ip_Cfg_Defines.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral : DMA,CACHE,TRGMUX,FLEXIO
  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. /* Prevention from multiple including the same header */
  25. #ifndef DMA_IP_CFG_DEFINES_H_
  26. #define DMA_IP_CFG_DEFINES_H_
  27. #ifdef __cplusplus
  28. extern "C"
  29. {
  30. #endif
  31. /*==================================================================================================
  32. INCLUDE FILES
  33. 1) system and project includes
  34. 2) needed interfaces from external units
  35. 3) internal and external interfaces from this unit
  36. ==================================================================================================*/
  37. #include "StandardTypes.h"
  38. #include "BasicTypes.h"
  39. /*==================================================================================================
  40. SOURCE FILE VERSION INFORMATION
  41. ==================================================================================================*/
  42. #define DMA_IP_CFG_DEFINES_VENDOR_ID_H 43
  43. #define DMA_IP_CFG_DEFINES_AR_RELEASE_MAJOR_VERSION_H 4
  44. #define DMA_IP_CFG_DEFINES_AR_RELEASE_MINOR_VERSION_H 4
  45. #define DMA_IP_CFG_DEFINES_AR_RELEASE_REVISION_VERSION_H 0
  46. #define DMA_IP_CFG_DEFINES_SW_MAJOR_VERSION_H 1
  47. #define DMA_IP_CFG_DEFINES_SW_MINOR_VERSION_H 0
  48. #define DMA_IP_CFG_DEFINES_SW_PATCH_VERSION_H 0
  49. /*==================================================================================================
  50. FILE VERSION CHECKS
  51. ==================================================================================================*/
  52. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  53. /* Check if header file and StandardTypes header file are of the same Autosar version */
  54. #if ((DMA_IP_CFG_DEFINES_AR_RELEASE_MAJOR_VERSION_H != STD_AR_RELEASE_MAJOR_VERSION) || \
  55. (DMA_IP_CFG_DEFINES_AR_RELEASE_MINOR_VERSION_H != STD_AR_RELEASE_MINOR_VERSION))
  56. #error "AutoSar Version Numbers of Dma_Ip_Cfg_Defines.h and StandardTypes.h are different"
  57. #endif
  58. #endif
  59. /*===============================================================================================
  60. DEFINES AND MACROS
  61. ===============================================================================================*/
  62. /*-----------------------------------------------/
  63. / DMA IP USER MODE SUPPORT /
  64. /-----------------------------------------------*/
  65. #define DMA_IP_USER_MODE_SUPPORT_IS_AVAILABLE STD_OFF
  66. #define DMA_IP_REG_PROT_AVAILABLE STD_OFF
  67. #define DMA_IP_MP_REG_PROT_AVAILABLE STD_OFF
  68. #define DMA_IP_TCD_REG_PROT_AVAILABLE STD_OFF
  69. #define DMA_IP_DMAMUX_REG_PROT_AVAILABLE STD_OFF
  70. /*-----------------------------------------------/
  71. / DMA IP SUPPORT /
  72. /-----------------------------------------------*/
  73. #define DMA_IP_IS_AVAILABLE STD_ON
  74. #define DMA_IP_DMACRC_IS_AVAILABLE STD_OFF
  75. /*-----------------------------------------------/
  76. / DMA IP VIRTUAL ADDRESS MAPPING SUPPORT /
  77. /-----------------------------------------------*/
  78. #define DMA_IP_VIRTUAL_ADDRESS_MAPPING_IS_AVAILABLE STD_OFF
  79. #define DMA_IP_MULTICORE_IS_AVAILABLE STD_OFF
  80. #define DMA_IP_MASTER_ID_REPLICATION_IS_AVAILABLE STD_OFF
  81. #define DMA_IP_BUFFERED_WRITES_IS_AVAILABLE STD_OFF
  82. #define DMA_IP_STORE_DST_ADDR_IS_AVAILABLE STD_OFF
  83. #define DMA_IP_END_OF_PACKET_SIGNAL_IS_AVAILABLE STD_OFF
  84. #define DMA_IP_PREEMPTION_IS_AVAILABLE STD_ON
  85. #define DMA_IP_DISABLE_PREEMPT_IS_AVAILABLE STD_ON
  86. #define DMA_IP_GROUP_PRIORITY_IS_AVAILABLE STD_OFF
  87. /*-----------------------------------------------/
  88. / DMA IP DEV ERROR DETECT SUPPORT /
  89. /-----------------------------------------------*/
  90. #define DMA_IP_DEV_ERROR_DETECT STD_OFF
  91. /*-----------------------------------------------/
  92. / DMAMUX NOT ALIGNED /
  93. /-----------------------------------------------*/
  94. #define DMAMUX_IP_NOT_ALIGNED STD_OFF
  95. /*-----------------------------------------------/
  96. / DMA HARDWARE VERSION /
  97. /-----------------------------------------------*/
  98. #define DMA_IP_HWV2_IS_AVAILABLE STD_ON
  99. #define DMA_IP_HARDWARE_VERSION_2 ((uint8)2U)
  100. #define DMA_IP_HWV3_IS_AVAILABLE STD_OFF
  101. #define DMA_IP_HARDWARE_VERSION_3 ((uint8)3U)
  102. /*-----------------------------------------------/
  103. / DMA HARDWARE INSTANCES /
  104. /-----------------------------------------------*/
  105. #define DMA_IP_HW_INST_0 ((uint8)(0U))
  106. /*-----------------------------------------------/
  107. / DMA HARDWARE CHANNELS /
  108. /-----------------------------------------------*/
  109. #define DMA_IP_HW_CH_0 ((uint8)(0U))
  110. #define DMA_IP_HW_CH_1 ((uint8)(1U))
  111. #define DMA_IP_HW_CH_2 ((uint8)(2U))
  112. #define DMA_IP_HW_CH_3 ((uint8)(3U))
  113. #define DMA_IP_HW_CH_4 ((uint8)(4U))
  114. #define DMA_IP_HW_CH_5 ((uint8)(5U))
  115. #define DMA_IP_HW_CH_6 ((uint8)(6U))
  116. #define DMA_IP_HW_CH_7 ((uint8)(7U))
  117. #define DMA_IP_HW_CH_8 ((uint8)(8U))
  118. #define DMA_IP_HW_CH_9 ((uint8)(9U))
  119. #define DMA_IP_HW_CH_10 ((uint8)(10U))
  120. #define DMA_IP_HW_CH_11 ((uint8)(11U))
  121. #define DMA_IP_HW_CH_12 ((uint8)(12U))
  122. #define DMA_IP_HW_CH_13 ((uint8)(13U))
  123. #define DMA_IP_HW_CH_14 ((uint8)(14U))
  124. #define DMA_IP_HW_CH_15 ((uint8)(15U))
  125. /*-----------------------------------------------/
  126. / DMA REQUESTS /
  127. /-----------------------------------------------*/
  128. #define DMA_IP_REQ_MUX0_DISABLED ((uint8)(0U))
  129. #define DMA_IP_REQ_MUX0_ENET_TIMER_CH0_CH3 ((uint8)(1U))
  130. #define DMA_IP_REQ_MUX0_LPUART0_RX ((uint8)(2U))
  131. #define DMA_IP_REQ_MUX0_LPUART0_TX ((uint8)(3U))
  132. #define DMA_IP_REQ_MUX0_LPUART1_RX ((uint8)(4U))
  133. #define DMA_IP_REQ_MUX0_LPUART1_TX ((uint8)(5U))
  134. #define DMA_IP_REQ_MUX0_LPUART2_RX ((uint8)(6U))
  135. #define DMA_IP_REQ_MUX0_LPUART2_TX ((uint8)(7U))
  136. #define DMA_IP_REQ_MUX0_LPI2C1_RX ((uint8)(8U))
  137. #define DMA_IP_REQ_MUX0_LPI2C1_TX ((uint8)(9U))
  138. #define DMA_IP_REQ_MUX0_FLEXIO_SHIFTER0 ((uint8)(10U))
  139. #define DMA_IP_REQ_MUX0_FLEXIO_SHIFTER1 ((uint8)(11U))
  140. #define DMA_IP_REQ_MUX0_FLEXIO_SHIFTER2 ((uint8)(12U))
  141. #define DMA_IP_REQ_MUX0_FLEXIO_SHIFTER3 ((uint8)(13U))
  142. #define DMA_IP_REQ_MUX0_FLEXIO_SHIFTER2_SAI1_RX ((uint8)(12U))
  143. #define DMA_IP_REQ_MUX0_FLEXIO_SHIFTER3_SAI1_TX ((uint8)(13U))
  144. #define DMA_IP_REQ_MUX0_LPSPI0_RX ((uint8)(14U))
  145. #define DMA_IP_REQ_MUX0_LPSPI0_TX ((uint8)(15U))
  146. #define DMA_IP_REQ_MUX0_LPSPI1_RX ((uint8)(16U))
  147. #define DMA_IP_REQ_MUX0_LPSPI1_TX ((uint8)(17U))
  148. #define DMA_IP_REQ_MUX0_LPSPI2_RX ((uint8)(18U))
  149. #define DMA_IP_REQ_MUX0_LPSPI2_TX ((uint8)(19U))
  150. #define DMA_IP_REQ_MUX0_FTM1_CHANNEL_0 ((uint8)(20U))
  151. #define DMA_IP_REQ_MUX0_FTM1_CHANNEL_1 ((uint8)(21U))
  152. #define DMA_IP_REQ_MUX0_FTM1_CHANNEL_2 ((uint8)(22U))
  153. #define DMA_IP_REQ_MUX0_FTM1_CHANNEL_3 ((uint8)(23U))
  154. #define DMA_IP_REQ_MUX0_FTM1_CHANNEL_4 ((uint8)(24U))
  155. #define DMA_IP_REQ_MUX0_FTM1_CHANNEL_5 ((uint8)(25U))
  156. #define DMA_IP_REQ_MUX0_FTM1_CHANNEL_6 ((uint8)(26U))
  157. #define DMA_IP_REQ_MUX0_FTM1_CHANNEL_7 ((uint8)(27U))
  158. #define DMA_IP_REQ_MUX0_FTM2_CHANNEL_0 ((uint8)(28U))
  159. #define DMA_IP_REQ_MUX0_FTM2_CHANNEL_1 ((uint8)(29U))
  160. #define DMA_IP_REQ_MUX0_FTM2_CHANNEL_2 ((uint8)(30U))
  161. #define DMA_IP_REQ_MUX0_FTM2_CHANNEL_3 ((uint8)(31U))
  162. #define DMA_IP_REQ_MUX0_FTM2_CHANNEL_4 ((uint8)(32U))
  163. #define DMA_IP_REQ_MUX0_FTM2_CHANNEL_5 ((uint8)(33U))
  164. #define DMA_IP_REQ_MUX0_FTM2_CHANNEL_6 ((uint8)(34U))
  165. #define DMA_IP_REQ_MUX0_FTM2_CHANNEL_7 ((uint8)(35U))
  166. #define DMA_IP_REQ_MUX0_FTM0_OR_CH0_CH7 ((uint8)(36U))
  167. #define DMA_IP_REQ_MUX0_FTM3_OR_CH0_CH7 ((uint8)(37U))
  168. #define DMA_IP_REQ_MUX0_FTM4_OR_CH0_CH7 ((uint8)(38U))
  169. #define DMA_IP_REQ_MUX0_FTM5_OR_CH0_CH7 ((uint8)(39U))
  170. #define DMA_IP_REQ_MUX0_FTM6_OR_CH0_CH7 ((uint8)(40U))
  171. #define DMA_IP_REQ_MUX0_FTM7_OR_CH0_CH7 ((uint8)(41U))
  172. #define DMA_IP_REQ_MUX0_ADC0 ((uint8)(42U))
  173. #define DMA_IP_REQ_MUX0_ADC1 ((uint8)(43U))
  174. #define DMA_IP_REQ_MUX0_LPI2C0_RX ((uint8)(44U))
  175. #define DMA_IP_REQ_MUX0_LPI2C0_TX ((uint8)(45U))
  176. #define DMA_IP_REQ_MUX0_PDB0 ((uint8)(46U))
  177. #define DMA_IP_REQ_MUX0_PDB1 ((uint8)(47U))
  178. #define DMA_IP_REQ_MUX0_CMP0 ((uint8)(48U))
  179. #define DMA_IP_REQ_MUX0_PORTA ((uint8)(49U))
  180. #define DMA_IP_REQ_MUX0_PORTB ((uint8)(50U))
  181. #define DMA_IP_REQ_MUX0_PORTC ((uint8)(51U))
  182. #define DMA_IP_REQ_MUX0_PORTD ((uint8)(52U))
  183. #define DMA_IP_REQ_MUX0_PORTE ((uint8)(53U))
  184. #define DMA_IP_REQ_MUX0_FLEXCAN0 ((uint8)(54U))
  185. #define DMA_IP_REQ_MUX0_FLEXCAN1 ((uint8)(55U))
  186. #define DMA_IP_REQ_MUX0_FLEXCAN2 ((uint8)(56U))
  187. #define DMA_IP_REQ_MUX0_SAI0_RX ((uint8)(57U))
  188. #define DMA_IP_REQ_MUX0_SAI0_TX ((uint8)(58U))
  189. #define DMA_IP_REQ_MUX0_LPTMR0 ((uint8)(59U))
  190. #define DMA_IP_REQ_MUX0_QUADSPI_RX ((uint8)(60U))
  191. #define DMA_IP_REQ_MUX0_QUADSPI_TX ((uint8)(61U))
  192. #define DMA_IP_REQ_MUX0_ALWAYS_ON0 ((uint8)(62U))
  193. #define DMA_IP_REQ_MUX0_ALWAYS_ON1 ((uint8)(63U))
  194. /*-----------------------------------------------/
  195. / DMA CHANNEL PRIORITY /
  196. /-----------------------------------------------*/
  197. #define DMA_IP_LEVEL_PRIO0 ((uint8)(0U))
  198. #define DMA_IP_LEVEL_PRIO1 ((uint8)(1U))
  199. #define DMA_IP_LEVEL_PRIO2 ((uint8)(2U))
  200. #define DMA_IP_LEVEL_PRIO3 ((uint8)(3U))
  201. #define DMA_IP_LEVEL_PRIO4 ((uint8)(4U))
  202. #define DMA_IP_LEVEL_PRIO5 ((uint8)(5U))
  203. #define DMA_IP_LEVEL_PRIO6 ((uint8)(6U))
  204. #define DMA_IP_LEVEL_PRIO7 ((uint8)(7U))
  205. #define DMA_IP_LEVEL_PRIO8 ((uint8)(8U))
  206. #define DMA_IP_LEVEL_PRIO9 ((uint8)(9U))
  207. #define DMA_IP_LEVEL_PRIO10 ((uint8)(10U))
  208. #define DMA_IP_LEVEL_PRIO11 ((uint8)(11U))
  209. #define DMA_IP_LEVEL_PRIO12 ((uint8)(12U))
  210. #define DMA_IP_LEVEL_PRIO13 ((uint8)(13U))
  211. #define DMA_IP_LEVEL_PRIO14 ((uint8)(14U))
  212. #define DMA_IP_LEVEL_PRIO15 ((uint8)(15U))
  213. /*-----------------------------------------------/
  214. / DMA TRANSFER SIZE /
  215. /-----------------------------------------------*/
  216. #define DMA_IP_TRANSFER_SIZE_1_BYTE ((uint8)(0U))
  217. #define DMA_IP_TRANSFER_SIZE_2_BYTE ((uint8)(1U))
  218. #define DMA_IP_TRANSFER_SIZE_4_BYTE ((uint8)(2U))
  219. #define DMA_IP_TRANSFER_SIZE_16_BYTE ((uint8)(4U))
  220. #define DMA_IP_TRANSFER_SIZE_32_BYTE ((uint8)(5U))
  221. /*-----------------------------------------------/
  222. / DMA BANDWIDTH CONTROL /
  223. /-----------------------------------------------*/
  224. #define DMA_IP_BWC_ENGINE_NO_STALL ((uint8)(0U))
  225. #define DMA_IP_BWC_ENGINE_4CYCLE_STALL ((uint8)(2U))
  226. #define DMA_IP_BWC_ENGINE_8CYCLE_STALL ((uint8)(3U))
  227. /*-----------------------------------------------/
  228. / DMA CONVERT DCHPRI /
  229. /-----------------------------------------------*/
  230. #define DMA_CHN_TO_DCHPRI_INDEX(x) ((x) ^ 3U)
  231. #ifdef __cplusplus
  232. }
  233. #endif
  234. #endif /* #ifndef DMA_IP_CFG_DEFINES_H_ */
  235. /*==================================================================================================
  236. * END OF FILE
  237. ==================================================================================================*/