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