Power_Ip_SIM.h 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. /**
  25. * @file Power_Ip_SIM.h
  26. * @version 1.0.0
  27. *
  28. * @brief POWER IP driver header file.
  29. * @details POWER IP driver header file.
  30. *
  31. * @addtogroup POWER_DRIVER Power Ip Driver
  32. * @{
  33. */
  34. #ifndef POWER_IP_SIM_H
  35. #define POWER_IP_SIM_H
  36. #ifdef __cplusplus
  37. extern "C"{
  38. #endif
  39. /*==================================================================================================
  40. INCLUDE FILES
  41. 1) system and project includes
  42. 2) needed interfaces from external units
  43. 3) internal and external interfaces from this unit
  44. ==================================================================================================*/
  45. #include "Power_Ip_Cfg.h"
  46. #include "Power_Ip_Cfg_Defines.h"
  47. #if defined(POWER_IP_S32K116)
  48. #include "S32K116_SIM.h"
  49. #elif defined(POWER_IP_S32K118)
  50. #include "S32K118_SIM.h"
  51. #elif defined(POWER_IP_S32K142)
  52. #include "S32K142_SIM.h"
  53. #elif defined(POWER_IP_S32K142W)
  54. #include "S32K142W_SIM.h"
  55. #elif defined(POWER_IP_S32K144)
  56. #include "S32K144_SIM.h"
  57. #elif defined(POWER_IP_S32K144W)
  58. #include "S32K144W_SIM.h"
  59. #elif defined(POWER_IP_S32K146)
  60. #include "S32K146_SIM.h"
  61. #elif defined(POWER_IP_S32K148)
  62. #include "S32K148_SIM.h"
  63. #else
  64. #error "Derivative not found"
  65. #endif
  66. #include "OsIf.h"
  67. #include "Mcal.h"
  68. /*==================================================================================================
  69. SOURCE FILE VERSION INFORMATION
  70. ==================================================================================================*/
  71. #define POWER_IP_SIM_VENDOR_ID 43
  72. #define POWER_IP_SIM_AR_RELEASE_MAJOR_VERSION 4
  73. #define POWER_IP_SIM_AR_RELEASE_MINOR_VERSION 4
  74. #define POWER_IP_SIM_AR_RELEASE_REVISION_VERSION 0
  75. #define POWER_IP_SIM_SW_MAJOR_VERSION 1
  76. #define POWER_IP_SIM_SW_MINOR_VERSION 0
  77. #define POWER_IP_SIM_SW_PATCH_VERSION 0
  78. /*==================================================================================================
  79. FILE VERSION CHECKS
  80. ==================================================================================================*/
  81. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  82. /* Check if Power_Ip_SIM.h file and Mcal.h file are of the same Autosar version */
  83. #if ((POWER_IP_SIM_AR_RELEASE_MAJOR_VERSION != MCAL_AR_RELEASE_MAJOR_VERSION) || \
  84. (POWER_IP_SIM_AR_RELEASE_MINOR_VERSION != MCAL_AR_RELEASE_MINOR_VERSION))
  85. #error "AutoSar Version Numbers of Power_Ip_SIM.h and Mcal.h are different"
  86. #endif
  87. /* Check if Power_Ip_SIM.h file and OsIf.h file are of the same Autosar version */
  88. #if ((POWER_IP_SIM_AR_RELEASE_MAJOR_VERSION != OSIF_AR_RELEASE_MAJOR_VERSION) || \
  89. (POWER_IP_SIM_AR_RELEASE_MINOR_VERSION != OSIF_AR_RELEASE_MINOR_VERSION))
  90. #error "AutoSar Version Numbers of Power_Ip_SIM.h and OsIf.h are different"
  91. #endif
  92. #endif
  93. /* Check if Power_Ip_SIM.h file and Power_Ip_Cfg_Defines.h file have same versions */
  94. #if (POWER_IP_SIM_VENDOR_ID != POWER_IP_CFG_DEFINES_VENDOR_ID)
  95. #error "Power_Ip_SIM.h and Power_Ip_Cfg_Defines.h have different vendor IDs"
  96. #endif
  97. /* Check if Power_Ip_SIM.h file and Power_Ip_Cfg_Defines.h file are of the same Autosar version */
  98. #if ((POWER_IP_SIM_AR_RELEASE_MAJOR_VERSION != POWER_IP_CFG_DEFINES_AR_RELEASE_MAJOR_VERSION) || \
  99. (POWER_IP_SIM_AR_RELEASE_MINOR_VERSION != POWER_IP_CFG_DEFINES_AR_RELEASE_MINOR_VERSION) || \
  100. (POWER_IP_SIM_AR_RELEASE_REVISION_VERSION != POWER_IP_CFG_DEFINES_AR_RELEASE_REVISION_VERSION))
  101. #error "AutoSar Version Numbers of Power_Ip_SIM.h and Power_Ip_Cfg_Defines.h are different"
  102. #endif
  103. /* Check if Power_Ip_SIM.h file and Power_Ip_Cfg_Defines.h file are of the same Software version */
  104. #if ((POWER_IP_SIM_SW_MAJOR_VERSION != POWER_IP_CFG_DEFINES_SW_MAJOR_VERSION) || \
  105. (POWER_IP_SIM_SW_MINOR_VERSION != POWER_IP_CFG_DEFINES_SW_MINOR_VERSION) || \
  106. (POWER_IP_SIM_SW_PATCH_VERSION != POWER_IP_CFG_DEFINES_SW_PATCH_VERSION))
  107. #error "Software Version Numbers of Power_Ip_SIM.h and Power_Ip_Cfg_Defines.h are different"
  108. #endif
  109. /* Check if Power_Ip_SIM.h file and Power_Ip_Cfg.h file have same versions */
  110. #if (POWER_IP_SIM_VENDOR_ID != POWER_IP_CFG_VENDOR_ID)
  111. #error "Power_Ip_SIM.h and Power_Ip_Cfg.h have different vendor IDs"
  112. #endif
  113. /* Check if Power_Ip_SIM.h file and Power_Ip_Cfg.h file are of the same Autosar version */
  114. #if ((POWER_IP_SIM_AR_RELEASE_MAJOR_VERSION != POWER_IP_CFG_AR_RELEASE_MAJOR_VERSION) || \
  115. (POWER_IP_SIM_AR_RELEASE_MINOR_VERSION != POWER_IP_CFG_AR_RELEASE_MINOR_VERSION) || \
  116. (POWER_IP_SIM_AR_RELEASE_REVISION_VERSION != POWER_IP_CFG_AR_RELEASE_REVISION_VERSION))
  117. #error "AutoSar Version Numbers of Power_Ip_SIM.h and Power_Ip_Cfg.h are different"
  118. #endif
  119. /* Check if Power_Ip_SIM.h file and Power_Ip_Cfg.h file are of the same Software version */
  120. #if ((POWER_IP_SIM_SW_MAJOR_VERSION != POWER_IP_CFG_SW_MAJOR_VERSION) || \
  121. (POWER_IP_SIM_SW_MINOR_VERSION != POWER_IP_CFG_SW_MINOR_VERSION) || \
  122. (POWER_IP_SIM_SW_PATCH_VERSION != POWER_IP_CFG_SW_PATCH_VERSION))
  123. #error "Software Version Numbers of Power_Ip_SIM.h and Power_Ip_Cfg.h are different"
  124. #endif
  125. /*==================================================================================================
  126. * CONSTANTS
  127. ==================================================================================================*/
  128. /*==================================================================================================
  129. DEFINES AND MACROS
  130. ==================================================================================================*/
  131. /*==================================================================================================
  132. * ENUMS
  133. ==================================================================================================*/
  134. /*==================================================================================================
  135. * STRUCTURES AND OTHER TYPEDEFS
  136. ==================================================================================================*/
  137. /*==================================================================================================
  138. * GLOBAL VARIABLE DECLARATIONS
  139. ==================================================================================================*/
  140. /*==================================================================================================
  141. * FUNCTION PROTOTYPES
  142. ==================================================================================================*/
  143. #define MCU_START_SEC_CODE
  144. #include "Mcu_MemMap.h"
  145. #ifdef POWER_IP_SRAM_RETEN_CONFIG_API
  146. #if (POWER_IP_SRAM_RETEN_CONFIG_API == STD_ON)
  147. #ifdef POWER_IP_ENABLE_USER_MODE_SUPPORT
  148. #if (STD_ON == POWER_IP_ENABLE_USER_MODE_SUPPORT)
  149. #define Call_Power_Ip_SIM_SRAMRetentionConfig(bSRAMReten) \
  150. do\
  151. { \
  152. OsIf_Trusted_Call1param(Power_Ip_SIM_SRAMRetentionConfig,(bSRAMReten)); \
  153. }\
  154. while(0)
  155. #else
  156. #define Call_Power_Ip_SIM_SRAMRetentionConfig(bSRAMReten) \
  157. do\
  158. { \
  159. Power_Ip_SIM_SRAMRetentionConfig(bSRAMReten); \
  160. }\
  161. while(0)
  162. #endif
  163. #endif
  164. #endif
  165. #endif
  166. #ifdef POWER_IP_SRAM_RETEN_CONFIG_API
  167. #if (POWER_IP_SRAM_RETEN_CONFIG_API == STD_ON)
  168. void Power_Ip_SIM_SRAMRetentionConfig(Power_Ip_SRAMRetenConfigType eSRAMRetenConfig);
  169. #endif
  170. #endif
  171. #define MCU_STOP_SEC_CODE
  172. #include "Mcu_MemMap.h"
  173. #ifdef __cplusplus
  174. }
  175. #endif
  176. #endif /* POWER_IP_SIM_H */
  177. /** @} */