1 /**************************************************************************//**
\r
2 * @file efm32wg_aes.h
\r
3 * @brief EFM32WG_AES register and bit field definitions
\r
5 ******************************************************************************
\r
7 * <b>(C) Copyright 2015 Silicon Laboratories, Inc. http://www.silabs.com</b>
\r
8 ******************************************************************************
\r
10 * Permission is granted to anyone to use this software for any purpose,
\r
11 * including commercial applications, and to alter it and redistribute it
\r
12 * freely, subject to the following restrictions:
\r
14 * 1. The origin of this software must not be misrepresented; you must not
\r
15 * claim that you wrote the original software.@n
\r
16 * 2. Altered source versions must be plainly marked as such, and must not be
\r
17 * misrepresented as being the original software.@n
\r
18 * 3. This notice may not be removed or altered from any source distribution.
\r
20 * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Laboratories, Inc.
\r
21 * has no obligation to support this Software. Silicon Laboratories, Inc. is
\r
22 * providing the Software "AS IS", with no express or implied warranties of any
\r
23 * kind, including, but not limited to, any implied warranties of
\r
24 * merchantability or fitness for any particular purpose or warranties against
\r
25 * infringement of any proprietary rights of a third party.
\r
27 * Silicon Laboratories, Inc. will not be liable for any consequential,
\r
28 * incidental, or special damages, or any other relief, or for any claim by
\r
29 * any third party, arising from your use of this Software.
\r
31 *****************************************************************************/
\r
32 /**************************************************************************//**
\r
33 * @defgroup EFM32WG_AES
\r
35 * @brief EFM32WG_AES Register Declaration
\r
36 *****************************************************************************/
\r
39 __IO uint32_t CTRL; /**< Control Register */
\r
40 __IO uint32_t CMD; /**< Command Register */
\r
41 __I uint32_t STATUS; /**< Status Register */
\r
42 __IO uint32_t IEN; /**< Interrupt Enable Register */
\r
43 __I uint32_t IF; /**< Interrupt Flag Register */
\r
44 __IO uint32_t IFS; /**< Interrupt Flag Set Register */
\r
45 __IO uint32_t IFC; /**< Interrupt Flag Clear Register */
\r
46 __IO uint32_t DATA; /**< DATA Register */
\r
47 __IO uint32_t XORDATA; /**< XORDATA Register */
\r
48 uint32_t RESERVED0[3]; /**< Reserved for future use **/
\r
49 __IO uint32_t KEYLA; /**< KEY Low Register */
\r
50 __IO uint32_t KEYLB; /**< KEY Low Register */
\r
51 __IO uint32_t KEYLC; /**< KEY Low Register */
\r
52 __IO uint32_t KEYLD; /**< KEY Low Register */
\r
53 __IO uint32_t KEYHA; /**< KEY High Register */
\r
54 __IO uint32_t KEYHB; /**< KEY High Register */
\r
55 __IO uint32_t KEYHC; /**< KEY High Register */
\r
56 __IO uint32_t KEYHD; /**< KEY High Register */
\r
57 } AES_TypeDef; /** @} */
\r
59 /**************************************************************************//**
\r
60 * @defgroup EFM32WG_AES_BitFields
\r
62 *****************************************************************************/
\r
64 /* Bit fields for AES CTRL */
\r
65 #define _AES_CTRL_RESETVALUE 0x00000000UL /**< Default value for AES_CTRL */
\r
66 #define _AES_CTRL_MASK 0x00000077UL /**< Mask for AES_CTRL */
\r
67 #define AES_CTRL_DECRYPT (0x1UL << 0) /**< Decryption/Encryption Mode */
\r
68 #define _AES_CTRL_DECRYPT_SHIFT 0 /**< Shift value for AES_DECRYPT */
\r
69 #define _AES_CTRL_DECRYPT_MASK 0x1UL /**< Bit mask for AES_DECRYPT */
\r
70 #define _AES_CTRL_DECRYPT_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_CTRL */
\r
71 #define AES_CTRL_DECRYPT_DEFAULT (_AES_CTRL_DECRYPT_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_CTRL */
\r
72 #define AES_CTRL_AES256 (0x1UL << 1) /**< AES-256 Mode */
\r
73 #define _AES_CTRL_AES256_SHIFT 1 /**< Shift value for AES_AES256 */
\r
74 #define _AES_CTRL_AES256_MASK 0x2UL /**< Bit mask for AES_AES256 */
\r
75 #define _AES_CTRL_AES256_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_CTRL */
\r
76 #define AES_CTRL_AES256_DEFAULT (_AES_CTRL_AES256_DEFAULT << 1) /**< Shifted mode DEFAULT for AES_CTRL */
\r
77 #define AES_CTRL_KEYBUFEN (0x1UL << 2) /**< Key Buffer Enable */
\r
78 #define _AES_CTRL_KEYBUFEN_SHIFT 2 /**< Shift value for AES_KEYBUFEN */
\r
79 #define _AES_CTRL_KEYBUFEN_MASK 0x4UL /**< Bit mask for AES_KEYBUFEN */
\r
80 #define _AES_CTRL_KEYBUFEN_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_CTRL */
\r
81 #define AES_CTRL_KEYBUFEN_DEFAULT (_AES_CTRL_KEYBUFEN_DEFAULT << 2) /**< Shifted mode DEFAULT for AES_CTRL */
\r
82 #define AES_CTRL_DATASTART (0x1UL << 4) /**< AES_DATA Write Start */
\r
83 #define _AES_CTRL_DATASTART_SHIFT 4 /**< Shift value for AES_DATASTART */
\r
84 #define _AES_CTRL_DATASTART_MASK 0x10UL /**< Bit mask for AES_DATASTART */
\r
85 #define _AES_CTRL_DATASTART_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_CTRL */
\r
86 #define AES_CTRL_DATASTART_DEFAULT (_AES_CTRL_DATASTART_DEFAULT << 4) /**< Shifted mode DEFAULT for AES_CTRL */
\r
87 #define AES_CTRL_XORSTART (0x1UL << 5) /**< AES_XORDATA Write Start */
\r
88 #define _AES_CTRL_XORSTART_SHIFT 5 /**< Shift value for AES_XORSTART */
\r
89 #define _AES_CTRL_XORSTART_MASK 0x20UL /**< Bit mask for AES_XORSTART */
\r
90 #define _AES_CTRL_XORSTART_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_CTRL */
\r
91 #define AES_CTRL_XORSTART_DEFAULT (_AES_CTRL_XORSTART_DEFAULT << 5) /**< Shifted mode DEFAULT for AES_CTRL */
\r
92 #define AES_CTRL_BYTEORDER (0x1UL << 6) /**< Configure byte order in data and key registers */
\r
93 #define _AES_CTRL_BYTEORDER_SHIFT 6 /**< Shift value for AES_BYTEORDER */
\r
94 #define _AES_CTRL_BYTEORDER_MASK 0x40UL /**< Bit mask for AES_BYTEORDER */
\r
95 #define _AES_CTRL_BYTEORDER_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_CTRL */
\r
96 #define AES_CTRL_BYTEORDER_DEFAULT (_AES_CTRL_BYTEORDER_DEFAULT << 6) /**< Shifted mode DEFAULT for AES_CTRL */
\r
98 /* Bit fields for AES CMD */
\r
99 #define _AES_CMD_RESETVALUE 0x00000000UL /**< Default value for AES_CMD */
\r
100 #define _AES_CMD_MASK 0x00000003UL /**< Mask for AES_CMD */
\r
101 #define AES_CMD_START (0x1UL << 0) /**< Encryption/Decryption Start */
\r
102 #define _AES_CMD_START_SHIFT 0 /**< Shift value for AES_START */
\r
103 #define _AES_CMD_START_MASK 0x1UL /**< Bit mask for AES_START */
\r
104 #define _AES_CMD_START_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_CMD */
\r
105 #define AES_CMD_START_DEFAULT (_AES_CMD_START_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_CMD */
\r
106 #define AES_CMD_STOP (0x1UL << 1) /**< Encryption/Decryption Stop */
\r
107 #define _AES_CMD_STOP_SHIFT 1 /**< Shift value for AES_STOP */
\r
108 #define _AES_CMD_STOP_MASK 0x2UL /**< Bit mask for AES_STOP */
\r
109 #define _AES_CMD_STOP_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_CMD */
\r
110 #define AES_CMD_STOP_DEFAULT (_AES_CMD_STOP_DEFAULT << 1) /**< Shifted mode DEFAULT for AES_CMD */
\r
112 /* Bit fields for AES STATUS */
\r
113 #define _AES_STATUS_RESETVALUE 0x00000000UL /**< Default value for AES_STATUS */
\r
114 #define _AES_STATUS_MASK 0x00000001UL /**< Mask for AES_STATUS */
\r
115 #define AES_STATUS_RUNNING (0x1UL << 0) /**< AES Running */
\r
116 #define _AES_STATUS_RUNNING_SHIFT 0 /**< Shift value for AES_RUNNING */
\r
117 #define _AES_STATUS_RUNNING_MASK 0x1UL /**< Bit mask for AES_RUNNING */
\r
118 #define _AES_STATUS_RUNNING_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_STATUS */
\r
119 #define AES_STATUS_RUNNING_DEFAULT (_AES_STATUS_RUNNING_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_STATUS */
\r
121 /* Bit fields for AES IEN */
\r
122 #define _AES_IEN_RESETVALUE 0x00000000UL /**< Default value for AES_IEN */
\r
123 #define _AES_IEN_MASK 0x00000001UL /**< Mask for AES_IEN */
\r
124 #define AES_IEN_DONE (0x1UL << 0) /**< Encryption/Decryption Done Interrupt Enable */
\r
125 #define _AES_IEN_DONE_SHIFT 0 /**< Shift value for AES_DONE */
\r
126 #define _AES_IEN_DONE_MASK 0x1UL /**< Bit mask for AES_DONE */
\r
127 #define _AES_IEN_DONE_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_IEN */
\r
128 #define AES_IEN_DONE_DEFAULT (_AES_IEN_DONE_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_IEN */
\r
130 /* Bit fields for AES IF */
\r
131 #define _AES_IF_RESETVALUE 0x00000000UL /**< Default value for AES_IF */
\r
132 #define _AES_IF_MASK 0x00000001UL /**< Mask for AES_IF */
\r
133 #define AES_IF_DONE (0x1UL << 0) /**< Encryption/Decryption Done Interrupt Flag */
\r
134 #define _AES_IF_DONE_SHIFT 0 /**< Shift value for AES_DONE */
\r
135 #define _AES_IF_DONE_MASK 0x1UL /**< Bit mask for AES_DONE */
\r
136 #define _AES_IF_DONE_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_IF */
\r
137 #define AES_IF_DONE_DEFAULT (_AES_IF_DONE_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_IF */
\r
139 /* Bit fields for AES IFS */
\r
140 #define _AES_IFS_RESETVALUE 0x00000000UL /**< Default value for AES_IFS */
\r
141 #define _AES_IFS_MASK 0x00000001UL /**< Mask for AES_IFS */
\r
142 #define AES_IFS_DONE (0x1UL << 0) /**< Encryption/Decryption Done Interrupt Flag Set */
\r
143 #define _AES_IFS_DONE_SHIFT 0 /**< Shift value for AES_DONE */
\r
144 #define _AES_IFS_DONE_MASK 0x1UL /**< Bit mask for AES_DONE */
\r
145 #define _AES_IFS_DONE_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_IFS */
\r
146 #define AES_IFS_DONE_DEFAULT (_AES_IFS_DONE_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_IFS */
\r
148 /* Bit fields for AES IFC */
\r
149 #define _AES_IFC_RESETVALUE 0x00000000UL /**< Default value for AES_IFC */
\r
150 #define _AES_IFC_MASK 0x00000001UL /**< Mask for AES_IFC */
\r
151 #define AES_IFC_DONE (0x1UL << 0) /**< Encryption/Decryption Done Interrupt Flag Clear */
\r
152 #define _AES_IFC_DONE_SHIFT 0 /**< Shift value for AES_DONE */
\r
153 #define _AES_IFC_DONE_MASK 0x1UL /**< Bit mask for AES_DONE */
\r
154 #define _AES_IFC_DONE_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_IFC */
\r
155 #define AES_IFC_DONE_DEFAULT (_AES_IFC_DONE_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_IFC */
\r
157 /* Bit fields for AES DATA */
\r
158 #define _AES_DATA_RESETVALUE 0x00000000UL /**< Default value for AES_DATA */
\r
159 #define _AES_DATA_MASK 0xFFFFFFFFUL /**< Mask for AES_DATA */
\r
160 #define _AES_DATA_DATA_SHIFT 0 /**< Shift value for AES_DATA */
\r
161 #define _AES_DATA_DATA_MASK 0xFFFFFFFFUL /**< Bit mask for AES_DATA */
\r
162 #define _AES_DATA_DATA_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_DATA */
\r
163 #define AES_DATA_DATA_DEFAULT (_AES_DATA_DATA_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_DATA */
\r
165 /* Bit fields for AES XORDATA */
\r
166 #define _AES_XORDATA_RESETVALUE 0x00000000UL /**< Default value for AES_XORDATA */
\r
167 #define _AES_XORDATA_MASK 0xFFFFFFFFUL /**< Mask for AES_XORDATA */
\r
168 #define _AES_XORDATA_XORDATA_SHIFT 0 /**< Shift value for AES_XORDATA */
\r
169 #define _AES_XORDATA_XORDATA_MASK 0xFFFFFFFFUL /**< Bit mask for AES_XORDATA */
\r
170 #define _AES_XORDATA_XORDATA_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_XORDATA */
\r
171 #define AES_XORDATA_XORDATA_DEFAULT (_AES_XORDATA_XORDATA_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_XORDATA */
\r
173 /* Bit fields for AES KEYLA */
\r
174 #define _AES_KEYLA_RESETVALUE 0x00000000UL /**< Default value for AES_KEYLA */
\r
175 #define _AES_KEYLA_MASK 0xFFFFFFFFUL /**< Mask for AES_KEYLA */
\r
176 #define _AES_KEYLA_KEYLA_SHIFT 0 /**< Shift value for AES_KEYLA */
\r
177 #define _AES_KEYLA_KEYLA_MASK 0xFFFFFFFFUL /**< Bit mask for AES_KEYLA */
\r
178 #define _AES_KEYLA_KEYLA_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_KEYLA */
\r
179 #define AES_KEYLA_KEYLA_DEFAULT (_AES_KEYLA_KEYLA_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_KEYLA */
\r
181 /* Bit fields for AES KEYLB */
\r
182 #define _AES_KEYLB_RESETVALUE 0x00000000UL /**< Default value for AES_KEYLB */
\r
183 #define _AES_KEYLB_MASK 0xFFFFFFFFUL /**< Mask for AES_KEYLB */
\r
184 #define _AES_KEYLB_KEYLB_SHIFT 0 /**< Shift value for AES_KEYLB */
\r
185 #define _AES_KEYLB_KEYLB_MASK 0xFFFFFFFFUL /**< Bit mask for AES_KEYLB */
\r
186 #define _AES_KEYLB_KEYLB_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_KEYLB */
\r
187 #define AES_KEYLB_KEYLB_DEFAULT (_AES_KEYLB_KEYLB_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_KEYLB */
\r
189 /* Bit fields for AES KEYLC */
\r
190 #define _AES_KEYLC_RESETVALUE 0x00000000UL /**< Default value for AES_KEYLC */
\r
191 #define _AES_KEYLC_MASK 0xFFFFFFFFUL /**< Mask for AES_KEYLC */
\r
192 #define _AES_KEYLC_KEYLC_SHIFT 0 /**< Shift value for AES_KEYLC */
\r
193 #define _AES_KEYLC_KEYLC_MASK 0xFFFFFFFFUL /**< Bit mask for AES_KEYLC */
\r
194 #define _AES_KEYLC_KEYLC_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_KEYLC */
\r
195 #define AES_KEYLC_KEYLC_DEFAULT (_AES_KEYLC_KEYLC_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_KEYLC */
\r
197 /* Bit fields for AES KEYLD */
\r
198 #define _AES_KEYLD_RESETVALUE 0x00000000UL /**< Default value for AES_KEYLD */
\r
199 #define _AES_KEYLD_MASK 0xFFFFFFFFUL /**< Mask for AES_KEYLD */
\r
200 #define _AES_KEYLD_KEYLD_SHIFT 0 /**< Shift value for AES_KEYLD */
\r
201 #define _AES_KEYLD_KEYLD_MASK 0xFFFFFFFFUL /**< Bit mask for AES_KEYLD */
\r
202 #define _AES_KEYLD_KEYLD_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_KEYLD */
\r
203 #define AES_KEYLD_KEYLD_DEFAULT (_AES_KEYLD_KEYLD_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_KEYLD */
\r
205 /* Bit fields for AES KEYHA */
\r
206 #define _AES_KEYHA_RESETVALUE 0x00000000UL /**< Default value for AES_KEYHA */
\r
207 #define _AES_KEYHA_MASK 0xFFFFFFFFUL /**< Mask for AES_KEYHA */
\r
208 #define _AES_KEYHA_KEYHA_SHIFT 0 /**< Shift value for AES_KEYHA */
\r
209 #define _AES_KEYHA_KEYHA_MASK 0xFFFFFFFFUL /**< Bit mask for AES_KEYHA */
\r
210 #define _AES_KEYHA_KEYHA_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_KEYHA */
\r
211 #define AES_KEYHA_KEYHA_DEFAULT (_AES_KEYHA_KEYHA_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_KEYHA */
\r
213 /* Bit fields for AES KEYHB */
\r
214 #define _AES_KEYHB_RESETVALUE 0x00000000UL /**< Default value for AES_KEYHB */
\r
215 #define _AES_KEYHB_MASK 0xFFFFFFFFUL /**< Mask for AES_KEYHB */
\r
216 #define _AES_KEYHB_KEYHB_SHIFT 0 /**< Shift value for AES_KEYHB */
\r
217 #define _AES_KEYHB_KEYHB_MASK 0xFFFFFFFFUL /**< Bit mask for AES_KEYHB */
\r
218 #define _AES_KEYHB_KEYHB_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_KEYHB */
\r
219 #define AES_KEYHB_KEYHB_DEFAULT (_AES_KEYHB_KEYHB_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_KEYHB */
\r
221 /* Bit fields for AES KEYHC */
\r
222 #define _AES_KEYHC_RESETVALUE 0x00000000UL /**< Default value for AES_KEYHC */
\r
223 #define _AES_KEYHC_MASK 0xFFFFFFFFUL /**< Mask for AES_KEYHC */
\r
224 #define _AES_KEYHC_KEYHC_SHIFT 0 /**< Shift value for AES_KEYHC */
\r
225 #define _AES_KEYHC_KEYHC_MASK 0xFFFFFFFFUL /**< Bit mask for AES_KEYHC */
\r
226 #define _AES_KEYHC_KEYHC_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_KEYHC */
\r
227 #define AES_KEYHC_KEYHC_DEFAULT (_AES_KEYHC_KEYHC_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_KEYHC */
\r
229 /* Bit fields for AES KEYHD */
\r
230 #define _AES_KEYHD_RESETVALUE 0x00000000UL /**< Default value for AES_KEYHD */
\r
231 #define _AES_KEYHD_MASK 0xFFFFFFFFUL /**< Mask for AES_KEYHD */
\r
232 #define _AES_KEYHD_KEYHD_SHIFT 0 /**< Shift value for AES_KEYHD */
\r
233 #define _AES_KEYHD_KEYHD_MASK 0xFFFFFFFFUL /**< Bit mask for AES_KEYHD */
\r
234 #define _AES_KEYHD_KEYHD_DEFAULT 0x00000000UL /**< Mode DEFAULT for AES_KEYHD */
\r
235 #define AES_KEYHD_KEYHD_DEFAULT (_AES_KEYHD_KEYHD_DEFAULT << 0) /**< Shifted mode DEFAULT for AES_KEYHD */
\r
237 /** @} End of group EFM32WG_AES */
\r