/* * Copyright 1997-2016 Freescale Semiconductor, Inc. * Copyright 2016-2021 NXP * * SPDX-License-Identifier: BSD-3-Clause */ /*! * @file S32K116_SCB.h * @version 1.0 * @date 2021-02-18 * @brief Peripheral Access Layer for S32K116_SCB * * 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(S32K116_SCB_H_) /* Check if memory map has not been already included */ #define S32K116_SCB_H_ #include "S32K116_COMMON.h" /* ---------------------------------------------------------------------------- -- S32_SCB Peripheral Access Layer ---------------------------------------------------------------------------- */ /*! * @addtogroup S32_SCB_Peripheral_Access_Layer S32_SCB Peripheral Access Layer * @{ */ /** S32_SCB - Size of Registers Arrays */ /** S32_SCB - Register Layout Typedef */ typedef struct { uint8_t RESERVED_0[8]; __I uint32_t ACTLR; /**< Auxiliary Control Register,, offset: 0x8 */ uint8_t RESERVED_1[3316]; __I uint32_t CPUID; /**< CPUID Base Register, offset: 0xD00 */ __IO uint32_t ICSR; /**< Interrupt Control and State Register, offset: 0xD04 */ __IO uint32_t VTOR; /**< Vector Table Offset Register, offset: 0xD08 */ __IO uint32_t AIRCR; /**< Application Interrupt and Reset Control Register, offset: 0xD0C */ __IO uint32_t SCR; /**< System Control Register, offset: 0xD10 */ __I uint32_t CCR; /**< Configuration and Control Register, offset: 0xD14 */ uint8_t RESERVED_2[4]; __IO uint32_t SHPR2; /**< System Handler Priority Register 2, offset: 0xD1C */ __IO uint32_t SHPR3; /**< System Handler Priority Register 3, offset: 0xD20 */ __IO uint32_t SHCSR; /**< System Handler Control and State Register, offset: 0xD24 */ uint8_t RESERVED_3[8]; __IO uint32_t DFSR; /**< Debug Fault Status Register, offset: 0xD30 */ } S32_SCB_Type, *S32_SCB_MemMapPtr; /** Number of instances of the S32_SCB module. */ #define S32_SCB_INSTANCE_COUNT (1u) /* S32_SCB - Peripheral instance base addresses */ /** Peripheral S32_SCB base address */ #define S32_SCB_BASE (0xE000E000u) /** Peripheral S32_SCB base pointer */ #define S32_SCB ((S32_SCB_Type *)S32_SCB_BASE) /** Array initializer of S32_SCB peripheral base addresses */ #define S32_SCB_BASE_ADDRS { S32_SCB_BASE } /** Array initializer of S32_SCB peripheral base pointers */ #define S32_SCB_BASE_PTRS { S32_SCB } /* ---------------------------------------------------------------------------- -- S32_SCB Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup S32_SCB_Register_Masks S32_SCB Register Masks * @{ */ /* CPUID Bit Fields */ #define S32_SCB_CPUID_REVISION_MASK 0xFu #define S32_SCB_CPUID_REVISION_SHIFT 0u #define S32_SCB_CPUID_REVISION_WIDTH 4u #define S32_SCB_CPUID_REVISION(x) (((uint32_t)(((uint32_t)(x))<