blob: 85416c3c3a8e6ac08fc152dcf42c5c9e84e4e597 [file] [log] [blame]
Joachim Krechbec65e22018-07-20 15:16:37 +02001/*
2 * ARM Limited (ARM) is supplying this software for use with Cortex-M
3 * processor based microcontroller, but can be equally used for other
4 * suitable processor architectures. This file can be freely distributed.
5 * Modifications to this file shall be clearly marked.
6 *
7 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
8 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
9 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
10 * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
11 * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
12 *
Robert Rostoharba96a2c2016-07-01 22:42:12 +020013 * @file ARM_Example.h
Joachim Krechbec65e22018-07-20 15:16:37 +020014 * @brief CMSIS HeaderFile
15 * @version 1.2
16 * @date 20. July 2018
17 * @note Generated by SVDConv V3.3.21 on Friday, 20.07.2018 15:12:22
18 * from File 'ARM_Example.svd',
19 * last modified on Friday, 20.07.2018 13:11:38
20 */
Robert Rostoharba96a2c2016-07-01 22:42:12 +020021
22
23
24/** @addtogroup ARM Ltd.
25 * @{
26 */
27
Joachim Krechbec65e22018-07-20 15:16:37 +020028
Robert Rostoharba96a2c2016-07-01 22:42:12 +020029/** @addtogroup ARM_Example
30 * @{
31 */
32
Joachim Krechbec65e22018-07-20 15:16:37 +020033
Robert Rostoharba96a2c2016-07-01 22:42:12 +020034#ifndef ARM_EXAMPLE_H
35#define ARM_EXAMPLE_H
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41
Robert Rostoharba96a2c2016-07-01 22:42:12 +020042/** @addtogroup Configuration_of_CMSIS
43 * @{
44 */
45
46
Robert Rostoharba96a2c2016-07-01 22:42:12 +020047
Joachim Krechbec65e22018-07-20 15:16:37 +020048/* =========================================================================================================================== */
49/* ================ Interrupt Number Definition ================ */
50/* =========================================================================================================================== */
51
52typedef enum {
53/* ======================================= ARM Cortex-M3 Specific Interrupt Numbers ======================================== */
54 Reset_IRQn = -15, /*!< -15 Reset Vector, invoked on Power up and warm reset */
55 NonMaskableInt_IRQn = -14, /*!< -14 Non maskable Interrupt, cannot be stopped or preempted */
56 HardFault_IRQn = -13, /*!< -13 Hard Fault, all classes of Fault */
57 MemoryManagement_IRQn = -12, /*!< -12 Memory Management, MPU mismatch, including Access Violation
58 and No Match */
59 BusFault_IRQn = -11, /*!< -11 Bus Fault, Pre-Fetch-, Memory Access Fault, other address/memory
60 related Fault */
61 UsageFault_IRQn = -10, /*!< -10 Usage Fault, i.e. Undef Instruction, Illegal State Transition */
62 SVCall_IRQn = -5, /*!< -5 System Service Call via SVC instruction */
63 DebugMonitor_IRQn = -4, /*!< -4 Debug Monitor */
64 PendSV_IRQn = -2, /*!< -2 Pendable request for system service */
65 SysTick_IRQn = -1, /*!< -1 System Tick Timer */
66/* ======================================== ARM_Example Specific Interrupt Numbers ========================================= */
67 TIMER0_IRQn = 0, /*!< 0 Timer 0 interrupt */
68 TIMER1_IRQn = 4, /*!< 4 Timer 2 interrupt */
69 TIMER2_IRQn = 6 /*!< 6 Timer 2 interrupt */
70} IRQn_Type;
71
72
73
74/* =========================================================================================================================== */
75/* ================ Processor and Core Peripheral Section ================ */
76/* =========================================================================================================================== */
77
78/* =========================== Configuration of the ARM Cortex-M3 Processor and Core Peripherals =========================== */
79#define __CM3_REV 0x0100U /*!< CM3 Core Revision */
80#define __NVIC_PRIO_BITS 3 /*!< Number of Bits used for Priority Levels */
81#define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
82#define __MPU_PRESENT 1 /*!< MPU present or not */
83#define __FPU_PRESENT 0 /*!< FPU present or not */
84
85
Robert Rostoharba96a2c2016-07-01 22:42:12 +020086/** @} */ /* End of group Configuration_of_CMSIS */
87
Joachim Krechbec65e22018-07-20 15:16:37 +020088#include "core_cm3.h" /*!< ARM Cortex-M3 processor and core peripherals */
89#include "system_ARM_Example.h" /*!< ARM_Example System */
90
91#ifndef __IM /*!< Fallback for older CMSIS versions */
92 #define __IM __I
93#endif
94#ifndef __OM /*!< Fallback for older CMSIS versions */
95 #define __OM __O
96#endif
97#ifndef __IOM /*!< Fallback for older CMSIS versions */
98 #define __IOM __IO
99#endif
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200100
101
Joachim Krechbec65e22018-07-20 15:16:37 +0200102/* ======================================== Start of section using anonymous unions ======================================== */
103#if defined (__CC_ARM)
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200104 #pragma push
105 #pragma anon_unions
Joachim Krechbec65e22018-07-20 15:16:37 +0200106#elif defined (__ICCARM__)
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200107 #pragma language=extended
Joachim Krechbec65e22018-07-20 15:16:37 +0200108#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
109 #pragma clang diagnostic push
110 #pragma clang diagnostic ignored "-Wc11-extensions"
111 #pragma clang diagnostic ignored "-Wreserved-id-macro"
112 #pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
113 #pragma clang diagnostic ignored "-Wnested-anon-types"
114#elif defined (__GNUC__)
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200115 /* anonymous unions are enabled by default */
Joachim Krechbec65e22018-07-20 15:16:37 +0200116#elif defined (__TMS470__)
117 /* anonymous unions are enabled by default */
118#elif defined (__TASKING__)
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200119 #pragma warning 586
Joachim Krechbec65e22018-07-20 15:16:37 +0200120#elif defined (__CSMC__)
121 /* anonymous unions are enabled by default */
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200122#else
123 #warning Not supported compiler type
124#endif
125
126
Joachim Krechbec65e22018-07-20 15:16:37 +0200127/* =========================================================================================================================== */
128/* ================ Device Specific Peripheral Section ================ */
129/* =========================================================================================================================== */
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200130
Joachim Krechbec65e22018-07-20 15:16:37 +0200131
132/** @addtogroup Device_Peripheral_peripherals
133 * @{
134 */
135
136
137
138/* =========================================================================================================================== */
139/* ================ TIMER0 ================ */
140/* =========================================================================================================================== */
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200141
142
143/**
144 * @brief 32 Timer / Counter, counting up or down from different sources (TIMER0)
145 */
146
Joachim Krechbec65e22018-07-20 15:16:37 +0200147typedef struct { /*!< (@ 0x40010000) TIMER0 Structure */
148 __IOM uint32_t CR; /*!< (@ 0x00000000) Control Register */
149 __IOM uint16_t SR; /*!< (@ 0x00000004) Status Register */
150 __IM uint16_t RESERVED;
151 __IM uint32_t RESERVED1[2];
152 __IOM uint16_t INT; /*!< (@ 0x00000010) Interrupt Register */
153 __IM uint16_t RESERVED2;
154 __IM uint32_t RESERVED3[3];
155 __IOM uint32_t COUNT; /*!< (@ 0x00000020) The Counter Register reflects the actual Value
156 of the Timer/Counter */
157 __IOM uint32_t MATCH; /*!< (@ 0x00000024) The Match Register stores the compare Value for
158 the MATCH condition */
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200159
160 union {
Joachim Krechbec65e22018-07-20 15:16:37 +0200161 __IM uint32_t PRESCALE_RD; /*!< (@ 0x00000028) The Prescale Register stores the Value for the
162 prescaler. The cont event gets divided by
163 this value */
164 __OM uint32_t PRESCALE_WR; /*!< (@ 0x00000028) The Prescale Register stores the Value for the
165 prescaler. The cont event gets divided by
166 this value */
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200167 };
Joachim Krechbec65e22018-07-20 15:16:37 +0200168 __IM uint32_t RESERVED4[9];
169 __IOM uint32_t RELOAD[4]; /*!< (@ 0x00000050) The Reload Register stores the Value the COUNT
170 Register gets reloaded on a when a condition
171 was met. */
172} TIMER0_Type; /*!< Size = 96 (0x60) */
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200173
174
Joachim Krechbec65e22018-07-20 15:16:37 +0200175/** @} */ /* End of group Device_Peripheral_peripherals */
176
177
178/* =========================================================================================================================== */
179/* ================ Device Specific Peripheral Address Map ================ */
180/* =========================================================================================================================== */
181
182
183/** @addtogroup Device_Peripheral_peripheralAddr
184 * @{
185 */
186
187#define TIMER0_BASE 0x40010000UL
188#define TIMER1_BASE 0x40010100UL
189#define TIMER2_BASE 0x40010200UL
190
191/** @} */ /* End of group Device_Peripheral_peripheralAddr */
192
193
194/* =========================================================================================================================== */
195/* ================ Peripheral declaration ================ */
196/* =========================================================================================================================== */
197
198
199/** @addtogroup Device_Peripheral_declaration
200 * @{
201 */
202
203#define TIMER0 ((TIMER0_Type*) TIMER0_BASE)
204#define TIMER1 ((TIMER0_Type*) TIMER1_BASE)
205#define TIMER2 ((TIMER0_Type*) TIMER2_BASE)
206
207/** @} */ /* End of group Device_Peripheral_declaration */
208
209
210/* ========================================= End of section using anonymous unions ========================================= */
211#if defined (__CC_ARM)
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200212 #pragma pop
Joachim Krechbec65e22018-07-20 15:16:37 +0200213#elif defined (__ICCARM__)
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200214 /* leave anonymous unions enabled */
Joachim Krechbec65e22018-07-20 15:16:37 +0200215#elif (__ARMCC_VERSION >= 6010050)
216 #pragma clang diagnostic pop
217#elif defined (__GNUC__)
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200218 /* anonymous unions are enabled by default */
Joachim Krechbec65e22018-07-20 15:16:37 +0200219#elif defined (__TMS470__)
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200220 /* anonymous unions are enabled by default */
Joachim Krechbec65e22018-07-20 15:16:37 +0200221#elif defined (__TASKING__)
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200222 #pragma warning restore
Joachim Krechbec65e22018-07-20 15:16:37 +0200223#elif defined (__CSMC__)
224 /* anonymous unions are enabled by default */
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200225#endif
226
227
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200228#ifdef __cplusplus
229}
230#endif
231
Joachim Krechbec65e22018-07-20 15:16:37 +0200232#endif /* ARM_EXAMPLE_H */
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200233
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200234
Joachim Krechbec65e22018-07-20 15:16:37 +0200235/** @} */ /* End of group ARM_Example */
236
237/** @} */ /* End of group ARM Ltd. */