|
@@ -1226,3 +1226,161 @@
|
|
|
/* ************* SYSTEM INTERRUPT CONTROLLER MASKS ***************** */
|
|
|
|
|
|
/* Peripheral Masks For SIC0_ISR, SIC0_IWR, SIC0_IMASK */
|
|
|
+#define PLL_WAKEUP_IRQ 0x00000001 /* PLL Wakeup Interrupt Request */
|
|
|
+#define DMAC0_ERR_IRQ 0x00000002 /* DMA Controller 0 Error Interrupt Request */
|
|
|
+#define PPI_ERR_IRQ 0x00000004 /* PPI Error Interrupt Request */
|
|
|
+#define SPORT0_ERR_IRQ 0x00000008 /* SPORT0 Error Interrupt Request */
|
|
|
+#define SPORT1_ERR_IRQ 0x00000010 /* SPORT1 Error Interrupt Request */
|
|
|
+#define SPI0_ERR_IRQ 0x00000020 /* SPI0 Error Interrupt Request */
|
|
|
+#define UART0_ERR_IRQ 0x00000040 /* UART0 Error Interrupt Request */
|
|
|
+#define RTC_IRQ 0x00000080 /* Real-Time Clock Interrupt Request */
|
|
|
+#define DMA0_IRQ 0x00000100 /* DMA Channel 0 (PPI) Interrupt Request */
|
|
|
+#define DMA1_IRQ 0x00000200 /* DMA Channel 1 (SPORT0 RX) Interrupt Request */
|
|
|
+#define DMA2_IRQ 0x00000400 /* DMA Channel 2 (SPORT0 TX) Interrupt Request */
|
|
|
+#define DMA3_IRQ 0x00000800 /* DMA Channel 3 (SPORT1 RX) Interrupt Request */
|
|
|
+#define DMA4_IRQ 0x00001000 /* DMA Channel 4 (SPORT1 TX) Interrupt Request */
|
|
|
+#define DMA5_IRQ 0x00002000 /* DMA Channel 5 (SPI) Interrupt Request */
|
|
|
+#define DMA6_IRQ 0x00004000 /* DMA Channel 6 (UART RX) Interrupt Request */
|
|
|
+#define DMA7_IRQ 0x00008000 /* DMA Channel 7 (UART TX) Interrupt Request */
|
|
|
+#define TIMER0_IRQ 0x00010000 /* Timer 0 Interrupt Request */
|
|
|
+#define TIMER1_IRQ 0x00020000 /* Timer 1 Interrupt Request */
|
|
|
+#define TIMER2_IRQ 0x00040000 /* Timer 2 Interrupt Request */
|
|
|
+#define PFA_IRQ 0x00080000 /* Programmable Flag Interrupt Request A */
|
|
|
+#define PFB_IRQ 0x00100000 /* Programmable Flag Interrupt Request B */
|
|
|
+#define MDMA0_0_IRQ 0x00200000 /* MemDMA0 Stream 0 Interrupt Request */
|
|
|
+#define MDMA0_1_IRQ 0x00400000 /* MemDMA0 Stream 1 Interrupt Request */
|
|
|
+#define WDOG_IRQ 0x00800000 /* Software Watchdog Timer Interrupt Request */
|
|
|
+#define DMAC1_ERR_IRQ 0x01000000 /* DMA Controller 1 Error Interrupt Request */
|
|
|
+#define SPORT2_ERR_IRQ 0x02000000 /* SPORT2 Error Interrupt Request */
|
|
|
+#define SPORT3_ERR_IRQ 0x04000000 /* SPORT3 Error Interrupt Request */
|
|
|
+#define MXVR_SD_IRQ 0x08000000 /* MXVR Synchronous Data Interrupt Request */
|
|
|
+#define SPI1_ERR_IRQ 0x10000000 /* SPI1 Error Interrupt Request */
|
|
|
+#define SPI2_ERR_IRQ 0x20000000 /* SPI2 Error Interrupt Request */
|
|
|
+#define UART1_ERR_IRQ 0x40000000 /* UART1 Error Interrupt Request */
|
|
|
+#define UART2_ERR_IRQ 0x80000000 /* UART2 Error Interrupt Request */
|
|
|
+
|
|
|
+/* the following are for backwards compatibility */
|
|
|
+#define DMA0_ERR_IRQ DMAC0_ERR_IRQ
|
|
|
+#define DMA1_ERR_IRQ DMAC1_ERR_IRQ
|
|
|
+
|
|
|
+
|
|
|
+/* Peripheral Masks For SIC_ISR1, SIC_IWR1, SIC_IMASK1 */
|
|
|
+#define CAN_ERR_IRQ 0x00000001 /* CAN Error Interrupt Request */
|
|
|
+#define DMA8_IRQ 0x00000002 /* DMA Channel 8 (SPORT2 RX) Interrupt Request */
|
|
|
+#define DMA9_IRQ 0x00000004 /* DMA Channel 9 (SPORT2 TX) Interrupt Request */
|
|
|
+#define DMA10_IRQ 0x00000008 /* DMA Channel 10 (SPORT3 RX) Interrupt Request */
|
|
|
+#define DMA11_IRQ 0x00000010 /* DMA Channel 11 (SPORT3 TX) Interrupt Request */
|
|
|
+#define DMA12_IRQ 0x00000020 /* DMA Channel 12 Interrupt Request */
|
|
|
+#define DMA13_IRQ 0x00000040 /* DMA Channel 13 Interrupt Request */
|
|
|
+#define DMA14_IRQ 0x00000080 /* DMA Channel 14 (SPI1) Interrupt Request */
|
|
|
+#define DMA15_IRQ 0x00000100 /* DMA Channel 15 (SPI2) Interrupt Request */
|
|
|
+#define DMA16_IRQ 0x00000200 /* DMA Channel 16 (UART1 RX) Interrupt Request */
|
|
|
+#define DMA17_IRQ 0x00000400 /* DMA Channel 17 (UART1 TX) Interrupt Request */
|
|
|
+#define DMA18_IRQ 0x00000800 /* DMA Channel 18 (UART2 RX) Interrupt Request */
|
|
|
+#define DMA19_IRQ 0x00001000 /* DMA Channel 19 (UART2 TX) Interrupt Request */
|
|
|
+#define TWI0_IRQ 0x00002000 /* TWI0 Interrupt Request */
|
|
|
+#define TWI1_IRQ 0x00004000 /* TWI1 Interrupt Request */
|
|
|
+#define CAN_RX_IRQ 0x00008000 /* CAN Receive Interrupt Request */
|
|
|
+#define CAN_TX_IRQ 0x00010000 /* CAN Transmit Interrupt Request */
|
|
|
+#define MDMA1_0_IRQ 0x00020000 /* MemDMA1 Stream 0 Interrupt Request */
|
|
|
+#define MDMA1_1_IRQ 0x00040000 /* MemDMA1 Stream 1 Interrupt Request */
|
|
|
+#define MXVR_STAT_IRQ 0x00080000 /* MXVR Status Interrupt Request */
|
|
|
+#define MXVR_CM_IRQ 0x00100000 /* MXVR Control Message Interrupt Request */
|
|
|
+#define MXVR_AP_IRQ 0x00200000 /* MXVR Asynchronous Packet Interrupt */
|
|
|
+
|
|
|
+/* the following are for backwards compatibility */
|
|
|
+#define MDMA0_IRQ MDMA1_0_IRQ
|
|
|
+#define MDMA1_IRQ MDMA1_1_IRQ
|
|
|
+
|
|
|
+#ifdef _MISRA_RULES
|
|
|
+#define _MF15 0xFu
|
|
|
+#define _MF7 7u
|
|
|
+#else
|
|
|
+#define _MF15 0xF
|
|
|
+#define _MF7 7
|
|
|
+#endif /* _MISRA_RULES */
|
|
|
+
|
|
|
+/* SIC_IMASKx Masks */
|
|
|
+#define SIC_UNMASK_ALL 0x00000000 /* Unmask all peripheral interrupts */
|
|
|
+#define SIC_MASK_ALL 0xFFFFFFFF /* Mask all peripheral interrupts */
|
|
|
+#ifdef _MISRA_RULES
|
|
|
+#define SIC_MASK(x) (1 << ((x)&0x1Fu)) /* Mask Peripheral #x interrupt */
|
|
|
+#define SIC_UNMASK(x) (0xFFFFFFFFu ^ (1 << ((x)&0x1Fu))) /* Unmask Peripheral #x interrupt */
|
|
|
+#else
|
|
|
+#define SIC_MASK(x) (1 << ((x)&0x1F)) /* Mask Peripheral #x interrupt */
|
|
|
+#define SIC_UNMASK(x) (0xFFFFFFFF ^ (1 << ((x)&0x1F))) /* Unmask Peripheral #x interrupt */
|
|
|
+#endif /* _MISRA_RULES */
|
|
|
+
|
|
|
+/* SIC_IWRx Masks */
|
|
|
+#define IWR_DISABLE_ALL 0x00000000 /* Wakeup Disable all peripherals */
|
|
|
+#define IWR_ENABLE_ALL 0xFFFFFFFF /* Wakeup Enable all peripherals */
|
|
|
+#ifdef _MISRA_RULES
|
|
|
+#define IWR_ENABLE(x) (1 << ((x)&0x1Fu)) /* Wakeup Enable Peripheral #x */
|
|
|
+#define IWR_DISABLE(x) (0xFFFFFFFFu ^ (1 << ((x)&0x1Fu))) /* Wakeup Disable Peripheral #x */
|
|
|
+#else
|
|
|
+#define IWR_ENABLE(x) (1 << ((x)&0x1F)) /* Wakeup Enable Peripheral #x */
|
|
|
+#define IWR_DISABLE(x) (0xFFFFFFFF ^ (1 << ((x)&0x1F))) /* Wakeup Disable Peripheral #x */
|
|
|
+#endif /* _MISRA_RULES */
|
|
|
+
|
|
|
+/* ********* PARALLEL PERIPHERAL INTERFACE (PPI) MASKS **************** */
|
|
|
+/* PPI_CONTROL Masks */
|
|
|
+#define PORT_EN 0x0001 /* PPI Port Enable */
|
|
|
+#define PORT_DIR 0x0002 /* PPI Port Direction */
|
|
|
+#define XFR_TYPE 0x000C /* PPI Transfer Type */
|
|
|
+#define PORT_CFG 0x0030 /* PPI Port Configuration */
|
|
|
+#define FLD_SEL 0x0040 /* PPI Active Field Select */
|
|
|
+#define PACK_EN 0x0080 /* PPI Packing Mode */
|
|
|
+/* previous versions of defBF539.h erroneously included DMA32 (PPI 32-bit DMA Enable) */
|
|
|
+#define SKIP_EN 0x0200 /* PPI Skip Element Enable */
|
|
|
+#define SKIP_EO 0x0400 /* PPI Skip Even/Odd Elements */
|
|
|
+#define DLENGTH 0x3800 /* PPI Data Length */
|
|
|
+#define DLEN_8 0x0 /* PPI Data Length mask for DLEN=8 */
|
|
|
+#define DLEN_10 0x0800 /* Data Length = 10 Bits */
|
|
|
+#define DLEN_11 0x1000 /* Data Length = 11 Bits */
|
|
|
+#define DLEN_12 0x1800 /* Data Length = 12 Bits */
|
|
|
+#define DLEN_13 0x2000 /* Data Length = 13 Bits */
|
|
|
+#define DLEN_14 0x2800 /* Data Length = 14 Bits */
|
|
|
+#define DLEN_15 0x3000 /* Data Length = 15 Bits */
|
|
|
+#define DLEN_16 0x3800 /* Data Length = 16 Bits */
|
|
|
+#ifdef _MISRA_RULES
|
|
|
+#define DLEN(x) ((((x)-9u) & 0x07u) << 11) /* PPI Data Length (only works for x=10-->x=16) */
|
|
|
+#else
|
|
|
+#define DLEN(x) ((((x)-9) & 0x07) << 11) /* PPI Data Length (only works for x=10-->x=16) */
|
|
|
+#endif /* _MISRA_RULES */
|
|
|
+#define POL 0xC000 /* PPI Signal Polarities */
|
|
|
+#define POLC 0x4000 /* PPI Clock Polarity */
|
|
|
+#define POLS 0x8000 /* PPI Frame Sync Polarity */
|
|
|
+
|
|
|
+
|
|
|
+/* PPI_STATUS Masks */
|
|
|
+#define FLD 0x0400 /* Field Indicator */
|
|
|
+#define FT_ERR 0x0800 /* Frame Track Error */
|
|
|
+#define OVR 0x1000 /* FIFO Overflow Error */
|
|
|
+#define UNDR 0x2000 /* FIFO Underrun Error */
|
|
|
+#define ERR_DET 0x4000 /* Error Detected Indicator */
|
|
|
+#define ERR_NCOR 0x8000 /* Error Not Corrected Indicator */
|
|
|
+
|
|
|
+
|
|
|
+/* ********** DMA CONTROLLER MASKS ***********************/
|
|
|
+
|
|
|
+/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */
|
|
|
+
|
|
|
+#define CTYPE 0x0040 /* DMA Channel Type Indicator */
|
|
|
+#define CTYPE_P 0x6 /* DMA Channel Type Indicator BIT POSITION */
|
|
|
+#define PCAP8 0x0080 /* DMA 8-bit Operation Indicator */
|
|
|
+#define PCAP16 0x0100 /* DMA 16-bit Operation Indicator */
|
|
|
+#define PCAP32 0x0200 /* DMA 32-bit Operation Indicator */
|
|
|
+#define PCAPWR 0x0400 /* DMA Write Operation Indicator */
|
|
|
+#define PCAPRD 0x0800 /* DMA Read Operation Indicator */
|
|
|
+#define PMAP 0xF000 /* DMA Peripheral Map Field */
|
|
|
+
|
|
|
+/* PMAP Encodings For DMA Controller 0 */
|
|
|
+#define PMAP_PPI 0x0000 /* PMAP PPI Port DMA */
|
|
|
+#define PMAP_SPORT0RX 0x1000 /* PMAP SPORT0 Receive DMA */
|
|
|
+#define PMAP_SPORT0TX 0x2000 /* PMAP SPORT0 Transmit DMA */
|
|
|
+#define PMAP_SPORT1RX 0x3000 /* PMAP SPORT1 Receive DMA */
|
|
|
+#define PMAP_SPORT1TX 0x4000 /* PMAP SPORT1 Transmit DMA */
|
|
|
+#define PMAP_SPI0 0x5000 /* PMAP SPI DMA */
|
|
|
+#define PMAP_UART0RX 0x6000 /* PMAP UART Receive DMA */
|
|
|
+#define PMAP_UART0TX 0x7000 /* PMAP UART Transmit DMA */
|
|
|
+
|