Wdg_Cfg_Defines.h 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral : Wdog,Ewm
  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. #ifndef WDG_CFG_DEFINES_H
  25. #define WDG_CFG_DEFINES_H
  26. /**
  27. * @file
  28. *
  29. * @addtogroup Wdg
  30. * @{
  31. */
  32. #ifdef __cplusplus
  33. extern "C"{
  34. #endif
  35. /*==================================================================================================
  36. * INCLUDE FILES
  37. * 1) system and project includes
  38. * 2) needed interfaces from external units
  39. * 3) internal and external interfaces from this unit
  40. ==================================================================================================*/
  41. #include "WdgIf_Types.h"
  42. #include "Wdg_Ipw_Cfg_Defines.h"
  43. #include "Mcal.h"
  44. /*==================================================================================================
  45. * SOURCE FILE VERSION INFORMATION
  46. ==================================================================================================*/
  47. #define WDG_VENDOR_ID_CFG 43
  48. #define WDG_AR_RELEASE_MAJOR_VERSION_CFG 4
  49. #define WDG_AR_RELEASE_MINOR_VERSION_CFG 4
  50. #define WDG_AR_RELEASE_REVISION_VERSION_CFG 0
  51. #define WDG_SW_MAJOR_VERSION_CFG 1
  52. #define WDG_SW_MINOR_VERSION_CFG 0
  53. #define WDG_SW_PATCH_VERSION_CFG 0
  54. /*==================================================================================================
  55. * FILE VERSION CHECKS
  56. ==================================================================================================*/
  57. #if (WDG_VENDOR_ID_CFG != WDG_IPW_CFG_DEFINES_VENDOR_ID)
  58. #error "Wdg_Cfg_Defines.h and Wdg_Ipw_Cfg_Defines.h have different vendor ids"
  59. #endif
  60. /* Check if current file and Wdg_Ipw_Types header file are of the same Autosar version */
  61. #if ((WDG_AR_RELEASE_MAJOR_VERSION_CFG != WDG_IPW_CFG_DEFINES_AR_RELEASE_MAJOR_VERSION) || \
  62. (WDG_AR_RELEASE_MINOR_VERSION_CFG != WDG_IPW_CFG_DEFINES_AR_RELEASE_MINOR_VERSION) || \
  63. (WDG_AR_RELEASE_REVISION_VERSION_CFG != WDG_IPW_CFG_DEFINES_AR_RELEASE_REVISION_VERSION))
  64. #error "AutoSar Version Numbers of Wdg_Cfg_Defines.h and Wdg_Ipw_Cfg_Defines.h are different"
  65. #endif
  66. /* Check if current file and Wdg_Ipw_Types header file are of the same software version */
  67. #if ((WDG_SW_MAJOR_VERSION_CFG != WDG_IPW_CFG_DEFINES_SW_MAJOR_VERSION) || \
  68. (WDG_SW_MINOR_VERSION_CFG != WDG_IPW_CFG_DEFINES_SW_MINOR_VERSION) || \
  69. (WDG_SW_PATCH_VERSION_CFG != WDG_IPW_CFG_DEFINES_SW_PATCH_VERSION))
  70. #error "Software Version Numbers of Wdg_Cfg_Defines.h and Wdg_Ipw_Cfg_Defines.h are different"
  71. #endif
  72. /* Check if current file and WDG configuration header file are of the same vendor */
  73. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  74. /* Check if current file and Wdg_Ipw_Types header file are of the same Autosar version */
  75. #if ((WDG_AR_RELEASE_MAJOR_VERSION_CFG != WDGIF_TYPES_AR_RELEASE_MAJOR_VERSION) || \
  76. (WDG_AR_RELEASE_MINOR_VERSION_CFG != WDGIF_TYPES_AR_RELEASE_MINOR_VERSION))
  77. #error "AutoSar Version Numbers of Wdg_Cfg_Defines.h and WdgIf_Types.h are different"
  78. #endif
  79. /* Check if source file and Mcal header file are of the same Autosar version */
  80. #if (( WDG_AR_RELEASE_MAJOR_VERSION_CFG != MCAL_AR_RELEASE_MAJOR_VERSION) || \
  81. ( WDG_AR_RELEASE_MINOR_VERSION_CFG != MCAL_AR_RELEASE_MINOR_VERSION))
  82. #error "AutoSar Version Numbers of Wdg_Cfg_Defines.h and Mcal.h are different"
  83. #endif
  84. #endif /* DISABLE_MCAL_INTERMODULE_ASR_CHECK */
  85. /*==================================================================================================
  86. * CONSTANTS
  87. ==================================================================================================*/
  88. /*==================================================================================================
  89. * DEFINES AND MACROS
  90. ==================================================================================================*/
  91. /**
  92. * @brief This define indicate the number of HW IPs available on the Platform
  93. */
  94. #define WDG_NO_OF_INSTANCES (2U)
  95. /**
  96. * @brief This define initializes all wdg instances to WDGIF_OFF_MODE
  97. */
  98. #define WDG_INIT_PREVIOUS_MODE_ARRAY {WDGIF_OFF_MODE, WDGIF_OFF_MODE }
  99. /**
  100. * @brief This define initializes to WDG_UNINIT for variable that indicated the state of the driver
  101. */
  102. #define WDG_INIT_STATUS_ARRAY {WDG_UNINIT, WDG_UNINIT }
  103. /**
  104. * @brief These defines indicate which Wdg Instances are enabled
  105. */
  106. #define WDG_INSTANCE0 (WDG_IPW_ENABLE_INSTANCE0)
  107. #define WDG_INSTANCE1 (WDG_IPW_ENABLE_INSTANCE1)
  108. /**
  109. * @brief This constant specifies if the multi-core is used or not
  110. */
  111. #define WDG_MULTICORE_ENABLED (STD_OFF)
  112. /**
  113. * @brief This define indicates if disabling the Wdg hardware is allowed
  114. */
  115. #define WDG_DISABLE_ALLOWED (WDG_IPW_DEINIT)
  116. /**
  117. * @brief These variables will indicate the Wdg Initial Timeout and Wdg Max Timeout parameters in miliseconds for Wdg module 0
  118. */
  119. #define WDG_43_INSTANCE0_INITIAL_TIMEOUT_U16 (WDG_IPW_INSTANCE0_INITIAL_TIMEOUT_U16)
  120. #define WDG_43_INSTANCE0_MAX_TIMEOUT_U16 (WDG_IPW_INSTANCE0_MAX_TIMEOUT_U16)
  121. /**
  122. * @brief These variables will indicate the Wdg Initial Timeout and Wdg Max Timeout parameters in miliseconds for Wdg module 1
  123. */
  124. #define WDG_43_INSTANCE1_INITIAL_TIMEOUT_U16 (WDG_IPW_INSTANCE1_INITIAL_TIMEOUT_U16)
  125. #define WDG_43_INSTANCE1_MAX_TIMEOUT_U16 (WDG_IPW_INSTANCE1_MAX_TIMEOUT_U16)
  126. /**
  127. * @brief Compile switch to enable/disable the version information for Wdg module 1
  128. */
  129. #define WDG_43_INSTANCE0_VERSION_INFO_API (STD_ON)
  130. #define WDG_43_INSTANCE1_VERSION_INFO_API (STD_ON)
  131. /**
  132. * @brief Compile switch to enable/disable the Wdg_ChannelGetVersionInfo function.
  133. */
  134. #define WDG_VERSION_INFO_API (STD_ON)
  135. /**
  136. * @brief This define indicates which instances of the Wdg hardware can be serviced directly
  137. */
  138. #define WDG_DIRECT_SERVICE_INSTANCE0 (WDG_IPW_ENABLE_DIRECT_SERVICE_INSTANCE0)
  139. #define WDG_DIRECT_SERVICE_INSTANCE1 (WDG_IPW_ENABLE_DIRECT_SERVICE_INSTANCE1)
  140. /**
  141. * @brief This define indicates if servicing the Wdg hardware directly, without an external trigger, is allowed
  142. */
  143. #define WDG_DIRECT_SERVICE (WDG_IPW_DIRECT_SERVICE)
  144. /**
  145. * @brief Define to disable unavailable functionality.
  146. */
  147. #define WDG_CLEAR_RESET_REQUEST (STD_OFF)
  148. /**
  149. * @brief This define indicate that the watchdog is Enable or Disable User mode support
  150. */
  151. #define WDG_ENABLE_USER_MODE_SUPPORT (STD_OFF)
  152. /**
  153. * @brief This variable will indicate if the ISR for WDG instances is used
  154. */
  155. #define WDG_ISR0_USED (WDG_IPW_ISR0_USED)
  156. #define WDG_ISR1_USED (WDG_IPW_ISR1_USED)
  157. /**
  158. * @brief Compile switch to enable/disable development error detection for this module
  159. */
  160. #define WDG_DEV_ERROR_DETECT (STD_OFF)
  161. /**
  162. * @brief Switch to globaly enable/disable the production error reporting.
  163. */
  164. #define WDG_DISABLE_DEM_REPORT_ERROR_STATUS (STD_ON)
  165. /**
  166. * @brief perform checking marco MCAL_ENABLE_USER_MODE_SUPPORT available or not.
  167. */
  168. #ifndef MCAL_ENABLE_USER_MODE_SUPPORT
  169. #if (STD_ON == WDG_ENABLE_USER_MODE_SUPPORT)
  170. #error MCAL_ENABLE_USER_MODE_SUPPORT is not enabled. For running Wdg in user mode, the MCAL_ENABLE_USER_MODE_SUPPORT needs to be defined
  171. #endif /* (STD_ON == WDG_ENABLE_USER_MODE_SUPPORT) */
  172. #endif /* ifndef MCAL_ENABLE_USER_MODE_SUPPORT */
  173. /**
  174. * @brief Define to enabled PreCompile Support.
  175. */
  176. #define WDG_PRECOMPILE_SUPPORT (STD_OFF)
  177. /**
  178. * @brief This macros indicate the Wdg timeout value for Wdg module.
  179. */
  180. #define WDG_TIMEOUT_VALUE_ARRAY {{(uint32)0,(uint32)500, (uint32)500}, \
  181. {(uint32) 0, (uint32)1, (uint32) 0} \
  182. }
  183. /*==================================================================================================
  184. * ENUMS
  185. ==================================================================================================*/
  186. /*==================================================================================================
  187. * STRUCTURES AND OTHER TYPEDEFS
  188. ==================================================================================================*/
  189. /*==================================================================================================
  190. * GLOBAL VARIABLE DECLARATIONS
  191. ==================================================================================================*/
  192. /*==================================================================================================
  193. * FUNCTION PROTOTYPES
  194. ==================================================================================================*/
  195. #ifdef __cplusplus
  196. }
  197. #endif
  198. /** @} */
  199. #endif /* WDG_CFG_DEFINES_H */