mtb.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. /**
  2. * \file
  3. *
  4. * \brief Component description for MTB
  5. *
  6. * Copyright (c) 2018 Microchip Technology Inc.
  7. *
  8. * \asf_license_start
  9. *
  10. * \page License
  11. *
  12. * SPDX-License-Identifier: Apache-2.0
  13. *
  14. * Licensed under the Apache License, Version 2.0 (the "License"); you may
  15. * not use this file except in compliance with the License.
  16. * You may obtain a copy of the Licence at
  17. *
  18. * http://www.apache.org/licenses/LICENSE-2.0
  19. *
  20. * Unless required by applicable law or agreed to in writing, software
  21. * distributed under the License is distributed on an AS IS BASIS, WITHOUT
  22. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23. * See the License for the specific language governing permissions and
  24. * limitations under the License.
  25. *
  26. * \asf_license_stop
  27. *
  28. */
  29. #ifndef _SAMD11_MTB_COMPONENT_
  30. #define _SAMD11_MTB_COMPONENT_
  31. /* ========================================================================== */
  32. /** SOFTWARE API DEFINITION FOR MTB */
  33. /* ========================================================================== */
  34. /** \addtogroup SAMD11_MTB Cortex-M0+ Micro-Trace Buffer */
  35. /*@{*/
  36. #define MTB_U2002
  37. #define REV_MTB 0x100
  38. /* -------- MTB_POSITION : (MTB Offset: 0x000) (R/W 32) MTB Position -------- */
  39. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  40. typedef union {
  41. struct {
  42. uint32_t :2; /*!< bit: 0.. 1 Reserved */
  43. uint32_t WRAP:1; /*!< bit: 2 Pointer Value Wraps */
  44. uint32_t POINTER:29; /*!< bit: 3..31 Trace Packet Location Pointer */
  45. } bit; /*!< Structure used for bit access */
  46. uint32_t reg; /*!< Type used for register access */
  47. } MTB_POSITION_Type;
  48. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  49. #define MTB_POSITION_OFFSET 0x000 /**< \brief (MTB_POSITION offset) MTB Position */
  50. #define MTB_POSITION_WRAP_Pos 2 /**< \brief (MTB_POSITION) Pointer Value Wraps */
  51. #define MTB_POSITION_WRAP (_U_(0x1) << MTB_POSITION_WRAP_Pos)
  52. #define MTB_POSITION_POINTER_Pos 3 /**< \brief (MTB_POSITION) Trace Packet Location Pointer */
  53. #define MTB_POSITION_POINTER_Msk (_U_(0x1FFFFFFF) << MTB_POSITION_POINTER_Pos)
  54. #define MTB_POSITION_POINTER(value) (MTB_POSITION_POINTER_Msk & ((value) << MTB_POSITION_POINTER_Pos))
  55. #define MTB_POSITION_MASK _U_(0xFFFFFFFC) /**< \brief (MTB_POSITION) MASK Register */
  56. /* -------- MTB_MASTER : (MTB Offset: 0x004) (R/W 32) MTB Master -------- */
  57. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  58. typedef union {
  59. struct {
  60. uint32_t MASK:5; /*!< bit: 0.. 4 Maximum Value of the Trace Buffer in SRAM */
  61. uint32_t TSTARTEN:1; /*!< bit: 5 Trace Start Input Enable */
  62. uint32_t TSTOPEN:1; /*!< bit: 6 Trace Stop Input Enable */
  63. uint32_t SFRWPRIV:1; /*!< bit: 7 Special Function Register Write Privilege */
  64. uint32_t RAMPRIV:1; /*!< bit: 8 SRAM Privilege */
  65. uint32_t HALTREQ:1; /*!< bit: 9 Halt Request */
  66. uint32_t :21; /*!< bit: 10..30 Reserved */
  67. uint32_t EN:1; /*!< bit: 31 Main Trace Enable */
  68. } bit; /*!< Structure used for bit access */
  69. uint32_t reg; /*!< Type used for register access */
  70. } MTB_MASTER_Type;
  71. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  72. #define MTB_MASTER_OFFSET 0x004 /**< \brief (MTB_MASTER offset) MTB Master */
  73. #define MTB_MASTER_RESETVALUE _U_(0x00000000) /**< \brief (MTB_MASTER reset_value) MTB Master */
  74. #define MTB_MASTER_MASK_Pos 0 /**< \brief (MTB_MASTER) Maximum Value of the Trace Buffer in SRAM */
  75. #define MTB_MASTER_MASK_Msk (_U_(0x1F) << MTB_MASTER_MASK_Pos)
  76. #define MTB_MASTER_MASK(value) (MTB_MASTER_MASK_Msk & ((value) << MTB_MASTER_MASK_Pos))
  77. #define MTB_MASTER_TSTARTEN_Pos 5 /**< \brief (MTB_MASTER) Trace Start Input Enable */
  78. #define MTB_MASTER_TSTARTEN (_U_(0x1) << MTB_MASTER_TSTARTEN_Pos)
  79. #define MTB_MASTER_TSTOPEN_Pos 6 /**< \brief (MTB_MASTER) Trace Stop Input Enable */
  80. #define MTB_MASTER_TSTOPEN (_U_(0x1) << MTB_MASTER_TSTOPEN_Pos)
  81. #define MTB_MASTER_SFRWPRIV_Pos 7 /**< \brief (MTB_MASTER) Special Function Register Write Privilege */
  82. #define MTB_MASTER_SFRWPRIV (_U_(0x1) << MTB_MASTER_SFRWPRIV_Pos)
  83. #define MTB_MASTER_RAMPRIV_Pos 8 /**< \brief (MTB_MASTER) SRAM Privilege */
  84. #define MTB_MASTER_RAMPRIV (_U_(0x1) << MTB_MASTER_RAMPRIV_Pos)
  85. #define MTB_MASTER_HALTREQ_Pos 9 /**< \brief (MTB_MASTER) Halt Request */
  86. #define MTB_MASTER_HALTREQ (_U_(0x1) << MTB_MASTER_HALTREQ_Pos)
  87. #define MTB_MASTER_EN_Pos 31 /**< \brief (MTB_MASTER) Main Trace Enable */
  88. #define MTB_MASTER_EN (_U_(0x1) << MTB_MASTER_EN_Pos)
  89. #define MTB_MASTER_MASK_ _U_(0x800003FF) /**< \brief (MTB_MASTER) MASK Register */
  90. /* -------- MTB_FLOW : (MTB Offset: 0x008) (R/W 32) MTB Flow -------- */
  91. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  92. typedef union {
  93. struct {
  94. uint32_t AUTOSTOP:1; /*!< bit: 0 Auto Stop Tracing */
  95. uint32_t AUTOHALT:1; /*!< bit: 1 Auto Halt Request */
  96. uint32_t :1; /*!< bit: 2 Reserved */
  97. uint32_t WATERMARK:29; /*!< bit: 3..31 Watermark value */
  98. } bit; /*!< Structure used for bit access */
  99. uint32_t reg; /*!< Type used for register access */
  100. } MTB_FLOW_Type;
  101. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  102. #define MTB_FLOW_OFFSET 0x008 /**< \brief (MTB_FLOW offset) MTB Flow */
  103. #define MTB_FLOW_RESETVALUE _U_(0x00000000) /**< \brief (MTB_FLOW reset_value) MTB Flow */
  104. #define MTB_FLOW_AUTOSTOP_Pos 0 /**< \brief (MTB_FLOW) Auto Stop Tracing */
  105. #define MTB_FLOW_AUTOSTOP (_U_(0x1) << MTB_FLOW_AUTOSTOP_Pos)
  106. #define MTB_FLOW_AUTOHALT_Pos 1 /**< \brief (MTB_FLOW) Auto Halt Request */
  107. #define MTB_FLOW_AUTOHALT (_U_(0x1) << MTB_FLOW_AUTOHALT_Pos)
  108. #define MTB_FLOW_WATERMARK_Pos 3 /**< \brief (MTB_FLOW) Watermark value */
  109. #define MTB_FLOW_WATERMARK_Msk (_U_(0x1FFFFFFF) << MTB_FLOW_WATERMARK_Pos)
  110. #define MTB_FLOW_WATERMARK(value) (MTB_FLOW_WATERMARK_Msk & ((value) << MTB_FLOW_WATERMARK_Pos))
  111. #define MTB_FLOW_MASK _U_(0xFFFFFFFB) /**< \brief (MTB_FLOW) MASK Register */
  112. /* -------- MTB_BASE : (MTB Offset: 0x00C) (R/ 32) MTB Base -------- */
  113. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  114. typedef union {
  115. uint32_t reg; /*!< Type used for register access */
  116. } MTB_BASE_Type;
  117. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  118. #define MTB_BASE_OFFSET 0x00C /**< \brief (MTB_BASE offset) MTB Base */
  119. #define MTB_BASE_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_BASE) MASK Register */
  120. /* -------- MTB_ITCTRL : (MTB Offset: 0xF00) (R/W 32) MTB Integration Mode Control -------- */
  121. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  122. typedef union {
  123. uint32_t reg; /*!< Type used for register access */
  124. } MTB_ITCTRL_Type;
  125. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  126. #define MTB_ITCTRL_OFFSET 0xF00 /**< \brief (MTB_ITCTRL offset) MTB Integration Mode Control */
  127. #define MTB_ITCTRL_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_ITCTRL) MASK Register */
  128. /* -------- MTB_CLAIMSET : (MTB Offset: 0xFA0) (R/W 32) MTB Claim Set -------- */
  129. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  130. typedef union {
  131. uint32_t reg; /*!< Type used for register access */
  132. } MTB_CLAIMSET_Type;
  133. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  134. #define MTB_CLAIMSET_OFFSET 0xFA0 /**< \brief (MTB_CLAIMSET offset) MTB Claim Set */
  135. #define MTB_CLAIMSET_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_CLAIMSET) MASK Register */
  136. /* -------- MTB_CLAIMCLR : (MTB Offset: 0xFA4) (R/W 32) MTB Claim Clear -------- */
  137. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  138. typedef union {
  139. uint32_t reg; /*!< Type used for register access */
  140. } MTB_CLAIMCLR_Type;
  141. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  142. #define MTB_CLAIMCLR_OFFSET 0xFA4 /**< \brief (MTB_CLAIMCLR offset) MTB Claim Clear */
  143. #define MTB_CLAIMCLR_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_CLAIMCLR) MASK Register */
  144. /* -------- MTB_LOCKACCESS : (MTB Offset: 0xFB0) (R/W 32) MTB Lock Access -------- */
  145. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  146. typedef union {
  147. uint32_t reg; /*!< Type used for register access */
  148. } MTB_LOCKACCESS_Type;
  149. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  150. #define MTB_LOCKACCESS_OFFSET 0xFB0 /**< \brief (MTB_LOCKACCESS offset) MTB Lock Access */
  151. #define MTB_LOCKACCESS_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_LOCKACCESS) MASK Register */
  152. /* -------- MTB_LOCKSTATUS : (MTB Offset: 0xFB4) (R/ 32) MTB Lock Status -------- */
  153. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  154. typedef union {
  155. uint32_t reg; /*!< Type used for register access */
  156. } MTB_LOCKSTATUS_Type;
  157. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  158. #define MTB_LOCKSTATUS_OFFSET 0xFB4 /**< \brief (MTB_LOCKSTATUS offset) MTB Lock Status */
  159. #define MTB_LOCKSTATUS_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_LOCKSTATUS) MASK Register */
  160. /* -------- MTB_AUTHSTATUS : (MTB Offset: 0xFB8) (R/ 32) MTB Authentication Status -------- */
  161. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  162. typedef union {
  163. uint32_t reg; /*!< Type used for register access */
  164. } MTB_AUTHSTATUS_Type;
  165. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  166. #define MTB_AUTHSTATUS_OFFSET 0xFB8 /**< \brief (MTB_AUTHSTATUS offset) MTB Authentication Status */
  167. #define MTB_AUTHSTATUS_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_AUTHSTATUS) MASK Register */
  168. /* -------- MTB_DEVARCH : (MTB Offset: 0xFBC) (R/ 32) MTB Device Architecture -------- */
  169. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  170. typedef union {
  171. uint32_t reg; /*!< Type used for register access */
  172. } MTB_DEVARCH_Type;
  173. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  174. #define MTB_DEVARCH_OFFSET 0xFBC /**< \brief (MTB_DEVARCH offset) MTB Device Architecture */
  175. #define MTB_DEVARCH_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_DEVARCH) MASK Register */
  176. /* -------- MTB_DEVID : (MTB Offset: 0xFC8) (R/ 32) MTB Device Configuration -------- */
  177. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  178. typedef union {
  179. uint32_t reg; /*!< Type used for register access */
  180. } MTB_DEVID_Type;
  181. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  182. #define MTB_DEVID_OFFSET 0xFC8 /**< \brief (MTB_DEVID offset) MTB Device Configuration */
  183. #define MTB_DEVID_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_DEVID) MASK Register */
  184. /* -------- MTB_DEVTYPE : (MTB Offset: 0xFCC) (R/ 32) MTB Device Type -------- */
  185. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  186. typedef union {
  187. uint32_t reg; /*!< Type used for register access */
  188. } MTB_DEVTYPE_Type;
  189. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  190. #define MTB_DEVTYPE_OFFSET 0xFCC /**< \brief (MTB_DEVTYPE offset) MTB Device Type */
  191. #define MTB_DEVTYPE_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_DEVTYPE) MASK Register */
  192. /* -------- MTB_PID4 : (MTB Offset: 0xFD0) (R/ 32) CoreSight -------- */
  193. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  194. typedef union {
  195. uint32_t reg; /*!< Type used for register access */
  196. } MTB_PID4_Type;
  197. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  198. #define MTB_PID4_OFFSET 0xFD0 /**< \brief (MTB_PID4 offset) CoreSight */
  199. #define MTB_PID4_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_PID4) MASK Register */
  200. /* -------- MTB_PID5 : (MTB Offset: 0xFD4) (R/ 32) CoreSight -------- */
  201. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  202. typedef union {
  203. uint32_t reg; /*!< Type used for register access */
  204. } MTB_PID5_Type;
  205. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  206. #define MTB_PID5_OFFSET 0xFD4 /**< \brief (MTB_PID5 offset) CoreSight */
  207. #define MTB_PID5_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_PID5) MASK Register */
  208. /* -------- MTB_PID6 : (MTB Offset: 0xFD8) (R/ 32) CoreSight -------- */
  209. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  210. typedef union {
  211. uint32_t reg; /*!< Type used for register access */
  212. } MTB_PID6_Type;
  213. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  214. #define MTB_PID6_OFFSET 0xFD8 /**< \brief (MTB_PID6 offset) CoreSight */
  215. #define MTB_PID6_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_PID6) MASK Register */
  216. /* -------- MTB_PID7 : (MTB Offset: 0xFDC) (R/ 32) CoreSight -------- */
  217. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  218. typedef union {
  219. uint32_t reg; /*!< Type used for register access */
  220. } MTB_PID7_Type;
  221. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  222. #define MTB_PID7_OFFSET 0xFDC /**< \brief (MTB_PID7 offset) CoreSight */
  223. #define MTB_PID7_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_PID7) MASK Register */
  224. /* -------- MTB_PID0 : (MTB Offset: 0xFE0) (R/ 32) CoreSight -------- */
  225. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  226. typedef union {
  227. uint32_t reg; /*!< Type used for register access */
  228. } MTB_PID0_Type;
  229. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  230. #define MTB_PID0_OFFSET 0xFE0 /**< \brief (MTB_PID0 offset) CoreSight */
  231. #define MTB_PID0_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_PID0) MASK Register */
  232. /* -------- MTB_PID1 : (MTB Offset: 0xFE4) (R/ 32) CoreSight -------- */
  233. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  234. typedef union {
  235. uint32_t reg; /*!< Type used for register access */
  236. } MTB_PID1_Type;
  237. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  238. #define MTB_PID1_OFFSET 0xFE4 /**< \brief (MTB_PID1 offset) CoreSight */
  239. #define MTB_PID1_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_PID1) MASK Register */
  240. /* -------- MTB_PID2 : (MTB Offset: 0xFE8) (R/ 32) CoreSight -------- */
  241. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  242. typedef union {
  243. uint32_t reg; /*!< Type used for register access */
  244. } MTB_PID2_Type;
  245. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  246. #define MTB_PID2_OFFSET 0xFE8 /**< \brief (MTB_PID2 offset) CoreSight */
  247. #define MTB_PID2_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_PID2) MASK Register */
  248. /* -------- MTB_PID3 : (MTB Offset: 0xFEC) (R/ 32) CoreSight -------- */
  249. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  250. typedef union {
  251. uint32_t reg; /*!< Type used for register access */
  252. } MTB_PID3_Type;
  253. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  254. #define MTB_PID3_OFFSET 0xFEC /**< \brief (MTB_PID3 offset) CoreSight */
  255. #define MTB_PID3_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_PID3) MASK Register */
  256. /* -------- MTB_CID0 : (MTB Offset: 0xFF0) (R/ 32) CoreSight -------- */
  257. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  258. typedef union {
  259. uint32_t reg; /*!< Type used for register access */
  260. } MTB_CID0_Type;
  261. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  262. #define MTB_CID0_OFFSET 0xFF0 /**< \brief (MTB_CID0 offset) CoreSight */
  263. #define MTB_CID0_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_CID0) MASK Register */
  264. /* -------- MTB_CID1 : (MTB Offset: 0xFF4) (R/ 32) CoreSight -------- */
  265. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  266. typedef union {
  267. uint32_t reg; /*!< Type used for register access */
  268. } MTB_CID1_Type;
  269. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  270. #define MTB_CID1_OFFSET 0xFF4 /**< \brief (MTB_CID1 offset) CoreSight */
  271. #define MTB_CID1_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_CID1) MASK Register */
  272. /* -------- MTB_CID2 : (MTB Offset: 0xFF8) (R/ 32) CoreSight -------- */
  273. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  274. typedef union {
  275. uint32_t reg; /*!< Type used for register access */
  276. } MTB_CID2_Type;
  277. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  278. #define MTB_CID2_OFFSET 0xFF8 /**< \brief (MTB_CID2 offset) CoreSight */
  279. #define MTB_CID2_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_CID2) MASK Register */
  280. /* -------- MTB_CID3 : (MTB Offset: 0xFFC) (R/ 32) CoreSight -------- */
  281. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  282. typedef union {
  283. uint32_t reg; /*!< Type used for register access */
  284. } MTB_CID3_Type;
  285. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  286. #define MTB_CID3_OFFSET 0xFFC /**< \brief (MTB_CID3 offset) CoreSight */
  287. #define MTB_CID3_MASK _U_(0xFFFFFFFF) /**< \brief (MTB_CID3) MASK Register */
  288. /** \brief MTB hardware registers */
  289. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  290. typedef struct {
  291. __IO MTB_POSITION_Type POSITION; /**< \brief Offset: 0x000 (R/W 32) MTB Position */
  292. __IO MTB_MASTER_Type MASTER; /**< \brief Offset: 0x004 (R/W 32) MTB Master */
  293. __IO MTB_FLOW_Type FLOW; /**< \brief Offset: 0x008 (R/W 32) MTB Flow */
  294. __I MTB_BASE_Type BASE; /**< \brief Offset: 0x00C (R/ 32) MTB Base */
  295. RoReg8 Reserved1[0xEF0];
  296. __IO MTB_ITCTRL_Type ITCTRL; /**< \brief Offset: 0xF00 (R/W 32) MTB Integration Mode Control */
  297. RoReg8 Reserved2[0x9C];
  298. __IO MTB_CLAIMSET_Type CLAIMSET; /**< \brief Offset: 0xFA0 (R/W 32) MTB Claim Set */
  299. __IO MTB_CLAIMCLR_Type CLAIMCLR; /**< \brief Offset: 0xFA4 (R/W 32) MTB Claim Clear */
  300. RoReg8 Reserved3[0x8];
  301. __IO MTB_LOCKACCESS_Type LOCKACCESS; /**< \brief Offset: 0xFB0 (R/W 32) MTB Lock Access */
  302. __I MTB_LOCKSTATUS_Type LOCKSTATUS; /**< \brief Offset: 0xFB4 (R/ 32) MTB Lock Status */
  303. __I MTB_AUTHSTATUS_Type AUTHSTATUS; /**< \brief Offset: 0xFB8 (R/ 32) MTB Authentication Status */
  304. __I MTB_DEVARCH_Type DEVARCH; /**< \brief Offset: 0xFBC (R/ 32) MTB Device Architecture */
  305. RoReg8 Reserved4[0x8];
  306. __I MTB_DEVID_Type DEVID; /**< \brief Offset: 0xFC8 (R/ 32) MTB Device Configuration */
  307. __I MTB_DEVTYPE_Type DEVTYPE; /**< \brief Offset: 0xFCC (R/ 32) MTB Device Type */
  308. __I MTB_PID4_Type PID4; /**< \brief Offset: 0xFD0 (R/ 32) CoreSight */
  309. __I MTB_PID5_Type PID5; /**< \brief Offset: 0xFD4 (R/ 32) CoreSight */
  310. __I MTB_PID6_Type PID6; /**< \brief Offset: 0xFD8 (R/ 32) CoreSight */
  311. __I MTB_PID7_Type PID7; /**< \brief Offset: 0xFDC (R/ 32) CoreSight */
  312. __I MTB_PID0_Type PID0; /**< \brief Offset: 0xFE0 (R/ 32) CoreSight */
  313. __I MTB_PID1_Type PID1; /**< \brief Offset: 0xFE4 (R/ 32) CoreSight */
  314. __I MTB_PID2_Type PID2; /**< \brief Offset: 0xFE8 (R/ 32) CoreSight */
  315. __I MTB_PID3_Type PID3; /**< \brief Offset: 0xFEC (R/ 32) CoreSight */
  316. __I MTB_CID0_Type CID0; /**< \brief Offset: 0xFF0 (R/ 32) CoreSight */
  317. __I MTB_CID1_Type CID1; /**< \brief Offset: 0xFF4 (R/ 32) CoreSight */
  318. __I MTB_CID2_Type CID2; /**< \brief Offset: 0xFF8 (R/ 32) CoreSight */
  319. __I MTB_CID3_Type CID3; /**< \brief Offset: 0xFFC (R/ 32) CoreSight */
  320. } Mtb;
  321. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  322. /*@}*/
  323. #endif /* _SAMD11_MTB_COMPONENT_ */