/* * Copyright 1997-2016 Freescale Semiconductor, Inc. * Copyright 2016-2024 NXP * * SPDX-License-Identifier: BSD-3-Clause */ /*! * @file S32Z2_NVIC.h * @version 2.3 * @date 2024-05-03 * @brief Peripheral Access Layer for S32Z2_NVIC * * 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(S32Z2_NVIC_H_) /* Check if memory map has not been already included */ #define S32Z2_NVIC_H_ #include "S32Z2_COMMON.h" /* ---------------------------------------------------------------------------- -- S32_NVIC Peripheral Access Layer ---------------------------------------------------------------------------- */ /*! * @addtogroup S32_NVIC_Peripheral_Access_Layer S32_NVIC Peripheral Access Layer * @{ */ /** S32_NVIC - Size of Registers Arrays */ #define S32_NVIC_ISER_COUNT 16u #define S32_NVIC_ICER_COUNT 16u #define S32_NVIC_ISPR_COUNT 16u #define S32_NVIC_ICPR_COUNT 16u #define S32_NVIC_IABR_COUNT 16u #define S32_NVIC_ITNS_COUNT 16u #define S32_NVIC_IP_COUNT 480u /** S32_NVIC - Register Layout Typedef */ typedef struct { uint8_t RESERVED_0[4]; __I uint32_t ICTR; /**< Interrupt Control Type Register, offset: 0x4 */ uint8_t RESERVED_1[248]; __IO uint32_t ISER[S32_NVIC_ISER_COUNT]; /**< Interrupt Set Enable Register n, array offset: 0x100, array step: 0x4 */ uint8_t RESERVED_2[64]; __IO uint32_t ICER[S32_NVIC_ICER_COUNT]; /**< Interrupt Clear Enable Register n, array offset: 0x180, array step: 0x4 */ uint8_t RESERVED_3[64]; __IO uint32_t ISPR[S32_NVIC_ISPR_COUNT]; /**< Interrupt Set Pending Register n, array offset: 0x200, array step: 0x4 */ uint8_t RESERVED_4[64]; __IO uint32_t ICPR[S32_NVIC_ICPR_COUNT]; /**< Interrupt Clear Pending Register n, array offset: 0x280, array step: 0x4 */ uint8_t RESERVED_5[64]; __IO uint32_t IABR[S32_NVIC_IABR_COUNT]; /**< Interrupt Active bit Register n, array offset: 0x300, array step: 0x4 */ uint8_t RESERVED_6[64]; __IO uint32_t ITNS[S32_NVIC_ITNS_COUNT]; /**< Interrupt Target Non-Secure Register n, array offset: 0x380, array step: 0x4 (Not accessible from S32_NVIC_NS) */ uint8_t RESERVED_7[64]; __IO uint8_t IP[S32_NVIC_IP_COUNT]; /**< Interrupt Priority Register n, array offset: 0x400, array step: 0x1 */ uint8_t RESERVED_8[2576]; __O uint32_t STIR; /**< Software Trigger Interrupt Register, offset: 0xF00 */ } S32_NVIC_Type, *S32_NVIC_MemMapPtr; /** Number of instances of the S32_NVIC module. */ #define S32_NVIC_INSTANCE_COUNT (1u) /* S32_NVIC - Peripheral instance base addresses */ /** Peripheral S32_NVIC base address */ #define IP_S32_NVIC_BASE (0xE000E000u) /** Peripheral S32_NVIC_NS base address */ #define IP_S32_NVIC_NS_BASE (0xE002E000u) /** Peripheral S32_NVIC base pointer */ #define S32_NVIC ((S32_NVIC_Type *)IP_S32_NVIC_BASE) /** Peripheral S32_NVIC_NS base pointer */ #define S32_NVIC_NS ((S32_NVIC_Type *)IP_S32_NVIC_NS_BASE) /** Array initializer of S32_NVIC peripheral base addresses */ #define IP_S32_NVIC_BASE_ADDRS { IP_S32_NVIC_BASE } /** Array initializer of S32_NVIC peripheral base pointers */ #define IP_S32_NVIC_BASE_PTRS { IP_S32_NVIC } /* ---------------------------------------------------------------------------- -- S32_NVIC Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup S32_NVIC_Register_Masks S32_NVIC Register Masks * @{ */ /* ICTR Bit Fields */ #define S32_NVIC_ICTR_ICTR_MASK 0xFFFFFFFFu #define S32_NVIC_ICTR_ICTR_SHIFT 0u #define S32_NVIC_ICTR_ICTR_WIDTH 32u #define S32_NVIC_ICTR_ICTR(x) (((uint32_t)(((uint32_t)(x))<