mclk.h 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. /**
  2. * \file
  3. *
  4. * \brief Component description for MCLK
  5. *
  6. * Copyright (c) 2018 Microchip Technology Inc.
  7. *
  8. * \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");
  15. * you may not use this file except in compliance with the License.
  16. * You may obtain a copy of the License 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,
  22. * WITHOUT 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. * \license_stop
  27. *
  28. */
  29. /* file generated from device description version 2018-05-30T11:07:17Z */
  30. #ifndef _SAML11_MCLK_COMPONENT_H_
  31. #define _SAML11_MCLK_COMPONENT_H_
  32. #define _SAML11_MCLK_COMPONENT_ /**< \deprecated Backward compatibility for ASF */
  33. /** \addtogroup SAML_SAML11 Main Clock
  34. * @{
  35. */
  36. /* ========================================================================== */
  37. /** SOFTWARE API DEFINITION FOR MCLK */
  38. /* ========================================================================== */
  39. #define MCLK_U2234 /**< (MCLK) Module ID */
  40. #define REV_MCLK 0x300 /**< (MCLK) Module revision */
  41. /* -------- MCLK_CTRLA : (MCLK Offset: 0x00) (R/W 8) Control -------- */
  42. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  43. typedef union {
  44. struct {
  45. uint8_t :2; /**< bit: 0..1 Reserved */
  46. uint8_t CKSEL:1; /**< bit: 2 Clock Select */
  47. uint8_t :5; /**< bit: 3..7 Reserved */
  48. } bit; /**< Structure used for bit access */
  49. uint8_t reg; /**< Type used for register access */
  50. } MCLK_CTRLA_Type;
  51. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  52. #define MCLK_CTRLA_OFFSET (0x00) /**< (MCLK_CTRLA) Control Offset */
  53. #define MCLK_CTRLA_RESETVALUE _U_(0x00) /**< (MCLK_CTRLA) Control Reset Value */
  54. #define MCLK_CTRLA_CKSEL_Pos 2 /**< (MCLK_CTRLA) Clock Select Position */
  55. #define MCLK_CTRLA_CKSEL_Msk (_U_(0x1) << MCLK_CTRLA_CKSEL_Pos) /**< (MCLK_CTRLA) Clock Select Mask */
  56. #define MCLK_CTRLA_CKSEL MCLK_CTRLA_CKSEL_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_CTRLA_CKSEL_Msk instead */
  57. #define MCLK_CTRLA_MASK _U_(0x04) /**< \deprecated (MCLK_CTRLA) Register MASK (Use MCLK_CTRLA_Msk instead) */
  58. #define MCLK_CTRLA_Msk _U_(0x04) /**< (MCLK_CTRLA) Register Mask */
  59. /* -------- MCLK_INTENCLR : (MCLK Offset: 0x01) (R/W 8) Interrupt Enable Clear -------- */
  60. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  61. typedef union {
  62. struct {
  63. uint8_t CKRDY:1; /**< bit: 0 Clock Ready Interrupt Enable */
  64. uint8_t :7; /**< bit: 1..7 Reserved */
  65. } bit; /**< Structure used for bit access */
  66. uint8_t reg; /**< Type used for register access */
  67. } MCLK_INTENCLR_Type;
  68. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  69. #define MCLK_INTENCLR_OFFSET (0x01) /**< (MCLK_INTENCLR) Interrupt Enable Clear Offset */
  70. #define MCLK_INTENCLR_RESETVALUE _U_(0x00) /**< (MCLK_INTENCLR) Interrupt Enable Clear Reset Value */
  71. #define MCLK_INTENCLR_CKRDY_Pos 0 /**< (MCLK_INTENCLR) Clock Ready Interrupt Enable Position */
  72. #define MCLK_INTENCLR_CKRDY_Msk (_U_(0x1) << MCLK_INTENCLR_CKRDY_Pos) /**< (MCLK_INTENCLR) Clock Ready Interrupt Enable Mask */
  73. #define MCLK_INTENCLR_CKRDY MCLK_INTENCLR_CKRDY_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_INTENCLR_CKRDY_Msk instead */
  74. #define MCLK_INTENCLR_MASK _U_(0x01) /**< \deprecated (MCLK_INTENCLR) Register MASK (Use MCLK_INTENCLR_Msk instead) */
  75. #define MCLK_INTENCLR_Msk _U_(0x01) /**< (MCLK_INTENCLR) Register Mask */
  76. /* -------- MCLK_INTENSET : (MCLK Offset: 0x02) (R/W 8) Interrupt Enable Set -------- */
  77. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  78. typedef union {
  79. struct {
  80. uint8_t CKRDY:1; /**< bit: 0 Clock Ready Interrupt Enable */
  81. uint8_t :7; /**< bit: 1..7 Reserved */
  82. } bit; /**< Structure used for bit access */
  83. uint8_t reg; /**< Type used for register access */
  84. } MCLK_INTENSET_Type;
  85. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  86. #define MCLK_INTENSET_OFFSET (0x02) /**< (MCLK_INTENSET) Interrupt Enable Set Offset */
  87. #define MCLK_INTENSET_RESETVALUE _U_(0x00) /**< (MCLK_INTENSET) Interrupt Enable Set Reset Value */
  88. #define MCLK_INTENSET_CKRDY_Pos 0 /**< (MCLK_INTENSET) Clock Ready Interrupt Enable Position */
  89. #define MCLK_INTENSET_CKRDY_Msk (_U_(0x1) << MCLK_INTENSET_CKRDY_Pos) /**< (MCLK_INTENSET) Clock Ready Interrupt Enable Mask */
  90. #define MCLK_INTENSET_CKRDY MCLK_INTENSET_CKRDY_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_INTENSET_CKRDY_Msk instead */
  91. #define MCLK_INTENSET_MASK _U_(0x01) /**< \deprecated (MCLK_INTENSET) Register MASK (Use MCLK_INTENSET_Msk instead) */
  92. #define MCLK_INTENSET_Msk _U_(0x01) /**< (MCLK_INTENSET) Register Mask */
  93. /* -------- MCLK_INTFLAG : (MCLK Offset: 0x03) (R/W 8) Interrupt Flag Status and Clear -------- */
  94. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  95. typedef union { // __I to avoid read-modify-write on write-to-clear register
  96. struct {
  97. __I uint8_t CKRDY:1; /**< bit: 0 Clock Ready */
  98. __I uint8_t :7; /**< bit: 1..7 Reserved */
  99. } bit; /**< Structure used for bit access */
  100. uint8_t reg; /**< Type used for register access */
  101. } MCLK_INTFLAG_Type;
  102. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  103. #define MCLK_INTFLAG_OFFSET (0x03) /**< (MCLK_INTFLAG) Interrupt Flag Status and Clear Offset */
  104. #define MCLK_INTFLAG_RESETVALUE _U_(0x01) /**< (MCLK_INTFLAG) Interrupt Flag Status and Clear Reset Value */
  105. #define MCLK_INTFLAG_CKRDY_Pos 0 /**< (MCLK_INTFLAG) Clock Ready Position */
  106. #define MCLK_INTFLAG_CKRDY_Msk (_U_(0x1) << MCLK_INTFLAG_CKRDY_Pos) /**< (MCLK_INTFLAG) Clock Ready Mask */
  107. #define MCLK_INTFLAG_CKRDY MCLK_INTFLAG_CKRDY_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_INTFLAG_CKRDY_Msk instead */
  108. #define MCLK_INTFLAG_MASK _U_(0x01) /**< \deprecated (MCLK_INTFLAG) Register MASK (Use MCLK_INTFLAG_Msk instead) */
  109. #define MCLK_INTFLAG_Msk _U_(0x01) /**< (MCLK_INTFLAG) Register Mask */
  110. /* -------- MCLK_CPUDIV : (MCLK Offset: 0x04) (R/W 8) CPU Clock Division -------- */
  111. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  112. typedef union {
  113. struct {
  114. uint8_t CPUDIV:8; /**< bit: 0..7 CPU Clock Division Factor */
  115. } bit; /**< Structure used for bit access */
  116. uint8_t reg; /**< Type used for register access */
  117. } MCLK_CPUDIV_Type;
  118. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  119. #define MCLK_CPUDIV_OFFSET (0x04) /**< (MCLK_CPUDIV) CPU Clock Division Offset */
  120. #define MCLK_CPUDIV_RESETVALUE _U_(0x01) /**< (MCLK_CPUDIV) CPU Clock Division Reset Value */
  121. #define MCLK_CPUDIV_CPUDIV_Pos 0 /**< (MCLK_CPUDIV) CPU Clock Division Factor Position */
  122. #define MCLK_CPUDIV_CPUDIV_Msk (_U_(0xFF) << MCLK_CPUDIV_CPUDIV_Pos) /**< (MCLK_CPUDIV) CPU Clock Division Factor Mask */
  123. #define MCLK_CPUDIV_CPUDIV(value) (MCLK_CPUDIV_CPUDIV_Msk & ((value) << MCLK_CPUDIV_CPUDIV_Pos))
  124. #define MCLK_CPUDIV_CPUDIV_DIV1_Val _U_(0x1) /**< (MCLK_CPUDIV) Divide by 1 */
  125. #define MCLK_CPUDIV_CPUDIV_DIV2_Val _U_(0x2) /**< (MCLK_CPUDIV) Divide by 2 */
  126. #define MCLK_CPUDIV_CPUDIV_DIV4_Val _U_(0x4) /**< (MCLK_CPUDIV) Divide by 4 */
  127. #define MCLK_CPUDIV_CPUDIV_DIV8_Val _U_(0x8) /**< (MCLK_CPUDIV) Divide by 8 */
  128. #define MCLK_CPUDIV_CPUDIV_DIV16_Val _U_(0x10) /**< (MCLK_CPUDIV) Divide by 16 */
  129. #define MCLK_CPUDIV_CPUDIV_DIV32_Val _U_(0x20) /**< (MCLK_CPUDIV) Divide by 32 */
  130. #define MCLK_CPUDIV_CPUDIV_DIV64_Val _U_(0x40) /**< (MCLK_CPUDIV) Divide by 64 */
  131. #define MCLK_CPUDIV_CPUDIV_DIV128_Val _U_(0x80) /**< (MCLK_CPUDIV) Divide by 128 */
  132. #define MCLK_CPUDIV_CPUDIV_DIV1 (MCLK_CPUDIV_CPUDIV_DIV1_Val << MCLK_CPUDIV_CPUDIV_Pos) /**< (MCLK_CPUDIV) Divide by 1 Position */
  133. #define MCLK_CPUDIV_CPUDIV_DIV2 (MCLK_CPUDIV_CPUDIV_DIV2_Val << MCLK_CPUDIV_CPUDIV_Pos) /**< (MCLK_CPUDIV) Divide by 2 Position */
  134. #define MCLK_CPUDIV_CPUDIV_DIV4 (MCLK_CPUDIV_CPUDIV_DIV4_Val << MCLK_CPUDIV_CPUDIV_Pos) /**< (MCLK_CPUDIV) Divide by 4 Position */
  135. #define MCLK_CPUDIV_CPUDIV_DIV8 (MCLK_CPUDIV_CPUDIV_DIV8_Val << MCLK_CPUDIV_CPUDIV_Pos) /**< (MCLK_CPUDIV) Divide by 8 Position */
  136. #define MCLK_CPUDIV_CPUDIV_DIV16 (MCLK_CPUDIV_CPUDIV_DIV16_Val << MCLK_CPUDIV_CPUDIV_Pos) /**< (MCLK_CPUDIV) Divide by 16 Position */
  137. #define MCLK_CPUDIV_CPUDIV_DIV32 (MCLK_CPUDIV_CPUDIV_DIV32_Val << MCLK_CPUDIV_CPUDIV_Pos) /**< (MCLK_CPUDIV) Divide by 32 Position */
  138. #define MCLK_CPUDIV_CPUDIV_DIV64 (MCLK_CPUDIV_CPUDIV_DIV64_Val << MCLK_CPUDIV_CPUDIV_Pos) /**< (MCLK_CPUDIV) Divide by 64 Position */
  139. #define MCLK_CPUDIV_CPUDIV_DIV128 (MCLK_CPUDIV_CPUDIV_DIV128_Val << MCLK_CPUDIV_CPUDIV_Pos) /**< (MCLK_CPUDIV) Divide by 128 Position */
  140. #define MCLK_CPUDIV_MASK _U_(0xFF) /**< \deprecated (MCLK_CPUDIV) Register MASK (Use MCLK_CPUDIV_Msk instead) */
  141. #define MCLK_CPUDIV_Msk _U_(0xFF) /**< (MCLK_CPUDIV) Register Mask */
  142. /* -------- MCLK_AHBMASK : (MCLK Offset: 0x10) (R/W 32) AHB Mask -------- */
  143. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  144. typedef union {
  145. struct {
  146. uint32_t HPB0_:1; /**< bit: 0 HPB0 AHB Clock Mask */
  147. uint32_t HPB1_:1; /**< bit: 1 HPB1 AHB Clock Mask */
  148. uint32_t HPB2_:1; /**< bit: 2 HPB2 AHB Clock Mask */
  149. uint32_t DMAC_:1; /**< bit: 3 DMAC AHB Clock Mask */
  150. uint32_t DSU_:1; /**< bit: 4 DSU AHB Clock Mask */
  151. uint32_t :1; /**< bit: 5 Reserved */
  152. uint32_t PAC_:1; /**< bit: 6 PAC AHB Clock Mask */
  153. uint32_t NVMCTRL_:1; /**< bit: 7 NVMCTRL AHB Clock Mask */
  154. uint32_t :4; /**< bit: 8..11 Reserved */
  155. uint32_t TRAM_:1; /**< bit: 12 TRAM AHB Clock Mask */
  156. uint32_t :19; /**< bit: 13..31 Reserved */
  157. } bit; /**< Structure used for bit access */
  158. uint32_t reg; /**< Type used for register access */
  159. } MCLK_AHBMASK_Type;
  160. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  161. #define MCLK_AHBMASK_OFFSET (0x10) /**< (MCLK_AHBMASK) AHB Mask Offset */
  162. #define MCLK_AHBMASK_RESETVALUE _U_(0x1FFF) /**< (MCLK_AHBMASK) AHB Mask Reset Value */
  163. #define MCLK_AHBMASK_HPB0_Pos 0 /**< (MCLK_AHBMASK) HPB0 AHB Clock Mask Position */
  164. #define MCLK_AHBMASK_HPB0_Msk (_U_(0x1) << MCLK_AHBMASK_HPB0_Pos) /**< (MCLK_AHBMASK) HPB0 AHB Clock Mask Mask */
  165. #define MCLK_AHBMASK_HPB0 MCLK_AHBMASK_HPB0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_AHBMASK_HPB0_Msk instead */
  166. #define MCLK_AHBMASK_HPB1_Pos 1 /**< (MCLK_AHBMASK) HPB1 AHB Clock Mask Position */
  167. #define MCLK_AHBMASK_HPB1_Msk (_U_(0x1) << MCLK_AHBMASK_HPB1_Pos) /**< (MCLK_AHBMASK) HPB1 AHB Clock Mask Mask */
  168. #define MCLK_AHBMASK_HPB1 MCLK_AHBMASK_HPB1_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_AHBMASK_HPB1_Msk instead */
  169. #define MCLK_AHBMASK_HPB2_Pos 2 /**< (MCLK_AHBMASK) HPB2 AHB Clock Mask Position */
  170. #define MCLK_AHBMASK_HPB2_Msk (_U_(0x1) << MCLK_AHBMASK_HPB2_Pos) /**< (MCLK_AHBMASK) HPB2 AHB Clock Mask Mask */
  171. #define MCLK_AHBMASK_HPB2 MCLK_AHBMASK_HPB2_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_AHBMASK_HPB2_Msk instead */
  172. #define MCLK_AHBMASK_DMAC_Pos 3 /**< (MCLK_AHBMASK) DMAC AHB Clock Mask Position */
  173. #define MCLK_AHBMASK_DMAC_Msk (_U_(0x1) << MCLK_AHBMASK_DMAC_Pos) /**< (MCLK_AHBMASK) DMAC AHB Clock Mask Mask */
  174. #define MCLK_AHBMASK_DMAC MCLK_AHBMASK_DMAC_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_AHBMASK_DMAC_Msk instead */
  175. #define MCLK_AHBMASK_DSU_Pos 4 /**< (MCLK_AHBMASK) DSU AHB Clock Mask Position */
  176. #define MCLK_AHBMASK_DSU_Msk (_U_(0x1) << MCLK_AHBMASK_DSU_Pos) /**< (MCLK_AHBMASK) DSU AHB Clock Mask Mask */
  177. #define MCLK_AHBMASK_DSU MCLK_AHBMASK_DSU_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_AHBMASK_DSU_Msk instead */
  178. #define MCLK_AHBMASK_PAC_Pos 6 /**< (MCLK_AHBMASK) PAC AHB Clock Mask Position */
  179. #define MCLK_AHBMASK_PAC_Msk (_U_(0x1) << MCLK_AHBMASK_PAC_Pos) /**< (MCLK_AHBMASK) PAC AHB Clock Mask Mask */
  180. #define MCLK_AHBMASK_PAC MCLK_AHBMASK_PAC_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_AHBMASK_PAC_Msk instead */
  181. #define MCLK_AHBMASK_NVMCTRL_Pos 7 /**< (MCLK_AHBMASK) NVMCTRL AHB Clock Mask Position */
  182. #define MCLK_AHBMASK_NVMCTRL_Msk (_U_(0x1) << MCLK_AHBMASK_NVMCTRL_Pos) /**< (MCLK_AHBMASK) NVMCTRL AHB Clock Mask Mask */
  183. #define MCLK_AHBMASK_NVMCTRL MCLK_AHBMASK_NVMCTRL_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_AHBMASK_NVMCTRL_Msk instead */
  184. #define MCLK_AHBMASK_TRAM_Pos 12 /**< (MCLK_AHBMASK) TRAM AHB Clock Mask Position */
  185. #define MCLK_AHBMASK_TRAM_Msk (_U_(0x1) << MCLK_AHBMASK_TRAM_Pos) /**< (MCLK_AHBMASK) TRAM AHB Clock Mask Mask */
  186. #define MCLK_AHBMASK_TRAM MCLK_AHBMASK_TRAM_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_AHBMASK_TRAM_Msk instead */
  187. #define MCLK_AHBMASK_MASK _U_(0x10DF) /**< \deprecated (MCLK_AHBMASK) Register MASK (Use MCLK_AHBMASK_Msk instead) */
  188. #define MCLK_AHBMASK_Msk _U_(0x10DF) /**< (MCLK_AHBMASK) Register Mask */
  189. #define MCLK_AHBMASK_HPB_Pos 0 /**< (MCLK_AHBMASK Position) HPBx AHB Clock Mask */
  190. #define MCLK_AHBMASK_HPB_Msk (_U_(0x7) << MCLK_AHBMASK_HPB_Pos) /**< (MCLK_AHBMASK Mask) HPB */
  191. #define MCLK_AHBMASK_HPB(value) (MCLK_AHBMASK_HPB_Msk & ((value) << MCLK_AHBMASK_HPB_Pos))
  192. /* -------- MCLK_APBAMASK : (MCLK Offset: 0x14) (R/W 32) APBA Mask -------- */
  193. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  194. typedef union {
  195. struct {
  196. uint32_t PAC_:1; /**< bit: 0 PAC APB Clock Enable */
  197. uint32_t PM_:1; /**< bit: 1 PM APB Clock Enable */
  198. uint32_t MCLK_:1; /**< bit: 2 MCLK APB Clock Enable */
  199. uint32_t RSTC_:1; /**< bit: 3 RSTC APB Clock Enable */
  200. uint32_t OSCCTRL_:1; /**< bit: 4 OSCCTRL APB Clock Enable */
  201. uint32_t OSC32KCTRL_:1; /**< bit: 5 OSC32KCTRL APB Clock Enable */
  202. uint32_t SUPC_:1; /**< bit: 6 SUPC APB Clock Enable */
  203. uint32_t GCLK_:1; /**< bit: 7 GCLK APB Clock Enable */
  204. uint32_t WDT_:1; /**< bit: 8 WDT APB Clock Enable */
  205. uint32_t RTC_:1; /**< bit: 9 RTC APB Clock Enable */
  206. uint32_t EIC_:1; /**< bit: 10 EIC APB Clock Enable */
  207. uint32_t FREQM_:1; /**< bit: 11 FREQM APB Clock Enable */
  208. uint32_t PORT_:1; /**< bit: 12 PORT APB Clock Enable */
  209. uint32_t AC_:1; /**< bit: 13 AC APB Clock Enable */
  210. uint32_t :18; /**< bit: 14..31 Reserved */
  211. } bit; /**< Structure used for bit access */
  212. uint32_t reg; /**< Type used for register access */
  213. } MCLK_APBAMASK_Type;
  214. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  215. #define MCLK_APBAMASK_OFFSET (0x14) /**< (MCLK_APBAMASK) APBA Mask Offset */
  216. #define MCLK_APBAMASK_RESETVALUE _U_(0x7FFF) /**< (MCLK_APBAMASK) APBA Mask Reset Value */
  217. #define MCLK_APBAMASK_PAC_Pos 0 /**< (MCLK_APBAMASK) PAC APB Clock Enable Position */
  218. #define MCLK_APBAMASK_PAC_Msk (_U_(0x1) << MCLK_APBAMASK_PAC_Pos) /**< (MCLK_APBAMASK) PAC APB Clock Enable Mask */
  219. #define MCLK_APBAMASK_PAC MCLK_APBAMASK_PAC_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBAMASK_PAC_Msk instead */
  220. #define MCLK_APBAMASK_PM_Pos 1 /**< (MCLK_APBAMASK) PM APB Clock Enable Position */
  221. #define MCLK_APBAMASK_PM_Msk (_U_(0x1) << MCLK_APBAMASK_PM_Pos) /**< (MCLK_APBAMASK) PM APB Clock Enable Mask */
  222. #define MCLK_APBAMASK_PM MCLK_APBAMASK_PM_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBAMASK_PM_Msk instead */
  223. #define MCLK_APBAMASK_MCLK_Pos 2 /**< (MCLK_APBAMASK) MCLK APB Clock Enable Position */
  224. #define MCLK_APBAMASK_MCLK_Msk (_U_(0x1) << MCLK_APBAMASK_MCLK_Pos) /**< (MCLK_APBAMASK) MCLK APB Clock Enable Mask */
  225. #define MCLK_APBAMASK_MCLK MCLK_APBAMASK_MCLK_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBAMASK_MCLK_Msk instead */
  226. #define MCLK_APBAMASK_RSTC_Pos 3 /**< (MCLK_APBAMASK) RSTC APB Clock Enable Position */
  227. #define MCLK_APBAMASK_RSTC_Msk (_U_(0x1) << MCLK_APBAMASK_RSTC_Pos) /**< (MCLK_APBAMASK) RSTC APB Clock Enable Mask */
  228. #define MCLK_APBAMASK_RSTC MCLK_APBAMASK_RSTC_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBAMASK_RSTC_Msk instead */
  229. #define MCLK_APBAMASK_OSCCTRL_Pos 4 /**< (MCLK_APBAMASK) OSCCTRL APB Clock Enable Position */
  230. #define MCLK_APBAMASK_OSCCTRL_Msk (_U_(0x1) << MCLK_APBAMASK_OSCCTRL_Pos) /**< (MCLK_APBAMASK) OSCCTRL APB Clock Enable Mask */
  231. #define MCLK_APBAMASK_OSCCTRL MCLK_APBAMASK_OSCCTRL_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBAMASK_OSCCTRL_Msk instead */
  232. #define MCLK_APBAMASK_OSC32KCTRL_Pos 5 /**< (MCLK_APBAMASK) OSC32KCTRL APB Clock Enable Position */
  233. #define MCLK_APBAMASK_OSC32KCTRL_Msk (_U_(0x1) << MCLK_APBAMASK_OSC32KCTRL_Pos) /**< (MCLK_APBAMASK) OSC32KCTRL APB Clock Enable Mask */
  234. #define MCLK_APBAMASK_OSC32KCTRL MCLK_APBAMASK_OSC32KCTRL_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBAMASK_OSC32KCTRL_Msk instead */
  235. #define MCLK_APBAMASK_SUPC_Pos 6 /**< (MCLK_APBAMASK) SUPC APB Clock Enable Position */
  236. #define MCLK_APBAMASK_SUPC_Msk (_U_(0x1) << MCLK_APBAMASK_SUPC_Pos) /**< (MCLK_APBAMASK) SUPC APB Clock Enable Mask */
  237. #define MCLK_APBAMASK_SUPC MCLK_APBAMASK_SUPC_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBAMASK_SUPC_Msk instead */
  238. #define MCLK_APBAMASK_GCLK_Pos 7 /**< (MCLK_APBAMASK) GCLK APB Clock Enable Position */
  239. #define MCLK_APBAMASK_GCLK_Msk (_U_(0x1) << MCLK_APBAMASK_GCLK_Pos) /**< (MCLK_APBAMASK) GCLK APB Clock Enable Mask */
  240. #define MCLK_APBAMASK_GCLK MCLK_APBAMASK_GCLK_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBAMASK_GCLK_Msk instead */
  241. #define MCLK_APBAMASK_WDT_Pos 8 /**< (MCLK_APBAMASK) WDT APB Clock Enable Position */
  242. #define MCLK_APBAMASK_WDT_Msk (_U_(0x1) << MCLK_APBAMASK_WDT_Pos) /**< (MCLK_APBAMASK) WDT APB Clock Enable Mask */
  243. #define MCLK_APBAMASK_WDT MCLK_APBAMASK_WDT_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBAMASK_WDT_Msk instead */
  244. #define MCLK_APBAMASK_RTC_Pos 9 /**< (MCLK_APBAMASK) RTC APB Clock Enable Position */
  245. #define MCLK_APBAMASK_RTC_Msk (_U_(0x1) << MCLK_APBAMASK_RTC_Pos) /**< (MCLK_APBAMASK) RTC APB Clock Enable Mask */
  246. #define MCLK_APBAMASK_RTC MCLK_APBAMASK_RTC_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBAMASK_RTC_Msk instead */
  247. #define MCLK_APBAMASK_EIC_Pos 10 /**< (MCLK_APBAMASK) EIC APB Clock Enable Position */
  248. #define MCLK_APBAMASK_EIC_Msk (_U_(0x1) << MCLK_APBAMASK_EIC_Pos) /**< (MCLK_APBAMASK) EIC APB Clock Enable Mask */
  249. #define MCLK_APBAMASK_EIC MCLK_APBAMASK_EIC_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBAMASK_EIC_Msk instead */
  250. #define MCLK_APBAMASK_FREQM_Pos 11 /**< (MCLK_APBAMASK) FREQM APB Clock Enable Position */
  251. #define MCLK_APBAMASK_FREQM_Msk (_U_(0x1) << MCLK_APBAMASK_FREQM_Pos) /**< (MCLK_APBAMASK) FREQM APB Clock Enable Mask */
  252. #define MCLK_APBAMASK_FREQM MCLK_APBAMASK_FREQM_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBAMASK_FREQM_Msk instead */
  253. #define MCLK_APBAMASK_PORT_Pos 12 /**< (MCLK_APBAMASK) PORT APB Clock Enable Position */
  254. #define MCLK_APBAMASK_PORT_Msk (_U_(0x1) << MCLK_APBAMASK_PORT_Pos) /**< (MCLK_APBAMASK) PORT APB Clock Enable Mask */
  255. #define MCLK_APBAMASK_PORT MCLK_APBAMASK_PORT_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBAMASK_PORT_Msk instead */
  256. #define MCLK_APBAMASK_AC_Pos 13 /**< (MCLK_APBAMASK) AC APB Clock Enable Position */
  257. #define MCLK_APBAMASK_AC_Msk (_U_(0x1) << MCLK_APBAMASK_AC_Pos) /**< (MCLK_APBAMASK) AC APB Clock Enable Mask */
  258. #define MCLK_APBAMASK_AC MCLK_APBAMASK_AC_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBAMASK_AC_Msk instead */
  259. #define MCLK_APBAMASK_MASK _U_(0x3FFF) /**< \deprecated (MCLK_APBAMASK) Register MASK (Use MCLK_APBAMASK_Msk instead) */
  260. #define MCLK_APBAMASK_Msk _U_(0x3FFF) /**< (MCLK_APBAMASK) Register Mask */
  261. /* -------- MCLK_APBBMASK : (MCLK Offset: 0x18) (R/W 32) APBB Mask -------- */
  262. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  263. typedef union {
  264. struct {
  265. uint32_t IDAU_:1; /**< bit: 0 IDAU APB Clock Enable */
  266. uint32_t DSU_:1; /**< bit: 1 DSU APB Clock Enable */
  267. uint32_t NVMCTRL_:1; /**< bit: 2 NVMCTRL APB Clock Enable */
  268. uint32_t :29; /**< bit: 3..31 Reserved */
  269. } bit; /**< Structure used for bit access */
  270. uint32_t reg; /**< Type used for register access */
  271. } MCLK_APBBMASK_Type;
  272. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  273. #define MCLK_APBBMASK_OFFSET (0x18) /**< (MCLK_APBBMASK) APBB Mask Offset */
  274. #define MCLK_APBBMASK_RESETVALUE _U_(0x17) /**< (MCLK_APBBMASK) APBB Mask Reset Value */
  275. #define MCLK_APBBMASK_IDAU_Pos 0 /**< (MCLK_APBBMASK) IDAU APB Clock Enable Position */
  276. #define MCLK_APBBMASK_IDAU_Msk (_U_(0x1) << MCLK_APBBMASK_IDAU_Pos) /**< (MCLK_APBBMASK) IDAU APB Clock Enable Mask */
  277. #define MCLK_APBBMASK_IDAU MCLK_APBBMASK_IDAU_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBBMASK_IDAU_Msk instead */
  278. #define MCLK_APBBMASK_DSU_Pos 1 /**< (MCLK_APBBMASK) DSU APB Clock Enable Position */
  279. #define MCLK_APBBMASK_DSU_Msk (_U_(0x1) << MCLK_APBBMASK_DSU_Pos) /**< (MCLK_APBBMASK) DSU APB Clock Enable Mask */
  280. #define MCLK_APBBMASK_DSU MCLK_APBBMASK_DSU_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBBMASK_DSU_Msk instead */
  281. #define MCLK_APBBMASK_NVMCTRL_Pos 2 /**< (MCLK_APBBMASK) NVMCTRL APB Clock Enable Position */
  282. #define MCLK_APBBMASK_NVMCTRL_Msk (_U_(0x1) << MCLK_APBBMASK_NVMCTRL_Pos) /**< (MCLK_APBBMASK) NVMCTRL APB Clock Enable Mask */
  283. #define MCLK_APBBMASK_NVMCTRL MCLK_APBBMASK_NVMCTRL_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBBMASK_NVMCTRL_Msk instead */
  284. #define MCLK_APBBMASK_MASK _U_(0x07) /**< \deprecated (MCLK_APBBMASK) Register MASK (Use MCLK_APBBMASK_Msk instead) */
  285. #define MCLK_APBBMASK_Msk _U_(0x07) /**< (MCLK_APBBMASK) Register Mask */
  286. /* -------- MCLK_APBCMASK : (MCLK Offset: 0x1c) (R/W 32) APBC Mask -------- */
  287. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  288. typedef union {
  289. struct {
  290. uint32_t EVSYS_:1; /**< bit: 0 EVSYS APB Clock Enable */
  291. uint32_t SERCOM0_:1; /**< bit: 1 SERCOM0 APB Clock Enable */
  292. uint32_t SERCOM1_:1; /**< bit: 2 SERCOM1 APB Clock Enable */
  293. uint32_t SERCOM2_:1; /**< bit: 3 SERCOM2 APB Clock Enable */
  294. uint32_t TC0_:1; /**< bit: 4 TC0 APB Clock Enable */
  295. uint32_t TC1_:1; /**< bit: 5 TC1 APB Clock Enable */
  296. uint32_t TC2_:1; /**< bit: 6 TC2 APB Clock Enable */
  297. uint32_t ADC_:1; /**< bit: 7 ADC APB Clock Enable */
  298. uint32_t DAC_:1; /**< bit: 8 DAC APB Clock Enable */
  299. uint32_t PTC_:1; /**< bit: 9 PTC APB Clock Enable */
  300. uint32_t TRNG_:1; /**< bit: 10 TRNG APB Clock Enable */
  301. uint32_t CCL_:1; /**< bit: 11 CCL APB Clock Enable */
  302. uint32_t OPAMP_:1; /**< bit: 12 OPAMP APB Clock Enable */
  303. uint32_t :19; /**< bit: 13..31 Reserved */
  304. } bit; /**< Structure used for bit access */
  305. uint32_t reg; /**< Type used for register access */
  306. } MCLK_APBCMASK_Type;
  307. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  308. #define MCLK_APBCMASK_OFFSET (0x1C) /**< (MCLK_APBCMASK) APBC Mask Offset */
  309. #define MCLK_APBCMASK_RESETVALUE _U_(0x1FFF) /**< (MCLK_APBCMASK) APBC Mask Reset Value */
  310. #define MCLK_APBCMASK_EVSYS_Pos 0 /**< (MCLK_APBCMASK) EVSYS APB Clock Enable Position */
  311. #define MCLK_APBCMASK_EVSYS_Msk (_U_(0x1) << MCLK_APBCMASK_EVSYS_Pos) /**< (MCLK_APBCMASK) EVSYS APB Clock Enable Mask */
  312. #define MCLK_APBCMASK_EVSYS MCLK_APBCMASK_EVSYS_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBCMASK_EVSYS_Msk instead */
  313. #define MCLK_APBCMASK_SERCOM0_Pos 1 /**< (MCLK_APBCMASK) SERCOM0 APB Clock Enable Position */
  314. #define MCLK_APBCMASK_SERCOM0_Msk (_U_(0x1) << MCLK_APBCMASK_SERCOM0_Pos) /**< (MCLK_APBCMASK) SERCOM0 APB Clock Enable Mask */
  315. #define MCLK_APBCMASK_SERCOM0 MCLK_APBCMASK_SERCOM0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBCMASK_SERCOM0_Msk instead */
  316. #define MCLK_APBCMASK_SERCOM1_Pos 2 /**< (MCLK_APBCMASK) SERCOM1 APB Clock Enable Position */
  317. #define MCLK_APBCMASK_SERCOM1_Msk (_U_(0x1) << MCLK_APBCMASK_SERCOM1_Pos) /**< (MCLK_APBCMASK) SERCOM1 APB Clock Enable Mask */
  318. #define MCLK_APBCMASK_SERCOM1 MCLK_APBCMASK_SERCOM1_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBCMASK_SERCOM1_Msk instead */
  319. #define MCLK_APBCMASK_SERCOM2_Pos 3 /**< (MCLK_APBCMASK) SERCOM2 APB Clock Enable Position */
  320. #define MCLK_APBCMASK_SERCOM2_Msk (_U_(0x1) << MCLK_APBCMASK_SERCOM2_Pos) /**< (MCLK_APBCMASK) SERCOM2 APB Clock Enable Mask */
  321. #define MCLK_APBCMASK_SERCOM2 MCLK_APBCMASK_SERCOM2_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBCMASK_SERCOM2_Msk instead */
  322. #define MCLK_APBCMASK_TC0_Pos 4 /**< (MCLK_APBCMASK) TC0 APB Clock Enable Position */
  323. #define MCLK_APBCMASK_TC0_Msk (_U_(0x1) << MCLK_APBCMASK_TC0_Pos) /**< (MCLK_APBCMASK) TC0 APB Clock Enable Mask */
  324. #define MCLK_APBCMASK_TC0 MCLK_APBCMASK_TC0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBCMASK_TC0_Msk instead */
  325. #define MCLK_APBCMASK_TC1_Pos 5 /**< (MCLK_APBCMASK) TC1 APB Clock Enable Position */
  326. #define MCLK_APBCMASK_TC1_Msk (_U_(0x1) << MCLK_APBCMASK_TC1_Pos) /**< (MCLK_APBCMASK) TC1 APB Clock Enable Mask */
  327. #define MCLK_APBCMASK_TC1 MCLK_APBCMASK_TC1_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBCMASK_TC1_Msk instead */
  328. #define MCLK_APBCMASK_TC2_Pos 6 /**< (MCLK_APBCMASK) TC2 APB Clock Enable Position */
  329. #define MCLK_APBCMASK_TC2_Msk (_U_(0x1) << MCLK_APBCMASK_TC2_Pos) /**< (MCLK_APBCMASK) TC2 APB Clock Enable Mask */
  330. #define MCLK_APBCMASK_TC2 MCLK_APBCMASK_TC2_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBCMASK_TC2_Msk instead */
  331. #define MCLK_APBCMASK_ADC_Pos 7 /**< (MCLK_APBCMASK) ADC APB Clock Enable Position */
  332. #define MCLK_APBCMASK_ADC_Msk (_U_(0x1) << MCLK_APBCMASK_ADC_Pos) /**< (MCLK_APBCMASK) ADC APB Clock Enable Mask */
  333. #define MCLK_APBCMASK_ADC MCLK_APBCMASK_ADC_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBCMASK_ADC_Msk instead */
  334. #define MCLK_APBCMASK_DAC_Pos 8 /**< (MCLK_APBCMASK) DAC APB Clock Enable Position */
  335. #define MCLK_APBCMASK_DAC_Msk (_U_(0x1) << MCLK_APBCMASK_DAC_Pos) /**< (MCLK_APBCMASK) DAC APB Clock Enable Mask */
  336. #define MCLK_APBCMASK_DAC MCLK_APBCMASK_DAC_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBCMASK_DAC_Msk instead */
  337. #define MCLK_APBCMASK_PTC_Pos 9 /**< (MCLK_APBCMASK) PTC APB Clock Enable Position */
  338. #define MCLK_APBCMASK_PTC_Msk (_U_(0x1) << MCLK_APBCMASK_PTC_Pos) /**< (MCLK_APBCMASK) PTC APB Clock Enable Mask */
  339. #define MCLK_APBCMASK_PTC MCLK_APBCMASK_PTC_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBCMASK_PTC_Msk instead */
  340. #define MCLK_APBCMASK_TRNG_Pos 10 /**< (MCLK_APBCMASK) TRNG APB Clock Enable Position */
  341. #define MCLK_APBCMASK_TRNG_Msk (_U_(0x1) << MCLK_APBCMASK_TRNG_Pos) /**< (MCLK_APBCMASK) TRNG APB Clock Enable Mask */
  342. #define MCLK_APBCMASK_TRNG MCLK_APBCMASK_TRNG_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBCMASK_TRNG_Msk instead */
  343. #define MCLK_APBCMASK_CCL_Pos 11 /**< (MCLK_APBCMASK) CCL APB Clock Enable Position */
  344. #define MCLK_APBCMASK_CCL_Msk (_U_(0x1) << MCLK_APBCMASK_CCL_Pos) /**< (MCLK_APBCMASK) CCL APB Clock Enable Mask */
  345. #define MCLK_APBCMASK_CCL MCLK_APBCMASK_CCL_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBCMASK_CCL_Msk instead */
  346. #define MCLK_APBCMASK_OPAMP_Pos 12 /**< (MCLK_APBCMASK) OPAMP APB Clock Enable Position */
  347. #define MCLK_APBCMASK_OPAMP_Msk (_U_(0x1) << MCLK_APBCMASK_OPAMP_Pos) /**< (MCLK_APBCMASK) OPAMP APB Clock Enable Mask */
  348. #define MCLK_APBCMASK_OPAMP MCLK_APBCMASK_OPAMP_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use MCLK_APBCMASK_OPAMP_Msk instead */
  349. #define MCLK_APBCMASK_MASK _U_(0x1FFF) /**< \deprecated (MCLK_APBCMASK) Register MASK (Use MCLK_APBCMASK_Msk instead) */
  350. #define MCLK_APBCMASK_Msk _U_(0x1FFF) /**< (MCLK_APBCMASK) Register Mask */
  351. #define MCLK_APBCMASK_SERCOM_Pos 1 /**< (MCLK_APBCMASK Position) SERCOMx APB Clock Enable */
  352. #define MCLK_APBCMASK_SERCOM_Msk (_U_(0x7) << MCLK_APBCMASK_SERCOM_Pos) /**< (MCLK_APBCMASK Mask) SERCOM */
  353. #define MCLK_APBCMASK_SERCOM(value) (MCLK_APBCMASK_SERCOM_Msk & ((value) << MCLK_APBCMASK_SERCOM_Pos))
  354. #define MCLK_APBCMASK_TC_Pos 4 /**< (MCLK_APBCMASK Position) TCx APB Clock Enable */
  355. #define MCLK_APBCMASK_TC_Msk (_U_(0x7) << MCLK_APBCMASK_TC_Pos) /**< (MCLK_APBCMASK Mask) TC */
  356. #define MCLK_APBCMASK_TC(value) (MCLK_APBCMASK_TC_Msk & ((value) << MCLK_APBCMASK_TC_Pos))
  357. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  358. /** \brief MCLK hardware registers */
  359. typedef struct { /* Main Clock */
  360. __IO MCLK_CTRLA_Type CTRLA; /**< Offset: 0x00 (R/W 8) Control */
  361. __IO MCLK_INTENCLR_Type INTENCLR; /**< Offset: 0x01 (R/W 8) Interrupt Enable Clear */
  362. __IO MCLK_INTENSET_Type INTENSET; /**< Offset: 0x02 (R/W 8) Interrupt Enable Set */
  363. __IO MCLK_INTFLAG_Type INTFLAG; /**< Offset: 0x03 (R/W 8) Interrupt Flag Status and Clear */
  364. __IO MCLK_CPUDIV_Type CPUDIV; /**< Offset: 0x04 (R/W 8) CPU Clock Division */
  365. __I uint8_t Reserved1[11];
  366. __IO MCLK_AHBMASK_Type AHBMASK; /**< Offset: 0x10 (R/W 32) AHB Mask */
  367. __IO MCLK_APBAMASK_Type APBAMASK; /**< Offset: 0x14 (R/W 32) APBA Mask */
  368. __IO MCLK_APBBMASK_Type APBBMASK; /**< Offset: 0x18 (R/W 32) APBB Mask */
  369. __IO MCLK_APBCMASK_Type APBCMASK; /**< Offset: 0x1C (R/W 32) APBC Mask */
  370. } Mclk;
  371. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  372. /** @} end of Main Clock */
  373. #endif /* _SAML11_MCLK_COMPONENT_H_ */