/* ** ################################################################### ** Processor: MKL05Z32VLF4 ** Compilers: ARM Compiler ** Freescale C/C++ for Embedded ARM ** GNU C Compiler ** IAR ANSI C/C++ Compiler for ARM ** ** Reference manual: KL04RM/KL05RM, Rev.1, Jun 2012 ** Version: rev. 1.1, 2012-06-21 ** ** Abstract: ** This header file implements peripheral memory map for MKL05Z4 ** processor. ** ** Copyright: 1997 - 2012 Freescale Semiconductor, Inc. All Rights Reserved. ** ** http: www.freescale.com ** mail: support@freescale.com ** ** Revisions: ** - rev. 1.0 (2012-06-08) ** Initial version. ** - rev. 1.1 (2012-06-21) ** Update according to reference manual rev. 1. ** ** ################################################################### */ /** * @file MKL05Z4.h * @version 1.1 * @date 2012-06-21 * @brief Peripheral memory map for MKL05Z4 * * This header file implements peripheral memory map for MKL05Z4 processor. */ /* ---------------------------------------------------------------------------- -- MCU activation ---------------------------------------------------------------------------- */ /* Prevention from multiple including the same memory map */ #if !defined(MCU_MKL05Z4) /* Check if memory map has not been already included */ #define MCU_MKL05Z4 /* Check if another memory map has not been also included */ #if (defined(MCU_ACTIVE)) #error MKL05Z4 memory map: There is already included another memory map. Only one memory map can be included. #endif /* (defined(MCU_ACTIVE)) */ #define MCU_ACTIVE #include /** Memory map major version (memory maps with equal major version number are * compatible) */ #define MCU_MEM_MAP_VERSION 0x0100u /** Memory map minor version */ #define MCU_MEM_MAP_VERSION_MINOR 0x0001u /** * @brief Macro to access a single bit of a peripheral register (bit band region * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. * @param Reg Register to access. * @param Bit Bit number to access. * @return Value of the targeted bit in the bit band region. */ #define BITBAND_REG(Reg,Bit) (*((uint32_t volatile*)(0x42000000u + (32u*((uint32_t)&(Reg) - (uint32_t)0x40000000u)) + (4u*((uint32_t)(Bit)))))) /* ---------------------------------------------------------------------------- -- Interrupt vector numbers ---------------------------------------------------------------------------- */ /** * @addtogroup Interrupt_vector_numbers Interrupt vector numbers * @{ */ /** Interrupt Number Definitions */ typedef enum { INT_Initial_Stack_Pointer = 0, /**< Initial stack pointer */ INT_Initial_Program_Counter = 1, /**< Initial program counter */ INT_NMI = 2, /**< Non-maskable interrupt */ INT_Hard_Fault = 3, /**< Hard fault exception */ INT_Reserved4 = 4, /**< Reserved interrupt 4 */ INT_Reserved5 = 5, /**< Reserved interrupt 5 */ INT_Reserved6 = 6, /**< Reserved interrupt 6 */ INT_Reserved7 = 7, /**< Reserved interrupt 7 */ INT_Reserved8 = 8, /**< Reserved interrupt 8 */ INT_Reserved9 = 9, /**< Reserved interrupt 9 */ INT_Reserved10 = 10, /**< Reserved interrupt 10 */ INT_SVCall = 11, /**< A supervisor call exception */ INT_DebugMonitor = 12, /**< Debug Monitor */ INT_Reserved13 = 13, /**< Reserved interrupt 13 */ INT_PendableSrvReq = 14, /**< PendSV exception - request for system level service */ INT_SysTick = 15, /**< SysTick interrupt */ INT_DMA0 = 16, /**< DMA channel 0 transfer complete/error interrupt */ INT_DMA1 = 17, /**< DMA channel 1 transfer complete/error interrupt */ INT_DMA2 = 18, /**< DMA channel 2 transfer complete/error interrupt */ INT_DMA3 = 19, /**< DMA channel 3 transfer complete/error interrupt */ INT_MCM = 20, /**< Normal interrupt */ INT_FTFA = 21, /**< FTFA command complete/read collision interrupt */ INT_LVD_LVW = 22, /**< Low Voltage Detect, Low Voltage Warning */ INT_LLW = 23, /**< Low Leakage Wakeup */ INT_I2C0 = 24, /**< I2C0 interrupt */ INT_Reserved_25 = 25, /**< Reserved interrupt 25 */ INT_SPI0 = 26, /**< SPI0 interrupt */ INT_Reserved_27 = 27, /**< Reserved interrupt 27 */ INT_UART0 = 28, /**< UART0 status and error interrupt */ INT_Reserved_29 = 29, /**< Reserved interrupt 29 */ INT_Reserved_30 = 30, /**< Reserved interrupt 30 */ INT_ADC0 = 31, /**< ADC0 interrupt */ INT_CMP0 = 32, /**< CMP0 interrupt */ INT_TPM0 = 33, /**< TPM0 fault, overflow and channels interrupt */ INT_TPM1 = 34, /**< TPM1 fault, overflow and channels interrupt */ INT_Reserved_35 = 35, /**< Reserved interrupt 35 */ INT_RTC = 36, /**< RTC interrupt */ INT_RTC_Seconds = 37, /**< RTC seconds interrupt */ INT_PIT = 38, /**< PIT timer channel 0 interrupt */ INT_Reserved_39 = 39, /**< Reserved interrupt 39 */ INT_Reserved_40 = 40, /**< Reserved interrupt 40 */ INT_DAC0 = 41, /**< DAC0 interrupt */ INT_TSI0 = 42, /**< TSI0 interrupt */ INT_MCG = 43, /**< MCG interrupt */ INT_LPTimer = 44, /**< LPTimer interrupt */ INT_Reserved_45 = 45, /**< Reserved interrupt 45 */ INT_PORTA = 46, /**< Port A interrupt */ INT_PORTD = 47 /**< Port D interrupt */ } IRQInterruptIndex; /** * @} */ /* end of group Interrupt_vector_numbers */ /* ---------------------------------------------------------------------------- -- Peripheral type defines ---------------------------------------------------------------------------- */ /** * @addtogroup Peripheral_defines Peripheral type defines * @{ */ /* ** Start of section using anonymous unions */ #if defined(__ARMCC_VERSION) #pragma push #pragma anon_unions #elif defined(__CWCC__) #pragma push #pragma cpp_extensions on #elif defined(__GNUC__) /* anonymous unions are enabled by default */ #elif defined(__IAR_SYSTEMS_ICC__) #pragma language=extended #else #error Not supported compiler type #endif /* ---------------------------------------------------------------------------- -- ADC ---------------------------------------------------------------------------- */ /** * @addtogroup ADC_Peripheral ADC * @{ */ /** ADC - Peripheral register structure */ typedef struct ADC_MemMap { uint32_t SC1[2]; /**< ADC Status and Control Registers 1, array offset: 0x0, array step: 0x4 */ uint32_t CFG1; /**< ADC Configuration Register 1, offset: 0x8 */ uint32_t CFG2; /**< ADC Configuration Register 2, offset: 0xC */ uint32_t R[2]; /**< ADC Data Result Register, array offset: 0x10, array step: 0x4 */ uint32_t CV1; /**< Compare Value Registers, offset: 0x18 */ uint32_t CV2; /**< Compare Value Registers, offset: 0x1C */ uint32_t SC2; /**< Status and Control Register 2, offset: 0x20 */ uint32_t SC3; /**< Status and Control Register 3, offset: 0x24 */ uint32_t OFS; /**< ADC Offset Correction Register, offset: 0x28 */ uint32_t PG; /**< ADC Plus-Side Gain Register, offset: 0x2C */ uint8_t RESERVED_0[4]; uint32_t CLPD; /**< ADC Plus-Side General Calibration Value Register, offset: 0x34 */ uint32_t CLPS; /**< ADC Plus-Side General Calibration Value Register, offset: 0x38 */ uint32_t CLP4; /**< ADC Plus-Side General Calibration Value Register, offset: 0x3C */ uint32_t CLP3; /**< ADC Plus-Side General Calibration Value Register, offset: 0x40 */ uint32_t CLP2; /**< ADC Plus-Side General Calibration Value Register, offset: 0x44 */ uint32_t CLP1; /**< ADC Plus-Side General Calibration Value Register, offset: 0x48 */ uint32_t CLP0; /**< ADC Plus-Side General Calibration Value Register, offset: 0x4C */ } volatile *ADC_MemMapPtr; /* ---------------------------------------------------------------------------- -- ADC - Register accessor macros ---------------------------------------------------------------------------- */ /** * @addtogroup ADC_Register_Accessor_Macros ADC - Register accessor macros * @{ */ /* ADC - Register accessors */ #define ADC_SC1_REG(base,index) ((base)->SC1[index]) #define ADC_CFG1_REG(base) ((base)->CFG1) #define ADC_CFG2_REG(base) ((base)->CFG2) #define ADC_R_REG(base,index) ((base)->R[index]) #define ADC_CV1_REG(base) ((base)->CV1) #define ADC_CV2_REG(base) ((base)->CV2) #define ADC_SC2_REG(base) ((base)->SC2) #define ADC_SC3_REG(base) ((base)->SC3) #define ADC_OFS_REG(base) ((base)->OFS) #define ADC_PG_REG(base) ((base)->PG) #define ADC_CLPD_REG(base) ((base)->CLPD) #define ADC_CLPS_REG(base) ((base)->CLPS) #define ADC_CLP4_REG(base) ((base)->CLP4) #define ADC_CLP3_REG(base) ((base)->CLP3) #define ADC_CLP2_REG(base) ((base)->CLP2) #define ADC_CLP1_REG(base) ((base)->CLP1) #define ADC_CLP0_REG(base) ((base)->CLP0) /** * @} */ /* end of group ADC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- ADC Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup ADC_Register_Masks ADC Register Masks * @{ */ /* SC1 Bit Fields */ #define ADC_SC1_ADCH_MASK 0x1Fu #define ADC_SC1_ADCH_SHIFT 0 #define ADC_SC1_ADCH(x) (((uint32_t)(((uint32_t)(x))<CTRL) #define BP_COMP_REG(base,index) ((base)->COMP[index]) #define BP_PID4_REG(base) ((base)->PID4) #define BP_PID5_REG(base) ((base)->PID5) #define BP_PID6_REG(base) ((base)->PID6) #define BP_PID7_REG(base) ((base)->PID7) #define BP_PID0_REG(base) ((base)->PID0) #define BP_PID1_REG(base) ((base)->PID1) #define BP_PID2_REG(base) ((base)->PID2) #define BP_PID3_REG(base) ((base)->PID3) #define BP_CID0_REG(base) ((base)->CID0) #define BP_CID1_REG(base) ((base)->CID1) #define BP_CID2_REG(base) ((base)->CID2) #define BP_CID3_REG(base) ((base)->CID3) /** * @} */ /* end of group BP_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- BP Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup BP_Register_Masks BP Register Masks * @{ */ /** * @} */ /* end of group BP_Register_Masks */ /* BP - Peripheral instance base addresses */ /** Peripheral BP base pointer */ #define BP_BASE_PTR ((BP_MemMapPtr)0xE0002000u) /** Array initializer of BP peripheral base pointers */ #define BP_BASE_PTRS { BP_BASE_PTR } /* ---------------------------------------------------------------------------- -- BP - Register accessor macros ---------------------------------------------------------------------------- */ /** * @addtogroup BP_Register_Accessor_Macros BP - Register accessor macros * @{ */ /* BP - Register instance definitions */ /* BP */ #define BP_CTRL BP_CTRL_REG(BP_BASE_PTR) #define BP_COMP0 BP_COMP_REG(BP_BASE_PTR,0) #define BP_COMP1 BP_COMP_REG(BP_BASE_PTR,1) #define BP_COMP2 BP_COMP_REG(BP_BASE_PTR,2) #define BP_COMP3 BP_COMP_REG(BP_BASE_PTR,3) #define BP_COMP4 BP_COMP_REG(BP_BASE_PTR,4) #define BP_COMP5 BP_COMP_REG(BP_BASE_PTR,5) #define BP_COMP6 BP_COMP_REG(BP_BASE_PTR,6) #define BP_COMP7 BP_COMP_REG(BP_BASE_PTR,7) #define BP_PID4 BP_PID4_REG(BP_BASE_PTR) #define BP_PID5 BP_PID5_REG(BP_BASE_PTR) #define BP_PID6 BP_PID6_REG(BP_BASE_PTR) #define BP_PID7 BP_PID7_REG(BP_BASE_PTR) #define BP_PID0 BP_PID0_REG(BP_BASE_PTR) #define BP_PID1 BP_PID1_REG(BP_BASE_PTR) #define BP_PID2 BP_PID2_REG(BP_BASE_PTR) #define BP_PID3 BP_PID3_REG(BP_BASE_PTR) #define BP_CID0 BP_CID0_REG(BP_BASE_PTR) #define BP_CID1 BP_CID1_REG(BP_BASE_PTR) #define BP_CID2 BP_CID2_REG(BP_BASE_PTR) #define BP_CID3 BP_CID3_REG(BP_BASE_PTR) /* BP - Register array accessors */ #define BP_COMP(index) BP_COMP_REG(BP_BASE_PTR,index) /** * @} */ /* end of group BP_Register_Accessor_Macros */ /** * @} */ /* end of group BP_Peripheral */ /* ---------------------------------------------------------------------------- -- CMP ---------------------------------------------------------------------------- */ /** * @addtogroup CMP_Peripheral CMP * @{ */ /** CMP - Peripheral register structure */ typedef struct CMP_MemMap { uint8_t CR0; /**< CMP Control Register 0, offset: 0x0 */ uint8_t CR1; /**< CMP Control Register 1, offset: 0x1 */ uint8_t FPR; /**< CMP Filter Period Register, offset: 0x2 */ uint8_t SCR; /**< CMP Status and Control Register, offset: 0x3 */ uint8_t DACCR; /**< DAC Control Register, offset: 0x4 */ uint8_t MUXCR; /**< MUX Control Register, offset: 0x5 */ } volatile *CMP_MemMapPtr; /* ---------------------------------------------------------------------------- -- CMP - Register accessor macros ---------------------------------------------------------------------------- */ /** * @addtogroup CMP_Register_Accessor_Macros CMP - Register accessor macros * @{ */ /* CMP - Register accessors */ #define CMP_CR0_REG(base) ((base)->CR0) #define CMP_CR1_REG(base) ((base)->CR1) #define CMP_FPR_REG(base) ((base)->FPR) #define CMP_SCR_REG(base) ((base)->SCR) #define CMP_DACCR_REG(base) ((base)->DACCR) #define CMP_MUXCR_REG(base) ((base)->MUXCR) /** * @} */ /* end of group CMP_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- CMP Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup CMP_Register_Masks CMP Register Masks * @{ */ /* CR0 Bit Fields */ #define CMP_CR0_HYSTCTR_MASK 0x3u #define CMP_CR0_HYSTCTR_SHIFT 0 #define CMP_CR0_HYSTCTR(x) (((uint8_t)(((uint8_t)(x))<base_DHCSR_Read) #define CoreDebug_base_DHCSR_Write_REG(base) ((base)->base_DHCSR_Write) #define CoreDebug_base_DCRSR_REG(base) ((base)->base_DCRSR) #define CoreDebug_base_DCRDR_REG(base) ((base)->base_DCRDR) #define CoreDebug_base_DEMCR_REG(base) ((base)->base_DEMCR) /** * @} */ /* end of group CoreDebug_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- CoreDebug Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup CoreDebug_Register_Masks CoreDebug Register Masks * @{ */ /** * @} */ /* end of group CoreDebug_Register_Masks */ /* CoreDebug - Peripheral instance base addresses */ /** Peripheral CoreDebug base pointer */ #define CoreDebug_BASE_PTR ((CoreDebug_MemMapPtr)0xE000EDF0u) /** Array initializer of CoreDebug peripheral base pointers */ #define CoreDebug_BASE_PTRS { CoreDebug_BASE_PTR } /* ---------------------------------------------------------------------------- -- CoreDebug - Register accessor macros ---------------------------------------------------------------------------- */ /** * @addtogroup CoreDebug_Register_Accessor_Macros CoreDebug - Register accessor macros * @{ */ /* CoreDebug - Register instance definitions */ /* CoreDebug */ #define DHCSR_Read CoreDebug_base_DHCSR_Read_REG(CoreDebug_BASE_PTR) #define DHCSR_Write CoreDebug_base_DHCSR_Write_REG(CoreDebug_BASE_PTR) #define DCRSR CoreDebug_base_DCRSR_REG(CoreDebug_BASE_PTR) #define DCRDR CoreDebug_base_DCRDR_REG(CoreDebug_BASE_PTR) #define DEMCR CoreDebug_base_DEMCR_REG(CoreDebug_BASE_PTR) /** * @} */ /* end of group CoreDebug_Register_Accessor_Macros */ /** * @} */ /* end of group CoreDebug_Peripheral */ /* ---------------------------------------------------------------------------- -- DAC ---------------------------------------------------------------------------- */ /** * @addtogroup DAC_Peripheral DAC * @{ */ /** DAC - Peripheral register structure */ typedef struct DAC_MemMap { struct { /* offset: 0x0, array step: 0x2 */ uint8_t DATL; /**< DAC Data Low Register, array offset: 0x0, array step: 0x2 */ uint8_t DATH; /**< DAC Data High Register, array offset: 0x1, array step: 0x2 */ } DAT[2]; uint8_t RESERVED_0[28]; uint8_t SR; /**< DAC Status Register, offset: 0x20 */ uint8_t C0; /**< DAC Control Register, offset: 0x21 */ uint8_t C1; /**< DAC Control Register 1, offset: 0x22 */ uint8_t C2; /**< DAC Control Register 2, offset: 0x23 */ } volatile *DAC_MemMapPtr; /* ---------------------------------------------------------------------------- -- DAC - Register accessor macros ---------------------------------------------------------------------------- */ /** * @addtogroup DAC_Register_Accessor_Macros DAC - Register accessor macros * @{ */ /* DAC - Register accessors */ #define DAC_DATL_REG(base,index) ((base)->DAT[index].DATL) #define DAC_DATH_REG(base,index) ((base)->DAT[index].DATH) #define DAC_SR_REG(base) ((base)->SR) #define DAC_C0_REG(base) ((base)->C0) #define DAC_C1_REG(base) ((base)->C1) #define DAC_C2_REG(base) ((base)->C2) /** * @} */ /* end of group DAC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- DAC Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup DAC_Register_Masks DAC Register Masks * @{ */ /* DATL Bit Fields */ #define DAC_DATL_DATA0_MASK 0xFFu #define DAC_DATL_DATA0_SHIFT 0 #define DAC_DATL_DATA0(x) (((uint8_t)(((uint8_t)(x))<REQC_ARR[index2]) #define DMA_SAR_REG(base,index) ((base)->DMA[index].SAR) #define DMA_DAR_REG(base,index) ((base)->DMA[index].DAR) #define DMA_DSR_BCR_REG(base,index) ((base)->DMA[index].DSR_BCR) #define DMA_DSR_REG(base,index) ((base)->DMA[index].DSR) #define DMA_DCR_REG(base,index) ((base)->DMA[index].DCR) /** * @} */ /* end of group DMA_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- DMA Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup DMA_Register_Masks DMA Register Masks * @{ */ /* REQC_ARR Bit Fields */ #define DMA_REQC_ARR_DMAC_MASK 0xFu #define DMA_REQC_ARR_DMAC_SHIFT 0 #define DMA_REQC_ARR_DMAC(x) (((uint8_t)(((uint8_t)(x))<CHCFG[index]) /** * @} */ /* end of group DMAMUX_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- DMAMUX Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup DMAMUX_Register_Masks DMAMUX Register Masks * @{ */ /* CHCFG Bit Fields */ #define DMAMUX_CHCFG_SOURCE_MASK 0x3Fu #define DMAMUX_CHCFG_SOURCE_SHIFT 0 #define DMAMUX_CHCFG_SOURCE(x) (((uint8_t)(((uint8_t)(x))<PDOR) #define FGPIO_PSOR_REG(base) ((base)->PSOR) #define FGPIO_PCOR_REG(base) ((base)->PCOR) #define FGPIO_PTOR_REG(base) ((base)->PTOR) #define FGPIO_PDIR_REG(base) ((base)->PDIR) #define FGPIO_PDDR_REG(base) ((base)->PDDR) /** * @} */ /* end of group FGPIO_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- FGPIO Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup FGPIO_Register_Masks FGPIO Register Masks * @{ */ /* PDOR Bit Fields */ #define FGPIO_PDOR_PDO_MASK 0xFFFFFFFFu #define FGPIO_PDOR_PDO_SHIFT 0 #define FGPIO_PDOR_PDO(x) (((uint32_t)(((uint32_t)(x))<FSTAT) #define FTFA_FCNFG_REG(base) ((base)->FCNFG) #define FTFA_FSEC_REG(base) ((base)->FSEC) #define FTFA_FOPT_REG(base) ((base)->FOPT) #define FTFA_FCCOB3_REG(base) ((base)->FCCOB3) #define FTFA_FCCOB2_REG(base) ((base)->FCCOB2) #define FTFA_FCCOB1_REG(base) ((base)->FCCOB1) #define FTFA_FCCOB0_REG(base) ((base)->FCCOB0) #define FTFA_FCCOB7_REG(base) ((base)->FCCOB7) #define FTFA_FCCOB6_REG(base) ((base)->FCCOB6) #define FTFA_FCCOB5_REG(base) ((base)->FCCOB5) #define FTFA_FCCOB4_REG(base) ((base)->FCCOB4) #define FTFA_FCCOBB_REG(base) ((base)->FCCOBB) #define FTFA_FCCOBA_REG(base) ((base)->FCCOBA) #define FTFA_FCCOB9_REG(base) ((base)->FCCOB9) #define FTFA_FCCOB8_REG(base) ((base)->FCCOB8) #define FTFA_FPROT3_REG(base) ((base)->FPROT3) #define FTFA_FPROT2_REG(base) ((base)->FPROT2) #define FTFA_FPROT1_REG(base) ((base)->FPROT1) #define FTFA_FPROT0_REG(base) ((base)->FPROT0) /** * @} */ /* end of group FTFA_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- FTFA Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup FTFA_Register_Masks FTFA Register Masks * @{ */ /* FSTAT Bit Fields */ #define FTFA_FSTAT_MGSTAT0_MASK 0x1u #define FTFA_FSTAT_MGSTAT0_SHIFT 0 #define FTFA_FSTAT_FPVIOL_MASK 0x10u #define FTFA_FSTAT_FPVIOL_SHIFT 4 #define FTFA_FSTAT_ACCERR_MASK 0x20u #define FTFA_FSTAT_ACCERR_SHIFT 5 #define FTFA_FSTAT_RDCOLERR_MASK 0x40u #define FTFA_FSTAT_RDCOLERR_SHIFT 6 #define FTFA_FSTAT_CCIF_MASK 0x80u #define FTFA_FSTAT_CCIF_SHIFT 7 /* FCNFG Bit Fields */ #define FTFA_FCNFG_ERSSUSP_MASK 0x10u #define FTFA_FCNFG_ERSSUSP_SHIFT 4 #define FTFA_FCNFG_ERSAREQ_MASK 0x20u #define FTFA_FCNFG_ERSAREQ_SHIFT 5 #define FTFA_FCNFG_RDCOLLIE_MASK 0x40u #define FTFA_FCNFG_RDCOLLIE_SHIFT 6 #define FTFA_FCNFG_CCIE_MASK 0x80u #define FTFA_FCNFG_CCIE_SHIFT 7 /* FSEC Bit Fields */ #define FTFA_FSEC_SEC_MASK 0x3u #define FTFA_FSEC_SEC_SHIFT 0 #define FTFA_FSEC_SEC(x) (((uint8_t)(((uint8_t)(x))<PDOR) #define GPIO_PSOR_REG(base) ((base)->PSOR) #define GPIO_PCOR_REG(base) ((base)->PCOR) #define GPIO_PTOR_REG(base) ((base)->PTOR) #define GPIO_PDIR_REG(base) ((base)->PDIR) #define GPIO_PDDR_REG(base) ((base)->PDDR) /** * @} */ /* end of group GPIO_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- GPIO Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup GPIO_Register_Masks GPIO Register Masks * @{ */ /* PDOR Bit Fields */ #define GPIO_PDOR_PDO_MASK 0xFFFFFFFFu #define GPIO_PDOR_PDO_SHIFT 0 #define GPIO_PDOR_PDO(x) (((uint32_t)(((uint32_t)(x))<A1) #define I2C_F_REG(base) ((base)->F) #define I2C_C1_REG(base) ((base)->C1) #define I2C_S_REG(base) ((base)->S) #define I2C_D_REG(base) ((base)->D) #define I2C_C2_REG(base) ((base)->C2) #define I2C_FLT_REG(base) ((base)->FLT) #define I2C_RA_REG(base) ((base)->RA) #define I2C_SMB_REG(base) ((base)->SMB) #define I2C_A2_REG(base) ((base)->A2) #define I2C_SLTH_REG(base) ((base)->SLTH) #define I2C_SLTL_REG(base) ((base)->SLTL) /** * @} */ /* end of group I2C_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- I2C Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup I2C_Register_Masks I2C Register Masks * @{ */ /* A1 Bit Fields */ #define I2C_A1_AD_MASK 0xFEu #define I2C_A1_AD_SHIFT 1 #define I2C_A1_AD(x) (((uint8_t)(((uint8_t)(x))<PE1) #define LLWU_PE2_REG(base) ((base)->PE2) #define LLWU_ME_REG(base) ((base)->ME) #define LLWU_F1_REG(base) ((base)->F1) #define LLWU_F3_REG(base) ((base)->F3) #define LLWU_FILT1_REG(base) ((base)->FILT1) #define LLWU_FILT2_REG(base) ((base)->FILT2) /** * @} */ /* end of group LLWU_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- LLWU Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup LLWU_Register_Masks LLWU Register Masks * @{ */ /* PE1 Bit Fields */ #define LLWU_PE1_WUPE0_MASK 0x3u #define LLWU_PE1_WUPE0_SHIFT 0 #define LLWU_PE1_WUPE0(x) (((uint8_t)(((uint8_t)(x))<CSR) #define LPTMR_PSR_REG(base) ((base)->PSR) #define LPTMR_CMR_REG(base) ((base)->CMR) #define LPTMR_CNR_REG(base) ((base)->CNR) /** * @} */ /* end of group LPTMR_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- LPTMR Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup LPTMR_Register_Masks LPTMR Register Masks * @{ */ /* CSR Bit Fields */ #define LPTMR_CSR_TEN_MASK 0x1u #define LPTMR_CSR_TEN_SHIFT 0 #define LPTMR_CSR_TMS_MASK 0x2u #define LPTMR_CSR_TMS_SHIFT 1 #define LPTMR_CSR_TFC_MASK 0x4u #define LPTMR_CSR_TFC_SHIFT 2 #define LPTMR_CSR_TPP_MASK 0x8u #define LPTMR_CSR_TPP_SHIFT 3 #define LPTMR_CSR_TPS_MASK 0x30u #define LPTMR_CSR_TPS_SHIFT 4 #define LPTMR_CSR_TPS(x) (((uint32_t)(((uint32_t)(x))<C1) #define MCG_C2_REG(base) ((base)->C2) #define MCG_C3_REG(base) ((base)->C3) #define MCG_C4_REG(base) ((base)->C4) #define MCG_C5_REG(base) ((base)->C5) #define MCG_C6_REG(base) ((base)->C6) #define MCG_S_REG(base) ((base)->S) #define MCG_SC_REG(base) ((base)->SC) #define MCG_ATCVH_REG(base) ((base)->ATCVH) #define MCG_ATCVL_REG(base) ((base)->ATCVL) #define MCG_C8_REG(base) ((base)->C8) /** * @} */ /* end of group MCG_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- MCG Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup MCG_Register_Masks MCG Register Masks * @{ */ /* C1 Bit Fields */ #define MCG_C1_IREFSTEN_MASK 0x1u #define MCG_C1_IREFSTEN_SHIFT 0 #define MCG_C1_IRCLKEN_MASK 0x2u #define MCG_C1_IRCLKEN_SHIFT 1 #define MCG_C1_IREFS_MASK 0x4u #define MCG_C1_IREFS_SHIFT 2 #define MCG_C1_FRDIV_MASK 0x38u #define MCG_C1_FRDIV_SHIFT 3 #define MCG_C1_FRDIV(x) (((uint8_t)(((uint8_t)(x))<PLASC) #define MCM_PLAMC_REG(base) ((base)->PLAMC) #define MCM_PLACR_REG(base) ((base)->PLACR) #define MCM_CPO_REG(base) ((base)->CPO) #define MCM_MATCR_REG(base,index) ((base)->MATCR[index]) /** * @} */ /* end of group MCM_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- MCM Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup MCM_Register_Masks MCM Register Masks * @{ */ /* PLASC Bit Fields */ #define MCM_PLASC_ASC_MASK 0xFFu #define MCM_PLASC_ASC_SHIFT 0 #define MCM_PLASC_ASC(x) (((uint16_t)(((uint16_t)(x))<POSITION) #define MTB_MASTER_REG(base) ((base)->MASTER) #define MTB_FLOW_REG(base) ((base)->FLOW) #define MTB_BASE_REG(base) ((base)->BASE) #define MTB_MODECTRL_REG(base) ((base)->MODECTRL) #define MTB_TAGSET_REG(base) ((base)->TAGSET) #define MTB_TAGCLEAR_REG(base) ((base)->TAGCLEAR) #define MTB_LOCKACCESS_REG(base) ((base)->LOCKACCESS) #define MTB_LOCKSTAT_REG(base) ((base)->LOCKSTAT) #define MTB_AUTHSTAT_REG(base) ((base)->AUTHSTAT) #define MTB_DEVICEARCH_REG(base) ((base)->DEVICEARCH) #define MTB_DEVICECFG_REG(base) ((base)->DEVICECFG) #define MTB_DEVICETYPID_REG(base) ((base)->DEVICETYPID) #define MTB_PERIPHID_REG(base,index) ((base)->PERIPHID[index]) #define MTB_COMPID_REG(base,index) ((base)->COMPID[index]) /** * @} */ /* end of group MTB_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- MTB Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup MTB_Register_Masks MTB Register Masks * @{ */ /* POSITION Bit Fields */ #define MTB_POSITION_WRAP_MASK 0x4u #define MTB_POSITION_WRAP_SHIFT 2 #define MTB_POSITION_POINTER_MASK 0xFFFFFFF8u #define MTB_POSITION_POINTER_SHIFT 3 #define MTB_POSITION_POINTER(x) (((uint32_t)(((uint32_t)(x))<CTRL) #define MTBDWT_COMP_REG(base,index) ((base)->COMPARATOR[index].COMP) #define MTBDWT_MASK_REG(base,index) ((base)->COMPARATOR[index].MASK) #define MTBDWT_FCT_REG(base,index) ((base)->COMPARATOR[index].FCT) #define MTBDWT_TBCTRL_REG(base) ((base)->TBCTRL) #define MTBDWT_DEVICECFG_REG(base) ((base)->DEVICECFG) #define MTBDWT_DEVICETYPID_REG(base) ((base)->DEVICETYPID) #define MTBDWT_PERIPHID_REG(base,index) ((base)->PERIPHID[index]) #define MTBDWT_COMPID_REG(base,index) ((base)->COMPID[index]) /** * @} */ /* end of group MTBDWT_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- MTBDWT Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup MTBDWT_Register_Masks MTBDWT Register Masks * @{ */ /* CTRL Bit Fields */ #define MTBDWT_CTRL_DWTCFGCTRL_MASK 0xFFFFFFFu #define MTBDWT_CTRL_DWTCFGCTRL_SHIFT 0 #define MTBDWT_CTRL_DWTCFGCTRL(x) (((uint32_t)(((uint32_t)(x))<BACKKEY3) #define NV_BACKKEY2_REG(base) ((base)->BACKKEY2) #define NV_BACKKEY1_REG(base) ((base)->BACKKEY1) #define NV_BACKKEY0_REG(base) ((base)->BACKKEY0) #define NV_BACKKEY7_REG(base) ((base)->BACKKEY7) #define NV_BACKKEY6_REG(base) ((base)->BACKKEY6) #define NV_BACKKEY5_REG(base) ((base)->BACKKEY5) #define NV_BACKKEY4_REG(base) ((base)->BACKKEY4) #define NV_FPROT3_REG(base) ((base)->FPROT3) #define NV_FPROT2_REG(base) ((base)->FPROT2) #define NV_FPROT1_REG(base) ((base)->FPROT1) #define NV_FPROT0_REG(base) ((base)->FPROT0) #define NV_FSEC_REG(base) ((base)->FSEC) #define NV_FOPT_REG(base) ((base)->FOPT) /** * @} */ /* end of group NV_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- NV Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup NV_Register_Masks NV Register Masks * @{ */ /* BACKKEY3 Bit Fields */ #define NV_BACKKEY3_KEY_MASK 0xFFu #define NV_BACKKEY3_KEY_SHIFT 0 #define NV_BACKKEY3_KEY(x) (((uint8_t)(((uint8_t)(x))<ISER) #define NVIC_ICER_REG(base) ((base)->ICER) #define NVIC_ISPR_REG(base) ((base)->ISPR) #define NVIC_ICPR_REG(base) ((base)->ICPR) #define NVIC_IP_REG(base,index) ((base)->IP[index]) /** * @} */ /* end of group NVIC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- NVIC Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup NVIC_Register_Masks NVIC Register Masks * @{ */ /* ISER Bit Fields */ #define NVIC_ISER_SETENA_MASK 0xFFFFFFFFu #define NVIC_ISER_SETENA_SHIFT 0 #define NVIC_ISER_SETENA(x) (((uint32_t)(((uint32_t)(x))<CR) /** * @} */ /* end of group OSC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- OSC Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup OSC_Register_Masks OSC Register Masks * @{ */ /* CR Bit Fields */ #define OSC_CR_SC16P_MASK 0x1u #define OSC_CR_SC16P_SHIFT 0 #define OSC_CR_SC8P_MASK 0x2u #define OSC_CR_SC8P_SHIFT 1 #define OSC_CR_SC4P_MASK 0x4u #define OSC_CR_SC4P_SHIFT 2 #define OSC_CR_SC2P_MASK 0x8u #define OSC_CR_SC2P_SHIFT 3 #define OSC_CR_EREFSTEN_MASK 0x20u #define OSC_CR_EREFSTEN_SHIFT 5 #define OSC_CR_ERCLKEN_MASK 0x80u #define OSC_CR_ERCLKEN_SHIFT 7 /** * @} */ /* end of group OSC_Register_Masks */ /* OSC - Peripheral instance base addresses */ /** Peripheral OSC0 base pointer */ #define OSC0_BASE_PTR ((OSC_MemMapPtr)0x40065000u) /** Array initializer of OSC peripheral base pointers */ #define OSC_BASE_PTRS { OSC0_BASE_PTR } /* ---------------------------------------------------------------------------- -- OSC - Register accessor macros ---------------------------------------------------------------------------- */ /** * @addtogroup OSC_Register_Accessor_Macros OSC - Register accessor macros * @{ */ /* OSC - Register instance definitions */ /* OSC0 */ #define OSC0_CR OSC_CR_REG(OSC0_BASE_PTR) /** * @} */ /* end of group OSC_Register_Accessor_Macros */ /** * @} */ /* end of group OSC_Peripheral */ /* ---------------------------------------------------------------------------- -- PIT ---------------------------------------------------------------------------- */ /** * @addtogroup PIT_Peripheral PIT * @{ */ /** PIT - Peripheral register structure */ typedef struct PIT_MemMap { uint32_t MCR; /**< PIT Module Control Register, offset: 0x0 */ uint8_t RESERVED_0[220]; uint32_t LTMR64H; /**< PIT Upper Lifetime Timer Register, offset: 0xE0 */ uint32_t LTMR64L; /**< PIT Lower Lifetime Timer Register, offset: 0xE4 */ uint8_t RESERVED_1[24]; struct { /* offset: 0x100, array step: 0x10 */ uint32_t LDVAL; /**< Timer Load Value Register, array offset: 0x100, array step: 0x10 */ uint32_t CVAL; /**< Current Timer Value Register, array offset: 0x104, array step: 0x10 */ uint32_t TCTRL; /**< Timer Control Register, array offset: 0x108, array step: 0x10 */ uint32_t TFLG; /**< Timer Flag Register, array offset: 0x10C, array step: 0x10 */ } CHANNEL[2]; } volatile *PIT_MemMapPtr; /* ---------------------------------------------------------------------------- -- PIT - Register accessor macros ---------------------------------------------------------------------------- */ /** * @addtogroup PIT_Register_Accessor_Macros PIT - Register accessor macros * @{ */ /* PIT - Register accessors */ #define PIT_MCR_REG(base) ((base)->MCR) #define PIT_LTMR64H_REG(base) ((base)->LTMR64H) #define PIT_LTMR64L_REG(base) ((base)->LTMR64L) #define PIT_LDVAL_REG(base,index) ((base)->CHANNEL[index].LDVAL) #define PIT_CVAL_REG(base,index) ((base)->CHANNEL[index].CVAL) #define PIT_TCTRL_REG(base,index) ((base)->CHANNEL[index].TCTRL) #define PIT_TFLG_REG(base,index) ((base)->CHANNEL[index].TFLG) /** * @} */ /* end of group PIT_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- PIT Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup PIT_Register_Masks PIT Register Masks * @{ */ /* MCR Bit Fields */ #define PIT_MCR_FRZ_MASK 0x1u #define PIT_MCR_FRZ_SHIFT 0 #define PIT_MCR_MDIS_MASK 0x2u #define PIT_MCR_MDIS_SHIFT 1 /* LTMR64H Bit Fields */ #define PIT_LTMR64H_LTH_MASK 0xFFFFFFFFu #define PIT_LTMR64H_LTH_SHIFT 0 #define PIT_LTMR64H_LTH(x) (((uint32_t)(((uint32_t)(x))<LVDSC1) #define PMC_LVDSC2_REG(base) ((base)->LVDSC2) #define PMC_REGSC_REG(base) ((base)->REGSC) /** * @} */ /* end of group PMC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- PMC Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup PMC_Register_Masks PMC Register Masks * @{ */ /* LVDSC1 Bit Fields */ #define PMC_LVDSC1_LVDV_MASK 0x3u #define PMC_LVDSC1_LVDV_SHIFT 0 #define PMC_LVDSC1_LVDV(x) (((uint8_t)(((uint8_t)(x))<PCR[index]) #define PORT_GPCLR_REG(base) ((base)->GPCLR) #define PORT_GPCHR_REG(base) ((base)->GPCHR) #define PORT_ISFR_REG(base) ((base)->ISFR) /** * @} */ /* end of group PORT_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- PORT Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup PORT_Register_Masks PORT Register Masks * @{ */ /* PCR Bit Fields */ #define PORT_PCR_PS_MASK 0x1u #define PORT_PCR_PS_SHIFT 0 #define PORT_PCR_PE_MASK 0x2u #define PORT_PCR_PE_SHIFT 1 #define PORT_PCR_SRE_MASK 0x4u #define PORT_PCR_SRE_SHIFT 2 #define PORT_PCR_PFE_MASK 0x10u #define PORT_PCR_PFE_SHIFT 4 #define PORT_PCR_DSE_MASK 0x40u #define PORT_PCR_DSE_SHIFT 6 #define PORT_PCR_MUX_MASK 0x700u #define PORT_PCR_MUX_SHIFT 8 #define PORT_PCR_MUX(x) (((uint32_t)(((uint32_t)(x))<SRS0) #define RCM_SRS1_REG(base) ((base)->SRS1) #define RCM_RPFC_REG(base) ((base)->RPFC) #define RCM_RPFW_REG(base) ((base)->RPFW) /** * @} */ /* end of group RCM_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- RCM Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup RCM_Register_Masks RCM Register Masks * @{ */ /* SRS0 Bit Fields */ #define RCM_SRS0_WAKEUP_MASK 0x1u #define RCM_SRS0_WAKEUP_SHIFT 0 #define RCM_SRS0_LVD_MASK 0x2u #define RCM_SRS0_LVD_SHIFT 1 #define RCM_SRS0_LOC_MASK 0x4u #define RCM_SRS0_LOC_SHIFT 2 #define RCM_SRS0_WDOG_MASK 0x20u #define RCM_SRS0_WDOG_SHIFT 5 #define RCM_SRS0_PIN_MASK 0x40u #define RCM_SRS0_PIN_SHIFT 6 #define RCM_SRS0_POR_MASK 0x80u #define RCM_SRS0_POR_SHIFT 7 /* SRS1 Bit Fields */ #define RCM_SRS1_LOCKUP_MASK 0x2u #define RCM_SRS1_LOCKUP_SHIFT 1 #define RCM_SRS1_SW_MASK 0x4u #define RCM_SRS1_SW_SHIFT 2 #define RCM_SRS1_MDM_AP_MASK 0x8u #define RCM_SRS1_MDM_AP_SHIFT 3 #define RCM_SRS1_SACKERR_MASK 0x20u #define RCM_SRS1_SACKERR_SHIFT 5 /* RPFC Bit Fields */ #define RCM_RPFC_RSTFLTSRW_MASK 0x3u #define RCM_RPFC_RSTFLTSRW_SHIFT 0 #define RCM_RPFC_RSTFLTSRW(x) (((uint8_t)(((uint8_t)(x))<ENTRY[index]) #define ROM_TABLEMARK_REG(base) ((base)->TABLEMARK) #define ROM_PERIPHID4_REG(base) ((base)->PERIPHID4) #define ROM_PERIPHID5_REG(base) ((base)->PERIPHID5) #define ROM_PERIPHID6_REG(base) ((base)->PERIPHID6) #define ROM_PERIPHID7_REG(base) ((base)->PERIPHID7) #define ROM_PERIPHID0_REG(base) ((base)->PERIPHID0) #define ROM_PERIPHID1_REG(base) ((base)->PERIPHID1) #define ROM_PERIPHID2_REG(base) ((base)->PERIPHID2) #define ROM_PERIPHID3_REG(base) ((base)->PERIPHID3) #define ROM_COMPID_REG(base,index) ((base)->COMPID[index]) /** * @} */ /* end of group ROM_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- ROM Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup ROM_Register_Masks ROM Register Masks * @{ */ /* ENTRY Bit Fields */ #define ROM_ENTRY_ENTRY_MASK 0xFFFFFFFFu #define ROM_ENTRY_ENTRY_SHIFT 0 #define ROM_ENTRY_ENTRY(x) (((uint32_t)(((uint32_t)(x))<TSR) #define RTC_TPR_REG(base) ((base)->TPR) #define RTC_TAR_REG(base) ((base)->TAR) #define RTC_TCR_REG(base) ((base)->TCR) #define RTC_CR_REG(base) ((base)->CR) #define RTC_SR_REG(base) ((base)->SR) #define RTC_LR_REG(base) ((base)->LR) #define RTC_IER_REG(base) ((base)->IER) /** * @} */ /* end of group RTC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- RTC Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup RTC_Register_Masks RTC Register Masks * @{ */ /* TSR Bit Fields */ #define RTC_TSR_TSR_MASK 0xFFFFFFFFu #define RTC_TSR_TSR_SHIFT 0 #define RTC_TSR_TSR(x) (((uint32_t)(((uint32_t)(x))<ACTLR) #define SCB_CPUID_REG(base) ((base)->CPUID) #define SCB_ICSR_REG(base) ((base)->ICSR) #define SCB_VTOR_REG(base) ((base)->VTOR) #define SCB_AIRCR_REG(base) ((base)->AIRCR) #define SCB_SCR_REG(base) ((base)->SCR) #define SCB_CCR_REG(base) ((base)->CCR) #define SCB_SHPR2_REG(base) ((base)->SHPR2) #define SCB_SHPR3_REG(base) ((base)->SHPR3) #define SCB_SHCSR_REG(base) ((base)->SHCSR) #define SCB_DFSR_REG(base) ((base)->DFSR) /** * @} */ /* end of group SCB_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- SCB Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup SCB_Register_Masks SCB Register Masks * @{ */ /* CPUID Bit Fields */ #define SCB_CPUID_REVISION_MASK 0xFu #define SCB_CPUID_REVISION_SHIFT 0 #define SCB_CPUID_REVISION(x) (((uint32_t)(((uint32_t)(x))<SOPT1) #define SIM_SOPT1CFG_REG(base) ((base)->SOPT1CFG) #define SIM_SOPT2_REG(base) ((base)->SOPT2) #define SIM_SOPT4_REG(base) ((base)->SOPT4) #define SIM_SOPT5_REG(base) ((base)->SOPT5) #define SIM_SOPT7_REG(base) ((base)->SOPT7) #define SIM_SDID_REG(base) ((base)->SDID) #define SIM_SCGC4_REG(base) ((base)->SCGC4) #define SIM_SCGC5_REG(base) ((base)->SCGC5) #define SIM_SCGC6_REG(base) ((base)->SCGC6) #define SIM_SCGC7_REG(base) ((base)->SCGC7) #define SIM_CLKDIV1_REG(base) ((base)->CLKDIV1) #define SIM_FCFG1_REG(base) ((base)->FCFG1) #define SIM_FCFG2_REG(base) ((base)->FCFG2) #define SIM_UIDMH_REG(base) ((base)->UIDMH) #define SIM_UIDML_REG(base) ((base)->UIDML) #define SIM_UIDL_REG(base) ((base)->UIDL) #define SIM_COPC_REG(base) ((base)->COPC) #define SIM_SRVCOP_REG(base) ((base)->SRVCOP) /** * @} */ /* end of group SIM_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- SIM Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup SIM_Register_Masks SIM Register Masks * @{ */ /* SOPT1 Bit Fields */ #define SIM_SOPT1_OSC32KSEL_MASK 0xC0000u #define SIM_SOPT1_OSC32KSEL_SHIFT 18 #define SIM_SOPT1_OSC32KSEL(x) (((uint32_t)(((uint32_t)(x))<PMPROT) #define SMC_PMCTRL_REG(base) ((base)->PMCTRL) #define SMC_STOPCTRL_REG(base) ((base)->STOPCTRL) #define SMC_PMSTAT_REG(base) ((base)->PMSTAT) /** * @} */ /* end of group SMC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- SMC Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup SMC_Register_Masks SMC Register Masks * @{ */ /* PMPROT Bit Fields */ #define SMC_PMPROT_AVLLS_MASK 0x2u #define SMC_PMPROT_AVLLS_SHIFT 1 #define SMC_PMPROT_ALLS_MASK 0x8u #define SMC_PMPROT_ALLS_SHIFT 3 #define SMC_PMPROT_AVLP_MASK 0x20u #define SMC_PMPROT_AVLP_SHIFT 5 /* PMCTRL Bit Fields */ #define SMC_PMCTRL_STOPM_MASK 0x7u #define SMC_PMCTRL_STOPM_SHIFT 0 #define SMC_PMCTRL_STOPM(x) (((uint8_t)(((uint8_t)(x))<C1) #define SPI_C2_REG(base) ((base)->C2) #define SPI_BR_REG(base) ((base)->BR) #define SPI_S_REG(base) ((base)->S) #define SPI_DL_REG(base) ((base)->DL) #define SPI_ML_REG(base) ((base)->ML) /** * @} */ /* end of group SPI_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- SPI Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup SPI_Register_Masks SPI Register Masks * @{ */ /* C1 Bit Fields */ #define SPI_C1_LSBFE_MASK 0x1u #define SPI_C1_LSBFE_SHIFT 0 #define SPI_C1_SSOE_MASK 0x2u #define SPI_C1_SSOE_SHIFT 1 #define SPI_C1_CPHA_MASK 0x4u #define SPI_C1_CPHA_SHIFT 2 #define SPI_C1_CPOL_MASK 0x8u #define SPI_C1_CPOL_SHIFT 3 #define SPI_C1_MSTR_MASK 0x10u #define SPI_C1_MSTR_SHIFT 4 #define SPI_C1_SPTIE_MASK 0x20u #define SPI_C1_SPTIE_SHIFT 5 #define SPI_C1_SPE_MASK 0x40u #define SPI_C1_SPE_SHIFT 6 #define SPI_C1_SPIE_MASK 0x80u #define SPI_C1_SPIE_SHIFT 7 /* C2 Bit Fields */ #define SPI_C2_SPC0_MASK 0x1u #define SPI_C2_SPC0_SHIFT 0 #define SPI_C2_SPISWAI_MASK 0x2u #define SPI_C2_SPISWAI_SHIFT 1 #define SPI_C2_RXDMAE_MASK 0x4u #define SPI_C2_RXDMAE_SHIFT 2 #define SPI_C2_BIDIROE_MASK 0x8u #define SPI_C2_BIDIROE_SHIFT 3 #define SPI_C2_MODFEN_MASK 0x10u #define SPI_C2_MODFEN_SHIFT 4 #define SPI_C2_TXDMAE_MASK 0x20u #define SPI_C2_TXDMAE_SHIFT 5 #define SPI_C2_SPLPIE_MASK 0x40u #define SPI_C2_SPLPIE_SHIFT 6 #define SPI_C2_SPMIE_MASK 0x80u #define SPI_C2_SPMIE_SHIFT 7 /* BR Bit Fields */ #define SPI_BR_SPR_MASK 0xFu #define SPI_BR_SPR_SHIFT 0 #define SPI_BR_SPR(x) (((uint8_t)(((uint8_t)(x))<CSR) #define SysTick_RVR_REG(base) ((base)->RVR) #define SysTick_CVR_REG(base) ((base)->CVR) #define SysTick_CALIB_REG(base) ((base)->CALIB) /** * @} */ /* end of group SysTick_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- SysTick Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup SysTick_Register_Masks SysTick Register Masks * @{ */ /* CSR Bit Fields */ #define SysTick_CSR_ENABLE_MASK 0x1u #define SysTick_CSR_ENABLE_SHIFT 0 #define SysTick_CSR_TICKINT_MASK 0x2u #define SysTick_CSR_TICKINT_SHIFT 1 #define SysTick_CSR_CLKSOURCE_MASK 0x4u #define SysTick_CSR_CLKSOURCE_SHIFT 2 #define SysTick_CSR_COUNTFLAG_MASK 0x10000u #define SysTick_CSR_COUNTFLAG_SHIFT 16 /* RVR Bit Fields */ #define SysTick_RVR_RELOAD_MASK 0xFFFFFFu #define SysTick_RVR_RELOAD_SHIFT 0 #define SysTick_RVR_RELOAD(x) (((uint32_t)(((uint32_t)(x))<SC) #define TPM_CNT_REG(base) ((base)->CNT) #define TPM_MOD_REG(base) ((base)->MOD) #define TPM_CnSC_REG(base,index) ((base)->CONTROLS[index].CnSC) #define TPM_CnV_REG(base,index) ((base)->CONTROLS[index].CnV) #define TPM_STATUS_REG(base) ((base)->STATUS) #define TPM_CONF_REG(base) ((base)->CONF) /** * @} */ /* end of group TPM_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- TPM Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup TPM_Register_Masks TPM Register Masks * @{ */ /* SC Bit Fields */ #define TPM_SC_PS_MASK 0x7u #define TPM_SC_PS_SHIFT 0 #define TPM_SC_PS(x) (((uint32_t)(((uint32_t)(x))<GENCS) #define TSI_DATA_REG(base) ((base)->DATA) #define TSI_TSHD_REG(base) ((base)->TSHD) /** * @} */ /* end of group TSI_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- TSI Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup TSI_Register_Masks TSI Register Masks * @{ */ /* GENCS Bit Fields */ #define TSI_GENCS_CURSW_MASK 0x2u #define TSI_GENCS_CURSW_SHIFT 1 #define TSI_GENCS_EOSF_MASK 0x4u #define TSI_GENCS_EOSF_SHIFT 2 #define TSI_GENCS_SCNIP_MASK 0x8u #define TSI_GENCS_SCNIP_SHIFT 3 #define TSI_GENCS_STM_MASK 0x10u #define TSI_GENCS_STM_SHIFT 4 #define TSI_GENCS_STPE_MASK 0x20u #define TSI_GENCS_STPE_SHIFT 5 #define TSI_GENCS_TSIIEN_MASK 0x40u #define TSI_GENCS_TSIIEN_SHIFT 6 #define TSI_GENCS_TSIEN_MASK 0x80u #define TSI_GENCS_TSIEN_SHIFT 7 #define TSI_GENCS_NSCN_MASK 0x1F00u #define TSI_GENCS_NSCN_SHIFT 8 #define TSI_GENCS_NSCN(x) (((uint32_t)(((uint32_t)(x))<BDH) #define UART0_BDL_REG(base) ((base)->BDL) #define UART0_C1_REG(base) ((base)->C1) #define UART0_C2_REG(base) ((base)->C2) #define UART0_S1_REG(base) ((base)->S1) #define UART0_S2_REG(base) ((base)->S2) #define UART0_C3_REG(base) ((base)->C3) #define UART0_D_REG(base) ((base)->D) #define UART0_MA1_REG(base) ((base)->MA1) #define UART0_MA2_REG(base) ((base)->MA2) #define UART0_C4_REG(base) ((base)->C4) #define UART0_C5_REG(base) ((base)->C5) /** * @} */ /* end of group UART0_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- UART0 Register Masks ---------------------------------------------------------------------------- */ /** * @addtogroup UART0_Register_Masks UART0 Register Masks * @{ */ /* BDH Bit Fields */ #define UART0_BDH_SBR_MASK 0x1Fu #define UART0_BDH_SBR_SHIFT 0 #define UART0_BDH_SBR(x) (((uint8_t)(((uint8_t)(x))<