Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of target-mcu-k64f by
MK64F12_nv.h
00001 /* 00002 ** ################################################################### 00003 ** Compilers: Keil ARM C/C++ Compiler 00004 ** Freescale C/C++ for Embedded ARM 00005 ** GNU C Compiler 00006 ** IAR ANSI C/C++ Compiler for ARM 00007 ** 00008 ** Reference manual: K64P144M120SF5RM, Rev.2, January 2014 00009 ** Version: rev. 2.5, 2014-02-10 00010 ** Build: b140604 00011 ** 00012 ** Abstract: 00013 ** Extension to the CMSIS register access layer header. 00014 ** 00015 ** Copyright (c) 2014 Freescale Semiconductor, Inc. 00016 ** All rights reserved. 00017 ** 00018 ** (C) COPYRIGHT 2015-2015 ARM Limited 00019 ** ALL RIGHTS RESERVED 00020 ** 00021 ** Redistribution and use in source and binary forms, with or without modification, 00022 ** are permitted provided that the following conditions are met: 00023 ** 00024 ** o Redistributions of source code must retain the above copyright notice, this list 00025 ** of conditions and the following disclaimer. 00026 ** 00027 ** o Redistributions in binary form must reproduce the above copyright notice, this 00028 ** list of conditions and the following disclaimer in the documentation and/or 00029 ** other materials provided with the distribution. 00030 ** 00031 ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its 00032 ** contributors may be used to endorse or promote products derived from this 00033 ** software without specific prior written permission. 00034 ** 00035 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 00036 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00037 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00038 ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 00039 ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00040 ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00041 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 00042 ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00043 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00044 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00045 ** 00046 ** http: www.freescale.com 00047 ** mail: support@freescale.com 00048 ** 00049 ** Revisions: 00050 ** - rev. 1.0 (2013-08-12) 00051 ** Initial version. 00052 ** - rev. 2.0 (2013-10-29) 00053 ** Register accessor macros added to the memory map. 00054 ** Symbols for Processor Expert memory map compatibility added to the memory map. 00055 ** Startup file for gcc has been updated according to CMSIS 3.2. 00056 ** System initialization updated. 00057 ** MCG - registers updated. 00058 ** PORTA, PORTB, PORTC, PORTE - registers for digital filter removed. 00059 ** - rev. 2.1 (2013-10-30) 00060 ** Definition of BITBAND macros updated to support peripherals with 32-bit acces disabled. 00061 ** - rev. 2.2 (2013-12-09) 00062 ** DMA - EARS register removed. 00063 ** AIPS0, AIPS1 - MPRA register updated. 00064 ** - rev. 2.3 (2014-01-24) 00065 ** Update according to reference manual rev. 2 00066 ** ENET, MCG, MCM, SIM, USB - registers updated 00067 ** - rev. 2.4 (2014-02-10) 00068 ** The declaration of clock configurations has been moved to separate header file system_MK64F12.h 00069 ** Update of SystemInit() and SystemCoreClockUpdate() functions. 00070 ** - rev. 2.5 (2014-02-10) 00071 ** The declaration of clock configurations has been moved to separate header file system_MK64F12.h 00072 ** Update of SystemInit() and SystemCoreClockUpdate() functions. 00073 ** Module access macro module_BASES replaced by module_BASE_PTRS. 00074 ** - rev. 2.6 (2015-08-03) (ARM) 00075 ** All accesses to memory are replaced by equivalent macros; this allows 00076 ** memory read/write operations to be re-defined if needed (for example, 00077 ** to implement new security features 00078 ** 00079 ** ################################################################### 00080 */ 00081 00082 /* 00083 * WARNING! DO NOT EDIT THIS FILE DIRECTLY! 00084 * 00085 * This file was generated automatically and any changes may be lost. 00086 */ 00087 #ifndef __HW_NV_REGISTERS_H__ 00088 #define __HW_NV_REGISTERS_H__ 00089 00090 #include "MK64F12.h" 00091 #include "fsl_bitaccess.h" 00092 00093 /* 00094 * MK64F12 NV 00095 * 00096 * Flash configuration field 00097 * 00098 * Registers defined in this header file: 00099 * - HW_NV_BACKKEY3 - Backdoor Comparison Key 3. 00100 * - HW_NV_BACKKEY2 - Backdoor Comparison Key 2. 00101 * - HW_NV_BACKKEY1 - Backdoor Comparison Key 1. 00102 * - HW_NV_BACKKEY0 - Backdoor Comparison Key 0. 00103 * - HW_NV_BACKKEY7 - Backdoor Comparison Key 7. 00104 * - HW_NV_BACKKEY6 - Backdoor Comparison Key 6. 00105 * - HW_NV_BACKKEY5 - Backdoor Comparison Key 5. 00106 * - HW_NV_BACKKEY4 - Backdoor Comparison Key 4. 00107 * - HW_NV_FPROT3 - Non-volatile P-Flash Protection 1 - Low Register 00108 * - HW_NV_FPROT2 - Non-volatile P-Flash Protection 1 - High Register 00109 * - HW_NV_FPROT1 - Non-volatile P-Flash Protection 0 - Low Register 00110 * - HW_NV_FPROT0 - Non-volatile P-Flash Protection 0 - High Register 00111 * - HW_NV_FSEC - Non-volatile Flash Security Register 00112 * - HW_NV_FOPT - Non-volatile Flash Option Register 00113 * - HW_NV_FEPROT - Non-volatile EERAM Protection Register 00114 * - HW_NV_FDPROT - Non-volatile D-Flash Protection Register 00115 * 00116 * - hw_nv_t - Struct containing all module registers. 00117 */ 00118 00119 #define HW_NV_INSTANCE_COUNT (1U) /*!< Number of instances of the NV module. */ 00120 00121 /******************************************************************************* 00122 * HW_NV_BACKKEY3 - Backdoor Comparison Key 3. 00123 ******************************************************************************/ 00124 00125 /*! 00126 * @brief HW_NV_BACKKEY3 - Backdoor Comparison Key 3. (RO) 00127 * 00128 * Reset value: 0xFFU 00129 */ 00130 typedef union _hw_nv_backkey3 00131 { 00132 uint8_t U; 00133 struct _hw_nv_backkey3_bitfields 00134 { 00135 uint8_t KEY : 8; /*!< [7:0] Backdoor Comparison Key. */ 00136 } B; 00137 } hw_nv_backkey3_t; 00138 00139 /*! 00140 * @name Constants and macros for entire NV_BACKKEY3 register 00141 */ 00142 /*@{*/ 00143 #define HW_NV_BACKKEY3_ADDR(x) ((x) + 0x0U) 00144 00145 #define HW_NV_BACKKEY3(x) (*(__I hw_nv_backkey3_t *) HW_NV_BACKKEY3_ADDR(x)) 00146 #define HW_NV_BACKKEY3_RD(x) (ADDRESS_READ(hw_nv_backkey3_t, HW_NV_BACKKEY3_ADDR(x))) 00147 /*@}*/ 00148 00149 /* 00150 * Constants & macros for individual NV_BACKKEY3 bitfields 00151 */ 00152 00153 /*! 00154 * @name Register NV_BACKKEY3, field KEY[7:0] (RO) 00155 */ 00156 /*@{*/ 00157 #define BP_NV_BACKKEY3_KEY (0U) /*!< Bit position for NV_BACKKEY3_KEY. */ 00158 #define BM_NV_BACKKEY3_KEY (0xFFU) /*!< Bit mask for NV_BACKKEY3_KEY. */ 00159 #define BS_NV_BACKKEY3_KEY (8U) /*!< Bit field size in bits for NV_BACKKEY3_KEY. */ 00160 00161 /*! @brief Read current value of the NV_BACKKEY3_KEY field. */ 00162 #define BR_NV_BACKKEY3_KEY(x) (HW_NV_BACKKEY3(x).U) 00163 /*@}*/ 00164 00165 /******************************************************************************* 00166 * HW_NV_BACKKEY2 - Backdoor Comparison Key 2. 00167 ******************************************************************************/ 00168 00169 /*! 00170 * @brief HW_NV_BACKKEY2 - Backdoor Comparison Key 2. (RO) 00171 * 00172 * Reset value: 0xFFU 00173 */ 00174 typedef union _hw_nv_backkey2 00175 { 00176 uint8_t U; 00177 struct _hw_nv_backkey2_bitfields 00178 { 00179 uint8_t KEY : 8; /*!< [7:0] Backdoor Comparison Key. */ 00180 } B; 00181 } hw_nv_backkey2_t; 00182 00183 /*! 00184 * @name Constants and macros for entire NV_BACKKEY2 register 00185 */ 00186 /*@{*/ 00187 #define HW_NV_BACKKEY2_ADDR(x) ((x) + 0x1U) 00188 00189 #define HW_NV_BACKKEY2(x) (*(__I hw_nv_backkey2_t *) HW_NV_BACKKEY2_ADDR(x)) 00190 #define HW_NV_BACKKEY2_RD(x) (ADDRESS_READ(hw_nv_backkey2_t, HW_NV_BACKKEY2_ADDR(x))) 00191 /*@}*/ 00192 00193 /* 00194 * Constants & macros for individual NV_BACKKEY2 bitfields 00195 */ 00196 00197 /*! 00198 * @name Register NV_BACKKEY2, field KEY[7:0] (RO) 00199 */ 00200 /*@{*/ 00201 #define BP_NV_BACKKEY2_KEY (0U) /*!< Bit position for NV_BACKKEY2_KEY. */ 00202 #define BM_NV_BACKKEY2_KEY (0xFFU) /*!< Bit mask for NV_BACKKEY2_KEY. */ 00203 #define BS_NV_BACKKEY2_KEY (8U) /*!< Bit field size in bits for NV_BACKKEY2_KEY. */ 00204 00205 /*! @brief Read current value of the NV_BACKKEY2_KEY field. */ 00206 #define BR_NV_BACKKEY2_KEY(x) (HW_NV_BACKKEY2(x).U) 00207 /*@}*/ 00208 00209 /******************************************************************************* 00210 * HW_NV_BACKKEY1 - Backdoor Comparison Key 1. 00211 ******************************************************************************/ 00212 00213 /*! 00214 * @brief HW_NV_BACKKEY1 - Backdoor Comparison Key 1. (RO) 00215 * 00216 * Reset value: 0xFFU 00217 */ 00218 typedef union _hw_nv_backkey1 00219 { 00220 uint8_t U; 00221 struct _hw_nv_backkey1_bitfields 00222 { 00223 uint8_t KEY : 8; /*!< [7:0] Backdoor Comparison Key. */ 00224 } B; 00225 } hw_nv_backkey1_t; 00226 00227 /*! 00228 * @name Constants and macros for entire NV_BACKKEY1 register 00229 */ 00230 /*@{*/ 00231 #define HW_NV_BACKKEY1_ADDR(x) ((x) + 0x2U) 00232 00233 #define HW_NV_BACKKEY1(x) (*(__I hw_nv_backkey1_t *) HW_NV_BACKKEY1_ADDR(x)) 00234 #define HW_NV_BACKKEY1_RD(x) (ADDRESS_READ(hw_nv_backkey1_t, HW_NV_BACKKEY1_ADDR(x))) 00235 /*@}*/ 00236 00237 /* 00238 * Constants & macros for individual NV_BACKKEY1 bitfields 00239 */ 00240 00241 /*! 00242 * @name Register NV_BACKKEY1, field KEY[7:0] (RO) 00243 */ 00244 /*@{*/ 00245 #define BP_NV_BACKKEY1_KEY (0U) /*!< Bit position for NV_BACKKEY1_KEY. */ 00246 #define BM_NV_BACKKEY1_KEY (0xFFU) /*!< Bit mask for NV_BACKKEY1_KEY. */ 00247 #define BS_NV_BACKKEY1_KEY (8U) /*!< Bit field size in bits for NV_BACKKEY1_KEY. */ 00248 00249 /*! @brief Read current value of the NV_BACKKEY1_KEY field. */ 00250 #define BR_NV_BACKKEY1_KEY(x) (HW_NV_BACKKEY1(x).U) 00251 /*@}*/ 00252 00253 /******************************************************************************* 00254 * HW_NV_BACKKEY0 - Backdoor Comparison Key 0. 00255 ******************************************************************************/ 00256 00257 /*! 00258 * @brief HW_NV_BACKKEY0 - Backdoor Comparison Key 0. (RO) 00259 * 00260 * Reset value: 0xFFU 00261 */ 00262 typedef union _hw_nv_backkey0 00263 { 00264 uint8_t U; 00265 struct _hw_nv_backkey0_bitfields 00266 { 00267 uint8_t KEY : 8; /*!< [7:0] Backdoor Comparison Key. */ 00268 } B; 00269 } hw_nv_backkey0_t; 00270 00271 /*! 00272 * @name Constants and macros for entire NV_BACKKEY0 register 00273 */ 00274 /*@{*/ 00275 #define HW_NV_BACKKEY0_ADDR(x) ((x) + 0x3U) 00276 00277 #define HW_NV_BACKKEY0(x) (*(__I hw_nv_backkey0_t *) HW_NV_BACKKEY0_ADDR(x)) 00278 #define HW_NV_BACKKEY0_RD(x) (ADDRESS_READ(hw_nv_backkey0_t, HW_NV_BACKKEY0_ADDR(x))) 00279 /*@}*/ 00280 00281 /* 00282 * Constants & macros for individual NV_BACKKEY0 bitfields 00283 */ 00284 00285 /*! 00286 * @name Register NV_BACKKEY0, field KEY[7:0] (RO) 00287 */ 00288 /*@{*/ 00289 #define BP_NV_BACKKEY0_KEY (0U) /*!< Bit position for NV_BACKKEY0_KEY. */ 00290 #define BM_NV_BACKKEY0_KEY (0xFFU) /*!< Bit mask for NV_BACKKEY0_KEY. */ 00291 #define BS_NV_BACKKEY0_KEY (8U) /*!< Bit field size in bits for NV_BACKKEY0_KEY. */ 00292 00293 /*! @brief Read current value of the NV_BACKKEY0_KEY field. */ 00294 #define BR_NV_BACKKEY0_KEY(x) (HW_NV_BACKKEY0(x).U) 00295 /*@}*/ 00296 00297 /******************************************************************************* 00298 * HW_NV_BACKKEY7 - Backdoor Comparison Key 7. 00299 ******************************************************************************/ 00300 00301 /*! 00302 * @brief HW_NV_BACKKEY7 - Backdoor Comparison Key 7. (RO) 00303 * 00304 * Reset value: 0xFFU 00305 */ 00306 typedef union _hw_nv_backkey7 00307 { 00308 uint8_t U; 00309 struct _hw_nv_backkey7_bitfields 00310 { 00311 uint8_t KEY : 8; /*!< [7:0] Backdoor Comparison Key. */ 00312 } B; 00313 } hw_nv_backkey7_t; 00314 00315 /*! 00316 * @name Constants and macros for entire NV_BACKKEY7 register 00317 */ 00318 /*@{*/ 00319 #define HW_NV_BACKKEY7_ADDR(x) ((x) + 0x4U) 00320 00321 #define HW_NV_BACKKEY7(x) (*(__I hw_nv_backkey7_t *) HW_NV_BACKKEY7_ADDR(x)) 00322 #define HW_NV_BACKKEY7_RD(x) (ADDRESS_READ(hw_nv_backkey7_t, HW_NV_BACKKEY7_ADDR(x))) 00323 /*@}*/ 00324 00325 /* 00326 * Constants & macros for individual NV_BACKKEY7 bitfields 00327 */ 00328 00329 /*! 00330 * @name Register NV_BACKKEY7, field KEY[7:0] (RO) 00331 */ 00332 /*@{*/ 00333 #define BP_NV_BACKKEY7_KEY (0U) /*!< Bit position for NV_BACKKEY7_KEY. */ 00334 #define BM_NV_BACKKEY7_KEY (0xFFU) /*!< Bit mask for NV_BACKKEY7_KEY. */ 00335 #define BS_NV_BACKKEY7_KEY (8U) /*!< Bit field size in bits for NV_BACKKEY7_KEY. */ 00336 00337 /*! @brief Read current value of the NV_BACKKEY7_KEY field. */ 00338 #define BR_NV_BACKKEY7_KEY(x) (HW_NV_BACKKEY7(x).U) 00339 /*@}*/ 00340 00341 /******************************************************************************* 00342 * HW_NV_BACKKEY6 - Backdoor Comparison Key 6. 00343 ******************************************************************************/ 00344 00345 /*! 00346 * @brief HW_NV_BACKKEY6 - Backdoor Comparison Key 6. (RO) 00347 * 00348 * Reset value: 0xFFU 00349 */ 00350 typedef union _hw_nv_backkey6 00351 { 00352 uint8_t U; 00353 struct _hw_nv_backkey6_bitfields 00354 { 00355 uint8_t KEY : 8; /*!< [7:0] Backdoor Comparison Key. */ 00356 } B; 00357 } hw_nv_backkey6_t; 00358 00359 /*! 00360 * @name Constants and macros for entire NV_BACKKEY6 register 00361 */ 00362 /*@{*/ 00363 #define HW_NV_BACKKEY6_ADDR(x) ((x) + 0x5U) 00364 00365 #define HW_NV_BACKKEY6(x) (*(__I hw_nv_backkey6_t *) HW_NV_BACKKEY6_ADDR(x)) 00366 #define HW_NV_BACKKEY6_RD(x) (ADDRESS_READ(hw_nv_backkey6_t, HW_NV_BACKKEY6_ADDR(x))) 00367 /*@}*/ 00368 00369 /* 00370 * Constants & macros for individual NV_BACKKEY6 bitfields 00371 */ 00372 00373 /*! 00374 * @name Register NV_BACKKEY6, field KEY[7:0] (RO) 00375 */ 00376 /*@{*/ 00377 #define BP_NV_BACKKEY6_KEY (0U) /*!< Bit position for NV_BACKKEY6_KEY. */ 00378 #define BM_NV_BACKKEY6_KEY (0xFFU) /*!< Bit mask for NV_BACKKEY6_KEY. */ 00379 #define BS_NV_BACKKEY6_KEY (8U) /*!< Bit field size in bits for NV_BACKKEY6_KEY. */ 00380 00381 /*! @brief Read current value of the NV_BACKKEY6_KEY field. */ 00382 #define BR_NV_BACKKEY6_KEY(x) (HW_NV_BACKKEY6(x).U) 00383 /*@}*/ 00384 00385 /******************************************************************************* 00386 * HW_NV_BACKKEY5 - Backdoor Comparison Key 5. 00387 ******************************************************************************/ 00388 00389 /*! 00390 * @brief HW_NV_BACKKEY5 - Backdoor Comparison Key 5. (RO) 00391 * 00392 * Reset value: 0xFFU 00393 */ 00394 typedef union _hw_nv_backkey5 00395 { 00396 uint8_t U; 00397 struct _hw_nv_backkey5_bitfields 00398 { 00399 uint8_t KEY : 8; /*!< [7:0] Backdoor Comparison Key. */ 00400 } B; 00401 } hw_nv_backkey5_t; 00402 00403 /*! 00404 * @name Constants and macros for entire NV_BACKKEY5 register 00405 */ 00406 /*@{*/ 00407 #define HW_NV_BACKKEY5_ADDR(x) ((x) + 0x6U) 00408 00409 #define HW_NV_BACKKEY5(x) (*(__I hw_nv_backkey5_t *) HW_NV_BACKKEY5_ADDR(x)) 00410 #define HW_NV_BACKKEY5_RD(x) (ADDRESS_READ(hw_nv_backkey5_t, HW_NV_BACKKEY5_ADDR(x))) 00411 /*@}*/ 00412 00413 /* 00414 * Constants & macros for individual NV_BACKKEY5 bitfields 00415 */ 00416 00417 /*! 00418 * @name Register NV_BACKKEY5, field KEY[7:0] (RO) 00419 */ 00420 /*@{*/ 00421 #define BP_NV_BACKKEY5_KEY (0U) /*!< Bit position for NV_BACKKEY5_KEY. */ 00422 #define BM_NV_BACKKEY5_KEY (0xFFU) /*!< Bit mask for NV_BACKKEY5_KEY. */ 00423 #define BS_NV_BACKKEY5_KEY (8U) /*!< Bit field size in bits for NV_BACKKEY5_KEY. */ 00424 00425 /*! @brief Read current value of the NV_BACKKEY5_KEY field. */ 00426 #define BR_NV_BACKKEY5_KEY(x) (HW_NV_BACKKEY5(x).U) 00427 /*@}*/ 00428 00429 /******************************************************************************* 00430 * HW_NV_BACKKEY4 - Backdoor Comparison Key 4. 00431 ******************************************************************************/ 00432 00433 /*! 00434 * @brief HW_NV_BACKKEY4 - Backdoor Comparison Key 4. (RO) 00435 * 00436 * Reset value: 0xFFU 00437 */ 00438 typedef union _hw_nv_backkey4 00439 { 00440 uint8_t U; 00441 struct _hw_nv_backkey4_bitfields 00442 { 00443 uint8_t KEY : 8; /*!< [7:0] Backdoor Comparison Key. */ 00444 } B; 00445 } hw_nv_backkey4_t; 00446 00447 /*! 00448 * @name Constants and macros for entire NV_BACKKEY4 register 00449 */ 00450 /*@{*/ 00451 #define HW_NV_BACKKEY4_ADDR(x) ((x) + 0x7U) 00452 00453 #define HW_NV_BACKKEY4(x) (*(__I hw_nv_backkey4_t *) HW_NV_BACKKEY4_ADDR(x)) 00454 #define HW_NV_BACKKEY4_RD(x) (ADDRESS_READ(hw_nv_backkey4_t, HW_NV_BACKKEY4_ADDR(x))) 00455 /*@}*/ 00456 00457 /* 00458 * Constants & macros for individual NV_BACKKEY4 bitfields 00459 */ 00460 00461 /*! 00462 * @name Register NV_BACKKEY4, field KEY[7:0] (RO) 00463 */ 00464 /*@{*/ 00465 #define BP_NV_BACKKEY4_KEY (0U) /*!< Bit position for NV_BACKKEY4_KEY. */ 00466 #define BM_NV_BACKKEY4_KEY (0xFFU) /*!< Bit mask for NV_BACKKEY4_KEY. */ 00467 #define BS_NV_BACKKEY4_KEY (8U) /*!< Bit field size in bits for NV_BACKKEY4_KEY. */ 00468 00469 /*! @brief Read current value of the NV_BACKKEY4_KEY field. */ 00470 #define BR_NV_BACKKEY4_KEY(x) (HW_NV_BACKKEY4(x).U) 00471 /*@}*/ 00472 00473 /******************************************************************************* 00474 * HW_NV_FPROT3 - Non-volatile P-Flash Protection 1 - Low Register 00475 ******************************************************************************/ 00476 00477 /*! 00478 * @brief HW_NV_FPROT3 - Non-volatile P-Flash Protection 1 - Low Register (RO) 00479 * 00480 * Reset value: 0xFFU 00481 */ 00482 typedef union _hw_nv_fprot3 00483 { 00484 uint8_t U; 00485 struct _hw_nv_fprot3_bitfields 00486 { 00487 uint8_t PROT : 8; /*!< [7:0] P-Flash Region Protect */ 00488 } B; 00489 } hw_nv_fprot3_t; 00490 00491 /*! 00492 * @name Constants and macros for entire NV_FPROT3 register 00493 */ 00494 /*@{*/ 00495 #define HW_NV_FPROT3_ADDR(x) ((x) + 0x8U) 00496 00497 #define HW_NV_FPROT3(x) (*(__I hw_nv_fprot3_t *) HW_NV_FPROT3_ADDR(x)) 00498 #define HW_NV_FPROT3_RD(x) (ADDRESS_READ(hw_nv_fprot3_t, HW_NV_FPROT3_ADDR(x))) 00499 /*@}*/ 00500 00501 /* 00502 * Constants & macros for individual NV_FPROT3 bitfields 00503 */ 00504 00505 /*! 00506 * @name Register NV_FPROT3, field PROT[7:0] (RO) 00507 */ 00508 /*@{*/ 00509 #define BP_NV_FPROT3_PROT (0U) /*!< Bit position for NV_FPROT3_PROT. */ 00510 #define BM_NV_FPROT3_PROT (0xFFU) /*!< Bit mask for NV_FPROT3_PROT. */ 00511 #define BS_NV_FPROT3_PROT (8U) /*!< Bit field size in bits for NV_FPROT3_PROT. */ 00512 00513 /*! @brief Read current value of the NV_FPROT3_PROT field. */ 00514 #define BR_NV_FPROT3_PROT(x) (HW_NV_FPROT3(x).U) 00515 /*@}*/ 00516 00517 /******************************************************************************* 00518 * HW_NV_FPROT2 - Non-volatile P-Flash Protection 1 - High Register 00519 ******************************************************************************/ 00520 00521 /*! 00522 * @brief HW_NV_FPROT2 - Non-volatile P-Flash Protection 1 - High Register (RO) 00523 * 00524 * Reset value: 0xFFU 00525 */ 00526 typedef union _hw_nv_fprot2 00527 { 00528 uint8_t U; 00529 struct _hw_nv_fprot2_bitfields 00530 { 00531 uint8_t PROT : 8; /*!< [7:0] P-Flash Region Protect */ 00532 } B; 00533 } hw_nv_fprot2_t; 00534 00535 /*! 00536 * @name Constants and macros for entire NV_FPROT2 register 00537 */ 00538 /*@{*/ 00539 #define HW_NV_FPROT2_ADDR(x) ((x) + 0x9U) 00540 00541 #define HW_NV_FPROT2(x) (*(__I hw_nv_fprot2_t *) HW_NV_FPROT2_ADDR(x)) 00542 #define HW_NV_FPROT2_RD(x) (ADDRESS_READ(hw_nv_fprot2_t, HW_NV_FPROT2_ADDR(x))) 00543 /*@}*/ 00544 00545 /* 00546 * Constants & macros for individual NV_FPROT2 bitfields 00547 */ 00548 00549 /*! 00550 * @name Register NV_FPROT2, field PROT[7:0] (RO) 00551 */ 00552 /*@{*/ 00553 #define BP_NV_FPROT2_PROT (0U) /*!< Bit position for NV_FPROT2_PROT. */ 00554 #define BM_NV_FPROT2_PROT (0xFFU) /*!< Bit mask for NV_FPROT2_PROT. */ 00555 #define BS_NV_FPROT2_PROT (8U) /*!< Bit field size in bits for NV_FPROT2_PROT. */ 00556 00557 /*! @brief Read current value of the NV_FPROT2_PROT field. */ 00558 #define BR_NV_FPROT2_PROT(x) (HW_NV_FPROT2(x).U) 00559 /*@}*/ 00560 00561 /******************************************************************************* 00562 * HW_NV_FPROT1 - Non-volatile P-Flash Protection 0 - Low Register 00563 ******************************************************************************/ 00564 00565 /*! 00566 * @brief HW_NV_FPROT1 - Non-volatile P-Flash Protection 0 - Low Register (RO) 00567 * 00568 * Reset value: 0xFFU 00569 */ 00570 typedef union _hw_nv_fprot1 00571 { 00572 uint8_t U; 00573 struct _hw_nv_fprot1_bitfields 00574 { 00575 uint8_t PROT : 8; /*!< [7:0] P-Flash Region Protect */ 00576 } B; 00577 } hw_nv_fprot1_t; 00578 00579 /*! 00580 * @name Constants and macros for entire NV_FPROT1 register 00581 */ 00582 /*@{*/ 00583 #define HW_NV_FPROT1_ADDR(x) ((x) + 0xAU) 00584 00585 #define HW_NV_FPROT1(x) (*(__I hw_nv_fprot1_t *) HW_NV_FPROT1_ADDR(x)) 00586 #define HW_NV_FPROT1_RD(x) (ADDRESS_READ(hw_nv_fprot1_t, HW_NV_FPROT1_ADDR(x))) 00587 /*@}*/ 00588 00589 /* 00590 * Constants & macros for individual NV_FPROT1 bitfields 00591 */ 00592 00593 /*! 00594 * @name Register NV_FPROT1, field PROT[7:0] (RO) 00595 */ 00596 /*@{*/ 00597 #define BP_NV_FPROT1_PROT (0U) /*!< Bit position for NV_FPROT1_PROT. */ 00598 #define BM_NV_FPROT1_PROT (0xFFU) /*!< Bit mask for NV_FPROT1_PROT. */ 00599 #define BS_NV_FPROT1_PROT (8U) /*!< Bit field size in bits for NV_FPROT1_PROT. */ 00600 00601 /*! @brief Read current value of the NV_FPROT1_PROT field. */ 00602 #define BR_NV_FPROT1_PROT(x) (HW_NV_FPROT1(x).U) 00603 /*@}*/ 00604 00605 /******************************************************************************* 00606 * HW_NV_FPROT0 - Non-volatile P-Flash Protection 0 - High Register 00607 ******************************************************************************/ 00608 00609 /*! 00610 * @brief HW_NV_FPROT0 - Non-volatile P-Flash Protection 0 - High Register (RO) 00611 * 00612 * Reset value: 0xFFU 00613 */ 00614 typedef union _hw_nv_fprot0 00615 { 00616 uint8_t U; 00617 struct _hw_nv_fprot0_bitfields 00618 { 00619 uint8_t PROT : 8; /*!< [7:0] P-Flash Region Protect */ 00620 } B; 00621 } hw_nv_fprot0_t; 00622 00623 /*! 00624 * @name Constants and macros for entire NV_FPROT0 register 00625 */ 00626 /*@{*/ 00627 #define HW_NV_FPROT0_ADDR(x) ((x) + 0xBU) 00628 00629 #define HW_NV_FPROT0(x) (*(__I hw_nv_fprot0_t *) HW_NV_FPROT0_ADDR(x)) 00630 #define HW_NV_FPROT0_RD(x) (ADDRESS_READ(hw_nv_fprot0_t, HW_NV_FPROT0_ADDR(x))) 00631 /*@}*/ 00632 00633 /* 00634 * Constants & macros for individual NV_FPROT0 bitfields 00635 */ 00636 00637 /*! 00638 * @name Register NV_FPROT0, field PROT[7:0] (RO) 00639 */ 00640 /*@{*/ 00641 #define BP_NV_FPROT0_PROT (0U) /*!< Bit position for NV_FPROT0_PROT. */ 00642 #define BM_NV_FPROT0_PROT (0xFFU) /*!< Bit mask for NV_FPROT0_PROT. */ 00643 #define BS_NV_FPROT0_PROT (8U) /*!< Bit field size in bits for NV_FPROT0_PROT. */ 00644 00645 /*! @brief Read current value of the NV_FPROT0_PROT field. */ 00646 #define BR_NV_FPROT0_PROT(x) (HW_NV_FPROT0(x).U) 00647 /*@}*/ 00648 00649 /******************************************************************************* 00650 * HW_NV_FSEC - Non-volatile Flash Security Register 00651 ******************************************************************************/ 00652 00653 /*! 00654 * @brief HW_NV_FSEC - Non-volatile Flash Security Register (RO) 00655 * 00656 * Reset value: 0xFFU 00657 * 00658 * Allows the user to customize the operation of the MCU at boot time 00659 */ 00660 typedef union _hw_nv_fsec 00661 { 00662 uint8_t U; 00663 struct _hw_nv_fsec_bitfields 00664 { 00665 uint8_t SEC : 2; /*!< [1:0] Flash Security */ 00666 uint8_t FSLACC : 2; /*!< [3:2] Freescale Failure Analysis Access Code 00667 * */ 00668 uint8_t MEEN : 2; /*!< [5:4] */ 00669 uint8_t KEYEN : 2; /*!< [7:6] Backdoor Key Security Enable */ 00670 } B; 00671 } hw_nv_fsec_t; 00672 00673 /*! 00674 * @name Constants and macros for entire NV_FSEC register 00675 */ 00676 /*@{*/ 00677 #define HW_NV_FSEC_ADDR(x) ((x) + 0xCU) 00678 00679 #define HW_NV_FSEC(x) (*(__I hw_nv_fsec_t *) HW_NV_FSEC_ADDR(x)) 00680 #define HW_NV_FSEC_RD(x) (ADDRESS_READ(hw_nv_fsec_t, HW_NV_FSEC_ADDR(x))) 00681 /*@}*/ 00682 00683 /* 00684 * Constants & macros for individual NV_FSEC bitfields 00685 */ 00686 00687 /*! 00688 * @name Register NV_FSEC, field SEC[1:0] (RO) 00689 * 00690 * Values: 00691 * - 10 - MCU security status is unsecure 00692 * - 11 - MCU security status is secure 00693 */ 00694 /*@{*/ 00695 #define BP_NV_FSEC_SEC (0U) /*!< Bit position for NV_FSEC_SEC. */ 00696 #define BM_NV_FSEC_SEC (0x03U) /*!< Bit mask for NV_FSEC_SEC. */ 00697 #define BS_NV_FSEC_SEC (2U) /*!< Bit field size in bits for NV_FSEC_SEC. */ 00698 00699 /*! @brief Read current value of the NV_FSEC_SEC field. */ 00700 #define BR_NV_FSEC_SEC(x) (UNION_READ(hw_nv_fsec_t, HW_NV_FSEC_ADDR(x), U, B.SEC)) 00701 /*@}*/ 00702 00703 /*! 00704 * @name Register NV_FSEC, field FSLACC[3:2] (RO) 00705 * 00706 * Values: 00707 * - 10 - Freescale factory access denied 00708 * - 11 - Freescale factory access granted 00709 */ 00710 /*@{*/ 00711 #define BP_NV_FSEC_FSLACC (2U) /*!< Bit position for NV_FSEC_FSLACC. */ 00712 #define BM_NV_FSEC_FSLACC (0x0CU) /*!< Bit mask for NV_FSEC_FSLACC. */ 00713 #define BS_NV_FSEC_FSLACC (2U) /*!< Bit field size in bits for NV_FSEC_FSLACC. */ 00714 00715 /*! @brief Read current value of the NV_FSEC_FSLACC field. */ 00716 #define BR_NV_FSEC_FSLACC(x) (UNION_READ(hw_nv_fsec_t, HW_NV_FSEC_ADDR(x), U, B.FSLACC)) 00717 /*@}*/ 00718 00719 /*! 00720 * @name Register NV_FSEC, field MEEN[5:4] (RO) 00721 * 00722 * Values: 00723 * - 10 - Mass erase is disabled 00724 * - 11 - Mass erase is enabled 00725 */ 00726 /*@{*/ 00727 #define BP_NV_FSEC_MEEN (4U) /*!< Bit position for NV_FSEC_MEEN. */ 00728 #define BM_NV_FSEC_MEEN (0x30U) /*!< Bit mask for NV_FSEC_MEEN. */ 00729 #define BS_NV_FSEC_MEEN (2U) /*!< Bit field size in bits for NV_FSEC_MEEN. */ 00730 00731 /*! @brief Read current value of the NV_FSEC_MEEN field. */ 00732 #define BR_NV_FSEC_MEEN(x) (UNION_READ(hw_nv_fsec_t, HW_NV_FSEC_ADDR(x), U, B.MEEN)) 00733 /*@}*/ 00734 00735 /*! 00736 * @name Register NV_FSEC, field KEYEN[7:6] (RO) 00737 * 00738 * Values: 00739 * - 10 - Backdoor key access enabled 00740 * - 11 - Backdoor key access disabled 00741 */ 00742 /*@{*/ 00743 #define BP_NV_FSEC_KEYEN (6U) /*!< Bit position for NV_FSEC_KEYEN. */ 00744 #define BM_NV_FSEC_KEYEN (0xC0U) /*!< Bit mask for NV_FSEC_KEYEN. */ 00745 #define BS_NV_FSEC_KEYEN (2U) /*!< Bit field size in bits for NV_FSEC_KEYEN. */ 00746 00747 /*! @brief Read current value of the NV_FSEC_KEYEN field. */ 00748 #define BR_NV_FSEC_KEYEN(x) (UNION_READ(hw_nv_fsec_t, HW_NV_FSEC_ADDR(x), U, B.KEYEN)) 00749 /*@}*/ 00750 00751 /******************************************************************************* 00752 * HW_NV_FOPT - Non-volatile Flash Option Register 00753 ******************************************************************************/ 00754 00755 /*! 00756 * @brief HW_NV_FOPT - Non-volatile Flash Option Register (RO) 00757 * 00758 * Reset value: 0xFFU 00759 */ 00760 typedef union _hw_nv_fopt 00761 { 00762 uint8_t U; 00763 struct _hw_nv_fopt_bitfields 00764 { 00765 uint8_t LPBOOT : 1; /*!< [0] */ 00766 uint8_t EZPORT_DIS : 1; /*!< [1] */ 00767 uint8_t RESERVED0 : 6; /*!< [7:2] */ 00768 } B; 00769 } hw_nv_fopt_t; 00770 00771 /*! 00772 * @name Constants and macros for entire NV_FOPT register 00773 */ 00774 /*@{*/ 00775 #define HW_NV_FOPT_ADDR(x) ((x) + 0xDU) 00776 00777 #define HW_NV_FOPT(x) (*(__I hw_nv_fopt_t *) HW_NV_FOPT_ADDR(x)) 00778 #define HW_NV_FOPT_RD(x) (ADDRESS_READ(hw_nv_fopt_t, HW_NV_FOPT_ADDR(x))) 00779 /*@}*/ 00780 00781 /* 00782 * Constants & macros for individual NV_FOPT bitfields 00783 */ 00784 00785 /*! 00786 * @name Register NV_FOPT, field LPBOOT[0] (RO) 00787 * 00788 * Values: 00789 * - 00 - Low-power boot 00790 * - 01 - Normal boot 00791 */ 00792 /*@{*/ 00793 #define BP_NV_FOPT_LPBOOT (0U) /*!< Bit position for NV_FOPT_LPBOOT. */ 00794 #define BM_NV_FOPT_LPBOOT (0x01U) /*!< Bit mask for NV_FOPT_LPBOOT. */ 00795 #define BS_NV_FOPT_LPBOOT (1U) /*!< Bit field size in bits for NV_FOPT_LPBOOT. */ 00796 00797 /*! @brief Read current value of the NV_FOPT_LPBOOT field. */ 00798 #define BR_NV_FOPT_LPBOOT(x) (ADDRESS_READ(uint8_t, BITBAND_ADDRESS8(HW_NV_FOPT_ADDR(x), BP_NV_FOPT_LPBOOT))) 00799 /*@}*/ 00800 00801 /*! 00802 * @name Register NV_FOPT, field EZPORT_DIS[1] (RO) 00803 */ 00804 /*@{*/ 00805 #define BP_NV_FOPT_EZPORT_DIS (1U) /*!< Bit position for NV_FOPT_EZPORT_DIS. */ 00806 #define BM_NV_FOPT_EZPORT_DIS (0x02U) /*!< Bit mask for NV_FOPT_EZPORT_DIS. */ 00807 #define BS_NV_FOPT_EZPORT_DIS (1U) /*!< Bit field size in bits for NV_FOPT_EZPORT_DIS. */ 00808 00809 /*! @brief Read current value of the NV_FOPT_EZPORT_DIS field. */ 00810 #define BR_NV_FOPT_EZPORT_DIS(x) (ADDRESS_READ(uint8_t, BITBAND_ADDRESS8(HW_NV_FOPT_ADDR(x), BP_NV_FOPT_EZPORT_DIS))) 00811 /*@}*/ 00812 00813 /******************************************************************************* 00814 * HW_NV_FEPROT - Non-volatile EERAM Protection Register 00815 ******************************************************************************/ 00816 00817 /*! 00818 * @brief HW_NV_FEPROT - Non-volatile EERAM Protection Register (RO) 00819 * 00820 * Reset value: 0xFFU 00821 */ 00822 typedef union _hw_nv_feprot 00823 { 00824 uint8_t U; 00825 struct _hw_nv_feprot_bitfields 00826 { 00827 uint8_t EPROT : 8; /*!< [7:0] */ 00828 } B; 00829 } hw_nv_feprot_t; 00830 00831 /*! 00832 * @name Constants and macros for entire NV_FEPROT register 00833 */ 00834 /*@{*/ 00835 #define HW_NV_FEPROT_ADDR(x) ((x) + 0xEU) 00836 00837 #define HW_NV_FEPROT(x) (*(__I hw_nv_feprot_t *) HW_NV_FEPROT_ADDR(x)) 00838 #define HW_NV_FEPROT_RD(x) (ADDRESS_READ(hw_nv_feprot_t, HW_NV_FEPROT_ADDR(x))) 00839 /*@}*/ 00840 00841 /* 00842 * Constants & macros for individual NV_FEPROT bitfields 00843 */ 00844 00845 /*! 00846 * @name Register NV_FEPROT, field EPROT[7:0] (RO) 00847 */ 00848 /*@{*/ 00849 #define BP_NV_FEPROT_EPROT (0U) /*!< Bit position for NV_FEPROT_EPROT. */ 00850 #define BM_NV_FEPROT_EPROT (0xFFU) /*!< Bit mask for NV_FEPROT_EPROT. */ 00851 #define BS_NV_FEPROT_EPROT (8U) /*!< Bit field size in bits for NV_FEPROT_EPROT. */ 00852 00853 /*! @brief Read current value of the NV_FEPROT_EPROT field. */ 00854 #define BR_NV_FEPROT_EPROT(x) (HW_NV_FEPROT(x).U) 00855 /*@}*/ 00856 00857 /******************************************************************************* 00858 * HW_NV_FDPROT - Non-volatile D-Flash Protection Register 00859 ******************************************************************************/ 00860 00861 /*! 00862 * @brief HW_NV_FDPROT - Non-volatile D-Flash Protection Register (RO) 00863 * 00864 * Reset value: 0xFFU 00865 */ 00866 typedef union _hw_nv_fdprot 00867 { 00868 uint8_t U; 00869 struct _hw_nv_fdprot_bitfields 00870 { 00871 uint8_t DPROT : 8; /*!< [7:0] D-Flash Region Protect */ 00872 } B; 00873 } hw_nv_fdprot_t; 00874 00875 /*! 00876 * @name Constants and macros for entire NV_FDPROT register 00877 */ 00878 /*@{*/ 00879 #define HW_NV_FDPROT_ADDR(x) ((x) + 0xFU) 00880 00881 #define HW_NV_FDPROT(x) (*(__I hw_nv_fdprot_t *) HW_NV_FDPROT_ADDR(x)) 00882 #define HW_NV_FDPROT_RD(x) (ADDRESS_READ(hw_nv_fdprot_t, HW_NV_FDPROT_ADDR(x))) 00883 /*@}*/ 00884 00885 /* 00886 * Constants & macros for individual NV_FDPROT bitfields 00887 */ 00888 00889 /*! 00890 * @name Register NV_FDPROT, field DPROT[7:0] (RO) 00891 */ 00892 /*@{*/ 00893 #define BP_NV_FDPROT_DPROT (0U) /*!< Bit position for NV_FDPROT_DPROT. */ 00894 #define BM_NV_FDPROT_DPROT (0xFFU) /*!< Bit mask for NV_FDPROT_DPROT. */ 00895 #define BS_NV_FDPROT_DPROT (8U) /*!< Bit field size in bits for NV_FDPROT_DPROT. */ 00896 00897 /*! @brief Read current value of the NV_FDPROT_DPROT field. */ 00898 #define BR_NV_FDPROT_DPROT(x) (HW_NV_FDPROT(x).U) 00899 /*@}*/ 00900 00901 /******************************************************************************* 00902 * hw_nv_t - module struct 00903 ******************************************************************************/ 00904 /*! 00905 * @brief All NV module registers. 00906 */ 00907 #pragma pack(1) 00908 typedef struct _hw_nv 00909 { 00910 __I hw_nv_backkey3_t BACKKEY3 ; /*!< [0x0] Backdoor Comparison Key 3. */ 00911 __I hw_nv_backkey2_t BACKKEY2 ; /*!< [0x1] Backdoor Comparison Key 2. */ 00912 __I hw_nv_backkey1_t BACKKEY1 ; /*!< [0x2] Backdoor Comparison Key 1. */ 00913 __I hw_nv_backkey0_t BACKKEY0 ; /*!< [0x3] Backdoor Comparison Key 0. */ 00914 __I hw_nv_backkey7_t BACKKEY7 ; /*!< [0x4] Backdoor Comparison Key 7. */ 00915 __I hw_nv_backkey6_t BACKKEY6 ; /*!< [0x5] Backdoor Comparison Key 6. */ 00916 __I hw_nv_backkey5_t BACKKEY5 ; /*!< [0x6] Backdoor Comparison Key 5. */ 00917 __I hw_nv_backkey4_t BACKKEY4 ; /*!< [0x7] Backdoor Comparison Key 4. */ 00918 __I hw_nv_fprot3_t FPROT3 ; /*!< [0x8] Non-volatile P-Flash Protection 1 - Low Register */ 00919 __I hw_nv_fprot2_t FPROT2 ; /*!< [0x9] Non-volatile P-Flash Protection 1 - High Register */ 00920 __I hw_nv_fprot1_t FPROT1 ; /*!< [0xA] Non-volatile P-Flash Protection 0 - Low Register */ 00921 __I hw_nv_fprot0_t FPROT0 ; /*!< [0xB] Non-volatile P-Flash Protection 0 - High Register */ 00922 __I hw_nv_fsec_t FSEC ; /*!< [0xC] Non-volatile Flash Security Register */ 00923 __I hw_nv_fopt_t FOPT ; /*!< [0xD] Non-volatile Flash Option Register */ 00924 __I hw_nv_feprot_t FEPROT ; /*!< [0xE] Non-volatile EERAM Protection Register */ 00925 __I hw_nv_fdprot_t FDPROT ; /*!< [0xF] Non-volatile D-Flash Protection Register */ 00926 } hw_nv_t; 00927 #pragma pack() 00928 00929 /*! @brief Macro to access all NV registers. */ 00930 /*! @param x NV module instance base address. */ 00931 /*! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct, 00932 * use the '&' operator, like <code>&HW_NV(FTFE_FlashConfig_BASE)</code>. */ 00933 #define HW_NV(x) (*(hw_nv_t *)(x)) 00934 00935 #endif /* __HW_NV_REGISTERS_H__ */ 00936 /* EOF */
Generated on Sat Aug 27 2022 17:09:00 by
