-
Notifications
You must be signed in to change notification settings - Fork 2
/
hw_nvic.h
1414 lines (1312 loc) · 72 KB
/
hw_nvic.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//*****************************************************************************
//
// hw_nvic.h - Macros used when accessing the NVIC hardware.
//
// Copyright (c) 2005-2017 Texas Instruments Incorporated. All rights reserved.
// Software License Agreement
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// This is part of revision 2.1.4.178 of the Tiva Firmware Development Package.
//
//*****************************************************************************
#ifndef __HW_NVIC_H__
#define __HW_NVIC_H__
//*****************************************************************************
//
// The following are defines for the NVIC register addresses.
//
//*****************************************************************************
#define NVIC_ACTLR 0xE000E008 // Auxiliary Control
#define NVIC_ST_CTRL 0xE000E010 // SysTick Control and Status
// Register
#define NVIC_ST_RELOAD 0xE000E014 // SysTick Reload Value Register
#define NVIC_ST_CURRENT 0xE000E018 // SysTick Current Value Register
#define NVIC_EN0 0xE000E100 // Interrupt 0-31 Set Enable
#define NVIC_EN1 0xE000E104 // Interrupt 32-63 Set Enable
#define NVIC_EN2 0xE000E108 // Interrupt 64-95 Set Enable
#define NVIC_EN3 0xE000E10C // Interrupt 96-127 Set Enable
#define NVIC_EN4 0xE000E110 // Interrupt 128-159 Set Enable
#define NVIC_DIS0 0xE000E180 // Interrupt 0-31 Clear Enable
#define NVIC_DIS1 0xE000E184 // Interrupt 32-63 Clear Enable
#define NVIC_DIS2 0xE000E188 // Interrupt 64-95 Clear Enable
#define NVIC_DIS3 0xE000E18C // Interrupt 96-127 Clear Enable
#define NVIC_DIS4 0xE000E190 // Interrupt 128-159 Clear Enable
#define NVIC_PEND0 0xE000E200 // Interrupt 0-31 Set Pending
#define NVIC_PEND1 0xE000E204 // Interrupt 32-63 Set Pending
#define NVIC_PEND2 0xE000E208 // Interrupt 64-95 Set Pending
#define NVIC_PEND3 0xE000E20C // Interrupt 96-127 Set Pending
#define NVIC_PEND4 0xE000E210 // Interrupt 128-159 Set Pending
#define NVIC_UNPEND0 0xE000E280 // Interrupt 0-31 Clear Pending
#define NVIC_UNPEND1 0xE000E284 // Interrupt 32-63 Clear Pending
#define NVIC_UNPEND2 0xE000E288 // Interrupt 64-95 Clear Pending
#define NVIC_UNPEND3 0xE000E28C // Interrupt 96-127 Clear Pending
#define NVIC_UNPEND4 0xE000E290 // Interrupt 128-159 Clear Pending
#define NVIC_ACTIVE0 0xE000E300 // Interrupt 0-31 Active Bit
#define NVIC_ACTIVE1 0xE000E304 // Interrupt 32-63 Active Bit
#define NVIC_ACTIVE2 0xE000E308 // Interrupt 64-95 Active Bit
#define NVIC_ACTIVE3 0xE000E30C // Interrupt 96-127 Active Bit
#define NVIC_ACTIVE4 0xE000E310 // Interrupt 128-159 Active Bit
#define NVIC_PRI0 0xE000E400 // Interrupt 0-3 Priority
#define NVIC_PRI1 0xE000E404 // Interrupt 4-7 Priority
#define NVIC_PRI2 0xE000E408 // Interrupt 8-11 Priority
#define NVIC_PRI3 0xE000E40C // Interrupt 12-15 Priority
#define NVIC_PRI4 0xE000E410 // Interrupt 16-19 Priority
#define NVIC_PRI5 0xE000E414 // Interrupt 20-23 Priority
#define NVIC_PRI6 0xE000E418 // Interrupt 24-27 Priority
#define NVIC_PRI7 0xE000E41C // Interrupt 28-31 Priority
#define NVIC_PRI8 0xE000E420 // Interrupt 32-35 Priority
#define NVIC_PRI9 0xE000E424 // Interrupt 36-39 Priority
#define NVIC_PRI10 0xE000E428 // Interrupt 40-43 Priority
#define NVIC_PRI11 0xE000E42C // Interrupt 44-47 Priority
#define NVIC_PRI12 0xE000E430 // Interrupt 48-51 Priority
#define NVIC_PRI13 0xE000E434 // Interrupt 52-55 Priority
#define NVIC_PRI14 0xE000E438 // Interrupt 56-59 Priority
#define NVIC_PRI15 0xE000E43C // Interrupt 60-63 Priority
#define NVIC_PRI16 0xE000E440 // Interrupt 64-67 Priority
#define NVIC_PRI17 0xE000E444 // Interrupt 68-71 Priority
#define NVIC_PRI18 0xE000E448 // Interrupt 72-75 Priority
#define NVIC_PRI19 0xE000E44C // Interrupt 76-79 Priority
#define NVIC_PRI20 0xE000E450 // Interrupt 80-83 Priority
#define NVIC_PRI21 0xE000E454 // Interrupt 84-87 Priority
#define NVIC_PRI22 0xE000E458 // Interrupt 88-91 Priority
#define NVIC_PRI23 0xE000E45C // Interrupt 92-95 Priority
#define NVIC_PRI24 0xE000E460 // Interrupt 96-99 Priority
#define NVIC_PRI25 0xE000E464 // Interrupt 100-103 Priority
#define NVIC_PRI26 0xE000E468 // Interrupt 104-107 Priority
#define NVIC_PRI27 0xE000E46C // Interrupt 108-111 Priority
#define NVIC_PRI28 0xE000E470 // Interrupt 112-115 Priority
#define NVIC_PRI29 0xE000E474 // Interrupt 116-119 Priority
#define NVIC_PRI30 0xE000E478 // Interrupt 120-123 Priority
#define NVIC_PRI31 0xE000E47C // Interrupt 124-127 Priority
#define NVIC_PRI32 0xE000E480 // Interrupt 128-131 Priority
#define NVIC_PRI33 0xE000E484 // Interrupt 132-135 Priority
#define NVIC_PRI34 0xE000E488 // Interrupt 136-139 Priority
#define NVIC_CPUID 0xE000ED00 // CPU ID Base
#define NVIC_INT_CTRL 0xE000ED04 // Interrupt Control and State
#define NVIC_VTABLE 0xE000ED08 // Vector Table Offset
#define NVIC_APINT 0xE000ED0C // Application Interrupt and Reset
// Control
#define NVIC_SYS_CTRL 0xE000ED10 // System Control
#define NVIC_CFG_CTRL 0xE000ED14 // Configuration and Control
#define NVIC_SYS_PRI1 0xE000ED18 // System Handler Priority 1
#define NVIC_SYS_PRI2 0xE000ED1C // System Handler Priority 2
#define NVIC_SYS_PRI3 0xE000ED20 // System Handler Priority 3
#define NVIC_SYS_HND_CTRL 0xE000ED24 // System Handler Control and State
#define NVIC_FAULT_STAT 0xE000ED28 // Configurable Fault Status
#define NVIC_HFAULT_STAT 0xE000ED2C // Hard Fault Status
#define NVIC_DEBUG_STAT 0xE000ED30 // Debug Status Register
#define NVIC_MM_ADDR 0xE000ED34 // Memory Management Fault Address
#define NVIC_FAULT_ADDR 0xE000ED38 // Bus Fault Address
#define NVIC_CPAC 0xE000ED88 // Coprocessor Access Control
#define NVIC_MPU_TYPE 0xE000ED90 // MPU Type
#define NVIC_MPU_CTRL 0xE000ED94 // MPU Control
#define NVIC_MPU_NUMBER 0xE000ED98 // MPU Region Number
#define NVIC_MPU_BASE 0xE000ED9C // MPU Region Base Address
#define NVIC_MPU_ATTR 0xE000EDA0 // MPU Region Attribute and Size
#define NVIC_MPU_BASE1 0xE000EDA4 // MPU Region Base Address Alias 1
#define NVIC_MPU_ATTR1 0xE000EDA8 // MPU Region Attribute and Size
// Alias 1
#define NVIC_MPU_BASE2 0xE000EDAC // MPU Region Base Address Alias 2
#define NVIC_MPU_ATTR2 0xE000EDB0 // MPU Region Attribute and Size
// Alias 2
#define NVIC_MPU_BASE3 0xE000EDB4 // MPU Region Base Address Alias 3
#define NVIC_MPU_ATTR3 0xE000EDB8 // MPU Region Attribute and Size
// Alias 3
#define NVIC_DBG_CTRL 0xE000EDF0 // Debug Control and Status Reg
#define NVIC_DBG_XFER 0xE000EDF4 // Debug Core Reg. Transfer Select
#define NVIC_DBG_DATA 0xE000EDF8 // Debug Core Register Data
#define NVIC_DBG_INT 0xE000EDFC // Debug Reset Interrupt Control
#define NVIC_SW_TRIG 0xE000EF00 // Software Trigger Interrupt
#define NVIC_FPCC 0xE000EF34 // Floating-Point Context Control
#define NVIC_FPCA 0xE000EF38 // Floating-Point Context Address
#define NVIC_FPDSC 0xE000EF3C // Floating-Point Default Status
// Control
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_ACTLR register.
//
//*****************************************************************************
#define NVIC_ACTLR_DISOOFP 0x00000200 // Disable Out-Of-Order Floating
// Point
#define NVIC_ACTLR_DISFPCA 0x00000100 // Disable CONTROL
#define NVIC_ACTLR_DISFOLD 0x00000004 // Disable IT Folding
#define NVIC_ACTLR_DISWBUF 0x00000002 // Disable Write Buffer
#define NVIC_ACTLR_DISMCYC 0x00000001 // Disable Interrupts of Multiple
// Cycle Instructions
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_ST_CTRL register.
//
//*****************************************************************************
#define NVIC_ST_CTRL_COUNT 0x00010000 // Count Flag
#define NVIC_ST_CTRL_CLK_SRC 0x00000004 // Clock Source
#define NVIC_ST_CTRL_INTEN 0x00000002 // Interrupt Enable
#define NVIC_ST_CTRL_ENABLE 0x00000001 // Enable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_ST_RELOAD register.
//
//*****************************************************************************
#define NVIC_ST_RELOAD_M 0x00FFFFFF // Reload Value
#define NVIC_ST_RELOAD_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_ST_CURRENT
// register.
//
//*****************************************************************************
#define NVIC_ST_CURRENT_M 0x00FFFFFF // Current Value
#define NVIC_ST_CURRENT_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_EN0 register.
//
//*****************************************************************************
#define NVIC_EN0_INT_M 0xFFFFFFFF // Interrupt Enable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_EN1 register.
//
//*****************************************************************************
#define NVIC_EN1_INT_M 0xFFFFFFFF // Interrupt Enable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_EN2 register.
//
//*****************************************************************************
#define NVIC_EN2_INT_M 0xFFFFFFFF // Interrupt Enable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_EN3 register.
//
//*****************************************************************************
#define NVIC_EN3_INT_M 0xFFFFFFFF // Interrupt Enable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_EN4 register.
//
//*****************************************************************************
#define NVIC_EN4_INT_M 0x000007FF // Interrupt Enable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_DIS0 register.
//
//*****************************************************************************
#define NVIC_DIS0_INT_M 0xFFFFFFFF // Interrupt Disable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_DIS1 register.
//
//*****************************************************************************
#define NVIC_DIS1_INT_M 0xFFFFFFFF // Interrupt Disable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_DIS2 register.
//
//*****************************************************************************
#define NVIC_DIS2_INT_M 0xFFFFFFFF // Interrupt Disable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_DIS3 register.
//
//*****************************************************************************
#define NVIC_DIS3_INT_M 0xFFFFFFFF // Interrupt Disable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_DIS4 register.
//
//*****************************************************************************
#define NVIC_DIS4_INT_M 0x000007FF // Interrupt Disable
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PEND0 register.
//
//*****************************************************************************
#define NVIC_PEND0_INT_M 0xFFFFFFFF // Interrupt Set Pending
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PEND1 register.
//
//*****************************************************************************
#define NVIC_PEND1_INT_M 0xFFFFFFFF // Interrupt Set Pending
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PEND2 register.
//
//*****************************************************************************
#define NVIC_PEND2_INT_M 0xFFFFFFFF // Interrupt Set Pending
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PEND3 register.
//
//*****************************************************************************
#define NVIC_PEND3_INT_M 0xFFFFFFFF // Interrupt Set Pending
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PEND4 register.
//
//*****************************************************************************
#define NVIC_PEND4_INT_M 0x000007FF // Interrupt Set Pending
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_UNPEND0 register.
//
//*****************************************************************************
#define NVIC_UNPEND0_INT_M 0xFFFFFFFF // Interrupt Clear Pending
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_UNPEND1 register.
//
//*****************************************************************************
#define NVIC_UNPEND1_INT_M 0xFFFFFFFF // Interrupt Clear Pending
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_UNPEND2 register.
//
//*****************************************************************************
#define NVIC_UNPEND2_INT_M 0xFFFFFFFF // Interrupt Clear Pending
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_UNPEND3 register.
//
//*****************************************************************************
#define NVIC_UNPEND3_INT_M 0xFFFFFFFF // Interrupt Clear Pending
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_UNPEND4 register.
//
//*****************************************************************************
#define NVIC_UNPEND4_INT_M 0x000007FF // Interrupt Clear Pending
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_ACTIVE0 register.
//
//*****************************************************************************
#define NVIC_ACTIVE0_INT_M 0xFFFFFFFF // Interrupt Active
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_ACTIVE1 register.
//
//*****************************************************************************
#define NVIC_ACTIVE1_INT_M 0xFFFFFFFF // Interrupt Active
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_ACTIVE2 register.
//
//*****************************************************************************
#define NVIC_ACTIVE2_INT_M 0xFFFFFFFF // Interrupt Active
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_ACTIVE3 register.
//
//*****************************************************************************
#define NVIC_ACTIVE3_INT_M 0xFFFFFFFF // Interrupt Active
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_ACTIVE4 register.
//
//*****************************************************************************
#define NVIC_ACTIVE4_INT_M 0x000007FF // Interrupt Active
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI0 register.
//
//*****************************************************************************
#define NVIC_PRI0_INT3_M 0xE0000000 // Interrupt 3 Priority Mask
#define NVIC_PRI0_INT2_M 0x00E00000 // Interrupt 2 Priority Mask
#define NVIC_PRI0_INT1_M 0x0000E000 // Interrupt 1 Priority Mask
#define NVIC_PRI0_INT0_M 0x000000E0 // Interrupt 0 Priority Mask
#define NVIC_PRI0_INT3_S 29
#define NVIC_PRI0_INT2_S 21
#define NVIC_PRI0_INT1_S 13
#define NVIC_PRI0_INT0_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI1 register.
//
//*****************************************************************************
#define NVIC_PRI1_INT7_M 0xE0000000 // Interrupt 7 Priority Mask
#define NVIC_PRI1_INT6_M 0x00E00000 // Interrupt 6 Priority Mask
#define NVIC_PRI1_INT5_M 0x0000E000 // Interrupt 5 Priority Mask
#define NVIC_PRI1_INT4_M 0x000000E0 // Interrupt 4 Priority Mask
#define NVIC_PRI1_INT7_S 29
#define NVIC_PRI1_INT6_S 21
#define NVIC_PRI1_INT5_S 13
#define NVIC_PRI1_INT4_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI2 register.
//
//*****************************************************************************
#define NVIC_PRI2_INT11_M 0xE0000000 // Interrupt 11 Priority Mask
#define NVIC_PRI2_INT10_M 0x00E00000 // Interrupt 10 Priority Mask
#define NVIC_PRI2_INT9_M 0x0000E000 // Interrupt 9 Priority Mask
#define NVIC_PRI2_INT8_M 0x000000E0 // Interrupt 8 Priority Mask
#define NVIC_PRI2_INT11_S 29
#define NVIC_PRI2_INT10_S 21
#define NVIC_PRI2_INT9_S 13
#define NVIC_PRI2_INT8_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI3 register.
//
//*****************************************************************************
#define NVIC_PRI3_INT15_M 0xE0000000 // Interrupt 15 Priority Mask
#define NVIC_PRI3_INT14_M 0x00E00000 // Interrupt 14 Priority Mask
#define NVIC_PRI3_INT13_M 0x0000E000 // Interrupt 13 Priority Mask
#define NVIC_PRI3_INT12_M 0x000000E0 // Interrupt 12 Priority Mask
#define NVIC_PRI3_INT15_S 29
#define NVIC_PRI3_INT14_S 21
#define NVIC_PRI3_INT13_S 13
#define NVIC_PRI3_INT12_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI4 register.
//
//*****************************************************************************
#define NVIC_PRI4_INT19_M 0xE0000000 // Interrupt 19 Priority Mask
#define NVIC_PRI4_INT18_M 0x00E00000 // Interrupt 18 Priority Mask
#define NVIC_PRI4_INT17_M 0x0000E000 // Interrupt 17 Priority Mask
#define NVIC_PRI4_INT16_M 0x000000E0 // Interrupt 16 Priority Mask
#define NVIC_PRI4_INT19_S 29
#define NVIC_PRI4_INT18_S 21
#define NVIC_PRI4_INT17_S 13
#define NVIC_PRI4_INT16_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI5 register.
//
//*****************************************************************************
#define NVIC_PRI5_INT23_M 0xE0000000 // Interrupt 23 Priority Mask
#define NVIC_PRI5_INT22_M 0x00E00000 // Interrupt 22 Priority Mask
#define NVIC_PRI5_INT21_M 0x0000E000 // Interrupt 21 Priority Mask
#define NVIC_PRI5_INT20_M 0x000000E0 // Interrupt 20 Priority Mask
#define NVIC_PRI5_INT23_S 29
#define NVIC_PRI5_INT22_S 21
#define NVIC_PRI5_INT21_S 13
#define NVIC_PRI5_INT20_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI6 register.
//
//*****************************************************************************
#define NVIC_PRI6_INT27_M 0xE0000000 // Interrupt 27 Priority Mask
#define NVIC_PRI6_INT26_M 0x00E00000 // Interrupt 26 Priority Mask
#define NVIC_PRI6_INT25_M 0x0000E000 // Interrupt 25 Priority Mask
#define NVIC_PRI6_INT24_M 0x000000E0 // Interrupt 24 Priority Mask
#define NVIC_PRI6_INT27_S 29
#define NVIC_PRI6_INT26_S 21
#define NVIC_PRI6_INT25_S 13
#define NVIC_PRI6_INT24_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI7 register.
//
//*****************************************************************************
#define NVIC_PRI7_INT31_M 0xE0000000 // Interrupt 31 Priority Mask
#define NVIC_PRI7_INT30_M 0x00E00000 // Interrupt 30 Priority Mask
#define NVIC_PRI7_INT29_M 0x0000E000 // Interrupt 29 Priority Mask
#define NVIC_PRI7_INT28_M 0x000000E0 // Interrupt 28 Priority Mask
#define NVIC_PRI7_INT31_S 29
#define NVIC_PRI7_INT30_S 21
#define NVIC_PRI7_INT29_S 13
#define NVIC_PRI7_INT28_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI8 register.
//
//*****************************************************************************
#define NVIC_PRI8_INT35_M 0xE0000000 // Interrupt 35 Priority Mask
#define NVIC_PRI8_INT34_M 0x00E00000 // Interrupt 34 Priority Mask
#define NVIC_PRI8_INT33_M 0x0000E000 // Interrupt 33 Priority Mask
#define NVIC_PRI8_INT32_M 0x000000E0 // Interrupt 32 Priority Mask
#define NVIC_PRI8_INT35_S 29
#define NVIC_PRI8_INT34_S 21
#define NVIC_PRI8_INT33_S 13
#define NVIC_PRI8_INT32_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI9 register.
//
//*****************************************************************************
#define NVIC_PRI9_INT39_M 0xE0000000 // Interrupt 39 Priority Mask
#define NVIC_PRI9_INT38_M 0x00E00000 // Interrupt 38 Priority Mask
#define NVIC_PRI9_INT37_M 0x0000E000 // Interrupt 37 Priority Mask
#define NVIC_PRI9_INT36_M 0x000000E0 // Interrupt 36 Priority Mask
#define NVIC_PRI9_INT39_S 29
#define NVIC_PRI9_INT38_S 21
#define NVIC_PRI9_INT37_S 13
#define NVIC_PRI9_INT36_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI10 register.
//
//*****************************************************************************
#define NVIC_PRI10_INT43_M 0xE0000000 // Interrupt 43 Priority Mask
#define NVIC_PRI10_INT42_M 0x00E00000 // Interrupt 42 Priority Mask
#define NVIC_PRI10_INT41_M 0x0000E000 // Interrupt 41 Priority Mask
#define NVIC_PRI10_INT40_M 0x000000E0 // Interrupt 40 Priority Mask
#define NVIC_PRI10_INT43_S 29
#define NVIC_PRI10_INT42_S 21
#define NVIC_PRI10_INT41_S 13
#define NVIC_PRI10_INT40_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI11 register.
//
//*****************************************************************************
#define NVIC_PRI11_INT47_M 0xE0000000 // Interrupt 47 Priority Mask
#define NVIC_PRI11_INT46_M 0x00E00000 // Interrupt 46 Priority Mask
#define NVIC_PRI11_INT45_M 0x0000E000 // Interrupt 45 Priority Mask
#define NVIC_PRI11_INT44_M 0x000000E0 // Interrupt 44 Priority Mask
#define NVIC_PRI11_INT47_S 29
#define NVIC_PRI11_INT46_S 21
#define NVIC_PRI11_INT45_S 13
#define NVIC_PRI11_INT44_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI12 register.
//
//*****************************************************************************
#define NVIC_PRI12_INT51_M 0xE0000000 // Interrupt 51 Priority Mask
#define NVIC_PRI12_INT50_M 0x00E00000 // Interrupt 50 Priority Mask
#define NVIC_PRI12_INT49_M 0x0000E000 // Interrupt 49 Priority Mask
#define NVIC_PRI12_INT48_M 0x000000E0 // Interrupt 48 Priority Mask
#define NVIC_PRI12_INT51_S 29
#define NVIC_PRI12_INT50_S 21
#define NVIC_PRI12_INT49_S 13
#define NVIC_PRI12_INT48_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI13 register.
//
//*****************************************************************************
#define NVIC_PRI13_INT55_M 0xE0000000 // Interrupt 55 Priority Mask
#define NVIC_PRI13_INT54_M 0x00E00000 // Interrupt 54 Priority Mask
#define NVIC_PRI13_INT53_M 0x0000E000 // Interrupt 53 Priority Mask
#define NVIC_PRI13_INT52_M 0x000000E0 // Interrupt 52 Priority Mask
#define NVIC_PRI13_INT55_S 29
#define NVIC_PRI13_INT54_S 21
#define NVIC_PRI13_INT53_S 13
#define NVIC_PRI13_INT52_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI14 register.
//
//*****************************************************************************
#define NVIC_PRI14_INTD_M 0xE0000000 // Interrupt 59 Priority Mask
#define NVIC_PRI14_INTC_M 0x00E00000 // Interrupt 58 Priority Mask
#define NVIC_PRI14_INTB_M 0x0000E000 // Interrupt 57 Priority Mask
#define NVIC_PRI14_INTA_M 0x000000E0 // Interrupt 56 Priority Mask
#define NVIC_PRI14_INTD_S 29
#define NVIC_PRI14_INTC_S 21
#define NVIC_PRI14_INTB_S 13
#define NVIC_PRI14_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI15 register.
//
//*****************************************************************************
#define NVIC_PRI15_INTD_M 0xE0000000 // Interrupt 63 Priority Mask
#define NVIC_PRI15_INTC_M 0x00E00000 // Interrupt 62 Priority Mask
#define NVIC_PRI15_INTB_M 0x0000E000 // Interrupt 61 Priority Mask
#define NVIC_PRI15_INTA_M 0x000000E0 // Interrupt 60 Priority Mask
#define NVIC_PRI15_INTD_S 29
#define NVIC_PRI15_INTC_S 21
#define NVIC_PRI15_INTB_S 13
#define NVIC_PRI15_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI16 register.
//
//*****************************************************************************
#define NVIC_PRI16_INTD_M 0xE0000000 // Interrupt 67 Priority Mask
#define NVIC_PRI16_INTC_M 0x00E00000 // Interrupt 66 Priority Mask
#define NVIC_PRI16_INTB_M 0x0000E000 // Interrupt 65 Priority Mask
#define NVIC_PRI16_INTA_M 0x000000E0 // Interrupt 64 Priority Mask
#define NVIC_PRI16_INTD_S 29
#define NVIC_PRI16_INTC_S 21
#define NVIC_PRI16_INTB_S 13
#define NVIC_PRI16_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI17 register.
//
//*****************************************************************************
#define NVIC_PRI17_INTD_M 0xE0000000 // Interrupt 71 Priority Mask
#define NVIC_PRI17_INTC_M 0x00E00000 // Interrupt 70 Priority Mask
#define NVIC_PRI17_INTB_M 0x0000E000 // Interrupt 69 Priority Mask
#define NVIC_PRI17_INTA_M 0x000000E0 // Interrupt 68 Priority Mask
#define NVIC_PRI17_INTD_S 29
#define NVIC_PRI17_INTC_S 21
#define NVIC_PRI17_INTB_S 13
#define NVIC_PRI17_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI18 register.
//
//*****************************************************************************
#define NVIC_PRI18_INTD_M 0xE0000000 // Interrupt 75 Priority Mask
#define NVIC_PRI18_INTC_M 0x00E00000 // Interrupt 74 Priority Mask
#define NVIC_PRI18_INTB_M 0x0000E000 // Interrupt 73 Priority Mask
#define NVIC_PRI18_INTA_M 0x000000E0 // Interrupt 72 Priority Mask
#define NVIC_PRI18_INTD_S 29
#define NVIC_PRI18_INTC_S 21
#define NVIC_PRI18_INTB_S 13
#define NVIC_PRI18_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI19 register.
//
//*****************************************************************************
#define NVIC_PRI19_INTD_M 0xE0000000 // Interrupt 79 Priority Mask
#define NVIC_PRI19_INTC_M 0x00E00000 // Interrupt 78 Priority Mask
#define NVIC_PRI19_INTB_M 0x0000E000 // Interrupt 77 Priority Mask
#define NVIC_PRI19_INTA_M 0x000000E0 // Interrupt 76 Priority Mask
#define NVIC_PRI19_INTD_S 29
#define NVIC_PRI19_INTC_S 21
#define NVIC_PRI19_INTB_S 13
#define NVIC_PRI19_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI20 register.
//
//*****************************************************************************
#define NVIC_PRI20_INTD_M 0xE0000000 // Interrupt 83 Priority Mask
#define NVIC_PRI20_INTC_M 0x00E00000 // Interrupt 82 Priority Mask
#define NVIC_PRI20_INTB_M 0x0000E000 // Interrupt 81 Priority Mask
#define NVIC_PRI20_INTA_M 0x000000E0 // Interrupt 80 Priority Mask
#define NVIC_PRI20_INTD_S 29
#define NVIC_PRI20_INTC_S 21
#define NVIC_PRI20_INTB_S 13
#define NVIC_PRI20_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI21 register.
//
//*****************************************************************************
#define NVIC_PRI21_INTD_M 0xE0000000 // Interrupt 87 Priority Mask
#define NVIC_PRI21_INTC_M 0x00E00000 // Interrupt 86 Priority Mask
#define NVIC_PRI21_INTB_M 0x0000E000 // Interrupt 85 Priority Mask
#define NVIC_PRI21_INTA_M 0x000000E0 // Interrupt 84 Priority Mask
#define NVIC_PRI21_INTD_S 29
#define NVIC_PRI21_INTC_S 21
#define NVIC_PRI21_INTB_S 13
#define NVIC_PRI21_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI22 register.
//
//*****************************************************************************
#define NVIC_PRI22_INTD_M 0xE0000000 // Interrupt 91 Priority Mask
#define NVIC_PRI22_INTC_M 0x00E00000 // Interrupt 90 Priority Mask
#define NVIC_PRI22_INTB_M 0x0000E000 // Interrupt 89 Priority Mask
#define NVIC_PRI22_INTA_M 0x000000E0 // Interrupt 88 Priority Mask
#define NVIC_PRI22_INTD_S 29
#define NVIC_PRI22_INTC_S 21
#define NVIC_PRI22_INTB_S 13
#define NVIC_PRI22_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI23 register.
//
//*****************************************************************************
#define NVIC_PRI23_INTD_M 0xE0000000 // Interrupt 95 Priority Mask
#define NVIC_PRI23_INTC_M 0x00E00000 // Interrupt 94 Priority Mask
#define NVIC_PRI23_INTB_M 0x0000E000 // Interrupt 93 Priority Mask
#define NVIC_PRI23_INTA_M 0x000000E0 // Interrupt 92 Priority Mask
#define NVIC_PRI23_INTD_S 29
#define NVIC_PRI23_INTC_S 21
#define NVIC_PRI23_INTB_S 13
#define NVIC_PRI23_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI24 register.
//
//*****************************************************************************
#define NVIC_PRI24_INTD_M 0xE0000000 // Interrupt 99 Priority Mask
#define NVIC_PRI24_INTC_M 0x00E00000 // Interrupt 98 Priority Mask
#define NVIC_PRI24_INTB_M 0x0000E000 // Interrupt 97 Priority Mask
#define NVIC_PRI24_INTA_M 0x000000E0 // Interrupt 96 Priority Mask
#define NVIC_PRI24_INTD_S 29
#define NVIC_PRI24_INTC_S 21
#define NVIC_PRI24_INTB_S 13
#define NVIC_PRI24_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI25 register.
//
//*****************************************************************************
#define NVIC_PRI25_INTD_M 0xE0000000 // Interrupt 103 Priority Mask
#define NVIC_PRI25_INTC_M 0x00E00000 // Interrupt 102 Priority Mask
#define NVIC_PRI25_INTB_M 0x0000E000 // Interrupt 101 Priority Mask
#define NVIC_PRI25_INTA_M 0x000000E0 // Interrupt 100 Priority Mask
#define NVIC_PRI25_INTD_S 29
#define NVIC_PRI25_INTC_S 21
#define NVIC_PRI25_INTB_S 13
#define NVIC_PRI25_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI26 register.
//
//*****************************************************************************
#define NVIC_PRI26_INTD_M 0xE0000000 // Interrupt 107 Priority Mask
#define NVIC_PRI26_INTC_M 0x00E00000 // Interrupt 106 Priority Mask
#define NVIC_PRI26_INTB_M 0x0000E000 // Interrupt 105 Priority Mask
#define NVIC_PRI26_INTA_M 0x000000E0 // Interrupt 104 Priority Mask
#define NVIC_PRI26_INTD_S 29
#define NVIC_PRI26_INTC_S 21
#define NVIC_PRI26_INTB_S 13
#define NVIC_PRI26_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI27 register.
//
//*****************************************************************************
#define NVIC_PRI27_INTD_M 0xE0000000 // Interrupt 111 Priority Mask
#define NVIC_PRI27_INTC_M 0x00E00000 // Interrupt 110 Priority Mask
#define NVIC_PRI27_INTB_M 0x0000E000 // Interrupt 109 Priority Mask
#define NVIC_PRI27_INTA_M 0x000000E0 // Interrupt 108 Priority Mask
#define NVIC_PRI27_INTD_S 29
#define NVIC_PRI27_INTC_S 21
#define NVIC_PRI27_INTB_S 13
#define NVIC_PRI27_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI28 register.
//
//*****************************************************************************
#define NVIC_PRI28_INTD_M 0xE0000000 // Interrupt 115 Priority Mask
#define NVIC_PRI28_INTC_M 0x00E00000 // Interrupt 114 Priority Mask
#define NVIC_PRI28_INTB_M 0x0000E000 // Interrupt 113 Priority Mask
#define NVIC_PRI28_INTA_M 0x000000E0 // Interrupt 112 Priority Mask
#define NVIC_PRI28_INTD_S 29
#define NVIC_PRI28_INTC_S 21
#define NVIC_PRI28_INTB_S 13
#define NVIC_PRI28_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI29 register.
//
//*****************************************************************************
#define NVIC_PRI29_INTD_M 0xE0000000 // Interrupt 119 Priority Mask
#define NVIC_PRI29_INTC_M 0x00E00000 // Interrupt 118 Priority Mask
#define NVIC_PRI29_INTB_M 0x0000E000 // Interrupt 117 Priority Mask
#define NVIC_PRI29_INTA_M 0x000000E0 // Interrupt 116 Priority Mask
#define NVIC_PRI29_INTD_S 29
#define NVIC_PRI29_INTC_S 21
#define NVIC_PRI29_INTB_S 13
#define NVIC_PRI29_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI30 register.
//
//*****************************************************************************
#define NVIC_PRI30_INTD_M 0xE0000000 // Interrupt 123 Priority Mask
#define NVIC_PRI30_INTC_M 0x00E00000 // Interrupt 122 Priority Mask
#define NVIC_PRI30_INTB_M 0x0000E000 // Interrupt 121 Priority Mask
#define NVIC_PRI30_INTA_M 0x000000E0 // Interrupt 120 Priority Mask
#define NVIC_PRI30_INTD_S 29
#define NVIC_PRI30_INTC_S 21
#define NVIC_PRI30_INTB_S 13
#define NVIC_PRI30_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI31 register.
//
//*****************************************************************************
#define NVIC_PRI31_INTD_M 0xE0000000 // Interrupt 127 Priority Mask
#define NVIC_PRI31_INTC_M 0x00E00000 // Interrupt 126 Priority Mask
#define NVIC_PRI31_INTB_M 0x0000E000 // Interrupt 125 Priority Mask
#define NVIC_PRI31_INTA_M 0x000000E0 // Interrupt 124 Priority Mask
#define NVIC_PRI31_INTD_S 29
#define NVIC_PRI31_INTC_S 21
#define NVIC_PRI31_INTB_S 13
#define NVIC_PRI31_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI32 register.
//
//*****************************************************************************
#define NVIC_PRI32_INTD_M 0xE0000000 // Interrupt 131 Priority Mask
#define NVIC_PRI32_INTC_M 0x00E00000 // Interrupt 130 Priority Mask
#define NVIC_PRI32_INTB_M 0x0000E000 // Interrupt 129 Priority Mask
#define NVIC_PRI32_INTA_M 0x000000E0 // Interrupt 128 Priority Mask
#define NVIC_PRI32_INTD_S 29
#define NVIC_PRI32_INTC_S 21
#define NVIC_PRI32_INTB_S 13
#define NVIC_PRI32_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI33 register.
//
//*****************************************************************************
#define NVIC_PRI33_INTD_M 0xE0000000 // Interrupt Priority for Interrupt
// [4n+3]
#define NVIC_PRI33_INTC_M 0x00E00000 // Interrupt Priority for Interrupt
// [4n+2]
#define NVIC_PRI33_INTB_M 0x0000E000 // Interrupt Priority for Interrupt
// [4n+1]
#define NVIC_PRI33_INTA_M 0x000000E0 // Interrupt Priority for Interrupt
// [4n]
#define NVIC_PRI33_INTD_S 29
#define NVIC_PRI33_INTC_S 21
#define NVIC_PRI33_INTB_S 13
#define NVIC_PRI33_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_PRI34 register.
//
//*****************************************************************************
#define NVIC_PRI34_INTD_M 0xE0000000 // Interrupt Priority for Interrupt
// [4n+3]
#define NVIC_PRI34_INTC_M 0x00E00000 // Interrupt Priority for Interrupt
// [4n+2]
#define NVIC_PRI34_INTB_M 0x0000E000 // Interrupt Priority for Interrupt
// [4n+1]
#define NVIC_PRI34_INTA_M 0x000000E0 // Interrupt Priority for Interrupt
// [4n]
#define NVIC_PRI34_INTD_S 29
#define NVIC_PRI34_INTC_S 21
#define NVIC_PRI34_INTB_S 13
#define NVIC_PRI34_INTA_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_CPUID register.
//
//*****************************************************************************
#define NVIC_CPUID_IMP_M 0xFF000000 // Implementer Code
#define NVIC_CPUID_IMP_ARM 0x41000000 // ARM
#define NVIC_CPUID_VAR_M 0x00F00000 // Variant Number
#define NVIC_CPUID_CON_M 0x000F0000 // Constant
#define NVIC_CPUID_PARTNO_M 0x0000FFF0 // Part Number
#define NVIC_CPUID_PARTNO_CM4 0x0000C240 // Cortex-M4 processor
#define NVIC_CPUID_REV_M 0x0000000F // Revision Number
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_INT_CTRL register.
//
//*****************************************************************************
#define NVIC_INT_CTRL_NMI_SET 0x80000000 // NMI Set Pending
#define NVIC_INT_CTRL_PEND_SV 0x10000000 // PendSV Set Pending
#define NVIC_INT_CTRL_UNPEND_SV 0x08000000 // PendSV Clear Pending
#define NVIC_INT_CTRL_PENDSTSET 0x04000000 // SysTick Set Pending
#define NVIC_INT_CTRL_PENDSTCLR 0x02000000 // SysTick Clear Pending
#define NVIC_INT_CTRL_ISR_PRE 0x00800000 // Debug Interrupt Handling
#define NVIC_INT_CTRL_ISR_PEND 0x00400000 // Interrupt Pending
#define NVIC_INT_CTRL_VEC_PEN_M 0x000FF000 // Interrupt Pending Vector Number
#define NVIC_INT_CTRL_VEC_PEN_NMI \
0x00002000 // NMI
#define NVIC_INT_CTRL_VEC_PEN_HARD \
0x00003000 // Hard fault
#define NVIC_INT_CTRL_VEC_PEN_MEM \
0x00004000 // Memory management fault
#define NVIC_INT_CTRL_VEC_PEN_BUS \
0x00005000 // Bus fault
#define NVIC_INT_CTRL_VEC_PEN_USG \
0x00006000 // Usage fault
#define NVIC_INT_CTRL_VEC_PEN_SVC \
0x0000B000 // SVCall
#define NVIC_INT_CTRL_VEC_PEN_PNDSV \
0x0000E000 // PendSV
#define NVIC_INT_CTRL_VEC_PEN_TICK \
0x0000F000 // SysTick
#define NVIC_INT_CTRL_RET_BASE 0x00000800 // Return to Base
#define NVIC_INT_CTRL_VEC_ACT_M 0x000000FF // Interrupt Pending Vector Number
#define NVIC_INT_CTRL_VEC_ACT_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_VTABLE register.
//
//*****************************************************************************
//#define NVIC_VTABLE_OFFSET_M 0xFFFFFC00 // Vector Table Offset
#define NVIC_VTABLE_OFFSET_S 10
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_APINT register.
//
//*****************************************************************************
#define NVIC_APINT_VECTKEY_M 0xFFFF0000 // Register Key
#define NVIC_APINT_VECTKEY 0x05FA0000 // Vector key
#define NVIC_APINT_ENDIANESS 0x00008000 // Data Endianess
#define NVIC_APINT_PRIGROUP_M 0x00000700 // Interrupt Priority Grouping
#define NVIC_APINT_PRIGROUP_7_1 0x00000000 // Priority group 7.1 split
#define NVIC_APINT_PRIGROUP_6_2 0x00000100 // Priority group 6.2 split
#define NVIC_APINT_PRIGROUP_5_3 0x00000200 // Priority group 5.3 split
#define NVIC_APINT_PRIGROUP_4_4 0x00000300 // Priority group 4.4 split
#define NVIC_APINT_PRIGROUP_3_5 0x00000400 // Priority group 3.5 split
#define NVIC_APINT_PRIGROUP_2_6 0x00000500 // Priority group 2.6 split
#define NVIC_APINT_PRIGROUP_1_7 0x00000600 // Priority group 1.7 split
#define NVIC_APINT_PRIGROUP_0_8 0x00000700 // Priority group 0.8 split
#define NVIC_APINT_SYSRESETREQ 0x00000004 // System Reset Request
#define NVIC_APINT_VECT_CLR_ACT 0x00000002 // Clear Active NMI / Fault
#define NVIC_APINT_VECT_RESET 0x00000001 // System Reset
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_SYS_CTRL register.
//
//*****************************************************************************
#define NVIC_SYS_CTRL_SEVONPEND 0x00000010 // Wake Up on Pending
#define NVIC_SYS_CTRL_SLEEPDEEP 0x00000004 // Deep Sleep Enable
#define NVIC_SYS_CTRL_SLEEPEXIT 0x00000002 // Sleep on ISR Exit
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_CFG_CTRL register.
//
//*****************************************************************************
#define NVIC_CFG_CTRL_STKALIGN 0x00000200 // Stack Alignment on Exception
// Entry
#define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100 // Ignore Bus Fault in NMI and
// Fault
#define NVIC_CFG_CTRL_DIV0 0x00000010 // Trap on Divide by 0
#define NVIC_CFG_CTRL_UNALIGNED 0x00000008 // Trap on Unaligned Access
#define NVIC_CFG_CTRL_MAIN_PEND 0x00000002 // Allow Main Interrupt Trigger
#define NVIC_CFG_CTRL_BASE_THR 0x00000001 // Thread State Control
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_SYS_PRI1 register.
//
//*****************************************************************************
#define NVIC_SYS_PRI1_USAGE_M 0x00E00000 // Usage Fault Priority
#define NVIC_SYS_PRI1_BUS_M 0x0000E000 // Bus Fault Priority
#define NVIC_SYS_PRI1_MEM_M 0x000000E0 // Memory Management Fault Priority
#define NVIC_SYS_PRI1_USAGE_S 21
#define NVIC_SYS_PRI1_BUS_S 13
#define NVIC_SYS_PRI1_MEM_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_SYS_PRI2 register.
//
//*****************************************************************************
#define NVIC_SYS_PRI2_SVC_M 0xE0000000 // SVCall Priority
#define NVIC_SYS_PRI2_SVC_S 29
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_SYS_PRI3 register.
//
//*****************************************************************************
#define NVIC_SYS_PRI3_TICK_M 0xE0000000 // SysTick Exception Priority
#define NVIC_SYS_PRI3_PENDSV_M 0x00E00000 // PendSV Priority
#define NVIC_SYS_PRI3_DEBUG_M 0x000000E0 // Debug Priority
#define NVIC_SYS_PRI3_TICK_S 29
#define NVIC_SYS_PRI3_PENDSV_S 21
#define NVIC_SYS_PRI3_DEBUG_S 5
//*****************************************************************************
//
// The following are defines for the bit fields in the NVIC_SYS_HND_CTRL
// register.