123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826 |
- #ifndef MCU_CFG_H
- #define MCU_CFG_H
- #ifdef __cplusplus
- extern "C"{
- #endif
- #include "Mcal.h"
- #include "Clock_Ip_Cfg.h"
- #include "Power_Ip_Cfg.h"
- #include "Ram_Ip_Cfg.h"
- #include "Mcu_VS_0_PBcfg.h"
- #define MCU_CFG_VENDOR_ID 43
- #define MCU_CFG_AR_RELEASE_MAJOR_VERSION 4
- #define MCU_CFG_AR_RELEASE_MINOR_VERSION 4
- #define MCU_CFG_AR_RELEASE_REVISION_VERSION 0
- #define MCU_CFG_SW_MAJOR_VERSION 1
- #define MCU_CFG_SW_MINOR_VERSION 0
- #define MCU_CFG_SW_PATCH_VERSION 0
- #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
- #if ((MCU_CFG_AR_RELEASE_MAJOR_VERSION != MCAL_AR_RELEASE_MAJOR_VERSION) || \
- (MCU_CFG_AR_RELEASE_MINOR_VERSION != MCAL_AR_RELEASE_MINOR_VERSION))
- #error "AutoSar Version Numbers of Mcu_Cfg.h and Mcal.h are different"
- #endif
- #endif
- #if (MCU_CFG_VENDOR_ID != CLOCK_IP_CFG_VENDOR_ID)
- #error "Mcu_Cfg.h and Clock_Ip_Cfg.h have different vendor ids"
- #endif
- #if ((MCU_CFG_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_CFG_AR_RELEASE_MAJOR_VERSION) || \
- (MCU_CFG_AR_RELEASE_MINOR_VERSION != CLOCK_IP_CFG_AR_RELEASE_MINOR_VERSION) || \
- (MCU_CFG_AR_RELEASE_REVISION_VERSION != CLOCK_IP_CFG_AR_RELEASE_REVISION_VERSION) \
- )
- #error "AutoSar Version Numbers of Mcu_Cfg.h and Clock_Ip_Cfg.h are different"
- #endif
- #if ((MCU_CFG_SW_MAJOR_VERSION != CLOCK_IP_CFG_SW_MAJOR_VERSION) || \
- (MCU_CFG_SW_MINOR_VERSION != CLOCK_IP_CFG_SW_MINOR_VERSION) || \
- (MCU_CFG_SW_PATCH_VERSION != CLOCK_IP_CFG_SW_PATCH_VERSION) \
- )
- #error "Software Version Numbers of Mcu_Cfg.h and Clock_Ip_Cfg.h are different"
- #endif
- #if (MCU_CFG_VENDOR_ID != POWER_IP_CFG_VENDOR_ID)
- #error "Mcu_Cfg.h and Power_Ip_Cfg.h have different vendor ids"
- #endif
- #if ((MCU_CFG_AR_RELEASE_MAJOR_VERSION != POWER_IP_CFG_AR_RELEASE_MAJOR_VERSION) || \
- (MCU_CFG_AR_RELEASE_MINOR_VERSION != POWER_IP_CFG_AR_RELEASE_MINOR_VERSION) || \
- (MCU_CFG_AR_RELEASE_REVISION_VERSION != POWER_IP_CFG_AR_RELEASE_REVISION_VERSION) \
- )
- #error "AutoSar Version Numbers of Mcu_Cfg.h and Power_Ip_Cfg.h are different"
- #endif
- #if ((MCU_CFG_SW_MAJOR_VERSION != POWER_IP_CFG_SW_MAJOR_VERSION) || \
- (MCU_CFG_SW_MINOR_VERSION != POWER_IP_CFG_SW_MINOR_VERSION) || \
- (MCU_CFG_SW_PATCH_VERSION != POWER_IP_CFG_SW_PATCH_VERSION) \
- )
- #error "Software Version Numbers of Mcu_Cfg.h and Power_Ip_Cfg.h are different"
- #endif
- #if (MCU_CFG_VENDOR_ID != RAM_IP_CFG_VENDOR_ID)
- #error "Mcu_Cfg.h and Ram_Ip_Cfg.h have different vendor ids"
- #endif
- #if ((MCU_CFG_AR_RELEASE_MAJOR_VERSION != RAM_IP_CFG_AR_RELEASE_MAJOR_VERSION) || \
- (MCU_CFG_AR_RELEASE_MINOR_VERSION != RAM_IP_CFG_AR_RELEASE_MINOR_VERSION) || \
- (MCU_CFG_AR_RELEASE_REVISION_VERSION != RAM_IP_CFG_AR_RELEASE_REVISION_VERSION) \
- )
- #error "AutoSar Version Numbers of Mcu_Cfg.h and Ram_Ip_Cfg.h are different"
- #endif
- #if ((MCU_CFG_SW_MAJOR_VERSION != RAM_IP_CFG_SW_MAJOR_VERSION) || \
- (MCU_CFG_SW_MINOR_VERSION != RAM_IP_CFG_SW_MINOR_VERSION) || \
- (MCU_CFG_SW_PATCH_VERSION != RAM_IP_CFG_SW_PATCH_VERSION) \
- )
- #error "Software Version Numbers of Mcu_Cfg.h and Ram_Ip_Cfg.h are different"
- #endif
- #if (MCU_CFG_VENDOR_ID != MCU_VS_0_PBCFG_VENDOR_ID)
- #error "Mcu_Cfg.h and Mcu_VS_0_PBcfg.h have different vendor ids"
- #endif
- #if ((MCU_CFG_AR_RELEASE_MAJOR_VERSION != MCU_VS_0_PBCFG_AR_RELEASE_MAJOR_VERSION) || \
- (MCU_CFG_AR_RELEASE_MINOR_VERSION != MCU_VS_0_PBCFG_AR_RELEASE_MINOR_VERSION) || \
- (MCU_CFG_AR_RELEASE_REVISION_VERSION != MCU_VS_0_PBCFG_AR_RELEASE_REVISION_VERSION) \
- )
- #error "AutoSar Version Numbers of Mcu_Cfg.h and Mcu_VS_0_PBcfg.h are different"
- #endif
- #if ((MCU_CFG_SW_MAJOR_VERSION != MCU_VS_0_PBCFG_SW_MAJOR_VERSION) || \
- (MCU_CFG_SW_MINOR_VERSION != MCU_VS_0_PBCFG_SW_MINOR_VERSION) || \
- (MCU_CFG_SW_PATCH_VERSION != MCU_VS_0_PBCFG_SW_PATCH_VERSION) \
- )
- #error "Software Version Numbers of Mcu_Cfg.h and Mcu_VS_0_PBcfg.h are different"
- #endif
- #define MCU_INSTANCE_ID ((uint8)0x0U)
- #define MCU_INIT_ID ((uint8)0x00U)
- #define MCU_INITRAMSECTION_ID ((uint8)0x01U)
- #define MCU_INITCLOCK_ID ((uint8)0x02U)
- #define MCU_DISTRIBUTEPLLCLOCK_ID ((uint8)0x03U)
- #define MCU_GETPLLSTATUS_ID ((uint8)0x04U)
- #define MCU_GETRESETREASON_ID ((uint8)0x05U)
- #define MCU_GETRESETRAWVALUE_ID ((uint8)0x06U)
- #define MCU_PERFORMRESET_ID ((uint8)0x07U)
- #define MCU_SETMODE_ID ((uint8)0x08U)
- #define MCU_GETVERSIONINFO_ID ((uint8)0x09U)
- #define MCU_GETRAMSTATE_ID ((uint8)0x0AU)
- #define MCU_GETPOWERDOMAIN_ID ((uint8)0x0BU)
- #define MCU_GETPERIPHERALSTATE_ID ((uint8)0x0CU)
- #define MCU_GETSYSTEMSTATE_ID ((uint8)0x0DU)
- #define MCU_GETPOWERMODESTATE_ID ((uint8)0x0EU)
- #define MCU_GETMEMCONFIG_ID ((uint8)0x13U)
- #define MCU_GETMIDRSTRUCTURE_ID ((uint8)0x14U)
- #define MCU_SSCMGETSTATUS_ID ((uint8)0x15U)
- #define MCU_SSCMGETUOPT_ID ((uint8)0x16U)
- #define MCU_DISABLECMU_ID ((uint8)0x17U)
- #define MCU_EMIOSCONFIGUREGPREN_ID ((uint8)0x18U)
- #define MCU_GETCLOCKFREQUENCY_ID ((uint8)0x19U)
- #define MCU_SLEEPONEXIT_ID ((uint8)0x1AU)
- #define MCU_SRAMRETENCONFIG_ID ((uint8)0x1BU)
- #define MCU_DEV_ERROR_DETECT (STD_OFF)
- #define MCU_DISABLE_PMC_INIT (STD_OFF)
- #define MCU_DISABLE_RCM_INIT (STD_OFF)
- #define MCU_DISABLE_SMC_INIT (STD_OFF)
- #define MCU_VERSION_INFO_API (STD_OFF)
- #define MCU_GET_RAM_STATE_API (STD_OFF)
- #define MCU_INIT_CLOCK (STD_ON)
- #define MCU_NO_PLL (STD_OFF)
- #define MCU_CMU_PMC_SCG_INTERRUPT (STD_OFF)
- #if (MCU_PERFORM_RESET_API == STD_ON)
- #define MCU_RESET_CALLOUT_USED (STD_OFF)
- #endif
- #define MCU_CMU_ERROR_ISR_USED (STD_OFF)
- #define MCU_GET_PERIPH_STATE_API (STD_OFF)
- #define MCU_POWERMODE_STATE_API (STD_OFF)
- #define MCU_GET_POWER_DOMAIN_API (STD_OFF)
- #define MCU_GET_SYSTEM_STATE_API (STD_OFF)
- #define MCU_GET_MEM_CONFIG_API (STD_OFF)
- #define MCU_SSCM_GET_STATUS_API (STD_OFF)
- #define MCU_SSCM_GET_UOPT_API (STD_OFF)
- #define MCU_GET_MIDR_API (STD_OFF)
- #define MCU_EMIOS_CONFIGURE_GPREN_API (STD_OFF)
- #define MCU_DISABLE_CMU_API (STD_OFF)
- #define MCU_GET_CLOCK_FREQUENCY_API (STD_ON)
- #define MCU_DISABLE_DEM_REPORT_ERROR_STATUS (STD_ON)
- #define MCU_SRAM_RETEN_CONFIG_API (STD_OFF)
- #define MCU_DISABLE_RAM_CONFIG (STD_ON)
- #define MCU_DISABLE_FLASH_CONFIG (STD_ON)
- #if (MCU_CMU_PMC_SCG_INTERRUPT == STD_ON)
- #define MCU_VOLTAGE_ERROR_ISR_USED (STD_OFF)
- #endif
- #define MCU_MAX_CLKCONFIGS ((uint32)1U)
- #define MCU_MAX_MODECONFIGS ((uint32)1U)
- #define MCU_MAX_RAMCONFIGS ((uint32)0U)
- #define MCU_MAX_NORAMCONFIGS
- #define MCU_PRECOMPILE_SUPPORT (STD_ON)
- #ifdef MCU_GET_MIDR_API
- #if (MCU_GET_MIDR_API == STD_ON)
- #define MCU_SIUL2_TOTAL_UNITS ((uint8)0U)
- #endif
- #endif
- #ifdef MCU_ERROR_ISR_NOTIFICATION
- #define MCU_CMU_CLEAR_CLOCK_IRQ_FLAG (MCU_CMU_ERROR_ISR_USED)
- #endif
- #if !(defined (CLOCK_IP_S32K1))
- #define MCU_ENABLE_USER_MODE_SUPPORT (STD_OFF)
- #ifndef MCAL_ENABLE_USER_MODE_SUPPORT
- #if (MCU_ENABLE_USER_MODE_SUPPORT == STD_ON)
- #error MCAL_ENABLE_USER_MODE_SUPPORT is not enabled. For running Mcu in user mode the MCAL_ENABLE_USER_MODE_SUPPORT needs to be defined.
- #endif
- #endif
- #endif
- #define MCU_RAW_RESET_DEFAULT ((uint32)0xFFFFFFFFUL)
- #define MCU_RAW_RESET_SACKERR ((uint32)0x00002000U)
- #define MCU_RAW_RESET_MDM_AP ((uint32)0x00000800U)
- #define MCU_RAW_RESET_SW ((uint32)0x00000400U)
- #define MCU_RAW_RESET_LOCKUP ((uint32)0x00000200U)
- #define MCU_RAW_RESET_JTAG ((uint32)0x00000100U)
- #define MCU_RAW_RESET_POR ((uint32)0x00000080U)
- #define MCU_RAW_RESET_PIN ((uint32)0x00000040U)
- #define MCU_RAW_RESET_WDOG ((uint32)0x00000020U)
- #define MCU_RAW_RESET_CMU_LOC ((uint32)0x00000010U)
- #define MCU_RAW_RESET_LOL ((uint32)0x00000008U)
- #define MCU_RAW_RESET_LOC ((uint32)0x00000004U)
- #define MCU_RAW_RESET_LVD ((uint32)0x00000002U)
- #define MCU_SLEEPONEXIT_SUPPORT (STD_ON)
- #if (MCU_DEV_ERROR_DETECT == STD_ON)
- #define MCU_E_PARAM_CONFIG ((uint8)0x0AU)
- #if (MCU_INIT_CLOCK == STD_ON)
- #define MCU_E_PARAM_CLOCK ((uint8)0x0BU)
- #endif
- #define MCU_E_PARAM_MODE ((uint8)0x0CU)
- #ifndef MCU_MAX_NORAMCONFIGS
- #define MCU_E_PARAM_RAMSECTION ((uint8)0x0DU)
- #endif
- #if (MCU_INIT_CLOCK == STD_ON) && (MCU_NO_PLL == STD_OFF)
- #define MCU_E_PLL_NOT_LOCKED ((uint8)0x0EU)
- #endif
- #define MCU_E_UNINIT ((uint8)0x0FU)
- #if (MCU_VERSION_INFO_API == STD_ON) || (MCU_GET_MIDR_API == STD_ON)
- #define MCU_E_PARAM_POINTER ((uint8)0x10U)
- #endif
- #define MCU_E_INIT_FAILED ((uint8)0x11U)
- #define MCU_E_ALREADY_INITIALIZED ((uint8)0x13U)
- #if (MCU_DISABLE_CMU_API == STD_ON)
- #define MCU_E_CMU_INDEX_OUT_OF_RANGE ((uint8)0x22U)
- #endif
- #endif
- #ifdef MCU_ERROR_ISR_NOTIFICATION
- #if (MCU_CMU_ERROR_ISR_USED == STD_ON)
- #define MCU_E_ISR_CLOCK_FAILURE ((uint8)0x01U)
- #endif
- #endif
- typedef uint32 Mcu_ModeType;
- typedef uint32 Mcu_RamSectionType;
- typedef uint32 Mcu_RamWriteSizeType;
- #if (MCU_INIT_CLOCK == STD_ON)
- typedef uint32 Mcu_ClockType;
- #endif
- typedef uint32 Mcu_RawResetType;
- typedef struct
- {
- Mcal_DemErrorType Mcu_E_TimeoutFailureCfg;
- Mcal_DemErrorType Mcu_E_InvalidFxoscConfigCfg;
- Mcal_DemErrorType Mcu_E_ClockMuxSwitchFailureCfg;
- Mcal_DemErrorType Mcu_E_ClockFailureCfg;
- Mcal_DemErrorType Mcu_E_SwitchModeFailureCfg;
- } Mcu_DemConfigType;
- #if (MCU_POWERMODE_STATE_API == STD_ON)
- typedef uint32 Mcu_PowerModeStateType;
- #endif
- #if (MCU_INIT_CLOCK == STD_ON)
- #define McuClockSettingConfig_0 ((Mcu_ClockType)0U)
- #define McuConf_McuClockSettingConfig_McuClockSettingConfig_0 ((Mcu_ClockType)0U)
- #endif
- #define McuModeSettingConf_Run ((Mcu_ModeType)0U)
- #define McuConf_McuModeSettingConf_McuModeSettingConf_Run ((Mcu_ModeType)0U)
- typedef enum
- {
- MCU_PLL_LOCKED = 0x33U,
- MCU_PLL_UNLOCKED = 0xCCU,
- MCU_PLL_STATUS_UNDEFINED = 0x5AU
- } Mcu_PllStatusType;
- typedef Power_Ip_ResetType Mcu_ResetType;
- #if (MCU_GET_RAM_STATE_API == STD_ON)
- typedef enum
- {
- MCU_RAMSTATE_INVALID = 0x99U,
- MCU_RAMSTATE_VALID = 0x66U
- } Mcu_RamStateType;
- #endif
- #ifdef MCU_PREPARE_MEMORY_CONFIG
- typedef enum
- {
- MCU_RAM_MEMORY_CONFIG_ENTRY_POINT = 0x77U,
- MCU_RAM_MEMORY_CONFIG_EXIT_POINT = 0x88U
- } Mcu_MemoryConfigStageType;
- #endif
- #if (defined(MCU_PMC_NOTIFICATION) && (MCU_ENTER_LOW_POWER_MODE == STD_ON))
- typedef enum
- {
- MCU_LAST_MILE_REGULATOR_DISABLED = 0x55U
- } Mcu_PowerManagementEventType;
- #endif
- #ifdef MCU_SLEEPONEXIT_SUPPORT
- #if (MCU_SLEEPONEXIT_SUPPORT == STD_ON)
- typedef enum
- {
- MCU_SLEEP_ON_EXIT_DISABLED = 0U,
- MCU_SLEEP_ON_EXIT_ENABLED
- } Mcu_SleepOnExitType;
- #endif
- #endif
- #if (MCU_SRAM_RETEN_CONFIG_API ==STD_ON)
- typedef Power_Ip_SRAMRetenConfigType Mcu_SRAMRetenConfigType;
- #endif
- #define MCU_FIRST_RESET_REASON_POS_U32 ((uint32)MCU_POWER_ON_RESET)
- #if (MCU_DISABLE_DEM_REPORT_ERROR_STATUS == STD_OFF)
- #define MCU_START_SEC_VAR_CLEARED_UNSPECIFIED
- #include "Mcu_MemMap.h"
- extern const Mcu_DemConfigType * Mcu_pDemCfgPtr;
- #define MCU_STOP_SEC_VAR_CLEARED_UNSPECIFIED
- #include "Mcu_MemMap.h"
- #define MCU_START_SEC_CONFIG_DATA_UNSPECIFIED
- #include "Mcu_MemMap.h"
- extern const Mcu_DemConfigType Mcu_Dem_Config;
- #define MCU_STOP_SEC_CONFIG_DATA_UNSPECIFIED
- #include "Mcu_MemMap.h"
- #endif
- #define MCU_START_SEC_CODE
- #include "Mcu_MemMap.h"
- #define MCU_STOP_SEC_CODE
- #include "Mcu_MemMap.h"
- #ifdef __cplusplus
- }
- #endif
- #endif
|