SmartSnippets DA1459x SDK
core_cm33.h
Go to the documentation of this file.
1 /**************************************************************************/
8 /*
9  * Copyright (c) 2009-2021 Arm Limited. All rights reserved.
10  *
11  * SPDX-License-Identifier: Apache-2.0
12  *
13  * Licensed under the Apache License, Version 2.0 (the License); you may
14  * not use this file except in compliance with the License.
15  * You may obtain a copy of the License at
16  *
17  * www.apache.org/licenses/LICENSE-2.0
18  *
19  * Unless required by applicable law or agreed to in writing, software
20  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
21  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22  * See the License for the specific language governing permissions and
23  * limitations under the License.
24  */
25  /* Copyright (c) 2019-2023 Modified by Renesas Electronics Corporation and/or its affiliates. */
26 
27 #if defined ( __ICCARM__ )
28  #pragma system_include /* treat file as system include file for MISRA check */
29 #elif defined (__clang__)
30  #pragma clang system_header /* treat file as system include file */
31 #elif defined ( __GNUC__ )
32  #pragma GCC diagnostic ignored "-Wpedantic" /* disable pedantic warning due to unnamed structs/unions */
33 #endif
34 
35 #ifndef __CORE_CM33_H_GENERIC
36 #define __CORE_CM33_H_GENERIC
37 
38 #include <stdint.h>
39 
40 #ifdef __cplusplus
41  extern "C" {
42 #endif
43 
60 /*******************************************************************************
61  * CMSIS definitions
62  ******************************************************************************/
68 #include "cmsis_version.h"
69 
70 /* CMSIS CM33 definitions */
71 #define __CM33_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN)
72 #define __CM33_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB)
73 #define __CM33_CMSIS_VERSION ((__CM33_CMSIS_VERSION_MAIN << 16U) | \
74  __CM33_CMSIS_VERSION_SUB )
76 #define __CORTEX_M (33U)
81 #if defined ( __CC_ARM )
82  #if defined (__TARGET_FPU_VFP)
83  #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
84  #define __FPU_USED 1U
85  #else
86  #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
87  #define __FPU_USED 0U
88  #endif
89  #else
90  #define __FPU_USED 0U
91  #endif
92 
93  #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U)
94  #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U)
95  #define __DSP_USED 1U
96  #else
97  #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)"
98  #define __DSP_USED 0U
99  #endif
100  #else
101  #define __DSP_USED 0U
102  #endif
103 
104 #elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
105  #if defined (__ARM_FP)
106  #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
107  #define __FPU_USED 1U
108  #else
109  #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
110  #define __FPU_USED 0U
111  #endif
112  #else
113  #define __FPU_USED 0U
114  #endif
115 
116  #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U)
117  #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U)
118  #define __DSP_USED 1U
119  #else
120  #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)"
121  #define __DSP_USED 0U
122  #endif
123  #else
124  #define __DSP_USED 0U
125  #endif
126 
127 #elif defined ( __GNUC__ )
128  #if defined (__VFP_FP__) && !defined(__SOFTFP__)
129  #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
130  #define __FPU_USED 1U
131  #else
132  #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
133  #define __FPU_USED 0U
134  #endif
135  #else
136  #define __FPU_USED 0U
137  #endif
138 
139  #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U)
140  #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U)
141  #define __DSP_USED 1U
142  #else
143  #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)"
144  #define __DSP_USED 0U
145  #endif
146  #else
147  #define __DSP_USED 0U
148  #endif
149 
150 #elif defined ( __ICCARM__ )
151  #if defined (__ARMVFP__)
152  #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
153  #define __FPU_USED 1U
154  #else
155  #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
156  #define __FPU_USED 0U
157  #endif
158  #else
159  #define __FPU_USED 0U
160  #endif
161 
162  #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U)
163  #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U)
164  #define __DSP_USED 1U
165  #else
166  #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)"
167  #define __DSP_USED 0U
168  #endif
169  #else
170  #define __DSP_USED 0U
171  #endif
172 
173 #elif defined ( __TI_ARM__ )
174  #if defined (__TI_VFP_SUPPORT__)
175  #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
176  #define __FPU_USED 1U
177  #else
178  #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
179  #define __FPU_USED 0U
180  #endif
181  #else
182  #define __FPU_USED 0U
183  #endif
184 
185 #elif defined ( __TASKING__ )
186  #if defined (__FPU_VFP__)
187  #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
188  #define __FPU_USED 1U
189  #else
190  #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
191  #define __FPU_USED 0U
192  #endif
193  #else
194  #define __FPU_USED 0U
195  #endif
196 
197 #elif defined ( __CSMC__ )
198  #if ( __CSMC__ & 0x400U)
199  #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
200  #define __FPU_USED 1U
201  #else
202  #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
203  #define __FPU_USED 0U
204  #endif
205  #else
206  #define __FPU_USED 0U
207  #endif
208 
209 #endif
210 
211 #include "cmsis_compiler.h" /* CMSIS compiler specific defines */
212 
213 
214 #ifdef __cplusplus
215 }
216 #endif
217 
218 #endif /* __CORE_CM33_H_GENERIC */
219 
220 #ifndef __CMSIS_GENERIC
221 
222 #ifndef __CORE_CM33_H_DEPENDANT
223 #define __CORE_CM33_H_DEPENDANT
224 
225 #ifdef __cplusplus
226  extern "C" {
227 #endif
228 
229 /* check device defines and use defaults */
230 #if defined __CHECK_DEVICE_DEFINES
231  #ifndef __CM33_REV
232  #define __CM33_REV 0x0000U
233  #warning "__CM33_REV not defined in device header file; using default!"
234  #endif
235 
236  #ifndef __FPU_PRESENT
237  #define __FPU_PRESENT 0U
238  #warning "__FPU_PRESENT not defined in device header file; using default!"
239  #endif
240 
241  #ifndef __MPU_PRESENT
242  #define __MPU_PRESENT 0U
243  #warning "__MPU_PRESENT not defined in device header file; using default!"
244  #endif
245 
246  #ifndef __SAUREGION_PRESENT
247  #define __SAUREGION_PRESENT 0U
248  #warning "__SAUREGION_PRESENT not defined in device header file; using default!"
249  #endif
250 
251  #ifndef __DSP_PRESENT
252  #define __DSP_PRESENT 0U
253  #warning "__DSP_PRESENT not defined in device header file; using default!"
254  #endif
255 
256  #ifndef __VTOR_PRESENT
257  #define __VTOR_PRESENT 1U
258  #warning "__VTOR_PRESENT not defined in device header file; using default!"
259  #endif
260 
261  #ifndef __NVIC_PRIO_BITS
262  #define __NVIC_PRIO_BITS 3U
263  #warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
264  #endif
265 
266  #ifndef __Vendor_SysTickConfig
267  #define __Vendor_SysTickConfig 0U
268  #warning "__Vendor_SysTickConfig not defined in device header file; using default!"
269  #endif
270 #endif
271 
272 /* IO definitions (access restrictions to peripheral registers) */
281 #ifdef __cplusplus
282  #define __I volatile
283 #else
284  #define __I volatile const
285 #endif
286 #define __O volatile
287 #define __IO volatile
289 /* following defines should be used for structure members */
290 #define __IM volatile const
291 #define __OM volatile
292 #define __IOM volatile
297 /*******************************************************************************
298  * Register Abstraction
299  Core Register contain:
300  - Core Register
301  - Core NVIC Register
302  - Core SCB Register
303  - Core SysTick Register
304  - Core Debug Register
305  - Core MPU Register
306  - Core SAU Register
307  - Core FPU Register
308  ******************************************************************************/
309 
325 typedef union
326 {
327  struct
328  {
329  uint32_t _reserved0:16;
330  uint32_t GE:4;
331  uint32_t _reserved1:7;
332  uint32_t Q:1;
333  uint32_t V:1;
334  uint32_t C:1;
335  uint32_t Z:1;
336  uint32_t N:1;
337  } b;
338  uint32_t w;
339 } APSR_Type;
340 
341 /* APSR Register Definitions */
342 #define APSR_N_Pos 31U
343 #define APSR_N_Msk (1UL << APSR_N_Pos)
345 #define APSR_Z_Pos 30U
346 #define APSR_Z_Msk (1UL << APSR_Z_Pos)
348 #define APSR_C_Pos 29U
349 #define APSR_C_Msk (1UL << APSR_C_Pos)
351 #define APSR_V_Pos 28U
352 #define APSR_V_Msk (1UL << APSR_V_Pos)
354 #define APSR_Q_Pos 27U
355 #define APSR_Q_Msk (1UL << APSR_Q_Pos)
357 #define APSR_GE_Pos 16U
358 #define APSR_GE_Msk (0xFUL << APSR_GE_Pos)
364 typedef union
365 {
366  struct
367  {
368  uint32_t ISR:9;
369  uint32_t _reserved0:23;
370  } b;
371  uint32_t w;
372 } IPSR_Type;
373 
374 /* IPSR Register Definitions */
375 #define IPSR_ISR_Pos 0U
376 #define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/)
382 typedef union
383 {
384  struct
385  {
386  uint32_t ISR:9;
387  uint32_t _reserved0:7;
388  uint32_t GE:4;
389  uint32_t _reserved1:4;
390  uint32_t T:1;
391  uint32_t IT:2;
392  uint32_t Q:1;
393  uint32_t V:1;
394  uint32_t C:1;
395  uint32_t Z:1;
396  uint32_t N:1;
397  } b;
398  uint32_t w;
399 } xPSR_Type;
400 
401 /* xPSR Register Definitions */
402 #define xPSR_N_Pos 31U
403 #define xPSR_N_Msk (1UL << xPSR_N_Pos)
405 #define xPSR_Z_Pos 30U
406 #define xPSR_Z_Msk (1UL << xPSR_Z_Pos)
408 #define xPSR_C_Pos 29U
409 #define xPSR_C_Msk (1UL << xPSR_C_Pos)
411 #define xPSR_V_Pos 28U
412 #define xPSR_V_Msk (1UL << xPSR_V_Pos)
414 #define xPSR_Q_Pos 27U
415 #define xPSR_Q_Msk (1UL << xPSR_Q_Pos)
417 #define xPSR_IT_Pos 25U
418 #define xPSR_IT_Msk (3UL << xPSR_IT_Pos)
420 #define xPSR_T_Pos 24U
421 #define xPSR_T_Msk (1UL << xPSR_T_Pos)
423 #define xPSR_GE_Pos 16U
424 #define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos)
426 #define xPSR_ISR_Pos 0U
427 #define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/)
433 typedef union
434 {
435  struct
436  {
437  uint32_t nPRIV:1;
438  uint32_t SPSEL:1;
439  uint32_t FPCA:1;
440  uint32_t SFPA:1;
441  uint32_t _reserved1:28;
442  } b;
443  uint32_t w;
444 } CONTROL_Type;
445 
446 /* CONTROL Register Definitions */
447 #define CONTROL_SFPA_Pos 3U
448 #define CONTROL_SFPA_Msk (1UL << CONTROL_SFPA_Pos)
450 #define CONTROL_FPCA_Pos 2U
451 #define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos)
453 #define CONTROL_SPSEL_Pos 1U
454 #define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos)
456 #define CONTROL_nPRIV_Pos 0U
457 #define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/)
472 typedef struct
473 {
474  __IOM uint32_t ISER[16U];
475  uint32_t RESERVED0[16U];
476  __IOM uint32_t ICER[16U];
477  uint32_t RSERVED1[16U];
478  __IOM uint32_t ISPR[16U];
479  uint32_t RESERVED2[16U];
480  __IOM uint32_t ICPR[16U];
481  uint32_t RESERVED3[16U];
482  __IOM uint32_t IABR[16U];
483  uint32_t RESERVED4[16U];
484  __IOM uint32_t ITNS[16U];
485  uint32_t RESERVED5[16U];
486  __IOM uint8_t IPR[496U];
487  uint32_t RESERVED6[580U];
488  __OM uint32_t STIR;
489 } NVIC_Type;
490 
491 /* Software Triggered Interrupt Register Definitions */
492 #define NVIC_STIR_INTID_Pos 0U
493 #define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/)
508 typedef struct
509 {
510  __IM uint32_t CPUID;
511  __IOM uint32_t ICSR;
512  __IOM uint32_t VTOR;
513  __IOM uint32_t AIRCR;
514  __IOM uint32_t SCR;
515  __IOM uint32_t CCR;
516  __IOM uint8_t SHPR[12U];
517  __IOM uint32_t SHCSR;
518  __IOM uint32_t CFSR;
519  __IOM uint32_t HFSR;
520  __IOM uint32_t DFSR;
521  __IOM uint32_t MMFAR;
522  __IOM uint32_t BFAR;
523  __IOM uint32_t AFSR;
524  __IM uint32_t ID_PFR[2U];
525  __IM uint32_t ID_DFR;
526  __IM uint32_t ID_AFR;
527  __IM uint32_t ID_MMFR[4U];
528  __IM uint32_t ID_ISAR[6U];
529  __IM uint32_t CLIDR;
530  __IM uint32_t CTR;
531  __IM uint32_t CCSIDR;
532  __IOM uint32_t CSSELR;
533  __IOM uint32_t CPACR;
534  __IOM uint32_t NSACR;
535  uint32_t RESERVED7[21U];
536  __IOM uint32_t SFSR;
537  __IOM uint32_t SFAR;
538  uint32_t RESERVED3[69U];
539  __OM uint32_t STIR;
540  uint32_t RESERVED4[15U];
541  __IM uint32_t MVFR0;
542  __IM uint32_t MVFR1;
543  __IM uint32_t MVFR2;
544  uint32_t RESERVED5[1U];
545  __OM uint32_t ICIALLU;
546  uint32_t RESERVED6[1U];
547  __OM uint32_t ICIMVAU;
548  __OM uint32_t DCIMVAC;
549  __OM uint32_t DCISW;
550  __OM uint32_t DCCMVAU;
551  __OM uint32_t DCCMVAC;
552  __OM uint32_t DCCSW;
553  __OM uint32_t DCCIMVAC;
554  __OM uint32_t DCCISW;
555  __OM uint32_t BPIALL;
556 } SCB_Type;
557 
558 /* SCB CPUID Register Definitions */
559 #define SCB_CPUID_IMPLEMENTER_Pos 24U
560 #define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos)
562 #define SCB_CPUID_VARIANT_Pos 20U
563 #define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos)
565 #define SCB_CPUID_ARCHITECTURE_Pos 16U
566 #define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos)
568 #define SCB_CPUID_PARTNO_Pos 4U
569 #define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos)
571 #define SCB_CPUID_REVISION_Pos 0U
572 #define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/)
574 /* SCB Interrupt Control State Register Definitions */
575 #define SCB_ICSR_PENDNMISET_Pos 31U
576 #define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos)
578 #define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos
579 #define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk
581 #define SCB_ICSR_PENDNMICLR_Pos 30U
582 #define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos)
584 #define SCB_ICSR_PENDSVSET_Pos 28U
585 #define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos)
587 #define SCB_ICSR_PENDSVCLR_Pos 27U
588 #define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos)
590 #define SCB_ICSR_PENDSTSET_Pos 26U
591 #define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos)
593 #define SCB_ICSR_PENDSTCLR_Pos 25U
594 #define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos)
596 #define SCB_ICSR_STTNS_Pos 24U
597 #define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos)
599 #define SCB_ICSR_ISRPREEMPT_Pos 23U
600 #define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos)
602 #define SCB_ICSR_ISRPENDING_Pos 22U
603 #define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos)
605 #define SCB_ICSR_VECTPENDING_Pos 12U
606 #define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos)
608 #define SCB_ICSR_RETTOBASE_Pos 11U
609 #define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos)
611 #define SCB_ICSR_VECTACTIVE_Pos 0U
612 #define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/)
614 /* SCB Vector Table Offset Register Definitions */
615 #define SCB_VTOR_TBLOFF_Pos 7U
616 #define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos)
618 /* SCB Application Interrupt and Reset Control Register Definitions */
619 #define SCB_AIRCR_VECTKEY_Pos 16U
620 #define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos)
622 #define SCB_AIRCR_VECTKEYSTAT_Pos 16U
623 #define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos)
625 #define SCB_AIRCR_ENDIANESS_Pos 15U
626 #define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos)
628 #define SCB_AIRCR_PRIS_Pos 14U
629 #define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos)
631 #define SCB_AIRCR_BFHFNMINS_Pos 13U
632 #define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos)
634 #define SCB_AIRCR_PRIGROUP_Pos 8U
635 #define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos)
637 #define SCB_AIRCR_SYSRESETREQS_Pos 3U
638 #define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos)
640 #define SCB_AIRCR_SYSRESETREQ_Pos 2U
641 #define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos)
643 #define SCB_AIRCR_VECTCLRACTIVE_Pos 1U
644 #define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos)
646 /* SCB System Control Register Definitions */
647 #define SCB_SCR_SEVONPEND_Pos 4U
648 #define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos)
650 #define SCB_SCR_SLEEPDEEPS_Pos 3U
651 #define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos)
653 #define SCB_SCR_SLEEPDEEP_Pos 2U
654 #define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos)
656 #define SCB_SCR_SLEEPONEXIT_Pos 1U
657 #define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos)
659 /* SCB Configuration Control Register Definitions */
660 #define SCB_CCR_BP_Pos 18U
661 #define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos)
663 #define SCB_CCR_IC_Pos 17U
664 #define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos)
666 #define SCB_CCR_DC_Pos 16U
667 #define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos)
669 #define SCB_CCR_STKOFHFNMIGN_Pos 10U
670 #define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos)
672 #define SCB_CCR_BFHFNMIGN_Pos 8U
673 #define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos)
675 #define SCB_CCR_DIV_0_TRP_Pos 4U
676 #define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos)
678 #define SCB_CCR_UNALIGN_TRP_Pos 3U
679 #define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos)
681 #define SCB_CCR_USERSETMPEND_Pos 1U
682 #define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos)
684 /* SCB System Handler Control and State Register Definitions */
685 #define SCB_SHCSR_HARDFAULTPENDED_Pos 21U
686 #define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos)
688 #define SCB_SHCSR_SECUREFAULTPENDED_Pos 20U
689 #define SCB_SHCSR_SECUREFAULTPENDED_Msk (1UL << SCB_SHCSR_SECUREFAULTPENDED_Pos)
691 #define SCB_SHCSR_SECUREFAULTENA_Pos 19U
692 #define SCB_SHCSR_SECUREFAULTENA_Msk (1UL << SCB_SHCSR_SECUREFAULTENA_Pos)
694 #define SCB_SHCSR_USGFAULTENA_Pos 18U
695 #define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos)
697 #define SCB_SHCSR_BUSFAULTENA_Pos 17U
698 #define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos)
700 #define SCB_SHCSR_MEMFAULTENA_Pos 16U
701 #define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos)
703 #define SCB_SHCSR_SVCALLPENDED_Pos 15U
704 #define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos)
706 #define SCB_SHCSR_BUSFAULTPENDED_Pos 14U
707 #define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos)
709 #define SCB_SHCSR_MEMFAULTPENDED_Pos 13U
710 #define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos)
712 #define SCB_SHCSR_USGFAULTPENDED_Pos 12U
713 #define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos)
715 #define SCB_SHCSR_SYSTICKACT_Pos 11U
716 #define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos)
718 #define SCB_SHCSR_PENDSVACT_Pos 10U
719 #define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos)
721 #define SCB_SHCSR_MONITORACT_Pos 8U
722 #define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos)
724 #define SCB_SHCSR_SVCALLACT_Pos 7U
725 #define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos)
727 #define SCB_SHCSR_NMIACT_Pos 5U
728 #define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos)
730 #define SCB_SHCSR_SECUREFAULTACT_Pos 4U
731 #define SCB_SHCSR_SECUREFAULTACT_Msk (1UL << SCB_SHCSR_SECUREFAULTACT_Pos)
733 #define SCB_SHCSR_USGFAULTACT_Pos 3U
734 #define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos)
736 #define SCB_SHCSR_HARDFAULTACT_Pos 2U
737 #define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos)
739 #define SCB_SHCSR_BUSFAULTACT_Pos 1U
740 #define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos)
742 #define SCB_SHCSR_MEMFAULTACT_Pos 0U
743 #define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/)
745 /* SCB Configurable Fault Status Register Definitions */
746 #define SCB_CFSR_USGFAULTSR_Pos 16U
747 #define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos)
749 #define SCB_CFSR_BUSFAULTSR_Pos 8U
750 #define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos)
752 #define SCB_CFSR_MEMFAULTSR_Pos 0U
753 #define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/)
755 /* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
756 #define SCB_CFSR_MMARVALID_Pos (SCB_CFSR_MEMFAULTSR_Pos + 7U)
757 #define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos)
759 #define SCB_CFSR_MLSPERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 5U)
760 #define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos)
762 #define SCB_CFSR_MSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 4U)
763 #define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos)
765 #define SCB_CFSR_MUNSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 3U)
766 #define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos)
768 #define SCB_CFSR_DACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 1U)
769 #define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos)
771 #define SCB_CFSR_IACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 0U)
772 #define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/)
774 /* BusFault Status Register (part of SCB Configurable Fault Status Register) */
775 #define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U)
776 #define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos)
778 #define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U)
779 #define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos)
781 #define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U)
782 #define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos)
784 #define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U)
785 #define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos)
787 #define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U)
788 #define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos)
790 #define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U)
791 #define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos)
793 #define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U)
794 #define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos)
796 /* UsageFault Status Register (part of SCB Configurable Fault Status Register) */
797 #define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U)
798 #define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos)
800 #define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U)
801 #define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos)
803 #define SCB_CFSR_STKOF_Pos (SCB_CFSR_USGFAULTSR_Pos + 4U)
804 #define SCB_CFSR_STKOF_Msk (1UL << SCB_CFSR_STKOF_Pos)
806 #define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U)
807 #define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos)
809 #define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U)
810 #define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos)
812 #define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U)
813 #define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos)
815 #define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U)
816 #define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos)
818 /* SCB Hard Fault Status Register Definitions */
819 #define SCB_HFSR_DEBUGEVT_Pos 31U
820 #define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos)
822 #define SCB_HFSR_FORCED_Pos 30U
823 #define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos)
825 #define SCB_HFSR_VECTTBL_Pos 1U
826 #define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos)
828 /* SCB Debug Fault Status Register Definitions */
829 #define SCB_DFSR_EXTERNAL_Pos 4U
830 #define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos)
832 #define SCB_DFSR_VCATCH_Pos 3U
833 #define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos)
835 #define SCB_DFSR_DWTTRAP_Pos 2U
836 #define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos)
838 #define SCB_DFSR_BKPT_Pos 1U
839 #define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos)
841 #define SCB_DFSR_HALTED_Pos 0U
842 #define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/)
844 /* SCB Non-Secure Access Control Register Definitions */
845 #define SCB_NSACR_CP11_Pos 11U
846 #define SCB_NSACR_CP11_Msk (1UL << SCB_NSACR_CP11_Pos)
848 #define SCB_NSACR_CP10_Pos 10U
849 #define SCB_NSACR_CP10_Msk (1UL << SCB_NSACR_CP10_Pos)
851 #define SCB_NSACR_CPn_Pos 0U
852 #define SCB_NSACR_CPn_Msk (1UL /*<< SCB_NSACR_CPn_Pos*/)
854 /* SCB Cache Level ID Register Definitions */
855 #define SCB_CLIDR_LOUU_Pos 27U
856 #define SCB_CLIDR_LOUU_Msk (7UL << SCB_CLIDR_LOUU_Pos)
858 #define SCB_CLIDR_LOC_Pos 24U
859 #define SCB_CLIDR_LOC_Msk (7UL << SCB_CLIDR_LOC_Pos)
861 /* SCB Cache Type Register Definitions */
862 #define SCB_CTR_FORMAT_Pos 29U
863 #define SCB_CTR_FORMAT_Msk (7UL << SCB_CTR_FORMAT_Pos)
865 #define SCB_CTR_CWG_Pos 24U
866 #define SCB_CTR_CWG_Msk (0xFUL << SCB_CTR_CWG_Pos)
868 #define SCB_CTR_ERG_Pos 20U
869 #define SCB_CTR_ERG_Msk (0xFUL << SCB_CTR_ERG_Pos)
871 #define SCB_CTR_DMINLINE_Pos 16U
872 #define SCB_CTR_DMINLINE_Msk (0xFUL << SCB_CTR_DMINLINE_Pos)
874 #define SCB_CTR_IMINLINE_Pos 0U
875 #define SCB_CTR_IMINLINE_Msk (0xFUL /*<< SCB_CTR_IMINLINE_Pos*/)
877 /* SCB Cache Size ID Register Definitions */
878 #define SCB_CCSIDR_WT_Pos 31U
879 #define SCB_CCSIDR_WT_Msk (1UL << SCB_CCSIDR_WT_Pos)
881 #define SCB_CCSIDR_WB_Pos 30U
882 #define SCB_CCSIDR_WB_Msk (1UL << SCB_CCSIDR_WB_Pos)
884 #define SCB_CCSIDR_RA_Pos 29U
885 #define SCB_CCSIDR_RA_Msk (1UL << SCB_CCSIDR_RA_Pos)
887 #define SCB_CCSIDR_WA_Pos 28U
888 #define SCB_CCSIDR_WA_Msk (1UL << SCB_CCSIDR_WA_Pos)
890 #define SCB_CCSIDR_NUMSETS_Pos 13U
891 #define SCB_CCSIDR_NUMSETS_Msk (0x7FFFUL << SCB_CCSIDR_NUMSETS_Pos)
893 #define SCB_CCSIDR_ASSOCIATIVITY_Pos 3U
894 #define SCB_CCSIDR_ASSOCIATIVITY_Msk (0x3FFUL << SCB_CCSIDR_ASSOCIATIVITY_Pos)
896 #define SCB_CCSIDR_LINESIZE_Pos 0U
897 #define SCB_CCSIDR_LINESIZE_Msk (7UL /*<< SCB_CCSIDR_LINESIZE_Pos*/)
899 /* SCB Cache Size Selection Register Definitions */
900 #define SCB_CSSELR_LEVEL_Pos 1U
901 #define SCB_CSSELR_LEVEL_Msk (7UL << SCB_CSSELR_LEVEL_Pos)
903 #define SCB_CSSELR_IND_Pos 0U
904 #define SCB_CSSELR_IND_Msk (1UL /*<< SCB_CSSELR_IND_Pos*/)
906 /* SCB Software Triggered Interrupt Register Definitions */
907 #define SCB_STIR_INTID_Pos 0U
908 #define SCB_STIR_INTID_Msk (0x1FFUL /*<< SCB_STIR_INTID_Pos*/)
910 /* SCB D-Cache Invalidate by Set-way Register Definitions */
911 #define SCB_DCISW_WAY_Pos 30U
912 #define SCB_DCISW_WAY_Msk (3UL << SCB_DCISW_WAY_Pos)
914 #define SCB_DCISW_SET_Pos 5U
915 #define SCB_DCISW_SET_Msk (0x1FFUL << SCB_DCISW_SET_Pos)
917 /* SCB D-Cache Clean by Set-way Register Definitions */
918 #define SCB_DCCSW_WAY_Pos 30U
919 #define SCB_DCCSW_WAY_Msk (3UL << SCB_DCCSW_WAY_Pos)
921 #define SCB_DCCSW_SET_Pos 5U
922 #define SCB_DCCSW_SET_Msk (0x1FFUL << SCB_DCCSW_SET_Pos)
924 /* SCB D-Cache Clean and Invalidate by Set-way Register Definitions */
925 #define SCB_DCCISW_WAY_Pos 30U
926 #define SCB_DCCISW_WAY_Msk (3UL << SCB_DCCISW_WAY_Pos)
928 #define SCB_DCCISW_SET_Pos 5U
929 #define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos)
944 typedef struct
945 {
946  uint32_t RESERVED0[1U];
947  __IM uint32_t ICTR;
948  __IOM uint32_t ACTLR;
949  __IOM uint32_t CPPWR;
950 } SCnSCB_Type;
951 
952 /* Interrupt Controller Type Register Definitions */
953 #define SCnSCB_ICTR_INTLINESNUM_Pos 0U
954 #define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/)
969 typedef struct
970 {
971  __IOM uint32_t CTRL;
972  __IOM uint32_t LOAD;
973  __IOM uint32_t VAL;
974  __IM uint32_t CALIB;
975 } SysTick_Type;
976 
977 /* SysTick Control / Status Register Definitions */
978 #define SysTick_CTRL_COUNTFLAG_Pos 16U
979 #define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos)
981 #define SysTick_CTRL_CLKSOURCE_Pos 2U
982 #define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos)
984 #define SysTick_CTRL_TICKINT_Pos 1U
985 #define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos)
987 #define SysTick_CTRL_ENABLE_Pos 0U
988 #define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/)
990 /* SysTick Reload Register Definitions */
991 #define SysTick_LOAD_RELOAD_Pos 0U
992 #define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/)
994 /* SysTick Current Register Definitions */
995 #define SysTick_VAL_CURRENT_Pos 0U
996 #define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/)
998 /* SysTick Calibration Register Definitions */
999 #define SysTick_CALIB_NOREF_Pos 31U
1000 #define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos)
1002 #define SysTick_CALIB_SKEW_Pos 30U
1003 #define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos)
1005 #define SysTick_CALIB_TENMS_Pos 0U
1006 #define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/)
1021 typedef struct
1022 {
1023  __OM union
1024  {
1025  __OM uint8_t u8;
1026  __OM uint16_t u16;
1027  __OM uint32_t u32;
1028  } PORT [32U];
1029  uint32_t RESERVED0[864U];
1030  __IOM uint32_t TER;
1031  uint32_t RESERVED1[15U];
1032  __IOM uint32_t TPR;
1033  uint32_t RESERVED2[15U];
1034  __IOM uint32_t TCR;
1035  uint32_t RESERVED3[32U];
1036  uint32_t RESERVED4[43U];
1037  __OM uint32_t LAR;
1038  __IM uint32_t LSR;
1039  uint32_t RESERVED5[1U];
1040  __IM uint32_t DEVARCH;
1041  uint32_t RESERVED6[4U];
1042  __IM uint32_t PID4;
1043  __IM uint32_t PID5;
1044  __IM uint32_t PID6;
1045  __IM uint32_t PID7;
1046  __IM uint32_t PID0;
1047  __IM uint32_t PID1;
1048  __IM uint32_t PID2;
1049  __IM uint32_t PID3;
1050  __IM uint32_t CID0;
1051  __IM uint32_t CID1;
1052  __IM uint32_t CID2;
1053  __IM uint32_t CID3;
1054 } ITM_Type;
1056 /* ITM Stimulus Port Register Definitions */
1057 #define ITM_STIM_DISABLED_Pos 1U
1058 #define ITM_STIM_DISABLED_Msk (0x1UL << ITM_STIM_DISABLED_Pos)
1060 #define ITM_STIM_FIFOREADY_Pos 0U
1061 #define ITM_STIM_FIFOREADY_Msk (0x1UL /*<< ITM_STIM_FIFOREADY_Pos*/)
1063 /* ITM Trace Privilege Register Definitions */
1064 #define ITM_TPR_PRIVMASK_Pos 0U
1065 #define ITM_TPR_PRIVMASK_Msk (0xFFFFFFFFUL /*<< ITM_TPR_PRIVMASK_Pos*/)
1067 /* ITM Trace Control Register Definitions */
1068 #define ITM_TCR_BUSY_Pos 23U
1069 #define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos)
1071 #define ITM_TCR_TRACEBUSID_Pos 16U
1072 #define ITM_TCR_TRACEBUSID_Msk (0x7FUL << ITM_TCR_TRACEBUSID_Pos)
1074 #define ITM_TCR_GTSFREQ_Pos 10U
1075 #define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos)
1077 #define ITM_TCR_TSPRESCALE_Pos 8U
1078 #define ITM_TCR_TSPRESCALE_Msk (3UL << ITM_TCR_TSPRESCALE_Pos)
1080 #define ITM_TCR_STALLENA_Pos 5U
1081 #define ITM_TCR_STALLENA_Msk (1UL << ITM_TCR_STALLENA_Pos)
1083 #define ITM_TCR_SWOENA_Pos 4U
1084 #define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos)
1086 #define ITM_TCR_DWTENA_Pos 3U
1087 #define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos)
1089 #define ITM_TCR_SYNCENA_Pos 2U
1090 #define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos)
1092 #define ITM_TCR_TSENA_Pos 1U
1093 #define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos)
1095 #define ITM_TCR_ITMENA_Pos 0U
1096 #define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/)
1098 /* ITM Lock Status Register Definitions */
1099 #define ITM_LSR_ByteAcc_Pos 2U
1100 #define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos)
1102 #define ITM_LSR_Access_Pos 1U
1103 #define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos)
1105 #define ITM_LSR_Present_Pos 0U
1106 #define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /* end of group M33_CMSIS_ITM */
1109 
1110 
1121 typedef struct
1123  __IOM uint32_t CTRL;
1124  __IOM uint32_t CYCCNT;
1125  __IOM uint32_t CPICNT;
1126  __IOM uint32_t EXCCNT;
1127  __IOM uint32_t SLEEPCNT;
1128  __IOM uint32_t LSUCNT;
1129  __IOM uint32_t FOLDCNT;
1130  __IM uint32_t PCSR;
1131  __IOM uint32_t COMP0;
1132  uint32_t RESERVED1[1U];
1133  __IOM uint32_t FUNCTION0;
1134  uint32_t RESERVED2[1U];
1135  __IOM uint32_t COMP1;
1136  uint32_t RESERVED3[1U];
1137  __IOM uint32_t FUNCTION1;
1138  uint32_t RESERVED4[1U];
1139  __IOM uint32_t COMP2;
1140  uint32_t RESERVED5[1U];
1141  __IOM uint32_t FUNCTION2;
1142  uint32_t RESERVED6[1U];
1143  __IOM uint32_t COMP3;
1144  uint32_t RESERVED7[1U];
1145  __IOM uint32_t FUNCTION3;
1146  uint32_t RESERVED8[1U];
1147  __IOM uint32_t COMP4;
1148  uint32_t RESERVED9[1U];
1149  __IOM uint32_t FUNCTION4;
1150  uint32_t RESERVED10[1U];
1151  __IOM uint32_t COMP5;
1152  uint32_t RESERVED11[1U];
1153  __IOM uint32_t FUNCTION5;
1154  uint32_t RESERVED12[1U];
1155  __IOM uint32_t COMP6;
1156  uint32_t RESERVED13[1U];
1157  __IOM uint32_t FUNCTION6;
1158  uint32_t RESERVED14[1U];
1159  __IOM uint32_t COMP7;
1160  uint32_t RESERVED15[1U];
1161  __IOM uint32_t FUNCTION7;
1162  uint32_t RESERVED16[1U];
1163  __IOM uint32_t COMP8;
1164  uint32_t RESERVED17[1U];
1165  __IOM uint32_t FUNCTION8;
1166  uint32_t RESERVED18[1U];
1167  __IOM uint32_t COMP9;
1168  uint32_t RESERVED19[1U];
1169  __IOM uint32_t FUNCTION9;
1170  uint32_t RESERVED20[1U];
1171  __IOM uint32_t COMP10;
1172  uint32_t RESERVED21[1U];
1173  __IOM uint32_t FUNCTION10;
1174  uint32_t RESERVED22[1U];
1175  __IOM uint32_t COMP11;
1176  uint32_t RESERVED23[1U];
1177  __IOM uint32_t FUNCTION11;
1178  uint32_t RESERVED24[1U];
1179  __IOM uint32_t COMP12;
1180  uint32_t RESERVED25[1U];
1181  __IOM uint32_t FUNCTION12;
1182  uint32_t RESERVED26[1U];
1183  __IOM uint32_t COMP13;
1184  uint32_t RESERVED27[1U];
1185  __IOM uint32_t FUNCTION13;
1186  uint32_t RESERVED28[1U];
1187  __IOM uint32_t COMP14;
1188  uint32_t RESERVED29[1U];
1189  __IOM uint32_t FUNCTION14;
1190  uint32_t RESERVED30[1U];
1191  __IOM uint32_t COMP15;
1192  uint32_t RESERVED31[1U];
1193  __IOM uint32_t FUNCTION15;
1194  uint32_t RESERVED32[934U];
1195  __IM uint32_t LSR;
1196  uint32_t RESERVED33[1U];
1197  __IM uint32_t DEVARCH;
1198 } DWT_Type;
1200 /* DWT Control Register Definitions */
1201 #define DWT_CTRL_NUMCOMP_Pos 28U
1202 #define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos)
1204 #define DWT_CTRL_NOTRCPKT_Pos 27U
1205 #define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos)
1207 #define DWT_CTRL_NOEXTTRIG_Pos 26U
1208 #define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos)
1210 #define DWT_CTRL_NOCYCCNT_Pos 25U
1211 #define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos)
1213 #define DWT_CTRL_NOPRFCNT_Pos 24U
1214 #define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos)
1216 #define DWT_CTRL_CYCDISS_Pos 23U
1217 #define DWT_CTRL_CYCDISS_Msk (0x1UL << DWT_CTRL_CYCDISS_Pos)
1219 #define DWT_CTRL_CYCEVTENA_Pos 22U
1220 #define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos)
1222 #define DWT_CTRL_FOLDEVTENA_Pos 21U
1223 #define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos)
1225 #define DWT_CTRL_LSUEVTENA_Pos 20U
1226 #define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos)
1228 #define DWT_CTRL_SLEEPEVTENA_Pos 19U
1229 #define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos)
1231 #define DWT_CTRL_EXCEVTENA_Pos 18U
1232 #define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos)
1234 #define DWT_CTRL_CPIEVTENA_Pos 17U
1235 #define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos)
1237 #define DWT_CTRL_EXCTRCENA_Pos 16U
1238 #define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos)
1240 #define DWT_CTRL_PCSAMPLENA_Pos 12U
1241 #define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos)
1243 #define DWT_CTRL_SYNCTAP_Pos 10U
1244 #define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos)
1246 #define DWT_CTRL_CYCTAP_Pos 9U
1247 #define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos)
1249 #define DWT_CTRL_POSTINIT_Pos 5U
1250 #define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos)
1252 #define DWT_CTRL_POSTPRESET_Pos 1U
1253 #define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos)
1255 #define DWT_CTRL_CYCCNTENA_Pos 0U
1256 #define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/)
1258 /* DWT CPI Count Register Definitions */
1259 #define DWT_CPICNT_CPICNT_Pos 0U
1260 #define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/)
1262 /* DWT Exception Overhead Count Register Definitions */
1263 #define DWT_EXCCNT_EXCCNT_Pos 0U
1264 #define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/)
1266 /* DWT Sleep Count Register Definitions */
1267 #define DWT_SLEEPCNT_SLEEPCNT_Pos 0U
1268 #define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/)
1270 /* DWT LSU Count Register Definitions */
1271 #define DWT_LSUCNT_LSUCNT_Pos 0U
1272 #define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/)
1274 /* DWT Folded-instruction Count Register Definitions */
1275 #define DWT_FOLDCNT_FOLDCNT_Pos 0U
1276 #define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/)
1278 /* DWT Comparator Function Register Definitions */
1279 #define DWT_FUNCTION_ID_Pos 27U
1280 #define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos)
1282 #define DWT_FUNCTION_MATCHED_Pos 24U
1283 #define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos)
1285 #define DWT_FUNCTION_DATAVSIZE_Pos 10U
1286 #define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos)
1288 #define DWT_FUNCTION_ACTION_Pos 4U
1289 #define DWT_FUNCTION_ACTION_Msk (0x1UL << DWT_FUNCTION_ACTION_Pos)
1291 #define DWT_FUNCTION_MATCH_Pos 0U
1292 #define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /* end of group M33_CMSIS_DWT */
1295 
1296 
1307 typedef struct
1309  __IM uint32_t SSPSR;
1310  __IOM uint32_t CSPSR;
1311  uint32_t RESERVED0[2U];
1312  __IOM uint32_t ACPR;
1313  uint32_t RESERVED1[55U];
1314  __IOM uint32_t SPPR;
1315  uint32_t RESERVED2[131U];
1316  __IM uint32_t FFSR;
1317  __IOM uint32_t FFCR;
1318  __IOM uint32_t PSCR;
1319  uint32_t RESERVED3[759U];
1320  __IM uint32_t TRIGGER;
1321  __IM uint32_t ITFTTD0;
1322  __IOM uint32_t ITATBCTR2;
1323  uint32_t RESERVED4[1U];
1324  __IM uint32_t ITATBCTR0;
1325  __IM uint32_t ITFTTD1;
1326  __IOM uint32_t ITCTRL;
1327  uint32_t RESERVED5[39U];
1328  __IOM uint32_t CLAIMSET;
1329  __IOM uint32_t CLAIMCLR;
1330  uint32_t RESERVED7[8U];
1331  __IM uint32_t DEVID;
1332  __IM uint32_t DEVTYPE;
1333 } TPI_Type;
1335 /* TPI Asynchronous Clock Prescaler Register Definitions */
1336 #define TPI_ACPR_PRESCALER_Pos 0U
1337 #define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/)
1339 /* TPI Selected Pin Protocol Register Definitions */
1340 #define TPI_SPPR_TXMODE_Pos 0U
1341 #define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/)
1343 /* TPI Formatter and Flush Status Register Definitions */
1344 #define TPI_FFSR_FtNonStop_Pos 3U
1345 #define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos)
1347 #define TPI_FFSR_TCPresent_Pos 2U
1348 #define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos)
1350 #define TPI_FFSR_FtStopped_Pos 1U
1351 #define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos)
1353 #define TPI_FFSR_FlInProg_Pos 0U
1354 #define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/)
1356 /* TPI Formatter and Flush Control Register Definitions */
1357 #define TPI_FFCR_TrigIn_Pos 8U
1358 #define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos)
1360 #define TPI_FFCR_FOnMan_Pos 6U
1361 #define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos)
1363 #define TPI_FFCR_EnFCont_Pos 1U
1364 #define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos)
1366 /* TPI TRIGGER Register Definitions */
1367 #define TPI_TRIGGER_TRIGGER_Pos 0U
1368 #define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/)
1370 /* TPI Integration Test FIFO Test Data 0 Register Definitions */
1371 #define TPI_ITFTTD0_ATB_IF2_ATVALID_Pos 29U
1372 #define TPI_ITFTTD0_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_ATVALID_Pos)
1374 #define TPI_ITFTTD0_ATB_IF2_bytecount_Pos 27U
1375 #define TPI_ITFTTD0_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_bytecount_Pos)
1377 #define TPI_ITFTTD0_ATB_IF1_ATVALID_Pos 26U
1378 #define TPI_ITFTTD0_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_ATVALID_Pos)
1380 #define TPI_ITFTTD0_ATB_IF1_bytecount_Pos 24U
1381 #define TPI_ITFTTD0_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_bytecount_Pos)
1383 #define TPI_ITFTTD0_ATB_IF1_data2_Pos 16U
1384 #define TPI_ITFTTD0_ATB_IF1_data2_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos)
1386 #define TPI_ITFTTD0_ATB_IF1_data1_Pos 8U
1387 #define TPI_ITFTTD0_ATB_IF1_data1_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos)
1389 #define TPI_ITFTTD0_ATB_IF1_data0_Pos 0U
1390 #define TPI_ITFTTD0_ATB_IF1_data0_Msk (0xFFUL /*<< TPI_ITFTTD0_ATB_IF1_data0_Pos*/)
1392 /* TPI Integration Test ATB Control Register 2 Register Definitions */
1393 #define TPI_ITATBCTR2_AFVALID2S_Pos 1U
1394 #define TPI_ITATBCTR2_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID2S_Pos)
1396 #define TPI_ITATBCTR2_AFVALID1S_Pos 1U
1397 #define TPI_ITATBCTR2_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID1S_Pos)
1399 #define TPI_ITATBCTR2_ATREADY2S_Pos 0U
1400 #define TPI_ITATBCTR2_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2S_Pos*/)
1402 #define TPI_ITATBCTR2_ATREADY1S_Pos 0U
1403 #define TPI_ITATBCTR2_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1S_Pos*/)
1405 /* TPI Integration Test FIFO Test Data 1 Register Definitions */
1406 #define TPI_ITFTTD1_ATB_IF2_ATVALID_Pos 29U
1407 #define TPI_ITFTTD1_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_ATVALID_Pos)
1409 #define TPI_ITFTTD1_ATB_IF2_bytecount_Pos 27U
1410 #define TPI_ITFTTD1_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_bytecount_Pos)
1412 #define TPI_ITFTTD1_ATB_IF1_ATVALID_Pos 26U
1413 #define TPI_ITFTTD1_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_ATVALID_Pos)
1415 #define TPI_ITFTTD1_ATB_IF1_bytecount_Pos 24U
1416 #define TPI_ITFTTD1_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_bytecount_Pos)
1418 #define TPI_ITFTTD1_ATB_IF2_data2_Pos 16U
1419 #define TPI_ITFTTD1_ATB_IF2_data2_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos)
1421 #define TPI_ITFTTD1_ATB_IF2_data1_Pos 8U
1422 #define TPI_ITFTTD1_ATB_IF2_data1_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos)
1424 #define TPI_ITFTTD1_ATB_IF2_data0_Pos 0U
1425 #define TPI_ITFTTD1_ATB_IF2_data0_Msk (0xFFUL /*<< TPI_ITFTTD1_ATB_IF2_data0_Pos*/)
1427 /* TPI Integration Test ATB Control Register 0 Definitions */
1428 #define TPI_ITATBCTR0_AFVALID2S_Pos 1U
1429 #define TPI_ITATBCTR0_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID2S_Pos)
1431 #define TPI_ITATBCTR0_AFVALID1S_Pos 1U
1432 #define TPI_ITATBCTR0_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID1S_Pos)
1434 #define TPI_ITATBCTR0_ATREADY2S_Pos 0U
1435 #define TPI_ITATBCTR0_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2S_Pos*/)
1437 #define TPI_ITATBCTR0_ATREADY1S_Pos 0U
1438 #define TPI_ITATBCTR0_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1S_Pos*/)
1440 /* TPI Integration Mode Control Register Definitions */
1441 #define TPI_ITCTRL_Mode_Pos 0U
1442 #define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/)
1444 /* TPI DEVID Register Definitions */
1445 #define TPI_DEVID_NRZVALID_Pos 11U
1446 #define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos)
1448 #define TPI_DEVID_MANCVALID_Pos 10U
1449 #define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos)
1451 #define TPI_DEVID_PTINVALID_Pos 9U
1452 #define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos)
1454 #define TPI_DEVID_FIFOSZ_Pos 6U
1455 #define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos)
1457 #define TPI_DEVID_NrTraceInput_Pos 0U
1458 #define TPI_DEVID_NrTraceInput_Msk (0x3FUL /*<< TPI_DEVID_NrTraceInput_Pos*/)
1460 /* TPI DEVTYPE Register Definitions */
1461 #define TPI_DEVTYPE_SubType_Pos 4U
1462 #define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/)
1464 #define TPI_DEVTYPE_MajorType_Pos 0U
1465 #define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /* end of group M33_CMSIS_TPI */
1468 
1469 
1470 #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
1471 
1481 typedef struct
1482 {
1483  __IM uint32_t TYPE;
1484  __IOM uint32_t CTRL;
1485  __IOM uint32_t RNR;
1486  __IOM uint32_t RBAR;
1487  __IOM uint32_t RLAR;
1488  __IOM uint32_t RBAR_A1;
1489  __IOM uint32_t RLAR_A1;
1490  __IOM uint32_t RBAR_A2;
1491  __IOM uint32_t RLAR_A2;
1492  __IOM uint32_t RBAR_A3;
1493  __IOM uint32_t RLAR_A3;
1494  uint32_t RESERVED0[1];
1495  union {
1496  __IOM uint32_t MAIR[2];
1497  struct {
1498  __IOM uint32_t MAIR0;
1499  __IOM uint32_t MAIR1;
1500  };
1501  };
1502 } MPU_Type;
1503 
1504 #define MPU_TYPE_RALIASES 4U
1505 
1506 /* MPU Type Register Definitions */
1507 #define MPU_TYPE_IREGION_Pos 16U
1508 #define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos)
1510 #define MPU_TYPE_DREGION_Pos 8U
1511 #define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos)
1513 #define MPU_TYPE_SEPARATE_Pos 0U
1514 #define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/)
1516 /* MPU Control Register Definitions */
1517 #define MPU_CTRL_PRIVDEFENA_Pos 2U
1518 #define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos)
1520 #define MPU_CTRL_HFNMIENA_Pos 1U
1521 #define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos)
1523 #define MPU_CTRL_ENABLE_Pos 0U
1524 #define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/)
1526 /* MPU Region Number Register Definitions */
1527 #define MPU_RNR_REGION_Pos 0U
1528 #define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/)
1530 /* MPU Region Base Address Register Definitions */
1531 #define MPU_RBAR_BASE_Pos 5U
1532 #define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos)
1534 #define MPU_RBAR_SH_Pos 3U
1535 #define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos)
1537 #define MPU_RBAR_AP_Pos 1U
1538 #define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos)
1540 #define MPU_RBAR_XN_Pos 0U
1541 #define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/)
1543 /* MPU Region Limit Address Register Definitions */
1544 #define MPU_RLAR_LIMIT_Pos 5U
1545 #define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos)
1547 #define MPU_RLAR_AttrIndx_Pos 1U
1548 #define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos)
1550 #define MPU_RLAR_EN_Pos 0U
1551 #define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/)
1553 /* MPU Memory Attribute Indirection Register 0 Definitions */
1554 #define MPU_MAIR0_Attr3_Pos 24U
1555 #define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos)
1557 #define MPU_MAIR0_Attr2_Pos 16U
1558 #define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos)
1560 #define MPU_MAIR0_Attr1_Pos 8U
1561 #define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos)
1563 #define MPU_MAIR0_Attr0_Pos 0U
1564 #define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/)
1566 /* MPU Memory Attribute Indirection Register 1 Definitions */
1567 #define MPU_MAIR1_Attr7_Pos 24U
1568 #define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos)
1570 #define MPU_MAIR1_Attr6_Pos 16U
1571 #define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos)
1573 #define MPU_MAIR1_Attr5_Pos 8U
1574 #define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos)
1576 #define MPU_MAIR1_Attr4_Pos 0U
1577 #define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/)
1580 #endif
1581 
1582 
1583 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
1584 
1594 typedef struct
1595 {
1596  __IOM uint32_t CTRL;
1597  __IM uint32_t TYPE;
1598 #if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U)
1599  __IOM uint32_t RNR;
1600  __IOM uint32_t RBAR;
1601  __IOM uint32_t RLAR;
1602 #else
1603  uint32_t RESERVED0[3];
1604 #endif
1605  __IOM uint32_t SFSR;
1606  __IOM uint32_t SFAR;
1607 } SAU_Type;
1608 
1609 /* SAU Control Register Definitions */
1610 #define SAU_CTRL_ALLNS_Pos 1U
1611 #define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos)
1613 #define SAU_CTRL_ENABLE_Pos 0U
1614 #define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/)
1616 /* SAU Type Register Definitions */
1617 #define SAU_TYPE_SREGION_Pos 0U
1618 #define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/)
1620 #if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U)
1621 /* SAU Region Number Register Definitions */
1622 #define SAU_RNR_REGION_Pos 0U
1623 #define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/)
1625 /* SAU Region Base Address Register Definitions */
1626 #define SAU_RBAR_BADDR_Pos 5U
1627 #define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos)
1629 /* SAU Region Limit Address Register Definitions */
1630 #define SAU_RLAR_LADDR_Pos 5U
1631 #define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos)
1633 #define SAU_RLAR_NSC_Pos 1U
1634 #define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos)
1636 #define SAU_RLAR_ENABLE_Pos 0U
1637 #define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/)
1639 #endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */
1640 
1641 /* Secure Fault Status Register Definitions */
1642 #define SAU_SFSR_LSERR_Pos 7U
1643 #define SAU_SFSR_LSERR_Msk (1UL << SAU_SFSR_LSERR_Pos)
1645 #define SAU_SFSR_SFARVALID_Pos 6U
1646 #define SAU_SFSR_SFARVALID_Msk (1UL << SAU_SFSR_SFARVALID_Pos)
1648 #define SAU_SFSR_LSPERR_Pos 5U
1649 #define SAU_SFSR_LSPERR_Msk (1UL << SAU_SFSR_LSPERR_Pos)
1651 #define SAU_SFSR_INVTRAN_Pos 4U
1652 #define SAU_SFSR_INVTRAN_Msk (1UL << SAU_SFSR_INVTRAN_Pos)
1654 #define SAU_SFSR_AUVIOL_Pos 3U
1655 #define SAU_SFSR_AUVIOL_Msk (1UL << SAU_SFSR_AUVIOL_Pos)
1657 #define SAU_SFSR_INVER_Pos 2U
1658 #define SAU_SFSR_INVER_Msk (1UL << SAU_SFSR_INVER_Pos)
1660 #define SAU_SFSR_INVIS_Pos 1U
1661 #define SAU_SFSR_INVIS_Msk (1UL << SAU_SFSR_INVIS_Pos)
1663 #define SAU_SFSR_INVEP_Pos 0U
1664 #define SAU_SFSR_INVEP_Msk (1UL /*<< SAU_SFSR_INVEP_Pos*/)
1667 #endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
1668 
1669 
1680 typedef struct
1682  uint32_t RESERVED0[1U];
1683  __IOM uint32_t FPCCR;
1684  __IOM uint32_t FPCAR;
1685  __IOM uint32_t FPDSCR;
1686  __IM uint32_t MVFR0;
1687  __IM uint32_t MVFR1;
1688  __IM uint32_t MVFR2;
1689 } FPU_Type;
1691 /* Floating-Point Context Control Register Definitions */
1692 #define FPU_FPCCR_ASPEN_Pos 31U
1693 #define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos)
1695 #define FPU_FPCCR_LSPEN_Pos 30U
1696 #define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos)
1698 #define FPU_FPCCR_LSPENS_Pos 29U
1699 #define FPU_FPCCR_LSPENS_Msk (1UL << FPU_FPCCR_LSPENS_Pos)
1701 #define FPU_FPCCR_CLRONRET_Pos 28U
1702 #define FPU_FPCCR_CLRONRET_Msk (1UL << FPU_FPCCR_CLRONRET_Pos)
1704 #define FPU_FPCCR_CLRONRETS_Pos 27U
1705 #define FPU_FPCCR_CLRONRETS_Msk (1UL << FPU_FPCCR_CLRONRETS_Pos)
1707 #define FPU_FPCCR_TS_Pos 26U
1708 #define FPU_FPCCR_TS_Msk (1UL << FPU_FPCCR_TS_Pos)
1710 #define FPU_FPCCR_UFRDY_Pos 10U
1711 #define FPU_FPCCR_UFRDY_Msk (1UL << FPU_FPCCR_UFRDY_Pos)
1713 #define FPU_FPCCR_SPLIMVIOL_Pos 9U
1714 #define FPU_FPCCR_SPLIMVIOL_Msk (1UL << FPU_FPCCR_SPLIMVIOL_Pos)
1716 #define FPU_FPCCR_MONRDY_Pos 8U
1717 #define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos)
1719 #define FPU_FPCCR_SFRDY_Pos 7U
1720 #define FPU_FPCCR_SFRDY_Msk (1UL << FPU_FPCCR_SFRDY_Pos)
1722 #define FPU_FPCCR_BFRDY_Pos 6U
1723 #define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos)
1725 #define FPU_FPCCR_MMRDY_Pos 5U
1726 #define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos)
1728 #define FPU_FPCCR_HFRDY_Pos 4U
1729 #define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos)
1731 #define FPU_FPCCR_THREAD_Pos 3U
1732 #define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos)
1734 #define FPU_FPCCR_S_Pos 2U
1735 #define FPU_FPCCR_S_Msk (1UL << FPU_FPCCR_S_Pos)
1737 #define FPU_FPCCR_USER_Pos 1U
1738 #define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos)
1740 #define FPU_FPCCR_LSPACT_Pos 0U
1741 #define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/)
1743 /* Floating-Point Context Address Register Definitions */
1744 #define FPU_FPCAR_ADDRESS_Pos 3U
1745 #define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos)
1747 /* Floating-Point Default Status Control Register Definitions */
1748 #define FPU_FPDSCR_AHP_Pos 26U
1749 #define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos)
1751 #define FPU_FPDSCR_DN_Pos 25U
1752 #define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos)
1754 #define FPU_FPDSCR_FZ_Pos 24U
1755 #define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos)
1757 #define FPU_FPDSCR_RMode_Pos 22U
1758 #define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos)
1760 /* Media and VFP Feature Register 0 Definitions */
1761 #define FPU_MVFR0_FP_rounding_modes_Pos 28U
1762 #define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos)
1764 #define FPU_MVFR0_Short_vectors_Pos 24U
1765 #define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos)
1767 #define FPU_MVFR0_Square_root_Pos 20U
1768 #define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos)
1770 #define FPU_MVFR0_Divide_Pos 16U
1771 #define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos)
1773 #define FPU_MVFR0_FP_excep_trapping_Pos 12U
1774 #define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos)
1776 #define FPU_MVFR0_Double_precision_Pos 8U
1777 #define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos)
1779 #define FPU_MVFR0_Single_precision_Pos 4U
1780 #define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos)
1782 #define FPU_MVFR0_A_SIMD_registers_Pos 0U
1783 #define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/)
1785 /* Media and VFP Feature Register 1 Definitions */
1786 #define FPU_MVFR1_FP_fused_MAC_Pos 28U
1787 #define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos)
1789 #define FPU_MVFR1_FP_HPFP_Pos 24U
1790 #define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos)
1792 #define FPU_MVFR1_D_NaN_mode_Pos 4U
1793 #define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos)
1795 #define FPU_MVFR1_FtZ_mode_Pos 0U
1796 #define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/)
1798 /* Media and VFP Feature Register 2 Definitions */
1799 #define FPU_MVFR2_FPMisc_Pos 4U
1800 #define FPU_MVFR2_FPMisc_Msk (0xFUL << FPU_MVFR2_FPMisc_Pos)
1804 /* CoreDebug is deprecated. replaced by DCB (Debug Control Block) */
1805 
1815 typedef struct
1817  __IOM uint32_t DHCSR;
1818  __OM uint32_t DCRSR;
1819  __IOM uint32_t DCRDR;
1820  __IOM uint32_t DEMCR;
1821  uint32_t RESERVED0[1U];
1822  __IOM uint32_t DAUTHCTRL;
1823  __IOM uint32_t DSCSR;
1824 } CoreDebug_Type;
1826 /* Debug Halting Control and Status Register Definitions */
1827 #define CoreDebug_DHCSR_DBGKEY_Pos 16U
1828 #define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos)
1830 #define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U
1831 #define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos)
1833 #define CoreDebug_DHCSR_S_RESET_ST_Pos 25U
1834 #define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos)
1836 #define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U
1837 #define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos)
1839 #define CoreDebug_DHCSR_S_LOCKUP_Pos 19U
1840 #define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos)
1842 #define CoreDebug_DHCSR_S_SLEEP_Pos 18U
1843 #define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos)
1845 #define CoreDebug_DHCSR_S_HALT_Pos 17U
1846 #define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos)
1848 #define CoreDebug_DHCSR_S_REGRDY_Pos 16U
1849 #define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos)
1851 #define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U
1852 #define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos)
1854 #define CoreDebug_DHCSR_C_MASKINTS_Pos 3U
1855 #define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos)
1857 #define CoreDebug_DHCSR_C_STEP_Pos 2U
1858 #define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos)
1860 #define CoreDebug_DHCSR_C_HALT_Pos 1U
1861 #define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos)
1863 #define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U
1864 #define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/)
1866 /* Debug Core Register Selector Register Definitions */
1867 #define CoreDebug_DCRSR_REGWnR_Pos 16U
1868 #define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos)
1870 #define CoreDebug_DCRSR_REGSEL_Pos 0U
1871 #define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/)
1873 /* Debug Exception and Monitor Control Register Definitions */
1874 #define CoreDebug_DEMCR_TRCENA_Pos 24U
1875 #define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos)
1877 #define CoreDebug_DEMCR_MON_REQ_Pos 19U
1878 #define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos)
1880 #define CoreDebug_DEMCR_MON_STEP_Pos 18U
1881 #define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos)
1883 #define CoreDebug_DEMCR_MON_PEND_Pos 17U
1884 #define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos)
1886 #define CoreDebug_DEMCR_MON_EN_Pos 16U
1887 #define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos)
1889 #define CoreDebug_DEMCR_VC_HARDERR_Pos 10U
1890 #define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos)
1892 #define CoreDebug_DEMCR_VC_INTERR_Pos 9U
1893 #define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos)
1895 #define CoreDebug_DEMCR_VC_BUSERR_Pos 8U
1896 #define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos)
1898 #define CoreDebug_DEMCR_VC_STATERR_Pos 7U
1899 #define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos)
1901 #define CoreDebug_DEMCR_VC_CHKERR_Pos 6U
1902 #define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos)
1904 #define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U
1905 #define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos)
1907 #define CoreDebug_DEMCR_VC_MMERR_Pos 4U
1908 #define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos)
1910 #define CoreDebug_DEMCR_VC_CORERESET_Pos 0U
1911 #define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/)
1913 /* Debug Authentication Control Register Definitions */
1914 #define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U
1915 #define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos)
1917 #define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U
1918 #define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos)
1920 #define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U
1921 #define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos)
1923 #define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U
1924 #define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/)
1926 /* Debug Security Control and Status Register Definitions */
1927 #define CoreDebug_DSCSR_CDS_Pos 16U
1928 #define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos)
1930 #define CoreDebug_DSCSR_SBRSEL_Pos 1U
1931 #define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos)
1933 #define CoreDebug_DSCSR_SBRSELEN_Pos 0U
1934 #define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/)
1949 typedef struct
1951  __IOM uint32_t DHCSR;
1952  __OM uint32_t DCRSR;
1953  __IOM uint32_t DCRDR;
1954  __IOM uint32_t DEMCR;
1955  uint32_t RESERVED0[1U];
1956  __IOM uint32_t DAUTHCTRL;
1957  __IOM uint32_t DSCSR;
1958 } DCB_Type;
1960 /* DHCSR, Debug Halting Control and Status Register Definitions */
1961 #define DCB_DHCSR_DBGKEY_Pos 16U
1962 #define DCB_DHCSR_DBGKEY_Msk (0xFFFFUL << DCB_DHCSR_DBGKEY_Pos)
1964 #define DCB_DHCSR_S_RESTART_ST_Pos 26U
1965 #define DCB_DHCSR_S_RESTART_ST_Msk (0x1UL << DCB_DHCSR_S_RESTART_ST_Pos)
1967 #define DCB_DHCSR_S_RESET_ST_Pos 25U
1968 #define DCB_DHCSR_S_RESET_ST_Msk (0x1UL << DCB_DHCSR_S_RESET_ST_Pos)
1970 #define DCB_DHCSR_S_RETIRE_ST_Pos 24U
1971 #define DCB_DHCSR_S_RETIRE_ST_Msk (0x1UL << DCB_DHCSR_S_RETIRE_ST_Pos)
1973 #define DCB_DHCSR_S_SDE_Pos 20U
1974 #define DCB_DHCSR_S_SDE_Msk (0x1UL << DCB_DHCSR_S_SDE_Pos)
1976 #define DCB_DHCSR_S_LOCKUP_Pos 19U
1977 #define DCB_DHCSR_S_LOCKUP_Msk (0x1UL << DCB_DHCSR_S_LOCKUP_Pos)
1979 #define DCB_DHCSR_S_SLEEP_Pos 18U
1980 #define DCB_DHCSR_S_SLEEP_Msk (0x1UL << DCB_DHCSR_S_SLEEP_Pos)
1982 #define DCB_DHCSR_S_HALT_Pos 17U
1983 #define DCB_DHCSR_S_HALT_Msk (0x1UL << DCB_DHCSR_S_HALT_Pos)
1985 #define DCB_DHCSR_S_REGRDY_Pos 16U
1986 #define DCB_DHCSR_S_REGRDY_Msk (0x1UL << DCB_DHCSR_S_REGRDY_Pos)
1988 #define DCB_DHCSR_C_SNAPSTALL_Pos 5U
1989 #define DCB_DHCSR_C_SNAPSTALL_Msk (0x1UL << DCB_DHCSR_C_SNAPSTALL_Pos)
1991 #define DCB_DHCSR_C_MASKINTS_Pos 3U
1992 #define DCB_DHCSR_C_MASKINTS_Msk (0x1UL << DCB_DHCSR_C_MASKINTS_Pos)
1994 #define DCB_DHCSR_C_STEP_Pos 2U
1995 #define DCB_DHCSR_C_STEP_Msk (0x1UL << DCB_DHCSR_C_STEP_Pos)
1997 #define DCB_DHCSR_C_HALT_Pos 1U
1998 #define DCB_DHCSR_C_HALT_Msk (0x1UL << DCB_DHCSR_C_HALT_Pos)
2000 #define DCB_DHCSR_C_DEBUGEN_Pos 0U
2001 #define DCB_DHCSR_C_DEBUGEN_Msk (0x1UL /*<< DCB_DHCSR_C_DEBUGEN_Pos*/)
2003 /* DCRSR, Debug Core Register Select Register Definitions */
2004 #define DCB_DCRSR_REGWnR_Pos 16U
2005 #define DCB_DCRSR_REGWnR_Msk (0x1UL << DCB_DCRSR_REGWnR_Pos)
2007 #define DCB_DCRSR_REGSEL_Pos 0U
2008 #define DCB_DCRSR_REGSEL_Msk (0x7FUL /*<< DCB_DCRSR_REGSEL_Pos*/)
2010 /* DCRDR, Debug Core Register Data Register Definitions */
2011 #define DCB_DCRDR_DBGTMP_Pos 0U
2012 #define DCB_DCRDR_DBGTMP_Msk (0xFFFFFFFFUL /*<< DCB_DCRDR_DBGTMP_Pos*/)
2014 /* DEMCR, Debug Exception and Monitor Control Register Definitions */
2015 #define DCB_DEMCR_TRCENA_Pos 24U
2016 #define DCB_DEMCR_TRCENA_Msk (0x1UL << DCB_DEMCR_TRCENA_Pos)
2018 #define DCB_DEMCR_MONPRKEY_Pos 23U
2019 #define DCB_DEMCR_MONPRKEY_Msk (0x1UL << DCB_DEMCR_MONPRKEY_Pos)
2021 #define DCB_DEMCR_UMON_EN_Pos 21U
2022 #define DCB_DEMCR_UMON_EN_Msk (0x1UL << DCB_DEMCR_UMON_EN_Pos)
2024 #define DCB_DEMCR_SDME_Pos 20U
2025 #define DCB_DEMCR_SDME_Msk (0x1UL << DCB_DEMCR_SDME_Pos)
2027 #define DCB_DEMCR_MON_REQ_Pos 19U
2028 #define DCB_DEMCR_MON_REQ_Msk (0x1UL << DCB_DEMCR_MON_REQ_Pos)
2030 #define DCB_DEMCR_MON_STEP_Pos 18U
2031 #define DCB_DEMCR_MON_STEP_Msk (0x1UL << DCB_DEMCR_MON_STEP_Pos)
2033 #define DCB_DEMCR_MON_PEND_Pos 17U
2034 #define DCB_DEMCR_MON_PEND_Msk (0x1UL << DCB_DEMCR_MON_PEND_Pos)
2036 #define DCB_DEMCR_MON_EN_Pos 16U
2037 #define DCB_DEMCR_MON_EN_Msk (0x1UL << DCB_DEMCR_MON_EN_Pos)
2039 #define DCB_DEMCR_VC_SFERR_Pos 11U
2040 #define DCB_DEMCR_VC_SFERR_Msk (0x1UL << DCB_DEMCR_VC_SFERR_Pos)
2042 #define DCB_DEMCR_VC_HARDERR_Pos 10U
2043 #define DCB_DEMCR_VC_HARDERR_Msk (0x1UL << DCB_DEMCR_VC_HARDERR_Pos)
2045 #define DCB_DEMCR_VC_INTERR_Pos 9U
2046 #define DCB_DEMCR_VC_INTERR_Msk (0x1UL << DCB_DEMCR_VC_INTERR_Pos)
2048 #define DCB_DEMCR_VC_BUSERR_Pos 8U
2049 #define DCB_DEMCR_VC_BUSERR_Msk (0x1UL << DCB_DEMCR_VC_BUSERR_Pos)
2051 #define DCB_DEMCR_VC_STATERR_Pos 7U
2052 #define DCB_DEMCR_VC_STATERR_Msk (0x1UL << DCB_DEMCR_VC_STATERR_Pos)
2054 #define DCB_DEMCR_VC_CHKERR_Pos 6U
2055 #define DCB_DEMCR_VC_CHKERR_Msk (0x1UL << DCB_DEMCR_VC_CHKERR_Pos)
2057 #define DCB_DEMCR_VC_NOCPERR_Pos 5U
2058 #define DCB_DEMCR_VC_NOCPERR_Msk (0x1UL << DCB_DEMCR_VC_NOCPERR_Pos)
2060 #define DCB_DEMCR_VC_MMERR_Pos 4U
2061 #define DCB_DEMCR_VC_MMERR_Msk (0x1UL << DCB_DEMCR_VC_MMERR_Pos)
2063 #define DCB_DEMCR_VC_CORERESET_Pos 0U
2064 #define DCB_DEMCR_VC_CORERESET_Msk (0x1UL /*<< DCB_DEMCR_VC_CORERESET_Pos*/)
2066 /* DAUTHCTRL, Debug Authentication Control Register Definitions */
2067 #define DCB_DAUTHCTRL_INTSPNIDEN_Pos 3U
2068 #define DCB_DAUTHCTRL_INTSPNIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPNIDEN_Pos)
2070 #define DCB_DAUTHCTRL_SPNIDENSEL_Pos 2U
2071 #define DCB_DAUTHCTRL_SPNIDENSEL_Msk (0x1UL << DCB_DAUTHCTRL_SPNIDENSEL_Pos)
2073 #define DCB_DAUTHCTRL_INTSPIDEN_Pos 1U
2074 #define DCB_DAUTHCTRL_INTSPIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPIDEN_Pos)
2076 #define DCB_DAUTHCTRL_SPIDENSEL_Pos 0U
2077 #define DCB_DAUTHCTRL_SPIDENSEL_Msk (0x1UL /*<< DCB_DAUTHCTRL_SPIDENSEL_Pos*/)
2079 /* DSCSR, Debug Security Control and Status Register Definitions */
2080 #define DCB_DSCSR_CDSKEY_Pos 17U
2081 #define DCB_DSCSR_CDSKEY_Msk (0x1UL << DCB_DSCSR_CDSKEY_Pos)
2083 #define DCB_DSCSR_CDS_Pos 16U
2084 #define DCB_DSCSR_CDS_Msk (0x1UL << DCB_DSCSR_CDS_Pos)
2086 #define DCB_DSCSR_SBRSEL_Pos 1U
2087 #define DCB_DSCSR_SBRSEL_Msk (0x1UL << DCB_DSCSR_SBRSEL_Pos)
2089 #define DCB_DSCSR_SBRSELEN_Pos 0U
2090 #define DCB_DSCSR_SBRSELEN_Msk (0x1UL /*<< DCB_DSCSR_SBRSELEN_Pos*/)
2106 typedef struct
2108  __OM uint32_t DLAR;
2109  __IM uint32_t DLSR;
2110  __IM uint32_t DAUTHSTATUS;
2111  __IM uint32_t DDEVARCH;
2112  __IM uint32_t DDEVTYPE;
2113 } DIB_Type;
2115 /* DLAR, SCS Software Lock Access Register Definitions */
2116 #define DIB_DLAR_KEY_Pos 0U
2117 #define DIB_DLAR_KEY_Msk (0xFFFFFFFFUL /*<< DIB_DLAR_KEY_Pos */)
2119 /* DLSR, SCS Software Lock Status Register Definitions */
2120 #define DIB_DLSR_nTT_Pos 2U
2121 #define DIB_DLSR_nTT_Msk (0x1UL << DIB_DLSR_nTT_Pos )
2123 #define DIB_DLSR_SLK_Pos 1U
2124 #define DIB_DLSR_SLK_Msk (0x1UL << DIB_DLSR_SLK_Pos )
2126 #define DIB_DLSR_SLI_Pos 0U
2127 #define DIB_DLSR_SLI_Msk (0x1UL /*<< DIB_DLSR_SLI_Pos*/)
2129 /* DAUTHSTATUS, Debug Authentication Status Register Definitions */
2130 #define DIB_DAUTHSTATUS_SNID_Pos 6U
2131 #define DIB_DAUTHSTATUS_SNID_Msk (0x3UL << DIB_DAUTHSTATUS_SNID_Pos )
2133 #define DIB_DAUTHSTATUS_SID_Pos 4U
2134 #define DIB_DAUTHSTATUS_SID_Msk (0x3UL << DIB_DAUTHSTATUS_SID_Pos )
2136 #define DIB_DAUTHSTATUS_NSNID_Pos 2U
2137 #define DIB_DAUTHSTATUS_NSNID_Msk (0x3UL << DIB_DAUTHSTATUS_NSNID_Pos )
2139 #define DIB_DAUTHSTATUS_NSID_Pos 0U
2140 #define DIB_DAUTHSTATUS_NSID_Msk (0x3UL /*<< DIB_DAUTHSTATUS_NSID_Pos*/)
2142 /* DDEVARCH, SCS Device Architecture Register Definitions */
2143 #define DIB_DDEVARCH_ARCHITECT_Pos 21U
2144 #define DIB_DDEVARCH_ARCHITECT_Msk (0x7FFUL << DIB_DDEVARCH_ARCHITECT_Pos )
2146 #define DIB_DDEVARCH_PRESENT_Pos 20U
2147 #define DIB_DDEVARCH_PRESENT_Msk (0x1FUL << DIB_DDEVARCH_PRESENT_Pos )
2149 #define DIB_DDEVARCH_REVISION_Pos 16U
2150 #define DIB_DDEVARCH_REVISION_Msk (0xFUL << DIB_DDEVARCH_REVISION_Pos )
2152 #define DIB_DDEVARCH_ARCHVER_Pos 12U
2153 #define DIB_DDEVARCH_ARCHVER_Msk (0xFUL << DIB_DDEVARCH_ARCHVER_Pos )
2155 #define DIB_DDEVARCH_ARCHPART_Pos 0U
2156 #define DIB_DDEVARCH_ARCHPART_Msk (0xFFFUL /*<< DIB_DDEVARCH_ARCHPART_Pos*/)
2158 /* DDEVTYPE, SCS Device Type Register Definitions */
2159 #define DIB_DDEVTYPE_SUB_Pos 4U
2160 #define DIB_DDEVTYPE_SUB_Msk (0xFUL << DIB_DDEVTYPE_SUB_Pos )
2162 #define DIB_DDEVTYPE_MAJOR_Pos 0U
2163 #define DIB_DDEVTYPE_MAJOR_Msk (0xFUL /*<< DIB_DDEVTYPE_MAJOR_Pos*/)
2182 #define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk)
2183 
2190 #define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos)
2191 
2202 /* Memory mapping of Core Hardware */
2203  #define SCS_BASE (0xE000E000UL)
2204  #define ITM_BASE (0xE0000000UL)
2205  #define DWT_BASE (0xE0001000UL)
2206  #define TPI_BASE (0xE0040000UL)
2207  #define CoreDebug_BASE (0xE000EDF0UL)
2208  #define DCB_BASE (0xE000EDF0UL)
2209  #define DIB_BASE (0xE000EFB0UL)
2210  #define SysTick_BASE (SCS_BASE + 0x0010UL)
2211  #define NVIC_BASE (SCS_BASE + 0x0100UL)
2212  #define SCB_BASE (SCS_BASE + 0x0D00UL)
2214  #define SCnSCB ((SCnSCB_Type *) SCS_BASE )
2215  #define SCB ((SCB_Type *) SCB_BASE )
2216  #define SysTick ((SysTick_Type *) SysTick_BASE )
2217  #define NVIC ((NVIC_Type *) NVIC_BASE )
2218  #define ITM ((ITM_Type *) ITM_BASE )
2219  #define DWT ((DWT_Type *) DWT_BASE )
2220  #define TPI ((TPI_Type *) TPI_BASE )
2221  #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE )
2222  #define DCB ((DCB_Type *) DCB_BASE )
2223  #define DIB ((DIB_Type *) DIB_BASE )
2225  #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
2226  #define MPU_BASE (SCS_BASE + 0x0D90UL)
2227  #define MPU ((MPU_Type *) MPU_BASE )
2228  #endif
2229 
2230  #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
2231  #define SAU_BASE (SCS_BASE + 0x0DD0UL)
2232  #define SAU ((SAU_Type *) SAU_BASE )
2233  #endif
2235  #define FPU_BASE (SCS_BASE + 0x0F30UL)
2236  #define FPU ((FPU_Type *) FPU_BASE )
2238 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
2239  #define SCS_BASE_NS (0xE002E000UL)
2240  #define CoreDebug_BASE_NS (0xE002EDF0UL)
2241  #define DCB_BASE_NS (0xE002EDF0UL)
2242  #define DIB_BASE_NS (0xE002EFB0UL)
2243  #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL)
2244  #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL)
2245  #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL)
2247  #define SCnSCB_NS ((SCnSCB_Type *) SCS_BASE_NS )
2248  #define SCB_NS ((SCB_Type *) SCB_BASE_NS )
2249  #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS )
2250  #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS )
2251  #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS)
2252  #define DCB_NS ((DCB_Type *) DCB_BASE_NS )
2253  #define DIB_NS ((DIB_Type *) DIB_BASE_NS )
2255  #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
2256  #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL)
2257  #define MPU_NS ((MPU_Type *) MPU_BASE_NS )
2258  #endif
2259 
2260  #define FPU_BASE_NS (SCS_BASE_NS + 0x0F30UL)
2261  #define FPU_NS ((FPU_Type *) FPU_BASE_NS )
2263 #endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
2264 
2273 #define ID_ADR (ID_AFR)
2277 /*******************************************************************************
2278  * Hardware Abstraction Layer
2279  Core Function Interface contains:
2280  - Core NVIC Functions
2281  - Core SysTick Functions
2282  - Core Debug Functions
2283  - Core Register Access Functions
2284  ******************************************************************************/
2285 
2291 /* ########################## NVIC functions #################################### */
2299 #ifdef CMSIS_NVIC_VIRTUAL
2300  #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE
2301  #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h"
2302  #endif
2303  #include CMSIS_NVIC_VIRTUAL_HEADER_FILE
2304 #else
2305  #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping
2306  #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping
2307  #define NVIC_EnableIRQ __NVIC_EnableIRQ
2308  #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ
2309  #define NVIC_DisableIRQ __NVIC_DisableIRQ
2310  #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ
2311  #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ
2312  #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ
2313  #define NVIC_GetActive __NVIC_GetActive
2314  #define NVIC_SetPriority __NVIC_SetPriority
2315  #define NVIC_GetPriority __NVIC_GetPriority
2316  #define NVIC_SystemReset __NVIC_SystemReset
2317 #endif /* CMSIS_NVIC_VIRTUAL */
2318 
2319 #ifdef CMSIS_VECTAB_VIRTUAL
2320  #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE
2321  #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h"
2322  #endif
2323  #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE
2324 #else
2325  #define NVIC_SetVector __NVIC_SetVector
2326  #define NVIC_GetVector __NVIC_GetVector
2327 #endif /* (CMSIS_VECTAB_VIRTUAL) */
2328 
2329 #define NVIC_USER_IRQ_OFFSET 16
2330 
2331 
2332 /* Special LR values for Secure/Non-Secure call handling and exception handling */
2333 
2334 /* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */
2335 #define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */
2336 
2337 /* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */
2338 #define EXC_RETURN_PREFIX (0xFF000000UL) /* bits [31:24] set to indicate an EXC_RETURN value */
2339 #define EXC_RETURN_S (0x00000040UL) /* bit [6] stack used to push registers: 0=Non-secure 1=Secure */
2340 #define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */
2341 #define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */
2342 #define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */
2343 #define EXC_RETURN_SPSEL (0x00000004UL) /* bit [2] stack pointer used to restore context: 0=MSP 1=PSP */
2344 #define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */
2345 
2346 /* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
2347 #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */
2348 #define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */
2349 #else
2350 #define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */
2351 #endif
2352 
2353 
2363 __STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
2364 {
2365  uint32_t reg_value;
2366  uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
2367 
2368  reg_value = SCB->AIRCR; /* read old register configuration */
2369  reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
2370  reg_value = (reg_value |
2371  ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
2372  (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
2373  SCB->AIRCR = reg_value;
2374 }
2375 
2376 
2382 __STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void)
2383 {
2384  return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
2385 }
2386 
2387 
2394 __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
2395 {
2396  if ((int32_t)(IRQn) >= 0)
2397  {
2398  __COMPILER_BARRIER();
2399  NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
2400  __COMPILER_BARRIER();
2401  }
2402 }
2403 
2404 
2413 __STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn)
2414 {
2415  if ((int32_t)(IRQn) >= 0)
2416  {
2417  return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
2418  }
2419  else
2420  {
2421  return(0U);
2422  }
2423 }
2424 
2425 
2432 __STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn)
2433 {
2434  if ((int32_t)(IRQn) >= 0)
2435  {
2436  NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
2437  __DSB();
2438  __ISB();
2439  }
2440 }
2441 
2442 
2451 __STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn)
2452 {
2453  if ((int32_t)(IRQn) >= 0)
2454  {
2455  return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
2456  }
2457  else
2458  {
2459  return(0U);
2460  }
2461 }
2462 
2463 
2470 __STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn)
2471 {
2472  if ((int32_t)(IRQn) >= 0)
2473  {
2474  NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
2475  }
2476 }
2477 
2478 
2485 __STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn)
2486 {
2487  if ((int32_t)(IRQn) >= 0)
2488  {
2489  NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
2490  }
2491 }
2492 
2493 
2502 __STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn)
2503 {
2504  if ((int32_t)(IRQn) >= 0)
2505  {
2506  return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
2507  }
2508  else
2509  {
2510  return(0U);
2511  }
2512 }
2513 
2514 
2515 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
2516 
2524 __STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn)
2525 {
2526  if ((int32_t)(IRQn) >= 0)
2527  {
2528  return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
2529  }
2530  else
2531  {
2532  return(0U);
2533  }
2534 }
2535 
2536 
2545 __STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn)
2546 {
2547  if ((int32_t)(IRQn) >= 0)
2548  {
2549  NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)));
2550  return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
2551  }
2552  else
2553  {
2554  return(0U);
2555  }
2556 }
2557 
2558 
2567 __STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn)
2568 {
2569  if ((int32_t)(IRQn) >= 0)
2570  {
2571  NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)));
2572  return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
2573  }
2574  else
2575  {
2576  return(0U);
2577  }
2578 }
2579 #endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
2580 
2581 
2591 __STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
2592 {
2593  if ((int32_t)(IRQn) >= 0)
2594  {
2595  NVIC->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
2596  }
2597  else
2598  {
2599  SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
2600  }
2601 }
2602 
2603 
2613 __STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn)
2614 {
2615 
2616  if ((int32_t)(IRQn) >= 0)
2617  {
2618  return(((uint32_t)NVIC->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS)));
2619  }
2620  else
2621  {
2622  return(((uint32_t)SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS)));
2623  }
2624 }
2625 
2626 
2638 __STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
2639 {
2640  uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
2641  uint32_t PreemptPriorityBits;
2642  uint32_t SubPriorityBits;
2643 
2644  PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
2645  SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
2646 
2647  return (
2648  ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
2649  ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
2650  );
2651 }
2652 
2653 
2665 __STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority)
2666 {
2667  uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
2668  uint32_t PreemptPriorityBits;
2669  uint32_t SubPriorityBits;
2670 
2671  PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
2672  SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
2673 
2674  *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL);
2675  *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL);
2676 }
2677 
2678 
2688 __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
2689 {
2690  uint32_t *vectors = (uint32_t *)SCB->VTOR;
2691  vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
2692  __DSB();
2693 }
2694 
2695 
2704 __STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
2705 {
2706  uint32_t *vectors = (uint32_t *)SCB->VTOR;
2707  return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET];
2708 }
2709 
2710 
2715 __NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void)
2716 {
2717  __DSB(); /* Ensure all outstanding memory accesses included
2718  buffered write are completed before reset */
2719  SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
2720  (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) |
2721  SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */
2722  __DSB(); /* Ensure completion of memory access */
2723 
2724  for(;;) /* wait until reset */
2725  {
2726  __NOP();
2727  }
2728 }
2729 
2730 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
2731 
2740 __STATIC_INLINE void TZ_NVIC_SetPriorityGrouping_NS(uint32_t PriorityGroup)
2741 {
2742  uint32_t reg_value;
2743  uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
2744 
2745  reg_value = SCB_NS->AIRCR; /* read old register configuration */
2746  reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
2747  reg_value = (reg_value |
2748  ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
2749  (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
2750  SCB_NS->AIRCR = reg_value;
2751 }
2752 
2753 
2759 __STATIC_INLINE uint32_t TZ_NVIC_GetPriorityGrouping_NS(void)
2760 {
2761  return ((uint32_t)((SCB_NS->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
2762 }
2763 
2764 
2771 __STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn)
2772 {
2773  if ((int32_t)(IRQn) >= 0)
2774  {
2775  NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
2776  }
2777 }
2778 
2779 
2788 __STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn)
2789 {
2790  if ((int32_t)(IRQn) >= 0)
2791  {
2792  return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
2793  }
2794  else
2795  {
2796  return(0U);
2797  }
2798 }
2799 
2800 
2807 __STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn)
2808 {
2809  if ((int32_t)(IRQn) >= 0)
2810  {
2811  NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
2812  }
2813 }
2814 
2815 
2824 __STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn)
2825 {
2826  if ((int32_t)(IRQn) >= 0)
2827  {
2828  return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
2829  }
2830  else
2831  {
2832  return(0U);
2833  }
2834 }
2835 
2836 
2843 __STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn)
2844 {
2845  if ((int32_t)(IRQn) >= 0)
2846  {
2847  NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
2848  }
2849 }
2850 
2851 
2858 __STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn)
2859 {
2860  if ((int32_t)(IRQn) >= 0)
2861  {
2862  NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
2863  }
2864 }
2865 
2866 
2875 __STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn)
2876 {
2877  if ((int32_t)(IRQn) >= 0)
2878  {
2879  return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
2880  }
2881  else
2882  {
2883  return(0U);
2884  }
2885 }
2886 
2887 
2897 __STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority)
2898 {
2899  if ((int32_t)(IRQn) >= 0)
2900  {
2901  NVIC_NS->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
2902  }
2903  else
2904  {
2905  SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
2906  }
2907 }
2908 
2909 
2918 __STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn)
2919 {
2920 
2921  if ((int32_t)(IRQn) >= 0)
2922  {
2923  return(((uint32_t)NVIC_NS->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS)));
2924  }
2925  else
2926  {
2927  return(((uint32_t)SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS)));
2928  }
2929 }
2930 #endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */
2931 
2934 /* ########################## MPU functions #################################### */
2935 
2936 #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
2937 
2938 #include "mpu_armv8.h"
2939 
2940 #endif
2941 
2942 /* ########################## FPU functions #################################### */
2958 __STATIC_INLINE uint32_t SCB_GetFPUType(void)
2959 {
2960  uint32_t mvfr0;
2961 
2962  mvfr0 = FPU->MVFR0;
2964  {
2965  return 2U; /* Double + Single precision FPU */
2966  }
2967  else if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U)
2968  {
2969  return 1U; /* Single precision FPU */
2970  }
2971  else
2972  {
2973  return 0U; /* No FPU */
2974  }
2975 }
2976 
2977 
2982 /* ########################## SAU functions #################################### */
2990 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
2991 
2996 __STATIC_INLINE void TZ_SAU_Enable(void)
2997 {
2998  SAU->CTRL |= (SAU_CTRL_ENABLE_Msk);
2999 }
3000 
3001 
3002 
3007 __STATIC_INLINE void TZ_SAU_Disable(void)
3008 {
3009  SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk);
3010 }
3011 
3012 #endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
3013 
3019 /* ################################## Debug Control function ############################################ */
3033 __STATIC_INLINE void DCB_SetAuthCtrl(uint32_t value)
3034 {
3035  __DSB();
3036  __ISB();
3037  DCB->DAUTHCTRL = value;
3038  __DSB();
3039  __ISB();
3040 }
3041 
3042 
3048 __STATIC_INLINE uint32_t DCB_GetAuthCtrl(void)
3049 {
3050  return (DCB->DAUTHCTRL);
3051 }
3052 
3053 
3054 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
3055 
3060 __STATIC_INLINE void TZ_DCB_SetAuthCtrl_NS(uint32_t value)
3061 {
3062  __DSB();
3063  __ISB();
3064  DCB_NS->DAUTHCTRL = value;
3065  __DSB();
3066  __ISB();
3067 }
3068 
3069 
3075 __STATIC_INLINE uint32_t TZ_DCB_GetAuthCtrl_NS(void)
3076 {
3077  return (DCB_NS->DAUTHCTRL);
3078 }
3079 #endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
3080 
3086 /* ################################## Debug Identification function ############################################ */
3100 __STATIC_INLINE uint32_t DIB_GetAuthStatus(void)
3101 {
3102  return (DIB->DAUTHSTATUS);
3103 }
3104 
3105 
3106 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
3107 
3112 __STATIC_INLINE uint32_t TZ_DIB_GetAuthStatus_NS(void)
3113 {
3114  return (DIB_NS->DAUTHSTATUS);
3115 }
3116 #endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
3117 
3123 /* ################################## SysTick function ############################################ */
3131 #if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U)
3132 
3144 __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
3145 {
3146  if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
3147  {
3148  return (1UL); /* Reload value impossible */
3149  }
3150 
3151  SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
3152  NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
3153  SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
3156  SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
3157  return (0UL); /* Function successful */
3158 }
3159 
3160 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
3161 
3173 __STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks)
3174 {
3175  if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
3176  {
3177  return (1UL); /* Reload value impossible */
3178  }
3179 
3180  SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
3181  TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
3182  SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */
3183  SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
3185  SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
3186  return (0UL); /* Function successful */
3187 }
3188 #endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
3189 
3190 #endif
3191 
3196 /* ##################################### Debug In/Output function ########################################### */
3204 extern volatile int32_t ITM_RxBuffer;
3205 #define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U)
3216 __STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
3217 {
3218  if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */
3219  ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */
3220  {
3221  while (ITM->PORT[0U].u32 == 0UL)
3222  {
3223  __NOP();
3224  }
3225  ITM->PORT[0U].u8 = (uint8_t)ch;
3226  }
3227  return (ch);
3228 }
3229 
3230 
3237 __STATIC_INLINE int32_t ITM_ReceiveChar (void)
3238 {
3239  int32_t ch = -1; /* no character available */
3240 
3242  {
3243  ch = ITM_RxBuffer;
3244  ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */
3245  }
3246 
3247  return (ch);
3248 }
3249 
3250 
3257 __STATIC_INLINE int32_t ITM_CheckChar (void)
3258 {
3259 
3261  {
3262  return (0); /* no character available */
3263  }
3264  else
3265  {
3266  return (1); /* character available */
3267  }
3268 }
3269 
3275 #ifdef __cplusplus
3276 }
3277 #endif
3278 
3279 #endif /* __CORE_CM33_H_DEPENDANT */
3280 
3281 #endif /* __CMSIS_GENERIC */
SysTick_Type
Structure type to access the System Timer (SysTick).
Definition: core_cm0.h:451
__NVIC_GetVector
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
Get Interrupt Vector.
Definition: core_cm33.h:2701
FPU
#define FPU
Definition: core_cm33.h:2234
__IM
#define __IM
Definition: core_cm33.h:289
__NVIC_SetPriorityGrouping
__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
Set Priority Grouping.
Definition: core_cm33.h:2360
ITM_CheckChar
__STATIC_INLINE int32_t ITM_CheckChar(void)
ITM Check Character.
Definition: core_cm33.h:3254
__NVIC_GetPendingIRQ
__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn)
Get Pending Interrupt.
Definition: core_cm33.h:2448
xPSR_Type
Union type to access the Special-Purpose Program Status Registers (xPSR).
Definition: core_cm0.h:250
__NVIC_GetActive
__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn)
Get Active Interrupt.
Definition: core_cm33.h:2499
SysTick_LOAD_RELOAD_Msk
#define SysTick_LOAD_RELOAD_Msk
Definition: core_cm33.h:990
__ISB
__STATIC_FORCEINLINE void __ISB(void)
Instruction Synchronization Barrier.
Definition: cmsis_gcc.h:874
ITM_RxBuffer
volatile int32_t ITM_RxBuffer
DCB_SetAuthCtrl
__STATIC_INLINE void DCB_SetAuthCtrl(uint32_t value)
Set Debug Authentication Control Register.
Definition: core_cm33.h:3030
TPI_Type
Structure type to access the Trace Port Interface Register (TPI).
Definition: core_cm33.h:1305
DCB_GetAuthCtrl
__STATIC_INLINE uint32_t DCB_GetAuthCtrl(void)
Get Debug Authentication Control Register.
Definition: core_cm33.h:3045
ITM_Type
Structure type to access the Instrumentation Trace Macrocell Register (ITM).
Definition: core_cm33.h:1019
__NVIC_SetPendingIRQ
__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn)
Set Pending Interrupt.
Definition: core_cm33.h:2467
NVIC
#define NVIC
Definition: core_cm33.h:2215
FPU_Type
Structure type to access the Floating Point Unit (FPU).
Definition: core_cm33.h:1678
SCB_AIRCR_PRIGROUP_Pos
#define SCB_AIRCR_PRIGROUP_Pos
Definition: core_cm33.h:632
SCB_Type
Structure type to access the System Control Block (SCB).
Definition: core_cm0.h:344
DIB
#define DIB
Definition: core_cm33.h:2221
IRQn_Type
IRQn_Type
Interrupt Number Definition.
Definition: DA1459x-00.h:67
NVIC_DecodePriority
__STATIC_INLINE void NVIC_DecodePriority(uint32_t Priority, uint32_t PriorityGroup, uint32_t *const pPreemptPriority, uint32_t *const pSubPriority)
Decode Priority.
Definition: core_cm33.h:2662
__NVIC_ClearPendingIRQ
__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn)
Clear Pending Interrupt.
Definition: core_cm33.h:2482
__DSB
__STATIC_FORCEINLINE void __DSB(void)
Data Synchronization Barrier.
Definition: cmsis_gcc.h:885
SCnSCB_Type
Structure type to access the System Control and ID Register not in the SCB.
Definition: core_cm33.h:942
ITM_ReceiveChar
__STATIC_INLINE int32_t ITM_ReceiveChar(void)
ITM Receive Character.
Definition: core_cm33.h:3234
SCB_AIRCR_SYSRESETREQ_Msk
#define SCB_AIRCR_SYSRESETREQ_Msk
Definition: core_cm33.h:639
SysTick_CTRL_ENABLE_Msk
#define SysTick_CTRL_ENABLE_Msk
Definition: core_cm33.h:986
IPSR_Type
Union type to access the Interrupt Program Status Register (IPSR).
Definition: core_cm0.h:232
__NVIC_GetPriority
__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn)
Get Interrupt Priority.
Definition: core_cm33.h:2610
cmsis_version.h
CMSIS Core(M) Version definitions.
FPU_MVFR0_Single_precision_Msk
#define FPU_MVFR0_Single_precision_Msk
Definition: core_cm33.h:1778
__NVIC_EnableIRQ
__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
Enable Interrupt.
Definition: core_cm33.h:2391
DIB_GetAuthStatus
__STATIC_INLINE uint32_t DIB_GetAuthStatus(void)
Get Debug Authentication Status Register.
Definition: core_cm33.h:3097
DCB
#define DCB
Definition: core_cm33.h:2220
__NOP
#define __NOP()
No Operation.
Definition: cmsis_gcc.h:844
ITM_TCR_ITMENA_Msk
#define ITM_TCR_ITMENA_Msk
Definition: core_cm33.h:1094
__IOM
#define __IOM
Definition: core_cm33.h:291
CONTROL_Type
Union type to access the Control Registers (CONTROL).
Definition: core_cm0.h:289
__NVIC_DisableIRQ
__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn)
Disable Interrupt.
Definition: core_cm33.h:2429
DCB_Type
Structure type to access the Debug Control Block Registers (DCB).
Definition: core_cm33.h:1947
SCB_AIRCR_VECTKEY_Pos
#define SCB_AIRCR_VECTKEY_Pos
Definition: core_cm33.h:617
SysTick_CTRL_TICKINT_Msk
#define SysTick_CTRL_TICKINT_Msk
Definition: core_cm33.h:983
CoreDebug_Type
Definition: core_cm33.h:1813
ITM_RXBUFFER_EMPTY
#define ITM_RXBUFFER_EMPTY
Definition: core_cm33.h:3202
__NVIC_PRIO_BITS
#define __NVIC_PRIO_BITS
Definition: DA1459x-00.h:129
NVIC_Type
Structure type to access the Nested Vectored Interrupt Controller (NVIC).
Definition: core_cm0.h:317
__NVIC_SetVector
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
Set Interrupt Vector.
Definition: core_cm33.h:2685
SysTick
#define SysTick
Definition: core_cm33.h:2214
__NVIC_SetPriority
__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
Set Interrupt Priority.
Definition: core_cm33.h:2588
SCB_GetFPUType
__STATIC_INLINE uint32_t SCB_GetFPUType(void)
get FPU type
Definition: core_cm33.h:2955
SCB
#define SCB
Definition: core_cm33.h:2213
__OM
#define __OM
Definition: core_cm33.h:290
NVIC_EncodePriority
__STATIC_INLINE uint32_t NVIC_EncodePriority(uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
Encode Priority.
Definition: core_cm33.h:2635
APSR_Type
Union type to access the Application Program Status Register (APSR).
Definition: core_cm0.h:202
FPU_MVFR0_Double_precision_Msk
#define FPU_MVFR0_Double_precision_Msk
Definition: core_cm33.h:1775
cmsis_compiler.h
CMSIS compiler generic header file.
DIB_Type
Structure type to access the Debug Identification Block Registers (DIB).
Definition: core_cm33.h:2104
SCB_AIRCR_VECTKEY_Msk
#define SCB_AIRCR_VECTKEY_Msk
Definition: core_cm33.h:618
ITM
#define ITM
Definition: core_cm33.h:2216
__NVIC_GetPriorityGrouping
__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void)
Get Priority Grouping.
Definition: core_cm33.h:2379
__NVIC_SystemReset
__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void)
System Reset.
Definition: core_cm33.h:2712
__NVIC_GetEnableIRQ
__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn)
Get Interrupt Enable status.
Definition: core_cm33.h:2410
SysTick_IRQn
Definition: DA1459x-00.h:81
SysTick_CTRL_CLKSOURCE_Msk
#define SysTick_CTRL_CLKSOURCE_Msk
Definition: core_cm33.h:980
SCB_AIRCR_PRIGROUP_Msk
#define SCB_AIRCR_PRIGROUP_Msk
Definition: core_cm33.h:633
DWT_Type
Structure type to access the Data Watchpoint and Trace Register (DWT).
Definition: core_cm33.h:1119