hw_nvic.h 72 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414
  1. //*****************************************************************************
  2. //
  3. // hw_nvic.h - Macros used when accessing the NVIC hardware.
  4. //
  5. // Copyright (c) 2005-2014 Texas Instruments Incorporated. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Redistribution and use in source and binary forms, with or without
  9. // modification, are permitted provided that the following conditions
  10. // are met:
  11. //
  12. // Redistributions of source code must retain the above copyright
  13. // notice, this list of conditions and the following disclaimer.
  14. //
  15. // Redistributions in binary form must reproduce the above copyright
  16. // notice, this list of conditions and the following disclaimer in the
  17. // documentation and/or other materials provided with the
  18. // distribution.
  19. //
  20. // Neither the name of Texas Instruments Incorporated nor the names of
  21. // its contributors may be used to endorse or promote products derived
  22. // from this software without specific prior written permission.
  23. //
  24. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  25. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  26. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  27. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  28. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  29. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  30. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  31. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  32. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  33. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  34. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. //
  36. // This is part of revision 2.1.0.12573 of the Tiva Firmware Development Package.
  37. //
  38. //*****************************************************************************
  39. #ifndef __HW_NVIC_H__
  40. #define __HW_NVIC_H__
  41. //*****************************************************************************
  42. //
  43. // The following are defines for the NVIC register addresses.
  44. //
  45. //*****************************************************************************
  46. #define NVIC_ACTLR 0xE000E008 // Auxiliary Control
  47. #define NVIC_ST_CTRL 0xE000E010 // SysTick Control and Status
  48. // Register
  49. #define NVIC_ST_RELOAD 0xE000E014 // SysTick Reload Value Register
  50. #define NVIC_ST_CURRENT 0xE000E018 // SysTick Current Value Register
  51. #define NVIC_EN0 0xE000E100 // Interrupt 0-31 Set Enable
  52. #define NVIC_EN1 0xE000E104 // Interrupt 32-63 Set Enable
  53. #define NVIC_EN2 0xE000E108 // Interrupt 64-95 Set Enable
  54. #define NVIC_EN3 0xE000E10C // Interrupt 96-127 Set Enable
  55. #define NVIC_EN4 0xE000E110 // Interrupt 128-159 Set Enable
  56. #define NVIC_DIS0 0xE000E180 // Interrupt 0-31 Clear Enable
  57. #define NVIC_DIS1 0xE000E184 // Interrupt 32-63 Clear Enable
  58. #define NVIC_DIS2 0xE000E188 // Interrupt 64-95 Clear Enable
  59. #define NVIC_DIS3 0xE000E18C // Interrupt 96-127 Clear Enable
  60. #define NVIC_DIS4 0xE000E190 // Interrupt 128-159 Clear Enable
  61. #define NVIC_PEND0 0xE000E200 // Interrupt 0-31 Set Pending
  62. #define NVIC_PEND1 0xE000E204 // Interrupt 32-63 Set Pending
  63. #define NVIC_PEND2 0xE000E208 // Interrupt 64-95 Set Pending
  64. #define NVIC_PEND3 0xE000E20C // Interrupt 96-127 Set Pending
  65. #define NVIC_PEND4 0xE000E210 // Interrupt 128-159 Set Pending
  66. #define NVIC_UNPEND0 0xE000E280 // Interrupt 0-31 Clear Pending
  67. #define NVIC_UNPEND1 0xE000E284 // Interrupt 32-63 Clear Pending
  68. #define NVIC_UNPEND2 0xE000E288 // Interrupt 64-95 Clear Pending
  69. #define NVIC_UNPEND3 0xE000E28C // Interrupt 96-127 Clear Pending
  70. #define NVIC_UNPEND4 0xE000E290 // Interrupt 128-159 Clear Pending
  71. #define NVIC_ACTIVE0 0xE000E300 // Interrupt 0-31 Active Bit
  72. #define NVIC_ACTIVE1 0xE000E304 // Interrupt 32-63 Active Bit
  73. #define NVIC_ACTIVE2 0xE000E308 // Interrupt 64-95 Active Bit
  74. #define NVIC_ACTIVE3 0xE000E30C // Interrupt 96-127 Active Bit
  75. #define NVIC_ACTIVE4 0xE000E310 // Interrupt 128-159 Active Bit
  76. #define NVIC_PRI0 0xE000E400 // Interrupt 0-3 Priority
  77. #define NVIC_PRI1 0xE000E404 // Interrupt 4-7 Priority
  78. #define NVIC_PRI2 0xE000E408 // Interrupt 8-11 Priority
  79. #define NVIC_PRI3 0xE000E40C // Interrupt 12-15 Priority
  80. #define NVIC_PRI4 0xE000E410 // Interrupt 16-19 Priority
  81. #define NVIC_PRI5 0xE000E414 // Interrupt 20-23 Priority
  82. #define NVIC_PRI6 0xE000E418 // Interrupt 24-27 Priority
  83. #define NVIC_PRI7 0xE000E41C // Interrupt 28-31 Priority
  84. #define NVIC_PRI8 0xE000E420 // Interrupt 32-35 Priority
  85. #define NVIC_PRI9 0xE000E424 // Interrupt 36-39 Priority
  86. #define NVIC_PRI10 0xE000E428 // Interrupt 40-43 Priority
  87. #define NVIC_PRI11 0xE000E42C // Interrupt 44-47 Priority
  88. #define NVIC_PRI12 0xE000E430 // Interrupt 48-51 Priority
  89. #define NVIC_PRI13 0xE000E434 // Interrupt 52-55 Priority
  90. #define NVIC_PRI14 0xE000E438 // Interrupt 56-59 Priority
  91. #define NVIC_PRI15 0xE000E43C // Interrupt 60-63 Priority
  92. #define NVIC_PRI16 0xE000E440 // Interrupt 64-67 Priority
  93. #define NVIC_PRI17 0xE000E444 // Interrupt 68-71 Priority
  94. #define NVIC_PRI18 0xE000E448 // Interrupt 72-75 Priority
  95. #define NVIC_PRI19 0xE000E44C // Interrupt 76-79 Priority
  96. #define NVIC_PRI20 0xE000E450 // Interrupt 80-83 Priority
  97. #define NVIC_PRI21 0xE000E454 // Interrupt 84-87 Priority
  98. #define NVIC_PRI22 0xE000E458 // Interrupt 88-91 Priority
  99. #define NVIC_PRI23 0xE000E45C // Interrupt 92-95 Priority
  100. #define NVIC_PRI24 0xE000E460 // Interrupt 96-99 Priority
  101. #define NVIC_PRI25 0xE000E464 // Interrupt 100-103 Priority
  102. #define NVIC_PRI26 0xE000E468 // Interrupt 104-107 Priority
  103. #define NVIC_PRI27 0xE000E46C // Interrupt 108-111 Priority
  104. #define NVIC_PRI28 0xE000E470 // Interrupt 112-115 Priority
  105. #define NVIC_PRI29 0xE000E474 // Interrupt 116-119 Priority
  106. #define NVIC_PRI30 0xE000E478 // Interrupt 120-123 Priority
  107. #define NVIC_PRI31 0xE000E47C // Interrupt 124-127 Priority
  108. #define NVIC_PRI32 0xE000E480 // Interrupt 128-131 Priority
  109. #define NVIC_PRI33 0xE000E484 // Interrupt 132-135 Priority
  110. #define NVIC_PRI34 0xE000E488 // Interrupt 136-139 Priority
  111. #define NVIC_CPUID 0xE000ED00 // CPU ID Base
  112. #define NVIC_INT_CTRL 0xE000ED04 // Interrupt Control and State
  113. #define NVIC_VTABLE 0xE000ED08 // Vector Table Offset
  114. #define NVIC_APINT 0xE000ED0C // Application Interrupt and Reset
  115. // Control
  116. #define NVIC_SYS_CTRL 0xE000ED10 // System Control
  117. #define NVIC_CFG_CTRL 0xE000ED14 // Configuration and Control
  118. #define NVIC_SYS_PRI1 0xE000ED18 // System Handler Priority 1
  119. #define NVIC_SYS_PRI2 0xE000ED1C // System Handler Priority 2
  120. #define NVIC_SYS_PRI3 0xE000ED20 // System Handler Priority 3
  121. #define NVIC_SYS_HND_CTRL 0xE000ED24 // System Handler Control and State
  122. #define NVIC_FAULT_STAT 0xE000ED28 // Configurable Fault Status
  123. #define NVIC_HFAULT_STAT 0xE000ED2C // Hard Fault Status
  124. #define NVIC_DEBUG_STAT 0xE000ED30 // Debug Status Register
  125. #define NVIC_MM_ADDR 0xE000ED34 // Memory Management Fault Address
  126. #define NVIC_FAULT_ADDR 0xE000ED38 // Bus Fault Address
  127. #define NVIC_CPAC 0xE000ED88 // Coprocessor Access Control
  128. #define NVIC_MPU_TYPE 0xE000ED90 // MPU Type
  129. #define NVIC_MPU_CTRL 0xE000ED94 // MPU Control
  130. #define NVIC_MPU_NUMBER 0xE000ED98 // MPU Region Number
  131. #define NVIC_MPU_BASE 0xE000ED9C // MPU Region Base Address
  132. #define NVIC_MPU_ATTR 0xE000EDA0 // MPU Region Attribute and Size
  133. #define NVIC_MPU_BASE1 0xE000EDA4 // MPU Region Base Address Alias 1
  134. #define NVIC_MPU_ATTR1 0xE000EDA8 // MPU Region Attribute and Size
  135. // Alias 1
  136. #define NVIC_MPU_BASE2 0xE000EDAC // MPU Region Base Address Alias 2
  137. #define NVIC_MPU_ATTR2 0xE000EDB0 // MPU Region Attribute and Size
  138. // Alias 2
  139. #define NVIC_MPU_BASE3 0xE000EDB4 // MPU Region Base Address Alias 3
  140. #define NVIC_MPU_ATTR3 0xE000EDB8 // MPU Region Attribute and Size
  141. // Alias 3
  142. #define NVIC_DBG_CTRL 0xE000EDF0 // Debug Control and Status Reg
  143. #define NVIC_DBG_XFER 0xE000EDF4 // Debug Core Reg. Transfer Select
  144. #define NVIC_DBG_DATA 0xE000EDF8 // Debug Core Register Data
  145. #define NVIC_DBG_INT 0xE000EDFC // Debug Reset Interrupt Control
  146. #define NVIC_SW_TRIG 0xE000EF00 // Software Trigger Interrupt
  147. #define NVIC_FPCC 0xE000EF34 // Floating-Point Context Control
  148. #define NVIC_FPCA 0xE000EF38 // Floating-Point Context Address
  149. #define NVIC_FPDSC 0xE000EF3C // Floating-Point Default Status
  150. // Control
  151. //*****************************************************************************
  152. //
  153. // The following are defines for the bit fields in the NVIC_ACTLR register.
  154. //
  155. //*****************************************************************************
  156. #define NVIC_ACTLR_DISOOFP 0x00000200 // Disable Out-Of-Order Floating
  157. // Point
  158. #define NVIC_ACTLR_DISFPCA 0x00000100 // Disable CONTROL
  159. #define NVIC_ACTLR_DISFOLD 0x00000004 // Disable IT Folding
  160. #define NVIC_ACTLR_DISWBUF 0x00000002 // Disable Write Buffer
  161. #define NVIC_ACTLR_DISMCYC 0x00000001 // Disable Interrupts of Multiple
  162. // Cycle Instructions
  163. //*****************************************************************************
  164. //
  165. // The following are defines for the bit fields in the NVIC_ST_CTRL register.
  166. //
  167. //*****************************************************************************
  168. #define NVIC_ST_CTRL_COUNT 0x00010000 // Count Flag
  169. #define NVIC_ST_CTRL_CLK_SRC 0x00000004 // Clock Source
  170. #define NVIC_ST_CTRL_INTEN 0x00000002 // Interrupt Enable
  171. #define NVIC_ST_CTRL_ENABLE 0x00000001 // Enable
  172. //*****************************************************************************
  173. //
  174. // The following are defines for the bit fields in the NVIC_ST_RELOAD register.
  175. //
  176. //*****************************************************************************
  177. #define NVIC_ST_RELOAD_M 0x00FFFFFF // Reload Value
  178. #define NVIC_ST_RELOAD_S 0
  179. //*****************************************************************************
  180. //
  181. // The following are defines for the bit fields in the NVIC_ST_CURRENT
  182. // register.
  183. //
  184. //*****************************************************************************
  185. #define NVIC_ST_CURRENT_M 0x00FFFFFF // Current Value
  186. #define NVIC_ST_CURRENT_S 0
  187. //*****************************************************************************
  188. //
  189. // The following are defines for the bit fields in the NVIC_EN0 register.
  190. //
  191. //*****************************************************************************
  192. #define NVIC_EN0_INT_M 0xFFFFFFFF // Interrupt Enable
  193. //*****************************************************************************
  194. //
  195. // The following are defines for the bit fields in the NVIC_EN1 register.
  196. //
  197. //*****************************************************************************
  198. #define NVIC_EN1_INT_M 0xFFFFFFFF // Interrupt Enable
  199. //*****************************************************************************
  200. //
  201. // The following are defines for the bit fields in the NVIC_EN2 register.
  202. //
  203. //*****************************************************************************
  204. #define NVIC_EN2_INT_M 0xFFFFFFFF // Interrupt Enable
  205. //*****************************************************************************
  206. //
  207. // The following are defines for the bit fields in the NVIC_EN3 register.
  208. //
  209. //*****************************************************************************
  210. #define NVIC_EN3_INT_M 0xFFFFFFFF // Interrupt Enable
  211. //*****************************************************************************
  212. //
  213. // The following are defines for the bit fields in the NVIC_EN4 register.
  214. //
  215. //*****************************************************************************
  216. #define NVIC_EN4_INT_M 0x000007FF // Interrupt Enable
  217. //*****************************************************************************
  218. //
  219. // The following are defines for the bit fields in the NVIC_DIS0 register.
  220. //
  221. //*****************************************************************************
  222. #define NVIC_DIS0_INT_M 0xFFFFFFFF // Interrupt Disable
  223. //*****************************************************************************
  224. //
  225. // The following are defines for the bit fields in the NVIC_DIS1 register.
  226. //
  227. //*****************************************************************************
  228. #define NVIC_DIS1_INT_M 0xFFFFFFFF // Interrupt Disable
  229. //*****************************************************************************
  230. //
  231. // The following are defines for the bit fields in the NVIC_DIS2 register.
  232. //
  233. //*****************************************************************************
  234. #define NVIC_DIS2_INT_M 0xFFFFFFFF // Interrupt Disable
  235. //*****************************************************************************
  236. //
  237. // The following are defines for the bit fields in the NVIC_DIS3 register.
  238. //
  239. //*****************************************************************************
  240. #define NVIC_DIS3_INT_M 0xFFFFFFFF // Interrupt Disable
  241. //*****************************************************************************
  242. //
  243. // The following are defines for the bit fields in the NVIC_DIS4 register.
  244. //
  245. //*****************************************************************************
  246. #define NVIC_DIS4_INT_M 0x000007FF // Interrupt Disable
  247. //*****************************************************************************
  248. //
  249. // The following are defines for the bit fields in the NVIC_PEND0 register.
  250. //
  251. //*****************************************************************************
  252. #define NVIC_PEND0_INT_M 0xFFFFFFFF // Interrupt Set Pending
  253. //*****************************************************************************
  254. //
  255. // The following are defines for the bit fields in the NVIC_PEND1 register.
  256. //
  257. //*****************************************************************************
  258. #define NVIC_PEND1_INT_M 0xFFFFFFFF // Interrupt Set Pending
  259. //*****************************************************************************
  260. //
  261. // The following are defines for the bit fields in the NVIC_PEND2 register.
  262. //
  263. //*****************************************************************************
  264. #define NVIC_PEND2_INT_M 0xFFFFFFFF // Interrupt Set Pending
  265. //*****************************************************************************
  266. //
  267. // The following are defines for the bit fields in the NVIC_PEND3 register.
  268. //
  269. //*****************************************************************************
  270. #define NVIC_PEND3_INT_M 0xFFFFFFFF // Interrupt Set Pending
  271. //*****************************************************************************
  272. //
  273. // The following are defines for the bit fields in the NVIC_PEND4 register.
  274. //
  275. //*****************************************************************************
  276. #define NVIC_PEND4_INT_M 0x000007FF // Interrupt Set Pending
  277. //*****************************************************************************
  278. //
  279. // The following are defines for the bit fields in the NVIC_UNPEND0 register.
  280. //
  281. //*****************************************************************************
  282. #define NVIC_UNPEND0_INT_M 0xFFFFFFFF // Interrupt Clear Pending
  283. //*****************************************************************************
  284. //
  285. // The following are defines for the bit fields in the NVIC_UNPEND1 register.
  286. //
  287. //*****************************************************************************
  288. #define NVIC_UNPEND1_INT_M 0xFFFFFFFF // Interrupt Clear Pending
  289. //*****************************************************************************
  290. //
  291. // The following are defines for the bit fields in the NVIC_UNPEND2 register.
  292. //
  293. //*****************************************************************************
  294. #define NVIC_UNPEND2_INT_M 0xFFFFFFFF // Interrupt Clear Pending
  295. //*****************************************************************************
  296. //
  297. // The following are defines for the bit fields in the NVIC_UNPEND3 register.
  298. //
  299. //*****************************************************************************
  300. #define NVIC_UNPEND3_INT_M 0xFFFFFFFF // Interrupt Clear Pending
  301. //*****************************************************************************
  302. //
  303. // The following are defines for the bit fields in the NVIC_UNPEND4 register.
  304. //
  305. //*****************************************************************************
  306. #define NVIC_UNPEND4_INT_M 0x000007FF // Interrupt Clear Pending
  307. //*****************************************************************************
  308. //
  309. // The following are defines for the bit fields in the NVIC_ACTIVE0 register.
  310. //
  311. //*****************************************************************************
  312. #define NVIC_ACTIVE0_INT_M 0xFFFFFFFF // Interrupt Active
  313. //*****************************************************************************
  314. //
  315. // The following are defines for the bit fields in the NVIC_ACTIVE1 register.
  316. //
  317. //*****************************************************************************
  318. #define NVIC_ACTIVE1_INT_M 0xFFFFFFFF // Interrupt Active
  319. //*****************************************************************************
  320. //
  321. // The following are defines for the bit fields in the NVIC_ACTIVE2 register.
  322. //
  323. //*****************************************************************************
  324. #define NVIC_ACTIVE2_INT_M 0xFFFFFFFF // Interrupt Active
  325. //*****************************************************************************
  326. //
  327. // The following are defines for the bit fields in the NVIC_ACTIVE3 register.
  328. //
  329. //*****************************************************************************
  330. #define NVIC_ACTIVE3_INT_M 0xFFFFFFFF // Interrupt Active
  331. //*****************************************************************************
  332. //
  333. // The following are defines for the bit fields in the NVIC_ACTIVE4 register.
  334. //
  335. //*****************************************************************************
  336. #define NVIC_ACTIVE4_INT_M 0x000007FF // Interrupt Active
  337. //*****************************************************************************
  338. //
  339. // The following are defines for the bit fields in the NVIC_PRI0 register.
  340. //
  341. //*****************************************************************************
  342. #define NVIC_PRI0_INT3_M 0xE0000000 // Interrupt 3 Priority Mask
  343. #define NVIC_PRI0_INT2_M 0x00E00000 // Interrupt 2 Priority Mask
  344. #define NVIC_PRI0_INT1_M 0x0000E000 // Interrupt 1 Priority Mask
  345. #define NVIC_PRI0_INT0_M 0x000000E0 // Interrupt 0 Priority Mask
  346. #define NVIC_PRI0_INT3_S 29
  347. #define NVIC_PRI0_INT2_S 21
  348. #define NVIC_PRI0_INT1_S 13
  349. #define NVIC_PRI0_INT0_S 5
  350. //*****************************************************************************
  351. //
  352. // The following are defines for the bit fields in the NVIC_PRI1 register.
  353. //
  354. //*****************************************************************************
  355. #define NVIC_PRI1_INT7_M 0xE0000000 // Interrupt 7 Priority Mask
  356. #define NVIC_PRI1_INT6_M 0x00E00000 // Interrupt 6 Priority Mask
  357. #define NVIC_PRI1_INT5_M 0x0000E000 // Interrupt 5 Priority Mask
  358. #define NVIC_PRI1_INT4_M 0x000000E0 // Interrupt 4 Priority Mask
  359. #define NVIC_PRI1_INT7_S 29
  360. #define NVIC_PRI1_INT6_S 21
  361. #define NVIC_PRI1_INT5_S 13
  362. #define NVIC_PRI1_INT4_S 5
  363. //*****************************************************************************
  364. //
  365. // The following are defines for the bit fields in the NVIC_PRI2 register.
  366. //
  367. //*****************************************************************************
  368. #define NVIC_PRI2_INT11_M 0xE0000000 // Interrupt 11 Priority Mask
  369. #define NVIC_PRI2_INT10_M 0x00E00000 // Interrupt 10 Priority Mask
  370. #define NVIC_PRI2_INT9_M 0x0000E000 // Interrupt 9 Priority Mask
  371. #define NVIC_PRI2_INT8_M 0x000000E0 // Interrupt 8 Priority Mask
  372. #define NVIC_PRI2_INT11_S 29
  373. #define NVIC_PRI2_INT10_S 21
  374. #define NVIC_PRI2_INT9_S 13
  375. #define NVIC_PRI2_INT8_S 5
  376. //*****************************************************************************
  377. //
  378. // The following are defines for the bit fields in the NVIC_PRI3 register.
  379. //
  380. //*****************************************************************************
  381. #define NVIC_PRI3_INT15_M 0xE0000000 // Interrupt 15 Priority Mask
  382. #define NVIC_PRI3_INT14_M 0x00E00000 // Interrupt 14 Priority Mask
  383. #define NVIC_PRI3_INT13_M 0x0000E000 // Interrupt 13 Priority Mask
  384. #define NVIC_PRI3_INT12_M 0x000000E0 // Interrupt 12 Priority Mask
  385. #define NVIC_PRI3_INT15_S 29
  386. #define NVIC_PRI3_INT14_S 21
  387. #define NVIC_PRI3_INT13_S 13
  388. #define NVIC_PRI3_INT12_S 5
  389. //*****************************************************************************
  390. //
  391. // The following are defines for the bit fields in the NVIC_PRI4 register.
  392. //
  393. //*****************************************************************************
  394. #define NVIC_PRI4_INT19_M 0xE0000000 // Interrupt 19 Priority Mask
  395. #define NVIC_PRI4_INT18_M 0x00E00000 // Interrupt 18 Priority Mask
  396. #define NVIC_PRI4_INT17_M 0x0000E000 // Interrupt 17 Priority Mask
  397. #define NVIC_PRI4_INT16_M 0x000000E0 // Interrupt 16 Priority Mask
  398. #define NVIC_PRI4_INT19_S 29
  399. #define NVIC_PRI4_INT18_S 21
  400. #define NVIC_PRI4_INT17_S 13
  401. #define NVIC_PRI4_INT16_S 5
  402. //*****************************************************************************
  403. //
  404. // The following are defines for the bit fields in the NVIC_PRI5 register.
  405. //
  406. //*****************************************************************************
  407. #define NVIC_PRI5_INT23_M 0xE0000000 // Interrupt 23 Priority Mask
  408. #define NVIC_PRI5_INT22_M 0x00E00000 // Interrupt 22 Priority Mask
  409. #define NVIC_PRI5_INT21_M 0x0000E000 // Interrupt 21 Priority Mask
  410. #define NVIC_PRI5_INT20_M 0x000000E0 // Interrupt 20 Priority Mask
  411. #define NVIC_PRI5_INT23_S 29
  412. #define NVIC_PRI5_INT22_S 21
  413. #define NVIC_PRI5_INT21_S 13
  414. #define NVIC_PRI5_INT20_S 5
  415. //*****************************************************************************
  416. //
  417. // The following are defines for the bit fields in the NVIC_PRI6 register.
  418. //
  419. //*****************************************************************************
  420. #define NVIC_PRI6_INT27_M 0xE0000000 // Interrupt 27 Priority Mask
  421. #define NVIC_PRI6_INT26_M 0x00E00000 // Interrupt 26 Priority Mask
  422. #define NVIC_PRI6_INT25_M 0x0000E000 // Interrupt 25 Priority Mask
  423. #define NVIC_PRI6_INT24_M 0x000000E0 // Interrupt 24 Priority Mask
  424. #define NVIC_PRI6_INT27_S 29
  425. #define NVIC_PRI6_INT26_S 21
  426. #define NVIC_PRI6_INT25_S 13
  427. #define NVIC_PRI6_INT24_S 5
  428. //*****************************************************************************
  429. //
  430. // The following are defines for the bit fields in the NVIC_PRI7 register.
  431. //
  432. //*****************************************************************************
  433. #define NVIC_PRI7_INT31_M 0xE0000000 // Interrupt 31 Priority Mask
  434. #define NVIC_PRI7_INT30_M 0x00E00000 // Interrupt 30 Priority Mask
  435. #define NVIC_PRI7_INT29_M 0x0000E000 // Interrupt 29 Priority Mask
  436. #define NVIC_PRI7_INT28_M 0x000000E0 // Interrupt 28 Priority Mask
  437. #define NVIC_PRI7_INT31_S 29
  438. #define NVIC_PRI7_INT30_S 21
  439. #define NVIC_PRI7_INT29_S 13
  440. #define NVIC_PRI7_INT28_S 5
  441. //*****************************************************************************
  442. //
  443. // The following are defines for the bit fields in the NVIC_PRI8 register.
  444. //
  445. //*****************************************************************************
  446. #define NVIC_PRI8_INT35_M 0xE0000000 // Interrupt 35 Priority Mask
  447. #define NVIC_PRI8_INT34_M 0x00E00000 // Interrupt 34 Priority Mask
  448. #define NVIC_PRI8_INT33_M 0x0000E000 // Interrupt 33 Priority Mask
  449. #define NVIC_PRI8_INT32_M 0x000000E0 // Interrupt 32 Priority Mask
  450. #define NVIC_PRI8_INT35_S 29
  451. #define NVIC_PRI8_INT34_S 21
  452. #define NVIC_PRI8_INT33_S 13
  453. #define NVIC_PRI8_INT32_S 5
  454. //*****************************************************************************
  455. //
  456. // The following are defines for the bit fields in the NVIC_PRI9 register.
  457. //
  458. //*****************************************************************************
  459. #define NVIC_PRI9_INT39_M 0xE0000000 // Interrupt 39 Priority Mask
  460. #define NVIC_PRI9_INT38_M 0x00E00000 // Interrupt 38 Priority Mask
  461. #define NVIC_PRI9_INT37_M 0x0000E000 // Interrupt 37 Priority Mask
  462. #define NVIC_PRI9_INT36_M 0x000000E0 // Interrupt 36 Priority Mask
  463. #define NVIC_PRI9_INT39_S 29
  464. #define NVIC_PRI9_INT38_S 21
  465. #define NVIC_PRI9_INT37_S 13
  466. #define NVIC_PRI9_INT36_S 5
  467. //*****************************************************************************
  468. //
  469. // The following are defines for the bit fields in the NVIC_PRI10 register.
  470. //
  471. //*****************************************************************************
  472. #define NVIC_PRI10_INT43_M 0xE0000000 // Interrupt 43 Priority Mask
  473. #define NVIC_PRI10_INT42_M 0x00E00000 // Interrupt 42 Priority Mask
  474. #define NVIC_PRI10_INT41_M 0x0000E000 // Interrupt 41 Priority Mask
  475. #define NVIC_PRI10_INT40_M 0x000000E0 // Interrupt 40 Priority Mask
  476. #define NVIC_PRI10_INT43_S 29
  477. #define NVIC_PRI10_INT42_S 21
  478. #define NVIC_PRI10_INT41_S 13
  479. #define NVIC_PRI10_INT40_S 5
  480. //*****************************************************************************
  481. //
  482. // The following are defines for the bit fields in the NVIC_PRI11 register.
  483. //
  484. //*****************************************************************************
  485. #define NVIC_PRI11_INT47_M 0xE0000000 // Interrupt 47 Priority Mask
  486. #define NVIC_PRI11_INT46_M 0x00E00000 // Interrupt 46 Priority Mask
  487. #define NVIC_PRI11_INT45_M 0x0000E000 // Interrupt 45 Priority Mask
  488. #define NVIC_PRI11_INT44_M 0x000000E0 // Interrupt 44 Priority Mask
  489. #define NVIC_PRI11_INT47_S 29
  490. #define NVIC_PRI11_INT46_S 21
  491. #define NVIC_PRI11_INT45_S 13
  492. #define NVIC_PRI11_INT44_S 5
  493. //*****************************************************************************
  494. //
  495. // The following are defines for the bit fields in the NVIC_PRI12 register.
  496. //
  497. //*****************************************************************************
  498. #define NVIC_PRI12_INT51_M 0xE0000000 // Interrupt 51 Priority Mask
  499. #define NVIC_PRI12_INT50_M 0x00E00000 // Interrupt 50 Priority Mask
  500. #define NVIC_PRI12_INT49_M 0x0000E000 // Interrupt 49 Priority Mask
  501. #define NVIC_PRI12_INT48_M 0x000000E0 // Interrupt 48 Priority Mask
  502. #define NVIC_PRI12_INT51_S 29
  503. #define NVIC_PRI12_INT50_S 21
  504. #define NVIC_PRI12_INT49_S 13
  505. #define NVIC_PRI12_INT48_S 5
  506. //*****************************************************************************
  507. //
  508. // The following are defines for the bit fields in the NVIC_PRI13 register.
  509. //
  510. //*****************************************************************************
  511. #define NVIC_PRI13_INT55_M 0xE0000000 // Interrupt 55 Priority Mask
  512. #define NVIC_PRI13_INT54_M 0x00E00000 // Interrupt 54 Priority Mask
  513. #define NVIC_PRI13_INT53_M 0x0000E000 // Interrupt 53 Priority Mask
  514. #define NVIC_PRI13_INT52_M 0x000000E0 // Interrupt 52 Priority Mask
  515. #define NVIC_PRI13_INT55_S 29
  516. #define NVIC_PRI13_INT54_S 21
  517. #define NVIC_PRI13_INT53_S 13
  518. #define NVIC_PRI13_INT52_S 5
  519. //*****************************************************************************
  520. //
  521. // The following are defines for the bit fields in the NVIC_PRI14 register.
  522. //
  523. //*****************************************************************************
  524. #define NVIC_PRI14_INTD_M 0xE0000000 // Interrupt 59 Priority Mask
  525. #define NVIC_PRI14_INTC_M 0x00E00000 // Interrupt 58 Priority Mask
  526. #define NVIC_PRI14_INTB_M 0x0000E000 // Interrupt 57 Priority Mask
  527. #define NVIC_PRI14_INTA_M 0x000000E0 // Interrupt 56 Priority Mask
  528. #define NVIC_PRI14_INTD_S 29
  529. #define NVIC_PRI14_INTC_S 21
  530. #define NVIC_PRI14_INTB_S 13
  531. #define NVIC_PRI14_INTA_S 5
  532. //*****************************************************************************
  533. //
  534. // The following are defines for the bit fields in the NVIC_PRI15 register.
  535. //
  536. //*****************************************************************************
  537. #define NVIC_PRI15_INTD_M 0xE0000000 // Interrupt 63 Priority Mask
  538. #define NVIC_PRI15_INTC_M 0x00E00000 // Interrupt 62 Priority Mask
  539. #define NVIC_PRI15_INTB_M 0x0000E000 // Interrupt 61 Priority Mask
  540. #define NVIC_PRI15_INTA_M 0x000000E0 // Interrupt 60 Priority Mask
  541. #define NVIC_PRI15_INTD_S 29
  542. #define NVIC_PRI15_INTC_S 21
  543. #define NVIC_PRI15_INTB_S 13
  544. #define NVIC_PRI15_INTA_S 5
  545. //*****************************************************************************
  546. //
  547. // The following are defines for the bit fields in the NVIC_PRI16 register.
  548. //
  549. //*****************************************************************************
  550. #define NVIC_PRI16_INTD_M 0xE0000000 // Interrupt 67 Priority Mask
  551. #define NVIC_PRI16_INTC_M 0x00E00000 // Interrupt 66 Priority Mask
  552. #define NVIC_PRI16_INTB_M 0x0000E000 // Interrupt 65 Priority Mask
  553. #define NVIC_PRI16_INTA_M 0x000000E0 // Interrupt 64 Priority Mask
  554. #define NVIC_PRI16_INTD_S 29
  555. #define NVIC_PRI16_INTC_S 21
  556. #define NVIC_PRI16_INTB_S 13
  557. #define NVIC_PRI16_INTA_S 5
  558. //*****************************************************************************
  559. //
  560. // The following are defines for the bit fields in the NVIC_PRI17 register.
  561. //
  562. //*****************************************************************************
  563. #define NVIC_PRI17_INTD_M 0xE0000000 // Interrupt 71 Priority Mask
  564. #define NVIC_PRI17_INTC_M 0x00E00000 // Interrupt 70 Priority Mask
  565. #define NVIC_PRI17_INTB_M 0x0000E000 // Interrupt 69 Priority Mask
  566. #define NVIC_PRI17_INTA_M 0x000000E0 // Interrupt 68 Priority Mask
  567. #define NVIC_PRI17_INTD_S 29
  568. #define NVIC_PRI17_INTC_S 21
  569. #define NVIC_PRI17_INTB_S 13
  570. #define NVIC_PRI17_INTA_S 5
  571. //*****************************************************************************
  572. //
  573. // The following are defines for the bit fields in the NVIC_PRI18 register.
  574. //
  575. //*****************************************************************************
  576. #define NVIC_PRI18_INTD_M 0xE0000000 // Interrupt 75 Priority Mask
  577. #define NVIC_PRI18_INTC_M 0x00E00000 // Interrupt 74 Priority Mask
  578. #define NVIC_PRI18_INTB_M 0x0000E000 // Interrupt 73 Priority Mask
  579. #define NVIC_PRI18_INTA_M 0x000000E0 // Interrupt 72 Priority Mask
  580. #define NVIC_PRI18_INTD_S 29
  581. #define NVIC_PRI18_INTC_S 21
  582. #define NVIC_PRI18_INTB_S 13
  583. #define NVIC_PRI18_INTA_S 5
  584. //*****************************************************************************
  585. //
  586. // The following are defines for the bit fields in the NVIC_PRI19 register.
  587. //
  588. //*****************************************************************************
  589. #define NVIC_PRI19_INTD_M 0xE0000000 // Interrupt 79 Priority Mask
  590. #define NVIC_PRI19_INTC_M 0x00E00000 // Interrupt 78 Priority Mask
  591. #define NVIC_PRI19_INTB_M 0x0000E000 // Interrupt 77 Priority Mask
  592. #define NVIC_PRI19_INTA_M 0x000000E0 // Interrupt 76 Priority Mask
  593. #define NVIC_PRI19_INTD_S 29
  594. #define NVIC_PRI19_INTC_S 21
  595. #define NVIC_PRI19_INTB_S 13
  596. #define NVIC_PRI19_INTA_S 5
  597. //*****************************************************************************
  598. //
  599. // The following are defines for the bit fields in the NVIC_PRI20 register.
  600. //
  601. //*****************************************************************************
  602. #define NVIC_PRI20_INTD_M 0xE0000000 // Interrupt 83 Priority Mask
  603. #define NVIC_PRI20_INTC_M 0x00E00000 // Interrupt 82 Priority Mask
  604. #define NVIC_PRI20_INTB_M 0x0000E000 // Interrupt 81 Priority Mask
  605. #define NVIC_PRI20_INTA_M 0x000000E0 // Interrupt 80 Priority Mask
  606. #define NVIC_PRI20_INTD_S 29
  607. #define NVIC_PRI20_INTC_S 21
  608. #define NVIC_PRI20_INTB_S 13
  609. #define NVIC_PRI20_INTA_S 5
  610. //*****************************************************************************
  611. //
  612. // The following are defines for the bit fields in the NVIC_PRI21 register.
  613. //
  614. //*****************************************************************************
  615. #define NVIC_PRI21_INTD_M 0xE0000000 // Interrupt 87 Priority Mask
  616. #define NVIC_PRI21_INTC_M 0x00E00000 // Interrupt 86 Priority Mask
  617. #define NVIC_PRI21_INTB_M 0x0000E000 // Interrupt 85 Priority Mask
  618. #define NVIC_PRI21_INTA_M 0x000000E0 // Interrupt 84 Priority Mask
  619. #define NVIC_PRI21_INTD_S 29
  620. #define NVIC_PRI21_INTC_S 21
  621. #define NVIC_PRI21_INTB_S 13
  622. #define NVIC_PRI21_INTA_S 5
  623. //*****************************************************************************
  624. //
  625. // The following are defines for the bit fields in the NVIC_PRI22 register.
  626. //
  627. //*****************************************************************************
  628. #define NVIC_PRI22_INTD_M 0xE0000000 // Interrupt 91 Priority Mask
  629. #define NVIC_PRI22_INTC_M 0x00E00000 // Interrupt 90 Priority Mask
  630. #define NVIC_PRI22_INTB_M 0x0000E000 // Interrupt 89 Priority Mask
  631. #define NVIC_PRI22_INTA_M 0x000000E0 // Interrupt 88 Priority Mask
  632. #define NVIC_PRI22_INTD_S 29
  633. #define NVIC_PRI22_INTC_S 21
  634. #define NVIC_PRI22_INTB_S 13
  635. #define NVIC_PRI22_INTA_S 5
  636. //*****************************************************************************
  637. //
  638. // The following are defines for the bit fields in the NVIC_PRI23 register.
  639. //
  640. //*****************************************************************************
  641. #define NVIC_PRI23_INTD_M 0xE0000000 // Interrupt 95 Priority Mask
  642. #define NVIC_PRI23_INTC_M 0x00E00000 // Interrupt 94 Priority Mask
  643. #define NVIC_PRI23_INTB_M 0x0000E000 // Interrupt 93 Priority Mask
  644. #define NVIC_PRI23_INTA_M 0x000000E0 // Interrupt 92 Priority Mask
  645. #define NVIC_PRI23_INTD_S 29
  646. #define NVIC_PRI23_INTC_S 21
  647. #define NVIC_PRI23_INTB_S 13
  648. #define NVIC_PRI23_INTA_S 5
  649. //*****************************************************************************
  650. //
  651. // The following are defines for the bit fields in the NVIC_PRI24 register.
  652. //
  653. //*****************************************************************************
  654. #define NVIC_PRI24_INTD_M 0xE0000000 // Interrupt 99 Priority Mask
  655. #define NVIC_PRI24_INTC_M 0x00E00000 // Interrupt 98 Priority Mask
  656. #define NVIC_PRI24_INTB_M 0x0000E000 // Interrupt 97 Priority Mask
  657. #define NVIC_PRI24_INTA_M 0x000000E0 // Interrupt 96 Priority Mask
  658. #define NVIC_PRI24_INTD_S 29
  659. #define NVIC_PRI24_INTC_S 21
  660. #define NVIC_PRI24_INTB_S 13
  661. #define NVIC_PRI24_INTA_S 5
  662. //*****************************************************************************
  663. //
  664. // The following are defines for the bit fields in the NVIC_PRI25 register.
  665. //
  666. //*****************************************************************************
  667. #define NVIC_PRI25_INTD_M 0xE0000000 // Interrupt 103 Priority Mask
  668. #define NVIC_PRI25_INTC_M 0x00E00000 // Interrupt 102 Priority Mask
  669. #define NVIC_PRI25_INTB_M 0x0000E000 // Interrupt 101 Priority Mask
  670. #define NVIC_PRI25_INTA_M 0x000000E0 // Interrupt 100 Priority Mask
  671. #define NVIC_PRI25_INTD_S 29
  672. #define NVIC_PRI25_INTC_S 21
  673. #define NVIC_PRI25_INTB_S 13
  674. #define NVIC_PRI25_INTA_S 5
  675. //*****************************************************************************
  676. //
  677. // The following are defines for the bit fields in the NVIC_PRI26 register.
  678. //
  679. //*****************************************************************************
  680. #define NVIC_PRI26_INTD_M 0xE0000000 // Interrupt 107 Priority Mask
  681. #define NVIC_PRI26_INTC_M 0x00E00000 // Interrupt 106 Priority Mask
  682. #define NVIC_PRI26_INTB_M 0x0000E000 // Interrupt 105 Priority Mask
  683. #define NVIC_PRI26_INTA_M 0x000000E0 // Interrupt 104 Priority Mask
  684. #define NVIC_PRI26_INTD_S 29
  685. #define NVIC_PRI26_INTC_S 21
  686. #define NVIC_PRI26_INTB_S 13
  687. #define NVIC_PRI26_INTA_S 5
  688. //*****************************************************************************
  689. //
  690. // The following are defines for the bit fields in the NVIC_PRI27 register.
  691. //
  692. //*****************************************************************************
  693. #define NVIC_PRI27_INTD_M 0xE0000000 // Interrupt 111 Priority Mask
  694. #define NVIC_PRI27_INTC_M 0x00E00000 // Interrupt 110 Priority Mask
  695. #define NVIC_PRI27_INTB_M 0x0000E000 // Interrupt 109 Priority Mask
  696. #define NVIC_PRI27_INTA_M 0x000000E0 // Interrupt 108 Priority Mask
  697. #define NVIC_PRI27_INTD_S 29
  698. #define NVIC_PRI27_INTC_S 21
  699. #define NVIC_PRI27_INTB_S 13
  700. #define NVIC_PRI27_INTA_S 5
  701. //*****************************************************************************
  702. //
  703. // The following are defines for the bit fields in the NVIC_PRI28 register.
  704. //
  705. //*****************************************************************************
  706. #define NVIC_PRI28_INTD_M 0xE0000000 // Interrupt 115 Priority Mask
  707. #define NVIC_PRI28_INTC_M 0x00E00000 // Interrupt 114 Priority Mask
  708. #define NVIC_PRI28_INTB_M 0x0000E000 // Interrupt 113 Priority Mask
  709. #define NVIC_PRI28_INTA_M 0x000000E0 // Interrupt 112 Priority Mask
  710. #define NVIC_PRI28_INTD_S 29
  711. #define NVIC_PRI28_INTC_S 21
  712. #define NVIC_PRI28_INTB_S 13
  713. #define NVIC_PRI28_INTA_S 5
  714. //*****************************************************************************
  715. //
  716. // The following are defines for the bit fields in the NVIC_PRI29 register.
  717. //
  718. //*****************************************************************************
  719. #define NVIC_PRI29_INTD_M 0xE0000000 // Interrupt 119 Priority Mask
  720. #define NVIC_PRI29_INTC_M 0x00E00000 // Interrupt 118 Priority Mask
  721. #define NVIC_PRI29_INTB_M 0x0000E000 // Interrupt 117 Priority Mask
  722. #define NVIC_PRI29_INTA_M 0x000000E0 // Interrupt 116 Priority Mask
  723. #define NVIC_PRI29_INTD_S 29
  724. #define NVIC_PRI29_INTC_S 21
  725. #define NVIC_PRI29_INTB_S 13
  726. #define NVIC_PRI29_INTA_S 5
  727. //*****************************************************************************
  728. //
  729. // The following are defines for the bit fields in the NVIC_PRI30 register.
  730. //
  731. //*****************************************************************************
  732. #define NVIC_PRI30_INTD_M 0xE0000000 // Interrupt 123 Priority Mask
  733. #define NVIC_PRI30_INTC_M 0x00E00000 // Interrupt 122 Priority Mask
  734. #define NVIC_PRI30_INTB_M 0x0000E000 // Interrupt 121 Priority Mask
  735. #define NVIC_PRI30_INTA_M 0x000000E0 // Interrupt 120 Priority Mask
  736. #define NVIC_PRI30_INTD_S 29
  737. #define NVIC_PRI30_INTC_S 21
  738. #define NVIC_PRI30_INTB_S 13
  739. #define NVIC_PRI30_INTA_S 5
  740. //*****************************************************************************
  741. //
  742. // The following are defines for the bit fields in the NVIC_PRI31 register.
  743. //
  744. //*****************************************************************************
  745. #define NVIC_PRI31_INTD_M 0xE0000000 // Interrupt 127 Priority Mask
  746. #define NVIC_PRI31_INTC_M 0x00E00000 // Interrupt 126 Priority Mask
  747. #define NVIC_PRI31_INTB_M 0x0000E000 // Interrupt 125 Priority Mask
  748. #define NVIC_PRI31_INTA_M 0x000000E0 // Interrupt 124 Priority Mask
  749. #define NVIC_PRI31_INTD_S 29
  750. #define NVIC_PRI31_INTC_S 21
  751. #define NVIC_PRI31_INTB_S 13
  752. #define NVIC_PRI31_INTA_S 5
  753. //*****************************************************************************
  754. //
  755. // The following are defines for the bit fields in the NVIC_PRI32 register.
  756. //
  757. //*****************************************************************************
  758. #define NVIC_PRI32_INTD_M 0xE0000000 // Interrupt 131 Priority Mask
  759. #define NVIC_PRI32_INTC_M 0x00E00000 // Interrupt 130 Priority Mask
  760. #define NVIC_PRI32_INTB_M 0x0000E000 // Interrupt 129 Priority Mask
  761. #define NVIC_PRI32_INTA_M 0x000000E0 // Interrupt 128 Priority Mask
  762. #define NVIC_PRI32_INTD_S 29
  763. #define NVIC_PRI32_INTC_S 21
  764. #define NVIC_PRI32_INTB_S 13
  765. #define NVIC_PRI32_INTA_S 5
  766. //*****************************************************************************
  767. //
  768. // The following are defines for the bit fields in the NVIC_PRI33 register.
  769. //
  770. //*****************************************************************************
  771. #define NVIC_PRI33_INTD_M 0xE0000000 // Interrupt Priority for Interrupt
  772. // [4n+3]
  773. #define NVIC_PRI33_INTC_M 0x00E00000 // Interrupt Priority for Interrupt
  774. // [4n+2]
  775. #define NVIC_PRI33_INTB_M 0x0000E000 // Interrupt Priority for Interrupt
  776. // [4n+1]
  777. #define NVIC_PRI33_INTA_M 0x000000E0 // Interrupt Priority for Interrupt
  778. // [4n]
  779. #define NVIC_PRI33_INTD_S 29
  780. #define NVIC_PRI33_INTC_S 21
  781. #define NVIC_PRI33_INTB_S 13
  782. #define NVIC_PRI33_INTA_S 5
  783. //*****************************************************************************
  784. //
  785. // The following are defines for the bit fields in the NVIC_PRI34 register.
  786. //
  787. //*****************************************************************************
  788. #define NVIC_PRI34_INTD_M 0xE0000000 // Interrupt Priority for Interrupt
  789. // [4n+3]
  790. #define NVIC_PRI34_INTC_M 0x00E00000 // Interrupt Priority for Interrupt
  791. // [4n+2]
  792. #define NVIC_PRI34_INTB_M 0x0000E000 // Interrupt Priority for Interrupt
  793. // [4n+1]
  794. #define NVIC_PRI34_INTA_M 0x000000E0 // Interrupt Priority for Interrupt
  795. // [4n]
  796. #define NVIC_PRI34_INTD_S 29
  797. #define NVIC_PRI34_INTC_S 21
  798. #define NVIC_PRI34_INTB_S 13
  799. #define NVIC_PRI34_INTA_S 5
  800. //*****************************************************************************
  801. //
  802. // The following are defines for the bit fields in the NVIC_CPUID register.
  803. //
  804. //*****************************************************************************
  805. #define NVIC_CPUID_IMP_M 0xFF000000 // Implementer Code
  806. #define NVIC_CPUID_IMP_ARM 0x41000000 // ARM
  807. #define NVIC_CPUID_VAR_M 0x00F00000 // Variant Number
  808. #define NVIC_CPUID_CON_M 0x000F0000 // Constant
  809. #define NVIC_CPUID_PARTNO_M 0x0000FFF0 // Part Number
  810. #define NVIC_CPUID_PARTNO_CM4 0x0000C240 // Cortex-M4 processor
  811. #define NVIC_CPUID_REV_M 0x0000000F // Revision Number
  812. //*****************************************************************************
  813. //
  814. // The following are defines for the bit fields in the NVIC_INT_CTRL register.
  815. //
  816. //*****************************************************************************
  817. #define NVIC_INT_CTRL_NMI_SET 0x80000000 // NMI Set Pending
  818. #define NVIC_INT_CTRL_PEND_SV 0x10000000 // PendSV Set Pending
  819. #define NVIC_INT_CTRL_UNPEND_SV 0x08000000 // PendSV Clear Pending
  820. #define NVIC_INT_CTRL_PENDSTSET 0x04000000 // SysTick Set Pending
  821. #define NVIC_INT_CTRL_PENDSTCLR 0x02000000 // SysTick Clear Pending
  822. #define NVIC_INT_CTRL_ISR_PRE 0x00800000 // Debug Interrupt Handling
  823. #define NVIC_INT_CTRL_ISR_PEND 0x00400000 // Interrupt Pending
  824. #define NVIC_INT_CTRL_VEC_PEN_M 0x000FF000 // Interrupt Pending Vector Number
  825. #define NVIC_INT_CTRL_VEC_PEN_NMI \
  826. 0x00002000 // NMI
  827. #define NVIC_INT_CTRL_VEC_PEN_HARD \
  828. 0x00003000 // Hard fault
  829. #define NVIC_INT_CTRL_VEC_PEN_MEM \
  830. 0x00004000 // Memory management fault
  831. #define NVIC_INT_CTRL_VEC_PEN_BUS \
  832. 0x00005000 // Bus fault
  833. #define NVIC_INT_CTRL_VEC_PEN_USG \
  834. 0x00006000 // Usage fault
  835. #define NVIC_INT_CTRL_VEC_PEN_SVC \
  836. 0x0000B000 // SVCall
  837. #define NVIC_INT_CTRL_VEC_PEN_PNDSV \
  838. 0x0000E000 // PendSV
  839. #define NVIC_INT_CTRL_VEC_PEN_TICK \
  840. 0x0000F000 // SysTick
  841. #define NVIC_INT_CTRL_RET_BASE 0x00000800 // Return to Base
  842. #define NVIC_INT_CTRL_VEC_ACT_M 0x000000FF // Interrupt Pending Vector Number
  843. #define NVIC_INT_CTRL_VEC_ACT_S 0
  844. //*****************************************************************************
  845. //
  846. // The following are defines for the bit fields in the NVIC_VTABLE register.
  847. //
  848. //*****************************************************************************
  849. #define NVIC_VTABLE_OFFSET_M 0xFFFFFC00 // Vector Table Offset
  850. #define NVIC_VTABLE_OFFSET_S 10
  851. //*****************************************************************************
  852. //
  853. // The following are defines for the bit fields in the NVIC_APINT register.
  854. //
  855. //*****************************************************************************
  856. #define NVIC_APINT_VECTKEY_M 0xFFFF0000 // Register Key
  857. #define NVIC_APINT_VECTKEY 0x05FA0000 // Vector key
  858. #define NVIC_APINT_ENDIANESS 0x00008000 // Data Endianess
  859. #define NVIC_APINT_PRIGROUP_M 0x00000700 // Interrupt Priority Grouping
  860. #define NVIC_APINT_PRIGROUP_7_1 0x00000000 // Priority group 7.1 split
  861. #define NVIC_APINT_PRIGROUP_6_2 0x00000100 // Priority group 6.2 split
  862. #define NVIC_APINT_PRIGROUP_5_3 0x00000200 // Priority group 5.3 split
  863. #define NVIC_APINT_PRIGROUP_4_4 0x00000300 // Priority group 4.4 split
  864. #define NVIC_APINT_PRIGROUP_3_5 0x00000400 // Priority group 3.5 split
  865. #define NVIC_APINT_PRIGROUP_2_6 0x00000500 // Priority group 2.6 split
  866. #define NVIC_APINT_PRIGROUP_1_7 0x00000600 // Priority group 1.7 split
  867. #define NVIC_APINT_PRIGROUP_0_8 0x00000700 // Priority group 0.8 split
  868. #define NVIC_APINT_SYSRESETREQ 0x00000004 // System Reset Request
  869. #define NVIC_APINT_VECT_CLR_ACT 0x00000002 // Clear Active NMI / Fault
  870. #define NVIC_APINT_VECT_RESET 0x00000001 // System Reset
  871. //*****************************************************************************
  872. //
  873. // The following are defines for the bit fields in the NVIC_SYS_CTRL register.
  874. //
  875. //*****************************************************************************
  876. #define NVIC_SYS_CTRL_SEVONPEND 0x00000010 // Wake Up on Pending
  877. #define NVIC_SYS_CTRL_SLEEPDEEP 0x00000004 // Deep Sleep Enable
  878. #define NVIC_SYS_CTRL_SLEEPEXIT 0x00000002 // Sleep on ISR Exit
  879. //*****************************************************************************
  880. //
  881. // The following are defines for the bit fields in the NVIC_CFG_CTRL register.
  882. //
  883. //*****************************************************************************
  884. #define NVIC_CFG_CTRL_STKALIGN 0x00000200 // Stack Alignment on Exception
  885. // Entry
  886. #define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100 // Ignore Bus Fault in NMI and
  887. // Fault
  888. #define NVIC_CFG_CTRL_DIV0 0x00000010 // Trap on Divide by 0
  889. #define NVIC_CFG_CTRL_UNALIGNED 0x00000008 // Trap on Unaligned Access
  890. #define NVIC_CFG_CTRL_MAIN_PEND 0x00000002 // Allow Main Interrupt Trigger
  891. #define NVIC_CFG_CTRL_BASE_THR 0x00000001 // Thread State Control
  892. //*****************************************************************************
  893. //
  894. // The following are defines for the bit fields in the NVIC_SYS_PRI1 register.
  895. //
  896. //*****************************************************************************
  897. #define NVIC_SYS_PRI1_USAGE_M 0x00E00000 // Usage Fault Priority
  898. #define NVIC_SYS_PRI1_BUS_M 0x0000E000 // Bus Fault Priority
  899. #define NVIC_SYS_PRI1_MEM_M 0x000000E0 // Memory Management Fault Priority
  900. #define NVIC_SYS_PRI1_USAGE_S 21
  901. #define NVIC_SYS_PRI1_BUS_S 13
  902. #define NVIC_SYS_PRI1_MEM_S 5
  903. //*****************************************************************************
  904. //
  905. // The following are defines for the bit fields in the NVIC_SYS_PRI2 register.
  906. //
  907. //*****************************************************************************
  908. #define NVIC_SYS_PRI2_SVC_M 0xE0000000 // SVCall Priority
  909. #define NVIC_SYS_PRI2_SVC_S 29
  910. //*****************************************************************************
  911. //
  912. // The following are defines for the bit fields in the NVIC_SYS_PRI3 register.
  913. //
  914. //*****************************************************************************
  915. #define NVIC_SYS_PRI3_TICK_M 0xE0000000 // SysTick Exception Priority
  916. #define NVIC_SYS_PRI3_PENDSV_M 0x00E00000 // PendSV Priority
  917. #define NVIC_SYS_PRI3_DEBUG_M 0x000000E0 // Debug Priority
  918. #define NVIC_SYS_PRI3_TICK_S 29
  919. #define NVIC_SYS_PRI3_PENDSV_S 21
  920. #define NVIC_SYS_PRI3_DEBUG_S 5
  921. //*****************************************************************************
  922. //
  923. // The following are defines for the bit fields in the NVIC_SYS_HND_CTRL
  924. // register.
  925. //
  926. //*****************************************************************************
  927. #define NVIC_SYS_HND_CTRL_USAGE 0x00040000 // Usage Fault Enable
  928. #define NVIC_SYS_HND_CTRL_BUS 0x00020000 // Bus Fault Enable
  929. #define NVIC_SYS_HND_CTRL_MEM 0x00010000 // Memory Management Fault Enable
  930. #define NVIC_SYS_HND_CTRL_SVC 0x00008000 // SVC Call Pending
  931. #define NVIC_SYS_HND_CTRL_BUSP 0x00004000 // Bus Fault Pending
  932. #define NVIC_SYS_HND_CTRL_MEMP 0x00002000 // Memory Management Fault Pending
  933. #define NVIC_SYS_HND_CTRL_USAGEP \
  934. 0x00001000 // Usage Fault Pending
  935. #define NVIC_SYS_HND_CTRL_TICK 0x00000800 // SysTick Exception Active
  936. #define NVIC_SYS_HND_CTRL_PNDSV 0x00000400 // PendSV Exception Active
  937. #define NVIC_SYS_HND_CTRL_MON 0x00000100 // Debug Monitor Active
  938. #define NVIC_SYS_HND_CTRL_SVCA 0x00000080 // SVC Call Active
  939. #define NVIC_SYS_HND_CTRL_USGA 0x00000008 // Usage Fault Active
  940. #define NVIC_SYS_HND_CTRL_BUSA 0x00000002 // Bus Fault Active
  941. #define NVIC_SYS_HND_CTRL_MEMA 0x00000001 // Memory Management Fault Active
  942. //*****************************************************************************
  943. //
  944. // The following are defines for the bit fields in the NVIC_FAULT_STAT
  945. // register.
  946. //
  947. //*****************************************************************************
  948. #define NVIC_FAULT_STAT_DIV0 0x02000000 // Divide-by-Zero Usage Fault
  949. #define NVIC_FAULT_STAT_UNALIGN 0x01000000 // Unaligned Access Usage Fault
  950. #define NVIC_FAULT_STAT_NOCP 0x00080000 // No Coprocessor Usage Fault
  951. #define NVIC_FAULT_STAT_INVPC 0x00040000 // Invalid PC Load Usage Fault
  952. #define NVIC_FAULT_STAT_INVSTAT 0x00020000 // Invalid State Usage Fault
  953. #define NVIC_FAULT_STAT_UNDEF 0x00010000 // Undefined Instruction Usage
  954. // Fault
  955. #define NVIC_FAULT_STAT_BFARV 0x00008000 // Bus Fault Address Register Valid
  956. #define NVIC_FAULT_STAT_BLSPERR 0x00002000 // Bus Fault on Floating-Point Lazy
  957. // State Preservation
  958. #define NVIC_FAULT_STAT_BSTKE 0x00001000 // Stack Bus Fault
  959. #define NVIC_FAULT_STAT_BUSTKE 0x00000800 // Unstack Bus Fault
  960. #define NVIC_FAULT_STAT_IMPRE 0x00000400 // Imprecise Data Bus Error
  961. #define NVIC_FAULT_STAT_PRECISE 0x00000200 // Precise Data Bus Error
  962. #define NVIC_FAULT_STAT_IBUS 0x00000100 // Instruction Bus Error
  963. #define NVIC_FAULT_STAT_MMARV 0x00000080 // Memory Management Fault Address
  964. // Register Valid
  965. #define NVIC_FAULT_STAT_MLSPERR 0x00000020 // Memory Management Fault on
  966. // Floating-Point Lazy State
  967. // Preservation
  968. #define NVIC_FAULT_STAT_MSTKE 0x00000010 // Stack Access Violation
  969. #define NVIC_FAULT_STAT_MUSTKE 0x00000008 // Unstack Access Violation
  970. #define NVIC_FAULT_STAT_DERR 0x00000002 // Data Access Violation
  971. #define NVIC_FAULT_STAT_IERR 0x00000001 // Instruction Access Violation
  972. //*****************************************************************************
  973. //
  974. // The following are defines for the bit fields in the NVIC_HFAULT_STAT
  975. // register.
  976. //
  977. //*****************************************************************************
  978. #define NVIC_HFAULT_STAT_DBG 0x80000000 // Debug Event
  979. #define NVIC_HFAULT_STAT_FORCED 0x40000000 // Forced Hard Fault
  980. #define NVIC_HFAULT_STAT_VECT 0x00000002 // Vector Table Read Fault
  981. //*****************************************************************************
  982. //
  983. // The following are defines for the bit fields in the NVIC_DEBUG_STAT
  984. // register.
  985. //
  986. //*****************************************************************************
  987. #define NVIC_DEBUG_STAT_EXTRNL 0x00000010 // EDBGRQ asserted
  988. #define NVIC_DEBUG_STAT_VCATCH 0x00000008 // Vector catch
  989. #define NVIC_DEBUG_STAT_DWTTRAP 0x00000004 // DWT match
  990. #define NVIC_DEBUG_STAT_BKPT 0x00000002 // Breakpoint instruction
  991. #define NVIC_DEBUG_STAT_HALTED 0x00000001 // Halt request
  992. //*****************************************************************************
  993. //
  994. // The following are defines for the bit fields in the NVIC_MM_ADDR register.
  995. //
  996. //*****************************************************************************
  997. #define NVIC_MM_ADDR_M 0xFFFFFFFF // Fault Address
  998. #define NVIC_MM_ADDR_S 0
  999. //*****************************************************************************
  1000. //
  1001. // The following are defines for the bit fields in the NVIC_FAULT_ADDR
  1002. // register.
  1003. //
  1004. //*****************************************************************************
  1005. #define NVIC_FAULT_ADDR_M 0xFFFFFFFF // Fault Address
  1006. #define NVIC_FAULT_ADDR_S 0
  1007. //*****************************************************************************
  1008. //
  1009. // The following are defines for the bit fields in the NVIC_CPAC register.
  1010. //
  1011. //*****************************************************************************
  1012. #define NVIC_CPAC_CP11_M 0x00C00000 // CP11 Coprocessor Access
  1013. // Privilege
  1014. #define NVIC_CPAC_CP11_DIS 0x00000000 // Access Denied
  1015. #define NVIC_CPAC_CP11_PRIV 0x00400000 // Privileged Access Only
  1016. #define NVIC_CPAC_CP11_FULL 0x00C00000 // Full Access
  1017. #define NVIC_CPAC_CP10_M 0x00300000 // CP10 Coprocessor Access
  1018. // Privilege
  1019. #define NVIC_CPAC_CP10_DIS 0x00000000 // Access Denied
  1020. #define NVIC_CPAC_CP10_PRIV 0x00100000 // Privileged Access Only
  1021. #define NVIC_CPAC_CP10_FULL 0x00300000 // Full Access
  1022. //*****************************************************************************
  1023. //
  1024. // The following are defines for the bit fields in the NVIC_MPU_TYPE register.
  1025. //
  1026. //*****************************************************************************
  1027. #define NVIC_MPU_TYPE_IREGION_M 0x00FF0000 // Number of I Regions
  1028. #define NVIC_MPU_TYPE_DREGION_M 0x0000FF00 // Number of D Regions
  1029. #define NVIC_MPU_TYPE_SEPARATE 0x00000001 // Separate or Unified MPU
  1030. #define NVIC_MPU_TYPE_IREGION_S 16
  1031. #define NVIC_MPU_TYPE_DREGION_S 8
  1032. //*****************************************************************************
  1033. //
  1034. // The following are defines for the bit fields in the NVIC_MPU_CTRL register.
  1035. //
  1036. //*****************************************************************************
  1037. #define NVIC_MPU_CTRL_PRIVDEFEN 0x00000004 // MPU Default Region
  1038. #define NVIC_MPU_CTRL_HFNMIENA 0x00000002 // MPU Enabled During Faults
  1039. #define NVIC_MPU_CTRL_ENABLE 0x00000001 // MPU Enable
  1040. //*****************************************************************************
  1041. //
  1042. // The following are defines for the bit fields in the NVIC_MPU_NUMBER
  1043. // register.
  1044. //
  1045. //*****************************************************************************
  1046. #define NVIC_MPU_NUMBER_M 0x00000007 // MPU Region to Access
  1047. #define NVIC_MPU_NUMBER_S 0
  1048. //*****************************************************************************
  1049. //
  1050. // The following are defines for the bit fields in the NVIC_MPU_BASE register.
  1051. //
  1052. //*****************************************************************************
  1053. #define NVIC_MPU_BASE_ADDR_M 0xFFFFFFE0 // Base Address Mask
  1054. #define NVIC_MPU_BASE_VALID 0x00000010 // Region Number Valid
  1055. #define NVIC_MPU_BASE_REGION_M 0x00000007 // Region Number
  1056. #define NVIC_MPU_BASE_ADDR_S 5
  1057. #define NVIC_MPU_BASE_REGION_S 0
  1058. //*****************************************************************************
  1059. //
  1060. // The following are defines for the bit fields in the NVIC_MPU_ATTR register.
  1061. //
  1062. //*****************************************************************************
  1063. #define NVIC_MPU_ATTR_XN 0x10000000 // Instruction Access Disable
  1064. #define NVIC_MPU_ATTR_AP_M 0x07000000 // Access Privilege
  1065. #define NVIC_MPU_ATTR_AP_NO_NO 0x00000000 // prv: no access, usr: no access
  1066. #define NVIC_MPU_ATTR_AP_RW_NO 0x01000000 // prv: rw, usr: none
  1067. #define NVIC_MPU_ATTR_AP_RW_RO 0x02000000 // prv: rw, usr: read-only
  1068. #define NVIC_MPU_ATTR_AP_RW_RW 0x03000000 // prv: rw, usr: rw
  1069. #define NVIC_MPU_ATTR_AP_RO_NO 0x05000000 // prv: ro, usr: none
  1070. #define NVIC_MPU_ATTR_AP_RO_RO 0x06000000 // prv: ro, usr: ro
  1071. #define NVIC_MPU_ATTR_TEX_M 0x00380000 // Type Extension Mask
  1072. #define NVIC_MPU_ATTR_SHAREABLE 0x00040000 // Shareable
  1073. #define NVIC_MPU_ATTR_CACHEABLE 0x00020000 // Cacheable
  1074. #define NVIC_MPU_ATTR_BUFFRABLE 0x00010000 // Bufferable
  1075. #define NVIC_MPU_ATTR_SRD_M 0x0000FF00 // Subregion Disable Bits
  1076. #define NVIC_MPU_ATTR_SRD_0 0x00000100 // Sub-region 0 disable
  1077. #define NVIC_MPU_ATTR_SRD_1 0x00000200 // Sub-region 1 disable
  1078. #define NVIC_MPU_ATTR_SRD_2 0x00000400 // Sub-region 2 disable
  1079. #define NVIC_MPU_ATTR_SRD_3 0x00000800 // Sub-region 3 disable
  1080. #define NVIC_MPU_ATTR_SRD_4 0x00001000 // Sub-region 4 disable
  1081. #define NVIC_MPU_ATTR_SRD_5 0x00002000 // Sub-region 5 disable
  1082. #define NVIC_MPU_ATTR_SRD_6 0x00004000 // Sub-region 6 disable
  1083. #define NVIC_MPU_ATTR_SRD_7 0x00008000 // Sub-region 7 disable
  1084. #define NVIC_MPU_ATTR_SIZE_M 0x0000003E // Region Size Mask
  1085. #define NVIC_MPU_ATTR_SIZE_32B 0x00000008 // Region size 32 bytes
  1086. #define NVIC_MPU_ATTR_SIZE_64B 0x0000000A // Region size 64 bytes
  1087. #define NVIC_MPU_ATTR_SIZE_128B 0x0000000C // Region size 128 bytes
  1088. #define NVIC_MPU_ATTR_SIZE_256B 0x0000000E // Region size 256 bytes
  1089. #define NVIC_MPU_ATTR_SIZE_512B 0x00000010 // Region size 512 bytes
  1090. #define NVIC_MPU_ATTR_SIZE_1K 0x00000012 // Region size 1 Kbytes
  1091. #define NVIC_MPU_ATTR_SIZE_2K 0x00000014 // Region size 2 Kbytes
  1092. #define NVIC_MPU_ATTR_SIZE_4K 0x00000016 // Region size 4 Kbytes
  1093. #define NVIC_MPU_ATTR_SIZE_8K 0x00000018 // Region size 8 Kbytes
  1094. #define NVIC_MPU_ATTR_SIZE_16K 0x0000001A // Region size 16 Kbytes
  1095. #define NVIC_MPU_ATTR_SIZE_32K 0x0000001C // Region size 32 Kbytes
  1096. #define NVIC_MPU_ATTR_SIZE_64K 0x0000001E // Region size 64 Kbytes
  1097. #define NVIC_MPU_ATTR_SIZE_128K 0x00000020 // Region size 128 Kbytes
  1098. #define NVIC_MPU_ATTR_SIZE_256K 0x00000022 // Region size 256 Kbytes
  1099. #define NVIC_MPU_ATTR_SIZE_512K 0x00000024 // Region size 512 Kbytes
  1100. #define NVIC_MPU_ATTR_SIZE_1M 0x00000026 // Region size 1 Mbytes
  1101. #define NVIC_MPU_ATTR_SIZE_2M 0x00000028 // Region size 2 Mbytes
  1102. #define NVIC_MPU_ATTR_SIZE_4M 0x0000002A // Region size 4 Mbytes
  1103. #define NVIC_MPU_ATTR_SIZE_8M 0x0000002C // Region size 8 Mbytes
  1104. #define NVIC_MPU_ATTR_SIZE_16M 0x0000002E // Region size 16 Mbytes
  1105. #define NVIC_MPU_ATTR_SIZE_32M 0x00000030 // Region size 32 Mbytes
  1106. #define NVIC_MPU_ATTR_SIZE_64M 0x00000032 // Region size 64 Mbytes
  1107. #define NVIC_MPU_ATTR_SIZE_128M 0x00000034 // Region size 128 Mbytes
  1108. #define NVIC_MPU_ATTR_SIZE_256M 0x00000036 // Region size 256 Mbytes
  1109. #define NVIC_MPU_ATTR_SIZE_512M 0x00000038 // Region size 512 Mbytes
  1110. #define NVIC_MPU_ATTR_SIZE_1G 0x0000003A // Region size 1 Gbytes
  1111. #define NVIC_MPU_ATTR_SIZE_2G 0x0000003C // Region size 2 Gbytes
  1112. #define NVIC_MPU_ATTR_SIZE_4G 0x0000003E // Region size 4 Gbytes
  1113. #define NVIC_MPU_ATTR_ENABLE 0x00000001 // Region Enable
  1114. //*****************************************************************************
  1115. //
  1116. // The following are defines for the bit fields in the NVIC_MPU_BASE1 register.
  1117. //
  1118. //*****************************************************************************
  1119. #define NVIC_MPU_BASE1_ADDR_M 0xFFFFFFE0 // Base Address Mask
  1120. #define NVIC_MPU_BASE1_VALID 0x00000010 // Region Number Valid
  1121. #define NVIC_MPU_BASE1_REGION_M 0x00000007 // Region Number
  1122. #define NVIC_MPU_BASE1_ADDR_S 5
  1123. #define NVIC_MPU_BASE1_REGION_S 0
  1124. //*****************************************************************************
  1125. //
  1126. // The following are defines for the bit fields in the NVIC_MPU_ATTR1 register.
  1127. //
  1128. //*****************************************************************************
  1129. #define NVIC_MPU_ATTR1_XN 0x10000000 // Instruction Access Disable
  1130. #define NVIC_MPU_ATTR1_AP_M 0x07000000 // Access Privilege
  1131. #define NVIC_MPU_ATTR1_TEX_M 0x00380000 // Type Extension Mask
  1132. #define NVIC_MPU_ATTR1_SHAREABLE \
  1133. 0x00040000 // Shareable
  1134. #define NVIC_MPU_ATTR1_CACHEABLE \
  1135. 0x00020000 // Cacheable
  1136. #define NVIC_MPU_ATTR1_BUFFRABLE \
  1137. 0x00010000 // Bufferable
  1138. #define NVIC_MPU_ATTR1_SRD_M 0x0000FF00 // Subregion Disable Bits
  1139. #define NVIC_MPU_ATTR1_SIZE_M 0x0000003E // Region Size Mask
  1140. #define NVIC_MPU_ATTR1_ENABLE 0x00000001 // Region Enable
  1141. //*****************************************************************************
  1142. //
  1143. // The following are defines for the bit fields in the NVIC_MPU_BASE2 register.
  1144. //
  1145. //*****************************************************************************
  1146. #define NVIC_MPU_BASE2_ADDR_M 0xFFFFFFE0 // Base Address Mask
  1147. #define NVIC_MPU_BASE2_VALID 0x00000010 // Region Number Valid
  1148. #define NVIC_MPU_BASE2_REGION_M 0x00000007 // Region Number
  1149. #define NVIC_MPU_BASE2_ADDR_S 5
  1150. #define NVIC_MPU_BASE2_REGION_S 0
  1151. //*****************************************************************************
  1152. //
  1153. // The following are defines for the bit fields in the NVIC_MPU_ATTR2 register.
  1154. //
  1155. //*****************************************************************************
  1156. #define NVIC_MPU_ATTR2_XN 0x10000000 // Instruction Access Disable
  1157. #define NVIC_MPU_ATTR2_AP_M 0x07000000 // Access Privilege
  1158. #define NVIC_MPU_ATTR2_TEX_M 0x00380000 // Type Extension Mask
  1159. #define NVIC_MPU_ATTR2_SHAREABLE \
  1160. 0x00040000 // Shareable
  1161. #define NVIC_MPU_ATTR2_CACHEABLE \
  1162. 0x00020000 // Cacheable
  1163. #define NVIC_MPU_ATTR2_BUFFRABLE \
  1164. 0x00010000 // Bufferable
  1165. #define NVIC_MPU_ATTR2_SRD_M 0x0000FF00 // Subregion Disable Bits
  1166. #define NVIC_MPU_ATTR2_SIZE_M 0x0000003E // Region Size Mask
  1167. #define NVIC_MPU_ATTR2_ENABLE 0x00000001 // Region Enable
  1168. //*****************************************************************************
  1169. //
  1170. // The following are defines for the bit fields in the NVIC_MPU_BASE3 register.
  1171. //
  1172. //*****************************************************************************
  1173. #define NVIC_MPU_BASE3_ADDR_M 0xFFFFFFE0 // Base Address Mask
  1174. #define NVIC_MPU_BASE3_VALID 0x00000010 // Region Number Valid
  1175. #define NVIC_MPU_BASE3_REGION_M 0x00000007 // Region Number
  1176. #define NVIC_MPU_BASE3_ADDR_S 5
  1177. #define NVIC_MPU_BASE3_REGION_S 0
  1178. //*****************************************************************************
  1179. //
  1180. // The following are defines for the bit fields in the NVIC_MPU_ATTR3 register.
  1181. //
  1182. //*****************************************************************************
  1183. #define NVIC_MPU_ATTR3_XN 0x10000000 // Instruction Access Disable
  1184. #define NVIC_MPU_ATTR3_AP_M 0x07000000 // Access Privilege
  1185. #define NVIC_MPU_ATTR3_TEX_M 0x00380000 // Type Extension Mask
  1186. #define NVIC_MPU_ATTR3_SHAREABLE \
  1187. 0x00040000 // Shareable
  1188. #define NVIC_MPU_ATTR3_CACHEABLE \
  1189. 0x00020000 // Cacheable
  1190. #define NVIC_MPU_ATTR3_BUFFRABLE \
  1191. 0x00010000 // Bufferable
  1192. #define NVIC_MPU_ATTR3_SRD_M 0x0000FF00 // Subregion Disable Bits
  1193. #define NVIC_MPU_ATTR3_SIZE_M 0x0000003E // Region Size Mask
  1194. #define NVIC_MPU_ATTR3_ENABLE 0x00000001 // Region Enable
  1195. //*****************************************************************************
  1196. //
  1197. // The following are defines for the bit fields in the NVIC_DBG_CTRL register.
  1198. //
  1199. //*****************************************************************************
  1200. #define NVIC_DBG_CTRL_DBGKEY_M 0xFFFF0000 // Debug key mask
  1201. #define NVIC_DBG_CTRL_DBGKEY 0xA05F0000 // Debug key
  1202. #define NVIC_DBG_CTRL_S_RESET_ST \
  1203. 0x02000000 // Core has reset since last read
  1204. #define NVIC_DBG_CTRL_S_RETIRE_ST \
  1205. 0x01000000 // Core has executed insruction
  1206. // since last read
  1207. #define NVIC_DBG_CTRL_S_LOCKUP 0x00080000 // Core is locked up
  1208. #define NVIC_DBG_CTRL_S_SLEEP 0x00040000 // Core is sleeping
  1209. #define NVIC_DBG_CTRL_S_HALT 0x00020000 // Core status on halt
  1210. #define NVIC_DBG_CTRL_S_REGRDY 0x00010000 // Register read/write available
  1211. #define NVIC_DBG_CTRL_C_SNAPSTALL \
  1212. 0x00000020 // Breaks a stalled load/store
  1213. #define NVIC_DBG_CTRL_C_MASKINT 0x00000008 // Mask interrupts when stepping
  1214. #define NVIC_DBG_CTRL_C_STEP 0x00000004 // Step the core
  1215. #define NVIC_DBG_CTRL_C_HALT 0x00000002 // Halt the core
  1216. #define NVIC_DBG_CTRL_C_DEBUGEN 0x00000001 // Enable debug
  1217. //*****************************************************************************
  1218. //
  1219. // The following are defines for the bit fields in the NVIC_DBG_XFER register.
  1220. //
  1221. //*****************************************************************************
  1222. #define NVIC_DBG_XFER_REG_WNR 0x00010000 // Write or not read
  1223. #define NVIC_DBG_XFER_REG_SEL_M 0x0000001F // Register
  1224. #define NVIC_DBG_XFER_REG_R0 0x00000000 // Register R0
  1225. #define NVIC_DBG_XFER_REG_R1 0x00000001 // Register R1
  1226. #define NVIC_DBG_XFER_REG_R2 0x00000002 // Register R2
  1227. #define NVIC_DBG_XFER_REG_R3 0x00000003 // Register R3
  1228. #define NVIC_DBG_XFER_REG_R4 0x00000004 // Register R4
  1229. #define NVIC_DBG_XFER_REG_R5 0x00000005 // Register R5
  1230. #define NVIC_DBG_XFER_REG_R6 0x00000006 // Register R6
  1231. #define NVIC_DBG_XFER_REG_R7 0x00000007 // Register R7
  1232. #define NVIC_DBG_XFER_REG_R8 0x00000008 // Register R8
  1233. #define NVIC_DBG_XFER_REG_R9 0x00000009 // Register R9
  1234. #define NVIC_DBG_XFER_REG_R10 0x0000000A // Register R10
  1235. #define NVIC_DBG_XFER_REG_R11 0x0000000B // Register R11
  1236. #define NVIC_DBG_XFER_REG_R12 0x0000000C // Register R12
  1237. #define NVIC_DBG_XFER_REG_R13 0x0000000D // Register R13
  1238. #define NVIC_DBG_XFER_REG_R14 0x0000000E // Register R14
  1239. #define NVIC_DBG_XFER_REG_R15 0x0000000F // Register R15
  1240. #define NVIC_DBG_XFER_REG_FLAGS 0x00000010 // xPSR/Flags register
  1241. #define NVIC_DBG_XFER_REG_MSP 0x00000011 // Main SP
  1242. #define NVIC_DBG_XFER_REG_PSP 0x00000012 // Process SP
  1243. #define NVIC_DBG_XFER_REG_DSP 0x00000013 // Deep SP
  1244. #define NVIC_DBG_XFER_REG_CFBP 0x00000014 // Control/Fault/BasePri/PriMask
  1245. //*****************************************************************************
  1246. //
  1247. // The following are defines for the bit fields in the NVIC_DBG_DATA register.
  1248. //
  1249. //*****************************************************************************
  1250. #define NVIC_DBG_DATA_M 0xFFFFFFFF // Data temporary cache
  1251. #define NVIC_DBG_DATA_S 0
  1252. //*****************************************************************************
  1253. //
  1254. // The following are defines for the bit fields in the NVIC_DBG_INT register.
  1255. //
  1256. //*****************************************************************************
  1257. #define NVIC_DBG_INT_HARDERR 0x00000400 // Debug trap on hard fault
  1258. #define NVIC_DBG_INT_INTERR 0x00000200 // Debug trap on interrupt errors
  1259. #define NVIC_DBG_INT_BUSERR 0x00000100 // Debug trap on bus error
  1260. #define NVIC_DBG_INT_STATERR 0x00000080 // Debug trap on usage fault state
  1261. #define NVIC_DBG_INT_CHKERR 0x00000040 // Debug trap on usage fault check
  1262. #define NVIC_DBG_INT_NOCPERR 0x00000020 // Debug trap on coprocessor error
  1263. #define NVIC_DBG_INT_MMERR 0x00000010 // Debug trap on mem manage fault
  1264. #define NVIC_DBG_INT_RESET 0x00000008 // Core reset status
  1265. #define NVIC_DBG_INT_RSTPENDCLR 0x00000004 // Clear pending core reset
  1266. #define NVIC_DBG_INT_RSTPENDING 0x00000002 // Core reset is pending
  1267. #define NVIC_DBG_INT_RSTVCATCH 0x00000001 // Reset vector catch
  1268. //*****************************************************************************
  1269. //
  1270. // The following are defines for the bit fields in the NVIC_SW_TRIG register.
  1271. //
  1272. //*****************************************************************************
  1273. #define NVIC_SW_TRIG_INTID_M 0x000000FF // Interrupt ID
  1274. #define NVIC_SW_TRIG_INTID_S 0
  1275. //*****************************************************************************
  1276. //
  1277. // The following are defines for the bit fields in the NVIC_FPCC register.
  1278. //
  1279. //*****************************************************************************
  1280. #define NVIC_FPCC_ASPEN 0x80000000 // Automatic State Preservation
  1281. // Enable
  1282. #define NVIC_FPCC_LSPEN 0x40000000 // Lazy State Preservation Enable
  1283. #define NVIC_FPCC_MONRDY 0x00000100 // Monitor Ready
  1284. #define NVIC_FPCC_BFRDY 0x00000040 // Bus Fault Ready
  1285. #define NVIC_FPCC_MMRDY 0x00000020 // Memory Management Fault Ready
  1286. #define NVIC_FPCC_HFRDY 0x00000010 // Hard Fault Ready
  1287. #define NVIC_FPCC_THREAD 0x00000008 // Thread Mode
  1288. #define NVIC_FPCC_USER 0x00000002 // User Privilege Level
  1289. #define NVIC_FPCC_LSPACT 0x00000001 // Lazy State Preservation Active
  1290. //*****************************************************************************
  1291. //
  1292. // The following are defines for the bit fields in the NVIC_FPCA register.
  1293. //
  1294. //*****************************************************************************
  1295. #define NVIC_FPCA_ADDRESS_M 0xFFFFFFF8 // Address
  1296. #define NVIC_FPCA_ADDRESS_S 3
  1297. //*****************************************************************************
  1298. //
  1299. // The following are defines for the bit fields in the NVIC_FPDSC register.
  1300. //
  1301. //*****************************************************************************
  1302. #define NVIC_FPDSC_AHP 0x04000000 // AHP Bit Default
  1303. #define NVIC_FPDSC_DN 0x02000000 // DN Bit Default
  1304. #define NVIC_FPDSC_FZ 0x01000000 // FZ Bit Default
  1305. #define NVIC_FPDSC_RMODE_M 0x00C00000 // RMODE Bit Default
  1306. #define NVIC_FPDSC_RMODE_RN 0x00000000 // Round to Nearest (RN) mode
  1307. #define NVIC_FPDSC_RMODE_RP 0x00400000 // Round towards Plus Infinity (RP)
  1308. // mode
  1309. #define NVIC_FPDSC_RMODE_RM 0x00800000 // Round towards Minus Infinity
  1310. // (RM) mode
  1311. #define NVIC_FPDSC_RMODE_RZ 0x00C00000 // Round towards Zero (RZ) mode
  1312. #endif // __HW_NVIC_H__