/* * Copyright 1997-2016 Freescale Semiconductor, Inc. * Copyright 2016-2021 NXP * * SPDX-License-Identifier: BSD-3-Clause */ /*! * @file S32K344_SCB.h * @version 1.5 * @date 2020-11-11 * @brief Peripheral Access Layer for S32K344_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(S32K344_SCB_H_) /* Check if memory map has not been already included */ #define S32K344_SCB_H_ #include "S32K344_COMMON.h" /* ---------------------------------------------------------------------------- -- S32_SCB Peripheral Access Layer ---------------------------------------------------------------------------- */ /*! * @addtogroup S32_SCB_Peripheral_Access_Layer S32_SCB Peripheral Access Layer * @{ */ /** S32_SCB - Size of Registers Arrays */ #define S32_SCB_ID_MMFR_COUNT 4u #define S32_SCB_ID_ISAR_COUNT 5u #define S32_SCB_PID_COUNT 8u #define S32_SCB_CID_COUNT 4u /** S32_SCB - Register Layout Typedef */ typedef struct { uint8_t RESERVED_0[8]; __IO 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 */ __IO uint32_t CCR; /**< Configuration and Control Register, offset: 0xD14 */ __IO uint32_t SHPR1; /**< System Handler Priority Register 1, offset: 0xD18 */ __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 */ __IO uint32_t CFSR; /**< Configurable Fault Status Registers, offset: 0xD28 */ __IO uint32_t HFSR; /**< HardFault Status Register, offset: 0xD2C */ __IO uint32_t DFSR; /**< Debug Fault Status Register, offset: 0xD30 */ __IO uint32_t MMFAR; /**< Memanage Fault Address Register, offset: 0xD34 */ __IO uint32_t BFAR; /**< BusFault Address Registerd, offset: 0xD38 */ __IO uint32_t AFSR; /**< Auxiliary Fault Status Register, offset: 0xD3C */ __I uint32_t ID_PFR0; /**< Processor Feature Register 0, offset: 0xD40 */ __I uint32_t ID_PFR1; /**< Processor Feature Register 1, offset: 0xD44 */ __I uint32_t ID_DFR0; /**< Debug Feature Register 0, offset: 0xD48 */ __I uint32_t ID_AFR0; /**< Auxiliary Feature Register 0, offset: 0xD4C */ __I uint32_t ID_MMFR[S32_SCB_ID_MMFR_COUNT]; /**< Memory Model Feature Register 0..Memory Model Feature Register 3, array offset: 0xD50, array step: 0x4 */ __I uint32_t ID_ISAR[S32_SCB_ID_ISAR_COUNT]; /**< Instruction Set Attributes Register 0..Instruction Set Attributes Register 4, array offset: 0xD60, array step: 0x4 */ uint8_t RESERVED_2[4]; __I uint32_t CLIDR; /**< Cache Level ID Register, offset: 0xD78 */ __I uint32_t CTR; /**< Cache Type Register, offset: 0xD7C */ __I uint32_t CCSIDR; /**< Cache Size ID Register, offset: 0xD80 */ __IO uint32_t CSSELR; /**< Cache Size Selection Register, offset: 0xD84 */ __IO uint32_t CPACR; /**< Coprocessor Access Control Register, offset: 0xD88 */ uint8_t RESERVED_3[372]; __O uint32_t STIR; /**< Software Triggered Interrupt Register, offset: 0xF00 */ uint8_t RESERVED_4[48]; __IO uint32_t FPCCR; /**< Floating-point Context Control Register, offset: 0xF34 */ __IO uint32_t FPCAR; /**< Floating-point Context Address Register, offset: 0xF38 */ __IO uint32_t FPDSCR; /**< Floating-point Default Status Control Register, offset: 0xF3C */ uint8_t RESERVED_5[16]; __O uint32_t ICIALLU; /**< Instruction cache invalidate all to Point of Unification (PoU), offset: 0xF50 */ uint8_t RESERVED_6[4]; __O uint32_t ICIMVAU; /**< Instruction cache invalidate by address to PoU, offset: 0xF58 */ __O uint32_t DCIMVAC; /**< Data cache invalidate by address to Point of Coherency (PoC), offset: 0xF5C */ __O uint32_t DCISW; /**< Data cache invalidate by set/way, offset: 0xF60 */ __O uint32_t DCCMVAU; /**< Data cache by address to PoU, offset: 0xF64 */ __O uint32_t DCCMVAC; /**< Data cache clean by address to PoC, offset: 0xF68 */ __O uint32_t DCCSW; /**< Data cache clean by set/way, offset: 0xF6C */ __O uint32_t DCCIMVAC; /**< Data cache clean and invalidate by address to PoC, offset: 0xF70 */ __O uint32_t DCCISW; /**< Data cache clean and invalidate by set/way, offset: 0xF74 */ __I uint32_t BPIALL; /**< Not implemented - RAZ/WI, offset: 0xF78 */ uint8_t RESERVED_7[20]; __IO uint32_t ITCMCR; /**< Instruction Tightly-Coupled Memory Control Register, offset: 0xF90 */ __IO uint32_t DTCMCR; /**< Data Tightly-Coupled Memory Control Register, offset: 0xF94 */ __IO uint32_t AHBPCR; /**< AHBP control register, offset: 0xF98 */ __IO uint32_t CACR; /**< L1 Cache Control Register, offset: 0xF9C */ __IO uint32_t AHBSCR; /**< AHB Slave Control Register, offset: 0xFA0 */ uint8_t RESERVED_8[4]; __IO uint32_t ABFSR; /**< Asynchronous Bus Fault Status Register, offset: 0xFA8 */ uint8_t RESERVED_9[4]; __IO uint32_t IEBR0; /**< Instruction Error bank Register 0, offset: 0xFB0 */ __IO uint32_t IEBR1h; /**< Instruction Error bank Register 1, offset: 0xFB4 */ __IO uint32_t DEBR0h; /**< Data Error bank Register 0, offset: 0xFB8 */ __IO uint32_t DEBR1h; /**< Data Error bank Register 1, offset: 0xFBC */ uint8_t RESERVED_10[16]; __I uint32_t PID[S32_SCB_PID_COUNT]; /**< Peripheral identification register 0..Peripheral identification register 7, array offset: 0xFD0, array step: 0x4 */ __I uint32_t CID[S32_SCB_CID_COUNT]; /**< Component identification register 0..Component identification register 3, array offset: 0xFF0, array step: 0x4 */ } 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 * @{ */ /* ACTLR Bit Fields */ #define S32_SCB_ACTLR_ACTLR_MASK 0xFFFFFFFFu #define S32_SCB_ACTLR_ACTLR_SHIFT 0u #define S32_SCB_ACTLR_ACTLR_WIDTH 32u #define S32_SCB_ACTLR_ACTLR(x) (((uint32_t)(((uint32_t)(x))<