123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826 |
- /*==================================================================================================
- * Project : RTD AUTOSAR 4.4
- * Platform : CORTEXM
- * Peripheral :
- * Dependencies : none
- *
- * Autosar Version : 4.4.0
- * Autosar Revision : ASR_REL_4_4_REV_0000
- * Autosar Conf.Variant :
- * SW Version : 1.0.0
- * Build Version : S32K1_RTD_1_0_0_HF01_D2109_ASR_REL_4_4_REV_0000_20210907
- *
- * (c) Copyright 2020-2021 NXP Semiconductors
- * All Rights Reserved.
- *
- * NXP Confidential. This software is owned or controlled by NXP and may only be
- * used strictly in accordance with the applicable license terms. By expressly
- * accepting such terms or by downloading, installing, activating and/or otherwise
- * using the software, you are agreeing that you have read, and that you agree to
- * comply with and are bound by, such license terms. If you do not agree to be
- * bound by the applicable license terms, then you may not retain, install,
- * activate or otherwise use the software.
- ==================================================================================================*/
- /**
- * @file Mcu_Cfg.h
- * @implements Mcu_Cfg.h_Artifact
- * @version 1.0.0
- *
- * @brief AUTOSAR Mcu - Configuration file for the driver.
- * @details Precompile parameters and extern configuration.
- *
- * @addtogroup MCU
- * @{
- */
- #ifndef MCU_CFG_H
- #define MCU_CFG_H
- #ifdef __cplusplus
- extern "C"{
- #endif
- /*==================================================================================================
- INCLUDE FILES
- 1) system and project includes
- 2) needed interfaces from external units
- 3) internal and external interfaces from this unit
- ==================================================================================================*/
- #include "Mcal.h"
- #include "Clock_Ip_Cfg.h"
- #include "Power_Ip_Cfg.h"
- #include "Ram_Ip_Cfg.h"
- #include "Mcu_VS_0_PBcfg.h"
- /*==================================================================================================
- SOURCE FILE VERSION INFORMATION
- ==================================================================================================*/
- #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
- /*==================================================================================================
- * FILE VERSION CHECKS
- ==================================================================================================*/
- #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
- /* Check if header file and Mcal header file are of the same Autosar version */
- #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
- /* Check if header file and Clock_Ip_Cfg.h file are of the same vendor */
- #if (MCU_CFG_VENDOR_ID != CLOCK_IP_CFG_VENDOR_ID)
- #error "Mcu_Cfg.h and Clock_Ip_Cfg.h have different vendor ids"
- #endif
- /* Check if header file and Clock_Ip_Cfg.h file are of the same Autosar version */
- #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
- /* Check if header file and Clock_Ip_Cfg.h file are of the same Software version */
- #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
- /* Check if header file and Power_Ip_Cfg.h file are of the same vendor */
- #if (MCU_CFG_VENDOR_ID != POWER_IP_CFG_VENDOR_ID)
- #error "Mcu_Cfg.h and Power_Ip_Cfg.h have different vendor ids"
- #endif
- /* Check if header file and Power_Ip_Cfg.h file are of the same Autosar version */
- #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
- /* Check if header file and Power_Ip_Cfg.h file are of the same Software version */
- #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
- /* Check if header file and Ram_Ip_Cfg.h file are of the same vendor */
- #if (MCU_CFG_VENDOR_ID != RAM_IP_CFG_VENDOR_ID)
- #error "Mcu_Cfg.h and Ram_Ip_Cfg.h have different vendor ids"
- #endif
- /* Check if header file and Ram_Ip_Cfg.h file are of the same Autosar version */
- #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
- /* Check if header file and Ram_Ip_Cfg.h file are of the same Software version */
- #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
- /* Check if header file and Mcu_VS_0_PBcfg.h file are of the same vendor */
- #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
- /* Check if header file and Mcu_VS_0_PBcfg.h file are of the same Autosar version */
- #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
- /* Check if header file and Mcu_VS_0_PBcfg.h file are of the same Software version */
- #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
- /*==================================================================================================
- DEFINES AND MACROS
- ==================================================================================================*/
- /**
- * @brief Specifies the InstanceId of this module instance.
- */
- #define MCU_INSTANCE_ID ((uint8)0x0U)
- /**
- @{
- * @brief Service Ids for MCU APIs.
- */
- #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)
- /**@}*/
- /**
- @{
- * @brief Service Ids for NonASR MCU APIs.
- */
- #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)
- /**@}*/
- /**
- * @brief Pre-processor switch for enabling the default error detection and reporting to the DET.
- * The detection of default errors is configurable (ON / OFF) at pre-compile time.
- */
- #define MCU_DEV_ERROR_DETECT (STD_OFF)
- /**
- * @brief If this parameter is set to TRUE, the Power Management Controller (PMC) initialization has to be disabled from the MCU driver.
- */
- #define MCU_DISABLE_PMC_INIT (STD_OFF)
- /**
- * @brief If this parameter is set to TRUE, the Reset Control Module (RMC) initialization has to be disabled from the MCU driver.
- */
- #define MCU_DISABLE_RCM_INIT (STD_OFF)
- /**
- * @brief If this parameter is set to TRUE, the System Mode Controller (SMC) initialization has to be disabled from the MCU driver.
- */
- #define MCU_DISABLE_SMC_INIT (STD_OFF)
- /**
- * @brief Pre-processor switch to enable/disable the API to read out the modules version information.
- */
- #define MCU_VERSION_INFO_API (STD_OFF)
- /**
- * @brief Pre-processor switch to enable/disable the API Mcu_GetRamState.
- */
- #define MCU_GET_RAM_STATE_API (STD_OFF)
- /**
- * @brief If this parameter is set to FALSE, the clock initialization has to be disabled from the MCU driver.
- */
- #define MCU_INIT_CLOCK (STD_ON)
- /**
- * @brief This parameter shall be set True, if the H/W does not have a PLL or the PLL circuitry is enabled after the power on without S/W intervention.
- */
- #define MCU_NO_PLL (STD_ON)
- /**
- * @brief define for interrupt CMU, PMC, SCG peripheral
- */
- #define MCU_CMU_PMC_SCG_INTERRUPT (STD_OFF)
- #if (MCU_PERFORM_RESET_API == STD_ON)
- /**
- * @brief The user callout reset is/isn't available (STD_ON/STD_OFF) - called by MCU right before Mcu_PerformReset().
- */
- #define MCU_RESET_CALLOUT_USED (STD_OFF)
- #endif
- /**
- * @brief ISR Mcu_CmuClockFail_ISR is/isn't available
- */
- #define MCU_CMU_ERROR_ISR_USED (STD_OFF)
- /**
- * @brief Enable the usage of Non-Autosar API Mcu_GetPeripheral_State() for getting infos about peripheral state from MC_ME module.
- */
- #define MCU_GET_PERIPH_STATE_API (STD_OFF)
- /**
- * @brief Enable the usage of Non-Autosar API Mcu_GetPowerMode_State() for getting infos system platform configuration.
- */
- #define MCU_POWERMODE_STATE_API (STD_OFF)
- /**
- * @brief Enable the usage of Non-Autosar API Mcu_GetPowerDomain_Status. Get PMU state: operable or not.
- */
- #define MCU_GET_POWER_DOMAIN_API (STD_OFF)
- /**
- * @brief Enable the usage of Non-Autosar API Mcu_GetSystem_State() for getting system platform configuration information. Get (SSCM_STATUS | SSCM_MEMCONFIG).
- */
- #define MCU_GET_SYSTEM_STATE_API (STD_OFF)
- /**
- * @brief Enable the usage of Non-Autosar API Mcu_SscmGetMemConfig(). Get SSCM_MEMCONFIG.
- */
- #define MCU_GET_MEM_CONFIG_API (STD_OFF)
- /**
- * @brief Enable the usage of Non-Autosar API Mcu_SscmGetStatus(). Get SSCM_STATUS.
- */
- #define MCU_SSCM_GET_STATUS_API (STD_OFF)
- /**
- * @brief Enable the usage of Non-Autosar API Mcu_SscmGetUopt(). Get SSCM_UOPT.
- */
- #define MCU_SSCM_GET_UOPT_API (STD_OFF)
- /**
- * @brief Enable the usage of Non-Autosar API Mcu_GetMidrStructure(). Returns .
- */
- #define MCU_GET_MIDR_API (STD_OFF)
- /**
- * @brief Enable the usage of Non-Autosar API Mcu_EmiosConfigureGpren().
- */
- #define MCU_EMIOS_CONFIGURE_GPREN_API (STD_OFF)
- /**
- * @brief Enable the usage of Non-Autosar API Mcu_Disable_CMU().
- */
- #define MCU_DISABLE_CMU_API (STD_OFF)
- /**
- * @brief Enable the usage of Non-Autosar API Mcu_GetClockFrequency().
- */
- #define MCU_GET_CLOCK_FREQUENCY_API (STD_OFF)
- /**
- * @brief Enable/Disable the API for reporting the Dem Error.
- */
- #define MCU_DISABLE_DEM_REPORT_ERROR_STATUS (STD_ON)
- /**
- * @brief Enable the usage of Non-Autosar API Mcu_SRAMRetentionConfig().
- */
- #define MCU_SRAM_RETEN_CONFIG_API (STD_OFF)
- /**
- * @brief Enable/Disable the Ram Notification.
- */
- #define MCU_DISABLE_RAM_CONFIG (STD_ON)
- /**
- * @brief Enable/Disable the Flash Notification.
- */
- #define MCU_DISABLE_FLASH_CONFIG (STD_ON)
- /**
- * @brief ISR Mcu_VoltageError_ISR is/isn't available (STD_ON/STD_OFF)
- */
- #if (MCU_CMU_PMC_SCG_INTERRUPT == STD_ON)
- #define MCU_VOLTAGE_ERROR_ISR_USED (STD_OFF)
- #endif
- /**
- * @brief Maximum number of MCU Clock configurations.
- */
- #define MCU_MAX_CLKCONFIGS ((uint32)1U)
- /**
- * @brief Maximum number of MCU Mode configurations.
- */
- #define MCU_MAX_MODECONFIGS ((uint32)1U)
- /**
- * @brief Maximum number of MCU Ram configurations.
- */
- #define MCU_MAX_RAMCONFIGS ((uint32)0U)
- #define MCU_MAX_NORAMCONFIGS
- /**
- * @brief Pre-compile Support.
- */
- #define MCU_PRECOMPILE_SUPPORT (STD_ON)
- #ifdef MCU_GET_MIDR_API
- #if (MCU_GET_MIDR_API == STD_ON)
- /**
- * @brief Number of total available SIUL2 (SIUL2 + SIUL2_AE) units.
- */
- #define MCU_SIUL2_TOTAL_UNITS ((uint8)0U)
- #endif
- #endif
- /**
- * @brief Number of Clock Muxes per CGM module
- */
- /**
- * @brief Index of CGMs module
- */
- #ifdef MCU_ERROR_ISR_NOTIFICATION
- /* This is used to clear CMU flags from the RGM interrupt */
- #define MCU_CMU_CLEAR_CLOCK_IRQ_FLAG (MCU_CMU_ERROR_ISR_USED)
- #endif
- #if !(defined (CLOCK_IP_S32K1))
- /**
- * @brief Support for User mode.
- * If this parameter has been configured to 'TRUE' the Mcu driver can be executed from both supervisor and user mode.
- */
- #define MCU_ENABLE_USER_MODE_SUPPORT (STD_OFF)
- /** Check the driver user mode is enabled only when the MCAL_ENABLE_USER_MODE_SUPPORT is enabled */
- #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 /* (MCU_ENABLE_USER_MODE_SUPPORT == STD_ON) */
- #endif /* ifndef MCAL_ENABLE_USER_MODE_SUPPORT */
- #endif /* CLOCK_IP_S32K1 */
- /**
- * @brief The function Mcu_GetResetRawValue shall return an implementation specific value which does
- * not correspond to a valid value of the reset status register and is not equal to 0 if this
- * function is called prior to calling of the function Mcu_Init, and if supported by the
- * hardware.
- *
- */
- #define MCU_RAW_RESET_DEFAULT ((uint32)0xFFFFFFFFUL)
- /** @brief This is the corresponding bit of Stop Acknowledge Error reset in the returned value of Mcu_GetResetRawReason */
- #define MCU_RAW_RESET_SACKERR ((uint32)0x00002000U)
- /** @brief This is the corresponding bit of MDM-AP System Reset Request in the returned value of Mcu_GetResetRawReason */
- #define MCU_RAW_RESET_MDM_AP ((uint32)0x00000800U)
- /** @brief This is the corresponding bit of Software reset in the returned value of Mcu_GetResetRawReason */
- #define MCU_RAW_RESET_SW ((uint32)0x00000400U)
- /** @brief This is the corresponding bit of Stop Core Lockup reset in the returned value of Mcu_GetResetRawReason */
- #define MCU_RAW_RESET_LOCKUP ((uint32)0x00000200U)
- /** @brief This is the corresponding bit of JTAG generated reset in the returned value of Mcu_GetResetRawReason */
- #define MCU_RAW_RESET_JTAG ((uint32)0x00000100U)
- /** @brief This is the corresponding bit of Power-on reset in the returned value of Mcu_GetResetRawReason */
- #define MCU_RAW_RESET_POR ((uint32)0x00000080U)
- /** @brief This is the corresponding bit of external pin reset in the returned value of Mcu_GetResetRawReason */
- #define MCU_RAW_RESET_PIN ((uint32)0x00000040U)
- /** @brief This is the corresponding bit of watchdog reset in the returned value of Mcu_GetResetRawReason */
- #define MCU_RAW_RESET_WDOG ((uint32)0x00000020U)
- /** @brief This is the corresponding bit of CMU Loss-of-Lock reset in the returned value of Mcu_GetResetRawReason */
- #define MCU_RAW_RESET_CMU_LOC ((uint32)0x00000010U)
- /** @brief This is the corresponding bit of Loss-of-Lock reset in the returned value of Mcu_GetResetRawReason */
- #define MCU_RAW_RESET_LOL ((uint32)0x00000008U)
- /** @brief This is the corresponding bit of Loss-of-Clock reset in the returned value of Mcu_GetResetRawReason */
- #define MCU_RAW_RESET_LOC ((uint32)0x00000004U)
- /** @brief This is the corresponding bit of Low-Voltage Detect reset or High-Voltage Detect reset in the returned value of Mcu_GetResetRawReason */
- #define MCU_RAW_RESET_LVD ((uint32)0x00000002U)
- /**
- * @brief This define controls the availability of function Mcu_SleepOnExit
- */
- #define MCU_SLEEPONEXIT_SUPPORT (STD_ON)
- /*==================================================================================================
- DEFINES AND MACROS
- ==================================================================================================*/
- #if (MCU_DEV_ERROR_DETECT == STD_ON)
- /**
- @{
- * @brief Default error values are of type uint8.
- * The following errors and exceptions shall be detectable by the MCU module depending on its
- * build version (Default/production mode).
- *
- */
- #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 /* (MCU_DEV_ERROR_DETECT == STD_ON) */
- #ifdef MCU_ERROR_ISR_NOTIFICATION
- /**
- @{
- * @brief Error ISR values are of type uint8.
- * The following error codes are reported by the error ISR.
- */
- #if (MCU_CMU_ERROR_ISR_USED == STD_ON)
- #define MCU_E_ISR_CLOCK_FAILURE ((uint8)0x01U)
- #endif
- #endif /* MCU_ERROR_ISR_NOTIFICATION */
- /*==================================================================================================
- STRUCTURES AND OTHER TYPEDEFS
- ==================================================================================================*/
- /**
- * @brief The Mcu_ModeType specifies the identification (ID) for a MCU mode, configured via configuration structure.
- * @details The type shall be uint8, uint16 or uint32.
- *
- * @implements Mcu_ModeType_typedef
- *
- */
- typedef uint32 Mcu_ModeType;
- /**
- * @brief The Mcu_RamSectionType specifies the identification (ID) for a RAM section, configured via the configuration structure.
- * The type shall be uint8, uint16 or uint32, based on best performance.
- * @implements Mcu_RamSectionType_typedef
- */
- typedef uint32 Mcu_RamSectionType;
- /**
- * @brief The Mcu_RamWriteSizeType specifies the RAM section write size.
- * The type shall be uint8, uint16 or uint32, based on best performance.
- *
- */
- typedef uint32 Mcu_RamWriteSizeType;
- #if (MCU_INIT_CLOCK == STD_ON)
- /**
- * @brief Defines the identification (ID) for clock setting configured via the configuration structure.
- * @details The type shall be uint8, uint16 or uint32, depending on uC platform.
- *
- * @implements Mcu_ClockType_typedef
- */
- typedef uint32 Mcu_ClockType;
- #endif /* (MCU_INIT_CLOCK == STD_ON) */
- /**
- * @brief The type Mcu_RawResetType specifies the reset reason in raw register format, read from a reset status register.
- * @details The type shall be uint8, uint16 or uint32 based on best performance.
- *
- * @implements Mcu_RawResetType_typedef
- *
- */
- typedef uint32 Mcu_RawResetType; /**< @brief Destructive and Functional Reset Events Log. */
- /**
- * @brief DEM error reporting configuration.
- * @details This structure contains information DEM error reporting
- */
- 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)
- /**
- * @brief State of the current power mode.
- * @details Used to store the value of register value.
- */
- typedef uint32 Mcu_PowerModeStateType;
- #endif /* (MCU_POWERMODE_STATE_API == STD_ON) */
- /*==================================================================================================
- CONSTANTS
- ==================================================================================================*/
- #if (MCU_INIT_CLOCK == STD_ON)
- /**
- * @brief Create defines with the IDs assigned to Mcu Clock configurations.
- * These IDs will be transmitted as input parameters for Mcu_InitClock() API.
- */
- #define McuClockSettingConfig_0 ((Mcu_ClockType)0U)
- #define McuConf_McuClockSettingConfig_McuClockSettingConfig_0 ((Mcu_ClockType)0U)
- #endif
- /**
- * @brief Create defines with the IDs assigned to Mcu Mode configurations.
- * These IDs will be transmitted as input parameters for Mcu_SetMode() API.
- */
- #define McuModeSettingConf_0 ((Mcu_ModeType)0U)
- #define McuConf_McuModeSettingConf_McuModeSettingConf_0 ((Mcu_ModeType)0U)
- /**
- * @brief Create defines with the IDs assigned to Mcu RAM Section configurations.
- * These IDs will be transmitted as input parameters for Mcu_InitRamSection() API.
- */
- /*==================================================================================================
- ENUMS
- ==================================================================================================*/
- /**
- * @brief Type of the return value of the function Mcu_GetPllStatus.
- * @details The type of Mcu_PllStatusType is an enumeration with the following values:
- * MCU_PLL_LOCKED, MCU_PLL_UNLOCKED, MCU_PLL_STATUS_UNDEFINED.
- *
- * @implements Mcu_PllStatusType_Enumeration
- *
- */
- typedef enum
- {
- MCU_PLL_LOCKED = 0x33U, /**< @brief PLL is locked. */
- MCU_PLL_UNLOCKED = 0xCCU, /**< @brief PLL is unlocked. */
- MCU_PLL_STATUS_UNDEFINED = 0x5AU /**< @brief PLL Status is unknown. */
- } Mcu_PllStatusType;
- /**
- * @brief The type Mcu_ResetType, represents the different reset that a specified MCU can have.
- * @details The MCU module shall provide at least the values MCU_POWER_ON_RESET and MCU_RESET_UNDEFINED for the enumeration Mcu_ResetType.
- *
- * @implements Mcu_ResetType_Enumeration
- */
- typedef Power_Ip_ResetType Mcu_ResetType;
- #if (MCU_GET_RAM_STATE_API == STD_ON)
- /**
- * @brief Ram State of the microcontroller.
- * @details This is the Ram State data type returned by the function Mcu_GetRamState() of the Mcu module.
- * @implements Mcu_RamStateType_Enumeration
- */
- typedef enum
- {
- MCU_RAMSTATE_INVALID = 0x99U, /**< @brief RAM content is not valid or unknown (default). */
- MCU_RAMSTATE_VALID = 0x66U /**< @brief RAM content is valid. */
- } Mcu_RamStateType;
- #endif /* (MCU_GET_RAM_STATE_API == STD_ON) */
- #ifdef MCU_PREPARE_MEMORY_CONFIG
- /**
- * @brief The stage of the flash and ram controllers configuration.
- * @details This is used to specify the entry and exit point of the flash and ram controllers configuration.
- */
- 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))
- /**
- * @brief Power management controller events.
- * @details The various events triggered by the power management controller.
- */
- 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, /**< @brief Disable SLEEPONEXIT bit (default). */
- MCU_SLEEP_ON_EXIT_ENABLED /**< @brief Enable SLEEPONEXIT bit. */
- } Mcu_SleepOnExitType;
- #endif
- #endif
- #if (MCU_SRAM_RETEN_CONFIG_API ==STD_ON)
- /**
- * @brief Type of parameter value of the function Mcu_SRAMRetentionConfig.
- * @details The type of Mcu_SRAMRetenConfigType is an enumeration with the following values:
- * MCU_SRAML_RETEN, MCU_SRAMU_RETEN, MCU_SRAMLU_RETEN, MCU_NO_SRAMLU_RETEN.
- */
- typedef Power_Ip_SRAMRetenConfigType Mcu_SRAMRetenConfigType;
- #endif
- /*==================================================================================================
- DEFINES AND MACROS
- ==================================================================================================*/
- /**
- * @brief This macro is used to define the position of the first reset reason.
- *
- */
- #define MCU_FIRST_RESET_REASON_POS_U32 ((uint32)MCU_POWER_ON_RESET)
- /*==================================================================================================
- GLOBAL VARIABLE DECLARATIONS
- ==================================================================================================*/
- #if (MCU_DISABLE_DEM_REPORT_ERROR_STATUS == STD_OFF)
- #define MCU_START_SEC_VAR_CLEARED_UNSPECIFIED
- #include "Mcu_MemMap.h"
- /**
- * @brief Local copy of the pointer to the configuration data
- */
- 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 /* (MCU_DISABLE_DEM_REPORT_ERROR_STATUS == STD_OFF) */
- /*==================================================================================================
- * FUNCTION PROTOTYPES
- ==================================================================================================*/
- #define MCU_START_SEC_CODE
- #include "Mcu_MemMap.h"
- #define MCU_STOP_SEC_CODE
- #include "Mcu_MemMap.h"
- #ifdef __cplusplus
- }
- #endif
- #endif /* #ifndef MCU_CFG_H */
- /** @} */
|