hw_nvic.h 94 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767
  1. /******************************************************************************
  2. * Filename: hw_nvic.h
  3. * Revised: $Date: 2013-04-29 09:49:55 +0200 (Mon, 29 Apr 2013) $
  4. * Revision: $Revision: 9923 $
  5. *
  6. * Description: Macros used when accessing the NVIC hardware.
  7. *
  8. *
  9. * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
  10. *
  11. *
  12. * Redistribution and use in source and binary forms, with or without
  13. * modification, are permitted provided that the following conditions
  14. * are met:
  15. *
  16. * Redistributions of source code must retain the above copyright
  17. * notice, this list of conditions and the following disclaimer.
  18. *
  19. * Redistributions in binary form must reproduce the above copyright
  20. * notice, this list of conditions and the following disclaimer in the
  21. * documentation and/or other materials provided with the distribution.
  22. *
  23. * Neither the name of Texas Instruments Incorporated nor the names of
  24. * its contributors may be used to endorse or promote products derived
  25. * from this software without specific prior written permission.
  26. *
  27. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  28. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  29. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  30. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  31. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  32. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  33. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  34. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  35. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  36. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  37. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38. *
  39. ******************************************************************************/
  40. #ifndef __HW_NVIC_H__
  41. #define __HW_NVIC_H__
  42. //*****************************************************************************
  43. //
  44. // The following are defines for the NVIC register addresses.
  45. //
  46. //*****************************************************************************
  47. #define NVIC_INT_TYPE 0xE000E004 // Interrupt Controller Type Reg
  48. #define NVIC_ACTLR 0xE000E008 // Auxiliary Control
  49. #define NVIC_ST_CTRL 0xE000E010 // SysTick Control and Status
  50. // Register
  51. #define NVIC_ST_RELOAD 0xE000E014 // SysTick Reload Value Register
  52. #define NVIC_ST_CURRENT 0xE000E018 // SysTick Current Value Register
  53. #define NVIC_ST_CAL 0xE000E01C // SysTick Calibration Value Reg
  54. #define NVIC_EN0 0xE000E100 // Interrupt 0-31 Set Enable
  55. #define NVIC_EN1 0xE000E104 // Interrupt 32-54 Set Enable
  56. #define NVIC_EN2 0xE000E108 // Interrupt 64-95 Set Enable
  57. #define NVIC_EN3 0xE000E10C // Interrupt 96-127 Set Enable
  58. #define NVIC_EN4 0xE000E110 // Interrupt 128-131 Set Enable
  59. #define NVIC_DIS0 0xE000E180 // Interrupt 0-31 Clear Enable
  60. #define NVIC_DIS1 0xE000E184 // Interrupt 32-54 Clear Enable
  61. #define NVIC_DIS2 0xE000E188 // Interrupt 64-95 Clear Enable
  62. #define NVIC_DIS3 0xE000E18C // Interrupt 96-127 Clear Enable
  63. #define NVIC_DIS4 0xE000E190 // Interrupt 128-131 Clear Enable
  64. #define NVIC_PEND0 0xE000E200 // Interrupt 0-31 Set Pending
  65. #define NVIC_PEND1 0xE000E204 // Interrupt 32-54 Set Pending
  66. #define NVIC_PEND2 0xE000E208 // Interrupt 64-95 Set Pending
  67. #define NVIC_PEND3 0xE000E20C // Interrupt 96-127 Set Pending
  68. #define NVIC_PEND4 0xE000E210 // Interrupt 128-131 Set Pending
  69. #define NVIC_UNPEND0 0xE000E280 // Interrupt 0-31 Clear Pending
  70. #define NVIC_UNPEND1 0xE000E284 // Interrupt 32-54 Clear Pending
  71. #define NVIC_UNPEND2 0xE000E288 // Interrupt 64-95 Clear Pending
  72. #define NVIC_UNPEND3 0xE000E28C // Interrupt 96-127 Clear Pending
  73. #define NVIC_UNPEND4 0xE000E290 // Interrupt 128-131 Clear Pending
  74. #define NVIC_ACTIVE0 0xE000E300 // Interrupt 0-31 Active Bit
  75. #define NVIC_ACTIVE1 0xE000E304 // Interrupt 32-54 Active Bit
  76. #define NVIC_ACTIVE2 0xE000E308 // Interrupt 64-95 Active Bit
  77. #define NVIC_ACTIVE3 0xE000E30C // Interrupt 96-127 Active Bit
  78. #define NVIC_ACTIVE4 0xE000E310 // Interrupt 128-131 Active Bit
  79. #define NVIC_PRI0 0xE000E400 // Interrupt 0-3 Priority
  80. #define NVIC_PRI1 0xE000E404 // Interrupt 4-7 Priority
  81. #define NVIC_PRI2 0xE000E408 // Interrupt 8-11 Priority
  82. #define NVIC_PRI3 0xE000E40C // Interrupt 12-15 Priority
  83. #define NVIC_PRI4 0xE000E410 // Interrupt 16-19 Priority
  84. #define NVIC_PRI5 0xE000E414 // Interrupt 20-23 Priority
  85. #define NVIC_PRI6 0xE000E418 // Interrupt 24-27 Priority
  86. #define NVIC_PRI7 0xE000E41C // Interrupt 28-31 Priority
  87. #define NVIC_PRI8 0xE000E420 // Interrupt 32-35 Priority
  88. #define NVIC_PRI9 0xE000E424 // Interrupt 36-39 Priority
  89. #define NVIC_PRI10 0xE000E428 // Interrupt 40-43 Priority
  90. #define NVIC_PRI11 0xE000E42C // Interrupt 44-47 Priority
  91. #define NVIC_PRI12 0xE000E430 // Interrupt 48-51 Priority
  92. #define NVIC_PRI13 0xE000E434 // Interrupt 52-53 Priority
  93. #define NVIC_PRI14 0xE000E438 // Interrupt 56-59 Priority
  94. #define NVIC_PRI15 0xE000E43C // Interrupt 60-63 Priority
  95. #define NVIC_PRI16 0xE000E440 // Interrupt 64-67 Priority
  96. #define NVIC_PRI17 0xE000E444 // Interrupt 68-71 Priority
  97. #define NVIC_PRI18 0xE000E448 // Interrupt 72-75 Priority
  98. #define NVIC_PRI19 0xE000E44C // Interrupt 76-79 Priority
  99. #define NVIC_PRI20 0xE000E450 // Interrupt 80-83 Priority
  100. #define NVIC_PRI21 0xE000E454 // Interrupt 84-87 Priority
  101. #define NVIC_PRI22 0xE000E458 // Interrupt 88-91 Priority
  102. #define NVIC_PRI23 0xE000E45C // Interrupt 92-95 Priority
  103. #define NVIC_PRI24 0xE000E460 // Interrupt 96-99 Priority
  104. #define NVIC_PRI25 0xE000E464 // Interrupt 100-103 Priority
  105. #define NVIC_PRI26 0xE000E468 // Interrupt 104-107 Priority
  106. #define NVIC_PRI27 0xE000E46C // Interrupt 108-111 Priority
  107. #define NVIC_PRI28 0xE000E470 // Interrupt 112-115 Priority
  108. #define NVIC_PRI29 0xE000E474 // Interrupt 116-119 Priority
  109. #define NVIC_PRI30 0xE000E478 // Interrupt 120-123 Priority
  110. #define NVIC_PRI31 0xE000E47C // Interrupt 124-127 Priority
  111. #define NVIC_PRI32 0xE000E480 // Interrupt 128-131 Priority
  112. #define NVIC_PRI33 0xE000E484 // Interrupt 132-135 Priority
  113. #define NVIC_PRI34 0xE000E488 // Interrupt 136-139 Priority
  114. #define NVIC_PRI35 0xE000E48C // Interrupt 140-143 Priority
  115. #define NVIC_PRI36 0xE000E490 // Interrupt 144-147 Priority
  116. #define NVIC_CPUID 0xE000ED00 // CPU ID Base
  117. #define NVIC_INT_CTRL 0xE000ED04 // Interrupt Control and State
  118. #define NVIC_VTABLE 0xE000ED08 // Vector Table Offset
  119. #define NVIC_APINT 0xE000ED0C // Application Interrupt and Reset
  120. // Control
  121. #define NVIC_SYS_CTRL 0xE000ED10 // System Control
  122. #define NVIC_CFG_CTRL 0xE000ED14 // Configuration and Control
  123. #define NVIC_SYS_PRI1 0xE000ED18 // System Handler Priority 1
  124. #define NVIC_SYS_PRI2 0xE000ED1C // System Handler Priority 2
  125. #define NVIC_SYS_PRI3 0xE000ED20 // System Handler Priority 3
  126. #define NVIC_SYS_HND_CTRL 0xE000ED24 // System Handler Control and State
  127. #define NVIC_FAULT_STAT 0xE000ED28 // Configurable Fault Status
  128. #define NVIC_HFAULT_STAT 0xE000ED2C // Hard Fault Status
  129. #define NVIC_DEBUG_STAT 0xE000ED30 // Debug Status Register
  130. #define NVIC_MM_ADDR 0xE000ED34 // Memory Management Fault Address
  131. #define NVIC_FAULT_ADDR 0xE000ED38 // Bus Fault Address
  132. #define NVIC_MPU_TYPE 0xE000ED90 // MPU Type
  133. #define NVIC_MPU_CTRL 0xE000ED94 // MPU Control
  134. #define NVIC_MPU_NUMBER 0xE000ED98 // MPU Region Number
  135. #define NVIC_MPU_BASE 0xE000ED9C // MPU Region Base Address
  136. #define NVIC_MPU_ATTR 0xE000EDA0 // MPU Region Attribute and Size
  137. #define NVIC_MPU_BASE1 0xE000EDA4 // MPU Region Base Address Alias 1
  138. #define NVIC_MPU_ATTR1 0xE000EDA8 // MPU Region Attribute and Size
  139. // Alias 1
  140. #define NVIC_MPU_BASE2 0xE000EDAC // MPU Region Base Address Alias 2
  141. #define NVIC_MPU_ATTR2 0xE000EDB0 // MPU Region Attribute and Size
  142. // Alias 2
  143. #define NVIC_MPU_BASE3 0xE000EDB4 // MPU Region Base Address Alias 3
  144. #define NVIC_MPU_ATTR3 0xE000EDB8 // MPU Region Attribute and Size
  145. // Alias 3
  146. #define NVIC_DBG_CTRL 0xE000EDF0 // Debug Control and Status Reg
  147. #define NVIC_DBG_XFER 0xE000EDF4 // Debug Core Reg. Transfer Select
  148. #define NVIC_DBG_DATA 0xE000EDF8 // Debug Core Register Data
  149. #define NVIC_DBG_INT 0xE000EDFC // Debug Reset Interrupt Control
  150. #define NVIC_SW_TRIG 0xE000EF00 // Software Trigger Interrupt
  151. //*****************************************************************************
  152. //
  153. // The following are defines for the bit fields in the NVIC_INT_TYPE register.
  154. //
  155. //*****************************************************************************
  156. #define NVIC_INT_TYPE_LINES_M 0x0000001F // Number of interrupt lines (x32)
  157. #define NVIC_INT_TYPE_LINES_S 0
  158. //*****************************************************************************
  159. //
  160. // The following are defines for the bit fields in the NVIC_ACTLR register.
  161. //
  162. //*****************************************************************************
  163. #define NVIC_ACTLR_DISFOLD 0x00000004 // Disable IT Folding
  164. #define NVIC_ACTLR_DISWBUF 0x00000002 // Disable Write Buffer
  165. #define NVIC_ACTLR_DISMCYC 0x00000001 // Disable Interrupts of Multiple
  166. // Cycle Instructions
  167. //*****************************************************************************
  168. //
  169. // The following are defines for the bit fields in the NVIC_ST_CTRL register.
  170. //
  171. //*****************************************************************************
  172. #define NVIC_ST_CTRL_COUNT 0x00010000 // Count Flag
  173. #define NVIC_ST_CTRL_CLK_SRC 0x00000004 // Clock Source
  174. #define NVIC_ST_CTRL_INTEN 0x00000002 // Interrupt Enable
  175. #define NVIC_ST_CTRL_ENABLE 0x00000001 // Enable
  176. //*****************************************************************************
  177. //
  178. // The following are defines for the bit fields in the NVIC_ST_RELOAD register.
  179. //
  180. //*****************************************************************************
  181. #define NVIC_ST_RELOAD_M 0x00FFFFFF // Reload Value
  182. #define NVIC_ST_RELOAD_S 0
  183. //*****************************************************************************
  184. //
  185. // The following are defines for the bit fields in the NVIC_ST_CURRENT
  186. // register.
  187. //
  188. //*****************************************************************************
  189. #define NVIC_ST_CURRENT_M 0x00FFFFFF // Current Value
  190. #define NVIC_ST_CURRENT_S 0
  191. //*****************************************************************************
  192. //
  193. // The following are defines for the bit fields in the NVIC_ST_CAL register.
  194. //
  195. //*****************************************************************************
  196. #define NVIC_ST_CAL_NOREF 0x80000000 // No reference clock
  197. #define NVIC_ST_CAL_SKEW 0x40000000 // Clock skew
  198. #define NVIC_ST_CAL_ONEMS_M 0x00FFFFFF // 1ms reference value
  199. #define NVIC_ST_CAL_ONEMS_S 0
  200. //*****************************************************************************
  201. //
  202. // The following are defines for the bit fields in the NVIC_EN0 register.
  203. //
  204. //*****************************************************************************
  205. #define NVIC_EN0_INT_M 0xFFFFFFFF // Interrupt Enable
  206. #define NVIC_EN0_INT0 0x00000001 // Interrupt 0 enable
  207. #define NVIC_EN0_INT1 0x00000002 // Interrupt 1 enable
  208. #define NVIC_EN0_INT2 0x00000004 // Interrupt 2 enable
  209. #define NVIC_EN0_INT3 0x00000008 // Interrupt 3 enable
  210. #define NVIC_EN0_INT4 0x00000010 // Interrupt 4 enable
  211. #define NVIC_EN0_INT5 0x00000020 // Interrupt 5 enable
  212. #define NVIC_EN0_INT6 0x00000040 // Interrupt 6 enable
  213. #define NVIC_EN0_INT7 0x00000080 // Interrupt 7 enable
  214. #define NVIC_EN0_INT8 0x00000100 // Interrupt 8 enable
  215. #define NVIC_EN0_INT9 0x00000200 // Interrupt 9 enable
  216. #define NVIC_EN0_INT10 0x00000400 // Interrupt 10 enable
  217. #define NVIC_EN0_INT11 0x00000800 // Interrupt 11 enable
  218. #define NVIC_EN0_INT12 0x00001000 // Interrupt 12 enable
  219. #define NVIC_EN0_INT13 0x00002000 // Interrupt 13 enable
  220. #define NVIC_EN0_INT14 0x00004000 // Interrupt 14 enable
  221. #define NVIC_EN0_INT15 0x00008000 // Interrupt 15 enable
  222. #define NVIC_EN0_INT16 0x00010000 // Interrupt 16 enable
  223. #define NVIC_EN0_INT17 0x00020000 // Interrupt 17 enable
  224. #define NVIC_EN0_INT18 0x00040000 // Interrupt 18 enable
  225. #define NVIC_EN0_INT19 0x00080000 // Interrupt 19 enable
  226. #define NVIC_EN0_INT20 0x00100000 // Interrupt 20 enable
  227. #define NVIC_EN0_INT21 0x00200000 // Interrupt 21 enable
  228. #define NVIC_EN0_INT22 0x00400000 // Interrupt 22 enable
  229. #define NVIC_EN0_INT23 0x00800000 // Interrupt 23 enable
  230. #define NVIC_EN0_INT24 0x01000000 // Interrupt 24 enable
  231. #define NVIC_EN0_INT25 0x02000000 // Interrupt 25 enable
  232. #define NVIC_EN0_INT26 0x04000000 // Interrupt 26 enable
  233. #define NVIC_EN0_INT27 0x08000000 // Interrupt 27 enable
  234. #define NVIC_EN0_INT28 0x10000000 // Interrupt 28 enable
  235. #define NVIC_EN0_INT29 0x20000000 // Interrupt 29 enable
  236. #define NVIC_EN0_INT30 0x40000000 // Interrupt 30 enable
  237. #define NVIC_EN0_INT31 0x80000000 // Interrupt 31 enable
  238. //*****************************************************************************
  239. //
  240. // The following are defines for the bit fields in the NVIC_EN1 register.
  241. //
  242. //*****************************************************************************
  243. #define NVIC_EN1_INT_M 0xFFFFFFFF // Interrupt Enable
  244. #define NVIC_EN1_INT32 0x00000001 // Interrupt 32 enable
  245. #define NVIC_EN1_INT33 0x00000002 // Interrupt 33 enable
  246. #define NVIC_EN1_INT34 0x00000004 // Interrupt 34 enable
  247. #define NVIC_EN1_INT35 0x00000008 // Interrupt 35 enable
  248. #define NVIC_EN1_INT36 0x00000010 // Interrupt 36 enable
  249. #define NVIC_EN1_INT37 0x00000020 // Interrupt 37 enable
  250. #define NVIC_EN1_INT38 0x00000040 // Interrupt 38 enable
  251. #define NVIC_EN1_INT39 0x00000080 // Interrupt 39 enable
  252. #define NVIC_EN1_INT40 0x00000100 // Interrupt 40 enable
  253. #define NVIC_EN1_INT41 0x00000200 // Interrupt 41 enable
  254. #define NVIC_EN1_INT42 0x00000400 // Interrupt 42 enable
  255. #define NVIC_EN1_INT43 0x00000800 // Interrupt 43 enable
  256. #define NVIC_EN1_INT44 0x00001000 // Interrupt 44 enable
  257. #define NVIC_EN1_INT45 0x00002000 // Interrupt 45 enable
  258. #define NVIC_EN1_INT46 0x00004000 // Interrupt 46 enable
  259. #define NVIC_EN1_INT47 0x00008000 // Interrupt 47 enable
  260. #define NVIC_EN1_INT48 0x00010000 // Interrupt 48 enable
  261. #define NVIC_EN1_INT49 0x00020000 // Interrupt 49 enable
  262. #define NVIC_EN1_INT50 0x00040000 // Interrupt 50 enable
  263. #define NVIC_EN1_INT51 0x00080000 // Interrupt 51 enable
  264. #define NVIC_EN1_INT52 0x00100000 // Interrupt 52 enable
  265. #define NVIC_EN1_INT53 0x00200000 // Interrupt 53 enable
  266. #define NVIC_EN1_INT54 0x00400000 // Interrupt 54 enable
  267. #define NVIC_EN1_INT55 0x00800000 // Interrupt 55 enable
  268. #define NVIC_EN1_INT56 0x01000000 // Interrupt 56 enable
  269. #define NVIC_EN1_INT57 0x02000000 // Interrupt 57 enable
  270. #define NVIC_EN1_INT58 0x04000000 // Interrupt 58 enable
  271. #define NVIC_EN1_INT59 0x08000000 // Interrupt 59 enable
  272. #define NVIC_EN1_INT60 0x10000000 // Interrupt 60 enable
  273. #define NVIC_EN1_INT61 0x20000000 // Interrupt 61 enable
  274. #define NVIC_EN1_INT62 0x40000000 // Interrupt 62 enable
  275. #define NVIC_EN1_INT63 0x80000000 // Interrupt 63 enable
  276. //*****************************************************************************
  277. //
  278. // The following are defines for the bit fields in the NVIC_EN2 register.
  279. //
  280. //*****************************************************************************
  281. #define NVIC_EN2_INT_M 0xFFFFFFFF // Interrupt Enable
  282. #define NVIC_EN2_INT64 0x00000001 // Interrupt 64 enable
  283. #define NVIC_EN2_INT65 0x00000002 // Interrupt 65 enable
  284. #define NVIC_EN2_INT66 0x00000004 // Interrupt 66 enable
  285. #define NVIC_EN2_INT67 0x00000008 // Interrupt 67 enable
  286. #define NVIC_EN2_INT68 0x00000010 // Interrupt 68 enable
  287. #define NVIC_EN2_INT69 0x00000020 // Interrupt 69 enable
  288. #define NVIC_EN2_INT70 0x00000040 // Interrupt 70 enable
  289. #define NVIC_EN2_INT71 0x00000080 // Interrupt 71 enable
  290. #define NVIC_EN2_INT72 0x00000100 // Interrupt 72 enable
  291. #define NVIC_EN2_INT73 0x00000200 // Interrupt 73 enable
  292. #define NVIC_EN2_INT74 0x00000400 // Interrupt 74 enable
  293. #define NVIC_EN2_INT75 0x00000800 // Interrupt 75 enable
  294. #define NVIC_EN2_INT76 0x00001000 // Interrupt 76 enable
  295. #define NVIC_EN2_INT77 0x00002000 // Interrupt 77 enable
  296. #define NVIC_EN2_INT78 0x00004000 // Interrupt 78 enable
  297. #define NVIC_EN2_INT79 0x00008000 // Interrupt 79 enable
  298. #define NVIC_EN2_INT80 0x00010000 // Interrupt 80 enable
  299. #define NVIC_EN2_INT81 0x00020000 // Interrupt 81 enable
  300. #define NVIC_EN2_INT82 0x00040000 // Interrupt 82 enable
  301. #define NVIC_EN2_INT83 0x00080000 // Interrupt 83 enable
  302. #define NVIC_EN2_INT84 0x00100000 // Interrupt 84 enable
  303. #define NVIC_EN2_INT85 0x00200000 // Interrupt 85 enable
  304. #define NVIC_EN2_INT86 0x00400000 // Interrupt 86 enable
  305. #define NVIC_EN2_INT87 0x00800000 // Interrupt 87 enable
  306. #define NVIC_EN2_INT88 0x01000000 // Interrupt 88 enable
  307. #define NVIC_EN2_INT89 0x02000000 // Interrupt 89 enable
  308. #define NVIC_EN2_INT90 0x04000000 // Interrupt 90 enable
  309. #define NVIC_EN2_INT91 0x08000000 // Interrupt 91 enable
  310. #define NVIC_EN2_INT92 0x10000000 // Interrupt 92 enable
  311. #define NVIC_EN2_INT93 0x20000000 // Interrupt 93 enable
  312. #define NVIC_EN2_INT94 0x40000000 // Interrupt 94 enable
  313. #define NVIC_EN2_INT95 0x80000000 // Interrupt 95 enable
  314. //*****************************************************************************
  315. //
  316. // The following are defines for the bit fields in the NVIC_EN3 register.
  317. //
  318. //*****************************************************************************
  319. #define NVIC_EN3_INT_M 0xFFFFFFFF // Interrupt Enable
  320. #define NVIC_EN3_INT96 0x00000001 // Interrupt 96 enable
  321. #define NVIC_EN3_INT97 0x00000002 // Interrupt 97 enable
  322. #define NVIC_EN3_INT98 0x00000004 // Interrupt 98 enable
  323. #define NVIC_EN3_INT99 0x00000008 // Interrupt 99 enable
  324. #define NVIC_EN3_INT100 0x00000010 // Interrupt 100 enable
  325. #define NVIC_EN3_INT101 0x00000020 // Interrupt 101 enable
  326. #define NVIC_EN3_INT102 0x00000040 // Interrupt 102 enable
  327. #define NVIC_EN3_INT103 0x00000080 // Interrupt 103 enable
  328. #define NVIC_EN3_INT104 0x00000100 // Interrupt 104 enable
  329. #define NVIC_EN3_INT105 0x00000200 // Interrupt 105 enable
  330. #define NVIC_EN3_INT106 0x00000400 // Interrupt 106 enable
  331. #define NVIC_EN3_INT107 0x00000800 // Interrupt 107 enable
  332. #define NVIC_EN3_INT108 0x00001000 // Interrupt 108 enable
  333. #define NVIC_EN3_INT109 0x00002000 // Interrupt 109 enable
  334. #define NVIC_EN3_INT110 0x00004000 // Interrupt 110 enable
  335. #define NVIC_EN3_INT111 0x00008000 // Interrupt 111 enable
  336. #define NVIC_EN3_INT112 0x00010000 // Interrupt 112 enable
  337. #define NVIC_EN3_INT113 0x00020000 // Interrupt 113 enable
  338. #define NVIC_EN3_INT114 0x00040000 // Interrupt 114 enable
  339. #define NVIC_EN3_INT115 0x00080000 // Interrupt 115 enable
  340. #define NVIC_EN3_INT116 0x00100000 // Interrupt 116 enable
  341. #define NVIC_EN3_INT117 0x00200000 // Interrupt 117 enable
  342. #define NVIC_EN3_INT118 0x00400000 // Interrupt 118 enable
  343. #define NVIC_EN3_INT119 0x00800000 // Interrupt 119 enable
  344. #define NVIC_EN3_INT120 0x01000000 // Interrupt 120 enable
  345. #define NVIC_EN3_INT121 0x02000000 // Interrupt 121 enable
  346. #define NVIC_EN3_INT122 0x04000000 // Interrupt 122 enable
  347. #define NVIC_EN3_INT123 0x08000000 // Interrupt 123 enable
  348. #define NVIC_EN3_INT124 0x10000000 // Interrupt 124 enable
  349. #define NVIC_EN3_INT125 0x20000000 // Interrupt 125 enable
  350. #define NVIC_EN3_INT126 0x40000000 // Interrupt 126 enable
  351. #define NVIC_EN3_INT127 0x80000000 // Interrupt 127 enable
  352. //*****************************************************************************
  353. //
  354. // The following are defines for the bit fields in the NVIC_EN4 register.
  355. //
  356. //*****************************************************************************
  357. #define NVIC_EN4_INT_M 0x0000000F // Interrupt Enable
  358. #define NVIC_EN4_INT128 0x00000001 // Interrupt 128 enable
  359. #define NVIC_EN4_INT129 0x00000002 // Interrupt 129 enable
  360. #define NVIC_EN4_INT130 0x00000004 // Interrupt 130 enable
  361. #define NVIC_EN4_INT131 0x00000008 // Interrupt 131 enable
  362. //*****************************************************************************
  363. //
  364. // The following are defines for the bit fields in the NVIC_DIS0 register.
  365. //
  366. //*****************************************************************************
  367. #define NVIC_DIS0_INT_M 0xFFFFFFFF // Interrupt Disable
  368. #define NVIC_DIS0_INT0 0x00000001 // Interrupt 0 disable
  369. #define NVIC_DIS0_INT1 0x00000002 // Interrupt 1 disable
  370. #define NVIC_DIS0_INT2 0x00000004 // Interrupt 2 disable
  371. #define NVIC_DIS0_INT3 0x00000008 // Interrupt 3 disable
  372. #define NVIC_DIS0_INT4 0x00000010 // Interrupt 4 disable
  373. #define NVIC_DIS0_INT5 0x00000020 // Interrupt 5 disable
  374. #define NVIC_DIS0_INT6 0x00000040 // Interrupt 6 disable
  375. #define NVIC_DIS0_INT7 0x00000080 // Interrupt 7 disable
  376. #define NVIC_DIS0_INT8 0x00000100 // Interrupt 8 disable
  377. #define NVIC_DIS0_INT9 0x00000200 // Interrupt 9 disable
  378. #define NVIC_DIS0_INT10 0x00000400 // Interrupt 10 disable
  379. #define NVIC_DIS0_INT11 0x00000800 // Interrupt 11 disable
  380. #define NVIC_DIS0_INT12 0x00001000 // Interrupt 12 disable
  381. #define NVIC_DIS0_INT13 0x00002000 // Interrupt 13 disable
  382. #define NVIC_DIS0_INT14 0x00004000 // Interrupt 14 disable
  383. #define NVIC_DIS0_INT15 0x00008000 // Interrupt 15 disable
  384. #define NVIC_DIS0_INT16 0x00010000 // Interrupt 16 disable
  385. #define NVIC_DIS0_INT17 0x00020000 // Interrupt 17 disable
  386. #define NVIC_DIS0_INT18 0x00040000 // Interrupt 18 disable
  387. #define NVIC_DIS0_INT19 0x00080000 // Interrupt 19 disable
  388. #define NVIC_DIS0_INT20 0x00100000 // Interrupt 20 disable
  389. #define NVIC_DIS0_INT21 0x00200000 // Interrupt 21 disable
  390. #define NVIC_DIS0_INT22 0x00400000 // Interrupt 22 disable
  391. #define NVIC_DIS0_INT23 0x00800000 // Interrupt 23 disable
  392. #define NVIC_DIS0_INT24 0x01000000 // Interrupt 24 disable
  393. #define NVIC_DIS0_INT25 0x02000000 // Interrupt 25 disable
  394. #define NVIC_DIS0_INT26 0x04000000 // Interrupt 26 disable
  395. #define NVIC_DIS0_INT27 0x08000000 // Interrupt 27 disable
  396. #define NVIC_DIS0_INT28 0x10000000 // Interrupt 28 disable
  397. #define NVIC_DIS0_INT29 0x20000000 // Interrupt 29 disable
  398. #define NVIC_DIS0_INT30 0x40000000 // Interrupt 30 disable
  399. #define NVIC_DIS0_INT31 0x80000000 // Interrupt 31 disable
  400. //*****************************************************************************
  401. //
  402. // The following are defines for the bit fields in the NVIC_DIS1 register.
  403. //
  404. //*****************************************************************************
  405. #define NVIC_DIS1_INT_M 0xFFFFFFFF // Interrupt Disable
  406. #define NVIC_DIS1_INT32 0x00000001 // Interrupt 32 disable
  407. #define NVIC_DIS1_INT33 0x00000002 // Interrupt 33 disable
  408. #define NVIC_DIS1_INT34 0x00000004 // Interrupt 34 disable
  409. #define NVIC_DIS1_INT35 0x00000008 // Interrupt 35 disable
  410. #define NVIC_DIS1_INT36 0x00000010 // Interrupt 36 disable
  411. #define NVIC_DIS1_INT37 0x00000020 // Interrupt 37 disable
  412. #define NVIC_DIS1_INT38 0x00000040 // Interrupt 38 disable
  413. #define NVIC_DIS1_INT39 0x00000080 // Interrupt 39 disable
  414. #define NVIC_DIS1_INT40 0x00000100 // Interrupt 40 disable
  415. #define NVIC_DIS1_INT41 0x00000200 // Interrupt 41 disable
  416. #define NVIC_DIS1_INT42 0x00000400 // Interrupt 42 disable
  417. #define NVIC_DIS1_INT43 0x00000800 // Interrupt 43 disable
  418. #define NVIC_DIS1_INT44 0x00001000 // Interrupt 44 disable
  419. #define NVIC_DIS1_INT45 0x00002000 // Interrupt 45 disable
  420. #define NVIC_DIS1_INT46 0x00004000 // Interrupt 46 disable
  421. #define NVIC_DIS1_INT47 0x00008000 // Interrupt 47 disable
  422. #define NVIC_DIS1_INT48 0x00010000 // Interrupt 48 disable
  423. #define NVIC_DIS1_INT49 0x00020000 // Interrupt 49 disable
  424. #define NVIC_DIS1_INT50 0x00040000 // Interrupt 50 disable
  425. #define NVIC_DIS1_INT51 0x00080000 // Interrupt 51 disable
  426. #define NVIC_DIS1_INT52 0x00100000 // Interrupt 52 disable
  427. #define NVIC_DIS1_INT53 0x00200000 // Interrupt 53 disable
  428. #define NVIC_DIS1_INT54 0x00400000 // Interrupt 54 disable
  429. #define NVIC_DIS1_INT55 0x00800000 // Interrupt 55 disable
  430. #define NVIC_DIS1_INT56 0x01000000 // Interrupt 56 disable
  431. #define NVIC_DIS1_INT57 0x02000000 // Interrupt 57 disable
  432. #define NVIC_DIS1_INT58 0x04000000 // Interrupt 58 disable
  433. #define NVIC_DIS1_INT59 0x08000000 // Interrupt 59 disable
  434. #define NVIC_DIS1_INT60 0x10000000 // Interrupt 60 disable
  435. #define NVIC_DIS1_INT61 0x20000000 // Interrupt 61 disable
  436. #define NVIC_DIS1_INT62 0x40000000 // Interrupt 62 disable
  437. #define NVIC_DIS1_INT63 0x80000000 // Interrupt 63 disable
  438. //*****************************************************************************
  439. //
  440. // The following are defines for the bit fields in the NVIC_DIS2 register.
  441. //
  442. //*****************************************************************************
  443. #define NVIC_DIS2_INT_M 0xFFFFFFFF // Interrupt Disable
  444. #define NVIC_DIS2_INT64 0x00000001 // Interrupt 64 disable
  445. #define NVIC_DIS2_INT65 0x00000002 // Interrupt 65 disable
  446. #define NVIC_DIS2_INT66 0x00000004 // Interrupt 66 disable
  447. #define NVIC_DIS2_INT67 0x00000008 // Interrupt 67 disable
  448. #define NVIC_DIS2_INT68 0x00000010 // Interrupt 68 disable
  449. #define NVIC_DIS2_INT69 0x00000020 // Interrupt 69 disable
  450. #define NVIC_DIS2_INT70 0x00000040 // Interrupt 70 disable
  451. #define NVIC_DIS2_INT71 0x00000080 // Interrupt 71 disable
  452. #define NVIC_DIS2_INT72 0x00000100 // Interrupt 72 disable
  453. #define NVIC_DIS2_INT73 0x00000200 // Interrupt 73 disable
  454. #define NVIC_DIS2_INT74 0x00000400 // Interrupt 74 disable
  455. #define NVIC_DIS2_INT75 0x00000800 // Interrupt 75 disable
  456. #define NVIC_DIS2_INT76 0x00001000 // Interrupt 76 disable
  457. #define NVIC_DIS2_INT77 0x00002000 // Interrupt 77 disable
  458. #define NVIC_DIS2_INT78 0x00004000 // Interrupt 78 disable
  459. #define NVIC_DIS2_INT79 0x00008000 // Interrupt 79 disable
  460. #define NVIC_DIS2_INT80 0x00010000 // Interrupt 80 disable
  461. #define NVIC_DIS2_INT81 0x00020000 // Interrupt 81 disable
  462. #define NVIC_DIS2_INT82 0x00040000 // Interrupt 82 disable
  463. #define NVIC_DIS2_INT83 0x00080000 // Interrupt 83 disable
  464. #define NVIC_DIS2_INT84 0x00100000 // Interrupt 84 disable
  465. #define NVIC_DIS2_INT85 0x00200000 // Interrupt 85 disable
  466. #define NVIC_DIS2_INT86 0x00400000 // Interrupt 86 disable
  467. #define NVIC_DIS2_INT87 0x00800000 // Interrupt 87 disable
  468. #define NVIC_DIS2_INT88 0x01000000 // Interrupt 88 disable
  469. #define NVIC_DIS2_INT89 0x02000000 // Interrupt 89 disable
  470. #define NVIC_DIS2_INT90 0x04000000 // Interrupt 90 disable
  471. #define NVIC_DIS2_INT91 0x08000000 // Interrupt 91 disable
  472. #define NVIC_DIS2_INT92 0x10000000 // Interrupt 92 disable
  473. #define NVIC_DIS2_INT93 0x20000000 // Interrupt 93 disable
  474. #define NVIC_DIS2_INT94 0x40000000 // Interrupt 94 disable
  475. #define NVIC_DIS2_INT95 0x80000000 // Interrupt 95 disable
  476. //*****************************************************************************
  477. //
  478. // The following are defines for the bit fields in the NVIC_DIS3 register.
  479. //
  480. //*****************************************************************************
  481. #define NVIC_DIS3_INT_M 0xFFFFFFFF // Interrupt Disable
  482. #define NVIC_DIS3_INT96 0x00000001 // Interrupt 96 disable
  483. #define NVIC_DIS3_INT97 0x00000002 // Interrupt 97 disable
  484. #define NVIC_DIS3_INT98 0x00000004 // Interrupt 98 disable
  485. #define NVIC_DIS3_INT99 0x00000008 // Interrupt 99 disable
  486. #define NVIC_DIS3_INT100 0x00000010 // Interrupt 100 disable
  487. #define NVIC_DIS3_INT101 0x00000020 // Interrupt 101 disable
  488. #define NVIC_DIS3_INT102 0x00000040 // Interrupt 102 disable
  489. #define NVIC_DIS3_INT103 0x00000080 // Interrupt 103 disable
  490. #define NVIC_DIS3_INT104 0x00000100 // Interrupt 104 disable
  491. #define NVIC_DIS3_INT105 0x00000200 // Interrupt 105 disable
  492. #define NVIC_DIS3_INT106 0x00000400 // Interrupt 106 disable
  493. #define NVIC_DIS3_INT107 0x00000800 // Interrupt 107 disable
  494. #define NVIC_DIS3_INT108 0x00001000 // Interrupt 108 disable
  495. #define NVIC_DIS3_INT109 0x00002000 // Interrupt 109 disable
  496. #define NVIC_DIS3_INT110 0x00004000 // Interrupt 110 disable
  497. #define NVIC_DIS3_INT111 0x00008000 // Interrupt 111 disable
  498. #define NVIC_DIS3_INT112 0x00010000 // Interrupt 112 disable
  499. #define NVIC_DIS3_INT113 0x00020000 // Interrupt 113 disable
  500. #define NVIC_DIS3_INT114 0x00040000 // Interrupt 114 disable
  501. #define NVIC_DIS3_INT115 0x00080000 // Interrupt 115 disable
  502. #define NVIC_DIS3_INT116 0x00100000 // Interrupt 116 disable
  503. #define NVIC_DIS3_INT117 0x00200000 // Interrupt 117 disable
  504. #define NVIC_DIS3_INT118 0x00400000 // Interrupt 118 disable
  505. #define NVIC_DIS3_INT119 0x00800000 // Interrupt 119 disable
  506. #define NVIC_DIS3_INT120 0x01000000 // Interrupt 120 disable
  507. #define NVIC_DIS3_INT121 0x02000000 // Interrupt 121 disable
  508. #define NVIC_DIS3_INT122 0x04000000 // Interrupt 122 disable
  509. #define NVIC_DIS3_INT123 0x08000000 // Interrupt 123 disable
  510. #define NVIC_DIS3_INT124 0x10000000 // Interrupt 124 disable
  511. #define NVIC_DIS3_INT125 0x20000000 // Interrupt 125 disable
  512. #define NVIC_DIS3_INT126 0x40000000 // Interrupt 126 disable
  513. #define NVIC_DIS3_INT127 0x80000000 // Interrupt 127 disable
  514. //*****************************************************************************
  515. //
  516. // The following are defines for the bit fields in the NVIC_DIS4 register.
  517. //
  518. //*****************************************************************************
  519. #define NVIC_DIS4_INT_M 0x0000000F // Interrupt Disable
  520. #define NVIC_DIS4_INT128 0x00000001 // Interrupt 128 disable
  521. #define NVIC_DIS4_INT129 0x00000002 // Interrupt 129 disable
  522. #define NVIC_DIS4_INT130 0x00000004 // Interrupt 130 disable
  523. #define NVIC_DIS4_INT131 0x00000008 // Interrupt 131 disable
  524. //*****************************************************************************
  525. //
  526. // The following are defines for the bit fields in the NVIC_PEND0 register.
  527. //
  528. //*****************************************************************************
  529. #define NVIC_PEND0_INT_M 0xFFFFFFFF // Interrupt Set Pending
  530. #define NVIC_PEND0_INT0 0x00000001 // Interrupt 0 pend
  531. #define NVIC_PEND0_INT1 0x00000002 // Interrupt 1 pend
  532. #define NVIC_PEND0_INT2 0x00000004 // Interrupt 2 pend
  533. #define NVIC_PEND0_INT3 0x00000008 // Interrupt 3 pend
  534. #define NVIC_PEND0_INT4 0x00000010 // Interrupt 4 pend
  535. #define NVIC_PEND0_INT5 0x00000020 // Interrupt 5 pend
  536. #define NVIC_PEND0_INT6 0x00000040 // Interrupt 6 pend
  537. #define NVIC_PEND0_INT7 0x00000080 // Interrupt 7 pend
  538. #define NVIC_PEND0_INT8 0x00000100 // Interrupt 8 pend
  539. #define NVIC_PEND0_INT9 0x00000200 // Interrupt 9 pend
  540. #define NVIC_PEND0_INT10 0x00000400 // Interrupt 10 pend
  541. #define NVIC_PEND0_INT11 0x00000800 // Interrupt 11 pend
  542. #define NVIC_PEND0_INT12 0x00001000 // Interrupt 12 pend
  543. #define NVIC_PEND0_INT13 0x00002000 // Interrupt 13 pend
  544. #define NVIC_PEND0_INT14 0x00004000 // Interrupt 14 pend
  545. #define NVIC_PEND0_INT15 0x00008000 // Interrupt 15 pend
  546. #define NVIC_PEND0_INT16 0x00010000 // Interrupt 16 pend
  547. #define NVIC_PEND0_INT17 0x00020000 // Interrupt 17 pend
  548. #define NVIC_PEND0_INT18 0x00040000 // Interrupt 18 pend
  549. #define NVIC_PEND0_INT19 0x00080000 // Interrupt 19 pend
  550. #define NVIC_PEND0_INT20 0x00100000 // Interrupt 20 pend
  551. #define NVIC_PEND0_INT21 0x00200000 // Interrupt 21 pend
  552. #define NVIC_PEND0_INT22 0x00400000 // Interrupt 22 pend
  553. #define NVIC_PEND0_INT23 0x00800000 // Interrupt 23 pend
  554. #define NVIC_PEND0_INT24 0x01000000 // Interrupt 24 pend
  555. #define NVIC_PEND0_INT25 0x02000000 // Interrupt 25 pend
  556. #define NVIC_PEND0_INT26 0x04000000 // Interrupt 26 pend
  557. #define NVIC_PEND0_INT27 0x08000000 // Interrupt 27 pend
  558. #define NVIC_PEND0_INT28 0x10000000 // Interrupt 28 pend
  559. #define NVIC_PEND0_INT29 0x20000000 // Interrupt 29 pend
  560. #define NVIC_PEND0_INT30 0x40000000 // Interrupt 30 pend
  561. #define NVIC_PEND0_INT31 0x80000000 // Interrupt 31 pend
  562. //*****************************************************************************
  563. //
  564. // The following are defines for the bit fields in the NVIC_PEND1 register.
  565. //
  566. //*****************************************************************************
  567. #define NVIC_PEND1_INT_M 0xFFFFFFFF // Interrupt Set Pending
  568. //*****************************************************************************
  569. //
  570. // The following are defines for the bit fields in the NVIC_PEND2 register.
  571. //
  572. //*****************************************************************************
  573. #define NVIC_PEND2_INT_M 0xFFFFFFFF // Interrupt Set Pending
  574. //*****************************************************************************
  575. //
  576. // The following are defines for the bit fields in the NVIC_PEND3 register.
  577. //
  578. //*****************************************************************************
  579. #define NVIC_PEND3_INT_M 0xFFFFFFFF // Interrupt Set Pending
  580. //*****************************************************************************
  581. //
  582. // The following are defines for the bit fields in the NVIC_PEND4 register.
  583. //
  584. //*****************************************************************************
  585. #define NVIC_PEND4_INT_M 0x0000000F // Interrupt Set Pending
  586. //*****************************************************************************
  587. //
  588. // The following are defines for the bit fields in the NVIC_UNPEND0 register.
  589. //
  590. //*****************************************************************************
  591. #define NVIC_UNPEND0_INT_M 0xFFFFFFFF // Interrupt Clear Pending
  592. #define NVIC_UNPEND0_INT0 0x00000001 // Interrupt 0 unpend
  593. #define NVIC_UNPEND0_INT1 0x00000002 // Interrupt 1 unpend
  594. #define NVIC_UNPEND0_INT2 0x00000004 // Interrupt 2 unpend
  595. #define NVIC_UNPEND0_INT3 0x00000008 // Interrupt 3 unpend
  596. #define NVIC_UNPEND0_INT4 0x00000010 // Interrupt 4 unpend
  597. #define NVIC_UNPEND0_INT5 0x00000020 // Interrupt 5 unpend
  598. #define NVIC_UNPEND0_INT6 0x00000040 // Interrupt 6 unpend
  599. #define NVIC_UNPEND0_INT7 0x00000080 // Interrupt 7 unpend
  600. #define NVIC_UNPEND0_INT8 0x00000100 // Interrupt 8 unpend
  601. #define NVIC_UNPEND0_INT9 0x00000200 // Interrupt 9 unpend
  602. #define NVIC_UNPEND0_INT10 0x00000400 // Interrupt 10 unpend
  603. #define NVIC_UNPEND0_INT11 0x00000800 // Interrupt 11 unpend
  604. #define NVIC_UNPEND0_INT12 0x00001000 // Interrupt 12 unpend
  605. #define NVIC_UNPEND0_INT13 0x00002000 // Interrupt 13 unpend
  606. #define NVIC_UNPEND0_INT14 0x00004000 // Interrupt 14 unpend
  607. #define NVIC_UNPEND0_INT15 0x00008000 // Interrupt 15 unpend
  608. #define NVIC_UNPEND0_INT16 0x00010000 // Interrupt 16 unpend
  609. #define NVIC_UNPEND0_INT17 0x00020000 // Interrupt 17 unpend
  610. #define NVIC_UNPEND0_INT18 0x00040000 // Interrupt 18 unpend
  611. #define NVIC_UNPEND0_INT19 0x00080000 // Interrupt 19 unpend
  612. #define NVIC_UNPEND0_INT20 0x00100000 // Interrupt 20 unpend
  613. #define NVIC_UNPEND0_INT21 0x00200000 // Interrupt 21 unpend
  614. #define NVIC_UNPEND0_INT22 0x00400000 // Interrupt 22 unpend
  615. #define NVIC_UNPEND0_INT23 0x00800000 // Interrupt 23 unpend
  616. #define NVIC_UNPEND0_INT24 0x01000000 // Interrupt 24 unpend
  617. #define NVIC_UNPEND0_INT25 0x02000000 // Interrupt 25 unpend
  618. #define NVIC_UNPEND0_INT26 0x04000000 // Interrupt 26 unpend
  619. #define NVIC_UNPEND0_INT27 0x08000000 // Interrupt 27 unpend
  620. #define NVIC_UNPEND0_INT28 0x10000000 // Interrupt 28 unpend
  621. #define NVIC_UNPEND0_INT29 0x20000000 // Interrupt 29 unpend
  622. #define NVIC_UNPEND0_INT30 0x40000000 // Interrupt 30 unpend
  623. #define NVIC_UNPEND0_INT31 0x80000000 // Interrupt 31 unpend
  624. //*****************************************************************************
  625. //
  626. // The following are defines for the bit fields in the NVIC_UNPEND1 register.
  627. //
  628. //*****************************************************************************
  629. #define NVIC_UNPEND1_INT_M 0xFFFFFFFF // Interrupt Clear Pending
  630. //*****************************************************************************
  631. //
  632. // The following are defines for the bit fields in the NVIC_UNPEND2 register.
  633. //
  634. //*****************************************************************************
  635. #define NVIC_UNPEND2_INT_M 0xFFFFFFFF // Interrupt Clear Pending
  636. //*****************************************************************************
  637. //
  638. // The following are defines for the bit fields in the NVIC_UNPEND3 register.
  639. //
  640. //*****************************************************************************
  641. #define NVIC_UNPEND3_INT_M 0xFFFFFFFF // Interrupt Clear Pending
  642. //*****************************************************************************
  643. //
  644. // The following are defines for the bit fields in the NVIC_UNPEND4 register.
  645. //
  646. //*****************************************************************************
  647. #define NVIC_UNPEND4_INT_M 0x0000000F // Interrupt Clear Pending
  648. //*****************************************************************************
  649. //
  650. // The following are defines for the bit fields in the NVIC_ACTIVE0 register.
  651. //
  652. //*****************************************************************************
  653. #define NVIC_ACTIVE0_INT_M 0xFFFFFFFF // Interrupt Active
  654. #define NVIC_ACTIVE0_INT0 0x00000001 // Interrupt 0 active
  655. #define NVIC_ACTIVE0_INT1 0x00000002 // Interrupt 1 active
  656. #define NVIC_ACTIVE0_INT2 0x00000004 // Interrupt 2 active
  657. #define NVIC_ACTIVE0_INT3 0x00000008 // Interrupt 3 active
  658. #define NVIC_ACTIVE0_INT4 0x00000010 // Interrupt 4 active
  659. #define NVIC_ACTIVE0_INT5 0x00000020 // Interrupt 5 active
  660. #define NVIC_ACTIVE0_INT6 0x00000040 // Interrupt 6 active
  661. #define NVIC_ACTIVE0_INT7 0x00000080 // Interrupt 7 active
  662. #define NVIC_ACTIVE0_INT8 0x00000100 // Interrupt 8 active
  663. #define NVIC_ACTIVE0_INT9 0x00000200 // Interrupt 9 active
  664. #define NVIC_ACTIVE0_INT10 0x00000400 // Interrupt 10 active
  665. #define NVIC_ACTIVE0_INT11 0x00000800 // Interrupt 11 active
  666. #define NVIC_ACTIVE0_INT12 0x00001000 // Interrupt 12 active
  667. #define NVIC_ACTIVE0_INT13 0x00002000 // Interrupt 13 active
  668. #define NVIC_ACTIVE0_INT14 0x00004000 // Interrupt 14 active
  669. #define NVIC_ACTIVE0_INT15 0x00008000 // Interrupt 15 active
  670. #define NVIC_ACTIVE0_INT16 0x00010000 // Interrupt 16 active
  671. #define NVIC_ACTIVE0_INT17 0x00020000 // Interrupt 17 active
  672. #define NVIC_ACTIVE0_INT18 0x00040000 // Interrupt 18 active
  673. #define NVIC_ACTIVE0_INT19 0x00080000 // Interrupt 19 active
  674. #define NVIC_ACTIVE0_INT20 0x00100000 // Interrupt 20 active
  675. #define NVIC_ACTIVE0_INT21 0x00200000 // Interrupt 21 active
  676. #define NVIC_ACTIVE0_INT22 0x00400000 // Interrupt 22 active
  677. #define NVIC_ACTIVE0_INT23 0x00800000 // Interrupt 23 active
  678. #define NVIC_ACTIVE0_INT24 0x01000000 // Interrupt 24 active
  679. #define NVIC_ACTIVE0_INT25 0x02000000 // Interrupt 25 active
  680. #define NVIC_ACTIVE0_INT26 0x04000000 // Interrupt 26 active
  681. #define NVIC_ACTIVE0_INT27 0x08000000 // Interrupt 27 active
  682. #define NVIC_ACTIVE0_INT28 0x10000000 // Interrupt 28 active
  683. #define NVIC_ACTIVE0_INT29 0x20000000 // Interrupt 29 active
  684. #define NVIC_ACTIVE0_INT30 0x40000000 // Interrupt 30 active
  685. #define NVIC_ACTIVE0_INT31 0x80000000 // Interrupt 31 active
  686. //*****************************************************************************
  687. //
  688. // The following are defines for the bit fields in the NVIC_ACTIVE1 register.
  689. //
  690. //*****************************************************************************
  691. #define NVIC_ACTIVE1_INT_M 0xFFFFFFFF // Interrupt Active
  692. //*****************************************************************************
  693. //
  694. // The following are defines for the bit fields in the NVIC_ACTIVE2 register.
  695. //
  696. //*****************************************************************************
  697. #define NVIC_ACTIVE2_INT_M 0xFFFFFFFF // Interrupt Active
  698. //*****************************************************************************
  699. //
  700. // The following are defines for the bit fields in the NVIC_ACTIVE3 register.
  701. //
  702. //*****************************************************************************
  703. #define NVIC_ACTIVE3_INT_M 0xFFFFFFFF // Interrupt Active
  704. //*****************************************************************************
  705. //
  706. // The following are defines for the bit fields in the NVIC_ACTIVE4 register.
  707. //
  708. //*****************************************************************************
  709. #define NVIC_ACTIVE4_INT_M 0x0000000F // Interrupt Active
  710. //*****************************************************************************
  711. //
  712. // The following are defines for the bit fields in the NVIC_PRI0 register.
  713. //
  714. //*****************************************************************************
  715. #define NVIC_PRI0_INT3_M 0xE0000000 // Interrupt 3 Priority Mask
  716. #define NVIC_PRI0_INT2_M 0x00E00000 // Interrupt 2 Priority Mask
  717. #define NVIC_PRI0_INT1_M 0x0000E000 // Interrupt 1 Priority Mask
  718. #define NVIC_PRI0_INT0_M 0x000000E0 // Interrupt 0 Priority Mask
  719. #define NVIC_PRI0_INT3_S 29
  720. #define NVIC_PRI0_INT2_S 21
  721. #define NVIC_PRI0_INT1_S 13
  722. #define NVIC_PRI0_INT0_S 5
  723. //*****************************************************************************
  724. //
  725. // The following are defines for the bit fields in the NVIC_PRI1 register.
  726. //
  727. //*****************************************************************************
  728. #define NVIC_PRI1_INT7_M 0xE0000000 // Interrupt 7 Priority Mask
  729. #define NVIC_PRI1_INT6_M 0x00E00000 // Interrupt 6 Priority Mask
  730. #define NVIC_PRI1_INT5_M 0x0000E000 // Interrupt 5 Priority Mask
  731. #define NVIC_PRI1_INT4_M 0x000000E0 // Interrupt 4 Priority Mask
  732. #define NVIC_PRI1_INT7_S 29
  733. #define NVIC_PRI1_INT6_S 21
  734. #define NVIC_PRI1_INT5_S 13
  735. #define NVIC_PRI1_INT4_S 5
  736. //*****************************************************************************
  737. //
  738. // The following are defines for the bit fields in the NVIC_PRI2 register.
  739. //
  740. //*****************************************************************************
  741. #define NVIC_PRI2_INT11_M 0xE0000000 // Interrupt 11 Priority Mask
  742. #define NVIC_PRI2_INT10_M 0x00E00000 // Interrupt 10 Priority Mask
  743. #define NVIC_PRI2_INT9_M 0x0000E000 // Interrupt 9 Priority Mask
  744. #define NVIC_PRI2_INT8_M 0x000000E0 // Interrupt 8 Priority Mask
  745. #define NVIC_PRI2_INT11_S 29
  746. #define NVIC_PRI2_INT10_S 21
  747. #define NVIC_PRI2_INT9_S 13
  748. #define NVIC_PRI2_INT8_S 5
  749. //*****************************************************************************
  750. //
  751. // The following are defines for the bit fields in the NVIC_PRI3 register.
  752. //
  753. //*****************************************************************************
  754. #define NVIC_PRI3_INT15_M 0xE0000000 // Interrupt 15 Priority Mask
  755. #define NVIC_PRI3_INT14_M 0x00E00000 // Interrupt 14 Priority Mask
  756. #define NVIC_PRI3_INT13_M 0x0000E000 // Interrupt 13 Priority Mask
  757. #define NVIC_PRI3_INT12_M 0x000000E0 // Interrupt 12 Priority Mask
  758. #define NVIC_PRI3_INT15_S 29
  759. #define NVIC_PRI3_INT14_S 21
  760. #define NVIC_PRI3_INT13_S 13
  761. #define NVIC_PRI3_INT12_S 5
  762. //*****************************************************************************
  763. //
  764. // The following are defines for the bit fields in the NVIC_PRI4 register.
  765. //
  766. //*****************************************************************************
  767. #define NVIC_PRI4_INT19_M 0xE0000000 // Interrupt 19 Priority Mask
  768. #define NVIC_PRI4_INT18_M 0x00E00000 // Interrupt 18 Priority Mask
  769. #define NVIC_PRI4_INT17_M 0x0000E000 // Interrupt 17 Priority Mask
  770. #define NVIC_PRI4_INT16_M 0x000000E0 // Interrupt 16 Priority Mask
  771. #define NVIC_PRI4_INT19_S 29
  772. #define NVIC_PRI4_INT18_S 21
  773. #define NVIC_PRI4_INT17_S 13
  774. #define NVIC_PRI4_INT16_S 5
  775. //*****************************************************************************
  776. //
  777. // The following are defines for the bit fields in the NVIC_PRI5 register.
  778. //
  779. //*****************************************************************************
  780. #define NVIC_PRI5_INT23_M 0xE0000000 // Interrupt 23 Priority Mask
  781. #define NVIC_PRI5_INT22_M 0x00E00000 // Interrupt 22 Priority Mask
  782. #define NVIC_PRI5_INT21_M 0x0000E000 // Interrupt 21 Priority Mask
  783. #define NVIC_PRI5_INT20_M 0x000000E0 // Interrupt 20 Priority Mask
  784. #define NVIC_PRI5_INT23_S 29
  785. #define NVIC_PRI5_INT22_S 21
  786. #define NVIC_PRI5_INT21_S 13
  787. #define NVIC_PRI5_INT20_S 5
  788. //*****************************************************************************
  789. //
  790. // The following are defines for the bit fields in the NVIC_PRI6 register.
  791. //
  792. //*****************************************************************************
  793. #define NVIC_PRI6_INT27_M 0xE0000000 // Interrupt 27 Priority Mask
  794. #define NVIC_PRI6_INT26_M 0x00E00000 // Interrupt 26 Priority Mask
  795. #define NVIC_PRI6_INT25_M 0x0000E000 // Interrupt 25 Priority Mask
  796. #define NVIC_PRI6_INT24_M 0x000000E0 // Interrupt 24 Priority Mask
  797. #define NVIC_PRI6_INT27_S 29
  798. #define NVIC_PRI6_INT26_S 21
  799. #define NVIC_PRI6_INT25_S 13
  800. #define NVIC_PRI6_INT24_S 5
  801. //*****************************************************************************
  802. //
  803. // The following are defines for the bit fields in the NVIC_PRI7 register.
  804. //
  805. //*****************************************************************************
  806. #define NVIC_PRI7_INT31_M 0xE0000000 // Interrupt 31 Priority Mask
  807. #define NVIC_PRI7_INT30_M 0x00E00000 // Interrupt 30 Priority Mask
  808. #define NVIC_PRI7_INT29_M 0x0000E000 // Interrupt 29 Priority Mask
  809. #define NVIC_PRI7_INT28_M 0x000000E0 // Interrupt 28 Priority Mask
  810. #define NVIC_PRI7_INT31_S 29
  811. #define NVIC_PRI7_INT30_S 21
  812. #define NVIC_PRI7_INT29_S 13
  813. #define NVIC_PRI7_INT28_S 5
  814. //*****************************************************************************
  815. //
  816. // The following are defines for the bit fields in the NVIC_PRI8 register.
  817. //
  818. //*****************************************************************************
  819. #define NVIC_PRI8_INT35_M 0xE0000000 // Interrupt 35 Priority Mask
  820. #define NVIC_PRI8_INT34_M 0x00E00000 // Interrupt 34 Priority Mask
  821. #define NVIC_PRI8_INT33_M 0x0000E000 // Interrupt 33 Priority Mask
  822. #define NVIC_PRI8_INT32_M 0x000000E0 // Interrupt 32 Priority Mask
  823. #define NVIC_PRI8_INT35_S 29
  824. #define NVIC_PRI8_INT34_S 21
  825. #define NVIC_PRI8_INT33_S 13
  826. #define NVIC_PRI8_INT32_S 5
  827. //*****************************************************************************
  828. //
  829. // The following are defines for the bit fields in the NVIC_PRI9 register.
  830. //
  831. //*****************************************************************************
  832. #define NVIC_PRI9_INT39_M 0xE0000000 // Interrupt 39 Priority Mask
  833. #define NVIC_PRI9_INT38_M 0x00E00000 // Interrupt 38 Priority Mask
  834. #define NVIC_PRI9_INT37_M 0x0000E000 // Interrupt 37 Priority Mask
  835. #define NVIC_PRI9_INT36_M 0x000000E0 // Interrupt 36 Priority Mask
  836. #define NVIC_PRI9_INT39_S 29
  837. #define NVIC_PRI9_INT38_S 21
  838. #define NVIC_PRI9_INT37_S 13
  839. #define NVIC_PRI9_INT36_S 5
  840. //*****************************************************************************
  841. //
  842. // The following are defines for the bit fields in the NVIC_PRI10 register.
  843. //
  844. //*****************************************************************************
  845. #define NVIC_PRI10_INT43_M 0xE0000000 // Interrupt 43 Priority Mask
  846. #define NVIC_PRI10_INT42_M 0x00E00000 // Interrupt 42 Priority Mask
  847. #define NVIC_PRI10_INT41_M 0x0000E000 // Interrupt 41 Priority Mask
  848. #define NVIC_PRI10_INT40_M 0x000000E0 // Interrupt 40 Priority Mask
  849. #define NVIC_PRI10_INT43_S 29
  850. #define NVIC_PRI10_INT42_S 21
  851. #define NVIC_PRI10_INT41_S 13
  852. #define NVIC_PRI10_INT40_S 5
  853. //*****************************************************************************
  854. //
  855. // The following are defines for the bit fields in the NVIC_PRI11 register.
  856. //
  857. //*****************************************************************************
  858. #define NVIC_PRI11_INT47_M 0xE0000000 // Interrupt 47 Priority Mask
  859. #define NVIC_PRI11_INT46_M 0x00E00000 // Interrupt 46 Priority Mask
  860. #define NVIC_PRI11_INT45_M 0x0000E000 // Interrupt 45 Priority Mask
  861. #define NVIC_PRI11_INT44_M 0x000000E0 // Interrupt 44 Priority Mask
  862. #define NVIC_PRI11_INT47_S 29
  863. #define NVIC_PRI11_INT46_S 21
  864. #define NVIC_PRI11_INT45_S 13
  865. #define NVIC_PRI11_INT44_S 5
  866. //*****************************************************************************
  867. //
  868. // The following are defines for the bit fields in the NVIC_PRI12 register.
  869. //
  870. //*****************************************************************************
  871. #define NVIC_PRI12_INT51_M 0xE0000000 // Interrupt 51 Priority Mask
  872. #define NVIC_PRI12_INT50_M 0x00E00000 // Interrupt 50 Priority Mask
  873. #define NVIC_PRI12_INT49_M 0x0000E000 // Interrupt 49 Priority Mask
  874. #define NVIC_PRI12_INT48_M 0x000000E0 // Interrupt 48 Priority Mask
  875. #define NVIC_PRI12_INT51_S 29
  876. #define NVIC_PRI12_INT50_S 21
  877. #define NVIC_PRI12_INT49_S 13
  878. #define NVIC_PRI12_INT48_S 5
  879. //*****************************************************************************
  880. //
  881. // The following are defines for the bit fields in the NVIC_PRI13 register.
  882. //
  883. //*****************************************************************************
  884. #define NVIC_PRI13_INT55_M 0xE0000000 // Interrupt 55 Priority Mask
  885. #define NVIC_PRI13_INT54_M 0x00E00000 // Interrupt 54 Priority Mask
  886. #define NVIC_PRI13_INT53_M 0x0000E000 // Interrupt 53 Priority Mask
  887. #define NVIC_PRI13_INT52_M 0x000000E0 // Interrupt 52 Priority Mask
  888. #define NVIC_PRI13_INT55_S 29
  889. #define NVIC_PRI13_INT54_S 21
  890. #define NVIC_PRI13_INT53_S 13
  891. #define NVIC_PRI13_INT52_S 5
  892. //*****************************************************************************
  893. //
  894. // The following are defines for the bit fields in the NVIC_PRI14 register.
  895. //
  896. //*****************************************************************************
  897. #define NVIC_PRI14_INTD_M 0xE0000000 // Interrupt 59 Priority Mask
  898. #define NVIC_PRI14_INTC_M 0x00E00000 // Interrupt 58 Priority Mask
  899. #define NVIC_PRI14_INTB_M 0x0000E000 // Interrupt 57 Priority Mask
  900. #define NVIC_PRI14_INTA_M 0x000000E0 // Interrupt 56 Priority Mask
  901. #define NVIC_PRI14_INTD_S 29
  902. #define NVIC_PRI14_INTC_S 21
  903. #define NVIC_PRI14_INTB_S 13
  904. #define NVIC_PRI14_INTA_S 5
  905. //*****************************************************************************
  906. //
  907. // The following are defines for the bit fields in the NVIC_PRI15 register.
  908. //
  909. //*****************************************************************************
  910. #define NVIC_PRI15_INTD_M 0xE0000000 // Interrupt 63 Priority Mask
  911. #define NVIC_PRI15_INTC_M 0x00E00000 // Interrupt 62 Priority Mask
  912. #define NVIC_PRI15_INTB_M 0x0000E000 // Interrupt 61 Priority Mask
  913. #define NVIC_PRI15_INTA_M 0x000000E0 // Interrupt 60 Priority Mask
  914. #define NVIC_PRI15_INTD_S 29
  915. #define NVIC_PRI15_INTC_S 21
  916. #define NVIC_PRI15_INTB_S 13
  917. #define NVIC_PRI15_INTA_S 5
  918. //*****************************************************************************
  919. //
  920. // The following are defines for the bit fields in the NVIC_PRI16 register.
  921. //
  922. //*****************************************************************************
  923. #define NVIC_PRI16_INTD_M 0xE0000000 // Interrupt 67 Priority Mask
  924. #define NVIC_PRI16_INTC_M 0x00E00000 // Interrupt 66 Priority Mask
  925. #define NVIC_PRI16_INTB_M 0x0000E000 // Interrupt 65 Priority Mask
  926. #define NVIC_PRI16_INTA_M 0x000000E0 // Interrupt 64 Priority Mask
  927. #define NVIC_PRI16_INTD_S 29
  928. #define NVIC_PRI16_INTC_S 21
  929. #define NVIC_PRI16_INTB_S 13
  930. #define NVIC_PRI16_INTA_S 5
  931. //*****************************************************************************
  932. //
  933. // The following are defines for the bit fields in the NVIC_PRI17 register.
  934. //
  935. //*****************************************************************************
  936. #define NVIC_PRI17_INTD_M 0xE0000000 // Interrupt 71 Priority Mask
  937. #define NVIC_PRI17_INTC_M 0x00E00000 // Interrupt 70 Priority Mask
  938. #define NVIC_PRI17_INTB_M 0x0000E000 // Interrupt 69 Priority Mask
  939. #define NVIC_PRI17_INTA_M 0x000000E0 // Interrupt 68 Priority Mask
  940. #define NVIC_PRI17_INTD_S 29
  941. #define NVIC_PRI17_INTC_S 21
  942. #define NVIC_PRI17_INTB_S 13
  943. #define NVIC_PRI17_INTA_S 5
  944. //*****************************************************************************
  945. //
  946. // The following are defines for the bit fields in the NVIC_PRI18 register.
  947. //
  948. //*****************************************************************************
  949. #define NVIC_PRI18_INTD_M 0xE0000000 // Interrupt 75 Priority Mask
  950. #define NVIC_PRI18_INTC_M 0x00E00000 // Interrupt 74 Priority Mask
  951. #define NVIC_PRI18_INTB_M 0x0000E000 // Interrupt 73 Priority Mask
  952. #define NVIC_PRI18_INTA_M 0x000000E0 // Interrupt 72 Priority Mask
  953. #define NVIC_PRI18_INTD_S 29
  954. #define NVIC_PRI18_INTC_S 21
  955. #define NVIC_PRI18_INTB_S 13
  956. #define NVIC_PRI18_INTA_S 5
  957. //*****************************************************************************
  958. //
  959. // The following are defines for the bit fields in the NVIC_PRI19 register.
  960. //
  961. //*****************************************************************************
  962. #define NVIC_PRI19_INTD_M 0xE0000000 // Interrupt 79 Priority Mask
  963. #define NVIC_PRI19_INTC_M 0x00E00000 // Interrupt 78 Priority Mask
  964. #define NVIC_PRI19_INTB_M 0x0000E000 // Interrupt 77 Priority Mask
  965. #define NVIC_PRI19_INTA_M 0x000000E0 // Interrupt 76 Priority Mask
  966. #define NVIC_PRI19_INTD_S 29
  967. #define NVIC_PRI19_INTC_S 21
  968. #define NVIC_PRI19_INTB_S 13
  969. #define NVIC_PRI19_INTA_S 5
  970. //*****************************************************************************
  971. //
  972. // The following are defines for the bit fields in the NVIC_PRI20 register.
  973. //
  974. //*****************************************************************************
  975. #define NVIC_PRI20_INTD_M 0xE0000000 // Interrupt 83 Priority Mask
  976. #define NVIC_PRI20_INTC_M 0x00E00000 // Interrupt 82 Priority Mask
  977. #define NVIC_PRI20_INTB_M 0x0000E000 // Interrupt 81 Priority Mask
  978. #define NVIC_PRI20_INTA_M 0x000000E0 // Interrupt 80 Priority Mask
  979. #define NVIC_PRI20_INTD_S 29
  980. #define NVIC_PRI20_INTC_S 21
  981. #define NVIC_PRI20_INTB_S 13
  982. #define NVIC_PRI20_INTA_S 5
  983. //*****************************************************************************
  984. //
  985. // The following are defines for the bit fields in the NVIC_PRI21 register.
  986. //
  987. //*****************************************************************************
  988. #define NVIC_PRI21_INTD_M 0xE0000000 // Interrupt 87 Priority Mask
  989. #define NVIC_PRI21_INTC_M 0x00E00000 // Interrupt 86 Priority Mask
  990. #define NVIC_PRI21_INTB_M 0x0000E000 // Interrupt 85 Priority Mask
  991. #define NVIC_PRI21_INTA_M 0x000000E0 // Interrupt 84 Priority Mask
  992. #define NVIC_PRI21_INTD_S 29
  993. #define NVIC_PRI21_INTC_S 21
  994. #define NVIC_PRI21_INTB_S 13
  995. #define NVIC_PRI21_INTA_S 5
  996. //*****************************************************************************
  997. //
  998. // The following are defines for the bit fields in the NVIC_PRI22 register.
  999. //
  1000. //*****************************************************************************
  1001. #define NVIC_PRI22_INTD_M 0xE0000000 // Interrupt 91 Priority Mask
  1002. #define NVIC_PRI22_INTC_M 0x00E00000 // Interrupt 90 Priority Mask
  1003. #define NVIC_PRI22_INTB_M 0x0000E000 // Interrupt 89 Priority Mask
  1004. #define NVIC_PRI22_INTA_M 0x000000E0 // Interrupt 88 Priority Mask
  1005. #define NVIC_PRI22_INTD_S 29
  1006. #define NVIC_PRI22_INTC_S 21
  1007. #define NVIC_PRI22_INTB_S 13
  1008. #define NVIC_PRI22_INTA_S 5
  1009. //*****************************************************************************
  1010. //
  1011. // The following are defines for the bit fields in the NVIC_PRI23 register.
  1012. //
  1013. //*****************************************************************************
  1014. #define NVIC_PRI23_INTD_M 0xE0000000 // Interrupt 95 Priority Mask
  1015. #define NVIC_PRI23_INTC_M 0x00E00000 // Interrupt 94 Priority Mask
  1016. #define NVIC_PRI23_INTB_M 0x0000E000 // Interrupt 93 Priority Mask
  1017. #define NVIC_PRI23_INTA_M 0x000000E0 // Interrupt 92 Priority Mask
  1018. #define NVIC_PRI23_INTD_S 29
  1019. #define NVIC_PRI23_INTC_S 21
  1020. #define NVIC_PRI23_INTB_S 13
  1021. #define NVIC_PRI23_INTA_S 5
  1022. //*****************************************************************************
  1023. //
  1024. // The following are defines for the bit fields in the NVIC_PRI24 register.
  1025. //
  1026. //*****************************************************************************
  1027. #define NVIC_PRI24_INTD_M 0xE0000000 // Interrupt 99 Priority Mask
  1028. #define NVIC_PRI24_INTC_M 0x00E00000 // Interrupt 98 Priority Mask
  1029. #define NVIC_PRI24_INTB_M 0x0000E000 // Interrupt 97 Priority Mask
  1030. #define NVIC_PRI24_INTA_M 0x000000E0 // Interrupt 96 Priority Mask
  1031. #define NVIC_PRI24_INTD_S 29
  1032. #define NVIC_PRI24_INTC_S 21
  1033. #define NVIC_PRI24_INTB_S 13
  1034. #define NVIC_PRI24_INTA_S 5
  1035. //*****************************************************************************
  1036. //
  1037. // The following are defines for the bit fields in the NVIC_PRI25 register.
  1038. //
  1039. //*****************************************************************************
  1040. #define NVIC_PRI25_INTD_M 0xE0000000 // Interrupt 103 Priority Mask
  1041. #define NVIC_PRI25_INTC_M 0x00E00000 // Interrupt 102 Priority Mask
  1042. #define NVIC_PRI25_INTB_M 0x0000E000 // Interrupt 101 Priority Mask
  1043. #define NVIC_PRI25_INTA_M 0x000000E0 // Interrupt 100 Priority Mask
  1044. #define NVIC_PRI25_INTD_S 29
  1045. #define NVIC_PRI25_INTC_S 21
  1046. #define NVIC_PRI25_INTB_S 13
  1047. #define NVIC_PRI25_INTA_S 5
  1048. //*****************************************************************************
  1049. //
  1050. // The following are defines for the bit fields in the NVIC_PRI26 register.
  1051. //
  1052. //*****************************************************************************
  1053. #define NVIC_PRI26_INTD_M 0xE0000000 // Interrupt 107 Priority Mask
  1054. #define NVIC_PRI26_INTC_M 0x00E00000 // Interrupt 106 Priority Mask
  1055. #define NVIC_PRI26_INTB_M 0x0000E000 // Interrupt 105 Priority Mask
  1056. #define NVIC_PRI26_INTA_M 0x000000E0 // Interrupt 104 Priority Mask
  1057. #define NVIC_PRI26_INTD_S 29
  1058. #define NVIC_PRI26_INTC_S 21
  1059. #define NVIC_PRI26_INTB_S 13
  1060. #define NVIC_PRI26_INTA_S 5
  1061. //*****************************************************************************
  1062. //
  1063. // The following are defines for the bit fields in the NVIC_PRI27 register.
  1064. //
  1065. //*****************************************************************************
  1066. #define NVIC_PRI27_INTD_M 0xE0000000 // Interrupt 111 Priority Mask
  1067. #define NVIC_PRI27_INTC_M 0x00E00000 // Interrupt 110 Priority Mask
  1068. #define NVIC_PRI27_INTB_M 0x0000E000 // Interrupt 109 Priority Mask
  1069. #define NVIC_PRI27_INTA_M 0x000000E0 // Interrupt 108 Priority Mask
  1070. #define NVIC_PRI27_INTD_S 29
  1071. #define NVIC_PRI27_INTC_S 21
  1072. #define NVIC_PRI27_INTB_S 13
  1073. #define NVIC_PRI27_INTA_S 5
  1074. //*****************************************************************************
  1075. //
  1076. // The following are defines for the bit fields in the NVIC_PRI28 register.
  1077. //
  1078. //*****************************************************************************
  1079. #define NVIC_PRI28_INTD_M 0xE0000000 // Interrupt 115 Priority Mask
  1080. #define NVIC_PRI28_INTC_M 0x00E00000 // Interrupt 114 Priority Mask
  1081. #define NVIC_PRI28_INTB_M 0x0000E000 // Interrupt 113 Priority Mask
  1082. #define NVIC_PRI28_INTA_M 0x000000E0 // Interrupt 112 Priority Mask
  1083. #define NVIC_PRI28_INTD_S 29
  1084. #define NVIC_PRI28_INTC_S 21
  1085. #define NVIC_PRI28_INTB_S 13
  1086. #define NVIC_PRI28_INTA_S 5
  1087. //*****************************************************************************
  1088. //
  1089. // The following are defines for the bit fields in the NVIC_PRI29 register.
  1090. //
  1091. //*****************************************************************************
  1092. #define NVIC_PRI29_INTD_M 0xE0000000 // Interrupt 119 Priority Mask
  1093. #define NVIC_PRI29_INTC_M 0x00E00000 // Interrupt 118 Priority Mask
  1094. #define NVIC_PRI29_INTB_M 0x0000E000 // Interrupt 117 Priority Mask
  1095. #define NVIC_PRI29_INTA_M 0x000000E0 // Interrupt 116 Priority Mask
  1096. #define NVIC_PRI29_INTD_S 29
  1097. #define NVIC_PRI29_INTC_S 21
  1098. #define NVIC_PRI29_INTB_S 13
  1099. #define NVIC_PRI29_INTA_S 5
  1100. //*****************************************************************************
  1101. //
  1102. // The following are defines for the bit fields in the NVIC_PRI30 register.
  1103. //
  1104. //*****************************************************************************
  1105. #define NVIC_PRI30_INTD_M 0xE0000000 // Interrupt 123 Priority Mask
  1106. #define NVIC_PRI30_INTC_M 0x00E00000 // Interrupt 122 Priority Mask
  1107. #define NVIC_PRI30_INTB_M 0x0000E000 // Interrupt 121 Priority Mask
  1108. #define NVIC_PRI30_INTA_M 0x000000E0 // Interrupt 120 Priority Mask
  1109. #define NVIC_PRI30_INTD_S 29
  1110. #define NVIC_PRI30_INTC_S 21
  1111. #define NVIC_PRI30_INTB_S 13
  1112. #define NVIC_PRI30_INTA_S 5
  1113. //*****************************************************************************
  1114. //
  1115. // The following are defines for the bit fields in the NVIC_PRI31 register.
  1116. //
  1117. //*****************************************************************************
  1118. #define NVIC_PRI31_INTD_M 0xE0000000 // Interrupt 127 Priority Mask
  1119. #define NVIC_PRI31_INTC_M 0x00E00000 // Interrupt 126 Priority Mask
  1120. #define NVIC_PRI31_INTB_M 0x0000E000 // Interrupt 125 Priority Mask
  1121. #define NVIC_PRI31_INTA_M 0x000000E0 // Interrupt 124 Priority Mask
  1122. #define NVIC_PRI31_INTD_S 29
  1123. #define NVIC_PRI31_INTC_S 21
  1124. #define NVIC_PRI31_INTB_S 13
  1125. #define NVIC_PRI31_INTA_S 5
  1126. //*****************************************************************************
  1127. //
  1128. // The following are defines for the bit fields in the NVIC_PRI32 register.
  1129. //
  1130. //*****************************************************************************
  1131. #define NVIC_PRI32_INTD_M 0xE0000000 // Interrupt 131 Priority Mask
  1132. #define NVIC_PRI32_INTC_M 0x00E00000 // Interrupt 130 Priority Mask
  1133. #define NVIC_PRI32_INTB_M 0x0000E000 // Interrupt 129 Priority Mask
  1134. #define NVIC_PRI32_INTA_M 0x000000E0 // Interrupt 128 Priority Mask
  1135. #define NVIC_PRI32_INTD_S 29
  1136. #define NVIC_PRI32_INTC_S 21
  1137. #define NVIC_PRI32_INTB_S 13
  1138. #define NVIC_PRI32_INTA_S 5
  1139. //*****************************************************************************
  1140. //
  1141. // The following are defines for the bit fields in the NVIC_PRI33 register.
  1142. //
  1143. //*****************************************************************************
  1144. #define NVIC_PRI33_INTD_M 0xE0000000 // Interrupt 135 Priority Mask
  1145. #define NVIC_PRI33_INTC_M 0x00E00000 // Interrupt 134 Priority Mask
  1146. #define NVIC_PRI33_INTB_M 0x0000E000 // Interrupt 133 Priority Mask
  1147. #define NVIC_PRI33_INTA_M 0x000000E0 // Interrupt 132 Priority Mask
  1148. #define NVIC_PRI33_INTD_S 29
  1149. #define NVIC_PRI33_INTC_S 21
  1150. #define NVIC_PRI33_INTB_S 13
  1151. #define NVIC_PRI33_INTA_S 5
  1152. //*****************************************************************************
  1153. //
  1154. // The following are defines for the bit fields in the NVIC_PRI34 register.
  1155. //
  1156. //*****************************************************************************
  1157. #define NVIC_PRI34_INTD_M 0xE0000000 // Interrupt 139 Priority Mask
  1158. #define NVIC_PRI34_INTC_M 0x00E00000 // Interrupt 138 Priority Mask
  1159. #define NVIC_PRI34_INTB_M 0x0000E000 // Interrupt 137 Priority Mask
  1160. #define NVIC_PRI34_INTA_M 0x000000E0 // Interrupt 136 Priority Mask
  1161. #define NVIC_PRI34_INTD_S 29
  1162. #define NVIC_PRI34_INTC_S 21
  1163. #define NVIC_PRI34_INTB_S 13
  1164. #define NVIC_PRI34_INTA_S 5
  1165. //*****************************************************************************
  1166. //
  1167. // The following are defines for the bit fields in the NVIC_PRI35 register.
  1168. //
  1169. //*****************************************************************************
  1170. #define NVIC_PRI35_INTD_M 0xE0000000 // Interrupt 143 Priority Mask
  1171. #define NVIC_PRI35_INTC_M 0x00E00000 // Interrupt 142 Priority Mask
  1172. #define NVIC_PRI35_INTB_M 0x0000E000 // Interrupt 141 Priority Mask
  1173. #define NVIC_PRI35_INTA_M 0x000000E0 // Interrupt 140 Priority Mask
  1174. #define NVIC_PRI35_INTD_S 29
  1175. #define NVIC_PRI35_INTC_S 21
  1176. #define NVIC_PRI35_INTB_S 13
  1177. #define NVIC_PRI35_INTA_S 5
  1178. //*****************************************************************************
  1179. //
  1180. // The following are defines for the bit fields in the NVIC_PRI36 register.
  1181. //
  1182. //*****************************************************************************
  1183. #define NVIC_PRI36_INTD_M 0xE0000000 // Interrupt 147 Priority Mask
  1184. #define NVIC_PRI36_INTC_M 0x00E00000 // Interrupt 146 Priority Mask
  1185. #define NVIC_PRI36_INTB_M 0x0000E000 // Interrupt 145 Priority Mask
  1186. #define NVIC_PRI36_INTA_M 0x000000E0 // Interrupt 144 Priority Mask
  1187. #define NVIC_PRI36_INTD_S 29
  1188. #define NVIC_PRI36_INTC_S 21
  1189. #define NVIC_PRI36_INTB_S 13
  1190. #define NVIC_PRI36_INTA_S 5
  1191. //*****************************************************************************
  1192. //
  1193. // The following are defines for the bit fields in the NVIC_CPUID register.
  1194. //
  1195. //*****************************************************************************
  1196. #define NVIC_CPUID_IMP_M 0xFF000000 // Implementer Code
  1197. #define NVIC_CPUID_IMP_ARM 0x41000000 // ARM
  1198. #define NVIC_CPUID_VAR_M 0x00F00000 // Variant Number
  1199. #define NVIC_CPUID_CON_M 0x000F0000 // Constant
  1200. #define NVIC_CPUID_PARTNO_M 0x0000FFF0 // Part Number
  1201. #define NVIC_CPUID_PARTNO_CM3 0x0000C230 // Cortex-M3 processor
  1202. #define NVIC_CPUID_PARTNO_CM4 0x0000C240 // Cortex-M4 processor
  1203. #define NVIC_CPUID_REV_M 0x0000000F // Revision Number
  1204. //*****************************************************************************
  1205. //
  1206. // The following are defines for the bit fields in the NVIC_INT_CTRL register.
  1207. //
  1208. //*****************************************************************************
  1209. #define NVIC_INT_CTRL_NMI_SET 0x80000000 // NMI Set Pending
  1210. #define NVIC_INT_CTRL_PEND_SV 0x10000000 // PendSV Set Pending
  1211. #define NVIC_INT_CTRL_UNPEND_SV 0x08000000 // PendSV Clear Pending
  1212. #define NVIC_INT_CTRL_PENDSTSET 0x04000000 // SysTick Set Pending
  1213. #define NVIC_INT_CTRL_PENDSTCLR 0x02000000 // SysTick Clear Pending
  1214. #define NVIC_INT_CTRL_ISR_PRE 0x00800000 // Debug Interrupt Handling
  1215. #define NVIC_INT_CTRL_ISR_PEND 0x00400000 // Interrupt Pending
  1216. #define NVIC_INT_CTRL_VEC_PEN_M 0x0007F000 // Interrupt Pending Vector Number
  1217. #undef NVIC_INT_CTRL_VEC_PEN_M
  1218. #define NVIC_INT_CTRL_VEC_PEN_M 0x000FF000 // Interrupt Pending Vector Number
  1219. #define NVIC_INT_CTRL_VEC_PEN_NMI \
  1220. 0x00002000 // NMI
  1221. #define NVIC_INT_CTRL_VEC_PEN_HARD \
  1222. 0x00003000 // Hard fault
  1223. #define NVIC_INT_CTRL_VEC_PEN_MEM \
  1224. 0x00004000 // Memory management fault
  1225. #define NVIC_INT_CTRL_VEC_PEN_BUS \
  1226. 0x00005000 // Bus fault
  1227. #define NVIC_INT_CTRL_VEC_PEN_USG \
  1228. 0x00006000 // Usage fault
  1229. #define NVIC_INT_CTRL_VEC_PEN_SVC \
  1230. 0x0000B000 // SVCall
  1231. #define NVIC_INT_CTRL_VEC_PEN_PNDSV \
  1232. 0x0000E000 // PendSV
  1233. #define NVIC_INT_CTRL_VEC_PEN_TICK \
  1234. 0x0000F000 // SysTick
  1235. #define NVIC_INT_CTRL_RET_BASE 0x00000800 // Return to Base
  1236. #define NVIC_INT_CTRL_VEC_ACT_M 0x0000007F // Interrupt Pending Vector Number
  1237. #undef NVIC_INT_CTRL_VEC_ACT_M
  1238. #define NVIC_INT_CTRL_VEC_ACT_M 0x000000FF // Interrupt Pending Vector Number
  1239. #define NVIC_INT_CTRL_VEC_PEN_S 12
  1240. #define NVIC_INT_CTRL_VEC_ACT_S 0
  1241. //*****************************************************************************
  1242. //
  1243. // The following are defines for the bit fields in the NVIC_VTABLE register.
  1244. //
  1245. //*****************************************************************************
  1246. #define NVIC_VTABLE_BASE 0x20000000 // Vector Table Base
  1247. #define NVIC_VTABLE_OFFSET_M 0x1FFFFE00 // Vector Table Offset
  1248. #undef NVIC_VTABLE_OFFSET_M
  1249. #define NVIC_VTABLE_OFFSET_M 0x1FFFFC00 // Vector Table Offset
  1250. #define NVIC_VTABLE_OFFSET_S 9
  1251. #undef NVIC_VTABLE_OFFSET_S
  1252. #define NVIC_VTABLE_OFFSET_S 10
  1253. //*****************************************************************************
  1254. //
  1255. // The following are defines for the bit fields in the NVIC_APINT register.
  1256. //
  1257. //*****************************************************************************
  1258. #define NVIC_APINT_VECTKEY_M 0xFFFF0000 // Register Key
  1259. #define NVIC_APINT_VECTKEY 0x05FA0000 // Vector key
  1260. #define NVIC_APINT_ENDIANESS 0x00008000 // Data Endianess
  1261. #define NVIC_APINT_PRIGROUP_M 0x00000700 // Interrupt Priority Grouping
  1262. #define NVIC_APINT_PRIGROUP_7_1 0x00000000 // Priority group 7.1 split
  1263. #define NVIC_APINT_PRIGROUP_6_2 0x00000100 // Priority group 6.2 split
  1264. #define NVIC_APINT_PRIGROUP_5_3 0x00000200 // Priority group 5.3 split
  1265. #define NVIC_APINT_PRIGROUP_4_4 0x00000300 // Priority group 4.4 split
  1266. #define NVIC_APINT_PRIGROUP_3_5 0x00000400 // Priority group 3.5 split
  1267. #define NVIC_APINT_PRIGROUP_2_6 0x00000500 // Priority group 2.6 split
  1268. #define NVIC_APINT_PRIGROUP_1_7 0x00000600 // Priority group 1.7 split
  1269. #define NVIC_APINT_PRIGROUP_0_8 0x00000700 // Priority group 0.8 split
  1270. #define NVIC_APINT_SYSRESETREQ 0x00000004 // System Reset Request
  1271. #define NVIC_APINT_VECT_CLR_ACT 0x00000002 // Clear Active NMI / Fault
  1272. #define NVIC_APINT_VECT_RESET 0x00000001 // System Reset
  1273. //*****************************************************************************
  1274. //
  1275. // The following are defines for the bit fields in the NVIC_SYS_CTRL register.
  1276. //
  1277. //*****************************************************************************
  1278. #define NVIC_SYS_CTRL_SEVONPEND 0x00000010 // Wake Up on Pending
  1279. #define NVIC_SYS_CTRL_SLEEPDEEP 0x00000004 // Deep Sleep Enable
  1280. #define NVIC_SYS_CTRL_SLEEPEXIT 0x00000002 // Sleep on ISR Exit
  1281. //*****************************************************************************
  1282. //
  1283. // The following are defines for the bit fields in the NVIC_CFG_CTRL register.
  1284. //
  1285. //*****************************************************************************
  1286. #define NVIC_CFG_CTRL_STKALIGN 0x00000200 // Stack Alignment on Exception
  1287. // Entry
  1288. #define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100 // Ignore Bus Fault in NMI and
  1289. // Fault
  1290. #define NVIC_CFG_CTRL_DIV0 0x00000010 // Trap on Divide by 0
  1291. #define NVIC_CFG_CTRL_UNALIGNED 0x00000008 // Trap on Unaligned Access
  1292. #define NVIC_CFG_CTRL_MAIN_PEND 0x00000002 // Allow Main Interrupt Trigger
  1293. #define NVIC_CFG_CTRL_BASE_THR 0x00000001 // Thread State Control
  1294. //*****************************************************************************
  1295. //
  1296. // The following are defines for the bit fields in the NVIC_SYS_PRI1 register.
  1297. //
  1298. //*****************************************************************************
  1299. #define NVIC_SYS_PRI1_USAGE_M 0x00E00000 // Usage Fault Priority
  1300. #define NVIC_SYS_PRI1_BUS_M 0x0000E000 // Bus Fault Priority
  1301. #define NVIC_SYS_PRI1_MEM_M 0x000000E0 // Memory Management Fault Priority
  1302. #define NVIC_SYS_PRI1_USAGE_S 21
  1303. #define NVIC_SYS_PRI1_BUS_S 13
  1304. #define NVIC_SYS_PRI1_MEM_S 5
  1305. //*****************************************************************************
  1306. //
  1307. // The following are defines for the bit fields in the NVIC_SYS_PRI2 register.
  1308. //
  1309. //*****************************************************************************
  1310. #define NVIC_SYS_PRI2_SVC_M 0xE0000000 // SVCall Priority
  1311. #define NVIC_SYS_PRI2_SVC_S 29
  1312. //*****************************************************************************
  1313. //
  1314. // The following are defines for the bit fields in the NVIC_SYS_PRI3 register.
  1315. //
  1316. //*****************************************************************************
  1317. #define NVIC_SYS_PRI3_TICK_M 0xE0000000 // SysTick Exception Priority
  1318. #define NVIC_SYS_PRI3_PENDSV_M 0x00E00000 // PendSV Priority
  1319. #define NVIC_SYS_PRI3_DEBUG_M 0x000000E0 // Debug Priority
  1320. #define NVIC_SYS_PRI3_TICK_S 29
  1321. #define NVIC_SYS_PRI3_PENDSV_S 21
  1322. #define NVIC_SYS_PRI3_DEBUG_S 5
  1323. //*****************************************************************************
  1324. //
  1325. // The following are defines for the bit fields in the NVIC_SYS_HND_CTRL
  1326. // register.
  1327. //
  1328. //*****************************************************************************
  1329. #define NVIC_SYS_HND_CTRL_USAGE 0x00040000 // Usage Fault Enable
  1330. #define NVIC_SYS_HND_CTRL_BUS 0x00020000 // Bus Fault Enable
  1331. #define NVIC_SYS_HND_CTRL_MEM 0x00010000 // Memory Management Fault Enable
  1332. #define NVIC_SYS_HND_CTRL_SVC 0x00008000 // SVC Call Pending
  1333. #define NVIC_SYS_HND_CTRL_BUSP 0x00004000 // Bus Fault Pending
  1334. #define NVIC_SYS_HND_CTRL_MEMP 0x00002000 // Memory Management Fault Pending
  1335. #define NVIC_SYS_HND_CTRL_USAGEP \
  1336. 0x00001000 // Usage Fault Pending
  1337. #define NVIC_SYS_HND_CTRL_TICK 0x00000800 // SysTick Exception Active
  1338. #define NVIC_SYS_HND_CTRL_PNDSV 0x00000400 // PendSV Exception Active
  1339. #define NVIC_SYS_HND_CTRL_MON 0x00000100 // Debug Monitor Active
  1340. #define NVIC_SYS_HND_CTRL_SVCA 0x00000080 // SVC Call Active
  1341. #define NVIC_SYS_HND_CTRL_USGA 0x00000008 // Usage Fault Active
  1342. #define NVIC_SYS_HND_CTRL_BUSA 0x00000002 // Bus Fault Active
  1343. #define NVIC_SYS_HND_CTRL_MEMA 0x00000001 // Memory Management Fault Active
  1344. //*****************************************************************************
  1345. //
  1346. // The following are defines for the bit fields in the NVIC_FAULT_STAT
  1347. // register.
  1348. //
  1349. //*****************************************************************************
  1350. #define NVIC_FAULT_STAT_DIV0 0x02000000 // Divide-by-Zero Usage Fault
  1351. #define NVIC_FAULT_STAT_UNALIGN 0x01000000 // Unaligned Access Usage Fault
  1352. #define NVIC_FAULT_STAT_NOCP 0x00080000 // No Coprocessor Usage Fault
  1353. #define NVIC_FAULT_STAT_INVPC 0x00040000 // Invalid PC Load Usage Fault
  1354. #define NVIC_FAULT_STAT_INVSTAT 0x00020000 // Invalid State Usage Fault
  1355. #define NVIC_FAULT_STAT_UNDEF 0x00010000 // Undefined Instruction Usage
  1356. // Fault
  1357. #define NVIC_FAULT_STAT_BFARV 0x00008000 // Bus Fault Address Register Valid
  1358. #define NVIC_FAULT_STAT_BLSPERR 0x00002000 // Bus Fault on Floating-Point Lazy
  1359. // State Preservation
  1360. #define NVIC_FAULT_STAT_BSTKE 0x00001000 // Stack Bus Fault
  1361. #define NVIC_FAULT_STAT_BUSTKE 0x00000800 // Unstack Bus Fault
  1362. #define NVIC_FAULT_STAT_IMPRE 0x00000400 // Imprecise Data Bus Error
  1363. #define NVIC_FAULT_STAT_PRECISE 0x00000200 // Precise Data Bus Error
  1364. #define NVIC_FAULT_STAT_IBUS 0x00000100 // Instruction Bus Error
  1365. #define NVIC_FAULT_STAT_MMARV 0x00000080 // Memory Management Fault Address
  1366. // Register Valid
  1367. #define NVIC_FAULT_STAT_MLSPERR 0x00000020 // Memory Management Fault on
  1368. // Floating-Point Lazy State
  1369. // Preservation
  1370. #define NVIC_FAULT_STAT_MSTKE 0x00000010 // Stack Access Violation
  1371. #define NVIC_FAULT_STAT_MUSTKE 0x00000008 // Unstack Access Violation
  1372. #define NVIC_FAULT_STAT_DERR 0x00000002 // Data Access Violation
  1373. #define NVIC_FAULT_STAT_IERR 0x00000001 // Instruction Access Violation
  1374. //*****************************************************************************
  1375. //
  1376. // The following are defines for the bit fields in the NVIC_HFAULT_STAT
  1377. // register.
  1378. //
  1379. //*****************************************************************************
  1380. #define NVIC_HFAULT_STAT_DBG 0x80000000 // Debug Event
  1381. #define NVIC_HFAULT_STAT_FORCED 0x40000000 // Forced Hard Fault
  1382. #define NVIC_HFAULT_STAT_VECT 0x00000002 // Vector Table Read Fault
  1383. //*****************************************************************************
  1384. //
  1385. // The following are defines for the bit fields in the NVIC_DEBUG_STAT
  1386. // register.
  1387. //
  1388. //*****************************************************************************
  1389. #define NVIC_DEBUG_STAT_EXTRNL 0x00000010 // EDBGRQ asserted
  1390. #define NVIC_DEBUG_STAT_VCATCH 0x00000008 // Vector catch
  1391. #define NVIC_DEBUG_STAT_DWTTRAP 0x00000004 // DWT match
  1392. #define NVIC_DEBUG_STAT_BKPT 0x00000002 // Breakpoint instruction
  1393. #define NVIC_DEBUG_STAT_HALTED 0x00000001 // Halt request
  1394. //*****************************************************************************
  1395. //
  1396. // The following are defines for the bit fields in the NVIC_MM_ADDR register.
  1397. //
  1398. //*****************************************************************************
  1399. #define NVIC_MM_ADDR_M 0xFFFFFFFF // Fault Address
  1400. #define NVIC_MM_ADDR_S 0
  1401. //*****************************************************************************
  1402. //
  1403. // The following are defines for the bit fields in the NVIC_FAULT_ADDR
  1404. // register.
  1405. //
  1406. //*****************************************************************************
  1407. #define NVIC_FAULT_ADDR_M 0xFFFFFFFF // Fault Address
  1408. #define NVIC_FAULT_ADDR_S 0
  1409. //*****************************************************************************
  1410. //
  1411. // The following are defines for the bit fields in the NVIC_MPU_TYPE register.
  1412. //
  1413. //*****************************************************************************
  1414. #define NVIC_MPU_TYPE_IREGION_M 0x00FF0000 // Number of I Regions
  1415. #define NVIC_MPU_TYPE_DREGION_M 0x0000FF00 // Number of D Regions
  1416. #define NVIC_MPU_TYPE_SEPARATE 0x00000001 // Separate or Unified MPU
  1417. #define NVIC_MPU_TYPE_IREGION_S 16
  1418. #define NVIC_MPU_TYPE_DREGION_S 8
  1419. //*****************************************************************************
  1420. //
  1421. // The following are defines for the bit fields in the NVIC_MPU_CTRL register.
  1422. //
  1423. //*****************************************************************************
  1424. #define NVIC_MPU_CTRL_PRIVDEFEN 0x00000004 // MPU Default Region
  1425. #define NVIC_MPU_CTRL_HFNMIENA 0x00000002 // MPU Enabled During Faults
  1426. #define NVIC_MPU_CTRL_ENABLE 0x00000001 // MPU Enable
  1427. //*****************************************************************************
  1428. //
  1429. // The following are defines for the bit fields in the NVIC_MPU_NUMBER
  1430. // register.
  1431. //
  1432. //*****************************************************************************
  1433. #define NVIC_MPU_NUMBER_M 0x00000007 // MPU Region to Access
  1434. #define NVIC_MPU_NUMBER_S 0
  1435. //*****************************************************************************
  1436. //
  1437. // The following are defines for the bit fields in the NVIC_MPU_BASE register.
  1438. //
  1439. //*****************************************************************************
  1440. #define NVIC_MPU_BASE_ADDR_M 0xFFFFFFE0 // Base Address Mask
  1441. #define NVIC_MPU_BASE_VALID 0x00000010 // Region Number Valid
  1442. #define NVIC_MPU_BASE_REGION_M 0x00000007 // Region Number
  1443. #define NVIC_MPU_BASE_ADDR_S 5
  1444. #define NVIC_MPU_BASE_REGION_S 0
  1445. //*****************************************************************************
  1446. //
  1447. // The following are defines for the bit fields in the NVIC_MPU_ATTR register.
  1448. //
  1449. //*****************************************************************************
  1450. #define NVIC_MPU_ATTR_M 0xFFFF0000 // Attributes
  1451. #define NVIC_MPU_ATTR_XN 0x10000000 // Instruction Access Disable
  1452. #define NVIC_MPU_ATTR_AP_M 0x07000000 // Access Privilege
  1453. #define NVIC_MPU_ATTR_AP_NO_NO 0x00000000 // prv: no access, usr: no access
  1454. #define NVIC_MPU_ATTR_AP_RW_NO 0x01000000 // prv: rw, usr: none
  1455. #define NVIC_MPU_ATTR_AP_RW_RO 0x02000000 // prv: rw, usr: read-only
  1456. #define NVIC_MPU_ATTR_AP_RW_RW 0x03000000 // prv: rw, usr: rw
  1457. #define NVIC_MPU_ATTR_AP_RO_NO 0x05000000 // prv: ro, usr: none
  1458. #define NVIC_MPU_ATTR_AP_RO_RO 0x06000000 // prv: ro, usr: ro
  1459. #define NVIC_MPU_ATTR_TEX_M 0x00380000 // Type Extension Mask
  1460. #define NVIC_MPU_ATTR_SHAREABLE 0x00040000 // Shareable
  1461. #define NVIC_MPU_ATTR_CACHEABLE 0x00020000 // Cacheable
  1462. #define NVIC_MPU_ATTR_BUFFRABLE 0x00010000 // Bufferable
  1463. #define NVIC_MPU_ATTR_SRD_M 0x0000FF00 // Subregion Disable Bits
  1464. #define NVIC_MPU_ATTR_SRD_0 0x00000100 // Sub-region 0 disable
  1465. #define NVIC_MPU_ATTR_SRD_1 0x00000200 // Sub-region 1 disable
  1466. #define NVIC_MPU_ATTR_SRD_2 0x00000400 // Sub-region 2 disable
  1467. #define NVIC_MPU_ATTR_SRD_3 0x00000800 // Sub-region 3 disable
  1468. #define NVIC_MPU_ATTR_SRD_4 0x00001000 // Sub-region 4 disable
  1469. #define NVIC_MPU_ATTR_SRD_5 0x00002000 // Sub-region 5 disable
  1470. #define NVIC_MPU_ATTR_SRD_6 0x00004000 // Sub-region 6 disable
  1471. #define NVIC_MPU_ATTR_SRD_7 0x00008000 // Sub-region 7 disable
  1472. #define NVIC_MPU_ATTR_SIZE_M 0x0000003E // Region Size Mask
  1473. #define NVIC_MPU_ATTR_SIZE_32B 0x00000008 // Region size 32 bytes
  1474. #define NVIC_MPU_ATTR_SIZE_64B 0x0000000A // Region size 64 bytes
  1475. #define NVIC_MPU_ATTR_SIZE_128B 0x0000000C // Region size 128 bytes
  1476. #define NVIC_MPU_ATTR_SIZE_256B 0x0000000E // Region size 256 bytes
  1477. #define NVIC_MPU_ATTR_SIZE_512B 0x00000010 // Region size 512 bytes
  1478. #define NVIC_MPU_ATTR_SIZE_1K 0x00000012 // Region size 1 Kbytes
  1479. #define NVIC_MPU_ATTR_SIZE_2K 0x00000014 // Region size 2 Kbytes
  1480. #define NVIC_MPU_ATTR_SIZE_4K 0x00000016 // Region size 4 Kbytes
  1481. #define NVIC_MPU_ATTR_SIZE_8K 0x00000018 // Region size 8 Kbytes
  1482. #define NVIC_MPU_ATTR_SIZE_16K 0x0000001A // Region size 16 Kbytes
  1483. #define NVIC_MPU_ATTR_SIZE_32K 0x0000001C // Region size 32 Kbytes
  1484. #define NVIC_MPU_ATTR_SIZE_64K 0x0000001E // Region size 64 Kbytes
  1485. #define NVIC_MPU_ATTR_SIZE_128K 0x00000020 // Region size 128 Kbytes
  1486. #define NVIC_MPU_ATTR_SIZE_256K 0x00000022 // Region size 256 Kbytes
  1487. #define NVIC_MPU_ATTR_SIZE_512K 0x00000024 // Region size 512 Kbytes
  1488. #define NVIC_MPU_ATTR_SIZE_1M 0x00000026 // Region size 1 Mbytes
  1489. #define NVIC_MPU_ATTR_SIZE_2M 0x00000028 // Region size 2 Mbytes
  1490. #define NVIC_MPU_ATTR_SIZE_4M 0x0000002A // Region size 4 Mbytes
  1491. #define NVIC_MPU_ATTR_SIZE_8M 0x0000002C // Region size 8 Mbytes
  1492. #define NVIC_MPU_ATTR_SIZE_16M 0x0000002E // Region size 16 Mbytes
  1493. #define NVIC_MPU_ATTR_SIZE_32M 0x00000030 // Region size 32 Mbytes
  1494. #define NVIC_MPU_ATTR_SIZE_64M 0x00000032 // Region size 64 Mbytes
  1495. #define NVIC_MPU_ATTR_SIZE_128M 0x00000034 // Region size 128 Mbytes
  1496. #define NVIC_MPU_ATTR_SIZE_256M 0x00000036 // Region size 256 Mbytes
  1497. #define NVIC_MPU_ATTR_SIZE_512M 0x00000038 // Region size 512 Mbytes
  1498. #define NVIC_MPU_ATTR_SIZE_1G 0x0000003A // Region size 1 Gbytes
  1499. #define NVIC_MPU_ATTR_SIZE_2G 0x0000003C // Region size 2 Gbytes
  1500. #define NVIC_MPU_ATTR_SIZE_4G 0x0000003E // Region size 4 Gbytes
  1501. #define NVIC_MPU_ATTR_ENABLE 0x00000001 // Region Enable
  1502. //*****************************************************************************
  1503. //
  1504. // The following are defines for the bit fields in the NVIC_MPU_BASE1 register.
  1505. //
  1506. //*****************************************************************************
  1507. #define NVIC_MPU_BASE1_ADDR_M 0xFFFFFFE0 // Base Address Mask
  1508. #define NVIC_MPU_BASE1_VALID 0x00000010 // Region Number Valid
  1509. #define NVIC_MPU_BASE1_REGION_M 0x00000007 // Region Number
  1510. #define NVIC_MPU_BASE1_ADDR_S 5
  1511. #define NVIC_MPU_BASE1_REGION_S 0
  1512. //*****************************************************************************
  1513. //
  1514. // The following are defines for the bit fields in the NVIC_MPU_ATTR1 register.
  1515. //
  1516. //*****************************************************************************
  1517. #define NVIC_MPU_ATTR1_XN 0x10000000 // Instruction Access Disable
  1518. #define NVIC_MPU_ATTR1_AP_M 0x07000000 // Access Privilege
  1519. #define NVIC_MPU_ATTR1_TEX_M 0x00380000 // Type Extension Mask
  1520. #define NVIC_MPU_ATTR1_SHAREABLE \
  1521. 0x00040000 // Shareable
  1522. #define NVIC_MPU_ATTR1_CACHEABLE \
  1523. 0x00020000 // Cacheable
  1524. #define NVIC_MPU_ATTR1_BUFFRABLE \
  1525. 0x00010000 // Bufferable
  1526. #define NVIC_MPU_ATTR1_SRD_M 0x0000FF00 // Subregion Disable Bits
  1527. #define NVIC_MPU_ATTR1_SIZE_M 0x0000003E // Region Size Mask
  1528. #define NVIC_MPU_ATTR1_ENABLE 0x00000001 // Region Enable
  1529. //*****************************************************************************
  1530. //
  1531. // The following are defines for the bit fields in the NVIC_MPU_BASE2 register.
  1532. //
  1533. //*****************************************************************************
  1534. #define NVIC_MPU_BASE2_ADDR_M 0xFFFFFFE0 // Base Address Mask
  1535. #define NVIC_MPU_BASE2_VALID 0x00000010 // Region Number Valid
  1536. #define NVIC_MPU_BASE2_REGION_M 0x00000007 // Region Number
  1537. #define NVIC_MPU_BASE2_ADDR_S 5
  1538. #define NVIC_MPU_BASE2_REGION_S 0
  1539. //*****************************************************************************
  1540. //
  1541. // The following are defines for the bit fields in the NVIC_MPU_ATTR2 register.
  1542. //
  1543. //*****************************************************************************
  1544. #define NVIC_MPU_ATTR2_XN 0x10000000 // Instruction Access Disable
  1545. #define NVIC_MPU_ATTR2_AP_M 0x07000000 // Access Privilege
  1546. #define NVIC_MPU_ATTR2_TEX_M 0x00380000 // Type Extension Mask
  1547. #define NVIC_MPU_ATTR2_SHAREABLE \
  1548. 0x00040000 // Shareable
  1549. #define NVIC_MPU_ATTR2_CACHEABLE \
  1550. 0x00020000 // Cacheable
  1551. #define NVIC_MPU_ATTR2_BUFFRABLE \
  1552. 0x00010000 // Bufferable
  1553. #define NVIC_MPU_ATTR2_SRD_M 0x0000FF00 // Subregion Disable Bits
  1554. #define NVIC_MPU_ATTR2_SIZE_M 0x0000003E // Region Size Mask
  1555. #define NVIC_MPU_ATTR2_ENABLE 0x00000001 // Region Enable
  1556. //*****************************************************************************
  1557. //
  1558. // The following are defines for the bit fields in the NVIC_MPU_BASE3 register.
  1559. //
  1560. //*****************************************************************************
  1561. #define NVIC_MPU_BASE3_ADDR_M 0xFFFFFFE0 // Base Address Mask
  1562. #define NVIC_MPU_BASE3_VALID 0x00000010 // Region Number Valid
  1563. #define NVIC_MPU_BASE3_REGION_M 0x00000007 // Region Number
  1564. #define NVIC_MPU_BASE3_ADDR_S 5
  1565. #define NVIC_MPU_BASE3_REGION_S 0
  1566. //*****************************************************************************
  1567. //
  1568. // The following are defines for the bit fields in the NVIC_MPU_ATTR3 register.
  1569. //
  1570. //*****************************************************************************
  1571. #define NVIC_MPU_ATTR3_XN 0x10000000 // Instruction Access Disable
  1572. #define NVIC_MPU_ATTR3_AP_M 0x07000000 // Access Privilege
  1573. #define NVIC_MPU_ATTR3_TEX_M 0x00380000 // Type Extension Mask
  1574. #define NVIC_MPU_ATTR3_SHAREABLE \
  1575. 0x00040000 // Shareable
  1576. #define NVIC_MPU_ATTR3_CACHEABLE \
  1577. 0x00020000 // Cacheable
  1578. #define NVIC_MPU_ATTR3_BUFFRABLE \
  1579. 0x00010000 // Bufferable
  1580. #define NVIC_MPU_ATTR3_SRD_M 0x0000FF00 // Subregion Disable Bits
  1581. #define NVIC_MPU_ATTR3_SIZE_M 0x0000003E // Region Size Mask
  1582. #define NVIC_MPU_ATTR3_ENABLE 0x00000001 // Region Enable
  1583. //*****************************************************************************
  1584. //
  1585. // The following are defines for the bit fields in the NVIC_DBG_CTRL register.
  1586. //
  1587. //*****************************************************************************
  1588. #define NVIC_DBG_CTRL_DBGKEY_M 0xFFFF0000 // Debug key mask
  1589. #define NVIC_DBG_CTRL_DBGKEY 0xA05F0000 // Debug key
  1590. #define NVIC_DBG_CTRL_S_RESET_ST \
  1591. 0x02000000 // Core has reset since last read
  1592. #define NVIC_DBG_CTRL_S_RETIRE_ST \
  1593. 0x01000000 // Core has executed insruction
  1594. // since last read
  1595. #define NVIC_DBG_CTRL_S_LOCKUP 0x00080000 // Core is locked up
  1596. #define NVIC_DBG_CTRL_S_SLEEP 0x00040000 // Core is sleeping
  1597. #define NVIC_DBG_CTRL_S_HALT 0x00020000 // Core status on halt
  1598. #define NVIC_DBG_CTRL_S_REGRDY 0x00010000 // Register read/write available
  1599. #define NVIC_DBG_CTRL_C_SNAPSTALL \
  1600. 0x00000020 // Breaks a stalled load/store
  1601. #define NVIC_DBG_CTRL_C_MASKINT 0x00000008 // Mask interrupts when stepping
  1602. #define NVIC_DBG_CTRL_C_STEP 0x00000004 // Step the core
  1603. #define NVIC_DBG_CTRL_C_HALT 0x00000002 // Halt the core
  1604. #define NVIC_DBG_CTRL_C_DEBUGEN 0x00000001 // Enable debug
  1605. //*****************************************************************************
  1606. //
  1607. // The following are defines for the bit fields in the NVIC_DBG_XFER register.
  1608. //
  1609. //*****************************************************************************
  1610. #define NVIC_DBG_XFER_REG_WNR 0x00010000 // Write or not read
  1611. #define NVIC_DBG_XFER_REG_SEL_M 0x0000001F // Register
  1612. #define NVIC_DBG_XFER_REG_R0 0x00000000 // Register R0
  1613. #define NVIC_DBG_XFER_REG_R1 0x00000001 // Register R1
  1614. #define NVIC_DBG_XFER_REG_R2 0x00000002 // Register R2
  1615. #define NVIC_DBG_XFER_REG_R3 0x00000003 // Register R3
  1616. #define NVIC_DBG_XFER_REG_R4 0x00000004 // Register R4
  1617. #define NVIC_DBG_XFER_REG_R5 0x00000005 // Register R5
  1618. #define NVIC_DBG_XFER_REG_R6 0x00000006 // Register R6
  1619. #define NVIC_DBG_XFER_REG_R7 0x00000007 // Register R7
  1620. #define NVIC_DBG_XFER_REG_R8 0x00000008 // Register R8
  1621. #define NVIC_DBG_XFER_REG_R9 0x00000009 // Register R9
  1622. #define NVIC_DBG_XFER_REG_R10 0x0000000A // Register R10
  1623. #define NVIC_DBG_XFER_REG_R11 0x0000000B // Register R11
  1624. #define NVIC_DBG_XFER_REG_R12 0x0000000C // Register R12
  1625. #define NVIC_DBG_XFER_REG_R13 0x0000000D // Register R13
  1626. #define NVIC_DBG_XFER_REG_R14 0x0000000E // Register R14
  1627. #define NVIC_DBG_XFER_REG_R15 0x0000000F // Register R15
  1628. #define NVIC_DBG_XFER_REG_FLAGS 0x00000010 // xPSR/Flags register
  1629. #define NVIC_DBG_XFER_REG_MSP 0x00000011 // Main SP
  1630. #define NVIC_DBG_XFER_REG_PSP 0x00000012 // Process SP
  1631. #define NVIC_DBG_XFER_REG_DSP 0x00000013 // Deep SP
  1632. #define NVIC_DBG_XFER_REG_CFBP 0x00000014 // Control/Fault/BasePri/PriMask
  1633. //*****************************************************************************
  1634. //
  1635. // The following are defines for the bit fields in the NVIC_DBG_DATA register.
  1636. //
  1637. //*****************************************************************************
  1638. #define NVIC_DBG_DATA_M 0xFFFFFFFF // Data temporary cache
  1639. #define NVIC_DBG_DATA_S 0
  1640. //*****************************************************************************
  1641. //
  1642. // The following are defines for the bit fields in the NVIC_DBG_INT register.
  1643. //
  1644. //*****************************************************************************
  1645. #define NVIC_DBG_INT_HARDERR 0x00000400 // Debug trap on hard fault
  1646. #define NVIC_DBG_INT_INTERR 0x00000200 // Debug trap on interrupt errors
  1647. #define NVIC_DBG_INT_BUSERR 0x00000100 // Debug trap on bus error
  1648. #define NVIC_DBG_INT_STATERR 0x00000080 // Debug trap on usage fault state
  1649. #define NVIC_DBG_INT_CHKERR 0x00000040 // Debug trap on usage fault check
  1650. #define NVIC_DBG_INT_NOCPERR 0x00000020 // Debug trap on coprocessor error
  1651. #define NVIC_DBG_INT_MMERR 0x00000010 // Debug trap on mem manage fault
  1652. #define NVIC_DBG_INT_RESET 0x00000008 // Core reset status
  1653. #define NVIC_DBG_INT_RSTPENDCLR 0x00000004 // Clear pending core reset
  1654. #define NVIC_DBG_INT_RSTPENDING 0x00000002 // Core reset is pending
  1655. #define NVIC_DBG_INT_RSTVCATCH 0x00000001 // Reset vector catch
  1656. //*****************************************************************************
  1657. //
  1658. // The following are defines for the bit fields in the NVIC_SW_TRIG register.
  1659. //
  1660. //*****************************************************************************
  1661. #define NVIC_SW_TRIG_INTID_M 0x0000003F // Interrupt ID
  1662. #undef NVIC_SW_TRIG_INTID_M
  1663. #define NVIC_SW_TRIG_INTID_M 0x000000FF // Interrupt ID
  1664. #define NVIC_SW_TRIG_INTID_S 0
  1665. #endif // __HW_NVIC_H__