2 \page templates_pg CMSIS-Core Device Templates
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.
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.
15 The detailed file structure of the CMSIS-Core device templates is shown in the following picture.
17 \image html "CMSIS_CORE_Files.png" "CMSIS-Core File Structure"
19 \section CMSIS_Processor_files CMSIS-Core Processor Files
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_<cpu>.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:
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
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 core_cm55.h | for the Cortex-M55 processor
38 core_sc000.h | for the SecurCore SC000 processor
39 core_sc300.h | for the SecurCore SC300 processor
42 core_armv8mbl.h | for the Armv8-M Baseline processor
43 core_armv8mml.h | for the Armv8-M Mainline processor
44 core_armv81mml.h | for the Armv8.1-M Mainline processor
46 \section device_examples Device Examples
48 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
49 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>:
51 Family | Device | Description
52 :------ |:------ |:-----------
53 ARM Cortex-M0 | ARMCM0 | Cortex-M0 based device
54 ARM Cortex-M0 plus | ARMCM0P | Cortex-M0+ based device
55 ARM Cortex-M3 | ARMCM3 | Cortex-M3 based device
56 ARM Cortex-M4 | ARMCM4 | Cortex-M4 based device without floating-point hardware
57 ARM Cortex-M4 | ARMCM4_FP | Cortex-M4 based device with floating-point hardware
58 ARM Cortex-M7 | ARMCM7 | Cortex-M4 based device without floating-point hardware
59 ARM Cortex-M7 | ARMCM7_FP | Cortex-M7 based device with single precision floating-point unit (FPU)
60 ARM Cortex-M7 | ARMCM7_DP | Cortex-M7 based device with double precision floating-point unit
61 ARM Cortex-M7 | ARMCM7 | Cortex-M7 based device without floating-point hardware
63 ARM Cortex-M23 | ARMCM23 | Cortex-M23 based device without TrustZone
64 ARM Cortex-M23 | ARMCM23_TZ | Cortex-M23 based device with TrustZone
65 ARM Cortex-M33 | ARMCM33 | Cortex-M33 based device without TrustZone, SIMD, FPU
66 ARM Cortex-M33 | ARMCM33_TZ | Cortex-M33 based device with TrustZone, no SIMD, no FPU
67 ARM Cortex-M33 | ARMCM33_DSP_FP | Cortex-M33 based device with SIMD, FPU, no TrustZone
68 ARM Cortex-M33 | ARMCM33_DSP_FP_TZ | Cortex-M33 based device with TrustZone, SIMD, FPU
69 ARM Cortex-M35P | ARMCM35P | Cortex-M35P based device without TrustZone, SIMD, FPU
70 ARM Cortex-M35P | ARMCM35P_TZ | Cortex-M35P based device with TrustZone, no SIMD, no FPU
71 ARM Cortex-M35P | ARMCM35P_DSP_FP | Cortex-M35P based device with SIMD, FPU, no TrustZone
72 ARM Cortex-M35P | ARMCM35P_DSP_FP_TZ | Cortex-M35P based device with TrustZone, SIMD, FPU
73 ARM Cortex-M55 | ARMCM55 | Cortex-M55 based device with TrustZone, SIMD, double precision FPU, and floating-point MVE
76 ARM SC000 | ARM SC000 | SC000 based device
77 ARM SC300 | ARM SC300 | SC300 based device
80 ARMv8-M Baseline | ARMv8MBL | Armv8-M Baseline based device with TrustZone
81 ARMv8-M Mainline | ARMv8MML | Armv8-M Mainline based device with TrustZone
82 ARMv8-M Mainline | ARMv8MML_DP | Armv8-M Mainline based device with TrustZone and double precision FPU
83 ARMv8-M Mainline | ARMv8MML_SP | Armv8-M Mainline based device with TrustZone and single precision FPU
84 ARMv8-M Mainline | ARMv8MML_DSP | Armv8-M Mainline based device with TrustZone and SIMD
85 ARMv8-M Mainline | ARMv8MML_DSP_DP | Armv8-M Mainline based device with TrustZone, SIMD, and double precision FPU
86 ARMv8-M Mainline | ARMv8MML_DSP_SP | Armv8-M Mainline based device with TrustZone, SIMD, and single precision FPU
87 ARMv8.1-M Mainline | ARMv81MML_DSP_DP_MVE_FP | Armv8.1-M Mainline based device with TrustZone, SIMD, double precision FPU, and floating-point MVE
90 \section template_files_sec Template Files
92 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.
93 Silicon vendors add to these template files the following information:
94 - <b>Device Peripheral Access Layer</b> that provides definitions for device-specific peripherals.
95 - <b>Access Functions for Peripherals</b> (optional) that provides additional helper functions to access device-specific peripherals.
96 - <b>Interrupt vectors</b> in the startup file that are device specific.
98 <table class="cmtable">
100 <th>Template File</th>
104 <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\ARM\\startup_Device_ac5_noSct.s</td>
105 <td>Startup file template for Arm Compiler V5. No linker description file necessary.<br>
106 <b>Deprecated</b></td>
109 <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\ARM\\startup_Device_ac5.s</td>
110 <td>Startup file template for Arm Compiler V5. Use of linker description file is <b>necessary</b>.<br>
111 <b>Deprecated</b></td>
114 <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\ARM\\startup_Device_ac6.S</td>
115 <td>Preprocessed startup file template for Arm Compiler V6. Use of linker description file is <b>necessary</b>.<br>
116 <b>Deprecated</b></td>
119 <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\ARM\\Device_ac5.sct</td>
120 <td>Linker description file for Arm Compiler V5.<br>
121 <b>Deprecated</b></td>
124 <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\ARM\\Device_ac6.sct</td>
125 <td>Linker description file for Arm Compiler V6.</td>
128 <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\GCC\\startup_Device.S</td>
129 <td>Preprocessed startup file template for GNU GCC Arm Embedded Compiler. Use of linker description file is <b>necessary</b>.<.<br>
130 <b>Deprecated</b></td>
133 <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\GCC\\gcc_arm.ld</td>
134 <td>Linker description file for GNU GCC Arm Embedded Compiler.</td>
137 <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\IAR\\startup_Device.s</td>
138 <td>Startup file template for IAR C/C++ Compiler.</td>
141 <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\startup_Device.c</td>
142 <td>Generic startup_Device.c file for device startup implemented in C. Use of linker description file is necessary.</td>
145 <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\system_Device.c</td>
146 <td>Generic system_Device.c file for system configuration (i.e. processor clock and memory bus system).</td>
149 <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Include\\Device.h</td>
150 <td>Generic device header file. Needs to be extended with the device-specific peripheral registers. Optionally functions that access the peripherals
151 can be part of that file.</td>
154 <td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Include\\system_Device.h</td>
155 <td>Generic system device configuration include file.</td>
160 <b>Adapt Template Files to a Device</b>
162 The following steps describe how to adopt the template files to a specific device or device family.
163 Copy the complete all files in the template directory and replace:
164 - directory name 'Vendor' with the abbreviation for the device vendor e.g.: NXP.
165 - directory name 'Device' with the specific device name e.g.: LPC17xx.
166 - in the file names 'Device' with the specific device name e.g.: LPC17xx.
168 Each template file contains comments that start with \b ToDo: that describe a required modification.
169 The template files contain place holders:
171 <table class="cmtable">
174 <th>Replaced with</th>
177 <td><Device></td>
178 <td>the specific device name or device family name; i.e. LPC17xx.</td>
181 <td><DeviceInterrupt></td>
182 <td>a specific interrupt name of the device; i.e. TIM1 for Timer 1.</td>
184 <td><DeviceAbbreviation></td>
185 <td>short name or abbreviation of the device family; i.e. LPC.</td>
189 <td>the specific Cortex-M processor name; i.e. Cortex-M3.</td>
194 The device configuration of the template files is described in detail on the following pages:
195 - \subpage startup_c_pg
196 - \subpage startup_s_pg (deprecated)
197 - \subpage system_c_pg
198 - \subpage device_h_pg
200 - \subpage partition_h_pg
201 - \subpage partition_gen_h_pg
205 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
207 \page startup_c_pg Startup File startup_<device>.c
209 The \ref startup_c_pg contains:
210 - The reset handler which is executed after CPU reset and typically calls the \ref SystemInit function.
211 - The setup values for the Main Stack Pointer (MSP).
212 - Exception vectors of the Cortex-M Processor with weak functions that implement default routines.
213 - Interrupt vectors that are device specific with weak functions that implement default routines.
215 The file exists for each supported toolchain and is the only tool-chain specific CMSIS file.
217 To adapt the file to a new device only the interrupt vector table needs to be extended with
218 the device-specific interrupt handlers. The naming convention for the interrupt handler names are
219 <interrupt_name>_IRQHandler. This table needs to be consistent with \ref IRQn_Type that defines all the
220 IRQ numbers for each interrupt.
224 The following example shows the extension of the interrupt vector table for the LPC1100 device family.
227 /*----------------------------------------------------------------------------
228 Exception / Interrupt Handler
229 *----------------------------------------------------------------------------*/
231 void WAKEUP0_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
232 void WAKEUP1_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
233 void WAKEUP2_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
236 void EINT1_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
237 void EINT2_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
241 /*----------------------------------------------------------------------------
242 Exception / Interrupt Vector table
243 *----------------------------------------------------------------------------*/
244 extern const pFunc __VECTOR_TABLE[240];
245 const pFunc __VECTOR_TABLE[240] __VECTOR_TABLE_ATTRIBUTE = {
246 (pFunc)(&__INITIAL_SP), /* Initial Stack Pointer */
247 Reset_Handler, /* Reset Handler */
248 NMI_Handler, /* -14 NMI Handler */
249 HardFault_Handler, /* -13 Hard Fault Handler */
250 MemManage_Handler, /* -12 MPU Fault Handler */
251 BusFault_Handler, /* -11 Bus Fault Handler */
252 UsageFault_Handler, /* -10 Usage Fault Handler */
257 SVC_Handler, /* -5 SVC Handler */
258 DebugMon_Handler, /* -4 Debug Monitor Handler */
260 PendSV_Handler, /* -2 PendSV Handler */
261 SysTick_Handler, /* -1 SysTick Handler */
264 WAKEUP0_IRQHandler, /* 0 Wakeup PIO0.0 */
265 WAKEUP1_IRQHandler, /* 1 Wakeup PIO0.1 */
266 WAKEUP2_IRQHandler, /* 2 Wakeup PIO0.2 */
269 EINT1_IRQHandler, /* 30 PIO INT1 */
270 EINT2_IRQHandler, /* 31 PIO INT2 */
276 \section startup_c_sec startup_Device.c Template File
278 A compiler agnostic \ref startup_c_sec for an Armv7-M processor like Cortex-M3 is shown below.
279 The C startup file relys on certain compiler specific preprocessor defines specified in CMSIS compiler headers:
282 - \ref __PROGRAM_START
283 - \ref __VECTOR_TABLE
284 - \ref __VECTOR_TABLE_ATTRIBUTE
286 \verbinclude "Source/startup_Device.c"
287 \section startup_c_sec_v8 startup_Device.c Template File (Armv8-M/v8.1-M)
289 The C-startup file for an Armv8-M/v8.1-M processor is similar to the one for an Armv7-M processor
290 except that it offers the possibility of stack sealing for the Main Stack Pointer (MSP).
291 The following preprocessor defines and CMSIS functions are used:
293 - \ref __TZ_set_STACKSEAL_S
295 The stack sealing and the initialization fof the Stack Limit register is done in function <b>void Reset_Handler(void)</b>:
298 /*----------------------------------------------------------------------------
299 Reset Handler called on controller reset
300 *----------------------------------------------------------------------------*/
301 __NO_RETURN void Reset_Handler(void)
303 __set_PSP((uint32_t)(&__INITIAL_SP));
305 __set_MSPLIM((uint32_t)(&__STACK_LIMIT));
306 __set_PSPLIM((uint32_t)(&__STACK_LIMIT));
308 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
309 __TZ_set_STACKSEAL_S((uint32_t *)(&__STACK_SEAL));
312 SystemInit(); /* CMSIS System Initialization */
313 __PROGRAM_START(); /* Enter PreMain (C library entry point) */
317 \note Stack Sealing also requires the application project to use a scatter file (or a linker script) as explained in \ref RTOS_TrustZone_stacksealing section.
321 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
323 \page startup_s_pg Startup File startup_<device>.s (deprecated)
325 The \ref startup_s_pg contains:
326 - The reset handler which is executed after CPU reset and typically calls the \ref SystemInit function.
327 - The setup values for the Main Stack Pointer (MSP).
328 - Exception vectors of the Cortex-M Processor with weak functions that implement default routines.
329 - Interrupt vectors that are device specific with weak functions that implement default routines.
331 The file exists for each supported toolchain and is the only tool-chain specific CMSIS file.
333 To adapt the file to a new device only the interrupt vector table needs to be extended with
334 the device-specific interrupt handlers. The naming convention for the interrupt handler names are
335 <interrupt_name>_IRQHandler. This table needs to be consistent with \ref IRQn_Type that defines all the
336 IRQ numbers for each interrupt.
340 The following example shows the extension of the interrupt vector table for the LPC1100 device family.
343 ; External Interrupts
344 DCD WAKEUP0_IRQHandler ; 16+ 0: Wakeup PIO0.0
345 DCD WAKEUP1_IRQHandler ; 16+ 1: Wakeup PIO0.1
346 DCD WAKEUP2_IRQHandler ; 16+ 2: Wakeup PIO0.2
349 DCD EINT1_IRQHandler ; 16+30: PIO INT1
350 DCD EINT0_IRQHandler ; 16+31: PIO INT0
353 EXPORT WAKEUP0_IRQHandler [WEAK]
354 EXPORT WAKEUP1_IRQHandler [WEAK]
355 EXPORT WAKEUP2_IRQHandler [WEAK]
358 EXPORT EINT1_IRQHandler [WEAK]
359 EXPORT EINT0_IRQHandler [WEAK]
372 \section startup_s_sec startup_Device.S Template File
374 An Arm Compiler V6 assembler \ref startup_s_sec for an Armv8-M processor like Cortex-M33 is shown below.
375 The files for other compiler vendors differ slightly in the syntax, but not in the overall structure.
377 \verbinclude "Source/ARM/startup_Device_ac6.S"
380 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
382 \page system_c_pg System Configuration Files system_<device>.c and system_<device>.h
384 The \ref system_c_pg provides as a minimum the functions described under \ref system_init_gr.
385 These functions are device specific and need adaptations. In addition, the file might have
386 configuration settings for the device such as XTAL frequency or PLL prescaler settings.
388 For devices with external memory BUS the system_<device>.c also configures the BUS system.
390 The silicon vendor might expose other functions (i.e. for power configuration) in the system_<device>.c file.
391 In case of additional features the function prototypes need to be added to the system_<device>.h header file.
393 \section system_Device_sec system_Device.c Template File
395 The \ref system_Device_sec for the Cortex-M3 is shown below.
397 \verbinclude "Source/system_Device.c"
399 \section system_Device_h_sec system_Device.h Template File
401 The system_<device>.h header file contains prototypes to access the public functions in the system_<device>.c file.
402 The \ref system_Device_h_sec is shown below.
404 \verbinclude "Include/system_Device.h"
408 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
410 \page device_h_pg Device Header File <device.h>
412 The \ref device_h_pg contains the following sections that are device specific:
414 - \ref interrupt_number_sec provides interrupt numbers (IRQn) for all exceptions and interrupts of the device.
415 - \ref core_config_sect reflect the features of the device.
416 - \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.
417 - <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.
419 <a href="Modules.html">\b Reference </a> describes the standard features and functions of the \ref device_h_pg in detail.
421 \section interrupt_number_sec Interrupt Number Definition
423 \ref device_h_pg contains the enumeration \ref IRQn_Type that defines all exceptions and interrupts of the device.
424 - Negative IRQn values represent processor core exceptions (internal interrupts).
425 - Positive IRQn values represent device-specific exceptions (external interrupts). The first device-specific interrupt has the IRQn value 0.
426 The IRQn values needs extension to reflect the device-specific interrupt vector table in the \ref startup_s_pg.
430 The following example shows the extension of the interrupt vector table for the LPC1100 device family.
435 /****** Cortex-M0 Processor Exceptions Numbers ***************************************************/
436 NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */
437 HardFault_IRQn = -13, /*!< 3 Cortex-M0 Hard Fault Interrupt */
438 SVCall_IRQn = -5, /*!< 11 Cortex-M0 SVC Interrupt */
439 PendSV_IRQn = -2, /*!< 14 Cortex-M0 PendSV Interrupt */
440 SysTick_IRQn = -1, /*!< 15 Cortex-M0 System Tick Interrupt */
442 /****** LPC11xx/LPC11Cxx Specific Interrupt Numbers **********************************************/
443 WAKEUP0_IRQn = 0, /*!< All I/O pins can be used as wakeup source. */
444 WAKEUP1_IRQn = 1, /*!< There are 13 pins in total for LPC11xx */
448 EINT1_IRQn = 30, /*!< External Interrupt 1 Interrupt */
449 EINT0_IRQn = 31, /*!< External Interrupt 0 Interrupt */
453 \section core_config_sect Configuration of the Processor and Core Peripherals
455 The \ref device_h_pg configures the Cortex-M or SecurCore processor and the core peripherals with <i>\#defines</i>
456 that are set prior to including the file <b>core_<cpu>.h</b>.
458 The following tables list the <i>\#defines</i> along with the possible values for each processor core.
459 If these <i>\#defines</i> are missing default values are used.
461 <table class="cmtable">
469 <td>\ref __CM0_REV</td>
472 <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
475 <td>\ref __NVIC_PRIO_BITS</td>
478 <td>Number of priority bits implemented in the NVIC (device specific)</td>
481 <td>\ref __Vendor_SysTickConfig</td>
484 <td>Vendor defined <b>SysTick_Config</b> function.</td>
489 <table class="cmtable">
497 <td>\ref __CM0PLUS_REV</td>
500 <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
503 <td>\ref __VTOR_PRESENT</td>
506 <td>Defines if a VTOR register is present or not</td>
509 <td>\ref __NVIC_PRIO_BITS</td>
512 <td>Number of priority bits implemented in the NVIC (device specific)</td>
515 <td>\ref __Vendor_SysTickConfig</td>
518 <td>Vendor defined <b>SysTick_Config</b> function.</td>
523 <table class="cmtable">
531 <td>\ref __CM3_REV</td>
532 <td>0x0101 | 0x0200</td>
534 <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
537 <td>\ref __VTOR_PRESENT</td>
540 <td>Defines if a VTOR register is present or not</td>
543 <td>\ref __NVIC_PRIO_BITS</td>
546 <td>Number of priority bits implemented in the NVIC (device specific)</td>
549 <td>\ref __MPU_PRESENT</td>
552 <td>Defines if a MPU is present or not</td>
555 <td>\ref __Vendor_SysTickConfig</td>
558 <td>Vendor defined <b>SysTick_Config</b> function.</td>
563 <table class="cmtable">
571 <td>\ref __CM4_REV</td>
574 <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
577 <td>\ref __VTOR_PRESENT</td>
580 <td>Defines if a VTOR register is present or not</td>
583 <td>\ref __NVIC_PRIO_BITS</td>
586 <td>Number of priority bits implemented in the NVIC (device specific)</td>
589 <td>\ref __MPU_PRESENT</td>
592 <td>Defines if a MPU is present or not</td>
595 <td>\ref __FPU_PRESENT</td>
598 <td>Defines if a FPU is present or not</td>
601 <td>\ref __Vendor_SysTickConfig</td>
604 <td>Vendor defined <b>SysTick_Config</b> function.</td>
609 <table class="cmtable" summary="">
617 <td>\ref __CM7_REV</td>
620 <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
623 <td>\ref __MPU_PRESENT</td>
626 <td>Defines if a MPU is present or not</td>
629 <td>\ref __VTOR_PRESENT</td>
632 <td>Defines if a VTOR register is present or not</td>
635 <td>\ref __NVIC_PRIO_BITS</td>
638 <td>Number of priority bits implemented in the NVIC (device specific)</td>
641 <td>\ref __Vendor_SysTickConfig</td>
645 If this define is set to 1, then the default <b>SysTick_Config</b> function
646 is excluded. In this case, the file <i><b>device.h</b></i>
647 must contain a vendor specific implementation of this function.
651 <td>\ref __FPU_PRESENT</td>
654 <td>Defines if a FPU is present or not.</td>
657 <td>\ref __FPU_DP</td>
661 The combination of the defines \ref __FPU_PRESENT and \ref __FPU_DP
662 determine whether the FPU is with single or double precision.
666 <td>\ref __ICACHE_PRESENT</td>
669 <td>Instruction Chache present or not</td>
672 <td>\ref __DCACHE_PRESENT</td>
675 <td>Data Chache present or not</td>
678 <td>\ref __DTCM_PRESENT</td>
681 <td>Data Tightly Coupled Memory is present or not</td>
687 <table class="cmtable">
695 <td>\ref __SC000_REV</td>
698 <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
701 <td>\ref __VTOR_PRESENT</td>
704 <td>Defines if a VTOR register is present or not</td>
707 <td>\ref __NVIC_PRIO_BITS</td>
710 <td>Number of priority bits implemented in the NVIC (device specific)</td>
713 <td>\ref __MPU_PRESENT</td>
716 <td>Defines if a MPU is present or not</td>
719 <td>\ref __Vendor_SysTickConfig</td>
722 <td>Vendor defined <b>SysTick_Config</b> function.</td>
729 <table class="cmtable">
737 <td>\ref __SC300_REV</td>
740 <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
743 <td>\ref __VTOR_PRESENT</td>
746 <td>Defines if a VTOR register is present or not</td>
749 <td>\ref __NVIC_PRIO_BITS</td>
752 <td>Number of priority bits implemented in the NVIC (device specific)</td>
755 <td>\ref __MPU_PRESENT</td>
758 <td>Defines if a MPU is present or not</td>
761 <td>\ref __Vendor_SysTickConfig</td>
764 <td>Vendor defined <b>SysTick_Config</b> function.</td>
770 \b core_CM23.h or \b core_ARMv8MBL.h
771 <table class="cmtable">
779 <td>\ref __ARMv8MBL_REV or \ref __CM23_REV</td>
782 <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
785 <td>\ref __MPU_PRESENT</td>
788 <td>Defines if a MPU is present or not</td>
791 <td>\ref __SAUREGION_PRESENT</td>
794 <td>Defines if SAU regions are present or not</td>
797 <td>\ref __VTOR_PRESENT</td>
800 <td>Defines if a VTOR register is present or not</td>
803 <td>\ref __NVIC_PRIO_BITS</td>
806 <td>Number of priority bits implemented in the NVIC (device specific)</td>
809 <td>\ref __Vendor_SysTickConfig</td>
812 <td>Vendor defined <b>SysTick_Config</b> function.</td>
818 \b core_CM33.h or \b core_cm35p.h or \b core_ARMv8MML.h
819 <table class="cmtable">
827 <td>\ref __ARMv8MML_REV or \ref __CM33_REV or \ref __CM35P_REV</td>
830 <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
833 <td>\ref __MPU_PRESENT</td>
836 <td>Defines if a MPU is present or not</td>
839 <td>\ref __SAUREGION_PRESENT</td>
842 <td>Defines if SAU regions are present or not</td>
845 <td>\ref __FPU_PRESENT</td>
848 <td>Defines if a FPU is present or not</td>
851 <td>\ref __VTOR_PRESENT</td>
854 <td>Defines if a VTOR register is present or not</td>
857 <td>\ref __NVIC_PRIO_BITS</td>
860 <td>Number of priority bits implemented in the NVIC (device specific)</td>
863 <td>\ref __Vendor_SysTickConfig</td>
866 <td>Vendor defined <b>SysTick_Config</b> function.</td>
872 \b core_CM55.h or \b core_ARMv81MML.h
873 <table class="cmtable">
881 <td>\ref __ARMv81MML_REV or \ref __CM55_REV</td>
884 <td>Core revision number ([15:8] revision number, [7:0] patch number)</td>
887 <td>\ref __MPU_PRESENT</td>
890 <td>Defines if a MPU is present or not</td>
893 <td>\ref __SAUREGION_PRESENT</td>
896 <td>Defines if SAU regions are present or not</td>
899 <td>\ref __FPU_PRESENT</td>
902 <td>Defines if a FPU is present or not</td>
905 <td>\ref __FPU_DP</td>
909 The combination of the defines \ref __FPU_PRESENT and \ref __FPU_DP determine
910 whether the FPU is with single or double precision.
914 <td>\ref __ICACHE_PRESENT</td>
917 <td>Instruction Chache present or not</td>
920 <td>\ref __DCACHE_PRESENT</td>
923 <td>Data Chache present or not</td>
926 <td>\ref __VTOR_PRESENT</td>
929 <td>Defines if a VTOR register is present or not</td>
932 <td>\ref __NVIC_PRIO_BITS</td>
935 <td>Number of priority bits implemented in the NVIC (device specific)</td>
938 <td>\ref __Vendor_SysTickConfig</td>
941 <td>Vendor defined <b>SysTick_Config</b> function.</td>
948 The following code exemplifies the configuration of the Cortex-M4 Processor and Core Peripherals.
951 #define __CM4_REV 0x0001U /* Core revision r0p1 */
952 #define __MPU_PRESENT 1U /* MPU present or not */
953 #define __VTOR_PRESENT 1U /* VTOR present */
954 #define __NVIC_PRIO_BITS 3U /* Number of Bits used for Priority Levels */
955 #define __Vendor_SysTickConfig 0U /* Set to 1 if different SysTick Config is used */
956 #define __FPU_PRESENT 1U /* FPU present or not */
959 #include <core_cm4.h> /* Cortex-M4 processor and core peripherals */
960 #include "system_<device>.h" /* Device System Header */
964 \section core_version_sect CMSIS Version and Processor Information
966 Defines in the core_<i>cpu</i>.h file identify the version of the CMSIS-Core (Cortex-M) and the processor used.
967 The following shows the defines in the various core_<i>cpu</i>.h files that may be used in the \ref device_h_pg
968 to verify a minimum version or ensure that the right processor core is used.
972 #define __CM0_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /* [31:16] CMSIS HAL main version */
973 #define __CM0_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /* [15:0] CMSIS HAL sub version */
974 #define __CM0_CMSIS_VERSION ((__CM0_CMSIS_VERSION_MAIN << 16U) | \
975 __CM0_CMSIS_VERSION_SUB ) /* CMSIS HAL version number */
977 #define __CORTEX_M (0U) /* Cortex-M Core */
983 #define __CM0PLUS_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /* [31:16] CMSIS HAL main version */
984 #define __CM0PLUS_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /* [15:0] CMSIS HAL sub version */
985 #define __CM0PLUS_CMSIS_VERSION ((__CM0P_CMSIS_VERSION_MAIN << 16U) | \
986 __CM0P_CMSIS_VERSION_SUB ) /* CMSIS HAL version number */
988 #define __CORTEX_M (0U) /* Cortex-M Core */
994 #define __CM1_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */
995 #define __CM1_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */
996 #define __CM1_CMSIS_VERSION ((__CM1_CMSIS_VERSION_MAIN << 16U) | \
997 __CM1_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */
999 #define __CORTEX_M (1U) /*!< Cortex-M Core */
1004 #define __CM3_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /* [31:16] CMSIS HAL main version */
1005 #define __CM3_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /* [15:0] CMSIS HAL sub version */
1006 #define __CM3_CMSIS_VERSION ((__CM3_CMSIS_VERSION_MAIN << 16U) | \
1007 __CM3_CMSIS_VERSION_SUB ) /* CMSIS HAL version number */
1009 #define __CORTEX_M (3U) /* Cortex-M Core */
1014 #define __CM4_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /* [31:16] CMSIS HAL main version */
1015 #define __CM4_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /* [15:0] CMSIS HAL sub version */
1016 #define __CM4_CMSIS_VERSION ((__CM4_CMSIS_VERSION_MAIN << 16U) | \
1017 __CM4_CMSIS_VERSION_SUB ) /* CMSIS HAL version number */
1019 #define __CORTEX_M (4U) /* Cortex-M Core */
1024 #define __CM7_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN /* [31:16] CMSIS HAL main version */
1025 #define __CM7_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /* [15:0] CMSIS HAL sub version */
1026 #define __CM7_CMSIS_VERSION ((__CM7_CMSIS_VERSION_MAIN << 16U) | \
1027 __CM7_CMSIS_VERSION_SUB ) /* CMSIS HAL version number */
1029 #define __CORTEX_M (7U) /* Cortex-M Core */
1035 #define __CM23_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /* [31:16] CMSIS HAL main version */
1036 #define __CM23_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /* [15:0] CMSIS HAL sub version */
1037 #define __CM23_CMSIS_VERSION ((__CM23_CMSIS_VERSION_MAIN << 16U) | \
1038 __CM23_CMSIS_VERSION_SUB ) /* CMSIS HAL version number */
1040 #define __CORTEX_M (23U) /* Cortex-M Core */
1045 #define __CM33_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /* [31:16] CMSIS HAL main version */
1046 #define __CM33_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /* [15:0] CMSIS HAL sub version */
1047 #define __CM33_CMSIS_VERSION ((__CM33_CMSIS_VERSION_MAIN << 16U) | \
1048 __CM33_CMSIS_VERSION_SUB ) /* CMSIS HAL version number */
1050 #define __CORTEX_M (33U) /* Cortex-M Core */
1055 #define __CM55_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /* [31:16] CMSIS HAL main version */
1056 #define __CM55_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /* [15:0] CMSIS HAL sub version */
1057 #define __CM55_CMSIS_VERSION ((__CM55_CMSIS_VERSION_MAIN << 16U) | \
1058 __CM55_CMSIS_VERSION_SUB ) /* CMSIS HAL version number */
1060 #define __CORTEX_M (7U) /* Cortex-M Core */
1067 #define __SC000_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /* [31:16] CMSIS HAL main version */
1068 #define __SC000_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /* [15:0] CMSIS HAL sub version */
1069 #define __SC000_CMSIS_VERSION ((__SC000_CMSIS_VERSION_MAIN << 16U) | \
1070 __SC000_CMSIS_VERSION_SUB ) /* CMSIS HAL version number */
1072 #define __CORTEX_SC (0U) /* Cortex secure core */
1079 #define __SC300_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /* [31:16] CMSIS HAL main version */
1080 #define __SC300_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /* [15:0] CMSIS HAL sub version */
1081 #define __SC300_CMSIS_VERSION ((__SC300_CMSIS_VERSION_MAIN << 16U) | \
1082 __SC300_CMSIS_VERSION_SUB ) /* CMSIS HAL version number */
1084 #define __CORTEX_SC (300U) /* Cortex secure core */
1092 #define __CM35P_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /* [31:16] CMSIS HAL main version */
1093 #define __CM35P_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /* [15:0] CMSIS HAL sub version */
1094 #define __CM35P_CMSIS_VERSION ((__CM35P_CMSIS_VERSION_MAIN << 16U) | \
1095 __CM35P_CMSIS_VERSION_SUB ) /* CMSIS HAL version number */
1097 #define __CORTEX_M (35U) /* Cortex-M Core */
1105 #define __ARMv8MBL_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /* [31:16] CMSIS HAL main version */
1106 #define __ARMv8MBL_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /* [15:0] CMSIS HAL sub version */
1107 #define __ARMv8MBL_CMSIS_VERSION ((__ARMv8MBL_CMSIS_VERSION_MAIN << 16U) | \
1108 __ARMv8MBL_CMSIS_VERSION_SUB ) /* CMSIS HAL version number */
1110 #define __CORTEX_M (2U) /* Cortex secure core */
1117 #define __ARMv8MML_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /* [31:16] CMSIS HAL main version */
1118 #define __ARMv8MML_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /* [15:0] CMSIS HAL sub version */
1119 #define __ARMv8MML_CMSIS_VERSION ((__ARMv8MML_CMSIS_VERSION_MAIN << 16U) | \
1120 __ARMv8MML_CMSIS_VERSION_SUB ) /* CMSIS HAL version number */
1122 #define __CORTEX_M (80U) /* Cortex secure core */
1129 #define __ARMv81MML_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /* [31:16] CMSIS HAL main version */
1130 #define __ARMv81MML_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /* [15:0] CMSIS HAL sub version */
1131 #define __ARMv81MML_CMSIS_VERSION ((__ARMv81MML_CMSIS_VERSION_MAIN << 16U) | \
1132 __ARMv81MML_CMSIS_VERSION_SUB ) /* CMSIS HAL version number */
1134 #define __CORTEX_M (81U) /* Cortex secure core */
1138 \section device_access Device Peripheral Access Layer
1140 The \ref device_h_pg contains for each peripheral:
1141 - Register Layout Typedef
1143 - Access Definitions
1145 The section \ref peripheral_gr shows examples for peripheral definitions.
1147 \section device_h_sec Device.h Template File
1149 The silicon vendor needs to extend the Device.h template file with the CMSIS features described above.
1150 In addition the \ref device_h_pg may contain functions to access device-specific peripherals.
1151 The \ref system_Device_h_sec which is provided as part of the CMSIS specification is shown below.
1153 \verbinclude "Include/Device.h"
1159 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
1163 \page partition_h_pg TrustZone setup: partition_<device>.h
1165 The \ref partition_h_pg header file contains the initial setup of the TrustZone hardware in an Armv8-M system.
1167 This file implements the function \ref TZ_SAU_Setup that is call from \ref SystemInit. It uses settings in these files:
1169 - \ref partition_h_pg "partition_<device>.h" that defines the initial system configuration and during SystemInit in Secure state.
1170 - \ref partition_gen_h_pg "partition_gen.h" that contains SAU region and interrupt target assignments. This file may be generated using <a href="../../Zone/html/index.html"><b>CMSIS-Zone</b></a>.
1173 \ref partition_gen_h_pg "partition_gen.h" is optional and can be generated using <a href="../../Zone/html/index.html"><b>CMSIS-Zone</b></a>. In previous versions of CMSIS-Core(M) this settings were part of \ref partition_h_pg "partition_<device>.h".
1178 The \ref partition_h_pg "partition_<device>.h" file contains the following configuration settings for:
1179 - \ref sau_ctrlregister_sec provides settings for the SAU CTRL register.
1180 - \ref sau_sleepexception_sec provides device-specific deep-sleep and exception settings.
1181 - \ref sau_fpu_sec defines the usage of the Floating Point Unit in secure and non-secure state.
1183 The \ref partition_h_pg "partition_<device>.h" file includes the \ref partition_gen_h_pg "partition_gen.h" file with configuration settings for:
1184 - \ref sau_regions_sect provides configuration of the SAU Address Regions.
1185 - \ref sau_interrupttarget_sec provides device-specific interrupt target settings.
1187 \section sau_ctrlregister_sec SAU CTRL register settings
1188 <table class="cmtable">
1191 <th>Value Range</th>
1193 <th>Description</th>
1196 <td>SAU_INIT_CTRL</td>
1199 <td>Initialize SAU CTRL register or not
1200 - 0: do not initialize SAU CTRL register
1201 - 1: initialize SAU CTRL register</td>
1204 <td>SAU_INIT_CTRL_ENABLE</td>
1207 <td>enable/disable the SAU
1209 - 1: enable SAU</td>
1212 <td>SAU_INIT_CTRL_ALLNS</td>
1215 <td>value for SAU_CTRL register bit ALLNS
1216 - 0: all Memory is Secure
1217 - 1: all Memory is Non-Secure</td>
1222 \section sau_sleepexception_sec Configuration of Sleep and Exception behaviour
1223 <table class="cmtable">
1226 <th>Value Range</th>
1228 <th>Description</th>
1231 <td>SCB_CSR_AIRCR_INIT</td>
1234 <td>Setup behaviour of Sleep and Exception Handling
1235 - 0: not setup of CSR and AIRCR registers; the values below are not relevant
1236 - 1: setup of CSR and AIRCR registers with values below</td>
1239 <td>CSR_INIT_DEEPSLEEPS_VAL</td>
1242 <td>value for SCB_CSR register bit DEEPSLEEPS
1243 - 0: Deep Sleep can be enabled by Secure and Non-Secure state
1244 - 1: Deep Sleep can be enabled by Secure state only</td>
1247 <td>AIRCR_INIT_SYSRESETREQS_VAL</td>
1250 <td>value for SCB_AIRCR register bit SYSRESETREQS
1251 - 0: System reset request accessible from Secure and Non-Secure state
1252 - 1: System reset request accessible from Secure state only</td>
1255 <td>AIRCR_INIT_PRIS_VAL</td>
1258 <td>value for SCB_AIRCR register bit PRIS
1259 - 0: Priority of Non-Secure exceptions is Not altered
1260 - 1: Priority of Non-Secure exceptions is Lowered to 0x80-0xFF</td>
1263 <td>AIRCR_INIT_BFHFNMINS_VAL</td>
1266 <td>value for SCB_AIRCR register bit BFHFNMINS
1267 - 0: BusFault, HardFault, and NMI target are Secure state
1268 - 1: BusFault, HardFault, and NMI target are Non-Secure state</td>
1273 \section sau_fpu_sec Configuration of Floating Point Unit
1274 <table class="cmtable">
1277 <th>Value Range</th>
1279 <th>Description</th>
1282 <td>TZ_FPU_NS_USAGE</td>
1285 <td>Setup behaviour of Floating Point Unit
1286 - 0: not setup of NSACR and FPCCR registers; the values below are not relevant
1287 - 1: setup of NSACR and FPCCR registers with values below</td>
1290 <td>SCB_NSACR_CP10_11_VAL</td>
1293 <td>Floating Point Unit usage (Value for SCB->NSACR register bits CP10, CP11)
1294 - 0: Secure state only
1295 - 3: Secure and Non-Secure state</td>
1298 <td>FPU_FPCCR_TS_VAL</td>
1301 <td>Treat floating-point registers as Secure (value for FPU->FPCCR register bit TS)
1306 <td>FPU_FPCCR_CLRONRETS_VAL</td>
1309 <td>Clear on return (CLRONRET) accessibility (Value for FPU->FPCCR register bit CLRONRETS)
1310 - 0: Secure and Non-Secure state
1311 - 1: Secure state only</td>
1314 <td>FPU_FPCCR_CLRONRET_VAL</td>
1317 <td>Clear floating-point caller saved registers on exception return (Value for FPU->FPCCR register bit CLRONRET)
1327 \section partition_gen_h_pg Region/ISR setup: partition_gen.h
1329 The \ref partition_gen_h_pg "partition_gen.h" header file can be generated using <a href="../../Zone/html/index.html"><b>CMSIS-Zone</b></a>.
1331 The \ref partition_h_pg "partition_<device>.h" file includes the \ref partition_h_pg "partition_gen.h" file with configuration settings for:
1332 - \ref sau_regions_sect provides configuration of the SAU Address Regions.
1333 - \ref sau_interrupttarget_sec provides device-specific interrupt target settings.
1336 In previous versions of CMSIS-Core(M) the above settings were part of \ref partition_h_pg "partition_<device>.h"
1338 \subsection sau_regions_sect Configuration of the SAU Address Regions
1339 <table class="cmtable">
1342 <th>Value Range</th>
1344 <th>Description</th>
1347 <td>SAU_REGIONS_MAX</td>
1350 <td>maximum number of SAU regions</td>
1353 <td>SAU_INIT_REGION<number></td>
1356 <td>initialize SAU region or not
1357 - 0: do not initialize SAU region
1358 - 1: initialize SAU region</td>
1361 <td>SAU_INIT_START<number></td>
1362 <td>0x00000000 .. 0xFFFFFFE0\n
1363 [in steps of 32]</td>
1365 <td>region start address</td>
1368 <td>SAU_INIT_END<number></td>
1369 <td>0x00000000 .. 0xFFFFFFE0\n
1370 [in steps of 32]</td>
1372 <td>region start address</td>
1375 <td>SAU_INIT_NSC<number></td>
1378 <td>SAU region attribute
1380 - 1: Secure, Non-Secure callable</td>
1384 The range of \<number\> is from 0 .. SAU_REGIONS_MAX.
1385 A set of these macros must exist for each \<number\>.
1387 The following example shows a set of SAU region macros.
1390 #define SAU_REGIONS_MAX 8 /* Max. number of SAU regions */
1392 #define SAU_INIT_REGION0 1
1393 #define SAU_INIT_START0 0x00000000 /* start address of SAU region 0 */
1394 #define SAU_INIT_END0 0x001FFFE0 /* end address of SAU region 0 */
1395 #define SAU_INIT_NSC0 1
1397 #define SAU_INIT_REGION1 1
1398 #define SAU_INIT_START1 0x00200000 /* start address of SAU region 1 */
1399 #define SAU_INIT_END1 0x003FFFE0 /* end address of SAU region 1 */
1400 #define SAU_INIT_NSC1 0
1402 #define SAU_INIT_REGION2 1
1403 #define SAU_INIT_START2 0x20200000 /* start address of SAU region 2 */
1404 #define SAU_INIT_END2 0x203FFFE0 /* end address of SAU region 2 */
1405 #define SAU_INIT_NSC2 0
1407 #define SAU_INIT_REGION3 1
1408 #define SAU_INIT_START3 0x40000000 /* start address of SAU region 3 */
1409 #define SAU_INIT_END3 0x40040000 /* end address of SAU region 3 */
1410 #define SAU_INIT_NSC3 0
1412 #define SAU_INIT_REGION4 0
1413 #define SAU_INIT_START4 0x00000000 /* start address of SAU region 4 */
1414 #define SAU_INIT_END4 0x00000000 /* end address of SAU region 4 */
1415 #define SAU_INIT_NSC4 0
1417 #define SAU_INIT_REGION5 0
1418 #define SAU_INIT_START5 0x00000000 /* start address of SAU region 5 */
1419 #define SAU_INIT_END5 0x00000000 /* end address of SAU region 5 */
1420 #define SAU_INIT_NSC5 0
1422 #define SAU_INIT_REGION6 0
1423 #define SAU_INIT_START6 0x00000000 /* start address of SAU region 6 */
1424 #define SAU_INIT_END6 0x00000000 /* end address of SAU region 6 */
1425 #define SAU_INIT_NSC6 0
1427 #define SAU_INIT_REGION7 0
1428 #define SAU_INIT_START7 0x00000000 /* start address of SAU region 7 */
1429 #define SAU_INIT_END7 0x00000000 /* end address of SAU region 7 */
1430 #define SAU_INIT_NSC7 0
1434 \subsection sau_interrupttarget_sec Configuration of Interrupt Target settings
1436 Each interrupt has a configuration bit that defines the execution
1437 in Secure or Non-secure state. The Non-Secure interrupts have a separate
1438 vector table. Refer to \ref Model_TrustZone for more information.
1440 <table class="cmtable">
1443 <th>Value Range</th>
1445 <th>Description</th>
1448 <td>NVIC_INIT_ITNS<number></td>
1449 <td>0x00000000 .. 0xFFFFFFFF\n
1450 [each bit represents an interrupt]</td>
1452 <td>Interrupt vector target
1454 - 1: Non-Secure state</td>
1458 The range of \<number\> is 0 .. (\<number of external interrupts\> + 31) / 32.
1460 The following example shows the configuration for a maximum of 64 external interrupts.
1463 #define NVIC_INIT_ITNS0 0x0000122B
1464 #define NVIC_INIT_ITNS1 0x0000003A
1472 \defgroup device_config Device capabilitiy defines
1473 \brief Defines to configure and check device capabilities.
1475 These defines are used by the \ref device_h_pg in order to enable or disable
1476 functionality provided by CMSIS-Core(M) dependent on the device capabilities.
1481 #define __CM0_REV /*!< \brief Cortex-M0 Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1482 #define __CM0PLUS_REV /*!< \brief Cortex-M0+ Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1483 #define __CM1_REV /*!< \brief Cortex-M1 Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1484 #define __CM3_REV /*!< \brief Cortex-M3 Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1485 #define __CM4_REV /*!< \brief Cortex-M4 Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1486 #define __CM7_REV /*!< \brief Cortex-M7 Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1487 #define __SC000_REV /*!< \brief SC000 Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1488 #define __SC300_REV /*!< \brief SC300 Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1489 #define __CM23_REV /*!< \brief Cortex-M23 Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1490 #define __CM33_REV /*!< \brief Cortex-M33 Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1491 #define __CM35P_REV /*!< \brief Cortex-M35P Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1492 #define __CM55_REV /*!< \brief Cortex-M55 Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1493 #define __ARMv8MBL_REV /*!< \brief Armv8-M Baseline device Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1494 #define __ARMv8MML_REV /*!< \brief Armv8-M Mainline device Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1495 #define __ARMv81MML_REV /*!< \brief Armv8.1-M Baseline device Core revision r0p1 \details ([15:8] revision number, [7:0] patch number) */
1496 #define __NVIC_PRIO_BITS /*!< \brief Number of Bits used for Priority Levels */
1497 #define __Vendor_SysTickConfig /*!< \brief Set to 1 if a venor specfic SysTick configuration is used.
1498 \details If this define is set to 1, then the default \ref SysTick_Config function is excluded. In this
1499 case, the file device.h must contain a vendor specific implementation of this function. */
1500 #define __VTOR_PRESENT /*!< \brief VTOR present or not \details See \ref SCB_Type::VTOR */
1501 #define __MPU_PRESENT /*!< \brief MPU present or not */
1504 \brief FPU present or not
1506 The combination of the defines \ref __FPU_PRESENT and \ref __FPU_DP
1507 determine the whether the FPU is with single or double precision as shown
1509 <table class="cmtable" summary="">
1511 <td>\ref __FPU_PRESENT</td>
1512 <td>\ref __FPU_DP</td>
1513 <td><b>Description</b></td>
1516 <td align="center">0</td>
1517 <td align="center"><i>ignored</i></td>
1518 <td>Processor has no FPU. The value set for \ref __FPU_DP.</td>
1521 <td align="center">1</td>
1522 <td align="center">0</td>
1523 <td>Processor with FPU with single precision.</td>
1526 <td align="center">1</td>
1527 <td align="center">1</td>
1528 <td>Processor with FPU with double precision.</td>
1532 #define __FPU_PRESENT /*!< \brief FPU present \details The */
1535 \brief Double precision FPU present
1537 The combination of the defines \ref __FPU_PRESENT and \ref __FPU_DP
1538 determine the whether the FPU is with single or double precision as shown
1540 <table class="cmtable" summary="">
1542 <td>\ref __FPU_PRESENT</td>
1543 <td>\ref __FPU_DP</td>
1544 <td><b>Description</b></td>
1547 <td align="center">0</td>
1548 <td align="center"><i>ignored</i></td>
1549 <td>Processor has no FPU. The value set for \ref __FPU_DP. </td>
1552 <td align="center">1</td>
1553 <td align="center">0</td>
1554 <td>Processor with FPU with single precision.</td>
1557 <td align="center">1</td>
1558 <td align="center">1</td>
1559 <td>Processor with FPU with double precision.</td>
1565 #define __DSP_PRESENT /*!< \brief DSP extension present or not */
1566 #define __SAUREGION_PRESENT /*!< \brief SAU regions present or not */
1567 #define __PMU_PRESENT /*!< \brief PMU present or not */
1568 #define __PMU_NUM_EVENTCNT /*!< \brief PMU Event Counters \details The number of Event counters if PMU is present (see \ref __PMU_PRESENT) */
1569 #define __ICACHE_PRESENT /*!< \brief Instruction Cache present or not */
1570 #define __DCACHE_PRESENT /*!< \brief Data Cache present or not */
1571 #define __DTCM_PRESENT /*!< \brief Data Tightly Coupled Memory is present or not */