70#define __CM23_CMSIS_VERSION ((__CM23_CMSIS_VERSION_MAIN << 16U) | \
71 __CM23_CMSIS_VERSION_SUB )
73#define __CORTEX_M (23U)
80#if defined ( __CC_ARM )
81 #if defined __TARGET_FPU_VFP
82 #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
85#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
87 #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
92 #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
95#elif defined ( __GNUC__ )
96 #if defined (__VFP_FP__) && !defined(__SOFTFP__)
97 #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
100#elif defined ( __ICCARM__ )
101 #if defined __ARMVFP__
102 #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
105#elif defined ( __TI_ARM__ )
106 #if defined __TI_VFP_SUPPORT__
107 #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
110#elif defined ( __TASKING__ )
111 #if defined __FPU_VFP__
112 #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
115#elif defined ( __CSMC__ )
116 #if ( __CSMC__ & 0x400U)
117 #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
131#ifndef __CMSIS_GENERIC
133#ifndef __CORE_CM23_H_DEPENDANT
134#define __CORE_CM23_H_DEPENDANT
141#if defined __CHECK_DEVICE_DEFINES
143 #define __CM23_REV 0x0000U
144 #warning "__CM23_REV not defined in device header file; using default!"
147 #ifndef __FPU_PRESENT
148 #define __FPU_PRESENT 0U
149 #warning "__FPU_PRESENT not defined in device header file; using default!"
152 #ifndef __MPU_PRESENT
153 #define __MPU_PRESENT 0U
154 #warning "__MPU_PRESENT not defined in device header file; using default!"
157 #ifndef __SAUREGION_PRESENT
158 #define __SAUREGION_PRESENT 0U
159 #warning "__SAUREGION_PRESENT not defined in device header file; using default!"
162 #ifndef __VTOR_PRESENT
163 #define __VTOR_PRESENT 0U
164 #warning "__VTOR_PRESENT not defined in device header file; using default!"
167 #ifndef __NVIC_PRIO_BITS
168 #define __NVIC_PRIO_BITS 2U
169 #warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
172 #ifndef __Vendor_SysTickConfig
173 #define __Vendor_SysTickConfig 0U
174 #warning "__Vendor_SysTickConfig not defined in device header file; using default!"
177 #ifndef __ETM_PRESENT
178 #define __ETM_PRESENT 0U
179 #warning "__ETM_PRESENT not defined in device header file; using default!"
182 #ifndef __MTB_PRESENT
183 #define __MTB_PRESENT 0U
184 #warning "__MTB_PRESENT not defined in device header file; using default!"
200 #define __I volatile const
206#define __IM volatile const
208#define __IOM volatile
254#define APSR_N_Pos 31U
255#define APSR_N_Msk (1UL << APSR_N_Pos)
257#define APSR_Z_Pos 30U
258#define APSR_Z_Msk (1UL << APSR_Z_Pos)
260#define APSR_C_Pos 29U
261#define APSR_C_Msk (1UL << APSR_C_Pos)
263#define APSR_V_Pos 28U
264#define APSR_V_Msk (1UL << APSR_V_Pos)
281#define IPSR_ISR_Pos 0U
282#define IPSR_ISR_Msk (0x1FFUL )
305#define xPSR_N_Pos 31U
306#define xPSR_N_Msk (1UL << xPSR_N_Pos)
308#define xPSR_Z_Pos 30U
309#define xPSR_Z_Msk (1UL << xPSR_Z_Pos)
311#define xPSR_C_Pos 29U
312#define xPSR_C_Msk (1UL << xPSR_C_Pos)
314#define xPSR_V_Pos 28U
315#define xPSR_V_Msk (1UL << xPSR_V_Pos)
317#define xPSR_T_Pos 24U
318#define xPSR_T_Msk (1UL << xPSR_T_Pos)
320#define xPSR_ISR_Pos 0U
321#define xPSR_ISR_Msk (0x1FFUL )
339#define CONTROL_SPSEL_Pos 1U
340#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos)
342#define CONTROL_nPRIV_Pos 0U
343#define CONTROL_nPRIV_Msk (1UL )
360 __IOM uint32_t ISER[16U];
361 uint32_t RESERVED0[16U];
362 __IOM uint32_t ICER[16U];
363 uint32_t RSERVED1[16U];
364 __IOM uint32_t ISPR[16U];
365 uint32_t RESERVED2[16U];
366 __IOM uint32_t ICPR[16U];
367 uint32_t RESERVED3[16U];
368 __IOM uint32_t IABR[16U];
369 uint32_t RESERVED4[16U];
370 __IOM uint32_t ITNS[16U];
371 uint32_t RESERVED5[16U];
372 __IOM uint32_t IPR[124U];
392#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
397 __IOM uint32_t AIRCR;
401 __IOM uint32_t SHPR[2U];
402 __IOM uint32_t SHCSR;
406#define SCB_CPUID_IMPLEMENTER_Pos 24U
407#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos)
409#define SCB_CPUID_VARIANT_Pos 20U
410#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos)
412#define SCB_CPUID_ARCHITECTURE_Pos 16U
413#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos)
415#define SCB_CPUID_PARTNO_Pos 4U
416#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos)
418#define SCB_CPUID_REVISION_Pos 0U
419#define SCB_CPUID_REVISION_Msk (0xFUL )
422#define SCB_ICSR_PENDNMISET_Pos 31U
423#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos)
425#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos
426#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk
428#define SCB_ICSR_PENDNMICLR_Pos 30U
429#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos)
431#define SCB_ICSR_PENDSVSET_Pos 28U
432#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos)
434#define SCB_ICSR_PENDSVCLR_Pos 27U
435#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos)
437#define SCB_ICSR_PENDSTSET_Pos 26U
438#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos)
440#define SCB_ICSR_PENDSTCLR_Pos 25U
441#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos)
443#define SCB_ICSR_STTNS_Pos 24U
444#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos)
446#define SCB_ICSR_ISRPREEMPT_Pos 23U
447#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos)
449#define SCB_ICSR_ISRPENDING_Pos 22U
450#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos)
452#define SCB_ICSR_VECTPENDING_Pos 12U
453#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos)
455#define SCB_ICSR_RETTOBASE_Pos 11U
456#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos)
458#define SCB_ICSR_VECTACTIVE_Pos 0U
459#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL )
461#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
463#define SCB_VTOR_TBLOFF_Pos 7U
464#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos)
468#define SCB_AIRCR_VECTKEY_Pos 16U
469#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos)
471#define SCB_AIRCR_VECTKEYSTAT_Pos 16U
472#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos)
474#define SCB_AIRCR_ENDIANESS_Pos 15U
475#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos)
477#define SCB_AIRCR_PRIS_Pos 14U
478#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos)
480#define SCB_AIRCR_BFHFNMINS_Pos 13U
481#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos)
483#define SCB_AIRCR_SYSRESETREQS_Pos 3U
484#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos)
486#define SCB_AIRCR_SYSRESETREQ_Pos 2U
487#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos)
489#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U
490#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos)
493#define SCB_SCR_SEVONPEND_Pos 4U
494#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos)
496#define SCB_SCR_SLEEPDEEPS_Pos 3U
497#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos)
499#define SCB_SCR_SLEEPDEEP_Pos 2U
500#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos)
502#define SCB_SCR_SLEEPONEXIT_Pos 1U
503#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos)
506#define SCB_CCR_BP_Pos 18U
507#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos)
509#define SCB_CCR_IC_Pos 17U
510#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos)
512#define SCB_CCR_DC_Pos 16U
513#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos)
515#define SCB_CCR_STKOFHFNMIGN_Pos 10U
516#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos)
518#define SCB_CCR_BFHFNMIGN_Pos 8U
519#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos)
521#define SCB_CCR_DIV_0_TRP_Pos 4U
522#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos)
524#define SCB_CCR_UNALIGN_TRP_Pos 3U
525#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos)
527#define SCB_CCR_USERSETMPEND_Pos 1U
528#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos)
531#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U
532#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos)
534#define SCB_SHCSR_SVCALLPENDED_Pos 15U
535#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos)
537#define SCB_SHCSR_SYSTICKACT_Pos 11U
538#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos)
540#define SCB_SHCSR_PENDSVACT_Pos 10U
541#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos)
543#define SCB_SHCSR_SVCALLACT_Pos 7U
544#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos)
546#define SCB_SHCSR_NMIACT_Pos 5U
547#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos)
549#define SCB_SHCSR_HARDFAULTACT_Pos 2U
550#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos)
574#define SysTick_CTRL_COUNTFLAG_Pos 16U
575#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos)
577#define SysTick_CTRL_CLKSOURCE_Pos 2U
578#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos)
580#define SysTick_CTRL_TICKINT_Pos 1U
581#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos)
583#define SysTick_CTRL_ENABLE_Pos 0U
584#define SysTick_CTRL_ENABLE_Msk (1UL )
587#define SysTick_LOAD_RELOAD_Pos 0U
588#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL )
591#define SysTick_VAL_CURRENT_Pos 0U
592#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL )
595#define SysTick_CALIB_NOREF_Pos 31U
596#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos)
598#define SysTick_CALIB_SKEW_Pos 30U
599#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos)
601#define SysTick_CALIB_TENMS_Pos 0U
602#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL )
620 uint32_t RESERVED0[6U];
622 __IOM uint32_t COMP0;
623 uint32_t RESERVED1[1U];
624 __IOM uint32_t FUNCTION0;
625 uint32_t RESERVED2[1U];
626 __IOM uint32_t COMP1;
627 uint32_t RESERVED3[1U];
628 __IOM uint32_t FUNCTION1;
629 uint32_t RESERVED4[1U];
630 __IOM uint32_t COMP2;
631 uint32_t RESERVED5[1U];
632 __IOM uint32_t FUNCTION2;
633 uint32_t RESERVED6[1U];
634 __IOM uint32_t COMP3;
635 uint32_t RESERVED7[1U];
636 __IOM uint32_t FUNCTION3;
637 uint32_t RESERVED8[1U];
638 __IOM uint32_t COMP4;
639 uint32_t RESERVED9[1U];
640 __IOM uint32_t FUNCTION4;
641 uint32_t RESERVED10[1U];
642 __IOM uint32_t COMP5;
643 uint32_t RESERVED11[1U];
644 __IOM uint32_t FUNCTION5;
645 uint32_t RESERVED12[1U];
646 __IOM uint32_t COMP6;
647 uint32_t RESERVED13[1U];
648 __IOM uint32_t FUNCTION6;
649 uint32_t RESERVED14[1U];
650 __IOM uint32_t COMP7;
651 uint32_t RESERVED15[1U];
652 __IOM uint32_t FUNCTION7;
653 uint32_t RESERVED16[1U];
654 __IOM uint32_t COMP8;
655 uint32_t RESERVED17[1U];
656 __IOM uint32_t FUNCTION8;
657 uint32_t RESERVED18[1U];
658 __IOM uint32_t COMP9;
659 uint32_t RESERVED19[1U];
660 __IOM uint32_t FUNCTION9;
661 uint32_t RESERVED20[1U];
662 __IOM uint32_t COMP10;
663 uint32_t RESERVED21[1U];
664 __IOM uint32_t FUNCTION10;
665 uint32_t RESERVED22[1U];
666 __IOM uint32_t COMP11;
667 uint32_t RESERVED23[1U];
668 __IOM uint32_t FUNCTION11;
669 uint32_t RESERVED24[1U];
670 __IOM uint32_t COMP12;
671 uint32_t RESERVED25[1U];
672 __IOM uint32_t FUNCTION12;
673 uint32_t RESERVED26[1U];
674 __IOM uint32_t COMP13;
675 uint32_t RESERVED27[1U];
676 __IOM uint32_t FUNCTION13;
677 uint32_t RESERVED28[1U];
678 __IOM uint32_t COMP14;
679 uint32_t RESERVED29[1U];
680 __IOM uint32_t FUNCTION14;
681 uint32_t RESERVED30[1U];
682 __IOM uint32_t COMP15;
683 uint32_t RESERVED31[1U];
684 __IOM uint32_t FUNCTION15;
688#define DWT_CTRL_NUMCOMP_Pos 28U
689#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos)
691#define DWT_CTRL_NOTRCPKT_Pos 27U
692#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos)
694#define DWT_CTRL_NOEXTTRIG_Pos 26U
695#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos)
697#define DWT_CTRL_NOCYCCNT_Pos 25U
698#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos)
700#define DWT_CTRL_NOPRFCNT_Pos 24U
701#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos)
704#define DWT_FUNCTION_ID_Pos 27U
705#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos)
707#define DWT_FUNCTION_MATCHED_Pos 24U
708#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos)
710#define DWT_FUNCTION_DATAVSIZE_Pos 10U
711#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos)
713#define DWT_FUNCTION_ACTION_Pos 4U
714#define DWT_FUNCTION_ACTION_Msk (0x3UL << DWT_FUNCTION_ACTION_Pos)
716#define DWT_FUNCTION_MATCH_Pos 0U
717#define DWT_FUNCTION_MATCH_Msk (0xFUL )
735 __IOM uint32_t CSPSR;
736 uint32_t RESERVED0[2U];
738 uint32_t RESERVED1[55U];
740 uint32_t RESERVED2[131U];
744 uint32_t RESERVED3[759U];
748 uint32_t RESERVED4[1U];
752 uint32_t RESERVED5[39U];
755 uint32_t RESERVED7[8U];
757 __IM uint32_t DEVTYPE;
761#define TPI_ACPR_PRESCALER_Pos 0U
762#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL )
765#define TPI_SPPR_TXMODE_Pos 0U
766#define TPI_SPPR_TXMODE_Msk (0x3UL )
769#define TPI_FFSR_FtNonStop_Pos 3U
770#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos)
772#define TPI_FFSR_TCPresent_Pos 2U
773#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos)
775#define TPI_FFSR_FtStopped_Pos 1U
776#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos)
778#define TPI_FFSR_FlInProg_Pos 0U
779#define TPI_FFSR_FlInProg_Msk (0x1UL )
782#define TPI_FFCR_TrigIn_Pos 8U
783#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos)
785#define TPI_FFCR_FOnMan_Pos 6U
786#define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos)
788#define TPI_FFCR_EnFCont_Pos 1U
789#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos)
792#define TPI_TRIGGER_TRIGGER_Pos 0U
793#define TPI_TRIGGER_TRIGGER_Msk (0x1UL )
796#define TPI_ITFTTD0_ATB_IF2_ATVALID_Pos 29U
797#define TPI_ITFTTD0_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_ATVALID_Pos)
799#define TPI_ITFTTD0_ATB_IF2_bytecount_Pos 27U
800#define TPI_ITFTTD0_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_bytecount_Pos)
802#define TPI_ITFTTD0_ATB_IF1_ATVALID_Pos 26U
803#define TPI_ITFTTD0_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_ATVALID_Pos)
805#define TPI_ITFTTD0_ATB_IF1_bytecount_Pos 24U
806#define TPI_ITFTTD0_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_bytecount_Pos)
808#define TPI_ITFTTD0_ATB_IF1_data2_Pos 16U
809#define TPI_ITFTTD0_ATB_IF1_data2_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos)
811#define TPI_ITFTTD0_ATB_IF1_data1_Pos 8U
812#define TPI_ITFTTD0_ATB_IF1_data1_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos)
814#define TPI_ITFTTD0_ATB_IF1_data0_Pos 0U
815#define TPI_ITFTTD0_ATB_IF1_data0_Msk (0xFFUL )
818#define TPI_ITATBCTR2_AFVALID2S_Pos 1U
819#define TPI_ITATBCTR2_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID2S_Pos)
821#define TPI_ITATBCTR2_AFVALID1S_Pos 1U
822#define TPI_ITATBCTR2_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID1S_Pos)
824#define TPI_ITATBCTR2_ATREADY2S_Pos 0U
825#define TPI_ITATBCTR2_ATREADY2S_Msk (0x1UL )
827#define TPI_ITATBCTR2_ATREADY1S_Pos 0U
828#define TPI_ITATBCTR2_ATREADY1S_Msk (0x1UL )
831#define TPI_ITFTTD1_ATB_IF2_ATVALID_Pos 29U
832#define TPI_ITFTTD1_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_ATVALID_Pos)
834#define TPI_ITFTTD1_ATB_IF2_bytecount_Pos 27U
835#define TPI_ITFTTD1_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_bytecount_Pos)
837#define TPI_ITFTTD1_ATB_IF1_ATVALID_Pos 26U
838#define TPI_ITFTTD1_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_ATVALID_Pos)
840#define TPI_ITFTTD1_ATB_IF1_bytecount_Pos 24U
841#define TPI_ITFTTD1_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_bytecount_Pos)
843#define TPI_ITFTTD1_ATB_IF2_data2_Pos 16U
844#define TPI_ITFTTD1_ATB_IF2_data2_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos)
846#define TPI_ITFTTD1_ATB_IF2_data1_Pos 8U
847#define TPI_ITFTTD1_ATB_IF2_data1_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos)
849#define TPI_ITFTTD1_ATB_IF2_data0_Pos 0U
850#define TPI_ITFTTD1_ATB_IF2_data0_Msk (0xFFUL )
853#define TPI_ITATBCTR0_AFVALID2S_Pos 1U
854#define TPI_ITATBCTR0_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID2S_Pos)
856#define TPI_ITATBCTR0_AFVALID1S_Pos 1U
857#define TPI_ITATBCTR0_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID1S_Pos)
859#define TPI_ITATBCTR0_ATREADY2S_Pos 0U
860#define TPI_ITATBCTR0_ATREADY2S_Msk (0x1UL )
862#define TPI_ITATBCTR0_ATREADY1S_Pos 0U
863#define TPI_ITATBCTR0_ATREADY1S_Msk (0x1UL )
866#define TPI_ITCTRL_Mode_Pos 0U
867#define TPI_ITCTRL_Mode_Msk (0x3UL )
870#define TPI_DEVID_NRZVALID_Pos 11U
871#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos)
873#define TPI_DEVID_MANCVALID_Pos 10U
874#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos)
876#define TPI_DEVID_PTINVALID_Pos 9U
877#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos)
879#define TPI_DEVID_FIFOSZ_Pos 6U
880#define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos)
882#define TPI_DEVID_NrTraceInput_Pos 0U
883#define TPI_DEVID_NrTraceInput_Msk (0x3FUL )
886#define TPI_DEVTYPE_SubType_Pos 4U
887#define TPI_DEVTYPE_SubType_Msk (0xFUL )
889#define TPI_DEVTYPE_MajorType_Pos 0U
890#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos)
895#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
913 uint32_t RESERVED0[7U];
915 __IOM uint32_t MAIR[2];
917 __IOM uint32_t MAIR0;
918 __IOM uint32_t MAIR1;
923#define MPU_TYPE_RALIASES 1U
926#define MPU_TYPE_IREGION_Pos 16U
927#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos)
929#define MPU_TYPE_DREGION_Pos 8U
930#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos)
932#define MPU_TYPE_SEPARATE_Pos 0U
933#define MPU_TYPE_SEPARATE_Msk (1UL )
936#define MPU_CTRL_PRIVDEFENA_Pos 2U
937#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos)
939#define MPU_CTRL_HFNMIENA_Pos 1U
940#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos)
942#define MPU_CTRL_ENABLE_Pos 0U
943#define MPU_CTRL_ENABLE_Msk (1UL )
946#define MPU_RNR_REGION_Pos 0U
947#define MPU_RNR_REGION_Msk (0xFFUL )
950#define MPU_RBAR_BASE_Pos 5U
951#define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos)
953#define MPU_RBAR_SH_Pos 3U
954#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos)
956#define MPU_RBAR_AP_Pos 1U
957#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos)
959#define MPU_RBAR_XN_Pos 0U
960#define MPU_RBAR_XN_Msk (01UL )
963#define MPU_RLAR_LIMIT_Pos 5U
964#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos)
966#define MPU_RLAR_AttrIndx_Pos 1U
967#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos)
969#define MPU_RLAR_EN_Pos 0U
970#define MPU_RLAR_EN_Msk (1UL )
973#define MPU_MAIR0_Attr3_Pos 24U
974#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos)
976#define MPU_MAIR0_Attr2_Pos 16U
977#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos)
979#define MPU_MAIR0_Attr1_Pos 8U
980#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos)
982#define MPU_MAIR0_Attr0_Pos 0U
983#define MPU_MAIR0_Attr0_Msk (0xFFUL )
986#define MPU_MAIR1_Attr7_Pos 24U
987#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos)
989#define MPU_MAIR1_Attr6_Pos 16U
990#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos)
992#define MPU_MAIR1_Attr5_Pos 8U
993#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos)
995#define MPU_MAIR1_Attr4_Pos 0U
996#define MPU_MAIR1_Attr4_Msk (0xFFUL )
1002#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
1015 __IOM uint32_t CTRL;
1017#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U)
1019 __IOM uint32_t RBAR;
1020 __IOM uint32_t RLAR;
1025#define SAU_CTRL_ALLNS_Pos 1U
1026#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos)
1028#define SAU_CTRL_ENABLE_Pos 0U
1029#define SAU_CTRL_ENABLE_Msk (1UL )
1032#define SAU_TYPE_SREGION_Pos 0U
1033#define SAU_TYPE_SREGION_Msk (0xFFUL )
1035#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U)
1037#define SAU_RNR_REGION_Pos 0U
1038#define SAU_RNR_REGION_Msk (0xFFUL )
1041#define SAU_RBAR_BADDR_Pos 5U
1042#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos)
1045#define SAU_RLAR_LADDR_Pos 5U
1046#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos)
1048#define SAU_RLAR_NSC_Pos 1U
1049#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos)
1051#define SAU_RLAR_ENABLE_Pos 0U
1052#define SAU_RLAR_ENABLE_Msk (1UL )
1073 __IOM uint32_t DHCSR;
1074 __OM uint32_t DCRSR;
1075 __IOM uint32_t DCRDR;
1076 __IOM uint32_t DEMCR;
1077 uint32_t RESERVED0[1U];
1078 __IOM uint32_t DAUTHCTRL;
1079 __IOM uint32_t DSCSR;
1083#define CoreDebug_DHCSR_DBGKEY_Pos 16U
1084#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos)
1086#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U
1087#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos)
1089#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U
1090#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos)
1092#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U
1093#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos)
1095#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U
1096#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos)
1098#define CoreDebug_DHCSR_S_SLEEP_Pos 18U
1099#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos)
1101#define CoreDebug_DHCSR_S_HALT_Pos 17U
1102#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos)
1104#define CoreDebug_DHCSR_S_REGRDY_Pos 16U
1105#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos)
1107#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U
1108#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos)
1110#define CoreDebug_DHCSR_C_STEP_Pos 2U
1111#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos)
1113#define CoreDebug_DHCSR_C_HALT_Pos 1U
1114#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos)
1116#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U
1117#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL )
1120#define CoreDebug_DCRSR_REGWnR_Pos 16U
1121#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos)
1123#define CoreDebug_DCRSR_REGSEL_Pos 0U
1124#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL )
1127#define CoreDebug_DEMCR_DWTENA_Pos 24U
1128#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos)
1130#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U
1131#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos)
1133#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U
1134#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL )
1137#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U
1138#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos)
1140#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U
1141#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos)
1143#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U
1144#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos)
1146#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U
1147#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL )
1150#define CoreDebug_DSCSR_CDS_Pos 16U
1151#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos)
1153#define CoreDebug_DSCSR_SBRSEL_Pos 1U
1154#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos)
1156#define CoreDebug_DSCSR_SBRSELEN_Pos 0U
1157#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL )
1174 __IOM uint32_t DHCSR;
1175 __OM uint32_t DCRSR;
1176 __IOM uint32_t DCRDR;
1177 __IOM uint32_t DEMCR;
1178 uint32_t RESERVED0[1U];
1179 __IOM uint32_t DAUTHCTRL;
1180 __IOM uint32_t DSCSR;
1184#define DCB_DHCSR_DBGKEY_Pos 16U
1185#define DCB_DHCSR_DBGKEY_Msk (0xFFFFUL << DCB_DHCSR_DBGKEY_Pos)
1187#define DCB_DHCSR_S_RESTART_ST_Pos 26U
1188#define DCB_DHCSR_S_RESTART_ST_Msk (0x1UL << DCB_DHCSR_S_RESTART_ST_Pos)
1190#define DCB_DHCSR_S_RESET_ST_Pos 25U
1191#define DCB_DHCSR_S_RESET_ST_Msk (0x1UL << DCB_DHCSR_S_RESET_ST_Pos)
1193#define DCB_DHCSR_S_RETIRE_ST_Pos 24U
1194#define DCB_DHCSR_S_RETIRE_ST_Msk (0x1UL << DCB_DHCSR_S_RETIRE_ST_Pos)
1196#define DCB_DHCSR_S_SDE_Pos 20U
1197#define DCB_DHCSR_S_SDE_Msk (0x1UL << DCB_DHCSR_S_SDE_Pos)
1199#define DCB_DHCSR_S_LOCKUP_Pos 19U
1200#define DCB_DHCSR_S_LOCKUP_Msk (0x1UL << DCB_DHCSR_S_LOCKUP_Pos)
1202#define DCB_DHCSR_S_SLEEP_Pos 18U
1203#define DCB_DHCSR_S_SLEEP_Msk (0x1UL << DCB_DHCSR_S_SLEEP_Pos)
1205#define DCB_DHCSR_S_HALT_Pos 17U
1206#define DCB_DHCSR_S_HALT_Msk (0x1UL << DCB_DHCSR_S_HALT_Pos)
1208#define DCB_DHCSR_S_REGRDY_Pos 16U
1209#define DCB_DHCSR_S_REGRDY_Msk (0x1UL << DCB_DHCSR_S_REGRDY_Pos)
1211#define DCB_DHCSR_C_MASKINTS_Pos 3U
1212#define DCB_DHCSR_C_MASKINTS_Msk (0x1UL << DCB_DHCSR_C_MASKINTS_Pos)
1214#define DCB_DHCSR_C_STEP_Pos 2U
1215#define DCB_DHCSR_C_STEP_Msk (0x1UL << DCB_DHCSR_C_STEP_Pos)
1217#define DCB_DHCSR_C_HALT_Pos 1U
1218#define DCB_DHCSR_C_HALT_Msk (0x1UL << DCB_DHCSR_C_HALT_Pos)
1220#define DCB_DHCSR_C_DEBUGEN_Pos 0U
1221#define DCB_DHCSR_C_DEBUGEN_Msk (0x1UL )
1224#define DCB_DCRSR_REGWnR_Pos 16U
1225#define DCB_DCRSR_REGWnR_Msk (0x1UL << DCB_DCRSR_REGWnR_Pos)
1227#define DCB_DCRSR_REGSEL_Pos 0U
1228#define DCB_DCRSR_REGSEL_Msk (0x7FUL )
1231#define DCB_DCRDR_DBGTMP_Pos 0U
1232#define DCB_DCRDR_DBGTMP_Msk (0xFFFFFFFFUL )
1235#define DCB_DEMCR_TRCENA_Pos 24U
1236#define DCB_DEMCR_TRCENA_Msk (0x1UL << DCB_DEMCR_TRCENA_Pos)
1238#define DCB_DEMCR_VC_HARDERR_Pos 10U
1239#define DCB_DEMCR_VC_HARDERR_Msk (0x1UL << DCB_DEMCR_VC_HARDERR_Pos)
1241#define DCB_DEMCR_VC_CORERESET_Pos 0U
1242#define DCB_DEMCR_VC_CORERESET_Msk (0x1UL )
1245#define DCB_DAUTHCTRL_INTSPNIDEN_Pos 3U
1246#define DCB_DAUTHCTRL_INTSPNIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPNIDEN_Pos)
1248#define DCB_DAUTHCTRL_SPNIDENSEL_Pos 2U
1249#define DCB_DAUTHCTRL_SPNIDENSEL_Msk (0x1UL << DCB_DAUTHCTRL_SPNIDENSEL_Pos)
1251#define DCB_DAUTHCTRL_INTSPIDEN_Pos 1U
1252#define DCB_DAUTHCTRL_INTSPIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPIDEN_Pos)
1254#define DCB_DAUTHCTRL_SPIDENSEL_Pos 0U
1255#define DCB_DAUTHCTRL_SPIDENSEL_Msk (0x1UL )
1258#define DCB_DSCSR_CDSKEY_Pos 17U
1259#define DCB_DSCSR_CDSKEY_Msk (0x1UL << DCB_DSCSR_CDSKEY_Pos)
1261#define DCB_DSCSR_CDS_Pos 16U
1262#define DCB_DSCSR_CDS_Msk (0x1UL << DCB_DSCSR_CDS_Pos)
1264#define DCB_DSCSR_SBRSEL_Pos 1U
1265#define DCB_DSCSR_SBRSEL_Msk (0x1UL << DCB_DSCSR_SBRSEL_Pos)
1267#define DCB_DSCSR_SBRSELEN_Pos 0U
1268#define DCB_DSCSR_SBRSELEN_Msk (0x1UL )
1288 __IM uint32_t DAUTHSTATUS;
1289 __IM uint32_t DDEVARCH;
1290 __IM uint32_t DDEVTYPE;
1294#define DIB_DLAR_KEY_Pos 0U
1295#define DIB_DLAR_KEY_Msk (0xFFFFFFFFUL )
1298#define DIB_DLSR_nTT_Pos 2U
1299#define DIB_DLSR_nTT_Msk (0x1UL << DIB_DLSR_nTT_Pos )
1301#define DIB_DLSR_SLK_Pos 1U
1302#define DIB_DLSR_SLK_Msk (0x1UL << DIB_DLSR_SLK_Pos )
1304#define DIB_DLSR_SLI_Pos 0U
1305#define DIB_DLSR_SLI_Msk (0x1UL )
1308#define DIB_DAUTHSTATUS_SNID_Pos 6U
1309#define DIB_DAUTHSTATUS_SNID_Msk (0x3UL << DIB_DAUTHSTATUS_SNID_Pos )
1311#define DIB_DAUTHSTATUS_SID_Pos 4U
1312#define DIB_DAUTHSTATUS_SID_Msk (0x3UL << DIB_DAUTHSTATUS_SID_Pos )
1314#define DIB_DAUTHSTATUS_NSNID_Pos 2U
1315#define DIB_DAUTHSTATUS_NSNID_Msk (0x3UL << DIB_DAUTHSTATUS_NSNID_Pos )
1317#define DIB_DAUTHSTATUS_NSID_Pos 0U
1318#define DIB_DAUTHSTATUS_NSID_Msk (0x3UL )
1321#define DIB_DDEVARCH_ARCHITECT_Pos 21U
1322#define DIB_DDEVARCH_ARCHITECT_Msk (0x7FFUL << DIB_DDEVARCH_ARCHITECT_Pos )
1324#define DIB_DDEVARCH_PRESENT_Pos 20U
1325#define DIB_DDEVARCH_PRESENT_Msk (0x1FUL << DIB_DDEVARCH_PRESENT_Pos )
1327#define DIB_DDEVARCH_REVISION_Pos 16U
1328#define DIB_DDEVARCH_REVISION_Msk (0xFUL << DIB_DDEVARCH_REVISION_Pos )
1330#define DIB_DDEVARCH_ARCHVER_Pos 12U
1331#define DIB_DDEVARCH_ARCHVER_Msk (0xFUL << DIB_DDEVARCH_ARCHVER_Pos )
1333#define DIB_DDEVARCH_ARCHPART_Pos 0U
1334#define DIB_DDEVARCH_ARCHPART_Msk (0xFFFUL )
1337#define DIB_DDEVTYPE_SUB_Pos 4U
1338#define DIB_DDEVTYPE_SUB_Msk (0xFUL << DIB_DDEVTYPE_SUB_Pos )
1340#define DIB_DDEVTYPE_MAJOR_Pos 0U
1341#define DIB_DDEVTYPE_MAJOR_Msk (0xFUL )
1360#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk)
1368#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos)
1381 #define SCS_BASE (0xE000E000UL)
1382 #define DWT_BASE (0xE0001000UL)
1383 #define TPI_BASE (0xE0040000UL)
1384 #define CoreDebug_BASE (0xE000EDF0UL)
1385 #define DCB_BASE (0xE000EDF0UL)
1386 #define DIB_BASE (0xE000EFB0UL)
1387 #define SysTick_BASE (SCS_BASE + 0x0010UL)
1388 #define NVIC_BASE (SCS_BASE + 0x0100UL)
1389 #define SCB_BASE (SCS_BASE + 0x0D00UL)
1392 #define SCB ((SCB_Type *) SCB_BASE )
1393 #define SysTick ((SysTick_Type *) SysTick_BASE )
1394 #define NVIC ((NVIC_Type *) NVIC_BASE )
1395 #define DWT ((DWT_Type *) DWT_BASE )
1396 #define TPI ((TPI_Type *) TPI_BASE )
1397 #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE )
1398 #define DCB ((DCB_Type *) DCB_BASE )
1399 #define DIB ((DIB_Type *) DIB_BASE )
1401 #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
1402 #define MPU_BASE (SCS_BASE + 0x0D90UL)
1403 #define MPU ((MPU_Type *) MPU_BASE )
1406 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
1407 #define SAU_BASE (SCS_BASE + 0x0DD0UL)
1408 #define SAU ((SAU_Type *) SAU_BASE )
1411#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
1412 #define SCS_BASE_NS (0xE002E000UL)
1413 #define CoreDebug_BASE_NS (0xE002EDF0UL)
1414 #define DCB_BASE_NS (0xE002EDF0UL)
1415 #define DIB_BASE_NS (0xE002EFB0UL)
1416 #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL)
1417 #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL)
1418 #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL)
1420 #define SCB_NS ((SCB_Type *) SCB_BASE_NS )
1421 #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS )
1422 #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS )
1423 #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS)
1424 #define DCB_NS ((DCB_Type *) DCB_BASE_NS )
1425 #define DIB_NS ((DIB_Type *) DIB_BASE_NS )
1427 #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
1428 #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL)
1429 #define MPU_NS ((MPU_Type *) MPU_BASE_NS )
1459#ifdef CMSIS_NVIC_VIRTUAL
1460 #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE
1461 #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h"
1463 #include CMSIS_NVIC_VIRTUAL_HEADER_FILE
1467 #define NVIC_EnableIRQ __NVIC_EnableIRQ
1468 #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ
1469 #define NVIC_DisableIRQ __NVIC_DisableIRQ
1470 #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ
1471 #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ
1472 #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ
1473 #define NVIC_GetActive __NVIC_GetActive
1474 #define NVIC_SetPriority __NVIC_SetPriority
1475 #define NVIC_GetPriority __NVIC_GetPriority
1476 #define NVIC_SystemReset __NVIC_SystemReset
1479#ifdef CMSIS_VECTAB_VIRTUAL
1480 #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE
1481 #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h"
1483 #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE
1485 #define NVIC_SetVector __NVIC_SetVector
1486 #define NVIC_GetVector __NVIC_GetVector
1489#define NVIC_USER_IRQ_OFFSET 16
1495#define FNC_RETURN (0xFEFFFFFFUL)
1498#define EXC_RETURN_PREFIX (0xFF000000UL)
1499#define EXC_RETURN_S (0x00000040UL)
1500#define EXC_RETURN_DCRS (0x00000020UL)
1501#define EXC_RETURN_FTYPE (0x00000010UL)
1502#define EXC_RETURN_MODE (0x00000008UL)
1503#define EXC_RETURN_SPSEL (0x00000004UL)
1504#define EXC_RETURN_ES (0x00000001UL)
1507#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
1508#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL)
1510#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL)
1516#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL)
1517#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) )
1518#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) )
1520#define __NVIC_SetPriorityGrouping(X) (void)(X)
1521#define __NVIC_GetPriorityGrouping() (0U)
1531 if ((int32_t)(IRQn) >= 0)
1533 __COMPILER_BARRIER();
1534 NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
1535 __COMPILER_BARRIER();
1550 if ((int32_t)(IRQn) >= 0)
1552 return((uint32_t)(((
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
1569 if ((int32_t)(IRQn) >= 0)
1571 NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
1588 if ((int32_t)(IRQn) >= 0)
1590 return((uint32_t)(((
NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
1607 if ((int32_t)(IRQn) >= 0)
1609 NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
1622 if ((int32_t)(IRQn) >= 0)
1624 NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
1639 if ((int32_t)(IRQn) >= 0)
1641 return((uint32_t)(((
NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
1650#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
1659__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn)
1661 if ((int32_t)(IRQn) >= 0)
1663 return((uint32_t)(((
NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
1680__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn)
1682 if ((int32_t)(IRQn) >= 0)
1684 NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)));
1685 return((uint32_t)(((
NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
1702__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn)
1704 if ((int32_t)(IRQn) >= 0)
1706 NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)));
1707 return((uint32_t)(((
NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
1728 if ((int32_t)(IRQn) >= 0)
1730 NVIC->IPR[_IP_IDX(IRQn)] = ((uint32_t)(
NVIC->IPR[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
1731 (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn)));
1735 SCB->SHPR[_SHP_IDX(IRQn)] = ((uint32_t)(
SCB->SHPR[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
1736 (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn)));
1753 if ((int32_t)(IRQn) >= 0)
1755 return((uint32_t)(((
NVIC->IPR[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS)));
1759 return((uint32_t)(((
SCB->SHPR[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS)));
1775__STATIC_INLINE uint32_t
NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
1777 uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL);
1778 uint32_t PreemptPriorityBits;
1779 uint32_t SubPriorityBits;
1781 PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
1782 SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
1785 ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
1786 ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
1802__STATIC_INLINE
void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t*
const pPreemptPriority, uint32_t*
const pSubPriority)
1804 uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL);
1805 uint32_t PreemptPriorityBits;
1806 uint32_t SubPriorityBits;
1808 PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
1809 SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
1811 *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL);
1812 *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL);
1828#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
1829 uint32_t *vectors = (uint32_t *)
SCB->VTOR;
1831 uint32_t *vectors = (uint32_t *)0x0U;
1833 vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
1848#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
1849 uint32_t *vectors = (uint32_t *)
SCB->VTOR;
1851 uint32_t *vectors = (uint32_t *)0x0U;
1853 return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET];
1875#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
1882__STATIC_INLINE
void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn)
1884 if ((int32_t)(IRQn) >= 0)
1886 NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
1899__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn)
1901 if ((int32_t)(IRQn) >= 0)
1903 return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
1918__STATIC_INLINE
void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn)
1920 if ((int32_t)(IRQn) >= 0)
1922 NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
1935__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn)
1937 if ((int32_t)(IRQn) >= 0)
1939 return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
1954__STATIC_INLINE
void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn)
1956 if ((int32_t)(IRQn) >= 0)
1958 NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
1969__STATIC_INLINE
void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn)
1971 if ((int32_t)(IRQn) >= 0)
1973 NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
1986__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn)
1988 if ((int32_t)(IRQn) >= 0)
1990 return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
2008__STATIC_INLINE
void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority)
2010 if ((int32_t)(IRQn) >= 0)
2012 NVIC_NS->IPR[_IP_IDX(IRQn)] = ((uint32_t)(NVIC_NS->IPR[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
2013 (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn)));
2017 SCB_NS->SHPR[_SHP_IDX(IRQn)] = ((uint32_t)(SCB_NS->SHPR[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
2018 (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn)));
2031__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn)
2034 if ((int32_t)(IRQn) >= 0)
2036 return((uint32_t)(((NVIC_NS->IPR[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS)));
2040 return((uint32_t)(((SCB_NS->SHPR[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS)));
2049#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
2051#include "mpu_armv8.h"
2089#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
2095__STATIC_INLINE
void TZ_SAU_Enable(
void)
2097 SAU->CTRL |= (SAU_CTRL_ENABLE_Msk);
2106__STATIC_INLINE
void TZ_SAU_Disable(
void)
2108 SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk);
2136 DCB->DAUTHCTRL = value;
2149 return (
DCB->DAUTHCTRL);
2153#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
2159__STATIC_INLINE
void TZ_DCB_SetAuthCtrl_NS(uint32_t value)
2163 DCB_NS->DAUTHCTRL = value;
2174__STATIC_INLINE uint32_t TZ_DCB_GetAuthCtrl_NS(
void)
2176 return (DCB_NS->DAUTHCTRL);
2201 return (
DIB->DAUTHSTATUS);
2205#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
2211__STATIC_INLINE uint32_t TZ_DIB_GetAuthStatus_NS(
void)
2213 return (DIB_NS->DAUTHSTATUS);
2230#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U)
2243__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
2250 SysTick->LOAD = (uint32_t)(ticks - 1UL);
2251 NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL);
2259#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
2272__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks)
2279 SysTick_NS->LOAD = (uint32_t)(ticks - 1UL);
2280 TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL);
2281 SysTick_NS->VAL = 0UL;