1 /**************************************************************************//** 2 * @file 3 * @brief EFR32MG21 MSC register and bit field definitions 4 ****************************************************************************** 5 * # License 6 * <b>Copyright 2022 Silicon Laboratories, Inc. www.silabs.com</b> 7 ****************************************************************************** 8 * 9 * SPDX-License-Identifier: Zlib 10 * 11 * The licensor of this software is Silicon Laboratories Inc. 12 * 13 * This software is provided 'as-is', without any express or implied 14 * warranty. In no event will the authors be held liable for any damages 15 * arising from the use of this software. 16 * 17 * Permission is granted to anyone to use this software for any purpose, 18 * including commercial applications, and to alter it and redistribute it 19 * freely, subject to the following restrictions: 20 * 21 * 1. The origin of this software must not be misrepresented; you must not 22 * claim that you wrote the original software. If you use this software 23 * in a product, an acknowledgment in the product documentation would be 24 * appreciated but is not required. 25 * 2. Altered source versions must be plainly marked as such, and must not be 26 * misrepresented as being the original software. 27 * 3. This notice may not be removed or altered from any source distribution. 28 * 29 *****************************************************************************/ 30 #ifndef EFR32MG21_MSC_H 31 #define EFR32MG21_MSC_H 32 #define MSC_HAS_SET_CLEAR 33 34 /**************************************************************************//** 35 * @addtogroup Parts 36 * @{ 37 ******************************************************************************/ 38 /**************************************************************************//** 39 * @defgroup EFR32MG21_MSC MSC 40 * @{ 41 * @brief EFR32MG21 MSC Register Declaration. 42 *****************************************************************************/ 43 44 /** MSC Register Declaration. */ 45 typedef struct { 46 __IM uint32_t IPVERSION; /**< IP version ID */ 47 uint32_t RESERVED0[1U]; /**< Reserved for future use */ 48 __IOM uint32_t READCTRL; /**< Read Control Register */ 49 __IOM uint32_t WRITECTRL; /**< Write Control Register */ 50 __IOM uint32_t WRITECMD; /**< Write Command Register */ 51 __IOM uint32_t ADDRB; /**< Page Erase/Write Address Buffer */ 52 __IOM uint32_t WDATA; /**< Write Data Register */ 53 __IM uint32_t STATUS; /**< Status Register */ 54 __IOM uint32_t IF; /**< Interrupt Flag Register */ 55 __IOM uint32_t IEN; /**< Interrupt Enable Register */ 56 uint32_t RESERVED1[3U]; /**< Reserved for future use */ 57 __IM uint32_t USERDATASIZE; /**< user data regsion size */ 58 __IOM uint32_t CMD; /**< Command Register */ 59 __IOM uint32_t LOCK; /**< Configuration Lock Register */ 60 __IOM uint32_t MISCLOCKWORD; /**< Mass erase and User data page lock word */ 61 uint32_t RESERVED2[55U]; /**< Reserved for future use */ 62 __IOM uint32_t PAGELOCK0; /**< Main space page 0-31 lock word */ 63 __IOM uint32_t PAGELOCK1; /**< Main space page 32-63 lock word */ 64 __IOM uint32_t PAGELOCK2; /**< Main space page 64-95 lock word */ 65 __IOM uint32_t PAGELOCK3; /**< Main space page 96-127 lock word */ 66 uint32_t RESERVED3[4U]; /**< Reserved for future use */ 67 uint32_t RESERVED4[4U]; /**< Reserved for future use */ 68 uint32_t RESERVED5[4U]; /**< Reserved for future use */ 69 uint32_t RESERVED6[4U]; /**< Reserved for future use */ 70 uint32_t RESERVED7[12U]; /**< Reserved for future use */ 71 uint32_t RESERVED8[1U]; /**< Reserved for future use */ 72 uint32_t RESERVED9[11U]; /**< Reserved for future use */ 73 uint32_t RESERVED10[1U]; /**< Reserved for future use */ 74 uint32_t RESERVED11[907U]; /**< Reserved for future use */ 75 __IM uint32_t IPVERSION_SET; /**< IP version ID */ 76 uint32_t RESERVED12[1U]; /**< Reserved for future use */ 77 __IOM uint32_t READCTRL_SET; /**< Read Control Register */ 78 __IOM uint32_t WRITECTRL_SET; /**< Write Control Register */ 79 __IOM uint32_t WRITECMD_SET; /**< Write Command Register */ 80 __IOM uint32_t ADDRB_SET; /**< Page Erase/Write Address Buffer */ 81 __IOM uint32_t WDATA_SET; /**< Write Data Register */ 82 __IM uint32_t STATUS_SET; /**< Status Register */ 83 __IOM uint32_t IF_SET; /**< Interrupt Flag Register */ 84 __IOM uint32_t IEN_SET; /**< Interrupt Enable Register */ 85 uint32_t RESERVED13[3U]; /**< Reserved for future use */ 86 __IM uint32_t USERDATASIZE_SET; /**< user data regsion size */ 87 __IOM uint32_t CMD_SET; /**< Command Register */ 88 __IOM uint32_t LOCK_SET; /**< Configuration Lock Register */ 89 __IOM uint32_t MISCLOCKWORD_SET; /**< Mass erase and User data page lock word */ 90 uint32_t RESERVED14[55U]; /**< Reserved for future use */ 91 __IOM uint32_t PAGELOCK0_SET; /**< Main space page 0-31 lock word */ 92 __IOM uint32_t PAGELOCK1_SET; /**< Main space page 32-63 lock word */ 93 __IOM uint32_t PAGELOCK2_SET; /**< Main space page 64-95 lock word */ 94 __IOM uint32_t PAGELOCK3_SET; /**< Main space page 96-127 lock word */ 95 uint32_t RESERVED15[4U]; /**< Reserved for future use */ 96 uint32_t RESERVED16[4U]; /**< Reserved for future use */ 97 uint32_t RESERVED17[4U]; /**< Reserved for future use */ 98 uint32_t RESERVED18[4U]; /**< Reserved for future use */ 99 uint32_t RESERVED19[12U]; /**< Reserved for future use */ 100 uint32_t RESERVED20[1U]; /**< Reserved for future use */ 101 uint32_t RESERVED21[11U]; /**< Reserved for future use */ 102 uint32_t RESERVED22[1U]; /**< Reserved for future use */ 103 uint32_t RESERVED23[907U]; /**< Reserved for future use */ 104 __IM uint32_t IPVERSION_CLR; /**< IP version ID */ 105 uint32_t RESERVED24[1U]; /**< Reserved for future use */ 106 __IOM uint32_t READCTRL_CLR; /**< Read Control Register */ 107 __IOM uint32_t WRITECTRL_CLR; /**< Write Control Register */ 108 __IOM uint32_t WRITECMD_CLR; /**< Write Command Register */ 109 __IOM uint32_t ADDRB_CLR; /**< Page Erase/Write Address Buffer */ 110 __IOM uint32_t WDATA_CLR; /**< Write Data Register */ 111 __IM uint32_t STATUS_CLR; /**< Status Register */ 112 __IOM uint32_t IF_CLR; /**< Interrupt Flag Register */ 113 __IOM uint32_t IEN_CLR; /**< Interrupt Enable Register */ 114 uint32_t RESERVED25[3U]; /**< Reserved for future use */ 115 __IM uint32_t USERDATASIZE_CLR; /**< user data regsion size */ 116 __IOM uint32_t CMD_CLR; /**< Command Register */ 117 __IOM uint32_t LOCK_CLR; /**< Configuration Lock Register */ 118 __IOM uint32_t MISCLOCKWORD_CLR; /**< Mass erase and User data page lock word */ 119 uint32_t RESERVED26[55U]; /**< Reserved for future use */ 120 __IOM uint32_t PAGELOCK0_CLR; /**< Main space page 0-31 lock word */ 121 __IOM uint32_t PAGELOCK1_CLR; /**< Main space page 32-63 lock word */ 122 __IOM uint32_t PAGELOCK2_CLR; /**< Main space page 64-95 lock word */ 123 __IOM uint32_t PAGELOCK3_CLR; /**< Main space page 96-127 lock word */ 124 uint32_t RESERVED27[4U]; /**< Reserved for future use */ 125 uint32_t RESERVED28[4U]; /**< Reserved for future use */ 126 uint32_t RESERVED29[4U]; /**< Reserved for future use */ 127 uint32_t RESERVED30[4U]; /**< Reserved for future use */ 128 uint32_t RESERVED31[12U]; /**< Reserved for future use */ 129 uint32_t RESERVED32[1U]; /**< Reserved for future use */ 130 uint32_t RESERVED33[11U]; /**< Reserved for future use */ 131 uint32_t RESERVED34[1U]; /**< Reserved for future use */ 132 uint32_t RESERVED35[907U]; /**< Reserved for future use */ 133 __IM uint32_t IPVERSION_TGL; /**< IP version ID */ 134 uint32_t RESERVED36[1U]; /**< Reserved for future use */ 135 __IOM uint32_t READCTRL_TGL; /**< Read Control Register */ 136 __IOM uint32_t WRITECTRL_TGL; /**< Write Control Register */ 137 __IOM uint32_t WRITECMD_TGL; /**< Write Command Register */ 138 __IOM uint32_t ADDRB_TGL; /**< Page Erase/Write Address Buffer */ 139 __IOM uint32_t WDATA_TGL; /**< Write Data Register */ 140 __IM uint32_t STATUS_TGL; /**< Status Register */ 141 __IOM uint32_t IF_TGL; /**< Interrupt Flag Register */ 142 __IOM uint32_t IEN_TGL; /**< Interrupt Enable Register */ 143 uint32_t RESERVED37[3U]; /**< Reserved for future use */ 144 __IM uint32_t USERDATASIZE_TGL; /**< user data regsion size */ 145 __IOM uint32_t CMD_TGL; /**< Command Register */ 146 __IOM uint32_t LOCK_TGL; /**< Configuration Lock Register */ 147 __IOM uint32_t MISCLOCKWORD_TGL; /**< Mass erase and User data page lock word */ 148 uint32_t RESERVED38[55U]; /**< Reserved for future use */ 149 __IOM uint32_t PAGELOCK0_TGL; /**< Main space page 0-31 lock word */ 150 __IOM uint32_t PAGELOCK1_TGL; /**< Main space page 32-63 lock word */ 151 __IOM uint32_t PAGELOCK2_TGL; /**< Main space page 64-95 lock word */ 152 __IOM uint32_t PAGELOCK3_TGL; /**< Main space page 96-127 lock word */ 153 uint32_t RESERVED39[4U]; /**< Reserved for future use */ 154 uint32_t RESERVED40[4U]; /**< Reserved for future use */ 155 uint32_t RESERVED41[4U]; /**< Reserved for future use */ 156 uint32_t RESERVED42[4U]; /**< Reserved for future use */ 157 uint32_t RESERVED43[12U]; /**< Reserved for future use */ 158 uint32_t RESERVED44[1U]; /**< Reserved for future use */ 159 uint32_t RESERVED45[11U]; /**< Reserved for future use */ 160 uint32_t RESERVED46[1U]; /**< Reserved for future use */ 161 } MSC_TypeDef; 162 /** @} End of group EFR32MG21_MSC */ 163 164 /**************************************************************************//** 165 * @addtogroup EFR32MG21_MSC 166 * @{ 167 * @defgroup EFR32MG21_MSC_BitFields MSC Bit Fields 168 * @{ 169 *****************************************************************************/ 170 171 /* Bit fields for MSC IPVERSION */ 172 #define _MSC_IPVERSION_RESETVALUE 0x00000006UL /**< Default value for MSC_IPVERSION */ 173 #define _MSC_IPVERSION_MASK 0xFFFFFFFFUL /**< Mask for MSC_IPVERSION */ 174 #define _MSC_IPVERSION_IPVERSION_SHIFT 0 /**< Shift value for MSC_IPVERSION */ 175 #define _MSC_IPVERSION_IPVERSION_MASK 0xFFFFFFFFUL /**< Bit mask for MSC_IPVERSION */ 176 #define _MSC_IPVERSION_IPVERSION_DEFAULT 0x00000006UL /**< Mode DEFAULT for MSC_IPVERSION */ 177 #define MSC_IPVERSION_IPVERSION_DEFAULT (_MSC_IPVERSION_IPVERSION_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_IPVERSION */ 178 179 /* Bit fields for MSC READCTRL */ 180 #define _MSC_READCTRL_RESETVALUE 0x00200000UL /**< Default value for MSC_READCTRL */ 181 #define _MSC_READCTRL_MASK 0x00301002UL /**< Mask for MSC_READCTRL */ 182 #define MSC_READCTRL_DOUTBUFEN (0x1UL << 12) /**< Flash dout pipeline buffer enable */ 183 #define _MSC_READCTRL_DOUTBUFEN_SHIFT 12 /**< Shift value for MSC_DOUTBUFEN */ 184 #define _MSC_READCTRL_DOUTBUFEN_MASK 0x1000UL /**< Bit mask for MSC_DOUTBUFEN */ 185 #define _MSC_READCTRL_DOUTBUFEN_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_READCTRL */ 186 #define MSC_READCTRL_DOUTBUFEN_DEFAULT (_MSC_READCTRL_DOUTBUFEN_DEFAULT << 12) /**< Shifted mode DEFAULT for MSC_READCTRL */ 187 #define _MSC_READCTRL_MODE_SHIFT 20 /**< Shift value for MSC_MODE */ 188 #define _MSC_READCTRL_MODE_MASK 0x300000UL /**< Bit mask for MSC_MODE */ 189 #define _MSC_READCTRL_MODE_DEFAULT 0x00000002UL /**< Mode DEFAULT for MSC_READCTRL */ 190 #define _MSC_READCTRL_MODE_WS0 0x00000000UL /**< Mode WS0 for MSC_READCTRL */ 191 #define _MSC_READCTRL_MODE_WS1 0x00000001UL /**< Mode WS1 for MSC_READCTRL */ 192 #define _MSC_READCTRL_MODE_WS2 0x00000002UL /**< Mode WS2 for MSC_READCTRL */ 193 #define _MSC_READCTRL_MODE_WS3 0x00000003UL /**< Mode WS3 for MSC_READCTRL */ 194 #define MSC_READCTRL_MODE_DEFAULT (_MSC_READCTRL_MODE_DEFAULT << 20) /**< Shifted mode DEFAULT for MSC_READCTRL */ 195 #define MSC_READCTRL_MODE_WS0 (_MSC_READCTRL_MODE_WS0 << 20) /**< Shifted mode WS0 for MSC_READCTRL */ 196 #define MSC_READCTRL_MODE_WS1 (_MSC_READCTRL_MODE_WS1 << 20) /**< Shifted mode WS1 for MSC_READCTRL */ 197 #define MSC_READCTRL_MODE_WS2 (_MSC_READCTRL_MODE_WS2 << 20) /**< Shifted mode WS2 for MSC_READCTRL */ 198 #define MSC_READCTRL_MODE_WS3 (_MSC_READCTRL_MODE_WS3 << 20) /**< Shifted mode WS3 for MSC_READCTRL */ 199 200 /* Bit fields for MSC WRITECTRL */ 201 #define _MSC_WRITECTRL_RESETVALUE 0x00000000UL /**< Default value for MSC_WRITECTRL */ 202 #define _MSC_WRITECTRL_MASK 0x0000000BUL /**< Mask for MSC_WRITECTRL */ 203 #define MSC_WRITECTRL_WREN (0x1UL << 0) /**< Enable Write/Erase Controller */ 204 #define _MSC_WRITECTRL_WREN_SHIFT 0 /**< Shift value for MSC_WREN */ 205 #define _MSC_WRITECTRL_WREN_MASK 0x1UL /**< Bit mask for MSC_WREN */ 206 #define _MSC_WRITECTRL_WREN_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_WRITECTRL */ 207 #define MSC_WRITECTRL_WREN_DEFAULT (_MSC_WRITECTRL_WREN_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_WRITECTRL */ 208 #define MSC_WRITECTRL_IRQERASEABORT (0x1UL << 1) /**< Abort Page Erase on Interrupt */ 209 #define _MSC_WRITECTRL_IRQERASEABORT_SHIFT 1 /**< Shift value for MSC_IRQERASEABORT */ 210 #define _MSC_WRITECTRL_IRQERASEABORT_MASK 0x2UL /**< Bit mask for MSC_IRQERASEABORT */ 211 #define _MSC_WRITECTRL_IRQERASEABORT_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_WRITECTRL */ 212 #define MSC_WRITECTRL_IRQERASEABORT_DEFAULT (_MSC_WRITECTRL_IRQERASEABORT_DEFAULT << 1) /**< Shifted mode DEFAULT for MSC_WRITECTRL */ 213 #define MSC_WRITECTRL_LPWRITE (0x1UL << 3) /**< Low-Power Write */ 214 #define _MSC_WRITECTRL_LPWRITE_SHIFT 3 /**< Shift value for MSC_LPWRITE */ 215 #define _MSC_WRITECTRL_LPWRITE_MASK 0x8UL /**< Bit mask for MSC_LPWRITE */ 216 #define _MSC_WRITECTRL_LPWRITE_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_WRITECTRL */ 217 #define MSC_WRITECTRL_LPWRITE_DEFAULT (_MSC_WRITECTRL_LPWRITE_DEFAULT << 3) /**< Shifted mode DEFAULT for MSC_WRITECTRL */ 218 219 /* Bit fields for MSC WRITECMD */ 220 #define _MSC_WRITECMD_RESETVALUE 0x00000000UL /**< Default value for MSC_WRITECMD */ 221 #define _MSC_WRITECMD_MASK 0x00001126UL /**< Mask for MSC_WRITECMD */ 222 #define MSC_WRITECMD_ERASEPAGE (0x1UL << 1) /**< Erase Page */ 223 #define _MSC_WRITECMD_ERASEPAGE_SHIFT 1 /**< Shift value for MSC_ERASEPAGE */ 224 #define _MSC_WRITECMD_ERASEPAGE_MASK 0x2UL /**< Bit mask for MSC_ERASEPAGE */ 225 #define _MSC_WRITECMD_ERASEPAGE_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_WRITECMD */ 226 #define MSC_WRITECMD_ERASEPAGE_DEFAULT (_MSC_WRITECMD_ERASEPAGE_DEFAULT << 1) /**< Shifted mode DEFAULT for MSC_WRITECMD */ 227 #define MSC_WRITECMD_WRITEEND (0x1UL << 2) /**< End Write Mode */ 228 #define _MSC_WRITECMD_WRITEEND_SHIFT 2 /**< Shift value for MSC_WRITEEND */ 229 #define _MSC_WRITECMD_WRITEEND_MASK 0x4UL /**< Bit mask for MSC_WRITEEND */ 230 #define _MSC_WRITECMD_WRITEEND_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_WRITECMD */ 231 #define MSC_WRITECMD_WRITEEND_DEFAULT (_MSC_WRITECMD_WRITEEND_DEFAULT << 2) /**< Shifted mode DEFAULT for MSC_WRITECMD */ 232 #define MSC_WRITECMD_ERASEABORT (0x1UL << 5) /**< Abort erase sequence */ 233 #define _MSC_WRITECMD_ERASEABORT_SHIFT 5 /**< Shift value for MSC_ERASEABORT */ 234 #define _MSC_WRITECMD_ERASEABORT_MASK 0x20UL /**< Bit mask for MSC_ERASEABORT */ 235 #define _MSC_WRITECMD_ERASEABORT_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_WRITECMD */ 236 #define MSC_WRITECMD_ERASEABORT_DEFAULT (_MSC_WRITECMD_ERASEABORT_DEFAULT << 5) /**< Shifted mode DEFAULT for MSC_WRITECMD */ 237 #define MSC_WRITECMD_ERASEMAIN0 (0x1UL << 8) /**< Mass erase region 0 */ 238 #define _MSC_WRITECMD_ERASEMAIN0_SHIFT 8 /**< Shift value for MSC_ERASEMAIN0 */ 239 #define _MSC_WRITECMD_ERASEMAIN0_MASK 0x100UL /**< Bit mask for MSC_ERASEMAIN0 */ 240 #define _MSC_WRITECMD_ERASEMAIN0_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_WRITECMD */ 241 #define MSC_WRITECMD_ERASEMAIN0_DEFAULT (_MSC_WRITECMD_ERASEMAIN0_DEFAULT << 8) /**< Shifted mode DEFAULT for MSC_WRITECMD */ 242 #define MSC_WRITECMD_CLEARWDATA (0x1UL << 12) /**< Clear WDATA state */ 243 #define _MSC_WRITECMD_CLEARWDATA_SHIFT 12 /**< Shift value for MSC_CLEARWDATA */ 244 #define _MSC_WRITECMD_CLEARWDATA_MASK 0x1000UL /**< Bit mask for MSC_CLEARWDATA */ 245 #define _MSC_WRITECMD_CLEARWDATA_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_WRITECMD */ 246 #define MSC_WRITECMD_CLEARWDATA_DEFAULT (_MSC_WRITECMD_CLEARWDATA_DEFAULT << 12) /**< Shifted mode DEFAULT for MSC_WRITECMD */ 247 248 /* Bit fields for MSC ADDRB */ 249 #define _MSC_ADDRB_RESETVALUE 0x00000000UL /**< Default value for MSC_ADDRB */ 250 #define _MSC_ADDRB_MASK 0xFFFFFFFFUL /**< Mask for MSC_ADDRB */ 251 #define _MSC_ADDRB_ADDRB_SHIFT 0 /**< Shift value for MSC_ADDRB */ 252 #define _MSC_ADDRB_ADDRB_MASK 0xFFFFFFFFUL /**< Bit mask for MSC_ADDRB */ 253 #define _MSC_ADDRB_ADDRB_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_ADDRB */ 254 #define MSC_ADDRB_ADDRB_DEFAULT (_MSC_ADDRB_ADDRB_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_ADDRB */ 255 256 /* Bit fields for MSC WDATA */ 257 #define _MSC_WDATA_RESETVALUE 0x00000000UL /**< Default value for MSC_WDATA */ 258 #define _MSC_WDATA_MASK 0xFFFFFFFFUL /**< Mask for MSC_WDATA */ 259 #define _MSC_WDATA_DATAW_SHIFT 0 /**< Shift value for MSC_DATAW */ 260 #define _MSC_WDATA_DATAW_MASK 0xFFFFFFFFUL /**< Bit mask for MSC_DATAW */ 261 #define _MSC_WDATA_DATAW_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_WDATA */ 262 #define MSC_WDATA_DATAW_DEFAULT (_MSC_WDATA_DATAW_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_WDATA */ 263 264 /* Bit fields for MSC STATUS */ 265 #define _MSC_STATUS_RESETVALUE 0x08000008UL /**< Default value for MSC_STATUS */ 266 #define _MSC_STATUS_MASK 0xF801007FUL /**< Mask for MSC_STATUS */ 267 #define MSC_STATUS_BUSY (0x1UL << 0) /**< Erase/Write Busy */ 268 #define _MSC_STATUS_BUSY_SHIFT 0 /**< Shift value for MSC_BUSY */ 269 #define _MSC_STATUS_BUSY_MASK 0x1UL /**< Bit mask for MSC_BUSY */ 270 #define _MSC_STATUS_BUSY_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_STATUS */ 271 #define MSC_STATUS_BUSY_DEFAULT (_MSC_STATUS_BUSY_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_STATUS */ 272 #define MSC_STATUS_LOCKED (0x1UL << 1) /**< Access Locked */ 273 #define _MSC_STATUS_LOCKED_SHIFT 1 /**< Shift value for MSC_LOCKED */ 274 #define _MSC_STATUS_LOCKED_MASK 0x2UL /**< Bit mask for MSC_LOCKED */ 275 #define _MSC_STATUS_LOCKED_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_STATUS */ 276 #define MSC_STATUS_LOCKED_DEFAULT (_MSC_STATUS_LOCKED_DEFAULT << 1) /**< Shifted mode DEFAULT for MSC_STATUS */ 277 #define MSC_STATUS_INVADDR (0x1UL << 2) /**< Invalid Write Address or Erase Page */ 278 #define _MSC_STATUS_INVADDR_SHIFT 2 /**< Shift value for MSC_INVADDR */ 279 #define _MSC_STATUS_INVADDR_MASK 0x4UL /**< Bit mask for MSC_INVADDR */ 280 #define _MSC_STATUS_INVADDR_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_STATUS */ 281 #define MSC_STATUS_INVADDR_DEFAULT (_MSC_STATUS_INVADDR_DEFAULT << 2) /**< Shifted mode DEFAULT for MSC_STATUS */ 282 #define MSC_STATUS_WDATAREADY (0x1UL << 3) /**< WDATA Write Ready */ 283 #define _MSC_STATUS_WDATAREADY_SHIFT 3 /**< Shift value for MSC_WDATAREADY */ 284 #define _MSC_STATUS_WDATAREADY_MASK 0x8UL /**< Bit mask for MSC_WDATAREADY */ 285 #define _MSC_STATUS_WDATAREADY_DEFAULT 0x00000001UL /**< Mode DEFAULT for MSC_STATUS */ 286 #define MSC_STATUS_WDATAREADY_DEFAULT (_MSC_STATUS_WDATAREADY_DEFAULT << 3) /**< Shifted mode DEFAULT for MSC_STATUS */ 287 #define MSC_STATUS_ERASEABORTED (0x1UL << 4) /**< The Current Flash Erase Operation Aborted */ 288 #define _MSC_STATUS_ERASEABORTED_SHIFT 4 /**< Shift value for MSC_ERASEABORTED */ 289 #define _MSC_STATUS_ERASEABORTED_MASK 0x10UL /**< Bit mask for MSC_ERASEABORTED */ 290 #define _MSC_STATUS_ERASEABORTED_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_STATUS */ 291 #define MSC_STATUS_ERASEABORTED_DEFAULT (_MSC_STATUS_ERASEABORTED_DEFAULT << 4) /**< Shifted mode DEFAULT for MSC_STATUS */ 292 #define MSC_STATUS_PENDING (0x1UL << 5) /**< Write command is in queue */ 293 #define _MSC_STATUS_PENDING_SHIFT 5 /**< Shift value for MSC_PENDING */ 294 #define _MSC_STATUS_PENDING_MASK 0x20UL /**< Bit mask for MSC_PENDING */ 295 #define _MSC_STATUS_PENDING_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_STATUS */ 296 #define MSC_STATUS_PENDING_DEFAULT (_MSC_STATUS_PENDING_DEFAULT << 5) /**< Shifted mode DEFAULT for MSC_STATUS */ 297 #define MSC_STATUS_TIMEOUT (0x1UL << 6) /**< Write command timeout flag */ 298 #define _MSC_STATUS_TIMEOUT_SHIFT 6 /**< Shift value for MSC_TIMEOUT */ 299 #define _MSC_STATUS_TIMEOUT_MASK 0x40UL /**< Bit mask for MSC_TIMEOUT */ 300 #define _MSC_STATUS_TIMEOUT_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_STATUS */ 301 #define MSC_STATUS_TIMEOUT_DEFAULT (_MSC_STATUS_TIMEOUT_DEFAULT << 6) /**< Shifted mode DEFAULT for MSC_STATUS */ 302 #define MSC_STATUS_REGLOCK (0x1UL << 16) /**< Register Lock Status */ 303 #define _MSC_STATUS_REGLOCK_SHIFT 16 /**< Shift value for MSC_REGLOCK */ 304 #define _MSC_STATUS_REGLOCK_MASK 0x10000UL /**< Bit mask for MSC_REGLOCK */ 305 #define _MSC_STATUS_REGLOCK_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_STATUS */ 306 #define _MSC_STATUS_REGLOCK_UNLOCKED 0x00000000UL /**< Mode UNLOCKED for MSC_STATUS */ 307 #define _MSC_STATUS_REGLOCK_LOCKED 0x00000001UL /**< Mode LOCKED for MSC_STATUS */ 308 #define MSC_STATUS_REGLOCK_DEFAULT (_MSC_STATUS_REGLOCK_DEFAULT << 16) /**< Shifted mode DEFAULT for MSC_STATUS */ 309 #define MSC_STATUS_REGLOCK_UNLOCKED (_MSC_STATUS_REGLOCK_UNLOCKED << 16) /**< Shifted mode UNLOCKED for MSC_STATUS */ 310 #define MSC_STATUS_REGLOCK_LOCKED (_MSC_STATUS_REGLOCK_LOCKED << 16) /**< Shifted mode LOCKED for MSC_STATUS */ 311 #define MSC_STATUS_WREADY (0x1UL << 27) /**< Flash Write Ready */ 312 #define _MSC_STATUS_WREADY_SHIFT 27 /**< Shift value for MSC_WREADY */ 313 #define _MSC_STATUS_WREADY_MASK 0x8000000UL /**< Bit mask for MSC_WREADY */ 314 #define _MSC_STATUS_WREADY_DEFAULT 0x00000001UL /**< Mode DEFAULT for MSC_STATUS */ 315 #define MSC_STATUS_WREADY_DEFAULT (_MSC_STATUS_WREADY_DEFAULT << 27) /**< Shifted mode DEFAULT for MSC_STATUS */ 316 #define _MSC_STATUS_PWRUPCKBDFAILCOUNT_SHIFT 28 /**< Shift value for MSC_PWRUPCKBDFAILCOUNT */ 317 #define _MSC_STATUS_PWRUPCKBDFAILCOUNT_MASK 0xF0000000UL /**< Bit mask for MSC_PWRUPCKBDFAILCOUNT */ 318 #define _MSC_STATUS_PWRUPCKBDFAILCOUNT_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_STATUS */ 319 #define MSC_STATUS_PWRUPCKBDFAILCOUNT_DEFAULT (_MSC_STATUS_PWRUPCKBDFAILCOUNT_DEFAULT << 28) /**< Shifted mode DEFAULT for MSC_STATUS */ 320 321 /* Bit fields for MSC IF */ 322 #define _MSC_IF_RESETVALUE 0x00000000UL /**< Default value for MSC_IF */ 323 #define _MSC_IF_MASK 0x00000107UL /**< Mask for MSC_IF */ 324 #define MSC_IF_ERASE (0x1UL << 0) /**< Host Erase Done Interrupt Read Flag */ 325 #define _MSC_IF_ERASE_SHIFT 0 /**< Shift value for MSC_ERASE */ 326 #define _MSC_IF_ERASE_MASK 0x1UL /**< Bit mask for MSC_ERASE */ 327 #define _MSC_IF_ERASE_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_IF */ 328 #define MSC_IF_ERASE_DEFAULT (_MSC_IF_ERASE_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_IF */ 329 #define MSC_IF_WRITE (0x1UL << 1) /**< Host Write Done Interrupt Read Flag */ 330 #define _MSC_IF_WRITE_SHIFT 1 /**< Shift value for MSC_WRITE */ 331 #define _MSC_IF_WRITE_MASK 0x2UL /**< Bit mask for MSC_WRITE */ 332 #define _MSC_IF_WRITE_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_IF */ 333 #define MSC_IF_WRITE_DEFAULT (_MSC_IF_WRITE_DEFAULT << 1) /**< Shifted mode DEFAULT for MSC_IF */ 334 #define MSC_IF_WDATAOV (0x1UL << 2) /**< Host write buffer overflow */ 335 #define _MSC_IF_WDATAOV_SHIFT 2 /**< Shift value for MSC_WDATAOV */ 336 #define _MSC_IF_WDATAOV_MASK 0x4UL /**< Bit mask for MSC_WDATAOV */ 337 #define _MSC_IF_WDATAOV_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_IF */ 338 #define MSC_IF_WDATAOV_DEFAULT (_MSC_IF_WDATAOV_DEFAULT << 2) /**< Shifted mode DEFAULT for MSC_IF */ 339 #define MSC_IF_PWRUPF (0x1UL << 8) /**< Flash Power Up Sequence Complete Flag */ 340 #define _MSC_IF_PWRUPF_SHIFT 8 /**< Shift value for MSC_PWRUPF */ 341 #define _MSC_IF_PWRUPF_MASK 0x100UL /**< Bit mask for MSC_PWRUPF */ 342 #define _MSC_IF_PWRUPF_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_IF */ 343 #define MSC_IF_PWRUPF_DEFAULT (_MSC_IF_PWRUPF_DEFAULT << 8) /**< Shifted mode DEFAULT for MSC_IF */ 344 345 /* Bit fields for MSC IEN */ 346 #define _MSC_IEN_RESETVALUE 0x00000000UL /**< Default value for MSC_IEN */ 347 #define _MSC_IEN_MASK 0x00000107UL /**< Mask for MSC_IEN */ 348 #define MSC_IEN_ERASE (0x1UL << 0) /**< Erase Done Interrupt enable */ 349 #define _MSC_IEN_ERASE_SHIFT 0 /**< Shift value for MSC_ERASE */ 350 #define _MSC_IEN_ERASE_MASK 0x1UL /**< Bit mask for MSC_ERASE */ 351 #define _MSC_IEN_ERASE_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_IEN */ 352 #define MSC_IEN_ERASE_DEFAULT (_MSC_IEN_ERASE_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_IEN */ 353 #define MSC_IEN_WRITE (0x1UL << 1) /**< Write Done Interrupt enable */ 354 #define _MSC_IEN_WRITE_SHIFT 1 /**< Shift value for MSC_WRITE */ 355 #define _MSC_IEN_WRITE_MASK 0x2UL /**< Bit mask for MSC_WRITE */ 356 #define _MSC_IEN_WRITE_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_IEN */ 357 #define MSC_IEN_WRITE_DEFAULT (_MSC_IEN_WRITE_DEFAULT << 1) /**< Shifted mode DEFAULT for MSC_IEN */ 358 #define MSC_IEN_WDATAOV (0x1UL << 2) /**< write data buffer overflow irq enable */ 359 #define _MSC_IEN_WDATAOV_SHIFT 2 /**< Shift value for MSC_WDATAOV */ 360 #define _MSC_IEN_WDATAOV_MASK 0x4UL /**< Bit mask for MSC_WDATAOV */ 361 #define _MSC_IEN_WDATAOV_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_IEN */ 362 #define MSC_IEN_WDATAOV_DEFAULT (_MSC_IEN_WDATAOV_DEFAULT << 2) /**< Shifted mode DEFAULT for MSC_IEN */ 363 #define MSC_IEN_PWRUPF (0x1UL << 8) /**< Flash Power Up Sequence Complete */ 364 #define _MSC_IEN_PWRUPF_SHIFT 8 /**< Shift value for MSC_PWRUPF */ 365 #define _MSC_IEN_PWRUPF_MASK 0x100UL /**< Bit mask for MSC_PWRUPF */ 366 #define _MSC_IEN_PWRUPF_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_IEN */ 367 #define MSC_IEN_PWRUPF_DEFAULT (_MSC_IEN_PWRUPF_DEFAULT << 8) /**< Shifted mode DEFAULT for MSC_IEN */ 368 369 /* Bit fields for MSC USERDATASIZE */ 370 #define _MSC_USERDATASIZE_RESETVALUE 0x00000004UL /**< Default value for MSC_USERDATASIZE */ 371 #define _MSC_USERDATASIZE_MASK 0x0000003FUL /**< Mask for MSC_USERDATASIZE */ 372 #define _MSC_USERDATASIZE_USERDATASIZE_SHIFT 0 /**< Shift value for MSC_USERDATASIZE */ 373 #define _MSC_USERDATASIZE_USERDATASIZE_MASK 0x3FUL /**< Bit mask for MSC_USERDATASIZE */ 374 #define _MSC_USERDATASIZE_USERDATASIZE_DEFAULT 0x00000004UL /**< Mode DEFAULT for MSC_USERDATASIZE */ 375 #define MSC_USERDATASIZE_USERDATASIZE_DEFAULT (_MSC_USERDATASIZE_USERDATASIZE_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_USERDATASIZE */ 376 377 /* Bit fields for MSC CMD */ 378 #define _MSC_CMD_RESETVALUE 0x00000000UL /**< Default value for MSC_CMD */ 379 #define _MSC_CMD_MASK 0x00000001UL /**< Mask for MSC_CMD */ 380 #define MSC_CMD_PWRUP (0x1UL << 0) /**< Flash Power Up Command */ 381 #define _MSC_CMD_PWRUP_SHIFT 0 /**< Shift value for MSC_PWRUP */ 382 #define _MSC_CMD_PWRUP_MASK 0x1UL /**< Bit mask for MSC_PWRUP */ 383 #define _MSC_CMD_PWRUP_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_CMD */ 384 #define MSC_CMD_PWRUP_DEFAULT (_MSC_CMD_PWRUP_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_CMD */ 385 386 /* Bit fields for MSC LOCK */ 387 #define _MSC_LOCK_RESETVALUE 0x00000000UL /**< Default value for MSC_LOCK */ 388 #define _MSC_LOCK_MASK 0x0000FFFFUL /**< Mask for MSC_LOCK */ 389 #define _MSC_LOCK_LOCKKEY_SHIFT 0 /**< Shift value for MSC_LOCKKEY */ 390 #define _MSC_LOCK_LOCKKEY_MASK 0xFFFFUL /**< Bit mask for MSC_LOCKKEY */ 391 #define _MSC_LOCK_LOCKKEY_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_LOCK */ 392 #define _MSC_LOCK_LOCKKEY_LOCK 0x00000000UL /**< Mode LOCK for MSC_LOCK */ 393 #define _MSC_LOCK_LOCKKEY_UNLOCK 0x00001B71UL /**< Mode UNLOCK for MSC_LOCK */ 394 #define MSC_LOCK_LOCKKEY_DEFAULT (_MSC_LOCK_LOCKKEY_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_LOCK */ 395 #define MSC_LOCK_LOCKKEY_LOCK (_MSC_LOCK_LOCKKEY_LOCK << 0) /**< Shifted mode LOCK for MSC_LOCK */ 396 #define MSC_LOCK_LOCKKEY_UNLOCK (_MSC_LOCK_LOCKKEY_UNLOCK << 0) /**< Shifted mode UNLOCK for MSC_LOCK */ 397 398 /* Bit fields for MSC MISCLOCKWORD */ 399 #define _MSC_MISCLOCKWORD_RESETVALUE 0x00000010UL /**< Default value for MSC_MISCLOCKWORD */ 400 #define _MSC_MISCLOCKWORD_MASK 0x00000011UL /**< Mask for MSC_MISCLOCKWORD */ 401 #define MSC_MISCLOCKWORD_MELOCKBIT (0x1UL << 0) /**< Mass Erase Lock */ 402 #define _MSC_MISCLOCKWORD_MELOCKBIT_SHIFT 0 /**< Shift value for MSC_MELOCKBIT */ 403 #define _MSC_MISCLOCKWORD_MELOCKBIT_MASK 0x1UL /**< Bit mask for MSC_MELOCKBIT */ 404 #define _MSC_MISCLOCKWORD_MELOCKBIT_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_MISCLOCKWORD */ 405 #define MSC_MISCLOCKWORD_MELOCKBIT_DEFAULT (_MSC_MISCLOCKWORD_MELOCKBIT_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_MISCLOCKWORD */ 406 #define MSC_MISCLOCKWORD_UDLOCKBIT (0x1UL << 4) /**< User Data Lock */ 407 #define _MSC_MISCLOCKWORD_UDLOCKBIT_SHIFT 4 /**< Shift value for MSC_UDLOCKBIT */ 408 #define _MSC_MISCLOCKWORD_UDLOCKBIT_MASK 0x10UL /**< Bit mask for MSC_UDLOCKBIT */ 409 #define _MSC_MISCLOCKWORD_UDLOCKBIT_DEFAULT 0x00000001UL /**< Mode DEFAULT for MSC_MISCLOCKWORD */ 410 #define MSC_MISCLOCKWORD_UDLOCKBIT_DEFAULT (_MSC_MISCLOCKWORD_UDLOCKBIT_DEFAULT << 4) /**< Shifted mode DEFAULT for MSC_MISCLOCKWORD */ 411 412 /* Bit fields for MSC PAGELOCK0 */ 413 #define _MSC_PAGELOCK0_RESETVALUE 0x00000000UL /**< Default value for MSC_PAGELOCK0 */ 414 #define _MSC_PAGELOCK0_MASK 0xFFFFFFFFUL /**< Mask for MSC_PAGELOCK0 */ 415 #define _MSC_PAGELOCK0_LOCKBIT_SHIFT 0 /**< Shift value for MSC_LOCKBIT */ 416 #define _MSC_PAGELOCK0_LOCKBIT_MASK 0xFFFFFFFFUL /**< Bit mask for MSC_LOCKBIT */ 417 #define _MSC_PAGELOCK0_LOCKBIT_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_PAGELOCK0 */ 418 #define MSC_PAGELOCK0_LOCKBIT_DEFAULT (_MSC_PAGELOCK0_LOCKBIT_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_PAGELOCK0 */ 419 420 /* Bit fields for MSC PAGELOCK1 */ 421 #define _MSC_PAGELOCK1_RESETVALUE 0x00000000UL /**< Default value for MSC_PAGELOCK1 */ 422 #define _MSC_PAGELOCK1_MASK 0xFFFFFFFFUL /**< Mask for MSC_PAGELOCK1 */ 423 #define _MSC_PAGELOCK1_LOCKBIT_SHIFT 0 /**< Shift value for MSC_LOCKBIT */ 424 #define _MSC_PAGELOCK1_LOCKBIT_MASK 0xFFFFFFFFUL /**< Bit mask for MSC_LOCKBIT */ 425 #define _MSC_PAGELOCK1_LOCKBIT_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_PAGELOCK1 */ 426 #define MSC_PAGELOCK1_LOCKBIT_DEFAULT (_MSC_PAGELOCK1_LOCKBIT_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_PAGELOCK1 */ 427 428 /* Bit fields for MSC PAGELOCK2 */ 429 #define _MSC_PAGELOCK2_RESETVALUE 0x00000000UL /**< Default value for MSC_PAGELOCK2 */ 430 #define _MSC_PAGELOCK2_MASK 0xFFFFFFFFUL /**< Mask for MSC_PAGELOCK2 */ 431 #define _MSC_PAGELOCK2_LOCKBIT_SHIFT 0 /**< Shift value for MSC_LOCKBIT */ 432 #define _MSC_PAGELOCK2_LOCKBIT_MASK 0xFFFFFFFFUL /**< Bit mask for MSC_LOCKBIT */ 433 #define _MSC_PAGELOCK2_LOCKBIT_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_PAGELOCK2 */ 434 #define MSC_PAGELOCK2_LOCKBIT_DEFAULT (_MSC_PAGELOCK2_LOCKBIT_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_PAGELOCK2 */ 435 436 /* Bit fields for MSC PAGELOCK3 */ 437 #define _MSC_PAGELOCK3_RESETVALUE 0x00000000UL /**< Default value for MSC_PAGELOCK3 */ 438 #define _MSC_PAGELOCK3_MASK 0xFFFFFFFFUL /**< Mask for MSC_PAGELOCK3 */ 439 #define _MSC_PAGELOCK3_LOCKBIT_SHIFT 0 /**< Shift value for MSC_LOCKBIT */ 440 #define _MSC_PAGELOCK3_LOCKBIT_MASK 0xFFFFFFFFUL /**< Bit mask for MSC_LOCKBIT */ 441 #define _MSC_PAGELOCK3_LOCKBIT_DEFAULT 0x00000000UL /**< Mode DEFAULT for MSC_PAGELOCK3 */ 442 #define MSC_PAGELOCK3_LOCKBIT_DEFAULT (_MSC_PAGELOCK3_LOCKBIT_DEFAULT << 0) /**< Shifted mode DEFAULT for MSC_PAGELOCK3 */ 443 444 /** @} End of group EFR32MG21_MSC_BitFields */ 445 /** @} End of group EFR32MG21_MSC */ 446 /** @} End of group Parts */ 447 448 #endif /* EFR32MG21_MSC_H */ 449