tram.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. /**
  2. * \file
  3. *
  4. * \brief Component description for TRAM
  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_TRAM_COMPONENT_H_
  31. #define _SAML11_TRAM_COMPONENT_H_
  32. #define _SAML11_TRAM_COMPONENT_ /**< \deprecated Backward compatibility for ASF */
  33. /** \addtogroup SAML_SAML11 TrustRAM
  34. * @{
  35. */
  36. /* ========================================================================== */
  37. /** SOFTWARE API DEFINITION FOR TRAM */
  38. /* ========================================================================== */
  39. #define TRAM_U2801 /**< (TRAM) Module ID */
  40. #define REV_TRAM 0x100 /**< (TRAM) Module revision */
  41. /* -------- TRAM_CTRLA : (TRAM Offset: 0x00) (R/W 8) Control -------- */
  42. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  43. typedef union {
  44. struct {
  45. uint8_t SWRST:1; /**< bit: 0 Software Reset */
  46. uint8_t ENABLE:1; /**< bit: 1 Enable */
  47. uint8_t :2; /**< bit: 2..3 Reserved */
  48. uint8_t TAMPERS:1; /**< bit: 4 Tamper Erase */
  49. uint8_t :1; /**< bit: 5 Reserved */
  50. uint8_t DRP:1; /**< bit: 6 Data Remanence Prevention */
  51. uint8_t SILACC:1; /**< bit: 7 Silent Access */
  52. } bit; /**< Structure used for bit access */
  53. uint8_t reg; /**< Type used for register access */
  54. } TRAM_CTRLA_Type;
  55. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  56. #define TRAM_CTRLA_OFFSET (0x00) /**< (TRAM_CTRLA) Control Offset */
  57. #define TRAM_CTRLA_RESETVALUE _U_(0x00) /**< (TRAM_CTRLA) Control Reset Value */
  58. #define TRAM_CTRLA_SWRST_Pos 0 /**< (TRAM_CTRLA) Software Reset Position */
  59. #define TRAM_CTRLA_SWRST_Msk (_U_(0x1) << TRAM_CTRLA_SWRST_Pos) /**< (TRAM_CTRLA) Software Reset Mask */
  60. #define TRAM_CTRLA_SWRST TRAM_CTRLA_SWRST_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_CTRLA_SWRST_Msk instead */
  61. #define TRAM_CTRLA_ENABLE_Pos 1 /**< (TRAM_CTRLA) Enable Position */
  62. #define TRAM_CTRLA_ENABLE_Msk (_U_(0x1) << TRAM_CTRLA_ENABLE_Pos) /**< (TRAM_CTRLA) Enable Mask */
  63. #define TRAM_CTRLA_ENABLE TRAM_CTRLA_ENABLE_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_CTRLA_ENABLE_Msk instead */
  64. #define TRAM_CTRLA_TAMPERS_Pos 4 /**< (TRAM_CTRLA) Tamper Erase Position */
  65. #define TRAM_CTRLA_TAMPERS_Msk (_U_(0x1) << TRAM_CTRLA_TAMPERS_Pos) /**< (TRAM_CTRLA) Tamper Erase Mask */
  66. #define TRAM_CTRLA_TAMPERS TRAM_CTRLA_TAMPERS_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_CTRLA_TAMPERS_Msk instead */
  67. #define TRAM_CTRLA_DRP_Pos 6 /**< (TRAM_CTRLA) Data Remanence Prevention Position */
  68. #define TRAM_CTRLA_DRP_Msk (_U_(0x1) << TRAM_CTRLA_DRP_Pos) /**< (TRAM_CTRLA) Data Remanence Prevention Mask */
  69. #define TRAM_CTRLA_DRP TRAM_CTRLA_DRP_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_CTRLA_DRP_Msk instead */
  70. #define TRAM_CTRLA_SILACC_Pos 7 /**< (TRAM_CTRLA) Silent Access Position */
  71. #define TRAM_CTRLA_SILACC_Msk (_U_(0x1) << TRAM_CTRLA_SILACC_Pos) /**< (TRAM_CTRLA) Silent Access Mask */
  72. #define TRAM_CTRLA_SILACC TRAM_CTRLA_SILACC_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_CTRLA_SILACC_Msk instead */
  73. #define TRAM_CTRLA_MASK _U_(0xD3) /**< \deprecated (TRAM_CTRLA) Register MASK (Use TRAM_CTRLA_Msk instead) */
  74. #define TRAM_CTRLA_Msk _U_(0xD3) /**< (TRAM_CTRLA) Register Mask */
  75. /* -------- TRAM_INTENCLR : (TRAM Offset: 0x04) (R/W 8) Interrupt Enable Clear -------- */
  76. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  77. typedef union {
  78. struct {
  79. uint8_t ERR:1; /**< bit: 0 TrustRAM Readout Error Interrupt Enable */
  80. uint8_t DRP:1; /**< bit: 1 Data Remanence Prevention Ended Interrupt Enable */
  81. uint8_t :6; /**< bit: 2..7 Reserved */
  82. } bit; /**< Structure used for bit access */
  83. uint8_t reg; /**< Type used for register access */
  84. } TRAM_INTENCLR_Type;
  85. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  86. #define TRAM_INTENCLR_OFFSET (0x04) /**< (TRAM_INTENCLR) Interrupt Enable Clear Offset */
  87. #define TRAM_INTENCLR_RESETVALUE _U_(0x00) /**< (TRAM_INTENCLR) Interrupt Enable Clear Reset Value */
  88. #define TRAM_INTENCLR_ERR_Pos 0 /**< (TRAM_INTENCLR) TrustRAM Readout Error Interrupt Enable Position */
  89. #define TRAM_INTENCLR_ERR_Msk (_U_(0x1) << TRAM_INTENCLR_ERR_Pos) /**< (TRAM_INTENCLR) TrustRAM Readout Error Interrupt Enable Mask */
  90. #define TRAM_INTENCLR_ERR TRAM_INTENCLR_ERR_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_INTENCLR_ERR_Msk instead */
  91. #define TRAM_INTENCLR_DRP_Pos 1 /**< (TRAM_INTENCLR) Data Remanence Prevention Ended Interrupt Enable Position */
  92. #define TRAM_INTENCLR_DRP_Msk (_U_(0x1) << TRAM_INTENCLR_DRP_Pos) /**< (TRAM_INTENCLR) Data Remanence Prevention Ended Interrupt Enable Mask */
  93. #define TRAM_INTENCLR_DRP TRAM_INTENCLR_DRP_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_INTENCLR_DRP_Msk instead */
  94. #define TRAM_INTENCLR_MASK _U_(0x03) /**< \deprecated (TRAM_INTENCLR) Register MASK (Use TRAM_INTENCLR_Msk instead) */
  95. #define TRAM_INTENCLR_Msk _U_(0x03) /**< (TRAM_INTENCLR) Register Mask */
  96. /* -------- TRAM_INTENSET : (TRAM Offset: 0x05) (R/W 8) Interrupt Enable Set -------- */
  97. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  98. typedef union {
  99. struct {
  100. uint8_t ERR:1; /**< bit: 0 TrustRAM Readout Error Interrupt Enable */
  101. uint8_t DRP:1; /**< bit: 1 Data Remanence Prevention Ended Interrupt Enable */
  102. uint8_t :6; /**< bit: 2..7 Reserved */
  103. } bit; /**< Structure used for bit access */
  104. uint8_t reg; /**< Type used for register access */
  105. } TRAM_INTENSET_Type;
  106. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  107. #define TRAM_INTENSET_OFFSET (0x05) /**< (TRAM_INTENSET) Interrupt Enable Set Offset */
  108. #define TRAM_INTENSET_RESETVALUE _U_(0x00) /**< (TRAM_INTENSET) Interrupt Enable Set Reset Value */
  109. #define TRAM_INTENSET_ERR_Pos 0 /**< (TRAM_INTENSET) TrustRAM Readout Error Interrupt Enable Position */
  110. #define TRAM_INTENSET_ERR_Msk (_U_(0x1) << TRAM_INTENSET_ERR_Pos) /**< (TRAM_INTENSET) TrustRAM Readout Error Interrupt Enable Mask */
  111. #define TRAM_INTENSET_ERR TRAM_INTENSET_ERR_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_INTENSET_ERR_Msk instead */
  112. #define TRAM_INTENSET_DRP_Pos 1 /**< (TRAM_INTENSET) Data Remanence Prevention Ended Interrupt Enable Position */
  113. #define TRAM_INTENSET_DRP_Msk (_U_(0x1) << TRAM_INTENSET_DRP_Pos) /**< (TRAM_INTENSET) Data Remanence Prevention Ended Interrupt Enable Mask */
  114. #define TRAM_INTENSET_DRP TRAM_INTENSET_DRP_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_INTENSET_DRP_Msk instead */
  115. #define TRAM_INTENSET_MASK _U_(0x03) /**< \deprecated (TRAM_INTENSET) Register MASK (Use TRAM_INTENSET_Msk instead) */
  116. #define TRAM_INTENSET_Msk _U_(0x03) /**< (TRAM_INTENSET) Register Mask */
  117. /* -------- TRAM_INTFLAG : (TRAM Offset: 0x06) (R/W 8) Interrupt Flag Status and Clear -------- */
  118. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  119. typedef union { // __I to avoid read-modify-write on write-to-clear register
  120. struct {
  121. __I uint8_t ERR:1; /**< bit: 0 TrustRAM Readout Error */
  122. __I uint8_t DRP:1; /**< bit: 1 Data Remanence Prevention Ended */
  123. __I uint8_t :6; /**< bit: 2..7 Reserved */
  124. } bit; /**< Structure used for bit access */
  125. uint8_t reg; /**< Type used for register access */
  126. } TRAM_INTFLAG_Type;
  127. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  128. #define TRAM_INTFLAG_OFFSET (0x06) /**< (TRAM_INTFLAG) Interrupt Flag Status and Clear Offset */
  129. #define TRAM_INTFLAG_RESETVALUE _U_(0x00) /**< (TRAM_INTFLAG) Interrupt Flag Status and Clear Reset Value */
  130. #define TRAM_INTFLAG_ERR_Pos 0 /**< (TRAM_INTFLAG) TrustRAM Readout Error Position */
  131. #define TRAM_INTFLAG_ERR_Msk (_U_(0x1) << TRAM_INTFLAG_ERR_Pos) /**< (TRAM_INTFLAG) TrustRAM Readout Error Mask */
  132. #define TRAM_INTFLAG_ERR TRAM_INTFLAG_ERR_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_INTFLAG_ERR_Msk instead */
  133. #define TRAM_INTFLAG_DRP_Pos 1 /**< (TRAM_INTFLAG) Data Remanence Prevention Ended Position */
  134. #define TRAM_INTFLAG_DRP_Msk (_U_(0x1) << TRAM_INTFLAG_DRP_Pos) /**< (TRAM_INTFLAG) Data Remanence Prevention Ended Mask */
  135. #define TRAM_INTFLAG_DRP TRAM_INTFLAG_DRP_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_INTFLAG_DRP_Msk instead */
  136. #define TRAM_INTFLAG_MASK _U_(0x03) /**< \deprecated (TRAM_INTFLAG) Register MASK (Use TRAM_INTFLAG_Msk instead) */
  137. #define TRAM_INTFLAG_Msk _U_(0x03) /**< (TRAM_INTFLAG) Register Mask */
  138. /* -------- TRAM_STATUS : (TRAM Offset: 0x07) (R/ 8) Status -------- */
  139. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  140. typedef union {
  141. struct {
  142. uint8_t RAMINV:1; /**< bit: 0 RAM Inversion Bit */
  143. uint8_t DRP:1; /**< bit: 1 Data Remanence Prevention Ongoing */
  144. uint8_t :6; /**< bit: 2..7 Reserved */
  145. } bit; /**< Structure used for bit access */
  146. uint8_t reg; /**< Type used for register access */
  147. } TRAM_STATUS_Type;
  148. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  149. #define TRAM_STATUS_OFFSET (0x07) /**< (TRAM_STATUS) Status Offset */
  150. #define TRAM_STATUS_RESETVALUE _U_(0x00) /**< (TRAM_STATUS) Status Reset Value */
  151. #define TRAM_STATUS_RAMINV_Pos 0 /**< (TRAM_STATUS) RAM Inversion Bit Position */
  152. #define TRAM_STATUS_RAMINV_Msk (_U_(0x1) << TRAM_STATUS_RAMINV_Pos) /**< (TRAM_STATUS) RAM Inversion Bit Mask */
  153. #define TRAM_STATUS_RAMINV TRAM_STATUS_RAMINV_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_STATUS_RAMINV_Msk instead */
  154. #define TRAM_STATUS_DRP_Pos 1 /**< (TRAM_STATUS) Data Remanence Prevention Ongoing Position */
  155. #define TRAM_STATUS_DRP_Msk (_U_(0x1) << TRAM_STATUS_DRP_Pos) /**< (TRAM_STATUS) Data Remanence Prevention Ongoing Mask */
  156. #define TRAM_STATUS_DRP TRAM_STATUS_DRP_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_STATUS_DRP_Msk instead */
  157. #define TRAM_STATUS_MASK _U_(0x03) /**< \deprecated (TRAM_STATUS) Register MASK (Use TRAM_STATUS_Msk instead) */
  158. #define TRAM_STATUS_Msk _U_(0x03) /**< (TRAM_STATUS) Register Mask */
  159. /* -------- TRAM_SYNCBUSY : (TRAM Offset: 0x08) (R/ 32) Synchronization Busy Status -------- */
  160. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  161. typedef union {
  162. struct {
  163. uint32_t SWRST:1; /**< bit: 0 Software Reset Busy */
  164. uint32_t ENABLE:1; /**< bit: 1 Enable Busy */
  165. uint32_t :30; /**< bit: 2..31 Reserved */
  166. } bit; /**< Structure used for bit access */
  167. uint32_t reg; /**< Type used for register access */
  168. } TRAM_SYNCBUSY_Type;
  169. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  170. #define TRAM_SYNCBUSY_OFFSET (0x08) /**< (TRAM_SYNCBUSY) Synchronization Busy Status Offset */
  171. #define TRAM_SYNCBUSY_RESETVALUE _U_(0x00) /**< (TRAM_SYNCBUSY) Synchronization Busy Status Reset Value */
  172. #define TRAM_SYNCBUSY_SWRST_Pos 0 /**< (TRAM_SYNCBUSY) Software Reset Busy Position */
  173. #define TRAM_SYNCBUSY_SWRST_Msk (_U_(0x1) << TRAM_SYNCBUSY_SWRST_Pos) /**< (TRAM_SYNCBUSY) Software Reset Busy Mask */
  174. #define TRAM_SYNCBUSY_SWRST TRAM_SYNCBUSY_SWRST_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_SYNCBUSY_SWRST_Msk instead */
  175. #define TRAM_SYNCBUSY_ENABLE_Pos 1 /**< (TRAM_SYNCBUSY) Enable Busy Position */
  176. #define TRAM_SYNCBUSY_ENABLE_Msk (_U_(0x1) << TRAM_SYNCBUSY_ENABLE_Pos) /**< (TRAM_SYNCBUSY) Enable Busy Mask */
  177. #define TRAM_SYNCBUSY_ENABLE TRAM_SYNCBUSY_ENABLE_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_SYNCBUSY_ENABLE_Msk instead */
  178. #define TRAM_SYNCBUSY_MASK _U_(0x03) /**< \deprecated (TRAM_SYNCBUSY) Register MASK (Use TRAM_SYNCBUSY_Msk instead) */
  179. #define TRAM_SYNCBUSY_Msk _U_(0x03) /**< (TRAM_SYNCBUSY) Register Mask */
  180. /* -------- TRAM_DSCC : (TRAM Offset: 0x0c) (/W 32) Data Scramble Control -------- */
  181. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  182. typedef union {
  183. struct {
  184. uint32_t DSCKEY:30; /**< bit: 0..29 Data Scramble Key */
  185. uint32_t :1; /**< bit: 30 Reserved */
  186. uint32_t DSCEN:1; /**< bit: 31 Data Scramble Enable */
  187. } bit; /**< Structure used for bit access */
  188. uint32_t reg; /**< Type used for register access */
  189. } TRAM_DSCC_Type;
  190. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  191. #define TRAM_DSCC_OFFSET (0x0C) /**< (TRAM_DSCC) Data Scramble Control Offset */
  192. #define TRAM_DSCC_RESETVALUE _U_(0x00) /**< (TRAM_DSCC) Data Scramble Control Reset Value */
  193. #define TRAM_DSCC_DSCKEY_Pos 0 /**< (TRAM_DSCC) Data Scramble Key Position */
  194. #define TRAM_DSCC_DSCKEY_Msk (_U_(0x3FFFFFFF) << TRAM_DSCC_DSCKEY_Pos) /**< (TRAM_DSCC) Data Scramble Key Mask */
  195. #define TRAM_DSCC_DSCKEY(value) (TRAM_DSCC_DSCKEY_Msk & ((value) << TRAM_DSCC_DSCKEY_Pos))
  196. #define TRAM_DSCC_DSCEN_Pos 31 /**< (TRAM_DSCC) Data Scramble Enable Position */
  197. #define TRAM_DSCC_DSCEN_Msk (_U_(0x1) << TRAM_DSCC_DSCEN_Pos) /**< (TRAM_DSCC) Data Scramble Enable Mask */
  198. #define TRAM_DSCC_DSCEN TRAM_DSCC_DSCEN_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TRAM_DSCC_DSCEN_Msk instead */
  199. #define TRAM_DSCC_MASK _U_(0xBFFFFFFF) /**< \deprecated (TRAM_DSCC) Register MASK (Use TRAM_DSCC_Msk instead) */
  200. #define TRAM_DSCC_Msk _U_(0xBFFFFFFF) /**< (TRAM_DSCC) Register Mask */
  201. /* -------- TRAM_PERMW : (TRAM Offset: 0x10) (/W 8) Permutation Write -------- */
  202. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  203. typedef union {
  204. struct {
  205. uint8_t DATA:3; /**< bit: 0..2 Permutation Scrambler Data Input */
  206. uint8_t :5; /**< bit: 3..7 Reserved */
  207. } bit; /**< Structure used for bit access */
  208. uint8_t reg; /**< Type used for register access */
  209. } TRAM_PERMW_Type;
  210. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  211. #define TRAM_PERMW_OFFSET (0x10) /**< (TRAM_PERMW) Permutation Write Offset */
  212. #define TRAM_PERMW_RESETVALUE _U_(0x00) /**< (TRAM_PERMW) Permutation Write Reset Value */
  213. #define TRAM_PERMW_DATA_Pos 0 /**< (TRAM_PERMW) Permutation Scrambler Data Input Position */
  214. #define TRAM_PERMW_DATA_Msk (_U_(0x7) << TRAM_PERMW_DATA_Pos) /**< (TRAM_PERMW) Permutation Scrambler Data Input Mask */
  215. #define TRAM_PERMW_DATA(value) (TRAM_PERMW_DATA_Msk & ((value) << TRAM_PERMW_DATA_Pos))
  216. #define TRAM_PERMW_MASK _U_(0x07) /**< \deprecated (TRAM_PERMW) Register MASK (Use TRAM_PERMW_Msk instead) */
  217. #define TRAM_PERMW_Msk _U_(0x07) /**< (TRAM_PERMW) Register Mask */
  218. /* -------- TRAM_PERMR : (TRAM Offset: 0x11) (R/ 8) Permutation Read -------- */
  219. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  220. typedef union {
  221. struct {
  222. uint8_t DATA:3; /**< bit: 0..2 Permutation Scrambler Data Output */
  223. uint8_t :5; /**< bit: 3..7 Reserved */
  224. } bit; /**< Structure used for bit access */
  225. uint8_t reg; /**< Type used for register access */
  226. } TRAM_PERMR_Type;
  227. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  228. #define TRAM_PERMR_OFFSET (0x11) /**< (TRAM_PERMR) Permutation Read Offset */
  229. #define TRAM_PERMR_RESETVALUE _U_(0x00) /**< (TRAM_PERMR) Permutation Read Reset Value */
  230. #define TRAM_PERMR_DATA_Pos 0 /**< (TRAM_PERMR) Permutation Scrambler Data Output Position */
  231. #define TRAM_PERMR_DATA_Msk (_U_(0x7) << TRAM_PERMR_DATA_Pos) /**< (TRAM_PERMR) Permutation Scrambler Data Output Mask */
  232. #define TRAM_PERMR_DATA(value) (TRAM_PERMR_DATA_Msk & ((value) << TRAM_PERMR_DATA_Pos))
  233. #define TRAM_PERMR_MASK _U_(0x07) /**< \deprecated (TRAM_PERMR) Register MASK (Use TRAM_PERMR_Msk instead) */
  234. #define TRAM_PERMR_Msk _U_(0x07) /**< (TRAM_PERMR) Register Mask */
  235. /* -------- TRAM_RAM : (TRAM Offset: 0x100) (R/W 32) TrustRAM -------- */
  236. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  237. typedef union {
  238. struct {
  239. uint32_t DATA:32; /**< bit: 0..31 Trust RAM Data */
  240. } bit; /**< Structure used for bit access */
  241. uint32_t reg; /**< Type used for register access */
  242. } TRAM_RAM_Type;
  243. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  244. #define TRAM_RAM_OFFSET (0x100) /**< (TRAM_RAM) TrustRAM Offset */
  245. #define TRAM_RAM_RESETVALUE _U_(0x00) /**< (TRAM_RAM) TrustRAM Reset Value */
  246. #define TRAM_RAM_DATA_Pos 0 /**< (TRAM_RAM) Trust RAM Data Position */
  247. #define TRAM_RAM_DATA_Msk (_U_(0xFFFFFFFF) << TRAM_RAM_DATA_Pos) /**< (TRAM_RAM) Trust RAM Data Mask */
  248. #define TRAM_RAM_DATA(value) (TRAM_RAM_DATA_Msk & ((value) << TRAM_RAM_DATA_Pos))
  249. #define TRAM_RAM_MASK _U_(0xFFFFFFFF) /**< \deprecated (TRAM_RAM) Register MASK (Use TRAM_RAM_Msk instead) */
  250. #define TRAM_RAM_Msk _U_(0xFFFFFFFF) /**< (TRAM_RAM) Register Mask */
  251. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  252. /** \brief TRAM hardware registers */
  253. typedef struct { /* TrustRAM */
  254. __IO TRAM_CTRLA_Type CTRLA; /**< Offset: 0x00 (R/W 8) Control */
  255. __I uint8_t Reserved1[3];
  256. __IO TRAM_INTENCLR_Type INTENCLR; /**< Offset: 0x04 (R/W 8) Interrupt Enable Clear */
  257. __IO TRAM_INTENSET_Type INTENSET; /**< Offset: 0x05 (R/W 8) Interrupt Enable Set */
  258. __IO TRAM_INTFLAG_Type INTFLAG; /**< Offset: 0x06 (R/W 8) Interrupt Flag Status and Clear */
  259. __I TRAM_STATUS_Type STATUS; /**< Offset: 0x07 (R/ 8) Status */
  260. __I TRAM_SYNCBUSY_Type SYNCBUSY; /**< Offset: 0x08 (R/ 32) Synchronization Busy Status */
  261. __O TRAM_DSCC_Type DSCC; /**< Offset: 0x0C ( /W 32) Data Scramble Control */
  262. __O TRAM_PERMW_Type PERMW; /**< Offset: 0x10 ( /W 8) Permutation Write */
  263. __I TRAM_PERMR_Type PERMR; /**< Offset: 0x11 (R/ 8) Permutation Read */
  264. __I uint8_t Reserved2[238];
  265. __IO TRAM_RAM_Type RAM[64]; /**< Offset: 0x100 (R/W 32) TrustRAM */
  266. } Tram;
  267. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  268. /** @} end of TrustRAM */
  269. #endif /* _SAML11_TRAM_COMPONENT_H_ */