1
- /**************************************************************************/ /**
2
- * @file CMSDK_BEID.h
3
- * @brief CMSIS Core Peripheral Access Layer Header File for
4
- * CMSDK_BEID Device
5
- * @version V3.02
6
- * @date 15. November 2013
7
- *
8
- * @note
9
- *
10
- ******************************************************************************/
11
- /* Copyright (c) 2011 - 2013 ARM LIMITED
12
-
13
- All rights reserved.
14
- Redistribution and use in source and binary forms, with or without
15
- modification, are permitted provided that the following conditions are met:
16
- - Redistributions of source code must retain the above copyright
17
- notice, this list of conditions and the following disclaimer.
18
- - Redistributions in binary form must reproduce the above copyright
19
- notice, this list of conditions and the following disclaimer in the
20
- documentation and/or other materials provided with the distribution.
21
- - Neither the name of ARM nor the names of its contributors may be used
22
- to endorse or promote products derived from this software without
23
- specific prior written permission.
24
- *
25
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28
- ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
29
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35
- POSSIBILITY OF SUCH DAMAGE.
36
- --------------------------------------------------------------------------- */
1
+ /* MPS2 CMSIS Library
2
+ *
3
+ * Copyright (c) 2006-2016 ARM Limited
4
+ * All rights reserved.
5
+ *
6
+ * Redistribution and use in source and binary forms, with or without
7
+ * modification, are permitted provided that the following conditions are met:
8
+ *
9
+ * 1. Redistributions of source code must retain the above copyright notice,
10
+ * this list of conditions and the following disclaimer.
11
+ *
12
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ * this list of conditions and the following disclaimer in the documentation
14
+ * and/or other materials provided with the distribution.
15
+ *
16
+ * 3. Neither the name of the copyright holder nor the names of its contributors
17
+ * may be used to endorse or promote products derived from this software without
18
+ * specific prior written permission.
19
+ *
20
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
+ * POSSIBILITY OF SUCH DAMAGE.
31
+ *******************************************************************************
32
+ * @file CMSDK_BEID.h
33
+ * @brief CMSIS Core Peripheral Access Layer Header File for
34
+ * CMSDK_BEID Device
35
+ *
36
+ ****************************************************************************** */
37
37
38
38
39
39
#ifndef CMSDK_BEID_H
@@ -59,40 +59,61 @@ typedef enum IRQn
59
59
PendSV_IRQn = -2 , /* 14 Pend SV Interrupt */
60
60
SysTick_IRQn = -1 , /* 15 System Tick Interrupt */
61
61
62
- /* ---------------------- CMSDK_BEID Specific Interrupt Numbers ------------------ */
63
- UARTRX0_IRQn = 0 , /* UART 0 RX Interrupt */
64
- UARTTX0_IRQn = 1 , /* UART 0 TX Interrupt */
65
- UARTRX1_IRQn = 2 , /* UART 1 RX Interrupt */
66
- UARTTX1_IRQn = 3 , /* UART 1 TX Interrupt */
67
- UARTRX2_IRQn = 4 , /* UART 2 RX Interrupt */
68
- UARTTX2_IRQn = 5 , /* UART 2 TX Interrupt */
69
- UARTRX3_IRQn = 6 , /* Was PORT0_ALL_IRQn Port 1 combined Interrupt */
70
- UARTTX3_IRQn = 7 , /* Was PORT1_ALL_IRQn Port 1 combined Interrupt */
62
+ /* ---------------------- CMSDK_CM3 Specific Interrupt Numbers ------------------ */
63
+ UART0_IRQn = 0 , /* UART 0 RX and TX Combined Interrupt */
64
+ Spare_IRQn = 1 , /* Undefined */
65
+ UART1_IRQn = 2 , /* UART 1 RX and TX Combined Interrupt */
66
+ I2C0_IRQn = 3 , /* I2C 0 Interrupt */
67
+ I2C1_IRQn = 4 , /* I2C 1 Interrupt */
68
+ RTC_IRQn = 5 , /* RTC Interrupt */
69
+ PORT0_ALL_IRQn = 6 , /* GPIO Port 0 combined Interrupt */
70
+ PORT1_ALL_IRQn = 7 , /* GPIO Port 1 combined Interrupt */
71
71
TIMER0_IRQn = 8 , /* TIMER 0 Interrupt */
72
72
TIMER1_IRQn = 9 , /* TIMER 1 Interrupt */
73
73
DUALTIMER_IRQn = 10 , /* Dual Timer Interrupt */
74
- SPI_IRQn = 11 , /* SPI Interrupt */
74
+ SPI0_IRQn = 11 , /* SPI 0 Interrupt */
75
75
UARTOVF_IRQn = 12 , /* UART 0,1,2 Overflow Interrupt */
76
- ETHERNET_IRQn = 13 , /* Ethernet Interrupt */
77
- I2S_IRQn = 14 , /* I2S Interrupt */
76
+ SPI1_IRQn = 13 , /* SPI 1 Interrupt */
77
+ RESERVED0_IRQn = 14 , /* Reserved */
78
78
TSC_IRQn = 15 , /* Touch Screen Interrupt */
79
- // DMA_IRQn = 15, /* PL230 DMA Done + Error Interrupt */
80
- PORT0_0_IRQn = 16 , /* All P0 I/O pins used as irq source */
81
- PORT0_1_IRQn = 17 , /* There are 16 pins in total */
82
- PORT0_2_IRQn = 18 ,
83
- PORT0_3_IRQn = 19 ,
84
- PORT0_4_IRQn = 20 ,
85
- PORT0_5_IRQn = 21 ,
86
- PORT0_6_IRQn = 22 ,
87
- PORT0_7_IRQn = 23 ,
88
- PORT0_8_IRQn = 24 ,
89
- PORT0_9_IRQn = 25 ,
90
- PORT0_10_IRQn = 26 ,
91
- PORT0_11_IRQn = 27 ,
92
- PORT0_12_IRQn = 28 ,
93
- PORT0_13_IRQn = 29 ,
94
- PORT0_14_IRQn = 30 ,
95
- PORT0_15_IRQn = 31 ,
79
+ PORT01_0_IRQn = 16 , /* GPIO Port 0 pin 0 Handler */
80
+ PORT01_1_IRQn = 17 , /* GPIO Port 0 pin 1 Handler */
81
+ PORT01_2_IRQn = 18 , /* GPIO Port 0 pin 2 Handler */
82
+ PORT01_3_IRQn = 19 , /* GPIO Port 0 pin 3 Handler */
83
+ PORT01_4_IRQn = 20 , /* GPIO Port 0 pin 4 Handler */
84
+ PORT01_5_IRQn = 21 , /* GPIO Port 0 pin 5 Handler */
85
+ PORT01_6_IRQn = 22 , /* GPIO Port 0 pin 6 Handler */
86
+ PORT01_7_IRQn = 23 , /* GPIO Port 0 pin 7 Handler */
87
+ PORT01_8_IRQn = 24 , /* GPIO Port 0 pin 8 Handler */
88
+ PORT01_9_IRQn = 25 , /* GPIO Port 0 pin 9 Handler */
89
+ PORT01_10_IRQn = 26 , /* GPIO Port 0 pin 10 Handler */
90
+ PORT01_11_IRQn = 27 , /* GPIO Port 0 pin 11 Handler */
91
+ PORT01_12_IRQn = 28 , /* GPIO Port 0 pin 12 Handler */
92
+ PORT01_13_IRQn = 29 , /* GPIO Port 0 pin 13 Handler */
93
+ PORT01_14_IRQn = 30 , /* GPIO Port 0 pin 14 Handler */
94
+ PORT01_15_IRQn = 31 , /* GPIO Port 0 pin 15 Handler */
95
+ SYSERROR_IRQn = 32 , /* System Error Interrupt */
96
+ EFLASH_IRQn = 33 , /* Embedded Flash Interrupt */
97
+ RESERVED1_IRQn = 34 , /* Reserved */
98
+ RESERVED2_IRQn = 35 , /* Reserved */
99
+ RESERVED3_IRQn = 36 , /* Reserved */
100
+ RESERVED4_IRQn = 37 , /* Reserved */
101
+ RESERVED5_IRQn = 38 , /* Reserved */
102
+ RESERVED6_IRQn = 39 , /* Reserved */
103
+ RESERVED7_IRQn = 40 , /* Reserved */
104
+ RESERVED8_IRQn = 41 , /* Reserved */
105
+ PORT2_ALL_IRQn = 42 , /* GPIO Port 2 combined Interrupt */
106
+ PORT3_ALL_IRQn = 43 , /* GPIO Port 3 combined Interrupt */
107
+ TRNG_IRQn = 44 , /* Random number generator Interrupt */
108
+ UART2_IRQn = 45 , /* UART 2 RX and TX Combined Interrupt */
109
+ UART3_IRQn = 46 , /* UART 3 RX and TX Combined Interrupt */
110
+ ETHERNET_IRQn = 47 , /* Ethernet interrupt t.b.a. */
111
+ I2S_IRQn = 48 , /* I2S Interrupt */
112
+ MPS2_SPI0_IRQn = 49 , /* SPI Interrupt (spi header) */
113
+ MPS2_SPI1_IRQn = 50 , /* SPI Interrupt (clcd) */
114
+ MPS2_SPI2_IRQn = 51 , /* SPI Interrupt (spi 1 ADC replacement) */
115
+ MPS2_SPI3_IRQn = 52 , /* SPI Interrupt (spi 0 shield 0 replacement) */
116
+ MPS2_SPI4_IRQn = 53 /* SPI Interrupt (shield 1) */
96
117
} IRQn_Type ;
97
118
98
119
@@ -101,7 +122,7 @@ typedef enum IRQn
101
122
/* ================================================================================ */
102
123
103
124
/* -------- Configuration of the Cortex-M3 Processor and Core Peripherals ------- */
104
- #define __CM3_REV 0x0201 /* Core revision r2p1 */
125
+ #define __BEID_REV 0x0201 /* Core revision r2p1 */
105
126
#define __MPU_PRESENT 1 /* MPU present or not */
106
127
#define __NVIC_PRIO_BITS 3 /* Number of Bits used for Priority Levels */
107
128
#define __Vendor_SysTickConfig 0 /* Set to 1 if different SysTick Config is used */
@@ -725,18 +746,19 @@ typedef struct
725
746
#define CMSDK_DUALTIMER_BASE (CMSDK_APB_BASE + 0x2000UL)
726
747
#define CMSDK_DUALTIMER_1_BASE (CMSDK_DUALTIMER_BASE)
727
748
#define CMSDK_DUALTIMER_2_BASE (CMSDK_DUALTIMER_BASE + 0x20UL)
728
- #define CMSDK_UART0_BASE (CMSDK_APB_BASE + 0x5000UL )
729
- #define CMSDK_UART1_BASE (CMSDK_APB_BASE + 0x4000UL )
730
- #define CMSDK_UART2_BASE (CMSDK_APB_BASE + 0x6000UL )
731
- #define CMSDK_UART3_BASE (CMSDK_APB_BASE + 0x7000UL )
749
+ #define CMSDK_UART0_BASE (CMSDK_APB_BASE + 0x4000UL )
750
+ #define CMSDK_UART1_BASE (CMSDK_APB_BASE + 0x5000UL )
751
+ #define CMSDK_UART2_BASE (0x4002C000UL )
752
+ #define CMSDK_UART3_BASE (0x4002D000UL )
732
753
#define CMSDK_WATCHDOG_BASE (CMSDK_APB_BASE + 0x8000UL)
733
- #define CMSDK_PL230_BASE (CMSDK_APB_BASE + 0xF000UL)
734
754
735
755
/* AHB peripherals */
736
756
#define CMSDK_GPIO0_BASE (CMSDK_AHB_BASE + 0x0000UL)
737
757
#define CMSDK_GPIO1_BASE (CMSDK_AHB_BASE + 0x1000UL)
738
758
#define CMSDK_GPIO2_BASE (CMSDK_AHB_BASE + 0x2000UL)
739
759
#define CMSDK_GPIO3_BASE (CMSDK_AHB_BASE + 0x3000UL)
760
+ #define CMSDK_GPIO4_BASE (0x40030000UL)
761
+ #define CMSDK_GPIO5_BASE (0x40031000UL)
740
762
#define CMSDK_SYSCTRL_BASE (CMSDK_AHB_BASE + 0xF000UL)
741
763
742
764
@@ -745,7 +767,7 @@ typedef struct
745
767
/* ================================================================================ */
746
768
747
769
#define CMSDK_UART0 ((CMSDK_UART_TypeDef *) CMSDK_UART0_BASE )
748
- #define CMSDK_UART1 ((CMSDK_UART_TypeDef *) CMSDK_UART1_BASE )
770
+ #define CMSDK_UART1 ((CMSDK_UART_TypeDef *) CMSDK_UART1_BASE )
749
771
#define CMSDK_UART2 ((CMSDK_UART_TypeDef *) CMSDK_UART2_BASE )
750
772
#define CMSDK_UART3 ((CMSDK_UART_TypeDef *) CMSDK_UART3_BASE )
751
773
#define CMSDK_TIMER0 ((CMSDK_TIMER_TypeDef *) CMSDK_TIMER0_BASE )
@@ -754,11 +776,13 @@ typedef struct
754
776
#define CMSDK_DUALTIMER1 ((CMSDK_DUALTIMER_SINGLE_TypeDef *) CMSDK_DUALTIMER_1_BASE )
755
777
#define CMSDK_DUALTIMER2 ((CMSDK_DUALTIMER_SINGLE_TypeDef *) CMSDK_DUALTIMER_2_BASE )
756
778
#define CMSDK_WATCHDOG ((CMSDK_WATCHDOG_TypeDef *) CMSDK_WATCHDOG_BASE )
757
- #define CMSDK_DMA ((CMSDK_PL230_TypeDef *) CMSDK_PL230_BASE )
779
+ // #define CMSDK_DMA ((CMSDK_PL230_TypeDef *) CMSDK_PL230_BASE )
758
780
#define CMSDK_GPIO0 ((CMSDK_GPIO_TypeDef *) CMSDK_GPIO0_BASE )
759
781
#define CMSDK_GPIO1 ((CMSDK_GPIO_TypeDef *) CMSDK_GPIO1_BASE )
760
782
#define CMSDK_GPIO2 ((CMSDK_GPIO_TypeDef *) CMSDK_GPIO2_BASE )
761
783
#define CMSDK_GPIO3 ((CMSDK_GPIO_TypeDef *) CMSDK_GPIO3_BASE )
784
+ #define CMSDK_GPIO4 ((CMSDK_GPIO_TypeDef *) CMSDK_GPIO4_BASE )
785
+ #define CMSDK_GPIO5 ((CMSDK_GPIO_TypeDef *) CMSDK_GPIO5_BASE )
762
786
#define CMSDK_SYSCON ((CMSDK_SYSCON_TypeDef *) CMSDK_SYSCTRL_BASE )
763
787
764
788
0 commit comments