/* * Copyright 1997-2016 Freescale Semiconductor, Inc. * Copyright 2016-2021 NXP * * SPDX-License-Identifier: BSD-3-Clause */ /*! * @file S32K344_MPU.h * @version 1.5 * @date 2020-11-11 * @brief Peripheral Access Layer for S32K344_MPU * * This file contains register definitions and macros for easy access to their * bit fields. * * This file assumes LITTLE endian system. */ /** * @page misra_violations MISRA-C:2012 violations * * @section [global] * Violates MISRA 2012 Advisory Rule 2.3, local typedef not referenced * The SoC header defines typedef for all modules. * * @section [global] * Violates MISRA 2012 Advisory Rule 2.5, local macro not referenced * The SoC header defines macros for all modules and registers. * * @section [global] * Violates MISRA 2012 Advisory Directive 4.9, Function-like macro * These are generated macros used for accessing the bit-fields from registers. * * @section [global] * Violates MISRA 2012 Required Rule 5.1, identifier clash * The supported compilers use more than 31 significant characters for identifiers. * * @section [global] * Violates MISRA 2012 Required Rule 5.2, identifier clash * The supported compilers use more than 31 significant characters for identifiers. * * @section [global] * Violates MISRA 2012 Required Rule 5.4, identifier clash * The supported compilers use more than 31 significant characters for identifiers. * * @section [global] * Violates MISRA 2012 Required Rule 5.5, identifier clash * The supported compilers use more than 31 significant characters for identifiers. * * @section [global] * Violates MISRA 2012 Required Rule 21.1, defined macro '__I' is reserved to the compiler * This type qualifier is needed to ensure correct I/O access and addressing. */ /* Prevention from multiple including the same memory map */ #if !defined(S32K344_MPU_H_) /* Check if memory map has not been already included */ #define S32K344_MPU_H_ #include "S32K344_COMMON.h" /* ---------------------------------------------------------------------------- -- S32_MPU Peripheral Access Layer ---------------------------------------------------------------------------- */ /*! * @addtogroup S32_MPU_Peripheral_Access_Layer S32_MPU Peripheral Access Layer */ /** S32_MPU - Size of Registers Arrays */ #define S32_MPU_A_COUNT 3u /** S32_MPU - Register Layout Typedef */ typedef struct { uint8_t RESERVED_0[3472]; __I uint32_t TYPE; /**< MPU Type Register, offset: 0xD90 */ __IO uint32_t CTRL; /**< MPU Control Register, offset: 0xD94 */ __IO uint32_t RNR; /**< MPU Region Number Register, offset: 0xD98 */ __IO uint32_t RBAR; /**< MPU Region Base Address Register, offset: 0xD9C */ __IO uint32_t RASR; /**< MPU Region Attribute and Size Register, offset: 0xDA0 */ struct { /* offset: 0xDA4, array step: 0x8 */ __IO uint32_t RBAR; /**< Alias of RBAR0..Alias of RBAR2, array offset: 0xDA4, array step: 0x8 */ __IO uint32_t RASR; /**< Alias of RASR0..Alias of RASR2, array offset: 0xDA8, array step: 0x8 */ } A[S32_MPU_A_COUNT]; } S32_MPU_Type, *S32_MPU_MemMapPtr; /** Number of instances of the S32_MPU module. */ #define S32_MPU_INSTANCE_COUNT (1u) /* S32_MPU - Peripheral instance base addresses */ /** Peripheral S32_MPU base address */ #define S32_MPU_BASE (0xE000E000u) /** Peripheral S32_MPU base pointer */ #define S32_MPU ((S32_MPU_Type *)S32_MPU_BASE) /** Array initializer of S32_MPU peripheral base addresses */ #define S32_MPU_BASE_ADDRS { S32_MPU_BASE } /** Array initializer of S32_MPU peripheral base pointers */ #define S32_MPU_BASE_PTRS { S32_MPU } /* ---------------------------------------------------------------------------- -- S32_MPU Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup S32_MPU_Register_Masks S32_MPU Register Masks * @{ */ /* TYPE Bit Fields */ #define S32_MPU_TYPE_SEPARATE_MASK 0x1u #define S32_MPU_TYPE_SEPARATE_SHIFT 0u #define S32_MPU_TYPE_SEPARATE_WIDTH 1u #define S32_MPU_TYPE_SEPARATE(x) (((uint32_t)(((uint32_t)(x))<