38 #if defined ( __ICCARM__ )
39 #pragma system_include
46 #ifndef __CORE_CM4_H_GENERIC
47 #define __CORE_CM4_H_GENERIC
71 #define __CM4_CMSIS_VERSION_MAIN (0x03)
72 #define __CM4_CMSIS_VERSION_SUB (0x20)
73 #define __CM4_CMSIS_VERSION ((__CM4_CMSIS_VERSION_MAIN << 16) | \
74 __CM4_CMSIS_VERSION_SUB )
76 #define __CORTEX_M (0x04)
79 #if defined ( __CC_ARM )
81 #define __INLINE __inline
82 #define __STATIC_INLINE static __inline
84 #elif defined ( __ICCARM__ )
86 #define __INLINE inline
87 #define __STATIC_INLINE static inline
89 #elif defined ( __TMS470__ )
91 #define __STATIC_INLINE static inline
93 #elif defined ( __GNUC__ )
95 #define __INLINE inline
96 #define __STATIC_INLINE static inline
98 #elif defined ( __TASKING__ )
100 #define __INLINE inline
101 #define __STATIC_INLINE static inline
107 #if defined ( __CC_ARM )
108 #if defined __TARGET_FPU_VFP
109 #if (__FPU_PRESENT == 1)
112 #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
119 #elif defined ( __ICCARM__ )
120 #if defined __ARMVFP__
121 #if (__FPU_PRESENT == 1)
124 #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
131 #elif defined ( __TMS470__ )
132 #if defined __TI_VFP_SUPPORT__
133 #if (__FPU_PRESENT == 1)
136 #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
143 #elif defined ( __GNUC__ )
144 #if defined (__VFP_FP__) && !defined(__SOFTFP__)
145 #if (__FPU_PRESENT == 1)
148 #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
155 #elif defined ( __TASKING__ )
156 #if defined __FPU_VFP__
157 #if (__FPU_PRESENT == 1)
160 #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
175 #ifndef __CMSIS_GENERIC
177 #ifndef __CORE_CM4_H_DEPENDANT
178 #define __CORE_CM4_H_DEPENDANT
181 #if defined __CHECK_DEVICE_DEFINES
183 #define __CM4_REV 0x0000
184 #warning "__CM4_REV not defined in device header file; using default!"
187 #ifndef __FPU_PRESENT
188 #define __FPU_PRESENT 0
189 #warning "__FPU_PRESENT not defined in device header file; using default!"
192 #ifndef __MPU_PRESENT
193 #define __MPU_PRESENT 0
194 #warning "__MPU_PRESENT not defined in device header file; using default!"
197 #ifndef __NVIC_PRIO_BITS
198 #define __NVIC_PRIO_BITS 4
199 #warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
202 #ifndef __Vendor_SysTickConfig
203 #define __Vendor_SysTickConfig 0
204 #warning "__Vendor_SysTickConfig not defined in device header file; using default!"
219 #define __I volatile const
222 #define __IO volatile
255 #if (__CORTEX_M != 0x04)
256 uint32_t _reserved0:27;
258 uint32_t _reserved0:16;
260 uint32_t _reserved1:7;
279 uint32_t _reserved0:23;
292 #if (__CORTEX_M != 0x04)
293 uint32_t _reserved0:15;
295 uint32_t _reserved0:7;
297 uint32_t _reserved1:4;
320 uint32_t _reserved0:29;
339 uint32_t RESERVED0[24];
341 uint32_t RSERVED1[24];
343 uint32_t RESERVED2[24];
345 uint32_t RESERVED3[24];
347 uint32_t RESERVED4[56];
349 uint32_t RESERVED5[644];
354 #define NVIC_STIR_INTID_Pos 0
355 #define NVIC_STIR_INTID_Msk (0x1FFUL << NVIC_STIR_INTID_Pos)
389 uint32_t RESERVED0[5];
394 #define SCB_CPUID_IMPLEMENTER_Pos 24
395 #define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos)
397 #define SCB_CPUID_VARIANT_Pos 20
398 #define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos)
400 #define SCB_CPUID_ARCHITECTURE_Pos 16
401 #define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos)
403 #define SCB_CPUID_PARTNO_Pos 4
404 #define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos)
406 #define SCB_CPUID_REVISION_Pos 0
407 #define SCB_CPUID_REVISION_Msk (0xFUL << SCB_CPUID_REVISION_Pos)
410 #define SCB_ICSR_NMIPENDSET_Pos 31
411 #define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos)
413 #define SCB_ICSR_PENDSVSET_Pos 28
414 #define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos)
416 #define SCB_ICSR_PENDSVCLR_Pos 27
417 #define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos)
419 #define SCB_ICSR_PENDSTSET_Pos 26
420 #define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos)
422 #define SCB_ICSR_PENDSTCLR_Pos 25
423 #define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos)
425 #define SCB_ICSR_ISRPREEMPT_Pos 23
426 #define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos)
428 #define SCB_ICSR_ISRPENDING_Pos 22
429 #define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos)
431 #define SCB_ICSR_VECTPENDING_Pos 12
432 #define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos)
434 #define SCB_ICSR_RETTOBASE_Pos 11
435 #define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos)
437 #define SCB_ICSR_VECTACTIVE_Pos 0
438 #define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL << SCB_ICSR_VECTACTIVE_Pos)
441 #define SCB_VTOR_TBLOFF_Pos 7
442 #define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos)
445 #define SCB_AIRCR_VECTKEY_Pos 16
446 #define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos)
448 #define SCB_AIRCR_VECTKEYSTAT_Pos 16
449 #define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos)
451 #define SCB_AIRCR_ENDIANESS_Pos 15
452 #define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos)
454 #define SCB_AIRCR_PRIGROUP_Pos 8
455 #define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos)
457 #define SCB_AIRCR_SYSRESETREQ_Pos 2
458 #define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos)
460 #define SCB_AIRCR_VECTCLRACTIVE_Pos 1
461 #define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos)
463 #define SCB_AIRCR_VECTRESET_Pos 0
464 #define SCB_AIRCR_VECTRESET_Msk (1UL << SCB_AIRCR_VECTRESET_Pos)
467 #define SCB_SCR_SEVONPEND_Pos 4
468 #define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos)
470 #define SCB_SCR_SLEEPDEEP_Pos 2
471 #define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos)
473 #define SCB_SCR_SLEEPONEXIT_Pos 1
474 #define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos)
477 #define SCB_CCR_STKALIGN_Pos 9
478 #define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos)
480 #define SCB_CCR_BFHFNMIGN_Pos 8
481 #define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos)
483 #define SCB_CCR_DIV_0_TRP_Pos 4
484 #define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos)
486 #define SCB_CCR_UNALIGN_TRP_Pos 3
487 #define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos)
489 #define SCB_CCR_USERSETMPEND_Pos 1
490 #define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos)
492 #define SCB_CCR_NONBASETHRDENA_Pos 0
493 #define SCB_CCR_NONBASETHRDENA_Msk (1UL << SCB_CCR_NONBASETHRDENA_Pos)
496 #define SCB_SHCSR_USGFAULTENA_Pos 18
497 #define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos)
499 #define SCB_SHCSR_BUSFAULTENA_Pos 17
500 #define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos)
502 #define SCB_SHCSR_MEMFAULTENA_Pos 16
503 #define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos)
505 #define SCB_SHCSR_SVCALLPENDED_Pos 15
506 #define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos)
508 #define SCB_SHCSR_BUSFAULTPENDED_Pos 14
509 #define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos)
511 #define SCB_SHCSR_MEMFAULTPENDED_Pos 13
512 #define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos)
514 #define SCB_SHCSR_USGFAULTPENDED_Pos 12
515 #define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos)
517 #define SCB_SHCSR_SYSTICKACT_Pos 11
518 #define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos)
520 #define SCB_SHCSR_PENDSVACT_Pos 10
521 #define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos)
523 #define SCB_SHCSR_MONITORACT_Pos 8
524 #define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos)
526 #define SCB_SHCSR_SVCALLACT_Pos 7
527 #define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos)
529 #define SCB_SHCSR_USGFAULTACT_Pos 3
530 #define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos)
532 #define SCB_SHCSR_BUSFAULTACT_Pos 1
533 #define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos)
535 #define SCB_SHCSR_MEMFAULTACT_Pos 0
536 #define SCB_SHCSR_MEMFAULTACT_Msk (1UL << SCB_SHCSR_MEMFAULTACT_Pos)
539 #define SCB_CFSR_USGFAULTSR_Pos 16
540 #define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos)
542 #define SCB_CFSR_BUSFAULTSR_Pos 8
543 #define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos)
545 #define SCB_CFSR_MEMFAULTSR_Pos 0
546 #define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL << SCB_CFSR_MEMFAULTSR_Pos)
549 #define SCB_HFSR_DEBUGEVT_Pos 31
550 #define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos)
552 #define SCB_HFSR_FORCED_Pos 30
553 #define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos)
555 #define SCB_HFSR_VECTTBL_Pos 1
556 #define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos)
559 #define SCB_DFSR_EXTERNAL_Pos 4
560 #define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos)
562 #define SCB_DFSR_VCATCH_Pos 3
563 #define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos)
565 #define SCB_DFSR_DWTTRAP_Pos 2
566 #define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos)
568 #define SCB_DFSR_BKPT_Pos 1
569 #define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos)
571 #define SCB_DFSR_HALTED_Pos 0
572 #define SCB_DFSR_HALTED_Msk (1UL << SCB_DFSR_HALTED_Pos)
587 uint32_t RESERVED0[1];
593 #define SCnSCB_ICTR_INTLINESNUM_Pos 0
594 #define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL << SCnSCB_ICTR_INTLINESNUM_Pos)
597 #define SCnSCB_ACTLR_DISOOFP_Pos 9
598 #define SCnSCB_ACTLR_DISOOFP_Msk (1UL << SCnSCB_ACTLR_DISOOFP_Pos)
600 #define SCnSCB_ACTLR_DISFPCA_Pos 8
601 #define SCnSCB_ACTLR_DISFPCA_Msk (1UL << SCnSCB_ACTLR_DISFPCA_Pos)
603 #define SCnSCB_ACTLR_DISFOLD_Pos 2
604 #define SCnSCB_ACTLR_DISFOLD_Msk (1UL << SCnSCB_ACTLR_DISFOLD_Pos)
606 #define SCnSCB_ACTLR_DISDEFWBUF_Pos 1
607 #define SCnSCB_ACTLR_DISDEFWBUF_Msk (1UL << SCnSCB_ACTLR_DISDEFWBUF_Pos)
609 #define SCnSCB_ACTLR_DISMCYCINT_Pos 0
610 #define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL << SCnSCB_ACTLR_DISMCYCINT_Pos)
632 #define SysTick_CTRL_COUNTFLAG_Pos 16
633 #define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos)
635 #define SysTick_CTRL_CLKSOURCE_Pos 2
636 #define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos)
638 #define SysTick_CTRL_TICKINT_Pos 1
639 #define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos)
641 #define SysTick_CTRL_ENABLE_Pos 0
642 #define SysTick_CTRL_ENABLE_Msk (1UL << SysTick_CTRL_ENABLE_Pos)
645 #define SysTick_LOAD_RELOAD_Pos 0
646 #define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL << SysTick_LOAD_RELOAD_Pos)
649 #define SysTick_VAL_CURRENT_Pos 0
650 #define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL << SysTick_VAL_CURRENT_Pos)
653 #define SysTick_CALIB_NOREF_Pos 31
654 #define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos)
656 #define SysTick_CALIB_SKEW_Pos 30
657 #define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos)
659 #define SysTick_CALIB_TENMS_Pos 0
660 #define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL << SysTick_VAL_CURRENT_Pos)
681 uint32_t RESERVED0[864];
683 uint32_t RESERVED1[15];
685 uint32_t RESERVED2[15];
687 uint32_t RESERVED3[29];
691 uint32_t RESERVED4[43];
694 uint32_t RESERVED5[6];
710 #define ITM_TPR_PRIVMASK_Pos 0
711 #define ITM_TPR_PRIVMASK_Msk (0xFUL << ITM_TPR_PRIVMASK_Pos)
714 #define ITM_TCR_BUSY_Pos 23
715 #define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos)
717 #define ITM_TCR_TraceBusID_Pos 16
718 #define ITM_TCR_TraceBusID_Msk (0x7FUL << ITM_TCR_TraceBusID_Pos)
720 #define ITM_TCR_GTSFREQ_Pos 10
721 #define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos)
723 #define ITM_TCR_TSPrescale_Pos 8
724 #define ITM_TCR_TSPrescale_Msk (3UL << ITM_TCR_TSPrescale_Pos)
726 #define ITM_TCR_SWOENA_Pos 4
727 #define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos)
729 #define ITM_TCR_DWTENA_Pos 3
730 #define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos)
732 #define ITM_TCR_SYNCENA_Pos 2
733 #define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos)
735 #define ITM_TCR_TSENA_Pos 1
736 #define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos)
738 #define ITM_TCR_ITMENA_Pos 0
739 #define ITM_TCR_ITMENA_Msk (1UL << ITM_TCR_ITMENA_Pos)
742 #define ITM_IWR_ATVALIDM_Pos 0
743 #define ITM_IWR_ATVALIDM_Msk (1UL << ITM_IWR_ATVALIDM_Pos)
746 #define ITM_IRR_ATREADYM_Pos 0
747 #define ITM_IRR_ATREADYM_Msk (1UL << ITM_IRR_ATREADYM_Pos)
750 #define ITM_IMCR_INTEGRATION_Pos 0
751 #define ITM_IMCR_INTEGRATION_Msk (1UL << ITM_IMCR_INTEGRATION_Pos)
754 #define ITM_LSR_ByteAcc_Pos 2
755 #define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos)
757 #define ITM_LSR_Access_Pos 1
758 #define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos)
760 #define ITM_LSR_Present_Pos 0
761 #define ITM_LSR_Present_Msk (1UL << ITM_LSR_Present_Pos)
787 uint32_t RESERVED0[1];
791 uint32_t RESERVED1[1];
795 uint32_t RESERVED2[1];
802 #define DWT_CTRL_NUMCOMP_Pos 28
803 #define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos)
805 #define DWT_CTRL_NOTRCPKT_Pos 27
806 #define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos)
808 #define DWT_CTRL_NOEXTTRIG_Pos 26
809 #define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos)
811 #define DWT_CTRL_NOCYCCNT_Pos 25
812 #define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos)
814 #define DWT_CTRL_NOPRFCNT_Pos 24
815 #define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos)
817 #define DWT_CTRL_CYCEVTENA_Pos 22
818 #define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos)
820 #define DWT_CTRL_FOLDEVTENA_Pos 21
821 #define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos)
823 #define DWT_CTRL_LSUEVTENA_Pos 20
824 #define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos)
826 #define DWT_CTRL_SLEEPEVTENA_Pos 19
827 #define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos)
829 #define DWT_CTRL_EXCEVTENA_Pos 18
830 #define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos)
832 #define DWT_CTRL_CPIEVTENA_Pos 17
833 #define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos)
835 #define DWT_CTRL_EXCTRCENA_Pos 16
836 #define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos)
838 #define DWT_CTRL_PCSAMPLENA_Pos 12
839 #define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos)
841 #define DWT_CTRL_SYNCTAP_Pos 10
842 #define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos)
844 #define DWT_CTRL_CYCTAP_Pos 9
845 #define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos)
847 #define DWT_CTRL_POSTINIT_Pos 5
848 #define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos)
850 #define DWT_CTRL_POSTPRESET_Pos 1
851 #define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos)
853 #define DWT_CTRL_CYCCNTENA_Pos 0
854 #define DWT_CTRL_CYCCNTENA_Msk (0x1UL << DWT_CTRL_CYCCNTENA_Pos)
857 #define DWT_CPICNT_CPICNT_Pos 0
858 #define DWT_CPICNT_CPICNT_Msk (0xFFUL << DWT_CPICNT_CPICNT_Pos)
861 #define DWT_EXCCNT_EXCCNT_Pos 0
862 #define DWT_EXCCNT_EXCCNT_Msk (0xFFUL << DWT_EXCCNT_EXCCNT_Pos)
865 #define DWT_SLEEPCNT_SLEEPCNT_Pos 0
866 #define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL << DWT_SLEEPCNT_SLEEPCNT_Pos)
869 #define DWT_LSUCNT_LSUCNT_Pos 0
870 #define DWT_LSUCNT_LSUCNT_Msk (0xFFUL << DWT_LSUCNT_LSUCNT_Pos)
873 #define DWT_FOLDCNT_FOLDCNT_Pos 0
874 #define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL << DWT_FOLDCNT_FOLDCNT_Pos)
877 #define DWT_MASK_MASK_Pos 0
878 #define DWT_MASK_MASK_Msk (0x1FUL << DWT_MASK_MASK_Pos)
881 #define DWT_FUNCTION_MATCHED_Pos 24
882 #define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos)
884 #define DWT_FUNCTION_DATAVADDR1_Pos 16
885 #define DWT_FUNCTION_DATAVADDR1_Msk (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos)
887 #define DWT_FUNCTION_DATAVADDR0_Pos 12
888 #define DWT_FUNCTION_DATAVADDR0_Msk (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos)
890 #define DWT_FUNCTION_DATAVSIZE_Pos 10
891 #define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos)
893 #define DWT_FUNCTION_LNK1ENA_Pos 9
894 #define DWT_FUNCTION_LNK1ENA_Msk (0x1UL << DWT_FUNCTION_LNK1ENA_Pos)
896 #define DWT_FUNCTION_DATAVMATCH_Pos 8
897 #define DWT_FUNCTION_DATAVMATCH_Msk (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos)
899 #define DWT_FUNCTION_CYCMATCH_Pos 7
900 #define DWT_FUNCTION_CYCMATCH_Msk (0x1UL << DWT_FUNCTION_CYCMATCH_Pos)
902 #define DWT_FUNCTION_EMITRANGE_Pos 5
903 #define DWT_FUNCTION_EMITRANGE_Msk (0x1UL << DWT_FUNCTION_EMITRANGE_Pos)
905 #define DWT_FUNCTION_FUNCTION_Pos 0
906 #define DWT_FUNCTION_FUNCTION_Msk (0xFUL << DWT_FUNCTION_FUNCTION_Pos)
923 uint32_t RESERVED0[2];
925 uint32_t RESERVED1[55];
927 uint32_t RESERVED2[131];
931 uint32_t RESERVED3[759];
935 uint32_t RESERVED4[1];
939 uint32_t RESERVED5[39];
942 uint32_t RESERVED7[8];
948 #define TPI_ACPR_PRESCALER_Pos 0
949 #define TPI_ACPR_PRESCALER_Msk (0x1FFFUL << TPI_ACPR_PRESCALER_Pos)
952 #define TPI_SPPR_TXMODE_Pos 0
953 #define TPI_SPPR_TXMODE_Msk (0x3UL << TPI_SPPR_TXMODE_Pos)
956 #define TPI_FFSR_FtNonStop_Pos 3
957 #define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos)
959 #define TPI_FFSR_TCPresent_Pos 2
960 #define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos)
962 #define TPI_FFSR_FtStopped_Pos 1
963 #define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos)
965 #define TPI_FFSR_FlInProg_Pos 0
966 #define TPI_FFSR_FlInProg_Msk (0x1UL << TPI_FFSR_FlInProg_Pos)
969 #define TPI_FFCR_TrigIn_Pos 8
970 #define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos)
972 #define TPI_FFCR_EnFCont_Pos 1
973 #define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos)
976 #define TPI_TRIGGER_TRIGGER_Pos 0
977 #define TPI_TRIGGER_TRIGGER_Msk (0x1UL << TPI_TRIGGER_TRIGGER_Pos)
980 #define TPI_FIFO0_ITM_ATVALID_Pos 29
981 #define TPI_FIFO0_ITM_ATVALID_Msk (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos)
983 #define TPI_FIFO0_ITM_bytecount_Pos 27
984 #define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos)
986 #define TPI_FIFO0_ETM_ATVALID_Pos 26
987 #define TPI_FIFO0_ETM_ATVALID_Msk (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos)
989 #define TPI_FIFO0_ETM_bytecount_Pos 24
990 #define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos)
992 #define TPI_FIFO0_ETM2_Pos 16
993 #define TPI_FIFO0_ETM2_Msk (0xFFUL << TPI_FIFO0_ETM2_Pos)
995 #define TPI_FIFO0_ETM1_Pos 8
996 #define TPI_FIFO0_ETM1_Msk (0xFFUL << TPI_FIFO0_ETM1_Pos)
998 #define TPI_FIFO0_ETM0_Pos 0
999 #define TPI_FIFO0_ETM0_Msk (0xFFUL << TPI_FIFO0_ETM0_Pos)
1002 #define TPI_ITATBCTR2_ATREADY_Pos 0
1003 #define TPI_ITATBCTR2_ATREADY_Msk (0x1UL << TPI_ITATBCTR2_ATREADY_Pos)
1006 #define TPI_FIFO1_ITM_ATVALID_Pos 29
1007 #define TPI_FIFO1_ITM_ATVALID_Msk (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos)
1009 #define TPI_FIFO1_ITM_bytecount_Pos 27
1010 #define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos)
1012 #define TPI_FIFO1_ETM_ATVALID_Pos 26
1013 #define TPI_FIFO1_ETM_ATVALID_Msk (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos)
1015 #define TPI_FIFO1_ETM_bytecount_Pos 24
1016 #define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos)
1018 #define TPI_FIFO1_ITM2_Pos 16
1019 #define TPI_FIFO1_ITM2_Msk (0xFFUL << TPI_FIFO1_ITM2_Pos)
1021 #define TPI_FIFO1_ITM1_Pos 8
1022 #define TPI_FIFO1_ITM1_Msk (0xFFUL << TPI_FIFO1_ITM1_Pos)
1024 #define TPI_FIFO1_ITM0_Pos 0
1025 #define TPI_FIFO1_ITM0_Msk (0xFFUL << TPI_FIFO1_ITM0_Pos)
1028 #define TPI_ITATBCTR0_ATREADY_Pos 0
1029 #define TPI_ITATBCTR0_ATREADY_Msk (0x1UL << TPI_ITATBCTR0_ATREADY_Pos)
1032 #define TPI_ITCTRL_Mode_Pos 0
1033 #define TPI_ITCTRL_Mode_Msk (0x1UL << TPI_ITCTRL_Mode_Pos)
1036 #define TPI_DEVID_NRZVALID_Pos 11
1037 #define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos)
1039 #define TPI_DEVID_MANCVALID_Pos 10
1040 #define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos)
1042 #define TPI_DEVID_PTINVALID_Pos 9
1043 #define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos)
1045 #define TPI_DEVID_MinBufSz_Pos 6
1046 #define TPI_DEVID_MinBufSz_Msk (0x7UL << TPI_DEVID_MinBufSz_Pos)
1048 #define TPI_DEVID_AsynClkIn_Pos 5
1049 #define TPI_DEVID_AsynClkIn_Msk (0x1UL << TPI_DEVID_AsynClkIn_Pos)
1051 #define TPI_DEVID_NrTraceInput_Pos 0
1052 #define TPI_DEVID_NrTraceInput_Msk (0x1FUL << TPI_DEVID_NrTraceInput_Pos)
1055 #define TPI_DEVTYPE_SubType_Pos 0
1056 #define TPI_DEVTYPE_SubType_Msk (0xFUL << TPI_DEVTYPE_SubType_Pos)
1058 #define TPI_DEVTYPE_MajorType_Pos 4
1059 #define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos)
1064 #if (__MPU_PRESENT == 1)
1080 __IO uint32_t RBAR_A1;
1081 __IO uint32_t RASR_A1;
1082 __IO uint32_t RBAR_A2;
1083 __IO uint32_t RASR_A2;
1084 __IO uint32_t RBAR_A3;
1085 __IO uint32_t RASR_A3;
1089 #define MPU_TYPE_IREGION_Pos 16
1090 #define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos)
1092 #define MPU_TYPE_DREGION_Pos 8
1093 #define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos)
1095 #define MPU_TYPE_SEPARATE_Pos 0
1096 #define MPU_TYPE_SEPARATE_Msk (1UL << MPU_TYPE_SEPARATE_Pos)
1099 #define MPU_CTRL_PRIVDEFENA_Pos 2
1100 #define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos)
1102 #define MPU_CTRL_HFNMIENA_Pos 1
1103 #define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos)
1105 #define MPU_CTRL_ENABLE_Pos 0
1106 #define MPU_CTRL_ENABLE_Msk (1UL << MPU_CTRL_ENABLE_Pos)
1109 #define MPU_RNR_REGION_Pos 0
1110 #define MPU_RNR_REGION_Msk (0xFFUL << MPU_RNR_REGION_Pos)
1113 #define MPU_RBAR_ADDR_Pos 5
1114 #define MPU_RBAR_ADDR_Msk (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos)
1116 #define MPU_RBAR_VALID_Pos 4
1117 #define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos)
1119 #define MPU_RBAR_REGION_Pos 0
1120 #define MPU_RBAR_REGION_Msk (0xFUL << MPU_RBAR_REGION_Pos)
1123 #define MPU_RASR_ATTRS_Pos 16
1124 #define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos)
1126 #define MPU_RASR_XN_Pos 28
1127 #define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos)
1129 #define MPU_RASR_AP_Pos 24
1130 #define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos)
1132 #define MPU_RASR_TEX_Pos 19
1133 #define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos)
1135 #define MPU_RASR_S_Pos 18
1136 #define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos)
1138 #define MPU_RASR_C_Pos 17
1139 #define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos)
1141 #define MPU_RASR_B_Pos 16
1142 #define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos)
1144 #define MPU_RASR_SRD_Pos 8
1145 #define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos)
1147 #define MPU_RASR_SIZE_Pos 1
1148 #define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos)
1150 #define MPU_RASR_ENABLE_Pos 0
1151 #define MPU_RASR_ENABLE_Msk (1UL << MPU_RASR_ENABLE_Pos)
1157 #if (__FPU_PRESENT == 1)
1168 uint32_t RESERVED0[1];
1169 __IO uint32_t FPCCR;
1170 __IO uint32_t FPCAR;
1171 __IO uint32_t FPDSCR;
1177 #define FPU_FPCCR_ASPEN_Pos 31
1178 #define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos)
1180 #define FPU_FPCCR_LSPEN_Pos 30
1181 #define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos)
1183 #define FPU_FPCCR_MONRDY_Pos 8
1184 #define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos)
1186 #define FPU_FPCCR_BFRDY_Pos 6
1187 #define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos)
1189 #define FPU_FPCCR_MMRDY_Pos 5
1190 #define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos)
1192 #define FPU_FPCCR_HFRDY_Pos 4
1193 #define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos)
1195 #define FPU_FPCCR_THREAD_Pos 3
1196 #define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos)
1198 #define FPU_FPCCR_USER_Pos 1
1199 #define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos)
1201 #define FPU_FPCCR_LSPACT_Pos 0
1202 #define FPU_FPCCR_LSPACT_Msk (1UL << FPU_FPCCR_LSPACT_Pos)
1205 #define FPU_FPCAR_ADDRESS_Pos 3
1206 #define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos)
1209 #define FPU_FPDSCR_AHP_Pos 26
1210 #define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos)
1212 #define FPU_FPDSCR_DN_Pos 25
1213 #define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos)
1215 #define FPU_FPDSCR_FZ_Pos 24
1216 #define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos)
1218 #define FPU_FPDSCR_RMode_Pos 22
1219 #define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos)
1222 #define FPU_MVFR0_FP_rounding_modes_Pos 28
1223 #define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos)
1225 #define FPU_MVFR0_Short_vectors_Pos 24
1226 #define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos)
1228 #define FPU_MVFR0_Square_root_Pos 20
1229 #define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos)
1231 #define FPU_MVFR0_Divide_Pos 16
1232 #define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos)
1234 #define FPU_MVFR0_FP_excep_trapping_Pos 12
1235 #define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos)
1237 #define FPU_MVFR0_Double_precision_Pos 8
1238 #define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos)
1240 #define FPU_MVFR0_Single_precision_Pos 4
1241 #define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos)
1243 #define FPU_MVFR0_A_SIMD_registers_Pos 0
1244 #define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL << FPU_MVFR0_A_SIMD_registers_Pos)
1247 #define FPU_MVFR1_FP_fused_MAC_Pos 28
1248 #define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos)
1250 #define FPU_MVFR1_FP_HPFP_Pos 24
1251 #define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos)
1253 #define FPU_MVFR1_D_NaN_mode_Pos 4
1254 #define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos)
1256 #define FPU_MVFR1_FtZ_mode_Pos 0
1257 #define FPU_MVFR1_FtZ_mode_Msk (0xFUL << FPU_MVFR1_FtZ_mode_Pos)
1280 #define CoreDebug_DHCSR_DBGKEY_Pos 16
1281 #define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos)
1283 #define CoreDebug_DHCSR_S_RESET_ST_Pos 25
1284 #define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos)
1286 #define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24
1287 #define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos)
1289 #define CoreDebug_DHCSR_S_LOCKUP_Pos 19
1290 #define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos)
1292 #define CoreDebug_DHCSR_S_SLEEP_Pos 18
1293 #define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos)
1295 #define CoreDebug_DHCSR_S_HALT_Pos 17
1296 #define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos)
1298 #define CoreDebug_DHCSR_S_REGRDY_Pos 16
1299 #define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos)
1301 #define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5
1302 #define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos)
1304 #define CoreDebug_DHCSR_C_MASKINTS_Pos 3
1305 #define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos)
1307 #define CoreDebug_DHCSR_C_STEP_Pos 2
1308 #define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos)
1310 #define CoreDebug_DHCSR_C_HALT_Pos 1
1311 #define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos)
1313 #define CoreDebug_DHCSR_C_DEBUGEN_Pos 0
1314 #define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL << CoreDebug_DHCSR_C_DEBUGEN_Pos)
1317 #define CoreDebug_DCRSR_REGWnR_Pos 16
1318 #define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos)
1320 #define CoreDebug_DCRSR_REGSEL_Pos 0
1321 #define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL << CoreDebug_DCRSR_REGSEL_Pos)
1324 #define CoreDebug_DEMCR_TRCENA_Pos 24
1325 #define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos)
1327 #define CoreDebug_DEMCR_MON_REQ_Pos 19
1328 #define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos)
1330 #define CoreDebug_DEMCR_MON_STEP_Pos 18
1331 #define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos)
1333 #define CoreDebug_DEMCR_MON_PEND_Pos 17
1334 #define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos)
1336 #define CoreDebug_DEMCR_MON_EN_Pos 16
1337 #define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos)
1339 #define CoreDebug_DEMCR_VC_HARDERR_Pos 10
1340 #define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos)
1342 #define CoreDebug_DEMCR_VC_INTERR_Pos 9
1343 #define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos)
1345 #define CoreDebug_DEMCR_VC_BUSERR_Pos 8
1346 #define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos)
1348 #define CoreDebug_DEMCR_VC_STATERR_Pos 7
1349 #define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos)
1351 #define CoreDebug_DEMCR_VC_CHKERR_Pos 6
1352 #define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos)
1354 #define CoreDebug_DEMCR_VC_NOCPERR_Pos 5
1355 #define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos)
1357 #define CoreDebug_DEMCR_VC_MMERR_Pos 4
1358 #define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos)
1360 #define CoreDebug_DEMCR_VC_CORERESET_Pos 0
1361 #define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL << CoreDebug_DEMCR_VC_CORERESET_Pos)
1373 #define SCS_BASE (0xE000E000UL)
1374 #define ITM_BASE (0xE0000000UL)
1375 #define DWT_BASE (0xE0001000UL)
1376 #define TPI_BASE (0xE0040000UL)
1377 #define CoreDebug_BASE (0xE000EDF0UL)
1378 #define SysTick_BASE (SCS_BASE + 0x0010UL)
1379 #define NVIC_BASE (SCS_BASE + 0x0100UL)
1380 #define SCB_BASE (SCS_BASE + 0x0D00UL)
1382 #define SCnSCB ((SCnSCB_Type *) SCS_BASE )
1383 #define SCB ((SCB_Type *) SCB_BASE )
1384 #define SysTick ((SysTick_Type *) SysTick_BASE )
1385 #define NVIC ((NVIC_Type *) NVIC_BASE )
1386 #define ITM ((ITM_Type *) ITM_BASE )
1387 #define DWT ((DWT_Type *) DWT_BASE )
1388 #define TPI ((TPI_Type *) TPI_BASE )
1389 #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE)
1391 #if (__MPU_PRESENT == 1)
1392 #define MPU_BASE (SCS_BASE + 0x0D90UL)
1393 #define MPU ((MPU_Type *) MPU_BASE )
1396 #if (__FPU_PRESENT == 1)
1397 #define FPU_BASE (SCS_BASE + 0x0F30UL)
1398 #define FPU ((FPU_Type *) FPU_BASE )
1438 uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07);
1440 reg_value =
SCB->AIRCR;
1442 reg_value = (reg_value |
1444 (PriorityGroupTmp << 8));
1445 SCB->AIRCR = reg_value;
1470 NVIC->ISER[(uint32_t)((int32_t)
IRQn) >> 5] = (uint32_t)(1 << ((uint32_t)((int32_t)
IRQn) & (uint32_t)0x1F));
1482 NVIC->ICER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(
IRQn) & 0x1F));
1498 return((uint32_t) ((
NVIC->ISPR[(uint32_t)(IRQn) >> 5] & (1 << ((uint32_t)(IRQn) & 0x1F)))?1:0));
1510 NVIC->ISPR[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(
IRQn) & 0x1F));
1522 NVIC->ICPR[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(
IRQn) & 0x1F));
1537 return((uint32_t)((
NVIC->IABR[(uint32_t)(IRQn) >> 5] & (1 << ((uint32_t)(IRQn) & 0x1F)))?1:0));
1592 __STATIC_INLINE uint32_t
NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
1594 uint32_t PriorityGroupTmp = (PriorityGroup & 0x07);
1595 uint32_t PreemptPriorityBits;
1596 uint32_t SubPriorityBits;
1602 ((PreemptPriority & ((1 << (PreemptPriorityBits)) - 1)) << SubPriorityBits) |
1603 ((SubPriority & ((1 << (SubPriorityBits )) - 1)))
1620 __STATIC_INLINE
void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority)
1622 uint32_t PriorityGroupTmp = (PriorityGroup & 0x07);
1623 uint32_t PreemptPriorityBits;
1624 uint32_t SubPriorityBits;
1629 *pPreemptPriority = (Priority >> SubPriorityBits) & ((1 << (PreemptPriorityBits)) - 1);
1630 *pSubPriority = (Priority ) & ((1 << (SubPriorityBits )) - 1);
1660 #if (__Vendor_SysTickConfig == 0)
1704 #define ITM_RXBUFFER_EMPTY 0x5AA55AA5
1717 __STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
1720 (
ITM->TER & (1UL << 0) ) )
1722 while (
ITM->PORT[0].u32 == 0);
1723 ITM->PORT[0].u8 = (uint8_t) ch;
__IO uint32_t VAL
Definition: core_cm4.h:627
#define ITM
Definition: core_cm4.h:1386
CMSIS Cortex-M Core Function Access Header File.
Structure type to access the Data Watchpoint and Trace Register (DWT).
Definition: core_cm4.h:774
#define __NVIC_PRIO_BITS
Definition: stm32f4xx.h:166
#define SCB_AIRCR_PRIGROUP_Msk
Definition: core_cm4.h:455
__STATIC_INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
Get Pending Interrupt.
Definition: core_cm4.h:1496
__IO uint32_t CLAIMCLR
Definition: core_cm4.h:941
__O uint8_t u8
Definition: core_cm4.h:677
__STATIC_INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
Set Pending Interrupt.
Definition: core_cm4.h:1508
__IO uint32_t CPACR
Definition: core_cm4.h:390
__IO uint32_t CFSR
Definition: core_cm4.h:378
__I uint32_t FSCR
Definition: core_cm4.h:930
__I uint32_t IRR
Definition: core_cm4.h:689
__I uint32_t DEVID
Definition: core_cm4.h:943
__I uint32_t CID0
Definition: core_cm4.h:703
__I uint32_t PID4
Definition: core_cm4.h:695
__I uint32_t FIFO0
Definition: core_cm4.h:933
#define __I
Definition: core_cm4.h:219
__IO uint32_t DFSR
Definition: core_cm4.h:380
__IO uint32_t MMFAR
Definition: core_cm4.h:381
__IO uint32_t TER
Definition: core_cm4.h:682
__I uint32_t CPUID
Definition: core_cm4.h:370
__IO uint32_t BFAR
Definition: core_cm4.h:382
__IO uint32_t COMP1
Definition: core_cm4.h:788
__STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
Get Priority Grouping.
Definition: core_cm4.h:1455
#define SCB_AIRCR_VECTKEY_Msk
Definition: core_cm4.h:446
__IO uint32_t COMP0
Definition: core_cm4.h:784
__IO uint32_t COMP2
Definition: core_cm4.h:792
__I uint32_t CID2
Definition: core_cm4.h:705
__IO uint32_t HFSR
Definition: core_cm4.h:379
#define SysTick
Definition: core_cm4.h:1384
#define ITM_RXBUFFER_EMPTY
Definition: core_cm4.h:1704
__IO uint32_t FFCR
Definition: core_cm4.h:929
__I uint32_t CID3
Definition: core_cm4.h:706
IRQn
STM32F4XX Interrupt Number Definition, according to the selected device in Library_configuration_sect...
Definition: stm32f4xx.h:174
#define __IO
Definition: core_cm4.h:222
__IO uint32_t LSUCNT
Definition: core_cm4.h:781
__IO uint32_t ACPR
Definition: core_cm4.h:924
__IO uint32_t TCR
Definition: core_cm4.h:686
__IO uint32_t SHCSR
Definition: core_cm4.h:377
__IO uint32_t CLAIMSET
Definition: core_cm4.h:940
#define __O
Definition: core_cm4.h:221
volatile int32_t ITM_RxBuffer
__STATIC_INLINE int32_t ITM_ReceiveChar(void)
ITM Receive Character.
Definition: core_cm4.h:1736
__O uint16_t u16
Definition: core_cm4.h:678
__O uint32_t u32
Definition: core_cm4.h:679
__IO uint32_t MASK0
Definition: core_cm4.h:785
__IO uint32_t FUNCTION3
Definition: core_cm4.h:798
Union type to access the Interrupt Program Status Register (IPSR).
Definition: core_cm4.h:274
__I uint32_t PID0
Definition: core_cm4.h:699
uint32_t w
Definition: core_cm4.h:322
Structure type to access the Trace Port Interface Register (TPI).
Definition: core_cm4.h:919
__I uint32_t ICTR
Definition: core_cm4.h:588
__IO uint32_t SPPR
Definition: core_cm4.h:926
__I uint32_t FFSR
Definition: core_cm4.h:928
__STATIC_INLINE int32_t ITM_CheckChar(void)
ITM Check Character.
Definition: core_cm4.h:1755
__IO uint32_t FUNCTION2
Definition: core_cm4.h:794
__I uint32_t PID5
Definition: core_cm4.h:696
__IO uint32_t AFSR
Definition: core_cm4.h:383
__IO uint32_t SSPSR
Definition: core_cm4.h:921
__I uint32_t PID2
Definition: core_cm4.h:701
__IO uint32_t DEMCR
Definition: core_cm4.h:1276
__IO uint32_t EXCCNT
Definition: core_cm4.h:779
__IO uint32_t COMP3
Definition: core_cm4.h:796
#define NVIC
Definition: core_cm4.h:1385
__IO uint32_t LOAD
Definition: core_cm4.h:626
__IO uint32_t VTOR
Definition: core_cm4.h:372
__I uint32_t PID3
Definition: core_cm4.h:702
__IO uint32_t CTRL
Definition: core_cm4.h:625
uint32_t w
Definition: core_cm4.h:307
__IO uint32_t ITCTRL
Definition: core_cm4.h:938
__O uint32_t IWR
Definition: core_cm4.h:688
__STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
Enable External Interrupt.
Definition: core_cm4.h:1467
__I uint32_t PCSR
Definition: core_cm4.h:783
CMSIS Cortex-M4 SIMD Header File.
Structure type to access the Core Debug Register (CoreDebug).
Definition: core_cm4.h:1271
Structure type to access the System Control Block (SCB).
Definition: core_cm4.h:368
#define ITM_TCR_ITMENA_Msk
Definition: core_cm4.h:739
__I uint32_t DFR
Definition: core_cm4.h:385
#define SCB
Definition: core_cm4.h:1383
Structure type to access the Instrumentation Trace Macrocell Register (ITM).
Definition: core_cm4.h:673
uint32_t w
Definition: core_cm4.h:281
enum IRQn IRQn_Type
STM32F4XX Interrupt Number Definition, according to the selected device in Library_configuration_sect...
__O uint32_t DCRSR
Definition: core_cm4.h:1274
__O uint32_t LAR
Definition: core_cm4.h:692
__STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
Set Priority Grouping.
Definition: core_cm4.h:1435
__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
System Tick Configuration.
Definition: core_cm4.h:1677
__I uint32_t LSR
Definition: core_cm4.h:693
__STATIC_INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn)
Get Interrupt Priority.
Definition: core_cm4.h:1570
__IO uint32_t SCR
Definition: core_cm4.h:374
uint32_t w
Definition: core_cm4.h:268
__IO uint32_t FUNCTION1
Definition: core_cm4.h:790
__IO uint32_t CYCCNT
Definition: core_cm4.h:777
#define SCB_AIRCR_PRIGROUP_Pos
Definition: core_cm4.h:454
__I uint32_t CALIB
Definition: core_cm4.h:628
Structure type to access the System Control and ID Register not in the SCB.
Definition: core_cm4.h:585
__I uint32_t CID1
Definition: core_cm4.h:704
__STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
Set Interrupt Priority.
Definition: core_cm4.h:1550
Structure type to access the Nested Vectored Interrupt Controller (NVIC).
Definition: core_cm4.h:336
Structure type to access the System Timer (SysTick).
Definition: core_cm4.h:623
__I uint32_t PID1
Definition: core_cm4.h:700
#define SCB_AIRCR_VECTKEY_Pos
Definition: core_cm4.h:445
__I uint32_t TRIGGER
Definition: core_cm4.h:932
__STATIC_INLINE void NVIC_SystemReset(void)
System Reset.
Definition: core_cm4.h:1638
__IO uint32_t AIRCR
Definition: core_cm4.h:373
__IO uint32_t DCRDR
Definition: core_cm4.h:1275
__I uint32_t DEVTYPE
Definition: core_cm4.h:944
__O uint32_t STIR
Definition: core_cm4.h:350
#define SCB_AIRCR_SYSRESETREQ_Msk
Definition: core_cm4.h:458
Union type to access the Application Program Status Register (APSR).
Definition: core_cm4.h:251
__STATIC_INLINE void NVIC_DecodePriority(uint32_t Priority, uint32_t PriorityGroup, uint32_t *pPreemptPriority, uint32_t *pSubPriority)
Decode Priority.
Definition: core_cm4.h:1620
__STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
Disable External Interrupt.
Definition: core_cm4.h:1480
#define SysTick_LOAD_RELOAD_Msk
Definition: core_cm4.h:646
__IO uint32_t MASK3
Definition: core_cm4.h:797
__IO uint32_t MASK2
Definition: core_cm4.h:793
__I uint32_t ITATBCTR0
Definition: core_cm4.h:936
__I uint32_t FIFO1
Definition: core_cm4.h:937
__IO uint32_t ACTLR
Definition: core_cm4.h:589
__IO uint32_t CTRL
Definition: core_cm4.h:776
Union type to access the Control Registers (CONTROL).
Definition: core_cm4.h:313
#define SysTick_CTRL_CLKSOURCE_Msk
Definition: core_cm4.h:636
#define SysTick_CTRL_ENABLE_Msk
Definition: core_cm4.h:642
__IO uint32_t MASK1
Definition: core_cm4.h:789
__STATIC_INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
Clear Pending Interrupt.
Definition: core_cm4.h:1520
__IO uint32_t FOLDCNT
Definition: core_cm4.h:782
__STATIC_INLINE uint32_t NVIC_EncodePriority(uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
Encode Priority.
Definition: core_cm4.h:1592
__IO uint32_t CCR
Definition: core_cm4.h:375
CMSIS Cortex-M Core Instruction Access Header File.
__IO uint32_t DHCSR
Definition: core_cm4.h:1273
__IO uint32_t FUNCTION0
Definition: core_cm4.h:786
__IO uint32_t CSPSR
Definition: core_cm4.h:922
__STATIC_INLINE uint32_t NVIC_GetActive(IRQn_Type IRQn)
Get Active Interrupt.
Definition: core_cm4.h:1535
__IO uint32_t CPICNT
Definition: core_cm4.h:778
Union type to access the Special-Purpose Program Status Registers (xPSR).
Definition: core_cm4.h:287
__IO uint32_t TPR
Definition: core_cm4.h:684
__IO uint32_t ICSR
Definition: core_cm4.h:371
__IO uint32_t IMCR
Definition: core_cm4.h:690
__I uint32_t PID7
Definition: core_cm4.h:698
__IO uint32_t SLEEPCNT
Definition: core_cm4.h:780
#define SysTick_CTRL_TICKINT_Msk
Definition: core_cm4.h:639
__I uint32_t ITATBCTR2
Definition: core_cm4.h:934
__I uint32_t PID6
Definition: core_cm4.h:697
__I uint32_t ADR
Definition: core_cm4.h:386
Definition: stm32f4xx.h:184