mtb.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. /**
  2. * \file
  3. *
  4. * \brief Component description for MTB
  5. *
  6. * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.
  7. *
  8. * \asf_license_start
  9. *
  10. * \page License
  11. *
  12. * Redistribution and use in source and binary forms, with or without
  13. * modification, are permitted provided that the following conditions are met:
  14. *
  15. * 1. Redistributions of source code must retain the above copyright notice,
  16. * this list of conditions and the following disclaimer.
  17. *
  18. * 2. Redistributions in binary form must reproduce the above copyright notice,
  19. * this list of conditions and the following disclaimer in the documentation
  20. * and/or other materials provided with the distribution.
  21. *
  22. * 3. The name of Atmel may not be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * 4. This software may only be redistributed and used in connection with an
  26. * Atmel microcontroller product.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
  29. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  30. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
  31. * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
  32. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  33. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  34. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  36. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  37. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  38. * POSSIBILITY OF SUCH DAMAGE.
  39. *
  40. * \asf_license_stop
  41. *
  42. */
  43. /*
  44. * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
  45. */
  46. #ifndef _SAMD21_MTB_COMPONENT_
  47. #define _SAMD21_MTB_COMPONENT_
  48. /* ========================================================================== */
  49. /** SOFTWARE API DEFINITION FOR MTB */
  50. /* ========================================================================== */
  51. /** \addtogroup SAMD21_MTB Cortex-M0+ Micro-Trace Buffer */
  52. /*@{*/
  53. #define MTB_U2002
  54. #define REV_MTB 0x100
  55. /* -------- MTB_POSITION : (MTB Offset: 0x000) (R/W 32) MTB Position -------- */
  56. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  57. typedef union {
  58. struct {
  59. uint32_t :2; /*!< bit: 0.. 1 Reserved */
  60. uint32_t WRAP:1; /*!< bit: 2 Pointer Value Wraps */
  61. uint32_t POINTER:29; /*!< bit: 3..31 Trace Packet Location Pointer */
  62. } bit; /*!< Structure used for bit access */
  63. uint32_t reg; /*!< Type used for register access */
  64. } MTB_POSITION_Type;
  65. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  66. #define MTB_POSITION_OFFSET 0x000 /**< \brief (MTB_POSITION offset) MTB Position */
  67. #define MTB_POSITION_WRAP_Pos 2 /**< \brief (MTB_POSITION) Pointer Value Wraps */
  68. #define MTB_POSITION_WRAP (0x1ul << MTB_POSITION_WRAP_Pos)
  69. #define MTB_POSITION_POINTER_Pos 3 /**< \brief (MTB_POSITION) Trace Packet Location Pointer */
  70. #define MTB_POSITION_POINTER_Msk (0x1FFFFFFFul << MTB_POSITION_POINTER_Pos)
  71. #define MTB_POSITION_POINTER(value) ((MTB_POSITION_POINTER_Msk & ((value) << MTB_POSITION_POINTER_Pos)))
  72. #define MTB_POSITION_MASK 0xFFFFFFFCul /**< \brief (MTB_POSITION) MASK Register */
  73. /* -------- MTB_MASTER : (MTB Offset: 0x004) (R/W 32) MTB Master -------- */
  74. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  75. typedef union {
  76. struct {
  77. uint32_t MASK:5; /*!< bit: 0.. 4 Maximum Value of the Trace Buffer in SRAM */
  78. uint32_t TSTARTEN:1; /*!< bit: 5 Trace Start Input Enable */
  79. uint32_t TSTOPEN:1; /*!< bit: 6 Trace Stop Input Enable */
  80. uint32_t SFRWPRIV:1; /*!< bit: 7 Special Function Register Write Privilege */
  81. uint32_t RAMPRIV:1; /*!< bit: 8 SRAM Privilege */
  82. uint32_t HALTREQ:1; /*!< bit: 9 Halt Request */
  83. uint32_t :21; /*!< bit: 10..30 Reserved */
  84. uint32_t EN:1; /*!< bit: 31 Main Trace Enable */
  85. } bit; /*!< Structure used for bit access */
  86. uint32_t reg; /*!< Type used for register access */
  87. } MTB_MASTER_Type;
  88. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  89. #define MTB_MASTER_OFFSET 0x004 /**< \brief (MTB_MASTER offset) MTB Master */
  90. #define MTB_MASTER_RESETVALUE 0x00000000ul /**< \brief (MTB_MASTER reset_value) MTB Master */
  91. #define MTB_MASTER_MASK_Pos 0 /**< \brief (MTB_MASTER) Maximum Value of the Trace Buffer in SRAM */
  92. #define MTB_MASTER_MASK_Msk (0x1Ful << MTB_MASTER_MASK_Pos)
  93. #define MTB_MASTER_MASK(value) ((MTB_MASTER_MASK_Msk & ((value) << MTB_MASTER_MASK_Pos)))
  94. #define MTB_MASTER_TSTARTEN_Pos 5 /**< \brief (MTB_MASTER) Trace Start Input Enable */
  95. #define MTB_MASTER_TSTARTEN (0x1ul << MTB_MASTER_TSTARTEN_Pos)
  96. #define MTB_MASTER_TSTOPEN_Pos 6 /**< \brief (MTB_MASTER) Trace Stop Input Enable */
  97. #define MTB_MASTER_TSTOPEN (0x1ul << MTB_MASTER_TSTOPEN_Pos)
  98. #define MTB_MASTER_SFRWPRIV_Pos 7 /**< \brief (MTB_MASTER) Special Function Register Write Privilege */
  99. #define MTB_MASTER_SFRWPRIV (0x1ul << MTB_MASTER_SFRWPRIV_Pos)
  100. #define MTB_MASTER_RAMPRIV_Pos 8 /**< \brief (MTB_MASTER) SRAM Privilege */
  101. #define MTB_MASTER_RAMPRIV (0x1ul << MTB_MASTER_RAMPRIV_Pos)
  102. #define MTB_MASTER_HALTREQ_Pos 9 /**< \brief (MTB_MASTER) Halt Request */
  103. #define MTB_MASTER_HALTREQ (0x1ul << MTB_MASTER_HALTREQ_Pos)
  104. #define MTB_MASTER_EN_Pos 31 /**< \brief (MTB_MASTER) Main Trace Enable */
  105. #define MTB_MASTER_EN (0x1ul << MTB_MASTER_EN_Pos)
  106. #define MTB_MASTER_MASK_ 0x800003FFul /**< \brief (MTB_MASTER) MASK Register */
  107. /* -------- MTB_FLOW : (MTB Offset: 0x008) (R/W 32) MTB Flow -------- */
  108. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  109. typedef union {
  110. struct {
  111. uint32_t AUTOSTOP:1; /*!< bit: 0 Auto Stop Tracing */
  112. uint32_t AUTOHALT:1; /*!< bit: 1 Auto Halt Request */
  113. uint32_t :1; /*!< bit: 2 Reserved */
  114. uint32_t WATERMARK:29; /*!< bit: 3..31 Watermark value */
  115. } bit; /*!< Structure used for bit access */
  116. uint32_t reg; /*!< Type used for register access */
  117. } MTB_FLOW_Type;
  118. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  119. #define MTB_FLOW_OFFSET 0x008 /**< \brief (MTB_FLOW offset) MTB Flow */
  120. #define MTB_FLOW_RESETVALUE 0x00000000ul /**< \brief (MTB_FLOW reset_value) MTB Flow */
  121. #define MTB_FLOW_AUTOSTOP_Pos 0 /**< \brief (MTB_FLOW) Auto Stop Tracing */
  122. #define MTB_FLOW_AUTOSTOP (0x1ul << MTB_FLOW_AUTOSTOP_Pos)
  123. #define MTB_FLOW_AUTOHALT_Pos 1 /**< \brief (MTB_FLOW) Auto Halt Request */
  124. #define MTB_FLOW_AUTOHALT (0x1ul << MTB_FLOW_AUTOHALT_Pos)
  125. #define MTB_FLOW_WATERMARK_Pos 3 /**< \brief (MTB_FLOW) Watermark value */
  126. #define MTB_FLOW_WATERMARK_Msk (0x1FFFFFFFul << MTB_FLOW_WATERMARK_Pos)
  127. #define MTB_FLOW_WATERMARK(value) ((MTB_FLOW_WATERMARK_Msk & ((value) << MTB_FLOW_WATERMARK_Pos)))
  128. #define MTB_FLOW_MASK 0xFFFFFFFBul /**< \brief (MTB_FLOW) MASK Register */
  129. /* -------- MTB_BASE : (MTB Offset: 0x00C) (R/ 32) MTB Base -------- */
  130. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  131. typedef union {
  132. uint32_t reg; /*!< Type used for register access */
  133. } MTB_BASE_Type;
  134. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  135. #define MTB_BASE_OFFSET 0x00C /**< \brief (MTB_BASE offset) MTB Base */
  136. #define MTB_BASE_MASK 0xFFFFFFFFul /**< \brief (MTB_BASE) MASK Register */
  137. /* -------- MTB_ITCTRL : (MTB Offset: 0xF00) (R/W 32) MTB Integration Mode Control -------- */
  138. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  139. typedef union {
  140. uint32_t reg; /*!< Type used for register access */
  141. } MTB_ITCTRL_Type;
  142. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  143. #define MTB_ITCTRL_OFFSET 0xF00 /**< \brief (MTB_ITCTRL offset) MTB Integration Mode Control */
  144. #define MTB_ITCTRL_MASK 0xFFFFFFFFul /**< \brief (MTB_ITCTRL) MASK Register */
  145. /* -------- MTB_CLAIMSET : (MTB Offset: 0xFA0) (R/W 32) MTB Claim Set -------- */
  146. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  147. typedef union {
  148. uint32_t reg; /*!< Type used for register access */
  149. } MTB_CLAIMSET_Type;
  150. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  151. #define MTB_CLAIMSET_OFFSET 0xFA0 /**< \brief (MTB_CLAIMSET offset) MTB Claim Set */
  152. #define MTB_CLAIMSET_MASK 0xFFFFFFFFul /**< \brief (MTB_CLAIMSET) MASK Register */
  153. /* -------- MTB_CLAIMCLR : (MTB Offset: 0xFA4) (R/W 32) MTB Claim Clear -------- */
  154. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  155. typedef union {
  156. uint32_t reg; /*!< Type used for register access */
  157. } MTB_CLAIMCLR_Type;
  158. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  159. #define MTB_CLAIMCLR_OFFSET 0xFA4 /**< \brief (MTB_CLAIMCLR offset) MTB Claim Clear */
  160. #define MTB_CLAIMCLR_MASK 0xFFFFFFFFul /**< \brief (MTB_CLAIMCLR) MASK Register */
  161. /* -------- MTB_LOCKACCESS : (MTB Offset: 0xFB0) (R/W 32) MTB Lock Access -------- */
  162. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  163. typedef union {
  164. uint32_t reg; /*!< Type used for register access */
  165. } MTB_LOCKACCESS_Type;
  166. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  167. #define MTB_LOCKACCESS_OFFSET 0xFB0 /**< \brief (MTB_LOCKACCESS offset) MTB Lock Access */
  168. #define MTB_LOCKACCESS_MASK 0xFFFFFFFFul /**< \brief (MTB_LOCKACCESS) MASK Register */
  169. /* -------- MTB_LOCKSTATUS : (MTB Offset: 0xFB4) (R/ 32) MTB Lock Status -------- */
  170. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  171. typedef union {
  172. uint32_t reg; /*!< Type used for register access */
  173. } MTB_LOCKSTATUS_Type;
  174. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  175. #define MTB_LOCKSTATUS_OFFSET 0xFB4 /**< \brief (MTB_LOCKSTATUS offset) MTB Lock Status */
  176. #define MTB_LOCKSTATUS_MASK 0xFFFFFFFFul /**< \brief (MTB_LOCKSTATUS) MASK Register */
  177. /* -------- MTB_AUTHSTATUS : (MTB Offset: 0xFB8) (R/ 32) MTB Authentication Status -------- */
  178. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  179. typedef union {
  180. uint32_t reg; /*!< Type used for register access */
  181. } MTB_AUTHSTATUS_Type;
  182. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  183. #define MTB_AUTHSTATUS_OFFSET 0xFB8 /**< \brief (MTB_AUTHSTATUS offset) MTB Authentication Status */
  184. #define MTB_AUTHSTATUS_MASK 0xFFFFFFFFul /**< \brief (MTB_AUTHSTATUS) MASK Register */
  185. /* -------- MTB_DEVARCH : (MTB Offset: 0xFBC) (R/ 32) MTB Device Architecture -------- */
  186. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  187. typedef union {
  188. uint32_t reg; /*!< Type used for register access */
  189. } MTB_DEVARCH_Type;
  190. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  191. #define MTB_DEVARCH_OFFSET 0xFBC /**< \brief (MTB_DEVARCH offset) MTB Device Architecture */
  192. #define MTB_DEVARCH_MASK 0xFFFFFFFFul /**< \brief (MTB_DEVARCH) MASK Register */
  193. /* -------- MTB_DEVID : (MTB Offset: 0xFC8) (R/ 32) MTB Device Configuration -------- */
  194. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  195. typedef union {
  196. uint32_t reg; /*!< Type used for register access */
  197. } MTB_DEVID_Type;
  198. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  199. #define MTB_DEVID_OFFSET 0xFC8 /**< \brief (MTB_DEVID offset) MTB Device Configuration */
  200. #define MTB_DEVID_MASK 0xFFFFFFFFul /**< \brief (MTB_DEVID) MASK Register */
  201. /* -------- MTB_DEVTYPE : (MTB Offset: 0xFCC) (R/ 32) MTB Device Type -------- */
  202. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  203. typedef union {
  204. uint32_t reg; /*!< Type used for register access */
  205. } MTB_DEVTYPE_Type;
  206. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  207. #define MTB_DEVTYPE_OFFSET 0xFCC /**< \brief (MTB_DEVTYPE offset) MTB Device Type */
  208. #define MTB_DEVTYPE_MASK 0xFFFFFFFFul /**< \brief (MTB_DEVTYPE) MASK Register */
  209. /* -------- MTB_PID4 : (MTB Offset: 0xFD0) (R/ 32) CoreSight -------- */
  210. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  211. typedef union {
  212. uint32_t reg; /*!< Type used for register access */
  213. } MTB_PID4_Type;
  214. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  215. #define MTB_PID4_OFFSET 0xFD0 /**< \brief (MTB_PID4 offset) CoreSight */
  216. #define MTB_PID4_MASK 0xFFFFFFFFul /**< \brief (MTB_PID4) MASK Register */
  217. /* -------- MTB_PID5 : (MTB Offset: 0xFD4) (R/ 32) CoreSight -------- */
  218. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  219. typedef union {
  220. uint32_t reg; /*!< Type used for register access */
  221. } MTB_PID5_Type;
  222. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  223. #define MTB_PID5_OFFSET 0xFD4 /**< \brief (MTB_PID5 offset) CoreSight */
  224. #define MTB_PID5_MASK 0xFFFFFFFFul /**< \brief (MTB_PID5) MASK Register */
  225. /* -------- MTB_PID6 : (MTB Offset: 0xFD8) (R/ 32) CoreSight -------- */
  226. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  227. typedef union {
  228. uint32_t reg; /*!< Type used for register access */
  229. } MTB_PID6_Type;
  230. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  231. #define MTB_PID6_OFFSET 0xFD8 /**< \brief (MTB_PID6 offset) CoreSight */
  232. #define MTB_PID6_MASK 0xFFFFFFFFul /**< \brief (MTB_PID6) MASK Register */
  233. /* -------- MTB_PID7 : (MTB Offset: 0xFDC) (R/ 32) CoreSight -------- */
  234. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  235. typedef union {
  236. uint32_t reg; /*!< Type used for register access */
  237. } MTB_PID7_Type;
  238. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  239. #define MTB_PID7_OFFSET 0xFDC /**< \brief (MTB_PID7 offset) CoreSight */
  240. #define MTB_PID7_MASK 0xFFFFFFFFul /**< \brief (MTB_PID7) MASK Register */
  241. /* -------- MTB_PID0 : (MTB Offset: 0xFE0) (R/ 32) CoreSight -------- */
  242. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  243. typedef union {
  244. uint32_t reg; /*!< Type used for register access */
  245. } MTB_PID0_Type;
  246. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  247. #define MTB_PID0_OFFSET 0xFE0 /**< \brief (MTB_PID0 offset) CoreSight */
  248. #define MTB_PID0_MASK 0xFFFFFFFFul /**< \brief (MTB_PID0) MASK Register */
  249. /* -------- MTB_PID1 : (MTB Offset: 0xFE4) (R/ 32) CoreSight -------- */
  250. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  251. typedef union {
  252. uint32_t reg; /*!< Type used for register access */
  253. } MTB_PID1_Type;
  254. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  255. #define MTB_PID1_OFFSET 0xFE4 /**< \brief (MTB_PID1 offset) CoreSight */
  256. #define MTB_PID1_MASK 0xFFFFFFFFul /**< \brief (MTB_PID1) MASK Register */
  257. /* -------- MTB_PID2 : (MTB Offset: 0xFE8) (R/ 32) CoreSight -------- */
  258. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  259. typedef union {
  260. uint32_t reg; /*!< Type used for register access */
  261. } MTB_PID2_Type;
  262. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  263. #define MTB_PID2_OFFSET 0xFE8 /**< \brief (MTB_PID2 offset) CoreSight */
  264. #define MTB_PID2_MASK 0xFFFFFFFFul /**< \brief (MTB_PID2) MASK Register */
  265. /* -------- MTB_PID3 : (MTB Offset: 0xFEC) (R/ 32) CoreSight -------- */
  266. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  267. typedef union {
  268. uint32_t reg; /*!< Type used for register access */
  269. } MTB_PID3_Type;
  270. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  271. #define MTB_PID3_OFFSET 0xFEC /**< \brief (MTB_PID3 offset) CoreSight */
  272. #define MTB_PID3_MASK 0xFFFFFFFFul /**< \brief (MTB_PID3) MASK Register */
  273. /* -------- MTB_CID0 : (MTB Offset: 0xFF0) (R/ 32) CoreSight -------- */
  274. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  275. typedef union {
  276. uint32_t reg; /*!< Type used for register access */
  277. } MTB_CID0_Type;
  278. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  279. #define MTB_CID0_OFFSET 0xFF0 /**< \brief (MTB_CID0 offset) CoreSight */
  280. #define MTB_CID0_MASK 0xFFFFFFFFul /**< \brief (MTB_CID0) MASK Register */
  281. /* -------- MTB_CID1 : (MTB Offset: 0xFF4) (R/ 32) CoreSight -------- */
  282. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  283. typedef union {
  284. uint32_t reg; /*!< Type used for register access */
  285. } MTB_CID1_Type;
  286. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  287. #define MTB_CID1_OFFSET 0xFF4 /**< \brief (MTB_CID1 offset) CoreSight */
  288. #define MTB_CID1_MASK 0xFFFFFFFFul /**< \brief (MTB_CID1) MASK Register */
  289. /* -------- MTB_CID2 : (MTB Offset: 0xFF8) (R/ 32) CoreSight -------- */
  290. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  291. typedef union {
  292. uint32_t reg; /*!< Type used for register access */
  293. } MTB_CID2_Type;
  294. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  295. #define MTB_CID2_OFFSET 0xFF8 /**< \brief (MTB_CID2 offset) CoreSight */
  296. #define MTB_CID2_MASK 0xFFFFFFFFul /**< \brief (MTB_CID2) MASK Register */
  297. /* -------- MTB_CID3 : (MTB Offset: 0xFFC) (R/ 32) CoreSight -------- */
  298. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  299. typedef union {
  300. uint32_t reg; /*!< Type used for register access */
  301. } MTB_CID3_Type;
  302. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  303. #define MTB_CID3_OFFSET 0xFFC /**< \brief (MTB_CID3 offset) CoreSight */
  304. #define MTB_CID3_MASK 0xFFFFFFFFul /**< \brief (MTB_CID3) MASK Register */
  305. /** \brief MTB hardware registers */
  306. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  307. typedef struct {
  308. __IO MTB_POSITION_Type POSITION; /**< \brief Offset: 0x000 (R/W 32) MTB Position */
  309. __IO MTB_MASTER_Type MASTER; /**< \brief Offset: 0x004 (R/W 32) MTB Master */
  310. __IO MTB_FLOW_Type FLOW; /**< \brief Offset: 0x008 (R/W 32) MTB Flow */
  311. __I MTB_BASE_Type BASE; /**< \brief Offset: 0x00C (R/ 32) MTB Base */
  312. RoReg8 Reserved1[0xEF0];
  313. __IO MTB_ITCTRL_Type ITCTRL; /**< \brief Offset: 0xF00 (R/W 32) MTB Integration Mode Control */
  314. RoReg8 Reserved2[0x9C];
  315. __IO MTB_CLAIMSET_Type CLAIMSET; /**< \brief Offset: 0xFA0 (R/W 32) MTB Claim Set */
  316. __IO MTB_CLAIMCLR_Type CLAIMCLR; /**< \brief Offset: 0xFA4 (R/W 32) MTB Claim Clear */
  317. RoReg8 Reserved3[0x8];
  318. __IO MTB_LOCKACCESS_Type LOCKACCESS; /**< \brief Offset: 0xFB0 (R/W 32) MTB Lock Access */
  319. __I MTB_LOCKSTATUS_Type LOCKSTATUS; /**< \brief Offset: 0xFB4 (R/ 32) MTB Lock Status */
  320. __I MTB_AUTHSTATUS_Type AUTHSTATUS; /**< \brief Offset: 0xFB8 (R/ 32) MTB Authentication Status */
  321. __I MTB_DEVARCH_Type DEVARCH; /**< \brief Offset: 0xFBC (R/ 32) MTB Device Architecture */
  322. RoReg8 Reserved4[0x8];
  323. __I MTB_DEVID_Type DEVID; /**< \brief Offset: 0xFC8 (R/ 32) MTB Device Configuration */
  324. __I MTB_DEVTYPE_Type DEVTYPE; /**< \brief Offset: 0xFCC (R/ 32) MTB Device Type */
  325. __I MTB_PID4_Type PID4; /**< \brief Offset: 0xFD0 (R/ 32) CoreSight */
  326. __I MTB_PID5_Type PID5; /**< \brief Offset: 0xFD4 (R/ 32) CoreSight */
  327. __I MTB_PID6_Type PID6; /**< \brief Offset: 0xFD8 (R/ 32) CoreSight */
  328. __I MTB_PID7_Type PID7; /**< \brief Offset: 0xFDC (R/ 32) CoreSight */
  329. __I MTB_PID0_Type PID0; /**< \brief Offset: 0xFE0 (R/ 32) CoreSight */
  330. __I MTB_PID1_Type PID1; /**< \brief Offset: 0xFE4 (R/ 32) CoreSight */
  331. __I MTB_PID2_Type PID2; /**< \brief Offset: 0xFE8 (R/ 32) CoreSight */
  332. __I MTB_PID3_Type PID3; /**< \brief Offset: 0xFEC (R/ 32) CoreSight */
  333. __I MTB_CID0_Type CID0; /**< \brief Offset: 0xFF0 (R/ 32) CoreSight */
  334. __I MTB_CID1_Type CID1; /**< \brief Offset: 0xFF4 (R/ 32) CoreSight */
  335. __I MTB_CID2_Type CID2; /**< \brief Offset: 0xFF8 (R/ 32) CoreSight */
  336. __I MTB_CID3_Type CID3; /**< \brief Offset: 0xFFC (R/ 32) CoreSight */
  337. } Mtb;
  338. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  339. /*@}*/
  340. #endif /* _SAMD21_MTB_COMPONENT_ */