idau.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. /**
  2. * \file
  3. *
  4. * \brief Component description for IDAU
  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_IDAU_COMPONENT_H_
  31. #define _SAML11_IDAU_COMPONENT_H_
  32. #define _SAML11_IDAU_COMPONENT_ /**< \deprecated Backward compatibility for ASF */
  33. /** \addtogroup SAML_SAML11 Implementation Defined Attribution Unit
  34. * @{
  35. */
  36. /* ========================================================================== */
  37. /** SOFTWARE API DEFINITION FOR IDAU */
  38. /* ========================================================================== */
  39. #define IDAU_U2803 /**< (IDAU) Module ID */
  40. #define REV_IDAU 0x100 /**< (IDAU) Module revision */
  41. /* -------- IDAU_SECCTRL : (IDAU Offset: 0x01) (R/W 8) SECCTRL -------- */
  42. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  43. typedef union {
  44. struct {
  45. uint8_t :2; /**< bit: 0..1 Reserved */
  46. uint8_t RXN:1; /**< bit: 2 CPU RAM is eXecute Never */
  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. } IDAU_SECCTRL_Type;
  51. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  52. #define IDAU_SECCTRL_OFFSET (0x01) /**< (IDAU_SECCTRL) SECCTRL Offset */
  53. #define IDAU_SECCTRL_RESETVALUE _U_(0x03) /**< (IDAU_SECCTRL) SECCTRL Reset Value */
  54. #define IDAU_SECCTRL_RXN_Pos 2 /**< (IDAU_SECCTRL) CPU RAM is eXecute Never Position */
  55. #define IDAU_SECCTRL_RXN_Msk (_U_(0x1) << IDAU_SECCTRL_RXN_Pos) /**< (IDAU_SECCTRL) CPU RAM is eXecute Never Mask */
  56. #define IDAU_SECCTRL_RXN IDAU_SECCTRL_RXN_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use IDAU_SECCTRL_RXN_Msk instead */
  57. #define IDAU_SECCTRL_MASK _U_(0x04) /**< \deprecated (IDAU_SECCTRL) Register MASK (Use IDAU_SECCTRL_Msk instead) */
  58. #define IDAU_SECCTRL_Msk _U_(0x04) /**< (IDAU_SECCTRL) Register Mask */
  59. /* -------- IDAU_SCFGB : (IDAU Offset: 0x04) (R/W 32) SCFGB -------- */
  60. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  61. typedef union {
  62. struct {
  63. uint32_t BS:8; /**< bit: 0..7 Boot Secure */
  64. uint32_t BNSC:6; /**< bit: 8..13 Boot Secure, Non-secure Callable */
  65. uint32_t :2; /**< bit: 14..15 Reserved */
  66. uint32_t BOOTPROT:8; /**< bit: 16..23 Boot Protection */
  67. uint32_t :8; /**< bit: 24..31 Reserved */
  68. } bit; /**< Structure used for bit access */
  69. uint32_t reg; /**< Type used for register access */
  70. } IDAU_SCFGB_Type;
  71. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  72. #define IDAU_SCFGB_OFFSET (0x04) /**< (IDAU_SCFGB) SCFGB Offset */
  73. #define IDAU_SCFGB_RESETVALUE _U_(0x00) /**< (IDAU_SCFGB) SCFGB Reset Value */
  74. #define IDAU_SCFGB_BS_Pos 0 /**< (IDAU_SCFGB) Boot Secure Position */
  75. #define IDAU_SCFGB_BS_Msk (_U_(0xFF) << IDAU_SCFGB_BS_Pos) /**< (IDAU_SCFGB) Boot Secure Mask */
  76. #define IDAU_SCFGB_BS(value) (IDAU_SCFGB_BS_Msk & ((value) << IDAU_SCFGB_BS_Pos))
  77. #define IDAU_SCFGB_BNSC_Pos 8 /**< (IDAU_SCFGB) Boot Secure, Non-secure Callable Position */
  78. #define IDAU_SCFGB_BNSC_Msk (_U_(0x3F) << IDAU_SCFGB_BNSC_Pos) /**< (IDAU_SCFGB) Boot Secure, Non-secure Callable Mask */
  79. #define IDAU_SCFGB_BNSC(value) (IDAU_SCFGB_BNSC_Msk & ((value) << IDAU_SCFGB_BNSC_Pos))
  80. #define IDAU_SCFGB_BOOTPROT_Pos 16 /**< (IDAU_SCFGB) Boot Protection Position */
  81. #define IDAU_SCFGB_BOOTPROT_Msk (_U_(0xFF) << IDAU_SCFGB_BOOTPROT_Pos) /**< (IDAU_SCFGB) Boot Protection Mask */
  82. #define IDAU_SCFGB_BOOTPROT(value) (IDAU_SCFGB_BOOTPROT_Msk & ((value) << IDAU_SCFGB_BOOTPROT_Pos))
  83. #define IDAU_SCFGB_MASK _U_(0xFF3FFF) /**< \deprecated (IDAU_SCFGB) Register MASK (Use IDAU_SCFGB_Msk instead) */
  84. #define IDAU_SCFGB_Msk _U_(0xFF3FFF) /**< (IDAU_SCFGB) Register Mask */
  85. /* -------- IDAU_SCFGA : (IDAU Offset: 0x08) (R/W 32) SCFGA -------- */
  86. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  87. typedef union {
  88. struct {
  89. uint32_t AS:8; /**< bit: 0..7 Application Secure */
  90. uint32_t ANSC:6; /**< bit: 8..13 Application Secure, Non-secure Callable */
  91. uint32_t :2; /**< bit: 14..15 Reserved */
  92. uint32_t DS:4; /**< bit: 16..19 DATAFLASH Data Secure */
  93. uint32_t :12; /**< bit: 20..31 Reserved */
  94. } bit; /**< Structure used for bit access */
  95. uint32_t reg; /**< Type used for register access */
  96. } IDAU_SCFGA_Type;
  97. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  98. #define IDAU_SCFGA_OFFSET (0x08) /**< (IDAU_SCFGA) SCFGA Offset */
  99. #define IDAU_SCFGA_RESETVALUE _U_(0x00) /**< (IDAU_SCFGA) SCFGA Reset Value */
  100. #define IDAU_SCFGA_AS_Pos 0 /**< (IDAU_SCFGA) Application Secure Position */
  101. #define IDAU_SCFGA_AS_Msk (_U_(0xFF) << IDAU_SCFGA_AS_Pos) /**< (IDAU_SCFGA) Application Secure Mask */
  102. #define IDAU_SCFGA_AS(value) (IDAU_SCFGA_AS_Msk & ((value) << IDAU_SCFGA_AS_Pos))
  103. #define IDAU_SCFGA_ANSC_Pos 8 /**< (IDAU_SCFGA) Application Secure, Non-secure Callable Position */
  104. #define IDAU_SCFGA_ANSC_Msk (_U_(0x3F) << IDAU_SCFGA_ANSC_Pos) /**< (IDAU_SCFGA) Application Secure, Non-secure Callable Mask */
  105. #define IDAU_SCFGA_ANSC(value) (IDAU_SCFGA_ANSC_Msk & ((value) << IDAU_SCFGA_ANSC_Pos))
  106. #define IDAU_SCFGA_DS_Pos 16 /**< (IDAU_SCFGA) DATAFLASH Data Secure Position */
  107. #define IDAU_SCFGA_DS_Msk (_U_(0xF) << IDAU_SCFGA_DS_Pos) /**< (IDAU_SCFGA) DATAFLASH Data Secure Mask */
  108. #define IDAU_SCFGA_DS(value) (IDAU_SCFGA_DS_Msk & ((value) << IDAU_SCFGA_DS_Pos))
  109. #define IDAU_SCFGA_MASK _U_(0xF3FFF) /**< \deprecated (IDAU_SCFGA) Register MASK (Use IDAU_SCFGA_Msk instead) */
  110. #define IDAU_SCFGA_Msk _U_(0xF3FFF) /**< (IDAU_SCFGA) Register Mask */
  111. /* -------- IDAU_SCFGR : (IDAU Offset: 0x0c) (R/W 8) SCFGR -------- */
  112. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  113. typedef union {
  114. struct {
  115. uint8_t RS:7; /**< bit: 0..6 RAM Secure */
  116. uint8_t :1; /**< bit: 7 Reserved */
  117. } bit; /**< Structure used for bit access */
  118. uint8_t reg; /**< Type used for register access */
  119. } IDAU_SCFGR_Type;
  120. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  121. #define IDAU_SCFGR_OFFSET (0x0C) /**< (IDAU_SCFGR) SCFGR Offset */
  122. #define IDAU_SCFGR_RESETVALUE _U_(0x00) /**< (IDAU_SCFGR) SCFGR Reset Value */
  123. #define IDAU_SCFGR_RS_Pos 0 /**< (IDAU_SCFGR) RAM Secure Position */
  124. #define IDAU_SCFGR_RS_Msk (_U_(0x7F) << IDAU_SCFGR_RS_Pos) /**< (IDAU_SCFGR) RAM Secure Mask */
  125. #define IDAU_SCFGR_RS(value) (IDAU_SCFGR_RS_Msk & ((value) << IDAU_SCFGR_RS_Pos))
  126. #define IDAU_SCFGR_MASK _U_(0x7F) /**< \deprecated (IDAU_SCFGR) Register MASK (Use IDAU_SCFGR_Msk instead) */
  127. #define IDAU_SCFGR_Msk _U_(0x7F) /**< (IDAU_SCFGR) Register Mask */
  128. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  129. /** \brief IDAU hardware registers */
  130. typedef struct { /* Implementation Defined Attribution Unit */
  131. __I uint8_t Reserved1[1];
  132. __IO IDAU_SECCTRL_Type SECCTRL; /**< Offset: 0x01 (R/W 8) SECCTRL */
  133. __I uint8_t Reserved2[2];
  134. __IO IDAU_SCFGB_Type SCFGB; /**< Offset: 0x04 (R/W 32) SCFGB */
  135. __IO IDAU_SCFGA_Type SCFGA; /**< Offset: 0x08 (R/W 32) SCFGA */
  136. __IO IDAU_SCFGR_Type SCFGR; /**< Offset: 0x0C (R/W 8) SCFGR */
  137. } Idau;
  138. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  139. /** @} end of Implementation Defined Attribution Unit */
  140. #endif /* _SAML11_IDAU_COMPONENT_H_ */