Change filename and macros from AT91SAM3.. to SAM3.. to conform to Atmel's official...
[bertos.git] / bertos / cpu / cortex-m3 / io / sam3_nvic.h
1 /**
2  * \file
3  * <!--
4  * This file is part of BeRTOS.
5  *
6  * Bertos is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  * As a special exception, you may use this file as part of a free software
21  * library without restriction.  Specifically, if other files instantiate
22  * templates or use macros or inline functions from this file, or you compile
23  * this file and link it with other files to produce an executable, this
24  * file does not by itself cause the resulting executable to be covered by
25  * the GNU General Public License.  This exception does not however
26  * invalidate any other reasons why the executable file might be covered by
27  * the GNU General Public License.
28  *
29  * Copyright 2010 Develer S.r.l. (http://www.develer.com/)
30  *
31  * -->
32  *
33  * \brief Atmel SAM3 NVIC hardware.
34  *
35  * This file does not follow the BeRTOS AT91 register naming convention,
36  * because the NVIC subsystem is in common with other Cortex-M3 ports.
37  * Take care when using bit definition macros, they don't define bit numbers
38  * but values, i.e. you must not use BV().  Moreover register names have
39  * the _R suffix and offsets don't have the _OFF one.
40  * Someday we will fix this incoherence...
41  */
42
43 #ifndef SAM3_NVIC_H
44 #define SAM3_NVIC_H
45
46 /**
47  * The following are defines for the fault assignments.
48  */
49 /*\{*/
50 #define FAULT_NMI               2           ///< NMI fault
51 #define FAULT_HARD              3           ///< Hard fault
52 #define FAULT_MPU               4           ///< MPU fault
53 #define FAULT_BUS               5           ///< Bus fault
54 #define FAULT_USAGE             6           ///< Usage fault
55 #define FAULT_SVCALL            11          ///< SVCall
56 #define FAULT_DEBUG             12          ///< Debug monitor
57 #define FAULT_PENDSV            14          ///< PendSV
58 #define FAULT_SYSTICK           15          ///< System Tick
59 /*\}*/
60
61 /**
62  * NVIC registers (NVIC)
63  */
64 /*\{*/
65 #define NVIC_INT_TYPE_R         (*((reg32_t *)0xE000E004))
66 #define NVIC_ST_CTRL_R          (*((reg32_t *)0xE000E010))
67 #define NVIC_ST_RELOAD_R        (*((reg32_t *)0xE000E014))
68 #define NVIC_ST_CURRENT_R       (*((reg32_t *)0xE000E018))
69 #define NVIC_ST_CAL_R           (*((reg32_t *)0xE000E01C))
70 #define NVIC_EN0_R              (*((reg32_t *)0xE000E100))
71 #define NVIC_EN1_R              (*((reg32_t *)0xE000E104))
72 #define NVIC_DIS0_R             (*((reg32_t *)0xE000E180))
73 #define NVIC_DIS1_R             (*((reg32_t *)0xE000E184))
74 #define NVIC_PEND0_R            (*((reg32_t *)0xE000E200))
75 #define NVIC_PEND1_R            (*((reg32_t *)0xE000E204))
76 #define NVIC_UNPEND0_R          (*((reg32_t *)0xE000E280))
77 #define NVIC_UNPEND1_R          (*((reg32_t *)0xE000E284))
78 #define NVIC_ACTIVE0_R          (*((reg32_t *)0xE000E300))
79 #define NVIC_ACTIVE1_R          (*((reg32_t *)0xE000E304))
80 #define NVIC_PRI0_R             (*((reg32_t *)0xE000E400))
81 #define NVIC_PRI1_R             (*((reg32_t *)0xE000E404))
82 #define NVIC_PRI2_R             (*((reg32_t *)0xE000E408))
83 #define NVIC_PRI3_R             (*((reg32_t *)0xE000E40C))
84 #define NVIC_PRI4_R             (*((reg32_t *)0xE000E410))
85 #define NVIC_PRI5_R             (*((reg32_t *)0xE000E414))
86 #define NVIC_PRI6_R             (*((reg32_t *)0xE000E418))
87 #define NVIC_PRI7_R             (*((reg32_t *)0xE000E41C))
88 #define NVIC_PRI8_R             (*((reg32_t *)0xE000E420))
89 #define NVIC_PRI9_R             (*((reg32_t *)0xE000E424))
90 #define NVIC_PRI10_R            (*((reg32_t *)0xE000E428))
91 #define NVIC_CPUID_R            (*((reg32_t *)0xE000ED00))
92 #define NVIC_INT_CTRL_R         (*((reg32_t *)0xE000ED04))
93 #define NVIC_VTABLE_R           (*((reg32_t *)0xE000ED08))
94 #define NVIC_APINT_R            (*((reg32_t *)0xE000ED0C))
95 #define NVIC_SYS_CTRL_R         (*((reg32_t *)0xE000ED10))
96 #define NVIC_CFG_CTRL_R         (*((reg32_t *)0xE000ED14))
97 #define NVIC_SYS_PRI1_R         (*((reg32_t *)0xE000ED18))
98 #define NVIC_SYS_PRI2_R         (*((reg32_t *)0xE000ED1C))
99 #define NVIC_SYS_PRI3_R         (*((reg32_t *)0xE000ED20))
100 #define NVIC_SYS_HND_CTRL_R     (*((reg32_t *)0xE000ED24))
101 #define NVIC_FAULT_STAT_R       (*((reg32_t *)0xE000ED28))
102 #define NVIC_HFAULT_STAT_R      (*((reg32_t *)0xE000ED2C))
103 #define NVIC_DEBUG_STAT_R       (*((reg32_t *)0xE000ED30))
104 #define NVIC_MM_ADDR_R          (*((reg32_t *)0xE000ED34))
105 #define NVIC_FAULT_ADDR_R       (*((reg32_t *)0xE000ED38))
106 #define NVIC_MPU_TYPE_R         (*((reg32_t *)0xE000ED90))
107 #define NVIC_MPU_CTRL_R         (*((reg32_t *)0xE000ED94))
108 #define NVIC_MPU_NUMBER_R       (*((reg32_t *)0xE000ED98))
109 #define NVIC_MPU_BASE_R         (*((reg32_t *)0xE000ED9C))
110 #define NVIC_MPU_ATTR_R         (*((reg32_t *)0xE000EDA0))
111 #define NVIC_DBG_CTRL_R         (*((reg32_t *)0xE000EDF0))
112 #define NVIC_DBG_XFER_R         (*((reg32_t *)0xE000EDF4))
113 #define NVIC_DBG_DATA_R         (*((reg32_t *)0xE000EDF8))
114 #define NVIC_DBG_INT_R          (*((reg32_t *)0xE000EDFC))
115 #define NVIC_SW_TRIG_R          (*((reg32_t *)0xE000EF00))
116 /*\}*/
117
118 /**
119  * The following are defines for the NVIC register addresses.
120  */
121 /*\{*/
122 #define NVIC_INT_TYPE           0xE000E004  ///< Interrupt Controller Type Reg
123 #define NVIC_ST_CTRL            0xE000E010  ///< SysTick Control and Status Reg
124 #define NVIC_ST_RELOAD          0xE000E014  ///< SysTick Reload Value Register
125 #define NVIC_ST_CURRENT         0xE000E018  ///< SysTick Current Value Register
126 #define NVIC_ST_CAL             0xE000E01C  ///< SysTick Calibration Value Reg
127 #define NVIC_EN0                0xE000E100  ///< IRQ 0 to 31 Set Enable Register
128 #define NVIC_EN1                0xE000E104  ///< IRQ 32 to 63 Set Enable Register
129 #define NVIC_DIS0               0xE000E180  ///< IRQ 0 to 31 Clear Enable Reg
130 #define NVIC_DIS1               0xE000E184  ///< IRQ 32 to 63 Clear Enable Reg
131 #define NVIC_PEND0              0xE000E200  ///< IRQ 0 to 31 Set Pending Register
132 #define NVIC_PEND1              0xE000E204  ///< IRQ 32 to 63 Set Pending Reg
133 #define NVIC_UNPEND0            0xE000E280  ///< IRQ 0 to 31 Clear Pending Reg
134 #define NVIC_UNPEND1            0xE000E284  ///< IRQ 32 to 63 Clear Pending Reg
135 #define NVIC_ACTIVE0            0xE000E300  ///< IRQ 0 to 31 Active Register
136 #define NVIC_ACTIVE1            0xE000E304  ///< IRQ 32 to 63 Active Register
137 #define NVIC_PRI0               0xE000E400  ///< IRQ 0 to 3 Priority Register
138 #define NVIC_PRI1               0xE000E404  ///< IRQ 4 to 7 Priority Register
139 #define NVIC_PRI2               0xE000E408  ///< IRQ 8 to 11 Priority Register
140 #define NVIC_PRI3               0xE000E40C  ///< IRQ 12 to 15 Priority Register
141 #define NVIC_PRI4               0xE000E410  ///< IRQ 16 to 19 Priority Register
142 #define NVIC_PRI5               0xE000E414  ///< IRQ 20 to 23 Priority Register
143 #define NVIC_PRI6               0xE000E418  ///< IRQ 24 to 27 Priority Register
144 #define NVIC_PRI7               0xE000E41C  ///< IRQ 28 to 31 Priority Register
145 #define NVIC_PRI8               0xE000E420  ///< IRQ 32 to 35 Priority Register
146 #define NVIC_PRI9               0xE000E424  ///< IRQ 36 to 39 Priority Register
147 #define NVIC_PRI10              0xE000E428  ///< IRQ 40 to 43 Priority Register
148 #define NVIC_PRI11              0xE000E42C  ///< IRQ 44 to 47 Priority Register
149 #define NVIC_PRI12              0xE000E430  ///< IRQ 48 to 51 Priority Register
150 #define NVIC_PRI13              0xE000E434  ///< IRQ 52 to 55 Priority Register
151 #define NVIC_CPUID              0xE000ED00  ///< CPUID Base Register
152 #define NVIC_INT_CTRL           0xE000ED04  ///< Interrupt Control State Register
153 #define NVIC_VTABLE             0xE000ED08  ///< Vector Table Offset Register
154 #define NVIC_APINT              0xE000ED0C  ///< App. Int & Reset Control Reg
155 #define NVIC_SYS_CTRL           0xE000ED10  ///< System Control Register
156 #define NVIC_CFG_CTRL           0xE000ED14  ///< Configuration Control Register
157 #define NVIC_SYS_PRI1           0xE000ED18  ///< Sys. Handlers 4 to 7 Priority
158 #define NVIC_SYS_PRI2           0xE000ED1C  ///< Sys. Handlers 8 to 11 Priority
159 #define NVIC_SYS_PRI3           0xE000ED20  ///< Sys. Handlers 12 to 15 Priority
160 #define NVIC_SYS_HND_CTRL       0xE000ED24  ///< System Handler Control and State
161 #define NVIC_FAULT_STAT         0xE000ED28  ///< Configurable Fault Status Reg
162 #define NVIC_HFAULT_STAT        0xE000ED2C  ///< Hard Fault Status Register
163 #define NVIC_DEBUG_STAT         0xE000ED30  ///< Debug Status Register
164 #define NVIC_MM_ADDR            0xE000ED34  ///< Mem Manage Address Register
165 #define NVIC_FAULT_ADDR         0xE000ED38  ///< Bus Fault Address Register
166 #define NVIC_MPU_TYPE           0xE000ED90  ///< MPU Type Register
167 #define NVIC_MPU_CTRL           0xE000ED94  ///< MPU Control Register
168 #define NVIC_MPU_NUMBER         0xE000ED98  ///< MPU Region Number Register
169 #define NVIC_MPU_BASE           0xE000ED9C  ///< MPU Region Base Address Register
170 #define NVIC_MPU_ATTR           0xE000EDA0  ///< MPU Region Attribute & Size Reg
171 #define NVIC_DBG_CTRL           0xE000EDF0  ///< Debug Control and Status Reg
172 #define NVIC_DBG_XFER           0xE000EDF4  ///< Debug Core Reg. Transfer Select
173 #define NVIC_DBG_DATA           0xE000EDF8  ///< Debug Core Register Data
174 #define NVIC_DBG_INT            0xE000EDFC  ///< Debug Reset Interrupt Control
175 #define NVIC_SW_TRIG            0xE000EF00  ///< Software Trigger Interrupt Reg
176 /*\}*/
177
178 /**
179  * The following are defines for the bit fields in the NVIC_INT_TYPE register.
180  */
181 /*\{*/
182 #define NVIC_INT_TYPE_LINES_M   0x0000001F  ///< Number of interrupt lines (x32)
183 #define NVIC_INT_TYPE_LINES_S   0
184 /*\}*/
185
186 /**
187  * The following are defines for the bit fields in the NVIC_ST_CTRL register.
188  */
189 /*\{*/
190 #define NVIC_ST_CTRL_COUNT      0x00010000  ///< Count flag
191 #define NVIC_ST_CTRL_CLK_SRC    0x00000004  ///< Clock Source
192 #define NVIC_ST_CTRL_INTEN      0x00000002  ///< Interrupt enable
193 #define NVIC_ST_CTRL_ENABLE     0x00000001  ///< Counter mode
194 /*\}*/
195
196 /**
197  * The following are defines for the bit fields in the NVIC_ST_RELOAD register.
198  */
199 /*\{*/
200 #define NVIC_ST_RELOAD_M        0x00FFFFFF  ///< Counter load value
201 #define NVIC_ST_RELOAD_S        0
202 /*\}*/
203
204 /**
205  * The following are defines for the bit fields in the NVIC_ST_CURRENT
206  * register.
207  */
208 /*\{*/
209 #define NVIC_ST_CURRENT_M       0x00FFFFFF  ///< Counter current value
210 #define NVIC_ST_CURRENT_S       0
211 /*\}*/
212
213 /**
214  * The following are defines for the bit fields in the NVIC_ST_CAL register.
215  */
216 /*\{*/
217 #define NVIC_ST_CAL_NOREF       0x80000000  ///< No reference clock
218 #define NVIC_ST_CAL_SKEW        0x40000000  ///< Clock skew
219 #define NVIC_ST_CAL_ONEMS_M     0x00FFFFFF  ///< 1ms reference value
220 #define NVIC_ST_CAL_ONEMS_S     0
221 /*\}*/
222
223 /**
224  * The following are defines for the bit fields in the NVIC_EN0 register.
225  */
226 /*\{*/
227 #define NVIC_EN0_INT31          0x80000000  ///< Interrupt 31 enable
228 #define NVIC_EN0_INT30          0x40000000  ///< Interrupt 30 enable
229 #define NVIC_EN0_INT29          0x20000000  ///< Interrupt 29 enable
230 #define NVIC_EN0_INT28          0x10000000  ///< Interrupt 28 enable
231 #define NVIC_EN0_INT27          0x08000000  ///< Interrupt 27 enable
232 #define NVIC_EN0_INT26          0x04000000  ///< Interrupt 26 enable
233 #define NVIC_EN0_INT25          0x02000000  ///< Interrupt 25 enable
234 #define NVIC_EN0_INT24          0x01000000  ///< Interrupt 24 enable
235 #define NVIC_EN0_INT23          0x00800000  ///< Interrupt 23 enable
236 #define NVIC_EN0_INT22          0x00400000  ///< Interrupt 22 enable
237 #define NVIC_EN0_INT21          0x00200000  ///< Interrupt 21 enable
238 #define NVIC_EN0_INT20          0x00100000  ///< Interrupt 20 enable
239 #define NVIC_EN0_INT19          0x00080000  ///< Interrupt 19 enable
240 #define NVIC_EN0_INT18          0x00040000  ///< Interrupt 18 enable
241 #define NVIC_EN0_INT17          0x00020000  ///< Interrupt 17 enable
242 #define NVIC_EN0_INT16          0x00010000  ///< Interrupt 16 enable
243 #define NVIC_EN0_INT15          0x00008000  ///< Interrupt 15 enable
244 #define NVIC_EN0_INT14          0x00004000  ///< Interrupt 14 enable
245 #define NVIC_EN0_INT13          0x00002000  ///< Interrupt 13 enable
246 #define NVIC_EN0_INT12          0x00001000  ///< Interrupt 12 enable
247 #define NVIC_EN0_INT11          0x00000800  ///< Interrupt 11 enable
248 #define NVIC_EN0_INT10          0x00000400  ///< Interrupt 10 enable
249 #define NVIC_EN0_INT9           0x00000200  ///< Interrupt 9 enable
250 #define NVIC_EN0_INT8           0x00000100  ///< Interrupt 8 enable
251 #define NVIC_EN0_INT7           0x00000080  ///< Interrupt 7 enable
252 #define NVIC_EN0_INT6           0x00000040  ///< Interrupt 6 enable
253 #define NVIC_EN0_INT5           0x00000020  ///< Interrupt 5 enable
254 #define NVIC_EN0_INT4           0x00000010  ///< Interrupt 4 enable
255 #define NVIC_EN0_INT3           0x00000008  ///< Interrupt 3 enable
256 #define NVIC_EN0_INT2           0x00000004  ///< Interrupt 2 enable
257 #define NVIC_EN0_INT1           0x00000002  ///< Interrupt 1 enable
258 #define NVIC_EN0_INT0           0x00000001  ///< Interrupt 0 enable
259 /*\}*/
260
261 /**
262  * The following are defines for the bit fields in the NVIC_EN1 register.
263  */
264 /*\{*/
265 #define NVIC_EN1_INT59          0x08000000  ///< Interrupt 59 enable
266 #define NVIC_EN1_INT58          0x04000000  ///< Interrupt 58 enable
267 #define NVIC_EN1_INT57          0x02000000  ///< Interrupt 57 enable
268 #define NVIC_EN1_INT56          0x01000000  ///< Interrupt 56 enable
269 #define NVIC_EN1_INT55          0x00800000  ///< Interrupt 55 enable
270 #define NVIC_EN1_INT54          0x00400000  ///< Interrupt 54 enable
271 #define NVIC_EN1_INT53          0x00200000  ///< Interrupt 53 enable
272 #define NVIC_EN1_INT52          0x00100000  ///< Interrupt 52 enable
273 #define NVIC_EN1_INT51          0x00080000  ///< Interrupt 51 enable
274 #define NVIC_EN1_INT50          0x00040000  ///< Interrupt 50 enable
275 #define NVIC_EN1_INT49          0x00020000  ///< Interrupt 49 enable
276 #define NVIC_EN1_INT48          0x00010000  ///< Interrupt 48 enable
277 #define NVIC_EN1_INT47          0x00008000  ///< Interrupt 47 enable
278 #define NVIC_EN1_INT46          0x00004000  ///< Interrupt 46 enable
279 #define NVIC_EN1_INT45          0x00002000  ///< Interrupt 45 enable
280 #define NVIC_EN1_INT44          0x00001000  ///< Interrupt 44 enable
281 #define NVIC_EN1_INT43          0x00000800  ///< Interrupt 43 enable
282 #define NVIC_EN1_INT42          0x00000400  ///< Interrupt 42 enable
283 #define NVIC_EN1_INT41          0x00000200  ///< Interrupt 41 enable
284 #define NVIC_EN1_INT40          0x00000100  ///< Interrupt 40 enable
285 #define NVIC_EN1_INT39          0x00000080  ///< Interrupt 39 enable
286 #define NVIC_EN1_INT38          0x00000040  ///< Interrupt 38 enable
287 #define NVIC_EN1_INT37          0x00000020  ///< Interrupt 37 enable
288 #define NVIC_EN1_INT36          0x00000010  ///< Interrupt 36 enable
289 #define NVIC_EN1_INT35          0x00000008  ///< Interrupt 35 enable
290 #define NVIC_EN1_INT34          0x00000004  ///< Interrupt 34 enable
291 #define NVIC_EN1_INT33          0x00000002  ///< Interrupt 33 enable
292 #define NVIC_EN1_INT32          0x00000001  ///< Interrupt 32 enable
293 /*\}*/
294
295 /**
296  * The following are defines for the bit fields in the NVIC_DIS0 register.
297  */
298 /*\{*/
299 #define NVIC_DIS0_INT31         0x80000000  ///< Interrupt 31 disable
300 #define NVIC_DIS0_INT30         0x40000000  ///< Interrupt 30 disable
301 #define NVIC_DIS0_INT29         0x20000000  ///< Interrupt 29 disable
302 #define NVIC_DIS0_INT28         0x10000000  ///< Interrupt 28 disable
303 #define NVIC_DIS0_INT27         0x08000000  ///< Interrupt 27 disable
304 #define NVIC_DIS0_INT26         0x04000000  ///< Interrupt 26 disable
305 #define NVIC_DIS0_INT25         0x02000000  ///< Interrupt 25 disable
306 #define NVIC_DIS0_INT24         0x01000000  ///< Interrupt 24 disable
307 #define NVIC_DIS0_INT23         0x00800000  ///< Interrupt 23 disable
308 #define NVIC_DIS0_INT22         0x00400000  ///< Interrupt 22 disable
309 #define NVIC_DIS0_INT21         0x00200000  ///< Interrupt 21 disable
310 #define NVIC_DIS0_INT20         0x00100000  ///< Interrupt 20 disable
311 #define NVIC_DIS0_INT19         0x00080000  ///< Interrupt 19 disable
312 #define NVIC_DIS0_INT18         0x00040000  ///< Interrupt 18 disable
313 #define NVIC_DIS0_INT17         0x00020000  ///< Interrupt 17 disable
314 #define NVIC_DIS0_INT16         0x00010000  ///< Interrupt 16 disable
315 #define NVIC_DIS0_INT15         0x00008000  ///< Interrupt 15 disable
316 #define NVIC_DIS0_INT14         0x00004000  ///< Interrupt 14 disable
317 #define NVIC_DIS0_INT13         0x00002000  ///< Interrupt 13 disable
318 #define NVIC_DIS0_INT12         0x00001000  ///< Interrupt 12 disable
319 #define NVIC_DIS0_INT11         0x00000800  ///< Interrupt 11 disable
320 #define NVIC_DIS0_INT10         0x00000400  ///< Interrupt 10 disable
321 #define NVIC_DIS0_INT9          0x00000200  ///< Interrupt 9 disable
322 #define NVIC_DIS0_INT8          0x00000100  ///< Interrupt 8 disable
323 #define NVIC_DIS0_INT7          0x00000080  ///< Interrupt 7 disable
324 #define NVIC_DIS0_INT6          0x00000040  ///< Interrupt 6 disable
325 #define NVIC_DIS0_INT5          0x00000020  ///< Interrupt 5 disable
326 #define NVIC_DIS0_INT4          0x00000010  ///< Interrupt 4 disable
327 #define NVIC_DIS0_INT3          0x00000008  ///< Interrupt 3 disable
328 #define NVIC_DIS0_INT2          0x00000004  ///< Interrupt 2 disable
329 #define NVIC_DIS0_INT1          0x00000002  ///< Interrupt 1 disable
330 #define NVIC_DIS0_INT0          0x00000001  ///< Interrupt 0 disable
331 /*\}*/
332
333 /**
334  * The following are defines for the bit fields in the NVIC_DIS1 register.
335  */
336 /*\{*/
337 #define NVIC_DIS1_INT59         0x08000000  ///< Interrupt 59 disable
338 #define NVIC_DIS1_INT58         0x04000000  ///< Interrupt 58 disable
339 #define NVIC_DIS1_INT57         0x02000000  ///< Interrupt 57 disable
340 #define NVIC_DIS1_INT56         0x01000000  ///< Interrupt 56 disable
341 #define NVIC_DIS1_INT55         0x00800000  ///< Interrupt 55 disable
342 #define NVIC_DIS1_INT54         0x00400000  ///< Interrupt 54 disable
343 #define NVIC_DIS1_INT53         0x00200000  ///< Interrupt 53 disable
344 #define NVIC_DIS1_INT52         0x00100000  ///< Interrupt 52 disable
345 #define NVIC_DIS1_INT51         0x00080000  ///< Interrupt 51 disable
346 #define NVIC_DIS1_INT50         0x00040000  ///< Interrupt 50 disable
347 #define NVIC_DIS1_INT49         0x00020000  ///< Interrupt 49 disable
348 #define NVIC_DIS1_INT48         0x00010000  ///< Interrupt 48 disable
349 #define NVIC_DIS1_INT47         0x00008000  ///< Interrupt 47 disable
350 #define NVIC_DIS1_INT46         0x00004000  ///< Interrupt 46 disable
351 #define NVIC_DIS1_INT45         0x00002000  ///< Interrupt 45 disable
352 #define NVIC_DIS1_INT44         0x00001000  ///< Interrupt 44 disable
353 #define NVIC_DIS1_INT43         0x00000800  ///< Interrupt 43 disable
354 #define NVIC_DIS1_INT42         0x00000400  ///< Interrupt 42 disable
355 #define NVIC_DIS1_INT41         0x00000200  ///< Interrupt 41 disable
356 #define NVIC_DIS1_INT40         0x00000100  ///< Interrupt 40 disable
357 #define NVIC_DIS1_INT39         0x00000080  ///< Interrupt 39 disable
358 #define NVIC_DIS1_INT38         0x00000040  ///< Interrupt 38 disable
359 #define NVIC_DIS1_INT37         0x00000020  ///< Interrupt 37 disable
360 #define NVIC_DIS1_INT36         0x00000010  ///< Interrupt 36 disable
361 #define NVIC_DIS1_INT35         0x00000008  ///< Interrupt 35 disable
362 #define NVIC_DIS1_INT34         0x00000004  ///< Interrupt 34 disable
363 #define NVIC_DIS1_INT33         0x00000002  ///< Interrupt 33 disable
364 #define NVIC_DIS1_INT32         0x00000001  ///< Interrupt 32 disable
365 /*\}*/
366
367 /**
368  * The following are defines for the bit fields in the NVIC_PEND0 register.
369  */
370 /*\{*/
371 #define NVIC_PEND0_INT31        0x80000000  ///< Interrupt 31 pend
372 #define NVIC_PEND0_INT30        0x40000000  ///< Interrupt 30 pend
373 #define NVIC_PEND0_INT29        0x20000000  ///< Interrupt 29 pend
374 #define NVIC_PEND0_INT28        0x10000000  ///< Interrupt 28 pend
375 #define NVIC_PEND0_INT27        0x08000000  ///< Interrupt 27 pend
376 #define NVIC_PEND0_INT26        0x04000000  ///< Interrupt 26 pend
377 #define NVIC_PEND0_INT25        0x02000000  ///< Interrupt 25 pend
378 #define NVIC_PEND0_INT24        0x01000000  ///< Interrupt 24 pend
379 #define NVIC_PEND0_INT23        0x00800000  ///< Interrupt 23 pend
380 #define NVIC_PEND0_INT22        0x00400000  ///< Interrupt 22 pend
381 #define NVIC_PEND0_INT21        0x00200000  ///< Interrupt 21 pend
382 #define NVIC_PEND0_INT20        0x00100000  ///< Interrupt 20 pend
383 #define NVIC_PEND0_INT19        0x00080000  ///< Interrupt 19 pend
384 #define NVIC_PEND0_INT18        0x00040000  ///< Interrupt 18 pend
385 #define NVIC_PEND0_INT17        0x00020000  ///< Interrupt 17 pend
386 #define NVIC_PEND0_INT16        0x00010000  ///< Interrupt 16 pend
387 #define NVIC_PEND0_INT15        0x00008000  ///< Interrupt 15 pend
388 #define NVIC_PEND0_INT14        0x00004000  ///< Interrupt 14 pend
389 #define NVIC_PEND0_INT13        0x00002000  ///< Interrupt 13 pend
390 #define NVIC_PEND0_INT12        0x00001000  ///< Interrupt 12 pend
391 #define NVIC_PEND0_INT11        0x00000800  ///< Interrupt 11 pend
392 #define NVIC_PEND0_INT10        0x00000400  ///< Interrupt 10 pend
393 #define NVIC_PEND0_INT9         0x00000200  ///< Interrupt 9 pend
394 #define NVIC_PEND0_INT8         0x00000100  ///< Interrupt 8 pend
395 #define NVIC_PEND0_INT7         0x00000080  ///< Interrupt 7 pend
396 #define NVIC_PEND0_INT6         0x00000040  ///< Interrupt 6 pend
397 #define NVIC_PEND0_INT5         0x00000020  ///< Interrupt 5 pend
398 #define NVIC_PEND0_INT4         0x00000010  ///< Interrupt 4 pend
399 #define NVIC_PEND0_INT3         0x00000008  ///< Interrupt 3 pend
400 #define NVIC_PEND0_INT2         0x00000004  ///< Interrupt 2 pend
401 #define NVIC_PEND0_INT1         0x00000002  ///< Interrupt 1 pend
402 #define NVIC_PEND0_INT0         0x00000001  ///< Interrupt 0 pend
403 /*\}*/
404
405 /**
406  * The following are defines for the bit fields in the NVIC_PEND1 register.
407  */
408 /*\{*/
409 #define NVIC_PEND1_INT59        0x08000000  ///< Interrupt 59 pend
410 #define NVIC_PEND1_INT58        0x04000000  ///< Interrupt 58 pend
411 #define NVIC_PEND1_INT57        0x02000000  ///< Interrupt 57 pend
412 #define NVIC_PEND1_INT56        0x01000000  ///< Interrupt 56 pend
413 #define NVIC_PEND1_INT55        0x00800000  ///< Interrupt 55 pend
414 #define NVIC_PEND1_INT54        0x00400000  ///< Interrupt 54 pend
415 #define NVIC_PEND1_INT53        0x00200000  ///< Interrupt 53 pend
416 #define NVIC_PEND1_INT52        0x00100000  ///< Interrupt 52 pend
417 #define NVIC_PEND1_INT51        0x00080000  ///< Interrupt 51 pend
418 #define NVIC_PEND1_INT50        0x00040000  ///< Interrupt 50 pend
419 #define NVIC_PEND1_INT49        0x00020000  ///< Interrupt 49 pend
420 #define NVIC_PEND1_INT48        0x00010000  ///< Interrupt 48 pend
421 #define NVIC_PEND1_INT47        0x00008000  ///< Interrupt 47 pend
422 #define NVIC_PEND1_INT46        0x00004000  ///< Interrupt 46 pend
423 #define NVIC_PEND1_INT45        0x00002000  ///< Interrupt 45 pend
424 #define NVIC_PEND1_INT44        0x00001000  ///< Interrupt 44 pend
425 #define NVIC_PEND1_INT43        0x00000800  ///< Interrupt 43 pend
426 #define NVIC_PEND1_INT42        0x00000400  ///< Interrupt 42 pend
427 #define NVIC_PEND1_INT41        0x00000200  ///< Interrupt 41 pend
428 #define NVIC_PEND1_INT40        0x00000100  ///< Interrupt 40 pend
429 #define NVIC_PEND1_INT39        0x00000080  ///< Interrupt 39 pend
430 #define NVIC_PEND1_INT38        0x00000040  ///< Interrupt 38 pend
431 #define NVIC_PEND1_INT37        0x00000020  ///< Interrupt 37 pend
432 #define NVIC_PEND1_INT36        0x00000010  ///< Interrupt 36 pend
433 #define NVIC_PEND1_INT35        0x00000008  ///< Interrupt 35 pend
434 #define NVIC_PEND1_INT34        0x00000004  ///< Interrupt 34 pend
435 #define NVIC_PEND1_INT33        0x00000002  ///< Interrupt 33 pend
436 #define NVIC_PEND1_INT32        0x00000001  ///< Interrupt 32 pend
437 /*\}*/
438
439 /**
440  * The following are defines for the bit fields in the NVIC_UNPEND0 register.
441  */
442 /*\{*/
443 #define NVIC_UNPEND0_INT31      0x80000000  ///< Interrupt 31 unpend
444 #define NVIC_UNPEND0_INT30      0x40000000  ///< Interrupt 30 unpend
445 #define NVIC_UNPEND0_INT29      0x20000000  ///< Interrupt 29 unpend
446 #define NVIC_UNPEND0_INT28      0x10000000  ///< Interrupt 28 unpend
447 #define NVIC_UNPEND0_INT27      0x08000000  ///< Interrupt 27 unpend
448 #define NVIC_UNPEND0_INT26      0x04000000  ///< Interrupt 26 unpend
449 #define NVIC_UNPEND0_INT25      0x02000000  ///< Interrupt 25 unpend
450 #define NVIC_UNPEND0_INT24      0x01000000  ///< Interrupt 24 unpend
451 #define NVIC_UNPEND0_INT23      0x00800000  ///< Interrupt 23 unpend
452 #define NVIC_UNPEND0_INT22      0x00400000  ///< Interrupt 22 unpend
453 #define NVIC_UNPEND0_INT21      0x00200000  ///< Interrupt 21 unpend
454 #define NVIC_UNPEND0_INT20      0x00100000  ///< Interrupt 20 unpend
455 #define NVIC_UNPEND0_INT19      0x00080000  ///< Interrupt 19 unpend
456 #define NVIC_UNPEND0_INT18      0x00040000  ///< Interrupt 18 unpend
457 #define NVIC_UNPEND0_INT17      0x00020000  ///< Interrupt 17 unpend
458 #define NVIC_UNPEND0_INT16      0x00010000  ///< Interrupt 16 unpend
459 #define NVIC_UNPEND0_INT15      0x00008000  ///< Interrupt 15 unpend
460 #define NVIC_UNPEND0_INT14      0x00004000  ///< Interrupt 14 unpend
461 #define NVIC_UNPEND0_INT13      0x00002000  ///< Interrupt 13 unpend
462 #define NVIC_UNPEND0_INT12      0x00001000  ///< Interrupt 12 unpend
463 #define NVIC_UNPEND0_INT11      0x00000800  ///< Interrupt 11 unpend
464 #define NVIC_UNPEND0_INT10      0x00000400  ///< Interrupt 10 unpend
465 #define NVIC_UNPEND0_INT9       0x00000200  ///< Interrupt 9 unpend
466 #define NVIC_UNPEND0_INT8       0x00000100  ///< Interrupt 8 unpend
467 #define NVIC_UNPEND0_INT7       0x00000080  ///< Interrupt 7 unpend
468 #define NVIC_UNPEND0_INT6       0x00000040  ///< Interrupt 6 unpend
469 #define NVIC_UNPEND0_INT5       0x00000020  ///< Interrupt 5 unpend
470 #define NVIC_UNPEND0_INT4       0x00000010  ///< Interrupt 4 unpend
471 #define NVIC_UNPEND0_INT3       0x00000008  ///< Interrupt 3 unpend
472 #define NVIC_UNPEND0_INT2       0x00000004  ///< Interrupt 2 unpend
473 #define NVIC_UNPEND0_INT1       0x00000002  ///< Interrupt 1 unpend
474 #define NVIC_UNPEND0_INT0       0x00000001  ///< Interrupt 0 unpend
475 /*\}*/
476
477 /**
478  * The following are defines for the bit fields in the NVIC_UNPEND1 register.
479  */
480 /*\{*/
481 #define NVIC_UNPEND1_INT59      0x08000000  ///< Interrupt 59 unpend
482 #define NVIC_UNPEND1_INT58      0x04000000  ///< Interrupt 58 unpend
483 #define NVIC_UNPEND1_INT57      0x02000000  ///< Interrupt 57 unpend
484 #define NVIC_UNPEND1_INT56      0x01000000  ///< Interrupt 56 unpend
485 #define NVIC_UNPEND1_INT55      0x00800000  ///< Interrupt 55 unpend
486 #define NVIC_UNPEND1_INT54      0x00400000  ///< Interrupt 54 unpend
487 #define NVIC_UNPEND1_INT53      0x00200000  ///< Interrupt 53 unpend
488 #define NVIC_UNPEND1_INT52      0x00100000  ///< Interrupt 52 unpend
489 #define NVIC_UNPEND1_INT51      0x00080000  ///< Interrupt 51 unpend
490 #define NVIC_UNPEND1_INT50      0x00040000  ///< Interrupt 50 unpend
491 #define NVIC_UNPEND1_INT49      0x00020000  ///< Interrupt 49 unpend
492 #define NVIC_UNPEND1_INT48      0x00010000  ///< Interrupt 48 unpend
493 #define NVIC_UNPEND1_INT47      0x00008000  ///< Interrupt 47 unpend
494 #define NVIC_UNPEND1_INT46      0x00004000  ///< Interrupt 46 unpend
495 #define NVIC_UNPEND1_INT45      0x00002000  ///< Interrupt 45 unpend
496 #define NVIC_UNPEND1_INT44      0x00001000  ///< Interrupt 44 unpend
497 #define NVIC_UNPEND1_INT43      0x00000800  ///< Interrupt 43 unpend
498 #define NVIC_UNPEND1_INT42      0x00000400  ///< Interrupt 42 unpend
499 #define NVIC_UNPEND1_INT41      0x00000200  ///< Interrupt 41 unpend
500 #define NVIC_UNPEND1_INT40      0x00000100  ///< Interrupt 40 unpend
501 #define NVIC_UNPEND1_INT39      0x00000080  ///< Interrupt 39 unpend
502 #define NVIC_UNPEND1_INT38      0x00000040  ///< Interrupt 38 unpend
503 #define NVIC_UNPEND1_INT37      0x00000020  ///< Interrupt 37 unpend
504 #define NVIC_UNPEND1_INT36      0x00000010  ///< Interrupt 36 unpend
505 #define NVIC_UNPEND1_INT35      0x00000008  ///< Interrupt 35 unpend
506 #define NVIC_UNPEND1_INT34      0x00000004  ///< Interrupt 34 unpend
507 #define NVIC_UNPEND1_INT33      0x00000002  ///< Interrupt 33 unpend
508 #define NVIC_UNPEND1_INT32      0x00000001  ///< Interrupt 32 unpend
509 /*\}*/
510
511 /**
512  * The following are defines for the bit fields in the NVIC_ACTIVE0 register.
513  */
514 /*\{*/
515 #define NVIC_ACTIVE0_INT31      0x80000000  ///< Interrupt 31 active
516 #define NVIC_ACTIVE0_INT30      0x40000000  ///< Interrupt 30 active
517 #define NVIC_ACTIVE0_INT29      0x20000000  ///< Interrupt 29 active
518 #define NVIC_ACTIVE0_INT28      0x10000000  ///< Interrupt 28 active
519 #define NVIC_ACTIVE0_INT27      0x08000000  ///< Interrupt 27 active
520 #define NVIC_ACTIVE0_INT26      0x04000000  ///< Interrupt 26 active
521 #define NVIC_ACTIVE0_INT25      0x02000000  ///< Interrupt 25 active
522 #define NVIC_ACTIVE0_INT24      0x01000000  ///< Interrupt 24 active
523 #define NVIC_ACTIVE0_INT23      0x00800000  ///< Interrupt 23 active
524 #define NVIC_ACTIVE0_INT22      0x00400000  ///< Interrupt 22 active
525 #define NVIC_ACTIVE0_INT21      0x00200000  ///< Interrupt 21 active
526 #define NVIC_ACTIVE0_INT20      0x00100000  ///< Interrupt 20 active
527 #define NVIC_ACTIVE0_INT19      0x00080000  ///< Interrupt 19 active
528 #define NVIC_ACTIVE0_INT18      0x00040000  ///< Interrupt 18 active
529 #define NVIC_ACTIVE0_INT17      0x00020000  ///< Interrupt 17 active
530 #define NVIC_ACTIVE0_INT16      0x00010000  ///< Interrupt 16 active
531 #define NVIC_ACTIVE0_INT15      0x00008000  ///< Interrupt 15 active
532 #define NVIC_ACTIVE0_INT14      0x00004000  ///< Interrupt 14 active
533 #define NVIC_ACTIVE0_INT13      0x00002000  ///< Interrupt 13 active
534 #define NVIC_ACTIVE0_INT12      0x00001000  ///< Interrupt 12 active
535 #define NVIC_ACTIVE0_INT11      0x00000800  ///< Interrupt 11 active
536 #define NVIC_ACTIVE0_INT10      0x00000400  ///< Interrupt 10 active
537 #define NVIC_ACTIVE0_INT9       0x00000200  ///< Interrupt 9 active
538 #define NVIC_ACTIVE0_INT8       0x00000100  ///< Interrupt 8 active
539 #define NVIC_ACTIVE0_INT7       0x00000080  ///< Interrupt 7 active
540 #define NVIC_ACTIVE0_INT6       0x00000040  ///< Interrupt 6 active
541 #define NVIC_ACTIVE0_INT5       0x00000020  ///< Interrupt 5 active
542 #define NVIC_ACTIVE0_INT4       0x00000010  ///< Interrupt 4 active
543 #define NVIC_ACTIVE0_INT3       0x00000008  ///< Interrupt 3 active
544 #define NVIC_ACTIVE0_INT2       0x00000004  ///< Interrupt 2 active
545 #define NVIC_ACTIVE0_INT1       0x00000002  ///< Interrupt 1 active
546 #define NVIC_ACTIVE0_INT0       0x00000001  ///< Interrupt 0 active
547 /*\}*/
548
549 /**
550  * The following are defines for the bit fields in the NVIC_ACTIVE1 register.
551  */
552 /*\{*/
553 #define NVIC_ACTIVE1_INT59      0x08000000  ///< Interrupt 59 active
554 #define NVIC_ACTIVE1_INT58      0x04000000  ///< Interrupt 58 active
555 #define NVIC_ACTIVE1_INT57      0x02000000  ///< Interrupt 57 active
556 #define NVIC_ACTIVE1_INT56      0x01000000  ///< Interrupt 56 active
557 #define NVIC_ACTIVE1_INT55      0x00800000  ///< Interrupt 55 active
558 #define NVIC_ACTIVE1_INT54      0x00400000  ///< Interrupt 54 active
559 #define NVIC_ACTIVE1_INT53      0x00200000  ///< Interrupt 53 active
560 #define NVIC_ACTIVE1_INT52      0x00100000  ///< Interrupt 52 active
561 #define NVIC_ACTIVE1_INT51      0x00080000  ///< Interrupt 51 active
562 #define NVIC_ACTIVE1_INT50      0x00040000  ///< Interrupt 50 active
563 #define NVIC_ACTIVE1_INT49      0x00020000  ///< Interrupt 49 active
564 #define NVIC_ACTIVE1_INT48      0x00010000  ///< Interrupt 48 active
565 #define NVIC_ACTIVE1_INT47      0x00008000  ///< Interrupt 47 active
566 #define NVIC_ACTIVE1_INT46      0x00004000  ///< Interrupt 46 active
567 #define NVIC_ACTIVE1_INT45      0x00002000  ///< Interrupt 45 active
568 #define NVIC_ACTIVE1_INT44      0x00001000  ///< Interrupt 44 active
569 #define NVIC_ACTIVE1_INT43      0x00000800  ///< Interrupt 43 active
570 #define NVIC_ACTIVE1_INT42      0x00000400  ///< Interrupt 42 active
571 #define NVIC_ACTIVE1_INT41      0x00000200  ///< Interrupt 41 active
572 #define NVIC_ACTIVE1_INT40      0x00000100  ///< Interrupt 40 active
573 #define NVIC_ACTIVE1_INT39      0x00000080  ///< Interrupt 39 active
574 #define NVIC_ACTIVE1_INT38      0x00000040  ///< Interrupt 38 active
575 #define NVIC_ACTIVE1_INT37      0x00000020  ///< Interrupt 37 active
576 #define NVIC_ACTIVE1_INT36      0x00000010  ///< Interrupt 36 active
577 #define NVIC_ACTIVE1_INT35      0x00000008  ///< Interrupt 35 active
578 #define NVIC_ACTIVE1_INT34      0x00000004  ///< Interrupt 34 active
579 #define NVIC_ACTIVE1_INT33      0x00000002  ///< Interrupt 33 active
580 #define NVIC_ACTIVE1_INT32      0x00000001  ///< Interrupt 32 active
581 /*\}*/
582
583 /**
584  * The following are defines for the bit fields in the NVIC_PRI0 register.
585  */
586 /*\{*/
587 #define NVIC_PRI0_INT3_M        0xFF000000  ///< Interrupt 3 priority mask
588 #define NVIC_PRI0_INT2_M        0x00FF0000  ///< Interrupt 2 priority mask
589 #define NVIC_PRI0_INT1_M        0x0000FF00  ///< Interrupt 1 priority mask
590 #define NVIC_PRI0_INT0_M        0x000000FF  ///< Interrupt 0 priority mask
591 #define NVIC_PRI0_INT3_S        24
592 #define NVIC_PRI0_INT2_S        16
593 #define NVIC_PRI0_INT1_S        8
594 #define NVIC_PRI0_INT0_S        0
595 /*\}*/
596
597 /**
598  * The following are defines for the bit fields in the NVIC_PRI1 register.
599  */
600 /*\{*/
601 #define NVIC_PRI1_INT7_M        0xFF000000  ///< Interrupt 7 priority mask
602 #define NVIC_PRI1_INT6_M        0x00FF0000  ///< Interrupt 6 priority mask
603 #define NVIC_PRI1_INT5_M        0x0000FF00  ///< Interrupt 5 priority mask
604 #define NVIC_PRI1_INT4_M        0x000000FF  ///< Interrupt 4 priority mask
605 #define NVIC_PRI1_INT7_S        24
606 #define NVIC_PRI1_INT6_S        16
607 #define NVIC_PRI1_INT5_S        8
608 #define NVIC_PRI1_INT4_S        0
609 /*\}*/
610
611 /**
612  * The following are defines for the bit fields in the NVIC_PRI2 register.
613  */
614 /*\{*/
615 #define NVIC_PRI2_INT11_M       0xFF000000  ///< Interrupt 11 priority mask
616 #define NVIC_PRI2_INT10_M       0x00FF0000  ///< Interrupt 10 priority mask
617 #define NVIC_PRI2_INT9_M        0x0000FF00  ///< Interrupt 9 priority mask
618 #define NVIC_PRI2_INT8_M        0x000000FF  ///< Interrupt 8 priority mask
619 #define NVIC_PRI2_INT11_S       24
620 #define NVIC_PRI2_INT10_S       16
621 #define NVIC_PRI2_INT9_S        8
622 #define NVIC_PRI2_INT8_S        0
623 /*\}*/
624
625 /**
626  * The following are defines for the bit fields in the NVIC_PRI3 register.
627  */
628 /*\{*/
629 #define NVIC_PRI3_INT15_M       0xFF000000  ///< Interrupt 15 priority mask
630 #define NVIC_PRI3_INT14_M       0x00FF0000  ///< Interrupt 14 priority mask
631 #define NVIC_PRI3_INT13_M       0x0000FF00  ///< Interrupt 13 priority mask
632 #define NVIC_PRI3_INT12_M       0x000000FF  ///< Interrupt 12 priority mask
633 #define NVIC_PRI3_INT15_S       24
634 #define NVIC_PRI3_INT14_S       16
635 #define NVIC_PRI3_INT13_S       8
636 #define NVIC_PRI3_INT12_S       0
637 /*\}*/
638
639 /**
640  * The following are defines for the bit fields in the NVIC_PRI4 register.
641  */
642 /*\{*/
643 #define NVIC_PRI4_INT19_M       0xFF000000  ///< Interrupt 19 priority mask
644 #define NVIC_PRI4_INT18_M       0x00FF0000  ///< Interrupt 18 priority mask
645 #define NVIC_PRI4_INT17_M       0x0000FF00  ///< Interrupt 17 priority mask
646 #define NVIC_PRI4_INT16_M       0x000000FF  ///< Interrupt 16 priority mask
647 #define NVIC_PRI4_INT19_S       24
648 #define NVIC_PRI4_INT18_S       16
649 #define NVIC_PRI4_INT17_S       8
650 #define NVIC_PRI4_INT16_S       0
651 /*\}*/
652
653 /**
654  * The following are defines for the bit fields in the NVIC_PRI5 register.
655  */
656 /*\{*/
657 #define NVIC_PRI5_INT23_M       0xFF000000  ///< Interrupt 23 priority mask
658 #define NVIC_PRI5_INT22_M       0x00FF0000  ///< Interrupt 22 priority mask
659 #define NVIC_PRI5_INT21_M       0x0000FF00  ///< Interrupt 21 priority mask
660 #define NVIC_PRI5_INT20_M       0x000000FF  ///< Interrupt 20 priority mask
661 #define NVIC_PRI5_INT23_S       24
662 #define NVIC_PRI5_INT22_S       16
663 #define NVIC_PRI5_INT21_S       8
664 #define NVIC_PRI5_INT20_S       0
665 /*\}*/
666
667 /**
668  * The following are defines for the bit fields in the NVIC_PRI6 register.
669  */
670 /*\{*/
671 #define NVIC_PRI6_INT27_M       0xFF000000  ///< Interrupt 27 priority mask
672 #define NVIC_PRI6_INT26_M       0x00FF0000  ///< Interrupt 26 priority mask
673 #define NVIC_PRI6_INT25_M       0x0000FF00  ///< Interrupt 25 priority mask
674 #define NVIC_PRI6_INT24_M       0x000000FF  ///< Interrupt 24 priority mask
675 #define NVIC_PRI6_INT27_S       24
676 #define NVIC_PRI6_INT26_S       16
677 #define NVIC_PRI6_INT25_S       8
678 #define NVIC_PRI6_INT24_S       0
679 /*\}*/
680
681 /**
682  * The following are defines for the bit fields in the NVIC_PRI7 register.
683  */
684 /*\{*/
685 #define NVIC_PRI7_INT31_M       0xFF000000  ///< Interrupt 31 priority mask
686 #define NVIC_PRI7_INT30_M       0x00FF0000  ///< Interrupt 30 priority mask
687 #define NVIC_PRI7_INT29_M       0x0000FF00  ///< Interrupt 29 priority mask
688 #define NVIC_PRI7_INT28_M       0x000000FF  ///< Interrupt 28 priority mask
689 #define NVIC_PRI7_INT31_S       24
690 #define NVIC_PRI7_INT30_S       16
691 #define NVIC_PRI7_INT29_S       8
692 #define NVIC_PRI7_INT28_S       0
693 /*\}*/
694
695 /**
696  * The following are defines for the bit fields in the NVIC_PRI8 register.
697  */
698 /*\{*/
699 #define NVIC_PRI8_INT35_M       0xFF000000  ///< Interrupt 35 priority mask
700 #define NVIC_PRI8_INT34_M       0x00FF0000  ///< Interrupt 34 priority mask
701 #define NVIC_PRI8_INT33_M       0x0000FF00  ///< Interrupt 33 priority mask
702 #define NVIC_PRI8_INT32_M       0x000000FF  ///< Interrupt 32 priority mask
703 #define NVIC_PRI8_INT35_S       24
704 #define NVIC_PRI8_INT34_S       16
705 #define NVIC_PRI8_INT33_S       8
706 #define NVIC_PRI8_INT32_S       0
707 /*\}*/
708
709 /**
710  * The following are defines for the bit fields in the NVIC_PRI9 register.
711  */
712 /*\{*/
713 #define NVIC_PRI9_INT39_M       0xFF000000  ///< Interrupt 39 priority mask
714 #define NVIC_PRI9_INT38_M       0x00FF0000  ///< Interrupt 38 priority mask
715 #define NVIC_PRI9_INT37_M       0x0000FF00  ///< Interrupt 37 priority mask
716 #define NVIC_PRI9_INT36_M       0x000000FF  ///< Interrupt 36 priority mask
717 #define NVIC_PRI9_INT39_S       24
718 #define NVIC_PRI9_INT38_S       16
719 #define NVIC_PRI9_INT37_S       8
720 #define NVIC_PRI9_INT36_S       0
721 /*\}*/
722
723 /**
724  * The following are defines for the bit fields in the NVIC_PRI10 register.
725  */
726 /*\{*/
727 #define NVIC_PRI10_INT43_M      0xFF000000  ///< Interrupt 43 priority mask
728 #define NVIC_PRI10_INT42_M      0x00FF0000  ///< Interrupt 42 priority mask
729 #define NVIC_PRI10_INT41_M      0x0000FF00  ///< Interrupt 41 priority mask
730 #define NVIC_PRI10_INT40_M      0x000000FF  ///< Interrupt 40 priority mask
731 #define NVIC_PRI10_INT43_S      24
732 #define NVIC_PRI10_INT42_S      16
733 #define NVIC_PRI10_INT41_S      8
734 #define NVIC_PRI10_INT40_S      0
735 /*\}*/
736
737 /**
738  * The following are defines for the bit fields in the NVIC_CPUID register.
739  */
740 /*\{*/
741 #define NVIC_CPUID_IMP_M        0xFF000000  ///< Implementer
742 #define NVIC_CPUID_VAR_M        0x00F00000  ///< Variant
743 #define NVIC_CPUID_PARTNO_M     0x0000FFF0  ///< Processor part number
744 #define NVIC_CPUID_REV_M        0x0000000F  ///< Revision
745 /*\}*/
746
747 /**
748  * The following are defines for the bit fields in the NVIC_INT_CTRL register.
749  */
750 /*\{*/
751 #define NVIC_INT_CTRL_NMI_SET   0x80000000  ///< Pend a NMI
752 #define NVIC_INT_CTRL_PEND_SV   0x10000000  ///< Pend a PendSV
753 #define NVIC_INT_CTRL_UNPEND_SV 0x08000000  ///< Unpend a PendSV
754 #define NVIC_INT_CTRL_PENDSTSET 0x04000000  ///< Set pending SysTick interrupt
755 #define NVIC_INT_CTRL_PENDSTCLR 0x02000000  ///< Clear pending SysTick interrupt
756 #define NVIC_INT_CTRL_ISR_PRE   0x00800000  ///< Debug interrupt handling
757 #define NVIC_INT_CTRL_ISR_PEND  0x00400000  ///< Debug interrupt pending
758 #define NVIC_INT_CTRL_VEC_PEN_M 0x003FF000  ///< Highest pending exception
759 #define NVIC_INT_CTRL_RET_BASE  0x00000800  ///< Return to base
760 #define NVIC_INT_CTRL_VEC_ACT_M 0x000003FF  ///< Current active exception
761 #define NVIC_INT_CTRL_VEC_PEN_S 12
762 #define NVIC_INT_CTRL_VEC_ACT_S 0
763 /*\}*/
764
765 /**
766  * The following are defines for the bit fields in the NVIC_VTABLE register.
767  */
768 /*\{*/
769 #define NVIC_VTABLE_BASE        0x20000000  ///< Vector table base
770 #define NVIC_VTABLE_OFFSET_M    0x1FFFFF00  ///< Vector table offset
771 #define NVIC_VTABLE_OFFSET_S    8
772 /*\}*/
773
774 /**
775  * The following are defines for the bit fields in the NVIC_APINT register.
776  */
777 /*\{*/
778 #define NVIC_APINT_VECTKEY_M    0xFFFF0000  ///< Vector key mask
779 #define NVIC_APINT_VECTKEY      0x05FA0000  ///< Vector key
780 #define NVIC_APINT_ENDIANESS    0x00008000  ///< Data endianess
781 #define NVIC_APINT_PRIGROUP_M   0x00000700  ///< Priority group
782 #define NVIC_APINT_PRIGROUP_0_8 0x00000700  ///< Priority group 0.8 split
783 #define NVIC_APINT_PRIGROUP_1_7 0x00000600  ///< Priority group 1.7 split
784 #define NVIC_APINT_PRIGROUP_2_6 0x00000500  ///< Priority group 2.6 split
785 #define NVIC_APINT_PRIGROUP_3_5 0x00000400  ///< Priority group 3.5 split
786 #define NVIC_APINT_PRIGROUP_4_4 0x00000300  ///< Priority group 4.4 split
787 #define NVIC_APINT_PRIGROUP_5_3 0x00000200  ///< Priority group 5.3 split
788 #define NVIC_APINT_PRIGROUP_6_2 0x00000100  ///< Priority group 6.2 split
789 #define NVIC_APINT_SYSRESETREQ  0x00000004  ///< System reset request
790 #define NVIC_APINT_VECT_CLR_ACT 0x00000002  ///< Clear active NMI/fault info
791 #define NVIC_APINT_VECT_RESET   0x00000001  ///< System reset
792 #define NVIC_APINT_PRIGROUP_7_1 0x00000000  ///< Priority group 7.1 split
793 /*\}*/
794
795 /**
796  * The following are defines for the bit fields in the NVIC_SYS_CTRL register.
797  */
798 /*\{*/
799 #define NVIC_SYS_CTRL_SEVONPEND 0x00000010  ///< Wakeup on pend
800 #define NVIC_SYS_CTRL_SLEEPDEEP 0x00000004  ///< Deep sleep enable
801 #define NVIC_SYS_CTRL_SLEEPEXIT 0x00000002  ///< Sleep on ISR exit
802 /*\}*/
803
804 /**
805  * The following are defines for the bit fields in the NVIC_CFG_CTRL register.
806  */
807 /*\{*/
808 #define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100  ///< Ignore bus fault in NMI/fault
809 #define NVIC_CFG_CTRL_DIV0      0x00000010  ///< Trap on divide by 0
810 #define NVIC_CFG_CTRL_UNALIGNED 0x00000008  ///< Trap on unaligned access
811 #define NVIC_CFG_CTRL_DEEP_PEND 0x00000004  ///< Allow deep interrupt trigger
812 #define NVIC_CFG_CTRL_MAIN_PEND 0x00000002  ///< Allow main interrupt trigger
813 #define NVIC_CFG_CTRL_BASE_THR  0x00000001  ///< Thread state control
814 /*\}*/
815
816 /**
817  * The following are defines for the bit fields in the NVIC_SYS_PRI1 register.
818  */
819 /*\{*/
820 #define NVIC_SYS_PRI1_RES_M     0xFF000000  ///< Priority of reserved handler
821 #define NVIC_SYS_PRI1_USAGE_M   0x00FF0000  ///< Priority of usage fault handler
822 #define NVIC_SYS_PRI1_BUS_M     0x0000FF00  ///< Priority of bus fault handler
823 #define NVIC_SYS_PRI1_MEM_M     0x000000FF  ///< Priority of mem manage handler
824 #define NVIC_SYS_PRI1_USAGE_S   16
825 #define NVIC_SYS_PRI1_BUS_S     8
826 #define NVIC_SYS_PRI1_MEM_S     0
827 /*\}*/
828
829 /**
830  * The following are defines for the bit fields in the NVIC_SYS_PRI2 register.
831  */
832 /*\{*/
833 #define NVIC_SYS_PRI2_SVC_M     0xFF000000  ///< Priority of SVCall handler
834 #define NVIC_SYS_PRI2_RES_M     0x00FFFFFF  ///< Priority of reserved handlers
835 #define NVIC_SYS_PRI2_SVC_S     24
836 /*\}*/
837
838 /**
839  * The following are defines for the bit fields in the NVIC_SYS_PRI3 register.
840  */
841 /*\{*/
842 #define NVIC_SYS_PRI3_TICK_M    0xFF000000  ///< Priority of Sys Tick handler
843 #define NVIC_SYS_PRI3_PENDSV_M  0x00FF0000  ///< Priority of PendSV handler
844 #define NVIC_SYS_PRI3_RES_M     0x0000FF00  ///< Priority of reserved handler
845 #define NVIC_SYS_PRI3_DEBUG_M   0x000000FF  ///< Priority of debug handler
846 #define NVIC_SYS_PRI3_TICK_S    24
847 #define NVIC_SYS_PRI3_PENDSV_S  16
848 #define NVIC_SYS_PRI3_DEBUG_S   0
849 /*\}*/
850
851 /**
852  * The following are defines for the bit fields in the NVIC_SYS_HND_CTRL
853  * register.
854  */
855 /*\{*/
856 #define NVIC_SYS_HND_CTRL_USAGE 0x00040000  ///< Usage fault enable
857 #define NVIC_SYS_HND_CTRL_BUS   0x00020000  ///< Bus fault enable
858 #define NVIC_SYS_HND_CTRL_MEM   0x00010000  ///< Mem manage fault enable
859 #define NVIC_SYS_HND_CTRL_SVC   0x00008000  ///< SVCall is pended
860 #define NVIC_SYS_HND_CTRL_BUSP  0x00004000  ///< Bus fault is pended
861 #define NVIC_SYS_HND_CTRL_TICK  0x00000800  ///< Sys tick is active
862 #define NVIC_SYS_HND_CTRL_PNDSV 0x00000400  ///< PendSV is active
863 #define NVIC_SYS_HND_CTRL_MON   0x00000100  ///< Monitor is active
864 #define NVIC_SYS_HND_CTRL_SVCA  0x00000080  ///< SVCall is active
865 #define NVIC_SYS_HND_CTRL_USGA  0x00000008  ///< Usage fault is active
866 #define NVIC_SYS_HND_CTRL_BUSA  0x00000002  ///< Bus fault is active
867 #define NVIC_SYS_HND_CTRL_MEMA  0x00000001  ///< Mem manage is active
868 /*\}*/
869
870 /**
871  * The following are defines for the bit fields in the NVIC_FAULT_STAT
872  * register.
873  */
874 /*\{*/
875 #define NVIC_FAULT_STAT_DIV0    0x02000000  ///< Divide by zero fault
876 #define NVIC_FAULT_STAT_UNALIGN 0x01000000  ///< Unaligned access fault
877 #define NVIC_FAULT_STAT_NOCP    0x00080000  ///< No coprocessor fault
878 #define NVIC_FAULT_STAT_INVPC   0x00040000  ///< Invalid PC fault
879 #define NVIC_FAULT_STAT_INVSTAT 0x00020000  ///< Invalid state fault
880 #define NVIC_FAULT_STAT_UNDEF   0x00010000  ///< Undefined instruction fault
881 #define NVIC_FAULT_STAT_BFARV   0x00008000  ///< BFAR is valid
882 #define NVIC_FAULT_STAT_BSTKE   0x00001000  ///< Stack bus fault
883 #define NVIC_FAULT_STAT_BUSTKE  0x00000800  ///< Unstack bus fault
884 #define NVIC_FAULT_STAT_IMPRE   0x00000400  ///< Imprecise data bus error
885 #define NVIC_FAULT_STAT_PRECISE 0x00000200  ///< Precise data bus error
886 #define NVIC_FAULT_STAT_IBUS    0x00000100  ///< Instruction bus fault
887 #define NVIC_FAULT_STAT_MMARV   0x00000080  ///< MMAR is valid
888 #define NVIC_FAULT_STAT_MSTKE   0x00000010  ///< Stack access violation
889 #define NVIC_FAULT_STAT_MUSTKE  0x00000008  ///< Unstack access violation
890 #define NVIC_FAULT_STAT_DERR    0x00000002  ///< Data access violation
891 #define NVIC_FAULT_STAT_IERR    0x00000001  ///< Instruction access violation
892 /*\}*/
893
894 /**
895  * The following are defines for the bit fields in the NVIC_HFAULT_STAT
896  * register.
897  */
898 /*\{*/
899 #define NVIC_HFAULT_STAT_DBG    0x80000000  ///< Debug event
900 #define NVIC_HFAULT_STAT_FORCED 0x40000000  ///< Cannot execute fault handler
901 #define NVIC_HFAULT_STAT_VECT   0x00000002  ///< Vector table read fault
902 /*\}*/
903
904 /**
905  * The following are defines for the bit fields in the NVIC_DEBUG_STAT
906  * register.
907  */
908 /*\{*/
909 #define NVIC_DEBUG_STAT_EXTRNL  0x00000010  ///< EDBGRQ asserted
910 #define NVIC_DEBUG_STAT_VCATCH  0x00000008  ///< Vector catch
911 #define NVIC_DEBUG_STAT_DWTTRAP 0x00000004  ///< DWT match
912 #define NVIC_DEBUG_STAT_BKPT    0x00000002  ///< Breakpoint instruction
913 #define NVIC_DEBUG_STAT_HALTED  0x00000001  ///< Halt request
914 /*\}*/
915
916 /**
917  * The following are defines for the bit fields in the NVIC_MM_ADDR register.
918  */
919 /*\{*/
920 #define NVIC_MM_ADDR_M          0xFFFFFFFF  ///< Data fault address
921 #define NVIC_MM_ADDR_S          0
922 /*\}*/
923
924 /**
925  * The following are defines for the bit fields in the NVIC_FAULT_ADDR
926  * register.
927  */
928 /*\{*/
929 #define NVIC_FAULT_ADDR_M       0xFFFFFFFF  ///< Data bus fault address
930 #define NVIC_FAULT_ADDR_S       0
931 /*\}*/
932
933 /**
934  * The following are defines for the bit fields in the NVIC_MPU_TYPE register.
935  */
936 /*\{*/
937 #define NVIC_MPU_TYPE_IREGION_M 0x00FF0000  ///< Number of I regions
938 #define NVIC_MPU_TYPE_DREGION_M 0x0000FF00  ///< Number of D regions
939 #define NVIC_MPU_TYPE_SEPARATE  0x00000001  ///< Separate or unified MPU
940 #define NVIC_MPU_TYPE_IREGION_S 16
941 #define NVIC_MPU_TYPE_DREGION_S 8
942 /*\}*/
943
944 /**
945  * The following are defines for the bit fields in the NVIC_MPU_CTRL register.
946  */
947 /*\{*/
948 #define NVIC_MPU_CTRL_PRIVDEFEN 0x00000004  ///< MPU default region in priv mode
949 #define NVIC_MPU_CTRL_HFNMIENA  0x00000002  ///< MPU enabled during faults
950 #define NVIC_MPU_CTRL_ENABLE    0x00000001  ///< MPU enable
951 /*\}*/
952
953 /**
954  * The following are defines for the bit fields in the NVIC_MPU_NUMBER
955  * register.
956  */
957 /*\{*/
958 #define NVIC_MPU_NUMBER_M       0x000000FF  ///< MPU region to access
959 #define NVIC_MPU_NUMBER_S       0
960 /*\}*/
961
962 /**
963  * The following are defines for the bit fields in the NVIC_MPU_BASE register.
964  */
965 /*\{*/
966 #define NVIC_MPU_BASE_ADDR_M    0xFFFFFFE0  ///< Base address mask
967 #define NVIC_MPU_BASE_VALID     0x00000010  ///< Region number valid
968 #define NVIC_MPU_BASE_REGION_M  0x0000000F  ///< Region number
969 #define NVIC_MPU_BASE_ADDR_S    8
970 #define NVIC_MPU_BASE_REGION_S  0
971 /*\}*/
972
973 /**
974  * The following are defines for the bit fields in the NVIC_MPU_ATTR register.
975  */
976 /*\{*/
977 #define NVIC_MPU_ATTR_M         0xFFFF0000  ///< Attributes
978 #define NVIC_MPU_ATTR_AP_NO_NO  0x00000000  ///< prv: no access, usr: no access
979 #define NVIC_MPU_ATTR_BUFFRABLE 0x00010000  ///< Bufferable
980 #define NVIC_MPU_ATTR_CACHEABLE 0x00020000  ///< Cacheable
981 #define NVIC_MPU_ATTR_SHAREABLE 0x00040000  ///< Shareable
982 #define NVIC_MPU_ATTR_TEX_M     0x00380000  ///< Type extension mask
983 #define NVIC_MPU_ATTR_AP_RW_NO  0x01000000  ///< prv: rw, usr: none
984 #define NVIC_MPU_ATTR_AP_RW_RO  0x02000000  ///< prv: rw, usr: read-only
985 #define NVIC_MPU_ATTR_AP_RW_RW  0x03000000  ///< prv: rw, usr: rw
986 #define NVIC_MPU_ATTR_AP_RO_NO  0x05000000  ///< prv: ro, usr: none
987 #define NVIC_MPU_ATTR_AP_RO_RO  0x06000000  ///< prv: ro, usr: ro
988 #define NVIC_MPU_ATTR_AP_M      0x07000000  ///< Access permissions mask
989 #define NVIC_MPU_ATTR_XN        0x10000000  ///< Execute disable
990 #define NVIC_MPU_ATTR_SRD_M     0x0000FF00  ///< Sub-region disable mask
991 #define NVIC_MPU_ATTR_SRD_0     0x00000100  ///< Sub-region 0 disable
992 #define NVIC_MPU_ATTR_SRD_1     0x00000200  ///< Sub-region 1 disable
993 #define NVIC_MPU_ATTR_SRD_2     0x00000400  ///< Sub-region 2 disable
994 #define NVIC_MPU_ATTR_SRD_3     0x00000800  ///< Sub-region 3 disable
995 #define NVIC_MPU_ATTR_SRD_4     0x00001000  ///< Sub-region 4 disable
996 #define NVIC_MPU_ATTR_SRD_5     0x00002000  ///< Sub-region 5 disable
997 #define NVIC_MPU_ATTR_SRD_6     0x00004000  ///< Sub-region 6 disable
998 #define NVIC_MPU_ATTR_SRD_7     0x00008000  ///< Sub-region 7 disable
999 #define NVIC_MPU_ATTR_SIZE_M    0x0000003E  ///< Region size mask
1000 #define NVIC_MPU_ATTR_SIZE_32B  0x00000008  ///< Region size 32 bytes
1001 #define NVIC_MPU_ATTR_SIZE_64B  0x0000000A  ///< Region size 64 bytes
1002 #define NVIC_MPU_ATTR_SIZE_128B 0x0000000C  ///< Region size 128 bytes
1003 #define NVIC_MPU_ATTR_SIZE_256B 0x0000000E  ///< Region size 256 bytes
1004 #define NVIC_MPU_ATTR_SIZE_512B 0x00000010  ///< Region size 512 bytes
1005 #define NVIC_MPU_ATTR_SIZE_1K   0x00000012  ///< Region size 1 Kbytes
1006 #define NVIC_MPU_ATTR_SIZE_2K   0x00000014  ///< Region size 2 Kbytes
1007 #define NVIC_MPU_ATTR_SIZE_4K   0x00000016  ///< Region size 4 Kbytes
1008 #define NVIC_MPU_ATTR_SIZE_8K   0x00000018  ///< Region size 8 Kbytes
1009 #define NVIC_MPU_ATTR_SIZE_16K  0x0000001A  ///< Region size 16 Kbytes
1010 #define NVIC_MPU_ATTR_SIZE_32K  0x0000001C  ///< Region size 32 Kbytes
1011 #define NVIC_MPU_ATTR_SIZE_64K  0x0000001E  ///< Region size 64 Kbytes
1012 #define NVIC_MPU_ATTR_SIZE_128K 0x00000020  ///< Region size 128 Kbytes
1013 #define NVIC_MPU_ATTR_SIZE_256K 0x00000022  ///< Region size 256 Kbytes
1014 #define NVIC_MPU_ATTR_SIZE_512K 0x00000024  ///< Region size 512 Kbytes
1015 #define NVIC_MPU_ATTR_SIZE_1M   0x00000026  ///< Region size 1 Mbytes
1016 #define NVIC_MPU_ATTR_SIZE_2M   0x00000028  ///< Region size 2 Mbytes
1017 #define NVIC_MPU_ATTR_SIZE_4M   0x0000002A  ///< Region size 4 Mbytes
1018 #define NVIC_MPU_ATTR_SIZE_8M   0x0000002C  ///< Region size 8 Mbytes
1019 #define NVIC_MPU_ATTR_SIZE_16M  0x0000002E  ///< Region size 16 Mbytes
1020 #define NVIC_MPU_ATTR_SIZE_32M  0x00000030  ///< Region size 32 Mbytes
1021 #define NVIC_MPU_ATTR_SIZE_64M  0x00000032  ///< Region size 64 Mbytes
1022 #define NVIC_MPU_ATTR_SIZE_128M 0x00000034  ///< Region size 128 Mbytes
1023 #define NVIC_MPU_ATTR_SIZE_256M 0x00000036  ///< Region size 256 Mbytes
1024 #define NVIC_MPU_ATTR_SIZE_512M 0x00000038  ///< Region size 512 Mbytes
1025 #define NVIC_MPU_ATTR_SIZE_1G   0x0000003A  ///< Region size 1 Gbytes
1026 #define NVIC_MPU_ATTR_SIZE_2G   0x0000003C  ///< Region size 2 Gbytes
1027 #define NVIC_MPU_ATTR_SIZE_4G   0x0000003E  ///< Region size 4 Gbytes
1028 #define NVIC_MPU_ATTR_ENABLE    0x00000001  ///< Region enable
1029 /*\}*/
1030
1031 /**
1032  * The following are defines for the bit fields in the NVIC_DBG_CTRL register.
1033  */
1034 /*\{*/
1035 #define NVIC_DBG_CTRL_DBGKEY_M  0xFFFF0000  ///< Debug key mask
1036 #define NVIC_DBG_CTRL_DBGKEY    0xA05F0000  ///< Debug key
1037 #define NVIC_DBG_CTRL_S_RESET_ST \
1038                                 0x02000000  ///< Core has reset since last read
1039 #define NVIC_DBG_CTRL_S_RETIRE_ST \
1040                                 0x01000000  ///< Core has executed insruction
1041                                             ///< since last read
1042 #define NVIC_DBG_CTRL_S_LOCKUP  0x00080000  ///< Core is locked up
1043 #define NVIC_DBG_CTRL_S_SLEEP   0x00040000  ///< Core is sleeping
1044 #define NVIC_DBG_CTRL_S_HALT    0x00020000  ///< Core status on halt
1045 #define NVIC_DBG_CTRL_S_REGRDY  0x00010000  ///< Register read/write available
1046 #define NVIC_DBG_CTRL_C_SNAPSTALL \
1047                                 0x00000020  ///< Breaks a stalled load/store
1048 #define NVIC_DBG_CTRL_C_MASKINT 0x00000008  ///< Mask interrupts when stepping
1049 #define NVIC_DBG_CTRL_C_STEP    0x00000004  ///< Step the core
1050 #define NVIC_DBG_CTRL_C_HALT    0x00000002  ///< Halt the core
1051 #define NVIC_DBG_CTRL_C_DEBUGEN 0x00000001  ///< Enable debug
1052 /*\}*/
1053
1054 /**
1055  * The following are defines for the bit fields in the NVIC_DBG_XFER register.
1056  */
1057 /*\{*/
1058 #define NVIC_DBG_XFER_REG_WNR   0x00010000  ///< Write or not read
1059 #define NVIC_DBG_XFER_REG_SEL_M 0x0000001F  ///< Register
1060 #define NVIC_DBG_XFER_REG_CFBP  0x00000014  ///< Control/Fault/BasePri/PriMask
1061 #define NVIC_DBG_XFER_REG_DSP   0x00000013  ///< Deep SP
1062 #define NVIC_DBG_XFER_REG_PSP   0x00000012  ///< Process SP
1063 #define NVIC_DBG_XFER_REG_MSP   0x00000011  ///< Main SP
1064 #define NVIC_DBG_XFER_REG_FLAGS 0x00000010  ///< xPSR/Flags register
1065 #define NVIC_DBG_XFER_REG_R15   0x0000000F  ///< Register R15
1066 #define NVIC_DBG_XFER_REG_R14   0x0000000E  ///< Register R14
1067 #define NVIC_DBG_XFER_REG_R13   0x0000000D  ///< Register R13
1068 #define NVIC_DBG_XFER_REG_R12   0x0000000C  ///< Register R12
1069 #define NVIC_DBG_XFER_REG_R11   0x0000000B  ///< Register R11
1070 #define NVIC_DBG_XFER_REG_R10   0x0000000A  ///< Register R10
1071 #define NVIC_DBG_XFER_REG_R9    0x00000009  ///< Register R9
1072 #define NVIC_DBG_XFER_REG_R8    0x00000008  ///< Register R8
1073 #define NVIC_DBG_XFER_REG_R7    0x00000007  ///< Register R7
1074 #define NVIC_DBG_XFER_REG_R6    0x00000006  ///< Register R6
1075 #define NVIC_DBG_XFER_REG_R5    0x00000005  ///< Register R5
1076 #define NVIC_DBG_XFER_REG_R4    0x00000004  ///< Register R4
1077 #define NVIC_DBG_XFER_REG_R3    0x00000003  ///< Register R3
1078 #define NVIC_DBG_XFER_REG_R2    0x00000002  ///< Register R2
1079 #define NVIC_DBG_XFER_REG_R1    0x00000001  ///< Register R1
1080 #define NVIC_DBG_XFER_REG_R0    0x00000000  ///< Register R0
1081 /*\}*/
1082
1083 /**
1084  * The following are defines for the bit fields in the NVIC_DBG_DATA register.
1085  */
1086 /*\{*/
1087 #define NVIC_DBG_DATA_M         0xFFFFFFFF  ///< Data temporary cache
1088 #define NVIC_DBG_DATA_S         0
1089 /*\}*/
1090
1091 /**
1092  * The following are defines for the bit fields in the NVIC_DBG_INT register.
1093  */
1094 /*\{*/
1095 #define NVIC_DBG_INT_HARDERR    0x00000400  ///< Debug trap on hard fault
1096 #define NVIC_DBG_INT_INTERR     0x00000200  ///< Debug trap on interrupt errors
1097 #define NVIC_DBG_INT_BUSERR     0x00000100  ///< Debug trap on bus error
1098 #define NVIC_DBG_INT_STATERR    0x00000080  ///< Debug trap on usage fault state
1099 #define NVIC_DBG_INT_CHKERR     0x00000040  ///< Debug trap on usage fault check
1100 #define NVIC_DBG_INT_NOCPERR    0x00000020  ///< Debug trap on coprocessor error
1101 #define NVIC_DBG_INT_MMERR      0x00000010  ///< Debug trap on mem manage fault
1102 #define NVIC_DBG_INT_RESET      0x00000008  ///< Core reset status
1103 #define NVIC_DBG_INT_RSTPENDCLR 0x00000004  ///< Clear pending core reset
1104 #define NVIC_DBG_INT_RSTPENDING 0x00000002  ///< Core reset is pending
1105 #define NVIC_DBG_INT_RSTVCATCH  0x00000001  ///< Reset vector catch
1106 /*\}*/
1107
1108 /**
1109  * The following are defines for the bit fields in the NVIC_SW_TRIG register.
1110  */
1111 /*\{*/
1112 #define NVIC_SW_TRIG_INTID_M    0x000003FF  ///< Interrupt to trigger
1113 #define NVIC_SW_TRIG_INTID_S    0
1114 /*\}*/
1115
1116 #endif /* SAM3_NVIC_H */