Wdg_43_Instance1.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  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_43_Instance1_H
  25. #define Wdg_43_Instance1_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 "Wdg_ChannelTypes.h"
  42. #include "Mcal.h"
  43. #include "Wdg_Cfg.h"
  44. #ifdef WDG_INSTANCE1
  45. #if (WDG_INSTANCE1 == STD_ON)
  46. /*==================================================================================================
  47. * SOURCE FILE VERSION INFORMATION
  48. ==================================================================================================*/
  49. #define WDG_43_INSTANCE1_VENDOR_ID 43
  50. #define WDG_43_INSTANCE1_MODULE_ID 102
  51. #define WDG_43_INSTANCE1_AR_RELEASE_MAJOR_VERSION 4
  52. #define WDG_43_INSTANCE1_AR_RELEASE_MINOR_VERSION 4
  53. #define WDG_43_INSTANCE1_AR_RELEASE_REVISION_VERSION 0
  54. #define WDG_43_INSTANCE1_SW_MAJOR_VERSION 1
  55. #define WDG_43_INSTANCE1_SW_MINOR_VERSION 0
  56. #define WDG_43_INSTANCE1_SW_PATCH_VERSION 0
  57. /*==================================================================================================
  58. FILE VERSION CHECKS
  59. ==================================================================================================*/
  60. /* Check if current file and WDG configuration header file are of the same vendor */
  61. #if (WDG_43_INSTANCE1_VENDOR_ID != WDG_VENDOR_ID_CFG)
  62. #error "Wdg.h and Wdg_Cfg.h have different vendor ids"
  63. #endif
  64. /* Check if current file and Wdg_Cfg header file are of the same Autosar version */
  65. #if ((WDG_43_INSTANCE1_AR_RELEASE_MAJOR_VERSION != WDG_AR_RELEASE_MAJOR_VERSION_CFG) || \
  66. (WDG_43_INSTANCE1_AR_RELEASE_MINOR_VERSION != WDG_AR_RELEASE_MINOR_VERSION_CFG) || \
  67. (WDG_43_INSTANCE1_AR_RELEASE_REVISION_VERSION != WDG_AR_RELEASE_REVISION_VERSION_CFG))
  68. #error "AutoSar Version Numbers of Wdg.h and Wdg_Cfg.h are different"
  69. #endif
  70. /* Check if current file and Wdg_Cfg header file are of the same software version */
  71. #if ((WDG_43_INSTANCE1_SW_MAJOR_VERSION != WDG_SW_MAJOR_VERSION_CFG) || \
  72. (WDG_43_INSTANCE1_SW_MINOR_VERSION != WDG_SW_MINOR_VERSION_CFG) || \
  73. (WDG_43_INSTANCE1_SW_PATCH_VERSION != WDG_SW_PATCH_VERSION_CFG))
  74. #error "Software Version Numbers of Wdg.h and Wdg_Cfg.h are different"
  75. #endif
  76. /* Check if current file and Wdg_ChannelTypes header file are of the same vendor */
  77. #if (WDG_43_INSTANCE1_VENDOR_ID != WDG_CHANNEL_TYPES_VENDOR_ID)
  78. #error "Wdg.h and Wdg_ChannelTypes.h have different vendor ids"
  79. #endif
  80. #if ((WDG_43_INSTANCE1_AR_RELEASE_MAJOR_VERSION != WDG_CHANNEL_TYPES_AR_RELEASE_MAJOR_VERSION) || \
  81. (WDG_43_INSTANCE1_AR_RELEASE_MINOR_VERSION != WDG_CHANNEL_TYPES_AR_RELEASE_MINOR_VERSION) || \
  82. (WDG_43_INSTANCE1_AR_RELEASE_REVISION_VERSION != WDG_CHANNEL_TYPES_AR_RELEASE_REVISION_VERSION))
  83. #error "AutoSar Version Numbers of Wdg.h and Wdg_ChannelTypes.h are different"
  84. #endif
  85. /* Check if current file and Wdg_Cfg header file are of the same software version */
  86. #if ((WDG_43_INSTANCE1_SW_MAJOR_VERSION != WDG_CHANNEL_TYPES_SW_MAJOR_VERSION) || \
  87. (WDG_43_INSTANCE1_SW_MINOR_VERSION != WDG_CHANNEL_TYPES_SW_MINOR_VERSION) || \
  88. (WDG_43_INSTANCE1_SW_PATCH_VERSION != WDG_CHANNEL_TYPES_SW_PATCH_VERSION))
  89. #error "Software Version Numbers of Wdg.h and Wdg_ChannelTypes.h are different"
  90. #endif
  91. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  92. /* Check if current file and Mcal header file are of the same version */
  93. #if ((WDG_43_INSTANCE1_AR_RELEASE_MAJOR_VERSION != MCAL_AR_RELEASE_MAJOR_VERSION) || \
  94. (WDG_43_INSTANCE1_AR_RELEASE_MINOR_VERSION != MCAL_AR_RELEASE_MINOR_VERSION))
  95. #error "AutoSar Version Numbers of Wdg.h and Mcal.h are different"
  96. #endif
  97. #endif /* DISABLE_MCAL_INTERMODULE_ASR_CHECK */
  98. /*==================================================================================================
  99. * CONSTANTS
  100. ==================================================================================================*/
  101. /*==================================================================================================
  102. * DEFINES AND MACROS
  103. ==================================================================================================*/
  104. /*==================================================================================================
  105. * ENUMS
  106. ==================================================================================================*/
  107. /*==================================================================================================
  108. * STRUCTURES AND OTHER TYPEDEFS
  109. ==================================================================================================*/
  110. /*==================================================================================================
  111. * GLOBAL VARIABLE DECLARATIONS
  112. ==================================================================================================*/
  113. #define WDG_START_SEC_CONFIG_DATA_UNSPECIFIED
  114. #include "Wdg_MemMap.h"
  115. WDG_43_INSTANCE1_CONFIG_EXT
  116. #define WDG_STOP_SEC_CONFIG_DATA_UNSPECIFIED
  117. #include "Wdg_MemMap.h"
  118. /*==================================================================================================
  119. * FUNCTION PROTOTYPES
  120. ==================================================================================================*/
  121. #ifdef WDG_ROM
  122. #if (WDG_ROM == 1U)
  123. #define WDG_START_SEC_CODE
  124. #endif
  125. #else
  126. #if (WDG_RAM == 0U)
  127. #define WDG_START_SEC_RAMCODE
  128. #endif
  129. #endif
  130. #include "Wdg_MemMap.h"
  131. /**
  132. * @brief This function initializes the WDG module.
  133. * @details The @p Wdg_43_Instance1_Init function shall initialize the Wdg module and the
  134. * watchdog hardware, i.e. it shall set the default watchdog mode and
  135. * timeout period as provided in the configuration set.
  136. *
  137. * @param[in] ConfigPtr Pointer to configuration set.
  138. *
  139. *
  140. *
  141. * @api
  142. */
  143. void Wdg_43_Instance1_Init(const Wdg_ConfigType *ConfigPtr);
  144. /**
  145. * @brief Switches the watchdog into the mode Mode.
  146. * @details By choosing one of a limited number of statically configured
  147. * settings (e.g. toggle or window watchdog, different timeout periods)
  148. * the Wdg module and the watchdog hardware can be switched between the
  149. * following three different watchdog modes using the @p Wdg_43_Instance1_SetMode
  150. * function:<br>
  151. * - WDGIF_OFF_MODE,
  152. * - WDGIF_SLOW_MODE,
  153. * - WDGIF_FAST_MODE.
  154. * .
  155. *
  156. * @param[in] Mode One of the following statically configured modes:<br>
  157. * -# WDGIF_OFF_MODE,
  158. * -# WDGIF_SLOW_MODE,
  159. * -# WDGIF_FAST_MODE.
  160. * .
  161. *
  162. * @return Std_ReturnType.
  163. * @retval E_OK Mode switch executed completely and successfully.
  164. * @retval E_NOT_OK The mode switch encountered errors.
  165. *
  166. *
  167. *
  168. * @api
  169. */
  170. Std_ReturnType Wdg_43_Instance1_SetMode(WdgIf_ModeType Mode);
  171. #if (WDG_DIRECT_SERVICE == STD_OFF)
  172. /**
  173. * @brief Reset the watchdog timeout counter according to the timeout value passed.
  174. * @details
  175. *
  176. * @param[in] timeout Timeout value (milliseconds) for setting the trigger counter.
  177. *
  178. *
  179. * @api
  180. */
  181. void Wdg_43_Instance1_SetTriggerCondition(uint16 timeout);
  182. #endif
  183. #if (WDG_DIRECT_SERVICE_INSTANCE1 == STD_ON)
  184. /**
  185. * @brief Service the Watchdog directly without using an external trigger.
  186. * @details
  187. *
  188. * @param
  189. *
  190. *
  191. *
  192. * @api
  193. */
  194. void Wdg_43_Instance1_Service(void);
  195. #endif
  196. #if (WDG_43_INSTANCE1_VERSION_INFO_API == STD_ON)
  197. /**
  198. * @brief Returns the version information of the module.
  199. * @details The Wdg_43_Instance1_ChannelGetVersionInfo function shall return the version
  200. * information of this module. The version information includes:
  201. * - Module Id,
  202. * - Vendor Id,
  203. * - Vendor specific version numbers.
  204. * .
  205. *
  206. * @pre This function is only required if the WDG_VERSION_INFO_API has to be
  207. * equal STD_ON.
  208. *
  209. * @param[in,out] versioninfo Pointer to where to store the version
  210. * information of this module.
  211. *
  212. * @api
  213. *
  214. * @implements Wdg_InstanceNo_GetVersionInfo_Activity
  215. *
  216. */
  217. void Wdg_43_Instance1_GetVersionInfo(Std_VersionInfoType *versioninfo);
  218. #endif /* WDG_VERSION_INFO_API == STD_ON */
  219. #ifdef WDG_ROM
  220. #if (WDG_ROM == 1U)
  221. #define WDG_STOP_SEC_CODE
  222. #endif
  223. #else
  224. #if (WDG_RAM == 0U)
  225. #define WDG_STOP_SEC_RAMCODE
  226. #endif
  227. #endif
  228. #include "Wdg_MemMap.h"
  229. #endif /*#if (WDG_INSTANCE1 == STD_ON)*/
  230. #endif
  231. #ifdef __cplusplus
  232. }
  233. #endif
  234. /** @} */
  235. #endif /* Wdg_43_Instance1_H*/