]> begriffs open source - cmsis/blob - CMSIS/DoxyGen/Core/src/Template.txt
Updated all versions and change histories for upcoming release 5.6.0
[cmsis] / CMSIS / DoxyGen / Core / src / Template.txt
1 /**
2 \page templates_pg CMSIS-Core Device Templates
3
4 \details
5
6 Arm supplies CMSIS-Core device template files for the all supported Cortex-M processors and various compiler vendors.
7 Refer to the list of \ref tested_tools_sec for compliance.
8
9
10 These CMSIS-Core device template files include the following:
11  - Register names of the Core Peripherals and names of the Core Exception Vectors.
12  - Functions to access core peripherals, special CPU instructions and SIMD instructions (for Cortex-M4 and Cortex-M7)
13  - Generic startup code and system configuration code.
14
15 The detailed file structure of the CMSIS-Core device templates is shown in the following picture.
16
17 \image html "CMSIS_CORE_Files.png" "CMSIS-Core File Structure"
18
19 \section CMSIS_Processor_files CMSIS-Core Processor Files 
20
21 The CMSIS-Core processor files provided by Arm are in the directory .\\CMSIS\\Core\\Include. These header files define all processor specific attributes do not need any modifications.
22 The <b>core_&lt;cpu&gt;.h</b> defines the core peripherals and provides helper functions that access the core registers. One file is available for each supported Cortex-M processor:
23
24 Header File      | Processor
25 :----------------|:------------------------------
26 core_cm0.h       | for the Cortex-M0 processor
27 core_cm0plus.h   | for the Cortex-M0+ processor
28 core_cm3.h       | for the Cortex-M3 processor
29 core_cm4.h       | for the Cortex-M4 processor
30 core_cm7.h       | for the Cortex-M7 processor
31 \if ARMv8M
32 core_cm23.h      | for the Cortex-M23 processor
33 core_cm33.h      | for the Cortex-M33 processor
34 core_cm35p.h     | for the Cortex-M35P processor
35 \endif 
36 \if ARMSC
37 core_sc000.h     | for the SecurCore SC000 processor
38 core_sc300.h     | for the SecurCore SC300 processor
39 \endif
40 \if ARMv8M
41 core_armv8mbl.h  | for the Armv8-M Baseline processor
42 core_armv8mml.h  | for the Armv8-M Mainline processor
43 \endif
44 \section device_examples Device Examples
45
46 The CMSIS Software Pack defines several devices that are based on the various processors. The device related CMSIS-Core files are in the directory .\\Device\\ARM
47 and include CMSIS-Core processor file explained before. The following sample devices are defined in the CMSIS-Pack description file <b>ARM.CMSIS.pdsc</b>:
48
49 Family             | Device             | Description
50 :------------------|:-------------------|:---------------------------------
51 ARM Cortex-M0      | ARMCM0             | Cortex-M0 based device
52 ARM Cortex-M0 plus | ARMCM0P            | Cortex-M0+ based device
53 ARM Cortex-M3      | ARMCM3             | Cortex-M3 based device
54 ARM Cortex-M4      | ARMCM4             | Cortex-M4 based device without floating-point hardware
55 ARM Cortex-M4      | ARMCM4_FP          | Cortex-M4 based device with floating-point hardware
56 ARM Cortex-M7      | ARMCM7             | Cortex-M4 based device without floating-point hardware
57 ARM Cortex-M7      | ARMCM7_FP          | Cortex-M7 based device with single precision floating-point unit (FPU)
58 ARM Cortex-M7      | ARMCM7_DP          | Cortex-M7 based device with double precision floating-point unit
59 ARM Cortex-M7      | ARMCM7             | Cortex-M7 based device without floating-point hardware
60 \if ARMv8M
61 ARM Cortex-M23     | ARMCM23            | Cortex-M23 based device without TrustZone
62 ARM Cortex-M23     | ARMCM23_TZ         | Cortex-M23 based device with TrustZone
63 ARM Cortex-M33     | ARMCM33            | Cortex-M33 based device without TrustZone, SIMD, FPU
64 ARM Cortex-M33     | ARMCM33_TZ         | Cortex-M33 based device with TrustZone, no SIMD, no FPU
65 ARM Cortex-M33     | ARMCM33_DSP_FP     | Cortex-M33 based device with SIMD, FPU, no TrustZone
66 ARM Cortex-M33     | ARMCM33_DSP_FP_TZ  | Cortex-M33 based device with TrustZone, SIMD, FPU
67 ARM Cortex-M35P    | ARMCM35P           | Cortex-M35P based device without TrustZone, SIMD, FPU
68 ARM Cortex-M35P    | ARMCM35P_TZ        | Cortex-M35P based device with TrustZone, no SIMD, no FPU
69 ARM Cortex-M35P    | ARMCM35P_DSP_FP    | Cortex-M35P based device with SIMD, FPU, no TrustZone
70 ARM Cortex-M35P    | ARMCM35P_DSP_FP_TZ | Cortex-M35P based device with TrustZone, SIMD, FPU
71 \endif
72 \if ARMSC
73 ARM SC000          | ARM SC000          | SC000 based device
74 ARM SC300          | ARM SC300          | SC300 based device
75 \endif
76 \if ARMv8M
77 ARMv8-M Baseline   | ARMv8MBL           | Armv8-M Baseline based device with TrustZone
78 ARMv8-M Mainline   | ARMv8MML           | Armv8-M Mainline based device with TrustZone
79 ARMv8-M Mainline   | ARMv8MML_DP        | Armv8-M Mainline based device with TrustZone and double precision FPU 
80 ARMv8-M Mainline   | ARMv8MML_SP        | Armv8-M Mainline based device with TrustZone and single precision FPU 
81 ARMv8-M Mainline   | ARMv8MML_DSP       | Armv8-M Mainline based device with TrustZone and SIMD
82 ARMv8-M Mainline   | ARMv8MML_DSP_DP    | Armv8-M Mainline based device with TrustZone, SIMD, and double precision FPU 
83 ARMv8-M Mainline   | ARMv8MML_DSP_SP    | Armv8-M Mainline based device with TrustZone, SIMD, and single precision FPU 
84 \endif
85
86 \section template_files_sec Template Files
87
88 To simplify the creation of CMSIS-Core device files, the following template files are provided that should be extended by the silicon vendor to reflect the actual device and device peripherals.
89 Silicon vendors add to these template files the following information:
90  - <b>Device Peripheral Access Layer</b> that provides definitions for device-specific peripherals.
91  - <b>Access Functions for Peripherals</b> (optional) that provides additional helper functions to access device-specific peripherals.
92  - <b>Interrupt vectors</b> in the startup file that are device specific.
93
94 <table class="cmtable">
95     <tr>
96       <th>Template File</th>
97       <th>Description</th>
98     </tr>
99     <tr>
100       <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\ARM\\startup_Device.s</td>
101       <td>Startup file template for Arm C/C++ Compiler.</td>
102     </tr>
103     <tr>
104       <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\GCC\\startup_Device.s</td>
105       <td>Startup file template for GNU GCC Arm Embedded Compiler.</td>
106     </tr>
107     <tr>
108       <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\IAR\\startup_Device.s</td>
109       <td>Startup file template for IAR C/C++ Compiler.</td>
110     </tr>
111     <tr>
112       <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\system_Device.c</td>
113       <td>Generic system_Device.c file for system configuration (i.e. processor clock and memory bus system).</td>
114     </tr>
115     <tr>
116       <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Include\\Device.h</td>
117       <td>Generic device header file. Needs to be extended with the device-specific peripheral registers. Optionally functions that access the peripherals
118       can be part of that file.</td>
119     </tr>
120     <tr>
121       <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Include\\system_Device.h</td>
122       <td>Generic system device configuration include file.</td>
123     </tr>
124 </table>
125
126
127 <b>Adapt Template Files to a Device</b>
128
129 The following steps describe how to adopt the template files to a specific device or device family.
130 Copy the complete all files in the template directory and replace:
131   - directory name 'Vendor' with the abbreviation for the device vendor  e.g.: NXP.
132   - directory name 'Device' with the specific device name e.g.: LPC17xx.
133   - in the file names 'Device' with the specific device name e.g.: LPC17xx.
134
135 Each template file contains comments that start with \b ToDo: that describe a required modification.
136 The template files contain place holders:
137
138 <table class="cmtable">
139     <tr>
140       <th>Placeholder</th>
141       <th>Replaced with</th>
142     </tr>
143     <tr>
144       <td>&lt;Device&gt;</td>
145       <td>the specific device name or device family name; i.e. LPC17xx.</td>
146     </tr>
147     <tr>
148       <td>&lt;DeviceInterrupt&gt;</td>
149       <td>a specific interrupt name of the device; i.e. TIM1 for Timer 1.</td>
150     <tr>
151       <td>&lt;DeviceAbbreviation&gt;</td>
152       <td>short name or abbreviation of the device family; i.e. LPC.</td>
153     </tr>
154     <tr>
155       <td>Cortex-M#</td>
156       <td>the specific Cortex-M processor name; i.e. Cortex-M3.</td>
157     </tr>
158 </table>
159
160
161 The device configuration of the template files is described in detail on the following pages:
162   - \subpage startup_c_pg
163   - \subpage startup_s_pg (deprecated)
164   - \subpage system_c_pg
165   - \subpage device_h_pg
166 \if ARMv8M
167   - \subpage partition_h_pg
168 \endif  
169 */
170
171 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
172 /**
173 \page startup_c_pg Startup File startup_<device>.c
174
175 The \ref startup_c_pg contains:
176  - The reset handler which is executed after CPU reset and typically calls the \ref SystemInit function.
177  - The setup values for the Main Stack Pointer (MSP).
178  - Exception vectors of the Cortex-M Processor with weak functions that implement default routines.
179  - Interrupt vectors that are device specific with weak functions that implement default routines.
180
181 The file exists for each supported toolchain and is the only tool-chain specific CMSIS file.
182
183 To adapt the file to a new device only the interrupt vector table needs to be extended with
184 the device-specific interrupt handlers. The naming convention for the interrupt handler names are
185 &lt;interrupt_name&gt;_IRQHandler.  This table needs to be consistent with \ref IRQn_Type that defines all the
186 IRQ numbers for each interrupt.
187
188 \b Example:
189
190 The following example shows the extension of the interrupt vector table for the LPC1100 device family.
191
192 \code
193 /*----------------------------------------------------------------------------
194   Exception / Interrupt Handler
195  *----------------------------------------------------------------------------*/
196 /* Exceptions */
197 void WAKEUP0_IRQHandler     (void) __attribute__ ((weak, alias("Default_Handler")));
198 void WAKEUP1_IRQHandler     (void) __attribute__ ((weak, alias("Default_Handler")));
199 void WAKEUP2_IRQHandler     (void) __attribute__ ((weak, alias("Default_Handler")));
200 // :
201 // :
202 void EINT1_IRQHandler       (void) __attribute__ ((weak, alias("Default_Handler")));
203 void EINT2_IRQHandler       (void) __attribute__ ((weak, alias("Default_Handler")));
204 // :
205 // :
206
207 /*----------------------------------------------------------------------------
208   Exception / Interrupt Vector table
209  *----------------------------------------------------------------------------*/
210 extern const pFunc __VECTOR_TABLE[240];
211        const pFunc __VECTOR_TABLE[240] __VECTOR_TABLE_ATTRIBUTE = {
212   (pFunc)(&__INITIAL_SP),                   /*     Initial Stack Pointer */
213   Reset_Handler,                            /*     Reset Handler */
214   NMI_Handler,                              /* -14 NMI Handler */
215   HardFault_Handler,                        /* -13 Hard Fault Handler */
216   MemManage_Handler,                        /* -12 MPU Fault Handler */
217   BusFault_Handler,                         /* -11 Bus Fault Handler */
218   UsageFault_Handler,                       /* -10 Usage Fault Handler */
219   0,                                        /*     Reserved */
220   0,                                        /*     Reserved */
221   0,                                        /*     Reserved */
222   0,                                        /*     Reserved */
223   SVC_Handler,                              /*  -5 SVCall Handler */
224   DebugMon_Handler,                         /*  -4 Debug Monitor Handler */
225   0,                                        /*     Reserved */
226   PendSV_Handler,                           /*  -2 PendSV Handler */
227   SysTick_Handler,                          /*  -1 SysTick Handler */
228
229   /* Interrupts */
230   WAKEUP0_IRQHandler,                       /*   0 Wakeup PIO0.0 */
231   WAKEUP1_IRQHandler,                       /*   1 Wakeup PIO0.1 */
232   WAKEUP2_IRQHandler,                       /*   2 Wakeup PIO0.2 */
233   // :
234   // :
235   EINT1_IRQHandler,                         /*  30 PIO INT1 */
236   EINT2_IRQHandler,                         /*  31 PIO INT2 */
237   // :
238   // :
239 };
240 \endcode
241
242 \section startup_c_sec startup_Device.c Template File
243
244 A compiler agnostic \ref startup_c_sec for an Armv7-M processor like Cortex-M3 is shown below.
245 The C startup file relys on certain compiler specific preprocessor defines specified in CMSIS compiler headers:
246  - \ref __INITIAL_SP
247  - \ref __STACK_LIMIT
248  - \ref __PROGRAM_START
249  - \ref __VECTOR_TABLE
250  - \ref __VECTOR_TABLE_ATTRIBUTE
251  
252 \verbinclude "Source\startup_Device.c"
253 */
254
255 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
256 /**
257 \page startup_s_pg Startup File startup_<device>.s (deprecated)
258
259 The \ref startup_s_pg contains:
260  - The reset handler which is executed after CPU reset and typically calls the \ref SystemInit function.
261  - The setup values for the Main Stack Pointer (MSP).
262  - Exception vectors of the Cortex-M Processor with weak functions that implement default routines.
263  - Interrupt vectors that are device specific with weak functions that implement default routines.
264
265 The file exists for each supported toolchain and is the only tool-chain specific CMSIS file.
266
267 To adapt the file to a new device only the interrupt vector table needs to be extended with
268 the device-specific interrupt handlers. The naming convention for the interrupt handler names are
269 &lt;interrupt_name&gt;_IRQHandler.  This table needs to be consistent with \ref IRQn_Type that defines all the
270 IRQ numbers for each interrupt.
271
272 \b Example:
273
274 The following example shows the extension of the interrupt vector table for the LPC1100 device family.
275
276 \code
277                 ; External Interrupts
278                 DCD     WAKEUP0_IRQHandler       ; 16+ 0: Wakeup PIO0.0
279                 DCD     WAKEUP1_IRQHandler       ; 16+ 1: Wakeup PIO0.1
280                 DCD     WAKEUP2_IRQHandler       ; 16+ 2: Wakeup PIO0.2
281                  :       :
282                  :       :
283                 DCD     EINT1_IRQHandler         ; 16+30: PIO INT1
284                 DCD     EINT0_IRQHandler         ; 16+31: PIO INT0
285    :
286    :
287                 EXPORT  WAKEUP0_IRQHandler       [WEAK]
288                 EXPORT  WAKEUP1_IRQHandler       [WEAK]
289                 EXPORT  WAKEUP2_IRQHandler       [WEAK]
290                  :       :
291                  :       :
292                 EXPORT  EINT1_IRQHandler         [WEAK]
293                 EXPORT  EINT0_IRQHandler         [WEAK]
294
295 WAKEUP0_IRQHandler
296 WAKEUP1_IRQHandler
297 WAKEUP1_IRQHandler
298       :
299       :
300 EINT1_IRQHandler
301 EINT0_IRQHandler
302                 B       .
303
304 \endcode
305
306 \section startup_s_sec startup_Device.s Template File
307
308 An Arm Compiler \ref startup_s_sec for an Armv7-M processor like Cortex-M3 is shown below.
309 The files for other compiler vendors differ slightly in the syntax, but not in the overall structure.
310
311 \verbinclude "Source\ARM\startup_Device.s"
312 */
313
314 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
315 /**
316 \page system_c_pg System Configuration Files system_<device>.c and system_<device>.h
317
318 The \ref system_c_pg provides as a minimum the functions described under \ref system_init_gr.
319 These functions are device specific and need adaptations. In addition, the file might have
320 configuration settings for the device such as XTAL frequency or PLL prescaler settings.
321
322 For devices with external memory BUS the system_<device>.c also configures the BUS system.
323
324 The silicon vendor might expose other functions (i.e. for power configuration) in the system_<device>.c file.
325 In case of additional features the function prototypes need to be added to the system_<device>.h header file.
326
327 \section system_Device_sec system_Device.c Template File
328
329 The \ref system_Device_sec for the Cortex-M3 is shown below.
330
331 \verbinclude "Source\system_Device.c"
332
333 \section system_Device_h_sec system_Device.h Template File
334
335 The system_<device>.h header file contains prototypes to access the public functions in the system_<device>.c file.
336 The \ref system_Device_h_sec is shown below.
337
338 \verbinclude "Include\system_Device.h"
339
340 */
341
342 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
343 /**
344 \page device_h_pg Device Header File <device.h>
345
346 The \ref device_h_pg contains the following sections that are device specific:
347
348   - \ref interrupt_number_sec provides interrupt numbers (IRQn) for all exceptions and interrupts of the device.
349   - \ref core_config_sect reflect the features of the device.
350   - \ref device_access provides definitions for the \ref peripheral_gr to all device peripherals. It contains all data structures and the address mapping for device-specific peripherals.
351   - <b>Access Functions for Peripherals (optional)</b> provide additional helper functions for peripherals that are useful for programming of these peripherals. Access Functions may be provided as inline functions or can be extern references to a device-specific library provided by the silicon vendor.
352
353 <a href="Modules.html">\b Reference </a> describes the standard features and functions of the \ref device_h_pg in detail.
354
355 \section interrupt_number_sec Interrupt Number Definition
356
357 \ref device_h_pg contains the enumeration \ref IRQn_Type that defines all exceptions and interrupts of the device.
358   - Negative IRQn values represent processor core exceptions (internal interrupts).
359   - Positive IRQn values represent device-specific exceptions (external interrupts). The first device-specific interrupt has the IRQn value 0.
360     The IRQn values needs extension to reflect the device-specific interrupt vector table in the \ref startup_s_pg.
361
362 \b Example:
363
364 The following example shows the extension of the interrupt vector table for the LPC1100 device family.
365
366 \code
367 typedef enum IRQn
368 {
369 /******  Cortex-M0 Processor Exceptions Numbers ***************************************************/
370   NonMaskableInt_IRQn           = -14,      /*!< 2 Non Maskable Interrupt                         */
371   HardFault_IRQn                = -13,      /*!< 3 Cortex-M0 Hard Fault Interrupt                 */
372   SVCall_IRQn                   = -5,       /*!< 11 Cortex-M0 SV Call Interrupt                   */
373   PendSV_IRQn                   = -2,       /*!< 14 Cortex-M0 Pend SV Interrupt                   */
374   SysTick_IRQn                  = -1,       /*!< 15 Cortex-M0 System Tick Interrupt               */
375
376 /******  LPC11xx/LPC11Cxx Specific Interrupt Numbers **********************************************/
377   WAKEUP0_IRQn                  = 0,        /*!< All I/O pins can be used as wakeup source.       */
378   WAKEUP1_IRQn                  = 1,        /*!< There are 13 pins in total for LPC11xx           */
379   WAKEUP2_IRQn                  = 2,
380                  :       :
381                  :       :
382   EINT1_IRQn                    = 30,       /*!< External Interrupt 1 Interrupt                   */
383   EINT0_IRQn                    = 31,       /*!< External Interrupt 0 Interrupt                   */
384 } IRQn_Type;
385 \endcode
386
387 \section core_config_sect Configuration of the Processor and Core Peripherals
388
389 The \ref device_h_pg  configures the Cortex-M or SecurCore processor and the core peripherals with <i>\#defines</i>
390 that are set prior to including the file <b>core_<cpu>.h</b>.
391
392 The following tables list the <i>\#defines</i> along with the possible values for each processor core.
393 If these <i>\#defines</i> are missing default values are used.
394
395 \b core_cm0.h
396 <table class="cmtable">
397     <tr>
398       <th>\#define</th>
399       <th>Value Range</th>
400       <th>Default</th>
401       <th>Description</th>
402     </tr>
403     <tr>
404       <td>__CM0_REV</td>
405       <td>0x0000</td>
406       <td>0x0000</td>
407       <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
408     </tr>
409     <tr>
410       <td>__NVIC_PRIO_BITS</td>
411       <td>2</td>
412       <td>2</td>
413       <td>Number of priority bits implemented in the NVIC (device specific)</td>
414     </tr>
415     <tr>
416       <td>__Vendor_SysTickConfig</td>
417       <td>0 .. 1</td>
418       <td>0</td>
419       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
420     is excluded. In this case, the file <i><b>device.h</b></i>
421     must contain a vendor specific implementation of this function.</td>
422     </tr>
423 </table>
424
425 \b core_cm0plus.h
426 <table class="cmtable">
427     <tr>
428       <th>\#define</th>
429       <th>Value Range</th>
430       <th>Default</th>
431       <th>Description</th>
432     </tr>
433     <tr>
434       <td>__CM0PLUS_REV</td>
435       <td>0x0000</td>
436       <td>0x0000</td>
437       <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
438     </tr>
439     <tr>
440       <td>__NVIC_PRIO_BITS</td>
441       <td>2</td>
442       <td>2</td>
443       <td>Number of priority bits implemented in the NVIC (device specific)</td>
444     </tr>
445     <tr>
446       <td>__Vendor_SysTickConfig</td>
447       <td>0 .. 1</td>
448       <td>0</td>
449       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
450     is excluded. In this case, the file <i><b>device.h</b></i>
451     must contain a vendor specific implementation of this function.</td>
452     </tr>
453 </table>
454
455 \b core_cm3.h
456 <table class="cmtable">
457     <tr>
458       <th>\#define</th>
459       <th>Value Range</th>
460       <th>Default</th>
461       <th>Description</th>
462     </tr>
463     <tr>
464       <td>__CM3_REV</td>
465       <td>0x0101 | 0x0200</td>
466       <td>0x0200</td>
467       <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
468     </tr>
469     <tr>
470       <td>__NVIC_PRIO_BITS</td>
471       <td>2 .. 8</td>
472       <td>4</td>
473       <td>Number of priority bits implemented in the NVIC (device specific)</td>
474     </tr>
475     <tr>
476       <td>__MPU_PRESENT</td>
477       <td>0 .. 1</td>
478       <td>0</td>
479       <td>Defines if a MPU is present or not</td>
480     </tr>
481     <tr>
482       <td>__Vendor_SysTickConfig</td>
483       <td>0 .. 1</td>
484       <td>0</td>
485       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
486     is excluded. In this case, the file <i><b>device.h</b></i>
487     must contain a vendor specific implementation of this function.</td>
488     </tr>
489 </table>
490
491 \b core_cm4.h
492 <table class="cmtable">
493     <tr>
494       <th>\#define</th>
495       <th>Value Range</th>
496       <th>Default</th>
497       <th>Description</th>
498     </tr>
499     <tr>
500       <td>__CM4_REV</td>
501       <td>0x0000</td>
502       <td>0x0000</td>
503       <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
504     </tr>
505     <tr>
506       <td>__NVIC_PRIO_BITS</td>
507       <td>2 .. 8</td>
508       <td>4</td>
509       <td>Number of priority bits implemented in the NVIC (device specific)</td>
510     </tr>
511     <tr>
512       <td>__MPU_PRESENT</td>
513       <td>0 .. 1</td>
514       <td>0</td>
515       <td>Defines if a MPU is present or not</td>
516     </tr>
517     <tr>
518       <td>__FPU_PRESENT</td>
519       <td>0 .. 1</td>
520       <td>0</td>
521       <td>Defines if a FPU is present or not</td>
522     </tr>
523     <tr>
524       <td>__Vendor_SysTickConfig</td>
525       <td>0 .. 1</td>
526       <td>0</td>
527       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
528     is excluded. In this case, the file <i><b>device.h</b></i>
529     must contain a vendor specific implementation of this function.</td>
530     </tr>
531 </table>
532
533 \b core_cm7.h
534 <table class="cmtable" summary="">
535     <tr>
536       <th>\#define</th>
537       <th>Value Range</th>
538       <th>Default</th>
539       <th>Description</th>
540     </tr>
541     <tr>
542       <td>__CM7_REV</td>
543       <td>0x0000</td>
544       <td>0x0000</td>
545       <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
546     </tr>
547     <tr>
548       <td>__MPU_PRESENT</td>
549       <td>0 .. 1</td>
550       <td>0</td>
551       <td>Defines if a MPU is present or not</td>
552     </tr>
553     <tr>
554       <td>__NVIC_PRIO_BITS</td>
555       <td>2 .. 8</td>
556       <td>4</td>
557       <td>Number of priority bits implemented in the NVIC (device specific)</td>
558     </tr>
559     <tr>
560       <td>__Vendor_SysTickConfig</td>
561       <td>0 .. 1</td>
562       <td>0</td>
563       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
564     is excluded. In this case, the file <i><b>device.h</b></i>
565     must contain a vendor specific implementation of this function.</td>
566     </tr>
567     <tr>
568       <td>__FPU_PRESENT</td>
569       <td>0 .. 1</td>
570       <td>0</td>
571       <td>Defines if a FPU is present or not. See <b>__FPU_DP</b> description below.</td>
572     </tr>
573     <tr>
574       <td>__FPU_DP</td>
575       <td>0 .. 1</td>
576       <td>0</td>
577       <td>The combination of the defines <b>__FPU_PRESENT</b> and <b>__FPU_DP</b>
578          determine the whether the FPU is with single or double precision as shown in the table below.
579        \n\n
580        <table class="cmtable" summary="">
581      <tr  bgcolor="cyan">
582            <td><b>__FPU_PRESENT</b></td>
583        <td><b>__FPU_DP</b></td>
584        <td><b>Description</b></td>
585      </tr>
586      <tr>
587        <td align="center">0</td>
588        <td align="center"><i>ignored</i></td>
589        <td>Processor has no FPU. The value set for <b>__FPU_DP</b> has no influence. </td>
590      </tr>
591      <tr>
592        <td align="center">1</td>
593        <td align="center">0</td>
594        <td>Processor with FPU with single precision. The file <b>ARMCM7_SP.h</b> has preconfigured settings for this combination.</td>
595      </tr>
596      <tr>
597        <td align="center">1</td>
598        <td align="center">1</td>
599            <td>Processor with FPU with double precision. The file <b>ARMCM7_DP.h</b> has preconfigured settings for this combination.</td>
600      </tr>
601      </table>
602     </td>
603     </tr>
604     <tr>
605       <td>__ICACHE_PRESENT</td>
606       <td>0 .. 1</td>
607       <td>1</td>
608       <td>Instruction Chache present or not</td>
609     </tr>
610     <tr>
611       <td>__DCACHE_PRESENT</td>
612       <td>0 .. 1</td>
613       <td>1</td>
614       <td>Data Chache present or not</td>
615     </tr>
616     <tr>
617       <td>__DTCM_PRESENT</td>
618       <td>0 .. 1</td>
619       <td>1</td>
620       <td>Data Tightly Coupled Memory is present or not</td>
621     </tr>
622 </table>
623
624 \if ARMSC
625 \b core_sc000.h
626 <table class="cmtable">
627     <tr>
628       <th>\#define</th>
629       <th>Value Range</th>
630       <th>Default</th>
631       <th>Description</th>
632     </tr>
633     <tr>
634       <td>__SC000_REV</td>
635       <td>0x0000</td>
636       <td>0x0000</td>
637       <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
638     </tr>
639     <tr>
640       <td>__NVIC_PRIO_BITS</td>
641       <td>2</td>
642       <td>2</td>
643       <td>Number of priority bits implemented in the NVIC (device specific)</td>
644     </tr>
645     <tr>
646       <td>__MPU_PRESENT</td>
647       <td>0 .. 1</td>
648       <td>0</td>
649       <td>Defines if a MPU is present or not</td>
650     </tr>
651     <tr>
652       <td>__Vendor_SysTickConfig</td>
653       <td>0 .. 1</td>
654       <td>0</td>
655       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
656     is excluded. In this case, the file <i><b>device.h</b></i>
657     must contain a vendor specific implementation of this function.</td>
658     </tr>
659 </table>
660 \endif 
661
662 \if ARMSC
663 \b core_sc300.h
664 <table class="cmtable">
665     <tr>
666       <th>\#define</th>
667       <th>Value Range</th>
668       <th>Default</th>
669       <th>Description</th>
670     </tr>
671     <tr>
672       <td>__SC300_REV</td>
673       <td>0x0000</td>
674       <td>0x0000</td>
675       <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
676     </tr>
677     <tr>
678       <td>__NVIC_PRIO_BITS</td>
679       <td>2 .. 8</td>
680       <td>4</td>
681       <td>Number of priority bits implemented in the NVIC (device specific)</td>
682     </tr>
683     <tr>
684       <td>__MPU_PRESENT</td>
685       <td>0 .. 1</td>
686       <td>0</td>
687       <td>Defines if a MPU is present or not</td>
688     </tr>
689     <tr>
690       <td>__Vendor_SysTickConfig</td>
691       <td>0 .. 1</td>
692       <td>0</td>
693       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
694     is excluded. In this case, the file <i><b>device.h</b></i>
695     must contain a vendor specific implementation of this function.</td>
696     </tr>
697 </table>
698 \endif 
699
700 \if ARMv8M
701 \b core_CM23.h or \b core_ARMv8MBL.h
702 <table class="cmtable">
703     <tr>
704       <th>\#define</th>
705       <th>Value Range</th>
706       <th>Default</th>
707       <th>Description</th>
708     </tr>
709     <tr>
710       <td>__ARMv8MBL_REV</td>
711       <td>0x0000</td>
712       <td>0x0000</td>
713       <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
714     </tr>
715     <tr>
716       <td>__MPU_PRESENT</td>
717       <td>0 .. 1</td>
718       <td>0</td>
719       <td>Defines if a MPU is present or not</td>
720     </tr>
721     <tr>
722       <td>__SAUREGION_PRESENT</td>
723       <td>0 .. 1</td>
724       <td>0</td>
725       <td>Defines if SAU regions are present or not</td>
726     </tr>
727     <tr>
728       <td>__VTOR_PRESENT</td>
729       <td>0 .. 1</td>
730       <td>0</td>
731       <td>Defines if a VTOR register is present or not</td>
732     </tr>
733     <tr>
734       <td>__NVIC_PRIO_BITS</td>
735       <td>2</td>
736       <td>2</td>
737       <td>Number of priority bits implemented in the NVIC (device specific)</td>
738     </tr>
739     <tr>
740       <td>__Vendor_SysTickConfig</td>
741       <td>0 .. 1</td>
742       <td>0</td>
743       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
744     is excluded. In this case, the file <i><b>device.h</b></i>
745     must contain a vendor specific implementation of this function.</td>
746     </tr>
747 </table>
748 \endif
749
750 \if ARMv8M
751 \b core_CM33.h or \b core_cm35p.h or \b core_ARMv8MML.h
752 <table class="cmtable">
753     <tr>
754       <th>\#define</th>
755       <th>Value Range</th>
756       <th>Default</th>
757       <th>Description</th>
758     </tr>
759     <tr>
760       <td>__ARMv8MML_REV</td>
761       <td>0x0000</td>
762       <td>0x0000</td>
763       <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
764     </tr>
765     <tr>
766       <td>__MPU_PRESENT</td>
767       <td>0 .. 1</td>
768       <td>0</td>
769       <td>Defines if a MPU is present or not</td>
770     </tr>
771     <tr>
772       <td>__SAUREGION_PRESENT</td>
773       <td>0 .. 1</td>
774       <td>0</td>
775       <td>Defines if SAU regions are present or not</td>
776     </tr>
777     <tr>
778       <td>__FPU_PRESENT</td>
779       <td>0 .. 1</td>
780       <td>0</td>
781       <td>Defines if a FPU is present or not</td>
782     </tr>
783     <tr>
784       <td>__NVIC_PRIO_BITS</td>
785       <td>2 .. 8</td>
786       <td>3</td>
787       <td>Number of priority bits implemented in the NVIC (device specific)</td>
788     </tr>
789     <tr>
790       <td>__Vendor_SysTickConfig</td>
791       <td>0 .. 1</td>
792       <td>0</td>
793       <td>If this define is set to 1, then the default <b>SysTick_Config</b> function
794     is excluded. In this case, the file <i><b>device.h</b></i>
795     must contain a vendor specific implementation of this function.</td>
796     </tr>
797 </table>
798 \endif
799
800 \b Example
801
802 The following code exemplifies the configuration of the Cortex-M4 Processor and Core Peripherals.
803
804 \code
805 #define __CM4_REV                 0x0001    /* Core revision r0p1                                 */
806 #define __MPU_PRESENT             1         /* MPU present or not                                 */
807 #define __NVIC_PRIO_BITS          3         /* Number of Bits used for Priority Levels            */
808 #define __Vendor_SysTickConfig    0         /* Set to 1 if different SysTick Config is used       */
809 #define __FPU_PRESENT             1         /* FPU present or not                                 */
810 .
811 .
812 #include <core_cm4.h>                       /* Cortex-M4 processor and core peripherals           */
813 \endcode
814
815
816 \section core_version_sect   CMSIS Version and Processor Information
817
818 Defines in the core_<i>cpu</i>.h file identify the version of the CMSIS-Core (Cortex-M) and the processor used.
819 The following shows the defines in the various core_<i>cpu</i>.h files that may be used in the \ref device_h_pg
820 to verify a minimum version or ensure that the right processor core is used.
821
822 \b core_cm0.h
823 \code
824 #define __CM0_CMSIS_VERSION_MAIN  (5U)                                 /* [31:16] CMSIS HAL main version */
825 #define __CM0_CMSIS_VERSION_SUB   (0U)                                 /* [15:0]  CMSIS HAL sub version */
826 #define __CM0_CMSIS_VERSION       ((__CM0_CMSIS_VERSION_MAIN << 16U) | \
827                                     __CM0_CMSIS_VERSION_SUB          ) /* CMSIS HAL version number */
828  
829 #define __CORTEX_M                (0U)                                 /* Cortex-M Core */
830 \endcode
831
832
833 \b core_cm0plus.h
834 \code
835 #define __CM0PLUS_CMSIS_VERSION_MAIN  (5U)                                  /* [31:16] CMSIS HAL main version */
836 #define __CM0PLUS_CMSIS_VERSION_SUB   (0U)                                  /* [15:0]  CMSIS HAL sub version */
837 #define __CM0PLUS_CMSIS_VERSION       ((__CM0P_CMSIS_VERSION_MAIN << 16U) | \
838                                         __CM0P_CMSIS_VERSION_SUB          ) /* CMSIS HAL version number */
839  
840 #define __CORTEX_M                    (0U)                                  /* Cortex-M Core */
841 \endcode
842
843
844 \b core_cm1.h
845 \code
846 #define __CM1_CMSIS_VERSION_MAIN  (__CM_CMSIS_VERSION_MAIN)              /*!< \deprecated [31:16] CMSIS HAL main version */
847 #define __CM1_CMSIS_VERSION_SUB   (__CM_CMSIS_VERSION_SUB)               /*!< \deprecated [15:0]  CMSIS HAL sub version */
848 #define __CM1_CMSIS_VERSION       ((__CM1_CMSIS_VERSION_MAIN << 16U) | \
849                                     __CM1_CMSIS_VERSION_SUB           )  /*!< \deprecated CMSIS HAL version number */
850
851 #define __CORTEX_M                (1U)                                   /*!< Cortex-M Core */
852 \endcode
853
854 \b core_cm3.h
855 \code
856 #define __CM3_CMSIS_VERSION_MAIN  (5U)                                 /* [31:16] CMSIS HAL main version */
857 #define __CM3_CMSIS_VERSION_SUB   (0U)                                 /* [15:0]  CMSIS HAL sub version */
858 #define __CM3_CMSIS_VERSION       ((__CM3_CMSIS_VERSION_MAIN << 16U) | \
859                                     __CM3_CMSIS_VERSION_SUB          ) /* CMSIS HAL version number */
860  
861 #define __CORTEX_M                (3U)                                 /* Cortex-M Core */
862 \endcode
863
864 \b core_cm4.h
865 \code
866 #define __CM4_CMSIS_VERSION_MAIN  (5U)                                 /* [31:16] CMSIS HAL main version */
867 #define __CM4_CMSIS_VERSION_SUB   (0U)                                 /* [15:0]  CMSIS HAL sub version */
868 #define __CM4_CMSIS_VERSION       ((__CM4_CMSIS_VERSION_MAIN << 16U) | \
869                                     __CM4_CMSIS_VERSION_SUB          ) /* CMSIS HAL version number */
870  
871 #define __CORTEX_M                (4U)                                 /* Cortex-M Core */
872 \endcode
873
874 \b core_cm7.h
875 \code
876 #define __CM7_CMSIS_VERSION_MAIN  (5U)                                 /* [31:16] CMSIS HAL main version */
877 #define __CM7_CMSIS_VERSION_SUB   (0U)                                 /* [15:0]  CMSIS HAL sub version */
878 #define __CM7_CMSIS_VERSION       ((__CM7_CMSIS_VERSION_MAIN << 16U) | \
879                                     __CM7_CMSIS_VERSION_SUB          ) /* CMSIS HAL version number */
880  
881 #define __CORTEX_M                (7U)                                 /* Cortex-M Core */
882 \endcode
883
884 \if ARMSC
885 \b core_sc000.h
886 \code
887 #define __SC000_CMSIS_VERSION_MAIN  (5U)                                   /* [31:16] CMSIS HAL main version */
888 #define __SC000_CMSIS_VERSION_SUB   (0U)                                   /* [15:0]  CMSIS HAL sub version */
889 #define __SC000_CMSIS_VERSION       ((__SC000_CMSIS_VERSION_MAIN << 16U) | \
890                                       __SC000_CMSIS_VERSION_SUB          ) /* CMSIS HAL version number */
891
892 #define __CORTEX_SC                 (0U)                                   /* Cortex secure core */
893 \endcode
894 \endif 
895
896 \if ARMSC
897 \b core_sc300.h
898 \code
899 #define __SC300_CMSIS_VERSION_MAIN  (5U)                                   /* [31:16] CMSIS HAL main version */
900 #define __SC300_CMSIS_VERSION_SUB   (0U)                                   /* [15:0]  CMSIS HAL sub version */
901 #define __SC300_CMSIS_VERSION       ((__SC300_CMSIS_VERSION_MAIN << 16U) | \
902                                       __SC300_CMSIS_VERSION_SUB          ) /* CMSIS HAL version number */
903
904 #define __CORTEX_SC                 (300U)                                 /* Cortex secure core */
905 \endcode
906 \endif 
907
908 \if ARMv8M
909 \b core_ARMv8MBL.h
910 \code
911 #define __ARMv8MBL_CMSIS_VERSION_MAIN  (5U)                                       /* [31:16] CMSIS HAL main version */
912 #define __ARMv8MBL_CMSIS_VERSION_SUB   (0U)                                       /* [15:0]  CMSIS HAL sub version */
913 #define __ARMv8MBL_CMSIS_VERSION       ((__ARMv8MBL_CMSIS_VERSION_MAIN << 16U) | \
914                                          __ARMv8MBL_CMSIS_VERSION_SUB           ) /* CMSIS HAL version number */
915  
916 #define __CORTEX_M                     (tbd)                                      /* Cortex secure core */
917 \endcode
918 \endif 
919
920 \if ARMv8M
921 \b core_ARMv8MML.h
922 \code
923 #define __ARMv8MML_CMSIS_VERSION_MAIN  (5U)                                       /* [31:16] CMSIS HAL main version */
924 #define __ARMv8MML_CMSIS_VERSION_SUB   (0U)                                       /* [15:0]  CMSIS HAL sub version */
925 #define __ARMv8MML_CMSIS_VERSION       ((__ARMv8MML_CMSIS_VERSION_MAIN << 16U) | \
926                                          __ARMv8MML_CMSIS_VERSION_SUB           ) /* CMSIS HAL version number */
927  
928 #define __CORTEX_M                     (tbd)                                      /* Cortex secure core */
929 \endcode
930 \endif 
931
932 \section device_access Device Peripheral Access Layer
933
934 The \ref device_h_pg contains for each peripheral:
935  - Register Layout Typedef
936  - Base Address
937  - Access Definitions
938
939 The section \ref peripheral_gr shows examples for peripheral definitions.
940
941 \section device_h_sec Device.h Template File
942
943 The silicon vendor needs to extend the Device.h template file with the CMSIS features described above.
944 In addition the \ref device_h_pg may contain functions to access device-specific peripherals.
945 The \ref system_Device_h_sec which is provided as part of the CMSIS specification is shown below.
946
947 \verbinclude "Include\Device.h"
948
949 */
950
951
952
953 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
954 /**
955 \if ARMv8M \page partition_h_pg System Partition Header File partition_<device>.h
956
957 The \ref partition_h_pg contains the initial setup of the TrustZone hardware in an Armv8-M system.
958 The function \ref TZ_SAU_Setup is call from \ref SystemInit and uses the settings in this file to 
959 initialize the Secure Attribute Unit (SAU) and define non-secure interrupts (register NVIC_INIT_ITNS).
960 The following initializations are performed:
961
962   - \ref sau_ctrlregister_sec provides settings for the SAU CTRL register.
963   - \ref sau_regions_sect provides configuration of the SAU Address Regions.
964   - \ref sau_sleepexception_sec provides device-specific deepsleep and exception settings.
965   - \ref sau_interrupttarget_sec provides device-specific interrupt target settings.
966
967 \section sau_ctrlregister_sec  SAU CTRL register settings
968 <table class="cmtable">
969     <tr>
970       <th>\#define</th>
971       <th>Value Range</th>
972       <th>Default</th>
973       <th>Description</th>
974     </tr>
975     <tr>
976       <td>SAU_INIT_CTRL</td>
977       <td>0 .. 1</td>
978       <td>0</td>
979       <td>Initialize SAU CTRL register or not
980            - 0: do not initialize SAU CTRL register
981            - 1: initialize SAU CTRL register</td>
982     </tr>
983     <tr>
984       <td>SAU_INIT_CTRL_ENABLE</td>
985       <td>0 .. 1</td>
986       <td>0</td>
987       <td>enable/disable the SAU
988            - 0: disable SAU
989            - 1: enable SAU</td>
990     </tr>
991     <tr>
992       <td>SAU_INIT_CTRL_ALLNS</td>
993       <td>0 .. 1</td>
994       <td>0</td>
995       <td>value for SAU_CTRL register bit ALLNS
996            - 0: all Memory is Secure
997            - 1: all Memory is Non-Secure</td>
998     </tr>
999 </table>
1000
1001 \section sau_regions_sect  Configuration of the SAU Address Regions
1002 <table class="cmtable">
1003     <tr>
1004       <th>\#define</th>
1005       <th>Value Range</th>
1006       <th>Default</th>
1007       <th>Description</th>
1008     </tr>
1009     <tr>
1010       <td>SAU_REGIONS_MAX</td>
1011       <td>0 .. tbd</td>
1012       <td>8</td>
1013       <td>maximum number of SAU regions</td>
1014     </tr>
1015     <tr>
1016       <td>SAU_INIT_REGION<number></td>
1017       <td>0 .. 1</td>
1018       <td>0</td>
1019       <td>initialize SAU region or not
1020            - 0: do not initialize SAU region
1021            - 1: initialize SAU region</td>
1022     </tr>
1023     <tr>
1024       <td>SAU_INIT_START<number></td>
1025       <td>0x00000000 .. 0xFFFFFFE0\n
1026           [in steps of 32]</td>
1027       <td>0x00000000</td>
1028       <td>region start address</td>
1029     </tr>
1030     <tr>
1031       <td>SAU_INIT_END<number></td>
1032       <td>0x00000000 .. 0xFFFFFFE0\n
1033           [in steps of 32]</td>
1034       <td>0x00000000</td>
1035       <td>region start address</td>
1036     </tr>
1037     <tr>
1038       <td>SAU_INIT_NSC<number></td>
1039       <td>0 .. 1</td>
1040       <td>0</td>
1041       <td>SAU region attribute
1042            - 0: Non-Secure
1043            - 1: Secure, Non-Secure callable</td>
1044     </tr>
1045 </table>
1046
1047 The range of \<number\> is from 0 .. SAU_REGIONS_MAX.
1048 A set of these macros must exist for each \<number\>.
1049
1050 The following example shows a set of SAU region macros.
1051
1052 \code
1053 #define SAU_REGIONS_MAX   8                 /* Max. number of SAU regions */
1054  
1055 #define SAU_INIT_REGION0    1
1056 #define SAU_INIT_START0     0x00000000      /* start address of SAU region 0 */
1057 #define SAU_INIT_END0       0x001FFFE0      /* end address of SAU region 0 */
1058 #define SAU_INIT_NSC0       1
1059  
1060 #define SAU_INIT_REGION1    1
1061 #define SAU_INIT_START1     0x00200000      /* start address of SAU region 1 */
1062 #define SAU_INIT_END1       0x003FFFE0      /* end address of SAU region 1 */
1063 #define SAU_INIT_NSC1       0
1064  
1065 #define SAU_INIT_REGION2    1
1066 #define SAU_INIT_START2     0x20200000      /* start address of SAU region 2 */
1067 #define SAU_INIT_END2       0x203FFFE0      /* end address of SAU region 2 */
1068 #define SAU_INIT_NSC2       0
1069  
1070 #define SAU_INIT_REGION3    1
1071 #define SAU_INIT_START3     0x40000000      /* start address of SAU region 3 */
1072 #define SAU_INIT_END3       0x40040000      /* end address of SAU region 3 */
1073 #define SAU_INIT_NSC3       0
1074  
1075 #define SAU_INIT_REGION4    0
1076 #define SAU_INIT_START4     0x00000000      /* start address of SAU region 4 */
1077 #define SAU_INIT_END4       0x00000000      /* end address of SAU region 4 */
1078 #define SAU_INIT_NSC4       0
1079  
1080 #define SAU_INIT_REGION5    0
1081 #define SAU_INIT_START5     0x00000000      /* start address of SAU region 5 */
1082 #define SAU_INIT_END5       0x00000000      /* end address of SAU region 5 */
1083 #define SAU_INIT_NSC5       0
1084  
1085 #define SAU_INIT_REGION6    0
1086 #define SAU_INIT_START6     0x00000000      /* start address of SAU region 6 */
1087 #define SAU_INIT_END6       0x00000000      /* end address of SAU region 6 */
1088 #define SAU_INIT_NSC6       0
1089  
1090 #define SAU_INIT_REGION7    0
1091 #define SAU_INIT_START7     0x00000000      /* start address of SAU region 7 */
1092 #define SAU_INIT_END7       0x00000000      /* end address of SAU region 7 */
1093 #define SAU_INIT_NSC7       0
1094 \endcode
1095
1096
1097 \section sau_sleepexception_sec  Configuration of Sleep and Exception behaviour
1098 <table class="cmtable">
1099     <tr>
1100       <th>\#define</th>
1101       <th>Value Range</th>
1102       <th>Default</th>
1103       <th>Description</th>
1104     </tr>
1105     <tr>
1106       <td>CSR_INIT_DEEPSLEEPS</td>
1107       <td>0 .. 1</td>
1108       <td>0</td>
1109       <td>value for SCB_CSR register bit DEEPSLEEPS
1110            - 0: Deep Sleep can be enabled by Secure and Non-Secure state
1111            - 1: Deep Sleep can be enabled by Secure state only</td>
1112     </tr>
1113     <tr>
1114       <td>AIRCR_INIT_SYSRESETREQS</td>
1115       <td>0 .. 1</td>
1116       <td>0</td>
1117       <td>value for SCB_AIRCR register bit SYSRESETREQS
1118            - 0: System reset request accessible from Secure and Non-Secure state
1119            - 1: System reset request accessible from Secure state only</td>
1120     </tr>
1121     <tr>
1122       <td>AIRCR_INIT_PRIS</td>
1123       <td>0 .. 1</td>
1124       <td>0</td>
1125       <td>value for SCB_AIRCR register bit PRIS
1126            - 0: Priority of Non-Secure exceptions is Not altered
1127            - 1: Priority of Non-Secure exceptions is Lowered to 0x80-0xFF</td>
1128     </tr>
1129     <tr>
1130       <td>AIRCR_INIT_BFHFNMINS</td>
1131       <td>0 .. 1</td>
1132       <td>0</td>
1133       <td>value for SCB_AIRCR register bit BFHFNMINS
1134            - 0: BusFault, HardFault, and NMI target are Secure state
1135            - 1: BusFault, HardFault, and NMI target are Non-Secure state</td>
1136     </tr>
1137 </table>
1138
1139 \section sau_interrupttarget_sec Configuration of Interrupt Target settings
1140
1141 Each interrupt has a configuration bit that defines the execution
1142 in Secure or Non-secure state. The Non-Secure interrupts have a separate
1143 vector table.  Refer to \ref Model_TrustZone for more information.
1144
1145 <table class="cmtable">
1146     <tr>
1147       <th>\#define</th>
1148       <th>Value Range</th>
1149       <th>Default</th>
1150       <th>Description</th>
1151     </tr>
1152     <tr>
1153       <td>NVIC_INIT_ITNS<number></td>
1154       <td>0x00000000 .. 0xFFFFFFFF\n
1155           [each bit represents an interrupt]</td>
1156       <td>0x00000000</td>
1157       <td>Interrupt vector target
1158            - 0: Secure state
1159            - 1: Non-Secure state</td>
1160     </tr>
1161 </table>
1162
1163 The range of \<number\> is 0 .. (\<number of external interrupts\> + 31) / 32.
1164
1165 The following example shows the configuration for a maximum of 64 external interrupts.
1166
1167 \code
1168 #define NVIC_INIT_ITNS0      0x0000122B
1169 #define NVIC_INIT_ITNS1      0x0000003A
1170 \endcode
1171
1172 \endif
1173 */
1174
1175
1176 */