123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644 |
- #ifndef MCU_H
- #define MCU_H
- #ifdef __cplusplus
- extern "C"{
- #endif
- #include "Mcu_Cfg.h"
- #include "Mcu_EnvCfg.h"
- #include "Mcu_IPW_Types.h"
- #include "Mcal.h"
- #define MCU_VENDOR_ID 43
- #define MCU_MODULE_ID 101
- #define MCU_AR_RELEASE_MAJOR_VERSION 4
- #define MCU_AR_RELEASE_MINOR_VERSION 4
- #define MCU_AR_RELEASE_REVISION_VERSION 0
- #define MCU_SW_MAJOR_VERSION 1
- #define MCU_SW_MINOR_VERSION 0
- #define MCU_SW_PATCH_VERSION 0
- #if (MCU_VENDOR_ID != MCU_CFG_VENDOR_ID)
- #error "Mcu.h and Mcu_Cfg.h have different vendor ids"
- #endif
- #if ((MCU_AR_RELEASE_MAJOR_VERSION != MCU_CFG_AR_RELEASE_MAJOR_VERSION) || \
- (MCU_AR_RELEASE_MINOR_VERSION != MCU_CFG_AR_RELEASE_MINOR_VERSION) || \
- (MCU_AR_RELEASE_REVISION_VERSION != MCU_CFG_AR_RELEASE_REVISION_VERSION) \
- )
- #error "AutoSar Version Numbers of Mcu.h and Mcu_Cfg.h are different"
- #endif
- #if ((MCU_SW_MAJOR_VERSION != MCU_CFG_SW_MAJOR_VERSION) || \
- (MCU_SW_MINOR_VERSION != MCU_CFG_SW_MINOR_VERSION) || \
- (MCU_SW_PATCH_VERSION != MCU_CFG_SW_PATCH_VERSION) \
- )
- #error "Software Version Numbers of Mcu.h and Mcu_Cfg.h are different"
- #endif
- #if (MCU_VENDOR_ID != MCU_ENVCFG_VENDOR_ID)
- #error "Mcu.h and Mcu_EnvCfg.h have different vendor ids"
- #endif
- #if ((MCU_AR_RELEASE_MAJOR_VERSION != MCU_ENVCFG_AR_RELEASE_MAJOR_VERSION) || \
- (MCU_AR_RELEASE_MINOR_VERSION != MCU_ENVCFG_AR_RELEASE_MINOR_VERSION) || \
- (MCU_AR_RELEASE_REVISION_VERSION != MCU_ENVCFG_AR_RELEASE_REVISION_VERSION) \
- )
- #error "AutoSar Version Numbers of Mcu.h and Mcu_EnvCfg.h are different"
- #endif
- #if ((MCU_SW_MAJOR_VERSION != MCU_ENVCFG_SW_MAJOR_VERSION) || \
- (MCU_SW_MINOR_VERSION != MCU_ENVCFG_SW_MINOR_VERSION) || \
- (MCU_SW_PATCH_VERSION != MCU_ENVCFG_SW_PATCH_VERSION) \
- )
- #error "Software Version Numbers of Mcu.h and Mcu_EnvCfg.h are different"
- #endif
- #if (MCU_VENDOR_ID != MCU_IPW_TYPES_VENDOR_ID)
- #error "Mcu.h and Mcu_IPW_Types.h have different vendor ids"
- #endif
- #if ((MCU_AR_RELEASE_MAJOR_VERSION != MCU_IPW_TYPES_AR_RELEASE_MAJOR_VERSION) || \
- (MCU_AR_RELEASE_MINOR_VERSION != MCU_IPW_TYPES_AR_RELEASE_MINOR_VERSION) || \
- (MCU_AR_RELEASE_REVISION_VERSION != MCU_IPW_TYPES_AR_RELEASE_REVISION_VERSION) \
- )
- #error "AutoSar Version Numbers of Mcu.h and Mcu_IPW_Types.h are different"
- #endif
- #if ((MCU_SW_MAJOR_VERSION != MCU_IPW_TYPES_SW_MAJOR_VERSION) || \
- (MCU_SW_MINOR_VERSION != MCU_IPW_TYPES_SW_MINOR_VERSION) || \
- (MCU_SW_PATCH_VERSION != MCU_IPW_TYPES_SW_PATCH_VERSION) \
- )
- #error "Software Version Numbers of Mcu.h and Mcu_IPW_Types.h are different"
- #endif
- #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
-
- #if ((MCU_AR_RELEASE_MAJOR_VERSION != MCAL_AR_RELEASE_MAJOR_VERSION) || \
- (MCU_AR_RELEASE_MINOR_VERSION != MCAL_AR_RELEASE_MINOR_VERSION))
- #error "AutoSar Version Numbers of Mcu.h and Mcal.h are different"
- #endif
- #endif
- typedef struct
- {
- #if (MCU_INIT_CLOCK == STD_ON)
-
- Mcu_ClockNotificationType Mcu_ClkSrcFailureNotification;
- #endif
- #if (MCU_DISABLE_DEM_REPORT_ERROR_STATUS == STD_OFF)
-
- const Mcu_DemConfigType * Mcu_pDemConfig;
- #endif
-
- Mcu_RamSectionType Mcu_NoRamConfigs;
-
- Mcu_ModeType Mcu_NoModeConfigs;
- #if (MCU_INIT_CLOCK == STD_ON)
-
- Mcu_ClockType Mcu_NoClkConfigs;
- #endif
- #ifndef MCU_MAX_NORAMCONFIGS
-
- const Mcu_RamConfigType (*Mcu_apRamConfig)[MCU_MAX_RAMCONFIGS];
- #endif
-
- const Mcu_ModeConfigType (*Mcu_apModeConfig)[MCU_MAX_MODECONFIGS];
- #if (MCU_INIT_CLOCK == STD_ON)
-
- const Mcu_ClockConfigType (*Mcu_apClockConfig)[MCU_MAX_CLKCONFIGS];
- #endif
-
- const Mcu_HwIPsConfigType * Mcu_pHwIPsConfig;
- } Mcu_ConfigType;
- #if (MCU_PRECOMPILE_SUPPORT == STD_ON)
- #define MCU_START_SEC_CONFIG_DATA_UNSPECIFIED
- #include "Mcu_MemMap.h"
- extern const Mcu_ConfigType Mcu_PreCompileConfig;
- #define MCU_STOP_SEC_CONFIG_DATA_UNSPECIFIED
- #include "Mcu_MemMap.h"
- #endif
- #define MCU_START_SEC_CONFIG_DATA_UNSPECIFIED
- #include "Mcu_MemMap.h"
- #if (MCU_PRECOMPILE_SUPPORT == STD_OFF)
- MCU_CONFIG_EXT
- #endif
- #define MCU_STOP_SEC_CONFIG_DATA_UNSPECIFIED
- #include "Mcu_MemMap.h"
- #define MCU_START_SEC_VAR_CLEARED_UNSPECIFIED
- #include "Mcu_MemMap.h"
- #if (defined(MCU_CMU_ERROR_ISR_USED) && (MCU_CMU_ERROR_ISR_USED == STD_ON))
- extern const Mcu_ConfigType * Mcu_pConfigPtr;
- #endif
- #define MCU_STOP_SEC_VAR_CLEARED_UNSPECIFIED
- #include "Mcu_MemMap.h"
- #define MCU_START_SEC_CODE
- #include "Mcu_MemMap.h"
-
- void Mcu_Init( const Mcu_ConfigType * pConfigPtr);
-
- Std_ReturnType Mcu_InitRamSection(Mcu_RamSectionType RamSection);
- #if (MCU_INIT_CLOCK == STD_ON)
-
- Std_ReturnType Mcu_InitClock(Mcu_ClockType ClockSetting);
- #endif
-
- void Mcu_SetMode(Mcu_ModeType McuMode);
- #if (MCU_INIT_CLOCK == STD_ON)
- #if (MCU_NO_PLL == STD_OFF)
-
- Std_ReturnType Mcu_DistributePllClock(void);
- #endif
- #endif
-
- Mcu_PllStatusType Mcu_GetPllStatus(void);
-
- Mcu_ResetType Mcu_GetResetReason(void);
-
- Mcu_RawResetType Mcu_GetResetRawValue(void);
- #if MCU_PERFORM_RESET_API == STD_ON
-
- void Mcu_PerformReset(void);
- #endif
- #if (MCU_VERSION_INFO_API == STD_ON)
-
- void Mcu_GetVersionInfo(Std_VersionInfoType * pVersionInfo);
- #endif
- #if (MCU_GET_RAM_STATE_API == STD_ON)
-
- Mcu_RamStateType Mcu_GetRamState(void);
- #endif
- #if (MCU_GET_PERIPH_STATE_API == STD_ON)
-
- Std_ReturnType Mcu_GetPeripheralState(Mcu_PeripheralIdType McuPeriphId);
- #endif
- #if (MCU_GET_SYSTEM_STATE_API == STD_ON)
-
- Mcu_SSCM_SystemStateType Mcu_GetSystemState(void);
- #endif
- #if (MCU_POWERMODE_STATE_API == STD_ON)
-
- Mcu_PowerModeStateType Mcu_GetPowerModeState(void);
- #endif
- #if (MCU_GET_POWER_DOMAIN_API == STD_ON)
-
- Std_ReturnType Mcu_GetPowerDomainState(void);
- #endif
- #ifdef MCU_GET_MEM_CONFIG_API
- #if (MCU_GET_MEM_CONFIG_API == STD_ON)
-
- Mcu_SSCM_MemConfigType Mcu_SscmGetMemConfig(void);
- #endif
- #endif
- #ifdef MCU_SSCM_GET_STATUS_API
- #if (MCU_SSCM_GET_STATUS_API == STD_ON)
-
- Mcu_SSCM_StatusType Mcu_SscmGetStatus(void);
- #endif
- #endif
- #ifdef MCU_SSCM_GET_UOPT_API
- #if (MCU_SSCM_GET_UOPT_API == STD_ON)
-
- Mcu_SSCM_UoptType Mcu_SscmGetUopt(void);
- #endif
- #endif
- #ifdef MCU_GET_MIDR_API
- #if (MCU_GET_MIDR_API == STD_ON)
-
- void Mcu_GetMidrStructure(Mcu_MidrReturnType pMidr[MCU_SIUL2_TOTAL_UNITS]);
- #endif
- #endif
- #ifdef MCU_EMIOS_CONFIGURE_GPREN_API
- #if (MCU_EMIOS_CONFIGURE_GPREN_API == STD_ON)
-
- void Mcu_EmiosConfigureGpren(uint8 u8Module, uint8 u8Value);
- #endif
- #endif
- #ifdef MCU_DISABLE_CMU_API
- #if (MCU_DISABLE_CMU_API == STD_ON)
-
- void Mcu_DisableCmu(Clock_Ip_NameType clockName);
- #endif
- #endif
- #ifdef MCU_GET_CLOCK_FREQUENCY_API
- #if (MCU_GET_CLOCK_FREQUENCY_API == STD_ON)
-
- uint32 Mcu_GetClockFrequency(Clock_Ip_NameType clockName);
- #endif
- #endif
- #ifdef MCU_SLEEPONEXIT_SUPPORT
- #if (MCU_SLEEPONEXIT_SUPPORT == STD_ON)
-
- void Mcu_SleepOnExit(Mcu_SleepOnExitType SleepOnExit);
- #endif
- #endif
- #ifdef MCU_SRAM_RETEN_CONFIG_API
- #if (MCU_SRAM_RETEN_CONFIG_API == STD_ON)
- void Mcu_SRAMRetentionConfig(Mcu_SRAMRetenConfigType eSRAMRetenConfig);
- #endif
- #endif
- #define MCU_STOP_SEC_CODE
- #include "Mcu_MemMap.h"
- #ifdef __cplusplus
- }
- #endif
- #endif
|