Adc_Ipw_VS_0_PBcfg.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral : ADC
  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
  26. *
  27. * @addtogroup adc_ipw_config Adc Ipw Configuration
  28. * @{
  29. */
  30. #ifdef __cplusplus
  31. extern "C"{
  32. #endif
  33. /*==================================================================================================
  34. * INCLUDE FILES
  35. * 1) system and project includes
  36. * 2) needed interfaces from external units
  37. * 3) internal and external interfaces from this unit
  38. ==================================================================================================*/
  39. #include "Adc_Ipw_CfgDefines.h"
  40. #include "Adc_Ipw_VS_0_PBcfg.h"
  41. #include "Adc_Ip_VS_0_PBcfg.h"
  42. #include "Pdb_Adc_Ip_VS_0_PBcfg.h"
  43. /*==================================================================================================
  44. * SOURCE FILE VERSION INFORMATION
  45. ==================================================================================================*/
  46. #define ADC_VENDOR_ID_IPW_VS_0_PBCFG_C 43
  47. #define ADC_AR_RELEASE_MAJOR_VERSION_IPW_VS_0_PBCFG_C 4
  48. #define ADC_AR_RELEASE_MINOR_VERSION_IPW_VS_0_PBCFG_C 4
  49. #define ADC_AR_RELEASE_REVISION_VERSION_IPW_VS_0_PBCFG_C 0
  50. #define ADC_SW_MAJOR_VERSION_IPW_VS_0_PBCFG_C 1
  51. #define ADC_SW_MINOR_VERSION_IPW_VS_0_PBCFG_C 0
  52. #define ADC_SW_PATCH_VERSION_IPW_VS_0_PBCFG_C 0
  53. /*==================================================================================================
  54. * FILE VERSION CHECKS
  55. ==================================================================================================*/
  56. /* Check if Adc_Ipw_VS_0_PBcfg.c file and Adc_Ipw_CfgDefines.h file are of the same vendor */
  57. #if (ADC_VENDOR_ID_IPW_VS_0_PBCFG_C != ADC_VENDOR_ID_IPW_CFGDEFINES_H)
  58. #error "Adc_Ipw_VS_0_PBcfg.c and Adc_Ipw_CfgDefines.h have different vendor ids"
  59. #endif
  60. /* Check if Adc_Ipw_VS_0_PBcfg.c file and Adc_Ipw_CfgDefines.h file are of the same Autosar version */
  61. #if ((ADC_AR_RELEASE_MAJOR_VERSION_IPW_VS_0_PBCFG_C != ADC_AR_RELEASE_MAJOR_VERSION_IPW_CFGDEFINES_H) || \
  62. (ADC_AR_RELEASE_MINOR_VERSION_IPW_VS_0_PBCFG_C != ADC_AR_RELEASE_MINOR_VERSION_IPW_CFGDEFINES_H) || \
  63. (ADC_AR_RELEASE_REVISION_VERSION_IPW_VS_0_PBCFG_C != ADC_AR_RELEASE_REVISION_VERSION_IPW_CFGDEFINES_H) \
  64. )
  65. #error "AutoSar Version Numbers of Adc_Ipw_VS_0_PBcfg.c and Adc_Ipw_CfgDefines.h are different"
  66. #endif
  67. /* Check if Adc_Ipw_VS_0_PBcfg.c file and Adc_Ipw_CfgDefines.h file are of the same Software version */
  68. #if ((ADC_SW_MAJOR_VERSION_IPW_VS_0_PBCFG_C != ADC_SW_MAJOR_VERSION_IPW_CFGDEFINES_H) || \
  69. (ADC_SW_MINOR_VERSION_IPW_VS_0_PBCFG_C != ADC_SW_MINOR_VERSION_IPW_CFGDEFINES_H) || \
  70. (ADC_SW_PATCH_VERSION_IPW_VS_0_PBCFG_C != ADC_SW_PATCH_VERSION_IPW_CFGDEFINES_H) \
  71. )
  72. #error "Software Version Numbers of Adc_Ipw_VS_0_PBcfg.c and Adc_Ipw_CfgDefines.h are different"
  73. #endif
  74. /* Check if Adc_Ipw_VS_0_PBcfg.c file and Adc_Ipw_VS_0_PBcfg.h file are of the same vendor */
  75. #if (ADC_VENDOR_ID_IPW_VS_0_PBCFG_C != ADC_VENDOR_ID_IPW_VS_0_PBCFG_H)
  76. #error "Adc_Ipw_VS_0_PBcfg.c and Adc_Ipw_VS_0_PBcfg.h have different vendor ids"
  77. #endif
  78. /* Check if Adc_Ipw_VS_0_PBcfg.c file and Adc_Ipw_VS_0_PBcfg.h file are of the same Autosar version */
  79. #if ((ADC_AR_RELEASE_MAJOR_VERSION_IPW_VS_0_PBCFG_C != ADC_AR_RELEASE_MAJOR_VERSION_IPW_VS_0_PBCFG_H) || \
  80. (ADC_AR_RELEASE_MINOR_VERSION_IPW_VS_0_PBCFG_C != ADC_AR_RELEASE_MINOR_VERSION_IPW_VS_0_PBCFG_H) || \
  81. (ADC_AR_RELEASE_REVISION_VERSION_IPW_VS_0_PBCFG_C != ADC_AR_RELEASE_REVISION_VERSION_IPW_VS_0_PBCFG_H) \
  82. )
  83. #error "AutoSar Version Numbers of Adc_Ipw_VS_0_PBcfg.c and Adc_Ipw_VS_0_PBcfg.h are different"
  84. #endif
  85. /* Check if Adc_Ipw_VS_0_PBcfg.c file and Adc_Ipw_VS_0_PBcfg.h file are of the same Software version */
  86. #if ((ADC_SW_MAJOR_VERSION_IPW_VS_0_PBCFG_C != ADC_SW_MAJOR_VERSION_IPW_VS_0_PBCFG_H) || \
  87. (ADC_SW_MINOR_VERSION_IPW_VS_0_PBCFG_C != ADC_SW_MINOR_VERSION_IPW_VS_0_PBCFG_H) || \
  88. (ADC_SW_PATCH_VERSION_IPW_VS_0_PBCFG_C != ADC_SW_PATCH_VERSION_IPW_VS_0_PBCFG_H) \
  89. )
  90. #error "Software Version Numbers of Adc_Ipw_VS_0_PBcfg.c and Adc_Ipw_VS_0_PBcfg.h are different"
  91. #endif
  92. /* Check if Adc_Ipw_VS_0_PBcfg.c file and Adc_Ip_VS_0_PBcfg.h file are of the same vendor */
  93. #if (ADC_VENDOR_ID_IPW_VS_0_PBCFG_C != ADC_IP_VENDOR_ID_VS_0_PBCFG_H)
  94. #error "Adc_Ipw_VS_0_PBcfg.c and Adc_Ip_VS_0_PBcfg.h have different vendor ids"
  95. #endif
  96. /* Check if Adc_Ipw_VS_0_PBcfg.c file and Adc_Ip_VS_0_PBcfg.h file are of the same Autosar version */
  97. #if ((ADC_AR_RELEASE_MAJOR_VERSION_IPW_VS_0_PBCFG_C != ADC_IP_AR_RELEASE_MAJOR_VERSION_VS_0_PBCFG_H) || \
  98. (ADC_AR_RELEASE_MINOR_VERSION_IPW_VS_0_PBCFG_C != ADC_IP_AR_RELEASE_MINOR_VERSION_VS_0_PBCFG_H) || \
  99. (ADC_AR_RELEASE_REVISION_VERSION_IPW_VS_0_PBCFG_C != ADC_IP_AR_RELEASE_REVISION_VERSION_VS_0_PBCFG_H) \
  100. )
  101. #error "AutoSar Version Numbers of Adc_Ipw_VS_0_PBcfg.c and Adc_Ip_VS_0_PBcfg.h are different"
  102. #endif
  103. /* Check if Adc_Ipw_VS_0_PBcfg.c file and Adc_Ip_VS_0_PBcfg.h file are of the same Software version */
  104. #if ((ADC_SW_MAJOR_VERSION_IPW_VS_0_PBCFG_C != ADC_IP_SW_MAJOR_VERSION_VS_0_PBCFG_H) || \
  105. (ADC_SW_MINOR_VERSION_IPW_VS_0_PBCFG_C != ADC_IP_SW_MINOR_VERSION_VS_0_PBCFG_H) || \
  106. (ADC_SW_PATCH_VERSION_IPW_VS_0_PBCFG_C != ADC_IP_SW_PATCH_VERSION_VS_0_PBCFG_H) \
  107. )
  108. #error "Software Version Numbers of Adc_Ipw_VS_0_PBcfg.c and Adc_Ip_VS_0_PBcfg.h are different"
  109. #endif
  110. /* Check if Adc_Ipw_VS_0_PBcfg.c file and Pdb_Adc_Ip_VS_0_PBcfg.h file are of the same vendor */
  111. #if (ADC_VENDOR_ID_IPW_VS_0_PBCFG_C != PDB_ADC_IP_VENDOR_ID_VS_0_PBCFG_H)
  112. #error "Adc_Ipw_VS_0_PBcfg.c and Pdb_Adc_Ip_VS_0_PBcfg.h have different vendor ids"
  113. #endif
  114. /* Check if Adc_Ipw_VS_0_PBcfg.c file and Pdb_Adc_Ip_VS_0_PBcfg.h file are of the same Autosar version */
  115. #if ((ADC_AR_RELEASE_MAJOR_VERSION_IPW_VS_0_PBCFG_C != PDB_ADC_IP_AR_RELEASE_MAJOR_VERSION_VS_0_PBCFG_H) || \
  116. (ADC_AR_RELEASE_MINOR_VERSION_IPW_VS_0_PBCFG_C != PDB_ADC_IP_AR_RELEASE_MINOR_VERSION_VS_0_PBCFG_H) || \
  117. (ADC_AR_RELEASE_REVISION_VERSION_IPW_VS_0_PBCFG_C != PDB_ADC_IP_AR_RELEASE_REVISION_VERSION_VS_0_PBCFG_H) \
  118. )
  119. #error "AutoSar Version Numbers of Adc_Ipw_VS_0_PBcfg.c and Pdb_Adc_Ip_VS_0_PBcfg.h are different"
  120. #endif
  121. /* Check if Adc_Ipw_VS_0_PBcfg.c file and Pdb_Adc_Ip_VS_0_PBcfg.h file are of the same Software version */
  122. #if ((ADC_SW_MAJOR_VERSION_IPW_VS_0_PBCFG_C != PDB_ADC_IP_SW_MAJOR_VERSION_VS_0_PBCFG_H) || \
  123. (ADC_SW_MINOR_VERSION_IPW_VS_0_PBCFG_C != PDB_ADC_IP_SW_MINOR_VERSION_VS_0_PBCFG_H) || \
  124. (ADC_SW_PATCH_VERSION_IPW_VS_0_PBCFG_C != PDB_ADC_IP_SW_PATCH_VERSION_VS_0_PBCFG_H) \
  125. )
  126. #error "Software Version Numbers of Adc_Ipw_VS_0_PBcfg.c and Pdb_Adc_Ip_VS_0_PBcfg.h are different"
  127. #endif
  128. /*==================================================================================================
  129. * GLOBAL FUNCTION PROTOTYPES
  130. ==================================================================================================*/
  131. /*==================================================================================================
  132. * LOCAL TYPEDEFS (STRUCTURES, UNIONS, ENUMS)
  133. ==================================================================================================*/
  134. /*==================================================================================================
  135. * LOCAL MACROS
  136. ==================================================================================================*/
  137. /*==================================================================================================
  138. * LOCAL CONSTANTS
  139. ==================================================================================================*/
  140. /*==================================================================================================
  141. * LOCAL VARIABLES
  142. ==================================================================================================*/
  143. /*==================================================================================================
  144. * GLOBAL CONSTANTS
  145. ==================================================================================================*/
  146. #define ADC_START_SEC_CONFIG_DATA_UNSPECIFIED
  147. #include "Adc_MemMap.h"
  148. #define ADC_STOP_SEC_CONFIG_DATA_UNSPECIFIED
  149. #include "Adc_MemMap.h"
  150. #define ADC_START_SEC_CONFIG_DATA_16
  151. #include "Adc_MemMap.h"
  152. /**
  153. * @brief Group Channel Delays for configuration variant VS_0.
  154. *
  155. */
  156. #define ADC_STOP_SEC_CONFIG_DATA_16
  157. #include "Adc_MemMap.h"
  158. /*==================================================================================================
  159. * GLOBAL VARIABLES
  160. ==================================================================================================*/
  161. #define ADC_START_SEC_CONFIG_DATA_UNSPECIFIED
  162. #include "Adc_MemMap.h"
  163. /**
  164. * @brief Adc Ipw Config configuration variant VS_0.
  165. */
  166. const Adc_Ipw_Config AdcIpwCfg_VS_0 =
  167. {
  168. { &AdcIpConfig_0_VS_0, NULL_PTR }, /* apAdcConfig */
  169. { &PdbAdcIpConfig_0_VS_0, NULL_PTR }, /* apPdbConfig */
  170. { 1U, ADC_IPW_INVALID_LOGICAL_UNIT_ID }, /* aAdcPhysicalId */
  171. #if (ADC_DUAL_CLOCK_MODE == STD_ON)
  172. { NULL_PTR, NULL_PTR }, /* apAdcAltClockConfig */
  173. #endif /* (ADC_DUAL_CLOCK_MODE == STD_ON) */
  174. #if (ADC_ENABLE_LIMIT_CHECK == STD_ON)
  175. { NULL_PTR, NULL_PTR }, /* ChannelLimitCheckingConfigs */
  176. #endif /* (ADC_ENABLE_LIMIT_CHECK == STD_ON) */
  177. /* Mapping */
  178. {
  179. { ADC_INTERRUPT, ADC_IPW_INVALID_TRANSFER_TYPE /* Unit not used */ }, /* u8Adc_DmaInterruptSoftware */
  180. /**< @brief number of groups per hw unit > */
  181. { 2U, 0U }, /* aAdc_Groups */
  182. /**< @brief number of channels per hw unit > */
  183. { 8U, 0U }, /* aAdc_Channels */
  184. { ADC_IPW_INVALID_DMA_CHANNEL_ID, ADC_IPW_INVALID_DMA_CHANNEL_ID }, /* au8Adc_DmaChannel */
  185. #if (STD_ON == ADC_OPTIMIZE_DMA_STREAMING_GROUPS) || (ADC_ENABLE_GROUP_STREAMING_RESULTS_REORDER == STD_ON)
  186. { ADC_IPW_INVALID_DMA_CHANNEL_ID, ADC_IPW_INVALID_DMA_CHANNEL_ID }, /* au8Adc_CountingDmaChannel */
  187. #endif /* (STD_ON == ADC_OPTIMIZE_DMA_STREAMING_GROUPS) || (ADC_ENABLE_GROUP_STREAMING_RESULTS_REORDER == STD_ON) */
  188. { STD_ON, STD_OFF }, /* au8Adc_HwUnit */
  189. { ADC_IPW_INVALID_LOGICAL_UNIT_ID, 0U } /* aHwLogicalId */
  190. }
  191. };
  192. /**
  193. * @brief ADC Ipw Group 0 Config VS_0.
  194. */
  195. const Adc_Ipw_GroupConfig AdcIpwGroupConfig_0_VS_0 =
  196. {
  197. #if (ADC_SET_ADC_CONV_TIME_ONCE == STD_OFF)
  198. /**< @brief Main Average enable status of group */
  199. STD_ON, /* u8GroupAvgEnable */
  200. /**< @brief Main Average selection of group */
  201. ADC_IP_AVG_8_CONV, /* GroupAvgSelect */
  202. 255U, /* ConvTime */
  203. #if (ADC_DUAL_CLOCK_MODE == STD_ON)
  204. /**< @brief Alternate Average enable status of group */
  205. STD_OFF, /* u8GroupAvgEnableAlternate */
  206. /**< @brief Alternate Average selection of group */
  207. ADC_IP_AVG_4_CONV, /* GroupAvgSelectAlternate */
  208. ADC_IP_DEFAULT_SAMPLE_TIME, /* AlternateConvTime */
  209. #endif /* (ADC_DUAL_CLOCK_MODE == STD_ON) */
  210. #endif /* (ADC_SET_ADC_CONV_TIME_ONCE == STD_OFF) */
  211. 0U, /* PdbPeriod */
  212. 0U, /* PdbDelay */
  213. (boolean)TRUE, /* AdcGroupEnableBackToBack */
  214. (boolean)FALSE, /* AdcGroupEnableChannelDelays */
  215. NULL_PTR /* pDelay */
  216. };
  217. /**
  218. * @brief ADC Ipw Group 1 Config VS_0.
  219. */
  220. const Adc_Ipw_GroupConfig AdcIpwGroupConfig_1_VS_0 =
  221. {
  222. #if (ADC_SET_ADC_CONV_TIME_ONCE == STD_OFF)
  223. /**< @brief Main Average enable status of group */
  224. STD_ON, /* u8GroupAvgEnable */
  225. /**< @brief Main Average selection of group */
  226. ADC_IP_AVG_8_CONV, /* GroupAvgSelect */
  227. 255U, /* ConvTime */
  228. #if (ADC_DUAL_CLOCK_MODE == STD_ON)
  229. /**< @brief Alternate Average enable status of group */
  230. STD_OFF, /* u8GroupAvgEnableAlternate */
  231. /**< @brief Alternate Average selection of group */
  232. ADC_IP_AVG_4_CONV, /* GroupAvgSelectAlternate */
  233. ADC_IP_DEFAULT_SAMPLE_TIME, /* AlternateConvTime */
  234. #endif /* (ADC_DUAL_CLOCK_MODE == STD_ON) */
  235. #endif /* (ADC_SET_ADC_CONV_TIME_ONCE == STD_OFF) */
  236. 0U, /* PdbPeriod */
  237. 0U, /* PdbDelay */
  238. (boolean)TRUE, /* AdcGroupEnableBackToBack */
  239. (boolean)FALSE, /* AdcGroupEnableChannelDelays */
  240. NULL_PTR /* pDelay */
  241. };
  242. #define ADC_STOP_SEC_CONFIG_DATA_UNSPECIFIED
  243. #include "Adc_MemMap.h"
  244. /*==================================================================================================
  245. * LOCAL FUNCTION PROTOTYPES
  246. ==================================================================================================*/
  247. /*==================================================================================================
  248. * LOCAL FUNCTIONS
  249. ==================================================================================================*/
  250. #ifdef __cplusplus
  251. }
  252. #endif
  253. /** @} */