/**
*   @file    Mcu_FLASH.c
*   @version 1.0.0
*
*   @brief   AUTOSAR Mcu - FLASH functions implementation.
*   @details Specific functions for FLASH Controller configuration and control.
*
*   @addtogroup MCU
*   @{
*/
/*==================================================================================================
*   Project              : AUTOSAR 4.3 MCAL
*   Platform             : PA
*   Peripheral           : MC
*   Dependencies         : none
*
*   Autosar Version      : 4.3.1
*   Autosar Revision     : ASR_REL_4_3_REV_0001
*   Autosar Conf.Variant :
*   SW Version           : 1.0.0
*   Build Version        : MPC5777C_MCAL_1_0_0_RTM_ASR_REL_4_3_REV_0001_20190315
*
*   (c) Copyright 2006-2016 Freescale Semiconductor, Inc. 
*       Copyright 2017-2019 NXP
*   All Rights Reserved.
==================================================================================================*/
/*==================================================================================================
==================================================================================================*/

#ifdef __cplusplus
extern "C"{
#endif

/**
* @page misra_violations MISRA-C:2012 violations
*
* @section Mcu_FLASH_c_REF_1
* Violates MISRA 2012 Advisory Rule 20.1, #include directives should only be preceded by preprocessor
* directives or comments. AUTOSAR imposes the specification of the sections in which certain parts
* of the driver must be placed.
*
* @section Mcu_FLASH_c_REF_2
* Violates MISRA 2012 Required Directive 4.10, Precautions shall be taken in order to prevent the contents
* of a header file being included more than once. This comes from the order of includes in the .c file
* and from include dependencies. As a safe approach, any file must include all its dependencies.
* Header files are already protected against double inclusions. The inclusion of Mcu_MemMap.h is as
* per AUTOSAR requirement [SWS_MemMap_00003].
*
* @section Mcu_FLASH_c_REF_3
* Violates MISRA 2012 Required Rule 11.6, A cast shall not be performed between pointer to void and an
* arithmetic type.
* This is a false positive error. PC-Lint is checking against a more restrictive condition
* ("pointer/non-pointer to non-pointer/pointer" vs "pointer-to-void to arithmetic type").
*
* @section Mcu_FLASH_c_REF_4
* Violates MISRA 2012 Advisory Rule 11.4, A conversion should not be performed between a pointer to object
* and an integer type.
* The cast is used to access memory mapped registers.
*
* @section Mcu_FLASH_c_REF_5
* Violates MISRA 2012 Advisory Rule 8.9, An object should be defined at block scope if its identifier only
* appears in a single function.
* This violation is due to some AUTOSAR requirements which mandate that flash access code routines
* shall be accessed by means of function pointers, whether these routines have been loaded to RAM
* or whether they can be executed directly from flash.
*
* @section Mcu_FLASH_c_REF_6
* Violates MISRA 2012 Advisory Rule 8.7, Functions and objects should not be defined 
* with external linkage if they are referenced in only one translation unit.
*
* @section [global]
* Violates MISRA 2012 Required Rule 5.4, Macro identifiers shall be distinct.
* This violation is due to the AUTOSAR requirement [SWS_BSW_00036] (perform inter module checks).
*
* @section [global]
* Violates MISRA 2012 Required Rule 5.1, External identifiers shall be distinct.
* This rule does not apply if either identifier is a macro identifier, because this case is covered
* by Rule 5.4 and Rule 5.5.
*
* @section [global]
* Violates MISRA 2012 Required Rule 5.2, Identifiers declared in the same scope and name space shall be distinct.
* This rule does not apply if either identifier is a macro identifier, because this case is covered
* by Rule 5.4 and Rule 5.5.
*
* @section [global]
* Violates MISRA 2012 Required Rule 5.5, Identifiers shall be distinct from macro names.
* The identifier clash is between macro identifiers. Therefore, this rule is incorrectly reported by the tool.
*
*/


/*==================================================================================================
*                                        INCLUDE FILES
* 1) system and project includes
* 2) needed interfaces from external units
* 3) internal and external interfaces from this unit
==================================================================================================*/
#include "Mcu_FLASH.h"

#if (MCU_DEV_ERROR_DETECT == STD_ON)
#include "Det.h"
#endif

#define USER_MODE_REG_PROT_ENABLED (MCU_ENABLE_USER_MODE_SUPPORT)
#include "SilRegMacros.h"

/*==================================================================================================
*                              SOURCE FILE VERSION INFORMATION
==================================================================================================*/

#define MCU_FLASH_VENDOR_ID_C                       43
#define MCU_FLASH_AR_RELEASE_MAJOR_VERSION_C        4
#define MCU_FLASH_AR_RELEASE_MINOR_VERSION_C        3
#define MCU_FLASH_AR_RELEASE_REVISION_VERSION_C     1
#define MCU_FLASH_SW_MAJOR_VERSION_C                1
#define MCU_FLASH_SW_MINOR_VERSION_C                0
#define MCU_FLASH_SW_PATCH_VERSION_C                0


/*==================================================================================================
                                      FILE VERSION CHECKS
==================================================================================================*/
/* Check if current file and Mcu_FLASH.h file are of the same vendor */
#if (MCU_FLASH_VENDOR_ID_C != MCU_FLASH_VENDOR_ID)
    #error "Mcu_FLASH.c and Mcu_FLASH.h have different vendor ids"
#endif
/* Check if current file and Mcu_FLASH.h file are of the same Autosar version */
#if ((MCU_FLASH_AR_RELEASE_MAJOR_VERSION_C != MCU_FLASH_AR_RELEASE_MAJOR_VERSION) || \
     (MCU_FLASH_AR_RELEASE_MINOR_VERSION_C != MCU_FLASH_AR_RELEASE_MINOR_VERSION) || \
     (MCU_FLASH_AR_RELEASE_REVISION_VERSION_C != MCU_FLASH_AR_RELEASE_REVISION_VERSION) \
    )
    #error "AutoSar Version Numbers of Mcu_FLASH.c and Mcu_FLASH.h are different"
#endif
/* Check if current file and Mcu_FLASH.h file are of the same Software version */
#if ((MCU_FLASH_SW_MAJOR_VERSION_C != MCU_FLASH_SW_MAJOR_VERSION) || \
     (MCU_FLASH_SW_MINOR_VERSION_C != MCU_FLASH_SW_MINOR_VERSION) || \
     (MCU_FLASH_SW_PATCH_VERSION_C != MCU_FLASH_SW_PATCH_VERSION) \
    )
    #error "Software Version Numbers of Mcu_FLASH.c and Mcu_FLASH.h are different"
#endif

/* Check if current file and DET header file are of the same version */
#if (MCU_DEV_ERROR_DETECT == STD_ON)
#ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
    #if ((MCU_FLASH_AR_RELEASE_MAJOR_VERSION_C != DET_AR_RELEASE_MAJOR_VERSION) || \
         (MCU_FLASH_AR_RELEASE_MINOR_VERSION_C != DET_AR_RELEASE_MINOR_VERSION) \
        )
        #error "AutoSar Version Numbers of Mcu_FLASH.c and Det.h are different"
    #endif
#endif
#endif

/* Check if current file and SilRegMacros header file are of the same Autosar version */
#ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
    #if ((MCU_FLASH_AR_RELEASE_MAJOR_VERSION_C != SILREGMACROS_AR_RELEASE_MAJOR_VERSION) || \
         (MCU_FLASH_AR_RELEASE_MINOR_VERSION_C != SILREGMACROS_AR_RELEASE_MINOR_VERSION) \
        )
        #error "AutoSar Version Numbers of Mcu_FLASH.c and SilRegMacros.h are different"
    #endif
#endif


/*==================================================================================================
*                          LOCAL TYPEDEFS (STRUCTURES, UNIONS, ENUMS)
==================================================================================================*/


/*==================================================================================================
*                                       LOCAL MACROS
==================================================================================================*/


/*==================================================================================================
*                                      LOCAL CONSTANTS
==================================================================================================*/


/*==================================================================================================
*                                      LOCAL VARIABLES
==================================================================================================*/


/*==================================================================================================
*                                      GLOBAL CONSTANTS
==================================================================================================*/


/*==================================================================================================
*                                      GLOBAL VARIABLES
==================================================================================================*/


/*==================================================================================================
                                   LOCAL FUNCTION PROTOTYPES
==================================================================================================*/
#define MCU_START_SEC_RAMCODE
/**
* @violates @ref Mcu_FLASH_c_REF_2 Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
*/
#include "Mcu_MemMap.h"

#if (MCU_DISABLE_FLASH_CONFIG == STD_OFF)
static FUNC(void, MCU_RAM_CODE) Mcu_FLASH_InitRam (P2CONST( Mcu_FLASH_ConfigType, AUTOMATIC, MCU_APPL_CONST) FLASH_pConfigPtr);
#endif

#if (MCU_INIT_CLOCK == STD_ON)
#if (MCU_DISABLE_FLASH_CONFIG == STD_OFF)
/* Set the Flash Wait States. */
static FUNC(void, MCU_RAM_CODE) Mcu_FLASH_SetWsRam (P2CONST(Mcu_FLASH_ClockConfigType, AUTOMATIC, MCU_APPL_CONST) FLASH_pClockConfigPtr);
#endif /* (MCU_DISABLE_FLASH_CONFIG == STD_OFF) */
#endif /* (MCU_INIT_CLOCK == STD_ON) */

#define MCU_STOP_SEC_RAMCODE
/**
* @violates @ref Mcu_FLASH_c_REF_1 #include directives should only be preceded by preprocessor
* directives or comments.
*
* @violates @ref Mcu_FLASH_c_REF_2 Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
*/
#include "Mcu_MemMap.h"


/*==================================================================================================
                                       LOCAL FUNCTIONS
==================================================================================================*/
#define MCU_START_SEC_VAR_INIT_UNSPECIFIED
/**
* @violates @ref Mcu_FLASH_c_REF_1 #include directives should only be preceded by preprocessor
* directives or comments.
*
* @violates @ref Mcu_FLASH_c_REF_2 Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
*/
#include "Mcu_MemMap.h"

#if (MCU_DISABLE_FLASH_CONFIG == STD_OFF)
/**
* @violates @ref Mcu_FLASH_c_REF_5 An object should be defined at block scope if its identifier only
* appears in a single function.
*/
P2FUNC(void, MCU_CODE, Mcu_FLASH_pfInit) (P2CONST(Mcu_FLASH_ConfigType, AUTOMATIC, MCU_APPL_CONST) FLASH_pConfigPtr) = &Mcu_FLASH_InitRam;
#endif


#if (MCU_INIT_CLOCK == STD_ON)
#if (MCU_DISABLE_FLASH_CONFIG == STD_OFF)
/* Pointer to function that configure the wait states. */
/**
* @violates @ref Mcu_FLASH_c_REF_5 An object should be defined at block scope if its identifier only
* appears in a single function.
*/
P2FUNC(void, MCU_CODE, Mcu_FLASH_pfSetWS) (P2CONST(Mcu_FLASH_ClockConfigType, AUTOMATIC, MCU_APPL_CONST) FLASH_pClockConfigPtr) = &Mcu_FLASH_SetWsRam;
#endif /* (MCU_DISABLE_FLASH_CONFIG == STD_OFF) */
#endif /* (MCU_INIT_CLOCK == STD_ON) */

#define MCU_STOP_SEC_VAR_INIT_UNSPECIFIED
/**
* @violates @ref Mcu_FLASH_c_REF_1 #include directives should only be preceded by preprocessor
* directives or comments.
*
* @violates @ref Mcu_FLASH_c_REF_2 Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
*/
#include "Mcu_MemMap.h"


/*==================================================================================================
*                                       GLOBAL FUNCTIONS
==================================================================================================*/
#define MCU_START_SEC_RAMCODE
/**
* @violates @ref Mcu_FLASH_c_REF_1 #include directives should only be preceded by preprocessor
* directives or comments.
*
* @violates @ref Mcu_FLASH_c_REF_2 Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
*/
#include "Mcu_MemMap.h"

/*
!!!CAUTION for Registers:
    Software executing from flash memory must not write to registers that
        control flash behavior (such as wait state settings or prefetch
        enable/disable). Doing so can cause data corruption.
    Flash memory configuration registers should be written only with 32-bit
        write operations to avoid any issues associated with register incoherency
        caused by bit fields spanning smaller size (8-, 16-bit) boundaries.

    XPC56XXL: IPV_FLASHV2== IPV_FLASH_C90FL3_1024_6_0
    XPC56XXL has configuration only for Code Flash.
*/

#if (MCU_DISABLE_FLASH_CONFIG == STD_OFF)
/**
* @brief            This function initializes global settings for the Flash memory.
* @details          Config Page Buffer Configuration, Data Prefetch Enable, Instruction
*                   Prefetch Enable, Prefetch Limit, Buffer Enable, Arbitration Mode, Master
*                   Prefetch Disable, Master Access Protection.
*                   Called by:
*                       - Mcu_Ipw_Init() from IPW.
*
* @param[in]        FLASH_pConfigPtr   Pointer to Flash configuration structure.
*
* @return           void
*
*/
static FUNC(void, MCU_RAM_CODE) Mcu_FLASH_InitRam(P2CONST( Mcu_FLASH_ConfigType, AUTOMATIC, MCU_APPL_CONST) FLASH_pConfigPtr)
{
#if (IPV_FLASHV2 == IPV_FLASH_00_00_05_01)
    /* Set the PFCR0 register, but except wait-state values which are configured by clock
    initialization. */
    /** @violates @ref Mcu_FLASH_c_REF_3 False positive error */
    /** @violates @ref Mcu_FLASH_c_REF_4 The cast is used to access memory mapped registers.*/
    REG_RMW32 \
    ( \
        FLASHC_PFCR0_ADDR32, \
        ( \
            MCU_FLASH_B02P1BCFG_MASK32 | MCU_FLASH_B02P1DPFE_MASK32 | \
            MCU_FLASH_B02P1IPFE_MASK32 | MCU_FLASH_B02P1PFLM_MASK32 | \
            MCU_FLASH_B02P1BFE_MASK32  | MCU_FLASH_B02P0BCFG_MASK32 | \
            MCU_FLASH_B02P0DPFE_MASK32 | MCU_FLASH_B02P0IPFE_MASK32 | \
            MCU_FLASH_B02P0PFLM_MASK32 | MCU_FLASH_B02P0BFE_MASK32 \
        ), \
        (uint32)(FLASH_pConfigPtr->u32FlashConfig) \
    );

    /* Set the Flash access protection register. */
    /** @violates @ref Mcu_FLASH_c_REF_3 False positive error */
    /** @violates @ref Mcu_FLASH_c_REF_4 The cast is used to access memory mapped registers.*/
    REG_WRITE32(FLASHC_PFAPR_ADDR32, (uint32)(FLASH_pConfigPtr->u32FlashAccess));
#elif ((IPV_FLASHV2 == IPV_FLASH_40_96_55_19) || (IPV_FLASHV2 == IPV_FLASH_01_00_08_02) || \
       (IPV_FLASHV2 == IPV_FLASH_01_00_03_05) || (IPV_FLASHV2 == IPV_FLASH_42_56_55_38) || \
       (IPV_FLASHV2 == IPV_FLASH_62_72_55_39) || (IPV_FLASHV2 == IPV_FLASH_84_80_32_02) || \
       (IPV_FLASHV2 == IPV_FLASH_20_48_55_46) || (IPV_FLASHV2 == IPV_FLASH_40_96_55_46) \
      )
    /* Write all bits excepting wait states configuration. */
    /** @violates @ref Mcu_FLASH_c_REF_3 False positive error */
    /** @violates @ref Mcu_FLASH_c_REF_4 The cast is used to access memory mapped registers.*/
    REG_RMW32 \
    ( \
        FLASHC_PFCR1_ADDR32, \
        (~( FLASHC_PFCR1_APC_MASK32 | FLASHC_PFCR1_RWSC_MASK32 ) ), \
        (uint32)(FLASH_pConfigPtr->u32FlashConfig1) \
    );

    /** @violates @ref Mcu_FLASH_c_REF_3 False positive error */
    /** @violates @ref Mcu_FLASH_c_REF_4 The cast is used to access memory mapped registers.*/
    REG_WRITE32(FLASHC_PFCR2_ADDR32, (uint32)(FLASH_pConfigPtr->u32FlashConfig2));
    /** @violates @ref Mcu_FLASH_c_REF_3 False positive error */
    /** @violates @ref Mcu_FLASH_c_REF_4 The cast is used to access memory mapped registers.*/
    REG_WRITE32(FLASHC_PFCR3_ADDR32, (uint32)(FLASH_pConfigPtr->u32FlashConfig3));
    /** @violates @ref Mcu_FLASH_c_REF_3 False positive error */
    /** @violates @ref Mcu_FLASH_c_REF_4 The cast is used to access memory mapped registers.*/
    REG_WRITE32(FLASHC_PFAPR_ADDR32, (uint32)(FLASH_pConfigPtr->u32FlashAccess));
#elif (IPV_FLASHV2== IPV_FLASH_25_60_86_00)
    /* Write all bits excepting wait states configuration. */
    /** @violates @ref Mcu_FLASH_c_REF_3 False positive error */
    /** @violates @ref Mcu_FLASH_c_REF_4 The cast is used to access memory mapped registers.*/
    REG_RMW32 \
    ( \
        FLASHC_PFCR1_ADDR32, \
        (~( FLASHC_PFCR1_APC_MASK32 | FLASHC_PFCR1_RWSC_MASK32 ) ), \
        (uint32)(FLASH_pConfigPtr->u32FlashConfig1) \
    );
    /** @violates @ref Mcu_FLASH_c_REF_3 False positive error */
    /** @violates @ref Mcu_FLASH_c_REF_4 The cast is used to access memory mapped registers.*/
    REG_WRITE32(FLASHC_PFCR3_ADDR32, (uint32)(FLASH_pConfigPtr->u32FlashConfig3));
    /** @violates @ref Mcu_FLASH_c_REF_3 False positive error */
    /** @violates @ref Mcu_FLASH_c_REF_4 The cast is used to access memory mapped registers.*/
    REG_WRITE32(FLASHC_PFAPR_ADDR32, (uint32)(FLASH_pConfigPtr->u32FlashAccess));
#endif /* ((IPV_FLASHV2== IPV_FLASH_40_96_55_19) || (IPV_FLASHV2 == IPV_FLASH_01_00_08_02)) */
#if ((IPV_FLASHV2 == IPV_FLASH_62_72_55_39) || (IPV_FLASHV2 == IPV_FLASH_20_48_55_46) || (IPV_FLASHV2 == IPV_FLASH_40_96_55_46))
    /** @violates @ref Mcu_FLASH_c_REF_3 False positive error */
    /** @violates @ref Mcu_FLASH_c_REF_4 The cast is used to access memory mapped registers.*/
    REG_WRITE32(FLASHC_PFCR4_ADDR32, (uint32)(FLASH_pConfigPtr->u32FlashConfig4));
#endif
}
#endif

#if (MCU_INIT_CLOCK == STD_ON)
#if (MCU_DISABLE_FLASH_CONFIG == STD_OFF)

/**
* @brief            This function configure PFCR00 register from FLASH controller.
* @details          Set Pipeline/Write/Read wait-states.
*                   The fields APC, WWSC and RWSC of the PFCR0 register should be set to the same
*                   value.
*                   Called by:
*                       - Mcu_Ipw_InitClock() from IPW.
*
* @param[in]        FLASH_pClockConfigPtr   Pointer to ECSM configuration structure.
*
* @return           void
*
*/
static FUNC(void, MCU_RAM_CODE) Mcu_FLASH_SetWsRam (P2CONST( Mcu_FLASH_ClockConfigType, AUTOMATIC, MCU_APPL_CONST) FLASH_pClockConfigPtr)
{
#if ((IPV_FLASHV2 == IPV_FLASH_40_96_55_19) || (IPV_FLASHV2 == IPV_FLASH_01_00_08_02) || \
     (IPV_FLASHV2 == IPV_FLASH_01_00_03_05) || (IPV_FLASHV2 == IPV_FLASH_42_56_55_38) || \
     (IPV_FLASHV2 == IPV_FLASH_25_60_86_00) || (IPV_FLASHV2 == IPV_FLASH_62_72_55_39) || \
     (IPV_FLASHV2 == IPV_FLASH_84_80_32_02) || (IPV_FLASHV2 == IPV_FLASH_20_48_55_46) || \
     (IPV_FLASHV2 == IPV_FLASH_40_96_55_46) \
    )
    VAR( uint32, AUTOMATIC) u32CurrentFlashConfig ;

#endif /* ((IPV_FLASHV2== IPV_FLASH_40_96_55_19) || (IPV_FLASHV2 == IPV_FLASH_01_00_08_02) ||
           (IPV_FLASHV2 == IPV_FLASH_01_00_03_05) || (IPV_FLASHV2 == IPV_FLASH_42_56_55_38) ||
           (IPV_FLASHV2== IPV_FLASH_25_60_86_00)) */

#if (IPV_FLASHV2== IPV_FLASH_00_00_05_01)
    /* Set the AddressPipelining/Write/Read Wait State Control. */
    /** @violates @ref Mcu_FLASH_c_REF_3 False positive error */
    /** @violates @ref Mcu_FLASH_c_REF_4 The cast is used to access memory mapped registers.*/
    REG_RMW32 \
    ( \
        FLASHC_PFCR0_ADDR32, \
        (MCU_FLASH_B02APC_MASK32 | MCU_FLASH_B02WWSC_MASK32 | MCU_FLASH_B02RWSC_MASK32), \
        FLASH_pClockConfigPtr->u32FlashWS \
    );
#elif ((IPV_FLASHV2 == IPV_FLASH_40_96_55_19) || (IPV_FLASHV2 == IPV_FLASH_01_00_08_02) || \
       (IPV_FLASHV2 == IPV_FLASH_01_00_03_05) || (IPV_FLASHV2 == IPV_FLASH_42_56_55_38) || \
       (IPV_FLASHV2 == IPV_FLASH_25_60_86_00) || (IPV_FLASHV2 == IPV_FLASH_62_72_55_39) || \
       (IPV_FLASHV2 == IPV_FLASH_84_80_32_02) || (IPV_FLASHV2 == IPV_FLASH_20_48_55_46) || \
       (IPV_FLASHV2 == IPV_FLASH_40_96_55_46) \
      )
    /* get the current flash config */
    /** @violates @ref Mcu_FLASH_c_REF_3 False positive error */
    /** @violates @ref Mcu_FLASH_c_REF_4 The cast is used to access memory mapped registers.*/
    u32CurrentFlashConfig = REG_READ32( FLASHC_PFCR1_ADDR32 );
    u32CurrentFlashConfig &= (uint32)(~(uint32)(FLASHC_PFCR1_APC_MASK32 | FLASHC_PFCR1_RWSC_MASK32));

#ifdef ERR_IPV_FLASH_0015
#if (STD_ON == ERR_IPV_FLASH_0015)
    u32CurrentFlashConfig |= (uint32)(FLASHC_PFCR1_RWSC_MASK32 & FLASH_pClockConfigPtr->u32FlashWS);
    u32CurrentFlashConfig |= MCU_FLASH_ADDR_PIPELINE_WS_U32(MCU_FLASH_ADDR_PIPELINE_WS_DIS_U32);
#else
    u32CurrentFlashConfig |= (uint32)((FLASHC_PFCR1_APC_MASK32 | FLASHC_PFCR1_RWSC_MASK32) & FLASH_pClockConfigPtr->u32FlashWS);
#endif /* (STD_ON == ERR_IPV_FLASH_0015) */
#else
    u32CurrentFlashConfig |= (uint32)((FLASHC_PFCR1_APC_MASK32 | FLASHC_PFCR1_RWSC_MASK32) & FLASH_pClockConfigPtr->u32FlashWS);
#endif /* ERR_IPV_FLASH_0015 */

    /* Set the AddressPipelining/Write/Read Wait State Control. */
    /** @violates @ref Mcu_FLASH_c_REF_3 False positive error */
    /** @violates @ref Mcu_FLASH_c_REF_4 The cast is used to access memory mapped registers.*/
    REG_WRITE32(FLASHC_PFCR1_ADDR32, u32CurrentFlashConfig );
#endif /* (IPV_FLASHV2== IPV_FLASH_00_00_05_01) */

}
#endif /* (MCU_DISABLE_FLASH_CONFIG == STD_OFF) */
#endif /* (MCU_INIT_CLOCK == STD_ON) */


#define MCU_STOP_SEC_RAMCODE
/**
* @violates @ref Mcu_FLASH_c_REF_1 #include directives should only be preceded by preprocessor
* directives or comments.
*
* @violates @ref Mcu_FLASH_c_REF_2 Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
*/
#include "Mcu_MemMap.h"


#ifdef __cplusplus
}
#endif


/** @} */
