1 /* 2 * Copyright 2020-2023 NXP 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef POWER_IP_MC_ME_H 8 #define POWER_IP_MC_ME_H 9 10 /** 11 * @file Power_Ip_MC_ME.h 12 * @version 3.0.0 13 * 14 * @brief POWER IP driver header file. 15 * @details POWER IP driver header file. 16 * 17 * @addtogroup POWER_DRIVER Power Ip Driver 18 * @{ 19 */ 20 21 #ifdef __cplusplus 22 extern "C"{ 23 #endif 24 25 26 27 /*================================================================================================== 28 INCLUDE FILES 29 1) system and project includes 30 2) needed interfaces from external units 31 3) internal and external interfaces from this unit 32 ==================================================================================================*/ 33 #include "Power_Ip_Types.h" 34 #include "StandardTypes.h" 35 #include "OsIf.h" 36 #include "Mcal.h" 37 38 /*================================================================================================== 39 SOURCE FILE VERSION INFORMATION 40 ==================================================================================================*/ 41 #define POWER_IP_MC_ME_VENDOR_ID 43 42 #define POWER_IP_MC_ME_AR_RELEASE_MAJOR_VERSION 4 43 #define POWER_IP_MC_ME_AR_RELEASE_MINOR_VERSION 7 44 #define POWER_IP_MC_ME_AR_RELEASE_REVISION_VERSION 0 45 #define POWER_IP_MC_ME_SW_MAJOR_VERSION 3 46 #define POWER_IP_MC_ME_SW_MINOR_VERSION 0 47 #define POWER_IP_MC_ME_SW_PATCH_VERSION 0 48 49 /*================================================================================================== 50 FILE VERSION CHECKS 51 ==================================================================================================*/ 52 /* Check if Power_Ip_MC_ME.h file and Power_Ip_Types.h file have same versions */ 53 #if (POWER_IP_MC_ME_VENDOR_ID != POWER_IP_TYPES_VENDOR_ID) 54 #error "Power_Ip_MC_ME.h and Power_Ip_Types.h have different vendor IDs" 55 #endif 56 57 /* Check if Power_Ip_MC_ME.h file and Power_Ip_Types.h file are of the same Autosar version */ 58 #if ((POWER_IP_MC_ME_AR_RELEASE_MAJOR_VERSION != POWER_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \ 59 (POWER_IP_MC_ME_AR_RELEASE_MINOR_VERSION != POWER_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \ 60 (POWER_IP_MC_ME_AR_RELEASE_REVISION_VERSION != POWER_IP_TYPES_AR_RELEASE_REVISION_VERSION)) 61 #error "AutoSar Version Numbers of Power_Ip_MC_ME.h and Power_Ip_Types.h are different" 62 #endif 63 64 /* Check if Power_Ip_MC_ME.h file and Power_Ip_Types.h file are of the same Software version */ 65 #if ((POWER_IP_MC_ME_SW_MAJOR_VERSION != POWER_IP_TYPES_SW_MAJOR_VERSION) || \ 66 (POWER_IP_MC_ME_SW_MINOR_VERSION != POWER_IP_TYPES_SW_MINOR_VERSION) || \ 67 (POWER_IP_MC_ME_SW_PATCH_VERSION != POWER_IP_TYPES_SW_PATCH_VERSION)) 68 #error "Software Version Numbers of Power_Ip_MC_ME.h and Power_Ip_Types.h are different" 69 #endif 70 71 #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK 72 /* Check if Power_Ip_MC_ME.h file and StandardTypes.h file are of the same Autosar version */ 73 #if ((POWER_IP_MC_ME_AR_RELEASE_MAJOR_VERSION != STD_AR_RELEASE_MAJOR_VERSION) || \ 74 (POWER_IP_MC_ME_AR_RELEASE_MINOR_VERSION != STD_AR_RELEASE_MINOR_VERSION)) 75 #error "AutoSar Version Numbers of Power_Ip_MC_ME.h and StandardTypes.h are different" 76 #endif 77 78 /* Check if Power_Ip_MC_ME.h file and OsIf.h file are of the same Autosar version */ 79 #if ((POWER_IP_MC_ME_AR_RELEASE_MAJOR_VERSION != OSIF_AR_RELEASE_MAJOR_VERSION) || \ 80 (POWER_IP_MC_ME_AR_RELEASE_MINOR_VERSION != OSIF_AR_RELEASE_MINOR_VERSION)) 81 #error "AutoSar Version Numbers of Power_Ip_MC_ME.h and OsIf.h are different" 82 #endif 83 84 /* Check if Power_Ip_MC_ME.h file and Mcal.h file are of the same Autosar version */ 85 #if ((POWER_IP_MC_ME_AR_RELEASE_MAJOR_VERSION != MCAL_AR_RELEASE_MAJOR_VERSION) || \ 86 (POWER_IP_MC_ME_AR_RELEASE_MINOR_VERSION != MCAL_AR_RELEASE_MINOR_VERSION)) 87 #error "AutoSar Version Numbers of Power_Ip_MC_ME.h and Mcal.h are different" 88 #endif 89 #endif /* #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK */ 90 /*================================================================================================== 91 * CONSTANTS 92 ==================================================================================================*/ 93 94 95 /*================================================================================================== 96 DEFINES AND MACROS 97 ==================================================================================================*/ 98 99 100 /*================================================================================================== 101 * ENUMS 102 ==================================================================================================*/ 103 104 105 /*================================================================================================== 106 * STRUCTURES AND OTHER TYPEDEFS 107 ==================================================================================================*/ 108 109 110 /*================================================================================================== 111 * GLOBAL VARIABLE DECLARATIONS 112 ==================================================================================================*/ 113 114 115 /*================================================================================================== 116 * FUNCTION PROTOTYPES 117 ==================================================================================================*/ 118 #define MCU_START_SEC_CODE 119 120 #include "Mcu_MemMap.h" 121 122 #if (defined(POWER_IP_ENABLE_USER_MODE_SUPPORT)) 123 #if (STD_ON == POWER_IP_ENABLE_USER_MODE_SUPPORT) 124 #if (defined(MCAL_MC_ME_REG_PROT_AVAILABLE)) 125 #if (STD_ON == MCAL_MC_ME_REG_PROT_AVAILABLE) 126 void Power_Ip_MC_ME_SetUserAccessAllowed(void); 127 #endif /* (STD_ON == MCAL_MC_ME_REG_PROT_AVAILABLE) */ 128 #endif 129 #endif /* (STD_ON == POWER_IP_ENABLE_USER_MODE_SUPPORT) */ 130 #endif 131 132 void Power_Ip_MC_ME_ConfigCoreCOFBClock(const Power_Ip_MC_ME_ModeConfigType * ModeConfigPtr); 133 void Power_Ip_MC_ME_EnablePartitionClock(const Power_Ip_MC_ME_ModeConfigType * ModeConfigPtr); 134 void Power_Ip_MC_ME_DisablePartitionClock(const Power_Ip_MC_ME_ModeConfigType * ModeConfigPtr); 135 void Power_Ip_MC_ME_SocTriggerResetEvent(Power_Ip_PowerModeType PowerMode); 136 137 #if (defined(POWER_IP_ENTER_LOW_POWER_MODE)) 138 #if (POWER_IP_ENTER_LOW_POWER_MODE == STD_ON) 139 void Power_Ip_MC_ME_CoreStandbyEntry(const Power_Ip_ModeConfigType * ModeConfigPtr); 140 void Power_Ip_MC_ME_SocStandbyEntry(const Power_Ip_ModeConfigType * ModeConfigPtr); 141 Power_Ip_PowerModeType Power_Ip_MC_ME_GetPreviousMode(void); 142 #endif 143 #endif /* (POWER_IP_ENTER_LOW_POWER_MODE == STD_ON) */ 144 145 #define MCU_STOP_SEC_CODE 146 147 #include "Mcu_MemMap.h" 148 149 150 #ifdef __cplusplus 151 } 152 #endif 153 154 /** @} */ 155 #endif /* POWER_IP_MC_ME_H */ 156 157