osc32kctrl.h 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. /**
  2. * \file
  3. *
  4. * \brief Component description for OSC32KCTRL
  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_OSC32KCTRL_COMPONENT_H_
  31. #define _SAML11_OSC32KCTRL_COMPONENT_H_
  32. #define _SAML11_OSC32KCTRL_COMPONENT_ /**< \deprecated Backward compatibility for ASF */
  33. /** \addtogroup SAML_SAML11 32k Oscillators Control
  34. * @{
  35. */
  36. /* ========================================================================== */
  37. /** SOFTWARE API DEFINITION FOR OSC32KCTRL */
  38. /* ========================================================================== */
  39. #define OSC32KCTRL_U2246 /**< (OSC32KCTRL) Module ID */
  40. #define REV_OSC32KCTRL 0x400 /**< (OSC32KCTRL) Module revision */
  41. /* -------- OSC32KCTRL_INTENCLR : (OSC32KCTRL Offset: 0x00) (R/W 32) Interrupt Enable Clear -------- */
  42. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  43. typedef union {
  44. struct {
  45. uint32_t XOSC32KRDY:1; /**< bit: 0 XOSC32K Ready Interrupt Enable */
  46. uint32_t :1; /**< bit: 1 Reserved */
  47. uint32_t CLKFAIL:1; /**< bit: 2 XOSC32K Clock Failure Detector Interrupt Enable */
  48. uint32_t :29; /**< bit: 3..31 Reserved */
  49. } bit; /**< Structure used for bit access */
  50. uint32_t reg; /**< Type used for register access */
  51. } OSC32KCTRL_INTENCLR_Type;
  52. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  53. #define OSC32KCTRL_INTENCLR_OFFSET (0x00) /**< (OSC32KCTRL_INTENCLR) Interrupt Enable Clear Offset */
  54. #define OSC32KCTRL_INTENCLR_RESETVALUE _U_(0x00) /**< (OSC32KCTRL_INTENCLR) Interrupt Enable Clear Reset Value */
  55. #define OSC32KCTRL_INTENCLR_XOSC32KRDY_Pos 0 /**< (OSC32KCTRL_INTENCLR) XOSC32K Ready Interrupt Enable Position */
  56. #define OSC32KCTRL_INTENCLR_XOSC32KRDY_Msk (_U_(0x1) << OSC32KCTRL_INTENCLR_XOSC32KRDY_Pos) /**< (OSC32KCTRL_INTENCLR) XOSC32K Ready Interrupt Enable Mask */
  57. #define OSC32KCTRL_INTENCLR_XOSC32KRDY OSC32KCTRL_INTENCLR_XOSC32KRDY_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_INTENCLR_XOSC32KRDY_Msk instead */
  58. #define OSC32KCTRL_INTENCLR_CLKFAIL_Pos 2 /**< (OSC32KCTRL_INTENCLR) XOSC32K Clock Failure Detector Interrupt Enable Position */
  59. #define OSC32KCTRL_INTENCLR_CLKFAIL_Msk (_U_(0x1) << OSC32KCTRL_INTENCLR_CLKFAIL_Pos) /**< (OSC32KCTRL_INTENCLR) XOSC32K Clock Failure Detector Interrupt Enable Mask */
  60. #define OSC32KCTRL_INTENCLR_CLKFAIL OSC32KCTRL_INTENCLR_CLKFAIL_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_INTENCLR_CLKFAIL_Msk instead */
  61. #define OSC32KCTRL_INTENCLR_MASK _U_(0x05) /**< \deprecated (OSC32KCTRL_INTENCLR) Register MASK (Use OSC32KCTRL_INTENCLR_Msk instead) */
  62. #define OSC32KCTRL_INTENCLR_Msk _U_(0x05) /**< (OSC32KCTRL_INTENCLR) Register Mask */
  63. /* -------- OSC32KCTRL_INTENSET : (OSC32KCTRL Offset: 0x04) (R/W 32) Interrupt Enable Set -------- */
  64. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  65. typedef union {
  66. struct {
  67. uint32_t XOSC32KRDY:1; /**< bit: 0 XOSC32K Ready Interrupt Enable */
  68. uint32_t :1; /**< bit: 1 Reserved */
  69. uint32_t CLKFAIL:1; /**< bit: 2 XOSC32K Clock Failure Detector Interrupt Enable */
  70. uint32_t :29; /**< bit: 3..31 Reserved */
  71. } bit; /**< Structure used for bit access */
  72. uint32_t reg; /**< Type used for register access */
  73. } OSC32KCTRL_INTENSET_Type;
  74. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  75. #define OSC32KCTRL_INTENSET_OFFSET (0x04) /**< (OSC32KCTRL_INTENSET) Interrupt Enable Set Offset */
  76. #define OSC32KCTRL_INTENSET_RESETVALUE _U_(0x00) /**< (OSC32KCTRL_INTENSET) Interrupt Enable Set Reset Value */
  77. #define OSC32KCTRL_INTENSET_XOSC32KRDY_Pos 0 /**< (OSC32KCTRL_INTENSET) XOSC32K Ready Interrupt Enable Position */
  78. #define OSC32KCTRL_INTENSET_XOSC32KRDY_Msk (_U_(0x1) << OSC32KCTRL_INTENSET_XOSC32KRDY_Pos) /**< (OSC32KCTRL_INTENSET) XOSC32K Ready Interrupt Enable Mask */
  79. #define OSC32KCTRL_INTENSET_XOSC32KRDY OSC32KCTRL_INTENSET_XOSC32KRDY_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_INTENSET_XOSC32KRDY_Msk instead */
  80. #define OSC32KCTRL_INTENSET_CLKFAIL_Pos 2 /**< (OSC32KCTRL_INTENSET) XOSC32K Clock Failure Detector Interrupt Enable Position */
  81. #define OSC32KCTRL_INTENSET_CLKFAIL_Msk (_U_(0x1) << OSC32KCTRL_INTENSET_CLKFAIL_Pos) /**< (OSC32KCTRL_INTENSET) XOSC32K Clock Failure Detector Interrupt Enable Mask */
  82. #define OSC32KCTRL_INTENSET_CLKFAIL OSC32KCTRL_INTENSET_CLKFAIL_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_INTENSET_CLKFAIL_Msk instead */
  83. #define OSC32KCTRL_INTENSET_MASK _U_(0x05) /**< \deprecated (OSC32KCTRL_INTENSET) Register MASK (Use OSC32KCTRL_INTENSET_Msk instead) */
  84. #define OSC32KCTRL_INTENSET_Msk _U_(0x05) /**< (OSC32KCTRL_INTENSET) Register Mask */
  85. /* -------- OSC32KCTRL_INTFLAG : (OSC32KCTRL Offset: 0x08) (R/W 32) Interrupt Flag Status and Clear -------- */
  86. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  87. typedef union { // __I to avoid read-modify-write on write-to-clear register
  88. struct {
  89. __I uint32_t XOSC32KRDY:1; /**< bit: 0 XOSC32K Ready */
  90. __I uint32_t :1; /**< bit: 1 Reserved */
  91. __I uint32_t CLKFAIL:1; /**< bit: 2 XOSC32K Clock Failure Detector */
  92. __I uint32_t :29; /**< bit: 3..31 Reserved */
  93. } bit; /**< Structure used for bit access */
  94. uint32_t reg; /**< Type used for register access */
  95. } OSC32KCTRL_INTFLAG_Type;
  96. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  97. #define OSC32KCTRL_INTFLAG_OFFSET (0x08) /**< (OSC32KCTRL_INTFLAG) Interrupt Flag Status and Clear Offset */
  98. #define OSC32KCTRL_INTFLAG_RESETVALUE _U_(0x00) /**< (OSC32KCTRL_INTFLAG) Interrupt Flag Status and Clear Reset Value */
  99. #define OSC32KCTRL_INTFLAG_XOSC32KRDY_Pos 0 /**< (OSC32KCTRL_INTFLAG) XOSC32K Ready Position */
  100. #define OSC32KCTRL_INTFLAG_XOSC32KRDY_Msk (_U_(0x1) << OSC32KCTRL_INTFLAG_XOSC32KRDY_Pos) /**< (OSC32KCTRL_INTFLAG) XOSC32K Ready Mask */
  101. #define OSC32KCTRL_INTFLAG_XOSC32KRDY OSC32KCTRL_INTFLAG_XOSC32KRDY_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_INTFLAG_XOSC32KRDY_Msk instead */
  102. #define OSC32KCTRL_INTFLAG_CLKFAIL_Pos 2 /**< (OSC32KCTRL_INTFLAG) XOSC32K Clock Failure Detector Position */
  103. #define OSC32KCTRL_INTFLAG_CLKFAIL_Msk (_U_(0x1) << OSC32KCTRL_INTFLAG_CLKFAIL_Pos) /**< (OSC32KCTRL_INTFLAG) XOSC32K Clock Failure Detector Mask */
  104. #define OSC32KCTRL_INTFLAG_CLKFAIL OSC32KCTRL_INTFLAG_CLKFAIL_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_INTFLAG_CLKFAIL_Msk instead */
  105. #define OSC32KCTRL_INTFLAG_MASK _U_(0x05) /**< \deprecated (OSC32KCTRL_INTFLAG) Register MASK (Use OSC32KCTRL_INTFLAG_Msk instead) */
  106. #define OSC32KCTRL_INTFLAG_Msk _U_(0x05) /**< (OSC32KCTRL_INTFLAG) Register Mask */
  107. /* -------- OSC32KCTRL_STATUS : (OSC32KCTRL Offset: 0x0c) (R/ 32) Power and Clocks Status -------- */
  108. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  109. typedef union {
  110. struct {
  111. uint32_t XOSC32KRDY:1; /**< bit: 0 XOSC32K Ready */
  112. uint32_t :1; /**< bit: 1 Reserved */
  113. uint32_t CLKFAIL:1; /**< bit: 2 XOSC32K Clock Failure Detector */
  114. uint32_t CLKSW:1; /**< bit: 3 XOSC32K Clock switch */
  115. uint32_t ULP32KSW:1; /**< bit: 4 OSCULP32K Clock Switch */
  116. uint32_t :27; /**< bit: 5..31 Reserved */
  117. } bit; /**< Structure used for bit access */
  118. uint32_t reg; /**< Type used for register access */
  119. } OSC32KCTRL_STATUS_Type;
  120. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  121. #define OSC32KCTRL_STATUS_OFFSET (0x0C) /**< (OSC32KCTRL_STATUS) Power and Clocks Status Offset */
  122. #define OSC32KCTRL_STATUS_RESETVALUE _U_(0x00) /**< (OSC32KCTRL_STATUS) Power and Clocks Status Reset Value */
  123. #define OSC32KCTRL_STATUS_XOSC32KRDY_Pos 0 /**< (OSC32KCTRL_STATUS) XOSC32K Ready Position */
  124. #define OSC32KCTRL_STATUS_XOSC32KRDY_Msk (_U_(0x1) << OSC32KCTRL_STATUS_XOSC32KRDY_Pos) /**< (OSC32KCTRL_STATUS) XOSC32K Ready Mask */
  125. #define OSC32KCTRL_STATUS_XOSC32KRDY OSC32KCTRL_STATUS_XOSC32KRDY_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_STATUS_XOSC32KRDY_Msk instead */
  126. #define OSC32KCTRL_STATUS_CLKFAIL_Pos 2 /**< (OSC32KCTRL_STATUS) XOSC32K Clock Failure Detector Position */
  127. #define OSC32KCTRL_STATUS_CLKFAIL_Msk (_U_(0x1) << OSC32KCTRL_STATUS_CLKFAIL_Pos) /**< (OSC32KCTRL_STATUS) XOSC32K Clock Failure Detector Mask */
  128. #define OSC32KCTRL_STATUS_CLKFAIL OSC32KCTRL_STATUS_CLKFAIL_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_STATUS_CLKFAIL_Msk instead */
  129. #define OSC32KCTRL_STATUS_CLKSW_Pos 3 /**< (OSC32KCTRL_STATUS) XOSC32K Clock switch Position */
  130. #define OSC32KCTRL_STATUS_CLKSW_Msk (_U_(0x1) << OSC32KCTRL_STATUS_CLKSW_Pos) /**< (OSC32KCTRL_STATUS) XOSC32K Clock switch Mask */
  131. #define OSC32KCTRL_STATUS_CLKSW OSC32KCTRL_STATUS_CLKSW_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_STATUS_CLKSW_Msk instead */
  132. #define OSC32KCTRL_STATUS_ULP32KSW_Pos 4 /**< (OSC32KCTRL_STATUS) OSCULP32K Clock Switch Position */
  133. #define OSC32KCTRL_STATUS_ULP32KSW_Msk (_U_(0x1) << OSC32KCTRL_STATUS_ULP32KSW_Pos) /**< (OSC32KCTRL_STATUS) OSCULP32K Clock Switch Mask */
  134. #define OSC32KCTRL_STATUS_ULP32KSW OSC32KCTRL_STATUS_ULP32KSW_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_STATUS_ULP32KSW_Msk instead */
  135. #define OSC32KCTRL_STATUS_MASK _U_(0x1D) /**< \deprecated (OSC32KCTRL_STATUS) Register MASK (Use OSC32KCTRL_STATUS_Msk instead) */
  136. #define OSC32KCTRL_STATUS_Msk _U_(0x1D) /**< (OSC32KCTRL_STATUS) Register Mask */
  137. /* -------- OSC32KCTRL_RTCCTRL : (OSC32KCTRL Offset: 0x10) (R/W 8) RTC Clock Selection -------- */
  138. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  139. typedef union {
  140. struct {
  141. uint8_t RTCSEL:3; /**< bit: 0..2 RTC Clock Selection */
  142. uint8_t :5; /**< bit: 3..7 Reserved */
  143. } bit; /**< Structure used for bit access */
  144. uint8_t reg; /**< Type used for register access */
  145. } OSC32KCTRL_RTCCTRL_Type;
  146. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  147. #define OSC32KCTRL_RTCCTRL_OFFSET (0x10) /**< (OSC32KCTRL_RTCCTRL) RTC Clock Selection Offset */
  148. #define OSC32KCTRL_RTCCTRL_RESETVALUE _U_(0x00) /**< (OSC32KCTRL_RTCCTRL) RTC Clock Selection Reset Value */
  149. #define OSC32KCTRL_RTCCTRL_RTCSEL_Pos 0 /**< (OSC32KCTRL_RTCCTRL) RTC Clock Selection Position */
  150. #define OSC32KCTRL_RTCCTRL_RTCSEL_Msk (_U_(0x7) << OSC32KCTRL_RTCCTRL_RTCSEL_Pos) /**< (OSC32KCTRL_RTCCTRL) RTC Clock Selection Mask */
  151. #define OSC32KCTRL_RTCCTRL_RTCSEL(value) (OSC32KCTRL_RTCCTRL_RTCSEL_Msk & ((value) << OSC32KCTRL_RTCCTRL_RTCSEL_Pos))
  152. #define OSC32KCTRL_RTCCTRL_RTCSEL_ULP1K_Val _U_(0x0) /**< (OSC32KCTRL_RTCCTRL) 1.024kHz from 32kHz internal ULP oscillator */
  153. #define OSC32KCTRL_RTCCTRL_RTCSEL_ULP32K_Val _U_(0x1) /**< (OSC32KCTRL_RTCCTRL) 32.768kHz from 32kHz internal ULP oscillator */
  154. #define OSC32KCTRL_RTCCTRL_RTCSEL_OSC1K_Val _U_(0x2) /**< (OSC32KCTRL_RTCCTRL) 1.024kHz from 32.768kHz internal oscillator */
  155. #define OSC32KCTRL_RTCCTRL_RTCSEL_OSC32K_Val _U_(0x3) /**< (OSC32KCTRL_RTCCTRL) 32.768kHz from 32.768kHz internal oscillator */
  156. #define OSC32KCTRL_RTCCTRL_RTCSEL_XOSC1K_Val _U_(0x4) /**< (OSC32KCTRL_RTCCTRL) 1.024kHz from 32.768kHz internal oscillator */
  157. #define OSC32KCTRL_RTCCTRL_RTCSEL_XOSC32K_Val _U_(0x5) /**< (OSC32KCTRL_RTCCTRL) 32.768kHz from 32.768kHz external crystal oscillator */
  158. #define OSC32KCTRL_RTCCTRL_RTCSEL_ULP1K (OSC32KCTRL_RTCCTRL_RTCSEL_ULP1K_Val << OSC32KCTRL_RTCCTRL_RTCSEL_Pos) /**< (OSC32KCTRL_RTCCTRL) 1.024kHz from 32kHz internal ULP oscillator Position */
  159. #define OSC32KCTRL_RTCCTRL_RTCSEL_ULP32K (OSC32KCTRL_RTCCTRL_RTCSEL_ULP32K_Val << OSC32KCTRL_RTCCTRL_RTCSEL_Pos) /**< (OSC32KCTRL_RTCCTRL) 32.768kHz from 32kHz internal ULP oscillator Position */
  160. #define OSC32KCTRL_RTCCTRL_RTCSEL_OSC1K (OSC32KCTRL_RTCCTRL_RTCSEL_OSC1K_Val << OSC32KCTRL_RTCCTRL_RTCSEL_Pos) /**< (OSC32KCTRL_RTCCTRL) 1.024kHz from 32.768kHz internal oscillator Position */
  161. #define OSC32KCTRL_RTCCTRL_RTCSEL_OSC32K (OSC32KCTRL_RTCCTRL_RTCSEL_OSC32K_Val << OSC32KCTRL_RTCCTRL_RTCSEL_Pos) /**< (OSC32KCTRL_RTCCTRL) 32.768kHz from 32.768kHz internal oscillator Position */
  162. #define OSC32KCTRL_RTCCTRL_RTCSEL_XOSC1K (OSC32KCTRL_RTCCTRL_RTCSEL_XOSC1K_Val << OSC32KCTRL_RTCCTRL_RTCSEL_Pos) /**< (OSC32KCTRL_RTCCTRL) 1.024kHz from 32.768kHz internal oscillator Position */
  163. #define OSC32KCTRL_RTCCTRL_RTCSEL_XOSC32K (OSC32KCTRL_RTCCTRL_RTCSEL_XOSC32K_Val << OSC32KCTRL_RTCCTRL_RTCSEL_Pos) /**< (OSC32KCTRL_RTCCTRL) 32.768kHz from 32.768kHz external crystal oscillator Position */
  164. #define OSC32KCTRL_RTCCTRL_MASK _U_(0x07) /**< \deprecated (OSC32KCTRL_RTCCTRL) Register MASK (Use OSC32KCTRL_RTCCTRL_Msk instead) */
  165. #define OSC32KCTRL_RTCCTRL_Msk _U_(0x07) /**< (OSC32KCTRL_RTCCTRL) Register Mask */
  166. /* -------- OSC32KCTRL_XOSC32K : (OSC32KCTRL Offset: 0x14) (R/W 16) 32kHz External Crystal Oscillator (XOSC32K) Control -------- */
  167. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  168. typedef union {
  169. struct {
  170. uint16_t :1; /**< bit: 0 Reserved */
  171. uint16_t ENABLE:1; /**< bit: 1 Oscillator Enable */
  172. uint16_t XTALEN:1; /**< bit: 2 Crystal Oscillator Enable */
  173. uint16_t EN32K:1; /**< bit: 3 32kHz Output Enable */
  174. uint16_t EN1K:1; /**< bit: 4 1kHz Output Enable */
  175. uint16_t :1; /**< bit: 5 Reserved */
  176. uint16_t RUNSTDBY:1; /**< bit: 6 Run in Standby */
  177. uint16_t ONDEMAND:1; /**< bit: 7 On Demand Control */
  178. uint16_t STARTUP:3; /**< bit: 8..10 Oscillator Start-Up Time */
  179. uint16_t :1; /**< bit: 11 Reserved */
  180. uint16_t WRTLOCK:1; /**< bit: 12 Write Lock */
  181. uint16_t :3; /**< bit: 13..15 Reserved */
  182. } bit; /**< Structure used for bit access */
  183. uint16_t reg; /**< Type used for register access */
  184. } OSC32KCTRL_XOSC32K_Type;
  185. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  186. #define OSC32KCTRL_XOSC32K_OFFSET (0x14) /**< (OSC32KCTRL_XOSC32K) 32kHz External Crystal Oscillator (XOSC32K) Control Offset */
  187. #define OSC32KCTRL_XOSC32K_RESETVALUE _U_(0x80) /**< (OSC32KCTRL_XOSC32K) 32kHz External Crystal Oscillator (XOSC32K) Control Reset Value */
  188. #define OSC32KCTRL_XOSC32K_ENABLE_Pos 1 /**< (OSC32KCTRL_XOSC32K) Oscillator Enable Position */
  189. #define OSC32KCTRL_XOSC32K_ENABLE_Msk (_U_(0x1) << OSC32KCTRL_XOSC32K_ENABLE_Pos) /**< (OSC32KCTRL_XOSC32K) Oscillator Enable Mask */
  190. #define OSC32KCTRL_XOSC32K_ENABLE OSC32KCTRL_XOSC32K_ENABLE_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_XOSC32K_ENABLE_Msk instead */
  191. #define OSC32KCTRL_XOSC32K_XTALEN_Pos 2 /**< (OSC32KCTRL_XOSC32K) Crystal Oscillator Enable Position */
  192. #define OSC32KCTRL_XOSC32K_XTALEN_Msk (_U_(0x1) << OSC32KCTRL_XOSC32K_XTALEN_Pos) /**< (OSC32KCTRL_XOSC32K) Crystal Oscillator Enable Mask */
  193. #define OSC32KCTRL_XOSC32K_XTALEN OSC32KCTRL_XOSC32K_XTALEN_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_XOSC32K_XTALEN_Msk instead */
  194. #define OSC32KCTRL_XOSC32K_EN32K_Pos 3 /**< (OSC32KCTRL_XOSC32K) 32kHz Output Enable Position */
  195. #define OSC32KCTRL_XOSC32K_EN32K_Msk (_U_(0x1) << OSC32KCTRL_XOSC32K_EN32K_Pos) /**< (OSC32KCTRL_XOSC32K) 32kHz Output Enable Mask */
  196. #define OSC32KCTRL_XOSC32K_EN32K OSC32KCTRL_XOSC32K_EN32K_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_XOSC32K_EN32K_Msk instead */
  197. #define OSC32KCTRL_XOSC32K_EN1K_Pos 4 /**< (OSC32KCTRL_XOSC32K) 1kHz Output Enable Position */
  198. #define OSC32KCTRL_XOSC32K_EN1K_Msk (_U_(0x1) << OSC32KCTRL_XOSC32K_EN1K_Pos) /**< (OSC32KCTRL_XOSC32K) 1kHz Output Enable Mask */
  199. #define OSC32KCTRL_XOSC32K_EN1K OSC32KCTRL_XOSC32K_EN1K_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_XOSC32K_EN1K_Msk instead */
  200. #define OSC32KCTRL_XOSC32K_RUNSTDBY_Pos 6 /**< (OSC32KCTRL_XOSC32K) Run in Standby Position */
  201. #define OSC32KCTRL_XOSC32K_RUNSTDBY_Msk (_U_(0x1) << OSC32KCTRL_XOSC32K_RUNSTDBY_Pos) /**< (OSC32KCTRL_XOSC32K) Run in Standby Mask */
  202. #define OSC32KCTRL_XOSC32K_RUNSTDBY OSC32KCTRL_XOSC32K_RUNSTDBY_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_XOSC32K_RUNSTDBY_Msk instead */
  203. #define OSC32KCTRL_XOSC32K_ONDEMAND_Pos 7 /**< (OSC32KCTRL_XOSC32K) On Demand Control Position */
  204. #define OSC32KCTRL_XOSC32K_ONDEMAND_Msk (_U_(0x1) << OSC32KCTRL_XOSC32K_ONDEMAND_Pos) /**< (OSC32KCTRL_XOSC32K) On Demand Control Mask */
  205. #define OSC32KCTRL_XOSC32K_ONDEMAND OSC32KCTRL_XOSC32K_ONDEMAND_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_XOSC32K_ONDEMAND_Msk instead */
  206. #define OSC32KCTRL_XOSC32K_STARTUP_Pos 8 /**< (OSC32KCTRL_XOSC32K) Oscillator Start-Up Time Position */
  207. #define OSC32KCTRL_XOSC32K_STARTUP_Msk (_U_(0x7) << OSC32KCTRL_XOSC32K_STARTUP_Pos) /**< (OSC32KCTRL_XOSC32K) Oscillator Start-Up Time Mask */
  208. #define OSC32KCTRL_XOSC32K_STARTUP(value) (OSC32KCTRL_XOSC32K_STARTUP_Msk & ((value) << OSC32KCTRL_XOSC32K_STARTUP_Pos))
  209. #define OSC32KCTRL_XOSC32K_WRTLOCK_Pos 12 /**< (OSC32KCTRL_XOSC32K) Write Lock Position */
  210. #define OSC32KCTRL_XOSC32K_WRTLOCK_Msk (_U_(0x1) << OSC32KCTRL_XOSC32K_WRTLOCK_Pos) /**< (OSC32KCTRL_XOSC32K) Write Lock Mask */
  211. #define OSC32KCTRL_XOSC32K_WRTLOCK OSC32KCTRL_XOSC32K_WRTLOCK_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_XOSC32K_WRTLOCK_Msk instead */
  212. #define OSC32KCTRL_XOSC32K_MASK _U_(0x17DE) /**< \deprecated (OSC32KCTRL_XOSC32K) Register MASK (Use OSC32KCTRL_XOSC32K_Msk instead) */
  213. #define OSC32KCTRL_XOSC32K_Msk _U_(0x17DE) /**< (OSC32KCTRL_XOSC32K) Register Mask */
  214. /* -------- OSC32KCTRL_CFDCTRL : (OSC32KCTRL Offset: 0x16) (R/W 8) Clock Failure Detector Control -------- */
  215. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  216. typedef union {
  217. struct {
  218. uint8_t CFDEN:1; /**< bit: 0 Clock Failure Detector Enable */
  219. uint8_t SWBACK:1; /**< bit: 1 Clock Switch Back */
  220. uint8_t CFDPRESC:1; /**< bit: 2 Clock Failure Detector Prescaler */
  221. uint8_t :5; /**< bit: 3..7 Reserved */
  222. } bit; /**< Structure used for bit access */
  223. uint8_t reg; /**< Type used for register access */
  224. } OSC32KCTRL_CFDCTRL_Type;
  225. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  226. #define OSC32KCTRL_CFDCTRL_OFFSET (0x16) /**< (OSC32KCTRL_CFDCTRL) Clock Failure Detector Control Offset */
  227. #define OSC32KCTRL_CFDCTRL_RESETVALUE _U_(0x00) /**< (OSC32KCTRL_CFDCTRL) Clock Failure Detector Control Reset Value */
  228. #define OSC32KCTRL_CFDCTRL_CFDEN_Pos 0 /**< (OSC32KCTRL_CFDCTRL) Clock Failure Detector Enable Position */
  229. #define OSC32KCTRL_CFDCTRL_CFDEN_Msk (_U_(0x1) << OSC32KCTRL_CFDCTRL_CFDEN_Pos) /**< (OSC32KCTRL_CFDCTRL) Clock Failure Detector Enable Mask */
  230. #define OSC32KCTRL_CFDCTRL_CFDEN OSC32KCTRL_CFDCTRL_CFDEN_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_CFDCTRL_CFDEN_Msk instead */
  231. #define OSC32KCTRL_CFDCTRL_SWBACK_Pos 1 /**< (OSC32KCTRL_CFDCTRL) Clock Switch Back Position */
  232. #define OSC32KCTRL_CFDCTRL_SWBACK_Msk (_U_(0x1) << OSC32KCTRL_CFDCTRL_SWBACK_Pos) /**< (OSC32KCTRL_CFDCTRL) Clock Switch Back Mask */
  233. #define OSC32KCTRL_CFDCTRL_SWBACK OSC32KCTRL_CFDCTRL_SWBACK_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_CFDCTRL_SWBACK_Msk instead */
  234. #define OSC32KCTRL_CFDCTRL_CFDPRESC_Pos 2 /**< (OSC32KCTRL_CFDCTRL) Clock Failure Detector Prescaler Position */
  235. #define OSC32KCTRL_CFDCTRL_CFDPRESC_Msk (_U_(0x1) << OSC32KCTRL_CFDCTRL_CFDPRESC_Pos) /**< (OSC32KCTRL_CFDCTRL) Clock Failure Detector Prescaler Mask */
  236. #define OSC32KCTRL_CFDCTRL_CFDPRESC OSC32KCTRL_CFDCTRL_CFDPRESC_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_CFDCTRL_CFDPRESC_Msk instead */
  237. #define OSC32KCTRL_CFDCTRL_MASK _U_(0x07) /**< \deprecated (OSC32KCTRL_CFDCTRL) Register MASK (Use OSC32KCTRL_CFDCTRL_Msk instead) */
  238. #define OSC32KCTRL_CFDCTRL_Msk _U_(0x07) /**< (OSC32KCTRL_CFDCTRL) Register Mask */
  239. /* -------- OSC32KCTRL_EVCTRL : (OSC32KCTRL Offset: 0x17) (R/W 8) Event Control -------- */
  240. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  241. typedef union {
  242. struct {
  243. uint8_t CFDEO:1; /**< bit: 0 Clock Failure Detector Event Output Enable */
  244. uint8_t :7; /**< bit: 1..7 Reserved */
  245. } bit; /**< Structure used for bit access */
  246. uint8_t reg; /**< Type used for register access */
  247. } OSC32KCTRL_EVCTRL_Type;
  248. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  249. #define OSC32KCTRL_EVCTRL_OFFSET (0x17) /**< (OSC32KCTRL_EVCTRL) Event Control Offset */
  250. #define OSC32KCTRL_EVCTRL_RESETVALUE _U_(0x00) /**< (OSC32KCTRL_EVCTRL) Event Control Reset Value */
  251. #define OSC32KCTRL_EVCTRL_CFDEO_Pos 0 /**< (OSC32KCTRL_EVCTRL) Clock Failure Detector Event Output Enable Position */
  252. #define OSC32KCTRL_EVCTRL_CFDEO_Msk (_U_(0x1) << OSC32KCTRL_EVCTRL_CFDEO_Pos) /**< (OSC32KCTRL_EVCTRL) Clock Failure Detector Event Output Enable Mask */
  253. #define OSC32KCTRL_EVCTRL_CFDEO OSC32KCTRL_EVCTRL_CFDEO_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_EVCTRL_CFDEO_Msk instead */
  254. #define OSC32KCTRL_EVCTRL_MASK _U_(0x01) /**< \deprecated (OSC32KCTRL_EVCTRL) Register MASK (Use OSC32KCTRL_EVCTRL_Msk instead) */
  255. #define OSC32KCTRL_EVCTRL_Msk _U_(0x01) /**< (OSC32KCTRL_EVCTRL) Register Mask */
  256. /* -------- OSC32KCTRL_OSCULP32K : (OSC32KCTRL Offset: 0x1c) (R/W 32) 32kHz Ultra Low Power Internal Oscillator (OSCULP32K) Control -------- */
  257. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  258. typedef union {
  259. struct {
  260. uint32_t :5; /**< bit: 0..4 Reserved */
  261. uint32_t ULP32KSW:1; /**< bit: 5 OSCULP32K Clock Switch Enable */
  262. uint32_t :2; /**< bit: 6..7 Reserved */
  263. uint32_t CALIB:5; /**< bit: 8..12 Oscillator Calibration */
  264. uint32_t :2; /**< bit: 13..14 Reserved */
  265. uint32_t WRTLOCK:1; /**< bit: 15 Write Lock */
  266. uint32_t :16; /**< bit: 16..31 Reserved */
  267. } bit; /**< Structure used for bit access */
  268. uint32_t reg; /**< Type used for register access */
  269. } OSC32KCTRL_OSCULP32K_Type;
  270. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  271. #define OSC32KCTRL_OSCULP32K_OFFSET (0x1C) /**< (OSC32KCTRL_OSCULP32K) 32kHz Ultra Low Power Internal Oscillator (OSCULP32K) Control Offset */
  272. #define OSC32KCTRL_OSCULP32K_RESETVALUE _U_(0x00) /**< (OSC32KCTRL_OSCULP32K) 32kHz Ultra Low Power Internal Oscillator (OSCULP32K) Control Reset Value */
  273. #define OSC32KCTRL_OSCULP32K_ULP32KSW_Pos 5 /**< (OSC32KCTRL_OSCULP32K) OSCULP32K Clock Switch Enable Position */
  274. #define OSC32KCTRL_OSCULP32K_ULP32KSW_Msk (_U_(0x1) << OSC32KCTRL_OSCULP32K_ULP32KSW_Pos) /**< (OSC32KCTRL_OSCULP32K) OSCULP32K Clock Switch Enable Mask */
  275. #define OSC32KCTRL_OSCULP32K_ULP32KSW OSC32KCTRL_OSCULP32K_ULP32KSW_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_OSCULP32K_ULP32KSW_Msk instead */
  276. #define OSC32KCTRL_OSCULP32K_CALIB_Pos 8 /**< (OSC32KCTRL_OSCULP32K) Oscillator Calibration Position */
  277. #define OSC32KCTRL_OSCULP32K_CALIB_Msk (_U_(0x1F) << OSC32KCTRL_OSCULP32K_CALIB_Pos) /**< (OSC32KCTRL_OSCULP32K) Oscillator Calibration Mask */
  278. #define OSC32KCTRL_OSCULP32K_CALIB(value) (OSC32KCTRL_OSCULP32K_CALIB_Msk & ((value) << OSC32KCTRL_OSCULP32K_CALIB_Pos))
  279. #define OSC32KCTRL_OSCULP32K_WRTLOCK_Pos 15 /**< (OSC32KCTRL_OSCULP32K) Write Lock Position */
  280. #define OSC32KCTRL_OSCULP32K_WRTLOCK_Msk (_U_(0x1) << OSC32KCTRL_OSCULP32K_WRTLOCK_Pos) /**< (OSC32KCTRL_OSCULP32K) Write Lock Mask */
  281. #define OSC32KCTRL_OSCULP32K_WRTLOCK OSC32KCTRL_OSCULP32K_WRTLOCK_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use OSC32KCTRL_OSCULP32K_WRTLOCK_Msk instead */
  282. #define OSC32KCTRL_OSCULP32K_MASK _U_(0x9F20) /**< \deprecated (OSC32KCTRL_OSCULP32K) Register MASK (Use OSC32KCTRL_OSCULP32K_Msk instead) */
  283. #define OSC32KCTRL_OSCULP32K_Msk _U_(0x9F20) /**< (OSC32KCTRL_OSCULP32K) Register Mask */
  284. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  285. /** \brief OSC32KCTRL hardware registers */
  286. typedef struct { /* 32k Oscillators Control */
  287. __IO OSC32KCTRL_INTENCLR_Type INTENCLR; /**< Offset: 0x00 (R/W 32) Interrupt Enable Clear */
  288. __IO OSC32KCTRL_INTENSET_Type INTENSET; /**< Offset: 0x04 (R/W 32) Interrupt Enable Set */
  289. __IO OSC32KCTRL_INTFLAG_Type INTFLAG; /**< Offset: 0x08 (R/W 32) Interrupt Flag Status and Clear */
  290. __I OSC32KCTRL_STATUS_Type STATUS; /**< Offset: 0x0C (R/ 32) Power and Clocks Status */
  291. __IO OSC32KCTRL_RTCCTRL_Type RTCCTRL; /**< Offset: 0x10 (R/W 8) RTC Clock Selection */
  292. __I uint8_t Reserved1[3];
  293. __IO OSC32KCTRL_XOSC32K_Type XOSC32K; /**< Offset: 0x14 (R/W 16) 32kHz External Crystal Oscillator (XOSC32K) Control */
  294. __IO OSC32KCTRL_CFDCTRL_Type CFDCTRL; /**< Offset: 0x16 (R/W 8) Clock Failure Detector Control */
  295. __IO OSC32KCTRL_EVCTRL_Type EVCTRL; /**< Offset: 0x17 (R/W 8) Event Control */
  296. __I uint8_t Reserved2[4];
  297. __IO OSC32KCTRL_OSCULP32K_Type OSCULP32K; /**< Offset: 0x1C (R/W 32) 32kHz Ultra Low Power Internal Oscillator (OSCULP32K) Control */
  298. } Osc32kctrl;
  299. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  300. /** @} end of 32k Oscillators Control */
  301. #endif /* _SAML11_OSC32KCTRL_COMPONENT_H_ */