2 ** ###################################################################
3 ** Compilers: Keil ARM C/C++ Compiler
4 ** Freescale C/C++ for Embedded ARM
6 ** IAR ANSI C/C++ Compiler for ARM
8 ** Reference manual: K64P144M120SF5RM, Rev.2, January 2014
9 ** Version: rev. 2.5, 2014-02-10
13 ** Extension to the CMSIS register access layer header.
15 ** Copyright (c) 2014 Freescale Semiconductor, Inc.
16 ** All rights reserved.
18 ** Redistribution and use in source and binary forms, with or without modification,
19 ** are permitted provided that the following conditions are met:
21 ** o Redistributions of source code must retain the above copyright notice, this list
22 ** of conditions and the following disclaimer.
24 ** o Redistributions in binary form must reproduce the above copyright notice, this
25 ** list of conditions and the following disclaimer in the documentation and/or
26 ** other materials provided with the distribution.
28 ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its
29 ** contributors may be used to endorse or promote products derived from this
30 ** software without specific prior written permission.
32 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
33 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35 ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
36 ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
37 ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
38 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
39 ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43 ** http: www.freescale.com
44 ** mail: support@freescale.com
47 ** - rev. 1.0 (2013-08-12)
49 ** - rev. 2.0 (2013-10-29)
50 ** Register accessor macros added to the memory map.
51 ** Symbols for Processor Expert memory map compatibility added to the memory map.
52 ** Startup file for gcc has been updated according to CMSIS 3.2.
53 ** System initialization updated.
54 ** MCG - registers updated.
55 ** PORTA, PORTB, PORTC, PORTE - registers for digital filter removed.
56 ** - rev. 2.1 (2013-10-30)
57 ** Definition of BITBAND macros updated to support peripherals with 32-bit acces disabled.
58 ** - rev. 2.2 (2013-12-09)
59 ** DMA - EARS register removed.
60 ** AIPS0, AIPS1 - MPRA register updated.
61 ** - rev. 2.3 (2014-01-24)
62 ** Update according to reference manual rev. 2
63 ** ENET, MCG, MCM, SIM, USB - registers updated
64 ** - rev. 2.4 (2014-02-10)
65 ** The declaration of clock configurations has been moved to separate header file system_MK64F12.h
66 ** Update of SystemInit() and SystemCoreClockUpdate() functions.
67 ** - rev. 2.5 (2014-02-10)
68 ** The declaration of clock configurations has been moved to separate header file system_MK64F12.h
69 ** Update of SystemInit() and SystemCoreClockUpdate() functions.
70 ** Module access macro module_BASES replaced by module_BASE_PTRS.
72 ** ###################################################################
76 * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
78 * This file was generated automatically and any changes may be lost.
80 #ifndef __HW_MPU_REGISTERS_H__
81 #define __HW_MPU_REGISTERS_H__
84 #include "fsl_bitaccess.h"
89 * Memory protection unit
91 * Registers defined in this header file:
92 * - HW_MPU_CESR - Control/Error Status Register
93 * - HW_MPU_EARn - Error Address Register, slave port n
94 * - HW_MPU_EDRn - Error Detail Register, slave port n
95 * - HW_MPU_RGDn_WORD0 - Region Descriptor n, Word 0
96 * - HW_MPU_RGDn_WORD1 - Region Descriptor n, Word 1
97 * - HW_MPU_RGDn_WORD2 - Region Descriptor n, Word 2
98 * - HW_MPU_RGDn_WORD3 - Region Descriptor n, Word 3
99 * - HW_MPU_RGDAACn - Region Descriptor Alternate Access Control n
101 * - hw_mpu_t - Struct containing all module registers.
104 #define HW_MPU_INSTANCE_COUNT (1U) /*!< Number of instances of the MPU module. */
106 /*******************************************************************************
107 * HW_MPU_CESR - Control/Error Status Register
108 ******************************************************************************/
111 * @brief HW_MPU_CESR - Control/Error Status Register (RW)
113 * Reset value: 0x00815101U
115 typedef union _hw_mpu_cesr
118 struct _hw_mpu_cesr_bitfields
120 uint32_t VLD
: 1; /*!< [0] Valid */
121 uint32_t RESERVED0
: 7; /*!< [7:1] */
122 uint32_t NRGD
: 4; /*!< [11:8] Number Of Region Descriptors */
123 uint32_t NSP
: 4; /*!< [15:12] Number Of Slave Ports */
124 uint32_t HRL
: 4; /*!< [19:16] Hardware Revision Level */
125 uint32_t RESERVED1
: 7; /*!< [26:20] */
126 uint32_t SPERR
: 5; /*!< [31:27] Slave Port n Error */
131 * @name Constants and macros for entire MPU_CESR register
134 #define HW_MPU_CESR_ADDR(x) ((x) + 0x0U)
136 #define HW_MPU_CESR(x) (*(__IO hw_mpu_cesr_t *) HW_MPU_CESR_ADDR(x))
137 #define HW_MPU_CESR_RD(x) (HW_MPU_CESR(x).U)
138 #define HW_MPU_CESR_WR(x, v) (HW_MPU_CESR(x).U = (v))
139 #define HW_MPU_CESR_SET(x, v) (HW_MPU_CESR_WR(x, HW_MPU_CESR_RD(x) | (v)))
140 #define HW_MPU_CESR_CLR(x, v) (HW_MPU_CESR_WR(x, HW_MPU_CESR_RD(x) & ~(v)))
141 #define HW_MPU_CESR_TOG(x, v) (HW_MPU_CESR_WR(x, HW_MPU_CESR_RD(x) ^ (v)))
145 * Constants & macros for individual MPU_CESR bitfields
149 * @name Register MPU_CESR, field VLD[0] (RW)
151 * Global enable/disable for the MPU.
154 * - 0 - MPU is disabled. All accesses from all bus masters are allowed.
155 * - 1 - MPU is enabled
158 #define BP_MPU_CESR_VLD (0U) /*!< Bit position for MPU_CESR_VLD. */
159 #define BM_MPU_CESR_VLD (0x00000001U) /*!< Bit mask for MPU_CESR_VLD. */
160 #define BS_MPU_CESR_VLD (1U) /*!< Bit field size in bits for MPU_CESR_VLD. */
162 /*! @brief Read current value of the MPU_CESR_VLD field. */
163 #define BR_MPU_CESR_VLD(x) (BITBAND_ACCESS32(HW_MPU_CESR_ADDR(x), BP_MPU_CESR_VLD))
165 /*! @brief Format value for bitfield MPU_CESR_VLD. */
166 #define BF_MPU_CESR_VLD(v) ((uint32_t)((uint32_t)(v) << BP_MPU_CESR_VLD) & BM_MPU_CESR_VLD)
168 /*! @brief Set the VLD field to a new value. */
169 #define BW_MPU_CESR_VLD(x, v) (BITBAND_ACCESS32(HW_MPU_CESR_ADDR(x), BP_MPU_CESR_VLD) = (v))
173 * @name Register MPU_CESR, field NRGD[11:8] (RO)
175 * Indicates the number of region descriptors implemented in the MPU.
178 * - 0000 - 8 region descriptors
179 * - 0001 - 12 region descriptors
180 * - 0010 - 16 region descriptors
183 #define BP_MPU_CESR_NRGD (8U) /*!< Bit position for MPU_CESR_NRGD. */
184 #define BM_MPU_CESR_NRGD (0x00000F00U) /*!< Bit mask for MPU_CESR_NRGD. */
185 #define BS_MPU_CESR_NRGD (4U) /*!< Bit field size in bits for MPU_CESR_NRGD. */
187 /*! @brief Read current value of the MPU_CESR_NRGD field. */
188 #define BR_MPU_CESR_NRGD(x) (HW_MPU_CESR(x).B.NRGD)
192 * @name Register MPU_CESR, field NSP[15:12] (RO)
194 * Specifies the number of slave ports connected to the MPU.
197 #define BP_MPU_CESR_NSP (12U) /*!< Bit position for MPU_CESR_NSP. */
198 #define BM_MPU_CESR_NSP (0x0000F000U) /*!< Bit mask for MPU_CESR_NSP. */
199 #define BS_MPU_CESR_NSP (4U) /*!< Bit field size in bits for MPU_CESR_NSP. */
201 /*! @brief Read current value of the MPU_CESR_NSP field. */
202 #define BR_MPU_CESR_NSP(x) (HW_MPU_CESR(x).B.NSP)
206 * @name Register MPU_CESR, field HRL[19:16] (RO)
208 * Specifies the MPU's hardware and definition revision level. It can be read by
209 * software to determine the functional definition of the module.
212 #define BP_MPU_CESR_HRL (16U) /*!< Bit position for MPU_CESR_HRL. */
213 #define BM_MPU_CESR_HRL (0x000F0000U) /*!< Bit mask for MPU_CESR_HRL. */
214 #define BS_MPU_CESR_HRL (4U) /*!< Bit field size in bits for MPU_CESR_HRL. */
216 /*! @brief Read current value of the MPU_CESR_HRL field. */
217 #define BR_MPU_CESR_HRL(x) (HW_MPU_CESR(x).B.HRL)
221 * @name Register MPU_CESR, field SPERR[31:27] (W1C)
223 * Indicates a captured error in EARn and EDRn. This bit is set when the
224 * hardware detects an error and records the faulting address and attributes. It is
225 * cleared by writing one to it. If another error is captured at the exact same cycle
226 * as the write, the flag remains set. A find-first-one instruction or
227 * equivalent can detect the presence of a captured error. The following shows the
228 * correspondence between the bit number and slave port number: Bit 31 corresponds to
229 * slave port 0. Bit 30 corresponds to slave port 1. Bit 29 corresponds to slave
230 * port 2. Bit 28 corresponds to slave port 3. Bit 27 corresponds to slave port 4.
233 * - 0 - No error has occurred for slave port n.
234 * - 1 - An error has occurred for slave port n.
237 #define BP_MPU_CESR_SPERR (27U) /*!< Bit position for MPU_CESR_SPERR. */
238 #define BM_MPU_CESR_SPERR (0xF8000000U) /*!< Bit mask for MPU_CESR_SPERR. */
239 #define BS_MPU_CESR_SPERR (5U) /*!< Bit field size in bits for MPU_CESR_SPERR. */
241 /*! @brief Read current value of the MPU_CESR_SPERR field. */
242 #define BR_MPU_CESR_SPERR(x) (HW_MPU_CESR(x).B.SPERR)
244 /*! @brief Format value for bitfield MPU_CESR_SPERR. */
245 #define BF_MPU_CESR_SPERR(v) ((uint32_t)((uint32_t)(v) << BP_MPU_CESR_SPERR) & BM_MPU_CESR_SPERR)
247 /*! @brief Set the SPERR field to a new value. */
248 #define BW_MPU_CESR_SPERR(x, v) (HW_MPU_CESR_WR(x, (HW_MPU_CESR_RD(x) & ~BM_MPU_CESR_SPERR) | BF_MPU_CESR_SPERR(v)))
251 /*******************************************************************************
252 * HW_MPU_EARn - Error Address Register, slave port n
253 ******************************************************************************/
256 * @brief HW_MPU_EARn - Error Address Register, slave port n (RO)
258 * Reset value: 0x00000000U
260 * When the MPU detects an access error on slave port n, the 32-bit reference
261 * address is captured in this read-only register and the corresponding bit in
262 * CESR[SPERR] set. Additional information about the faulting access is captured in
263 * the corresponding EDRn at the same time. This register and the corresponding
264 * EDRn contain the most recent access error; there are no hardware interlocks with
265 * CESR[SPERR], as the error registers are always loaded upon the occurrence of
266 * each protection violation.
268 typedef union _hw_mpu_earn
271 struct _hw_mpu_earn_bitfields
273 uint32_t EADDR
: 32; /*!< [31:0] Error Address */
278 * @name Constants and macros for entire MPU_EARn register
281 #define HW_MPU_EARn_COUNT (5U)
283 #define HW_MPU_EARn_ADDR(x, n) ((x) + 0x10U + (0x8U * (n)))
285 #define HW_MPU_EARn(x, n) (*(__I hw_mpu_earn_t *) HW_MPU_EARn_ADDR(x, n))
286 #define HW_MPU_EARn_RD(x, n) (HW_MPU_EARn(x, n).U)
290 * Constants & macros for individual MPU_EARn bitfields
294 * @name Register MPU_EARn, field EADDR[31:0] (RO)
296 * Indicates the reference address from slave port n that generated the access
300 #define BP_MPU_EARn_EADDR (0U) /*!< Bit position for MPU_EARn_EADDR. */
301 #define BM_MPU_EARn_EADDR (0xFFFFFFFFU) /*!< Bit mask for MPU_EARn_EADDR. */
302 #define BS_MPU_EARn_EADDR (32U) /*!< Bit field size in bits for MPU_EARn_EADDR. */
304 /*! @brief Read current value of the MPU_EARn_EADDR field. */
305 #define BR_MPU_EARn_EADDR(x, n) (HW_MPU_EARn(x, n).U)
307 /*******************************************************************************
308 * HW_MPU_EDRn - Error Detail Register, slave port n
309 ******************************************************************************/
312 * @brief HW_MPU_EDRn - Error Detail Register, slave port n (RO)
314 * Reset value: 0x00000000U
316 * When the MPU detects an access error on slave port n, 32 bits of error detail
317 * are captured in this read-only register and the corresponding bit in
318 * CESR[SPERR] is set. Information on the faulting address is captured in the
319 * corresponding EARn register at the same time. This register and the corresponding EARn
320 * register contain the most recent access error; there are no hardware interlocks
321 * with CESR[SPERR] as the error registers are always loaded upon the occurrence
322 * of each protection violation.
324 typedef union _hw_mpu_edrn
327 struct _hw_mpu_edrn_bitfields
329 uint32_t ERW
: 1; /*!< [0] Error Read/Write */
330 uint32_t EATTR
: 3; /*!< [3:1] Error Attributes */
331 uint32_t EMN
: 4; /*!< [7:4] Error Master Number */
332 uint32_t EPID
: 8; /*!< [15:8] Error Process Identification */
333 uint32_t EACD
: 16; /*!< [31:16] Error Access Control Detail */
338 * @name Constants and macros for entire MPU_EDRn register
341 #define HW_MPU_EDRn_COUNT (5U)
343 #define HW_MPU_EDRn_ADDR(x, n) ((x) + 0x14U + (0x8U * (n)))
345 #define HW_MPU_EDRn(x, n) (*(__I hw_mpu_edrn_t *) HW_MPU_EDRn_ADDR(x, n))
346 #define HW_MPU_EDRn_RD(x, n) (HW_MPU_EDRn(x, n).U)
350 * Constants & macros for individual MPU_EDRn bitfields
354 * @name Register MPU_EDRn, field ERW[0] (RO)
356 * Indicates the access type of the faulting reference.
363 #define BP_MPU_EDRn_ERW (0U) /*!< Bit position for MPU_EDRn_ERW. */
364 #define BM_MPU_EDRn_ERW (0x00000001U) /*!< Bit mask for MPU_EDRn_ERW. */
365 #define BS_MPU_EDRn_ERW (1U) /*!< Bit field size in bits for MPU_EDRn_ERW. */
367 /*! @brief Read current value of the MPU_EDRn_ERW field. */
368 #define BR_MPU_EDRn_ERW(x, n) (BITBAND_ACCESS32(HW_MPU_EDRn_ADDR(x, n), BP_MPU_EDRn_ERW))
372 * @name Register MPU_EDRn, field EATTR[3:1] (RO)
374 * Indicates attribute information about the faulting reference. All other
375 * encodings are reserved.
378 * - 000 - User mode, instruction access
379 * - 001 - User mode, data access
380 * - 010 - Supervisor mode, instruction access
381 * - 011 - Supervisor mode, data access
384 #define BP_MPU_EDRn_EATTR (1U) /*!< Bit position for MPU_EDRn_EATTR. */
385 #define BM_MPU_EDRn_EATTR (0x0000000EU) /*!< Bit mask for MPU_EDRn_EATTR. */
386 #define BS_MPU_EDRn_EATTR (3U) /*!< Bit field size in bits for MPU_EDRn_EATTR. */
388 /*! @brief Read current value of the MPU_EDRn_EATTR field. */
389 #define BR_MPU_EDRn_EATTR(x, n) (HW_MPU_EDRn(x, n).B.EATTR)
393 * @name Register MPU_EDRn, field EMN[7:4] (RO)
395 * Indicates the bus master that generated the access error.
398 #define BP_MPU_EDRn_EMN (4U) /*!< Bit position for MPU_EDRn_EMN. */
399 #define BM_MPU_EDRn_EMN (0x000000F0U) /*!< Bit mask for MPU_EDRn_EMN. */
400 #define BS_MPU_EDRn_EMN (4U) /*!< Bit field size in bits for MPU_EDRn_EMN. */
402 /*! @brief Read current value of the MPU_EDRn_EMN field. */
403 #define BR_MPU_EDRn_EMN(x, n) (HW_MPU_EDRn(x, n).B.EMN)
407 * @name Register MPU_EDRn, field EPID[15:8] (RO)
409 * Records the process identifier of the faulting reference. The process
410 * identifier is typically driven only by processor cores; for other bus masters, this
414 #define BP_MPU_EDRn_EPID (8U) /*!< Bit position for MPU_EDRn_EPID. */
415 #define BM_MPU_EDRn_EPID (0x0000FF00U) /*!< Bit mask for MPU_EDRn_EPID. */
416 #define BS_MPU_EDRn_EPID (8U) /*!< Bit field size in bits for MPU_EDRn_EPID. */
418 /*! @brief Read current value of the MPU_EDRn_EPID field. */
419 #define BR_MPU_EDRn_EPID(x, n) (HW_MPU_EDRn(x, n).B.EPID)
423 * @name Register MPU_EDRn, field EACD[31:16] (RO)
425 * Indicates the region descriptor with the access error. If EDRn contains a
426 * captured error and EACD is cleared, an access did not hit in any region
427 * descriptor. If only a single EACD bit is set, the protection error was caused by a
428 * single non-overlapping region descriptor. If two or more EACD bits are set, the
429 * protection error was caused by an overlapping set of region descriptors.
432 #define BP_MPU_EDRn_EACD (16U) /*!< Bit position for MPU_EDRn_EACD. */
433 #define BM_MPU_EDRn_EACD (0xFFFF0000U) /*!< Bit mask for MPU_EDRn_EACD. */
434 #define BS_MPU_EDRn_EACD (16U) /*!< Bit field size in bits for MPU_EDRn_EACD. */
436 /*! @brief Read current value of the MPU_EDRn_EACD field. */
437 #define BR_MPU_EDRn_EACD(x, n) (HW_MPU_EDRn(x, n).B.EACD)
440 /*******************************************************************************
441 * HW_MPU_RGDn_WORD0 - Region Descriptor n, Word 0
442 ******************************************************************************/
445 * @brief HW_MPU_RGDn_WORD0 - Region Descriptor n, Word 0 (RW)
447 * Reset value: 0x00000000U
449 * The first word of the region descriptor defines the 0-modulo-32 byte start
450 * address of the memory region. Writes to this register clear the region
451 * descriptor's valid bit (RGDn_WORD3[VLD]).
453 typedef union _hw_mpu_rgdn_word0
456 struct _hw_mpu_rgdn_word0_bitfields
458 uint32_t RESERVED0
: 5; /*!< [4:0] */
459 uint32_t SRTADDR
: 27; /*!< [31:5] Start Address */
461 } hw_mpu_rgdn_word0_t
;
464 * @name Constants and macros for entire MPU_RGDn_WORD0 register
467 #define HW_MPU_RGDn_WORD0_COUNT (12U)
469 #define HW_MPU_RGDn_WORD0_ADDR(x, n) ((x) + 0x400U + (0x10U * (n)))
471 #define HW_MPU_RGDn_WORD0(x, n) (*(__IO hw_mpu_rgdn_word0_t *) HW_MPU_RGDn_WORD0_ADDR(x, n))
472 #define HW_MPU_RGDn_WORD0_RD(x, n) (HW_MPU_RGDn_WORD0(x, n).U)
473 #define HW_MPU_RGDn_WORD0_WR(x, n, v) (HW_MPU_RGDn_WORD0(x, n).U = (v))
474 #define HW_MPU_RGDn_WORD0_SET(x, n, v) (HW_MPU_RGDn_WORD0_WR(x, n, HW_MPU_RGDn_WORD0_RD(x, n) | (v)))
475 #define HW_MPU_RGDn_WORD0_CLR(x, n, v) (HW_MPU_RGDn_WORD0_WR(x, n, HW_MPU_RGDn_WORD0_RD(x, n) & ~(v)))
476 #define HW_MPU_RGDn_WORD0_TOG(x, n, v) (HW_MPU_RGDn_WORD0_WR(x, n, HW_MPU_RGDn_WORD0_RD(x, n) ^ (v)))
480 * Constants & macros for individual MPU_RGDn_WORD0 bitfields
484 * @name Register MPU_RGDn_WORD0, field SRTADDR[31:5] (RW)
486 * Defines the most significant bits of the 0-modulo-32 byte start address of
490 #define BP_MPU_RGDn_WORD0_SRTADDR (5U) /*!< Bit position for MPU_RGDn_WORD0_SRTADDR. */
491 #define BM_MPU_RGDn_WORD0_SRTADDR (0xFFFFFFE0U) /*!< Bit mask for MPU_RGDn_WORD0_SRTADDR. */
492 #define BS_MPU_RGDn_WORD0_SRTADDR (27U) /*!< Bit field size in bits for MPU_RGDn_WORD0_SRTADDR. */
494 /*! @brief Read current value of the MPU_RGDn_WORD0_SRTADDR field. */
495 #define BR_MPU_RGDn_WORD0_SRTADDR(x, n) (HW_MPU_RGDn_WORD0(x, n).B.SRTADDR)
497 /*! @brief Format value for bitfield MPU_RGDn_WORD0_SRTADDR. */
498 #define BF_MPU_RGDn_WORD0_SRTADDR(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD0_SRTADDR) & BM_MPU_RGDn_WORD0_SRTADDR)
500 /*! @brief Set the SRTADDR field to a new value. */
501 #define BW_MPU_RGDn_WORD0_SRTADDR(x, n, v) (HW_MPU_RGDn_WORD0_WR(x, n, (HW_MPU_RGDn_WORD0_RD(x, n) & ~BM_MPU_RGDn_WORD0_SRTADDR) | BF_MPU_RGDn_WORD0_SRTADDR(v)))
503 /*******************************************************************************
504 * HW_MPU_RGDn_WORD1 - Region Descriptor n, Word 1
505 ******************************************************************************/
508 * @brief HW_MPU_RGDn_WORD1 - Region Descriptor n, Word 1 (RW)
510 * Reset value: 0xFFFFFFFFU
512 * The second word of the region descriptor defines the 31-modulo-32 byte end
513 * address of the memory region. Writes to this register clear the region
514 * descriptor's valid bit (RGDn_WORD3[VLD]).
516 typedef union _hw_mpu_rgdn_word1
519 struct _hw_mpu_rgdn_word1_bitfields
521 uint32_t RESERVED0
: 5; /*!< [4:0] */
522 uint32_t ENDADDR
: 27; /*!< [31:5] End Address */
524 } hw_mpu_rgdn_word1_t
;
527 * @name Constants and macros for entire MPU_RGDn_WORD1 register
530 #define HW_MPU_RGDn_WORD1_COUNT (12U)
532 #define HW_MPU_RGDn_WORD1_ADDR(x, n) ((x) + 0x404U + (0x10U * (n)))
534 #define HW_MPU_RGDn_WORD1(x, n) (*(__IO hw_mpu_rgdn_word1_t *) HW_MPU_RGDn_WORD1_ADDR(x, n))
535 #define HW_MPU_RGDn_WORD1_RD(x, n) (HW_MPU_RGDn_WORD1(x, n).U)
536 #define HW_MPU_RGDn_WORD1_WR(x, n, v) (HW_MPU_RGDn_WORD1(x, n).U = (v))
537 #define HW_MPU_RGDn_WORD1_SET(x, n, v) (HW_MPU_RGDn_WORD1_WR(x, n, HW_MPU_RGDn_WORD1_RD(x, n) | (v)))
538 #define HW_MPU_RGDn_WORD1_CLR(x, n, v) (HW_MPU_RGDn_WORD1_WR(x, n, HW_MPU_RGDn_WORD1_RD(x, n) & ~(v)))
539 #define HW_MPU_RGDn_WORD1_TOG(x, n, v) (HW_MPU_RGDn_WORD1_WR(x, n, HW_MPU_RGDn_WORD1_RD(x, n) ^ (v)))
543 * Constants & macros for individual MPU_RGDn_WORD1 bitfields
547 * @name Register MPU_RGDn_WORD1, field ENDADDR[31:5] (RW)
549 * Defines the most significant bits of the 31-modulo-32 byte end address of the
550 * memory region. The MPU does not verify that ENDADDR >= SRTADDR.
553 #define BP_MPU_RGDn_WORD1_ENDADDR (5U) /*!< Bit position for MPU_RGDn_WORD1_ENDADDR. */
554 #define BM_MPU_RGDn_WORD1_ENDADDR (0xFFFFFFE0U) /*!< Bit mask for MPU_RGDn_WORD1_ENDADDR. */
555 #define BS_MPU_RGDn_WORD1_ENDADDR (27U) /*!< Bit field size in bits for MPU_RGDn_WORD1_ENDADDR. */
557 /*! @brief Read current value of the MPU_RGDn_WORD1_ENDADDR field. */
558 #define BR_MPU_RGDn_WORD1_ENDADDR(x, n) (HW_MPU_RGDn_WORD1(x, n).B.ENDADDR)
560 /*! @brief Format value for bitfield MPU_RGDn_WORD1_ENDADDR. */
561 #define BF_MPU_RGDn_WORD1_ENDADDR(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD1_ENDADDR) & BM_MPU_RGDn_WORD1_ENDADDR)
563 /*! @brief Set the ENDADDR field to a new value. */
564 #define BW_MPU_RGDn_WORD1_ENDADDR(x, n, v) (HW_MPU_RGDn_WORD1_WR(x, n, (HW_MPU_RGDn_WORD1_RD(x, n) & ~BM_MPU_RGDn_WORD1_ENDADDR) | BF_MPU_RGDn_WORD1_ENDADDR(v)))
566 /*******************************************************************************
567 * HW_MPU_RGDn_WORD2 - Region Descriptor n, Word 2
568 ******************************************************************************/
571 * @brief HW_MPU_RGDn_WORD2 - Region Descriptor n, Word 2 (RW)
573 * Reset value: 0x0061F7DFU
575 * The third word of the region descriptor defines the access control rights of
576 * the memory region. The access control privileges depend on two broad
577 * classifications of bus masters: Bus masters 0-3 have a 5-bit field defining separate
578 * privilege rights for user and supervisor mode accesses, as well as the optional
579 * inclusion of a process identification field within the definition. Bus masters
580 * 4-7 are limited to separate read and write permissions. For the privilege
581 * rights of bus masters 0-3, there are three flags associated with this function:
582 * Read (r) refers to accessing the referenced memory address using an operand
583 * (data) fetch Write (w) refers to updating the referenced memory address using a
584 * store (data) instruction Execute (x) refers to reading the referenced memory
585 * address using an instruction fetch Writes to RGDn_WORD2 clear the region
586 * descriptor's valid bit (RGDn_WORD3[VLD]). If only updating the access controls, write
587 * to RGDAACn instead because stores to these locations do not affect the
588 * descriptor's valid bit.
590 typedef union _hw_mpu_rgdn_word2
593 struct _hw_mpu_rgdn_word2_bitfields
595 uint32_t M0UM
: 3; /*!< [2:0] Bus Master 0 User Mode Access Control */
596 uint32_t M0SM
: 2; /*!< [4:3] Bus Master 0 Supervisor Mode Access
598 uint32_t M0PE
: 1; /*!< [5] Bus Master 0 Process Identifier enable */
599 uint32_t M1UM
: 3; /*!< [8:6] Bus Master 1 User Mode Access Control */
600 uint32_t M1SM
: 2; /*!< [10:9] Bus Master 1 Supervisor Mode Access
602 uint32_t M1PE
: 1; /*!< [11] Bus Master 1 Process Identifier enable */
603 uint32_t M2UM
: 3; /*!< [14:12] Bus Master 2 User Mode Access control
605 uint32_t M2SM
: 2; /*!< [16:15] Bus Master 2 Supervisor Mode Access
607 uint32_t M2PE
: 1; /*!< [17] Bus Master 2 Process Identifier Enable */
608 uint32_t M3UM
: 3; /*!< [20:18] Bus Master 3 User Mode Access Control
610 uint32_t M3SM
: 2; /*!< [22:21] Bus Master 3 Supervisor Mode Access
612 uint32_t M3PE
: 1; /*!< [23] Bus Master 3 Process Identifier Enable */
613 uint32_t M4WE
: 1; /*!< [24] Bus Master 4 Write Enable */
614 uint32_t M4RE
: 1; /*!< [25] Bus Master 4 Read Enable */
615 uint32_t M5WE
: 1; /*!< [26] Bus Master 5 Write Enable */
616 uint32_t M5RE
: 1; /*!< [27] Bus Master 5 Read Enable */
617 uint32_t M6WE
: 1; /*!< [28] Bus Master 6 Write Enable */
618 uint32_t M6RE
: 1; /*!< [29] Bus Master 6 Read Enable */
619 uint32_t M7WE
: 1; /*!< [30] Bus Master 7 Write Enable */
620 uint32_t M7RE
: 1; /*!< [31] Bus Master 7 Read Enable */
622 } hw_mpu_rgdn_word2_t
;
625 * @name Constants and macros for entire MPU_RGDn_WORD2 register
628 #define HW_MPU_RGDn_WORD2_COUNT (12U)
630 #define HW_MPU_RGDn_WORD2_ADDR(x, n) ((x) + 0x408U + (0x10U * (n)))
632 #define HW_MPU_RGDn_WORD2(x, n) (*(__IO hw_mpu_rgdn_word2_t *) HW_MPU_RGDn_WORD2_ADDR(x, n))
633 #define HW_MPU_RGDn_WORD2_RD(x, n) (HW_MPU_RGDn_WORD2(x, n).U)
634 #define HW_MPU_RGDn_WORD2_WR(x, n, v) (HW_MPU_RGDn_WORD2(x, n).U = (v))
635 #define HW_MPU_RGDn_WORD2_SET(x, n, v) (HW_MPU_RGDn_WORD2_WR(x, n, HW_MPU_RGDn_WORD2_RD(x, n) | (v)))
636 #define HW_MPU_RGDn_WORD2_CLR(x, n, v) (HW_MPU_RGDn_WORD2_WR(x, n, HW_MPU_RGDn_WORD2_RD(x, n) & ~(v)))
637 #define HW_MPU_RGDn_WORD2_TOG(x, n, v) (HW_MPU_RGDn_WORD2_WR(x, n, HW_MPU_RGDn_WORD2_RD(x, n) ^ (v)))
641 * Constants & macros for individual MPU_RGDn_WORD2 bitfields
645 * @name Register MPU_RGDn_WORD2, field M0UM[2:0] (RW)
647 * See M3UM description.
650 #define BP_MPU_RGDn_WORD2_M0UM (0U) /*!< Bit position for MPU_RGDn_WORD2_M0UM. */
651 #define BM_MPU_RGDn_WORD2_M0UM (0x00000007U) /*!< Bit mask for MPU_RGDn_WORD2_M0UM. */
652 #define BS_MPU_RGDn_WORD2_M0UM (3U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M0UM. */
654 /*! @brief Read current value of the MPU_RGDn_WORD2_M0UM field. */
655 #define BR_MPU_RGDn_WORD2_M0UM(x, n) (HW_MPU_RGDn_WORD2(x, n).B.M0UM)
657 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M0UM. */
658 #define BF_MPU_RGDn_WORD2_M0UM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M0UM) & BM_MPU_RGDn_WORD2_M0UM)
660 /*! @brief Set the M0UM field to a new value. */
661 #define BW_MPU_RGDn_WORD2_M0UM(x, n, v) (HW_MPU_RGDn_WORD2_WR(x, n, (HW_MPU_RGDn_WORD2_RD(x, n) & ~BM_MPU_RGDn_WORD2_M0UM) | BF_MPU_RGDn_WORD2_M0UM(v)))
665 * @name Register MPU_RGDn_WORD2, field M0SM[4:3] (RW)
667 * See M3SM description.
670 #define BP_MPU_RGDn_WORD2_M0SM (3U) /*!< Bit position for MPU_RGDn_WORD2_M0SM. */
671 #define BM_MPU_RGDn_WORD2_M0SM (0x00000018U) /*!< Bit mask for MPU_RGDn_WORD2_M0SM. */
672 #define BS_MPU_RGDn_WORD2_M0SM (2U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M0SM. */
674 /*! @brief Read current value of the MPU_RGDn_WORD2_M0SM field. */
675 #define BR_MPU_RGDn_WORD2_M0SM(x, n) (HW_MPU_RGDn_WORD2(x, n).B.M0SM)
677 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M0SM. */
678 #define BF_MPU_RGDn_WORD2_M0SM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M0SM) & BM_MPU_RGDn_WORD2_M0SM)
680 /*! @brief Set the M0SM field to a new value. */
681 #define BW_MPU_RGDn_WORD2_M0SM(x, n, v) (HW_MPU_RGDn_WORD2_WR(x, n, (HW_MPU_RGDn_WORD2_RD(x, n) & ~BM_MPU_RGDn_WORD2_M0SM) | BF_MPU_RGDn_WORD2_M0SM(v)))
685 * @name Register MPU_RGDn_WORD2, field M0PE[5] (RW)
687 * See M0PE description.
690 #define BP_MPU_RGDn_WORD2_M0PE (5U) /*!< Bit position for MPU_RGDn_WORD2_M0PE. */
691 #define BM_MPU_RGDn_WORD2_M0PE (0x00000020U) /*!< Bit mask for MPU_RGDn_WORD2_M0PE. */
692 #define BS_MPU_RGDn_WORD2_M0PE (1U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M0PE. */
694 /*! @brief Read current value of the MPU_RGDn_WORD2_M0PE field. */
695 #define BR_MPU_RGDn_WORD2_M0PE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M0PE))
697 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M0PE. */
698 #define BF_MPU_RGDn_WORD2_M0PE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M0PE) & BM_MPU_RGDn_WORD2_M0PE)
700 /*! @brief Set the M0PE field to a new value. */
701 #define BW_MPU_RGDn_WORD2_M0PE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M0PE) = (v))
705 * @name Register MPU_RGDn_WORD2, field M1UM[8:6] (RW)
707 * See M3UM description.
710 #define BP_MPU_RGDn_WORD2_M1UM (6U) /*!< Bit position for MPU_RGDn_WORD2_M1UM. */
711 #define BM_MPU_RGDn_WORD2_M1UM (0x000001C0U) /*!< Bit mask for MPU_RGDn_WORD2_M1UM. */
712 #define BS_MPU_RGDn_WORD2_M1UM (3U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M1UM. */
714 /*! @brief Read current value of the MPU_RGDn_WORD2_M1UM field. */
715 #define BR_MPU_RGDn_WORD2_M1UM(x, n) (HW_MPU_RGDn_WORD2(x, n).B.M1UM)
717 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M1UM. */
718 #define BF_MPU_RGDn_WORD2_M1UM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M1UM) & BM_MPU_RGDn_WORD2_M1UM)
720 /*! @brief Set the M1UM field to a new value. */
721 #define BW_MPU_RGDn_WORD2_M1UM(x, n, v) (HW_MPU_RGDn_WORD2_WR(x, n, (HW_MPU_RGDn_WORD2_RD(x, n) & ~BM_MPU_RGDn_WORD2_M1UM) | BF_MPU_RGDn_WORD2_M1UM(v)))
725 * @name Register MPU_RGDn_WORD2, field M1SM[10:9] (RW)
727 * See M3SM description.
730 #define BP_MPU_RGDn_WORD2_M1SM (9U) /*!< Bit position for MPU_RGDn_WORD2_M1SM. */
731 #define BM_MPU_RGDn_WORD2_M1SM (0x00000600U) /*!< Bit mask for MPU_RGDn_WORD2_M1SM. */
732 #define BS_MPU_RGDn_WORD2_M1SM (2U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M1SM. */
734 /*! @brief Read current value of the MPU_RGDn_WORD2_M1SM field. */
735 #define BR_MPU_RGDn_WORD2_M1SM(x, n) (HW_MPU_RGDn_WORD2(x, n).B.M1SM)
737 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M1SM. */
738 #define BF_MPU_RGDn_WORD2_M1SM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M1SM) & BM_MPU_RGDn_WORD2_M1SM)
740 /*! @brief Set the M1SM field to a new value. */
741 #define BW_MPU_RGDn_WORD2_M1SM(x, n, v) (HW_MPU_RGDn_WORD2_WR(x, n, (HW_MPU_RGDn_WORD2_RD(x, n) & ~BM_MPU_RGDn_WORD2_M1SM) | BF_MPU_RGDn_WORD2_M1SM(v)))
745 * @name Register MPU_RGDn_WORD2, field M1PE[11] (RW)
747 * See M3PE description.
750 #define BP_MPU_RGDn_WORD2_M1PE (11U) /*!< Bit position for MPU_RGDn_WORD2_M1PE. */
751 #define BM_MPU_RGDn_WORD2_M1PE (0x00000800U) /*!< Bit mask for MPU_RGDn_WORD2_M1PE. */
752 #define BS_MPU_RGDn_WORD2_M1PE (1U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M1PE. */
754 /*! @brief Read current value of the MPU_RGDn_WORD2_M1PE field. */
755 #define BR_MPU_RGDn_WORD2_M1PE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M1PE))
757 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M1PE. */
758 #define BF_MPU_RGDn_WORD2_M1PE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M1PE) & BM_MPU_RGDn_WORD2_M1PE)
760 /*! @brief Set the M1PE field to a new value. */
761 #define BW_MPU_RGDn_WORD2_M1PE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M1PE) = (v))
765 * @name Register MPU_RGDn_WORD2, field M2UM[14:12] (RW)
767 * See M3UM description.
770 #define BP_MPU_RGDn_WORD2_M2UM (12U) /*!< Bit position for MPU_RGDn_WORD2_M2UM. */
771 #define BM_MPU_RGDn_WORD2_M2UM (0x00007000U) /*!< Bit mask for MPU_RGDn_WORD2_M2UM. */
772 #define BS_MPU_RGDn_WORD2_M2UM (3U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M2UM. */
774 /*! @brief Read current value of the MPU_RGDn_WORD2_M2UM field. */
775 #define BR_MPU_RGDn_WORD2_M2UM(x, n) (HW_MPU_RGDn_WORD2(x, n).B.M2UM)
777 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M2UM. */
778 #define BF_MPU_RGDn_WORD2_M2UM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M2UM) & BM_MPU_RGDn_WORD2_M2UM)
780 /*! @brief Set the M2UM field to a new value. */
781 #define BW_MPU_RGDn_WORD2_M2UM(x, n, v) (HW_MPU_RGDn_WORD2_WR(x, n, (HW_MPU_RGDn_WORD2_RD(x, n) & ~BM_MPU_RGDn_WORD2_M2UM) | BF_MPU_RGDn_WORD2_M2UM(v)))
785 * @name Register MPU_RGDn_WORD2, field M2SM[16:15] (RW)
787 * See M3SM description.
790 #define BP_MPU_RGDn_WORD2_M2SM (15U) /*!< Bit position for MPU_RGDn_WORD2_M2SM. */
791 #define BM_MPU_RGDn_WORD2_M2SM (0x00018000U) /*!< Bit mask for MPU_RGDn_WORD2_M2SM. */
792 #define BS_MPU_RGDn_WORD2_M2SM (2U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M2SM. */
794 /*! @brief Read current value of the MPU_RGDn_WORD2_M2SM field. */
795 #define BR_MPU_RGDn_WORD2_M2SM(x, n) (HW_MPU_RGDn_WORD2(x, n).B.M2SM)
797 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M2SM. */
798 #define BF_MPU_RGDn_WORD2_M2SM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M2SM) & BM_MPU_RGDn_WORD2_M2SM)
800 /*! @brief Set the M2SM field to a new value. */
801 #define BW_MPU_RGDn_WORD2_M2SM(x, n, v) (HW_MPU_RGDn_WORD2_WR(x, n, (HW_MPU_RGDn_WORD2_RD(x, n) & ~BM_MPU_RGDn_WORD2_M2SM) | BF_MPU_RGDn_WORD2_M2SM(v)))
805 * @name Register MPU_RGDn_WORD2, field M2PE[17] (RW)
807 * See M3PE description.
810 #define BP_MPU_RGDn_WORD2_M2PE (17U) /*!< Bit position for MPU_RGDn_WORD2_M2PE. */
811 #define BM_MPU_RGDn_WORD2_M2PE (0x00020000U) /*!< Bit mask for MPU_RGDn_WORD2_M2PE. */
812 #define BS_MPU_RGDn_WORD2_M2PE (1U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M2PE. */
814 /*! @brief Read current value of the MPU_RGDn_WORD2_M2PE field. */
815 #define BR_MPU_RGDn_WORD2_M2PE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M2PE))
817 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M2PE. */
818 #define BF_MPU_RGDn_WORD2_M2PE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M2PE) & BM_MPU_RGDn_WORD2_M2PE)
820 /*! @brief Set the M2PE field to a new value. */
821 #define BW_MPU_RGDn_WORD2_M2PE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M2PE) = (v))
825 * @name Register MPU_RGDn_WORD2, field M3UM[20:18] (RW)
827 * Defines the access controls for bus master 3 in User mode. M3UM consists of
828 * three independent bits, enabling read (r), write (w), and execute (x)
832 * - 0 - An attempted access of that mode may be terminated with an access error
833 * (if not allowed by another descriptor) and the access not performed.
834 * - 1 - Allows the given access type to occur
837 #define BP_MPU_RGDn_WORD2_M3UM (18U) /*!< Bit position for MPU_RGDn_WORD2_M3UM. */
838 #define BM_MPU_RGDn_WORD2_M3UM (0x001C0000U) /*!< Bit mask for MPU_RGDn_WORD2_M3UM. */
839 #define BS_MPU_RGDn_WORD2_M3UM (3U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M3UM. */
841 /*! @brief Read current value of the MPU_RGDn_WORD2_M3UM field. */
842 #define BR_MPU_RGDn_WORD2_M3UM(x, n) (HW_MPU_RGDn_WORD2(x, n).B.M3UM)
844 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M3UM. */
845 #define BF_MPU_RGDn_WORD2_M3UM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M3UM) & BM_MPU_RGDn_WORD2_M3UM)
847 /*! @brief Set the M3UM field to a new value. */
848 #define BW_MPU_RGDn_WORD2_M3UM(x, n, v) (HW_MPU_RGDn_WORD2_WR(x, n, (HW_MPU_RGDn_WORD2_RD(x, n) & ~BM_MPU_RGDn_WORD2_M3UM) | BF_MPU_RGDn_WORD2_M3UM(v)))
852 * @name Register MPU_RGDn_WORD2, field M3SM[22:21] (RW)
854 * Defines the access controls for bus master 3 in Supervisor mode.
857 * - 00 - r/w/x; read, write and execute allowed
858 * - 01 - r/x; read and execute allowed, but no write
859 * - 10 - r/w; read and write allowed, but no execute
860 * - 11 - Same as User mode defined in M3UM
863 #define BP_MPU_RGDn_WORD2_M3SM (21U) /*!< Bit position for MPU_RGDn_WORD2_M3SM. */
864 #define BM_MPU_RGDn_WORD2_M3SM (0x00600000U) /*!< Bit mask for MPU_RGDn_WORD2_M3SM. */
865 #define BS_MPU_RGDn_WORD2_M3SM (2U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M3SM. */
867 /*! @brief Read current value of the MPU_RGDn_WORD2_M3SM field. */
868 #define BR_MPU_RGDn_WORD2_M3SM(x, n) (HW_MPU_RGDn_WORD2(x, n).B.M3SM)
870 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M3SM. */
871 #define BF_MPU_RGDn_WORD2_M3SM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M3SM) & BM_MPU_RGDn_WORD2_M3SM)
873 /*! @brief Set the M3SM field to a new value. */
874 #define BW_MPU_RGDn_WORD2_M3SM(x, n, v) (HW_MPU_RGDn_WORD2_WR(x, n, (HW_MPU_RGDn_WORD2_RD(x, n) & ~BM_MPU_RGDn_WORD2_M3SM) | BF_MPU_RGDn_WORD2_M3SM(v)))
878 * @name Register MPU_RGDn_WORD2, field M3PE[23] (RW)
881 * - 0 - Do not include the process identifier in the evaluation
882 * - 1 - Include the process identifier and mask (RGDn_WORD3) in the region hit
886 #define BP_MPU_RGDn_WORD2_M3PE (23U) /*!< Bit position for MPU_RGDn_WORD2_M3PE. */
887 #define BM_MPU_RGDn_WORD2_M3PE (0x00800000U) /*!< Bit mask for MPU_RGDn_WORD2_M3PE. */
888 #define BS_MPU_RGDn_WORD2_M3PE (1U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M3PE. */
890 /*! @brief Read current value of the MPU_RGDn_WORD2_M3PE field. */
891 #define BR_MPU_RGDn_WORD2_M3PE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M3PE))
893 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M3PE. */
894 #define BF_MPU_RGDn_WORD2_M3PE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M3PE) & BM_MPU_RGDn_WORD2_M3PE)
896 /*! @brief Set the M3PE field to a new value. */
897 #define BW_MPU_RGDn_WORD2_M3PE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M3PE) = (v))
901 * @name Register MPU_RGDn_WORD2, field M4WE[24] (RW)
904 * - 0 - Bus master 4 writes terminate with an access error and the write is not
906 * - 1 - Bus master 4 writes allowed
909 #define BP_MPU_RGDn_WORD2_M4WE (24U) /*!< Bit position for MPU_RGDn_WORD2_M4WE. */
910 #define BM_MPU_RGDn_WORD2_M4WE (0x01000000U) /*!< Bit mask for MPU_RGDn_WORD2_M4WE. */
911 #define BS_MPU_RGDn_WORD2_M4WE (1U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M4WE. */
913 /*! @brief Read current value of the MPU_RGDn_WORD2_M4WE field. */
914 #define BR_MPU_RGDn_WORD2_M4WE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M4WE))
916 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M4WE. */
917 #define BF_MPU_RGDn_WORD2_M4WE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M4WE) & BM_MPU_RGDn_WORD2_M4WE)
919 /*! @brief Set the M4WE field to a new value. */
920 #define BW_MPU_RGDn_WORD2_M4WE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M4WE) = (v))
924 * @name Register MPU_RGDn_WORD2, field M4RE[25] (RW)
927 * - 0 - Bus master 4 reads terminate with an access error and the read is not
929 * - 1 - Bus master 4 reads allowed
932 #define BP_MPU_RGDn_WORD2_M4RE (25U) /*!< Bit position for MPU_RGDn_WORD2_M4RE. */
933 #define BM_MPU_RGDn_WORD2_M4RE (0x02000000U) /*!< Bit mask for MPU_RGDn_WORD2_M4RE. */
934 #define BS_MPU_RGDn_WORD2_M4RE (1U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M4RE. */
936 /*! @brief Read current value of the MPU_RGDn_WORD2_M4RE field. */
937 #define BR_MPU_RGDn_WORD2_M4RE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M4RE))
939 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M4RE. */
940 #define BF_MPU_RGDn_WORD2_M4RE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M4RE) & BM_MPU_RGDn_WORD2_M4RE)
942 /*! @brief Set the M4RE field to a new value. */
943 #define BW_MPU_RGDn_WORD2_M4RE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M4RE) = (v))
947 * @name Register MPU_RGDn_WORD2, field M5WE[26] (RW)
950 * - 0 - Bus master 5 writes terminate with an access error and the write is not
952 * - 1 - Bus master 5 writes allowed
955 #define BP_MPU_RGDn_WORD2_M5WE (26U) /*!< Bit position for MPU_RGDn_WORD2_M5WE. */
956 #define BM_MPU_RGDn_WORD2_M5WE (0x04000000U) /*!< Bit mask for MPU_RGDn_WORD2_M5WE. */
957 #define BS_MPU_RGDn_WORD2_M5WE (1U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M5WE. */
959 /*! @brief Read current value of the MPU_RGDn_WORD2_M5WE field. */
960 #define BR_MPU_RGDn_WORD2_M5WE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M5WE))
962 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M5WE. */
963 #define BF_MPU_RGDn_WORD2_M5WE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M5WE) & BM_MPU_RGDn_WORD2_M5WE)
965 /*! @brief Set the M5WE field to a new value. */
966 #define BW_MPU_RGDn_WORD2_M5WE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M5WE) = (v))
970 * @name Register MPU_RGDn_WORD2, field M5RE[27] (RW)
973 * - 0 - Bus master 5 reads terminate with an access error and the read is not
975 * - 1 - Bus master 5 reads allowed
978 #define BP_MPU_RGDn_WORD2_M5RE (27U) /*!< Bit position for MPU_RGDn_WORD2_M5RE. */
979 #define BM_MPU_RGDn_WORD2_M5RE (0x08000000U) /*!< Bit mask for MPU_RGDn_WORD2_M5RE. */
980 #define BS_MPU_RGDn_WORD2_M5RE (1U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M5RE. */
982 /*! @brief Read current value of the MPU_RGDn_WORD2_M5RE field. */
983 #define BR_MPU_RGDn_WORD2_M5RE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M5RE))
985 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M5RE. */
986 #define BF_MPU_RGDn_WORD2_M5RE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M5RE) & BM_MPU_RGDn_WORD2_M5RE)
988 /*! @brief Set the M5RE field to a new value. */
989 #define BW_MPU_RGDn_WORD2_M5RE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M5RE) = (v))
993 * @name Register MPU_RGDn_WORD2, field M6WE[28] (RW)
996 * - 0 - Bus master 6 writes terminate with an access error and the write is not
998 * - 1 - Bus master 6 writes allowed
1001 #define BP_MPU_RGDn_WORD2_M6WE (28U) /*!< Bit position for MPU_RGDn_WORD2_M6WE. */
1002 #define BM_MPU_RGDn_WORD2_M6WE (0x10000000U) /*!< Bit mask for MPU_RGDn_WORD2_M6WE. */
1003 #define BS_MPU_RGDn_WORD2_M6WE (1U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M6WE. */
1005 /*! @brief Read current value of the MPU_RGDn_WORD2_M6WE field. */
1006 #define BR_MPU_RGDn_WORD2_M6WE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M6WE))
1008 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M6WE. */
1009 #define BF_MPU_RGDn_WORD2_M6WE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M6WE) & BM_MPU_RGDn_WORD2_M6WE)
1011 /*! @brief Set the M6WE field to a new value. */
1012 #define BW_MPU_RGDn_WORD2_M6WE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M6WE) = (v))
1016 * @name Register MPU_RGDn_WORD2, field M6RE[29] (RW)
1019 * - 0 - Bus master 6 reads terminate with an access error and the read is not
1021 * - 1 - Bus master 6 reads allowed
1024 #define BP_MPU_RGDn_WORD2_M6RE (29U) /*!< Bit position for MPU_RGDn_WORD2_M6RE. */
1025 #define BM_MPU_RGDn_WORD2_M6RE (0x20000000U) /*!< Bit mask for MPU_RGDn_WORD2_M6RE. */
1026 #define BS_MPU_RGDn_WORD2_M6RE (1U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M6RE. */
1028 /*! @brief Read current value of the MPU_RGDn_WORD2_M6RE field. */
1029 #define BR_MPU_RGDn_WORD2_M6RE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M6RE))
1031 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M6RE. */
1032 #define BF_MPU_RGDn_WORD2_M6RE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M6RE) & BM_MPU_RGDn_WORD2_M6RE)
1034 /*! @brief Set the M6RE field to a new value. */
1035 #define BW_MPU_RGDn_WORD2_M6RE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M6RE) = (v))
1039 * @name Register MPU_RGDn_WORD2, field M7WE[30] (RW)
1042 * - 0 - Bus master 7 writes terminate with an access error and the write is not
1044 * - 1 - Bus master 7 writes allowed
1047 #define BP_MPU_RGDn_WORD2_M7WE (30U) /*!< Bit position for MPU_RGDn_WORD2_M7WE. */
1048 #define BM_MPU_RGDn_WORD2_M7WE (0x40000000U) /*!< Bit mask for MPU_RGDn_WORD2_M7WE. */
1049 #define BS_MPU_RGDn_WORD2_M7WE (1U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M7WE. */
1051 /*! @brief Read current value of the MPU_RGDn_WORD2_M7WE field. */
1052 #define BR_MPU_RGDn_WORD2_M7WE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M7WE))
1054 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M7WE. */
1055 #define BF_MPU_RGDn_WORD2_M7WE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M7WE) & BM_MPU_RGDn_WORD2_M7WE)
1057 /*! @brief Set the M7WE field to a new value. */
1058 #define BW_MPU_RGDn_WORD2_M7WE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M7WE) = (v))
1062 * @name Register MPU_RGDn_WORD2, field M7RE[31] (RW)
1065 * - 0 - Bus master 7 reads terminate with an access error and the read is not
1067 * - 1 - Bus master 7 reads allowed
1070 #define BP_MPU_RGDn_WORD2_M7RE (31U) /*!< Bit position for MPU_RGDn_WORD2_M7RE. */
1071 #define BM_MPU_RGDn_WORD2_M7RE (0x80000000U) /*!< Bit mask for MPU_RGDn_WORD2_M7RE. */
1072 #define BS_MPU_RGDn_WORD2_M7RE (1U) /*!< Bit field size in bits for MPU_RGDn_WORD2_M7RE. */
1074 /*! @brief Read current value of the MPU_RGDn_WORD2_M7RE field. */
1075 #define BR_MPU_RGDn_WORD2_M7RE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M7RE))
1077 /*! @brief Format value for bitfield MPU_RGDn_WORD2_M7RE. */
1078 #define BF_MPU_RGDn_WORD2_M7RE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD2_M7RE) & BM_MPU_RGDn_WORD2_M7RE)
1080 /*! @brief Set the M7RE field to a new value. */
1081 #define BW_MPU_RGDn_WORD2_M7RE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD2_ADDR(x, n), BP_MPU_RGDn_WORD2_M7RE) = (v))
1083 /*******************************************************************************
1084 * HW_MPU_RGDn_WORD3 - Region Descriptor n, Word 3
1085 ******************************************************************************/
1088 * @brief HW_MPU_RGDn_WORD3 - Region Descriptor n, Word 3 (RW)
1090 * Reset value: 0x00000001U
1092 * The fourth word of the region descriptor contains the optional process
1093 * identifier and mask, plus the region descriptor's valid bit.
1095 typedef union _hw_mpu_rgdn_word3
1098 struct _hw_mpu_rgdn_word3_bitfields
1100 uint32_t VLD
: 1; /*!< [0] Valid */
1101 uint32_t RESERVED0
: 15; /*!< [15:1] */
1102 uint32_t PIDMASK
: 8; /*!< [23:16] Process Identifier Mask */
1103 uint32_t PID
: 8; /*!< [31:24] Process Identifier */
1105 } hw_mpu_rgdn_word3_t
;
1108 * @name Constants and macros for entire MPU_RGDn_WORD3 register
1111 #define HW_MPU_RGDn_WORD3_COUNT (12U)
1113 #define HW_MPU_RGDn_WORD3_ADDR(x, n) ((x) + 0x40CU + (0x10U * (n)))
1115 #define HW_MPU_RGDn_WORD3(x, n) (*(__IO hw_mpu_rgdn_word3_t *) HW_MPU_RGDn_WORD3_ADDR(x, n))
1116 #define HW_MPU_RGDn_WORD3_RD(x, n) (HW_MPU_RGDn_WORD3(x, n).U)
1117 #define HW_MPU_RGDn_WORD3_WR(x, n, v) (HW_MPU_RGDn_WORD3(x, n).U = (v))
1118 #define HW_MPU_RGDn_WORD3_SET(x, n, v) (HW_MPU_RGDn_WORD3_WR(x, n, HW_MPU_RGDn_WORD3_RD(x, n) | (v)))
1119 #define HW_MPU_RGDn_WORD3_CLR(x, n, v) (HW_MPU_RGDn_WORD3_WR(x, n, HW_MPU_RGDn_WORD3_RD(x, n) & ~(v)))
1120 #define HW_MPU_RGDn_WORD3_TOG(x, n, v) (HW_MPU_RGDn_WORD3_WR(x, n, HW_MPU_RGDn_WORD3_RD(x, n) ^ (v)))
1124 * Constants & macros for individual MPU_RGDn_WORD3 bitfields
1128 * @name Register MPU_RGDn_WORD3, field VLD[0] (RW)
1130 * Signals the region descriptor is valid. Any write to RGDn_WORD0-2 clears this
1134 * - 0 - Region descriptor is invalid
1135 * - 1 - Region descriptor is valid
1138 #define BP_MPU_RGDn_WORD3_VLD (0U) /*!< Bit position for MPU_RGDn_WORD3_VLD. */
1139 #define BM_MPU_RGDn_WORD3_VLD (0x00000001U) /*!< Bit mask for MPU_RGDn_WORD3_VLD. */
1140 #define BS_MPU_RGDn_WORD3_VLD (1U) /*!< Bit field size in bits for MPU_RGDn_WORD3_VLD. */
1142 /*! @brief Read current value of the MPU_RGDn_WORD3_VLD field. */
1143 #define BR_MPU_RGDn_WORD3_VLD(x, n) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD3_ADDR(x, n), BP_MPU_RGDn_WORD3_VLD))
1145 /*! @brief Format value for bitfield MPU_RGDn_WORD3_VLD. */
1146 #define BF_MPU_RGDn_WORD3_VLD(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD3_VLD) & BM_MPU_RGDn_WORD3_VLD)
1148 /*! @brief Set the VLD field to a new value. */
1149 #define BW_MPU_RGDn_WORD3_VLD(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDn_WORD3_ADDR(x, n), BP_MPU_RGDn_WORD3_VLD) = (v))
1153 * @name Register MPU_RGDn_WORD3, field PIDMASK[23:16] (RW)
1155 * Provides a masking capability so that multiple process identifiers can be
1156 * included as part of the region hit determination. If a bit in PIDMASK is set,
1157 * then the corresponding PID bit is ignored in the comparison. This field and PID
1158 * are included in the region hit determination if RGDn_WORD2[MxPE] is set. For
1159 * more information on the handling of the PID and PIDMASK, see "Access Evaluation
1160 * - Hit Determination."
1163 #define BP_MPU_RGDn_WORD3_PIDMASK (16U) /*!< Bit position for MPU_RGDn_WORD3_PIDMASK. */
1164 #define BM_MPU_RGDn_WORD3_PIDMASK (0x00FF0000U) /*!< Bit mask for MPU_RGDn_WORD3_PIDMASK. */
1165 #define BS_MPU_RGDn_WORD3_PIDMASK (8U) /*!< Bit field size in bits for MPU_RGDn_WORD3_PIDMASK. */
1167 /*! @brief Read current value of the MPU_RGDn_WORD3_PIDMASK field. */
1168 #define BR_MPU_RGDn_WORD3_PIDMASK(x, n) (HW_MPU_RGDn_WORD3(x, n).B.PIDMASK)
1170 /*! @brief Format value for bitfield MPU_RGDn_WORD3_PIDMASK. */
1171 #define BF_MPU_RGDn_WORD3_PIDMASK(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD3_PIDMASK) & BM_MPU_RGDn_WORD3_PIDMASK)
1173 /*! @brief Set the PIDMASK field to a new value. */
1174 #define BW_MPU_RGDn_WORD3_PIDMASK(x, n, v) (HW_MPU_RGDn_WORD3_WR(x, n, (HW_MPU_RGDn_WORD3_RD(x, n) & ~BM_MPU_RGDn_WORD3_PIDMASK) | BF_MPU_RGDn_WORD3_PIDMASK(v)))
1178 * @name Register MPU_RGDn_WORD3, field PID[31:24] (RW)
1180 * Specifies the process identifier that is included in the region hit
1181 * determination if RGDn_WORD2[MxPE] is set. PIDMASK can mask individual bits in this
1185 #define BP_MPU_RGDn_WORD3_PID (24U) /*!< Bit position for MPU_RGDn_WORD3_PID. */
1186 #define BM_MPU_RGDn_WORD3_PID (0xFF000000U) /*!< Bit mask for MPU_RGDn_WORD3_PID. */
1187 #define BS_MPU_RGDn_WORD3_PID (8U) /*!< Bit field size in bits for MPU_RGDn_WORD3_PID. */
1189 /*! @brief Read current value of the MPU_RGDn_WORD3_PID field. */
1190 #define BR_MPU_RGDn_WORD3_PID(x, n) (HW_MPU_RGDn_WORD3(x, n).B.PID)
1192 /*! @brief Format value for bitfield MPU_RGDn_WORD3_PID. */
1193 #define BF_MPU_RGDn_WORD3_PID(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDn_WORD3_PID) & BM_MPU_RGDn_WORD3_PID)
1195 /*! @brief Set the PID field to a new value. */
1196 #define BW_MPU_RGDn_WORD3_PID(x, n, v) (HW_MPU_RGDn_WORD3_WR(x, n, (HW_MPU_RGDn_WORD3_RD(x, n) & ~BM_MPU_RGDn_WORD3_PID) | BF_MPU_RGDn_WORD3_PID(v)))
1199 /*******************************************************************************
1200 * HW_MPU_RGDAACn - Region Descriptor Alternate Access Control n
1201 ******************************************************************************/
1204 * @brief HW_MPU_RGDAACn - Region Descriptor Alternate Access Control n (RW)
1206 * Reset value: 0x0061F7DFU
1208 * Because software may adjust only the access controls within a region
1209 * descriptor (RGDn_WORD2) as different tasks execute, an alternate programming view of
1210 * this 32-bit entity is available. Writing to this register does not affect the
1211 * descriptor's valid bit.
1213 typedef union _hw_mpu_rgdaacn
1216 struct _hw_mpu_rgdaacn_bitfields
1218 uint32_t M0UM
: 3; /*!< [2:0] Bus Master 0 User Mode Access Control */
1219 uint32_t M0SM
: 2; /*!< [4:3] Bus Master 0 Supervisor Mode Access
1221 uint32_t M0PE
: 1; /*!< [5] Bus Master 0 Process Identifier Enable */
1222 uint32_t M1UM
: 3; /*!< [8:6] Bus Master 1 User Mode Access Control */
1223 uint32_t M1SM
: 2; /*!< [10:9] Bus Master 1 Supervisor Mode Access
1225 uint32_t M1PE
: 1; /*!< [11] Bus Master 1 Process Identifier Enable */
1226 uint32_t M2UM
: 3; /*!< [14:12] Bus Master 2 User Mode Access Control
1228 uint32_t M2SM
: 2; /*!< [16:15] Bus Master 2 Supervisor Mode Access
1230 uint32_t M2PE
: 1; /*!< [17] Bus Master 2 Process Identifier Enable */
1231 uint32_t M3UM
: 3; /*!< [20:18] Bus Master 3 User Mode Access Control
1233 uint32_t M3SM
: 2; /*!< [22:21] Bus Master 3 Supervisor Mode Access
1235 uint32_t M3PE
: 1; /*!< [23] Bus Master 3 Process Identifier Enable */
1236 uint32_t M4WE
: 1; /*!< [24] Bus Master 4 Write Enable */
1237 uint32_t M4RE
: 1; /*!< [25] Bus Master 4 Read Enable */
1238 uint32_t M5WE
: 1; /*!< [26] Bus Master 5 Write Enable */
1239 uint32_t M5RE
: 1; /*!< [27] Bus Master 5 Read Enable */
1240 uint32_t M6WE
: 1; /*!< [28] Bus Master 6 Write Enable */
1241 uint32_t M6RE
: 1; /*!< [29] Bus Master 6 Read Enable */
1242 uint32_t M7WE
: 1; /*!< [30] Bus Master 7 Write Enable */
1243 uint32_t M7RE
: 1; /*!< [31] Bus Master 7 Read Enable */
1248 * @name Constants and macros for entire MPU_RGDAACn register
1251 #define HW_MPU_RGDAACn_COUNT (12U)
1253 #define HW_MPU_RGDAACn_ADDR(x, n) ((x) + 0x800U + (0x4U * (n)))
1255 #define HW_MPU_RGDAACn(x, n) (*(__IO hw_mpu_rgdaacn_t *) HW_MPU_RGDAACn_ADDR(x, n))
1256 #define HW_MPU_RGDAACn_RD(x, n) (HW_MPU_RGDAACn(x, n).U)
1257 #define HW_MPU_RGDAACn_WR(x, n, v) (HW_MPU_RGDAACn(x, n).U = (v))
1258 #define HW_MPU_RGDAACn_SET(x, n, v) (HW_MPU_RGDAACn_WR(x, n, HW_MPU_RGDAACn_RD(x, n) | (v)))
1259 #define HW_MPU_RGDAACn_CLR(x, n, v) (HW_MPU_RGDAACn_WR(x, n, HW_MPU_RGDAACn_RD(x, n) & ~(v)))
1260 #define HW_MPU_RGDAACn_TOG(x, n, v) (HW_MPU_RGDAACn_WR(x, n, HW_MPU_RGDAACn_RD(x, n) ^ (v)))
1264 * Constants & macros for individual MPU_RGDAACn bitfields
1268 * @name Register MPU_RGDAACn, field M0UM[2:0] (RW)
1270 * See M3UM description.
1273 #define BP_MPU_RGDAACn_M0UM (0U) /*!< Bit position for MPU_RGDAACn_M0UM. */
1274 #define BM_MPU_RGDAACn_M0UM (0x00000007U) /*!< Bit mask for MPU_RGDAACn_M0UM. */
1275 #define BS_MPU_RGDAACn_M0UM (3U) /*!< Bit field size in bits for MPU_RGDAACn_M0UM. */
1277 /*! @brief Read current value of the MPU_RGDAACn_M0UM field. */
1278 #define BR_MPU_RGDAACn_M0UM(x, n) (HW_MPU_RGDAACn(x, n).B.M0UM)
1280 /*! @brief Format value for bitfield MPU_RGDAACn_M0UM. */
1281 #define BF_MPU_RGDAACn_M0UM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M0UM) & BM_MPU_RGDAACn_M0UM)
1283 /*! @brief Set the M0UM field to a new value. */
1284 #define BW_MPU_RGDAACn_M0UM(x, n, v) (HW_MPU_RGDAACn_WR(x, n, (HW_MPU_RGDAACn_RD(x, n) & ~BM_MPU_RGDAACn_M0UM) | BF_MPU_RGDAACn_M0UM(v)))
1288 * @name Register MPU_RGDAACn, field M0SM[4:3] (RW)
1290 * See M3SM description.
1293 #define BP_MPU_RGDAACn_M0SM (3U) /*!< Bit position for MPU_RGDAACn_M0SM. */
1294 #define BM_MPU_RGDAACn_M0SM (0x00000018U) /*!< Bit mask for MPU_RGDAACn_M0SM. */
1295 #define BS_MPU_RGDAACn_M0SM (2U) /*!< Bit field size in bits for MPU_RGDAACn_M0SM. */
1297 /*! @brief Read current value of the MPU_RGDAACn_M0SM field. */
1298 #define BR_MPU_RGDAACn_M0SM(x, n) (HW_MPU_RGDAACn(x, n).B.M0SM)
1300 /*! @brief Format value for bitfield MPU_RGDAACn_M0SM. */
1301 #define BF_MPU_RGDAACn_M0SM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M0SM) & BM_MPU_RGDAACn_M0SM)
1303 /*! @brief Set the M0SM field to a new value. */
1304 #define BW_MPU_RGDAACn_M0SM(x, n, v) (HW_MPU_RGDAACn_WR(x, n, (HW_MPU_RGDAACn_RD(x, n) & ~BM_MPU_RGDAACn_M0SM) | BF_MPU_RGDAACn_M0SM(v)))
1308 * @name Register MPU_RGDAACn, field M0PE[5] (RW)
1310 * See M3PE description.
1313 #define BP_MPU_RGDAACn_M0PE (5U) /*!< Bit position for MPU_RGDAACn_M0PE. */
1314 #define BM_MPU_RGDAACn_M0PE (0x00000020U) /*!< Bit mask for MPU_RGDAACn_M0PE. */
1315 #define BS_MPU_RGDAACn_M0PE (1U) /*!< Bit field size in bits for MPU_RGDAACn_M0PE. */
1317 /*! @brief Read current value of the MPU_RGDAACn_M0PE field. */
1318 #define BR_MPU_RGDAACn_M0PE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M0PE))
1320 /*! @brief Format value for bitfield MPU_RGDAACn_M0PE. */
1321 #define BF_MPU_RGDAACn_M0PE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M0PE) & BM_MPU_RGDAACn_M0PE)
1323 /*! @brief Set the M0PE field to a new value. */
1324 #define BW_MPU_RGDAACn_M0PE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M0PE) = (v))
1328 * @name Register MPU_RGDAACn, field M1UM[8:6] (RW)
1330 * See M3UM description.
1333 #define BP_MPU_RGDAACn_M1UM (6U) /*!< Bit position for MPU_RGDAACn_M1UM. */
1334 #define BM_MPU_RGDAACn_M1UM (0x000001C0U) /*!< Bit mask for MPU_RGDAACn_M1UM. */
1335 #define BS_MPU_RGDAACn_M1UM (3U) /*!< Bit field size in bits for MPU_RGDAACn_M1UM. */
1337 /*! @brief Read current value of the MPU_RGDAACn_M1UM field. */
1338 #define BR_MPU_RGDAACn_M1UM(x, n) (HW_MPU_RGDAACn(x, n).B.M1UM)
1340 /*! @brief Format value for bitfield MPU_RGDAACn_M1UM. */
1341 #define BF_MPU_RGDAACn_M1UM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M1UM) & BM_MPU_RGDAACn_M1UM)
1343 /*! @brief Set the M1UM field to a new value. */
1344 #define BW_MPU_RGDAACn_M1UM(x, n, v) (HW_MPU_RGDAACn_WR(x, n, (HW_MPU_RGDAACn_RD(x, n) & ~BM_MPU_RGDAACn_M1UM) | BF_MPU_RGDAACn_M1UM(v)))
1348 * @name Register MPU_RGDAACn, field M1SM[10:9] (RW)
1350 * See M3SM description.
1353 #define BP_MPU_RGDAACn_M1SM (9U) /*!< Bit position for MPU_RGDAACn_M1SM. */
1354 #define BM_MPU_RGDAACn_M1SM (0x00000600U) /*!< Bit mask for MPU_RGDAACn_M1SM. */
1355 #define BS_MPU_RGDAACn_M1SM (2U) /*!< Bit field size in bits for MPU_RGDAACn_M1SM. */
1357 /*! @brief Read current value of the MPU_RGDAACn_M1SM field. */
1358 #define BR_MPU_RGDAACn_M1SM(x, n) (HW_MPU_RGDAACn(x, n).B.M1SM)
1360 /*! @brief Format value for bitfield MPU_RGDAACn_M1SM. */
1361 #define BF_MPU_RGDAACn_M1SM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M1SM) & BM_MPU_RGDAACn_M1SM)
1363 /*! @brief Set the M1SM field to a new value. */
1364 #define BW_MPU_RGDAACn_M1SM(x, n, v) (HW_MPU_RGDAACn_WR(x, n, (HW_MPU_RGDAACn_RD(x, n) & ~BM_MPU_RGDAACn_M1SM) | BF_MPU_RGDAACn_M1SM(v)))
1368 * @name Register MPU_RGDAACn, field M1PE[11] (RW)
1370 * See M3PE description.
1373 #define BP_MPU_RGDAACn_M1PE (11U) /*!< Bit position for MPU_RGDAACn_M1PE. */
1374 #define BM_MPU_RGDAACn_M1PE (0x00000800U) /*!< Bit mask for MPU_RGDAACn_M1PE. */
1375 #define BS_MPU_RGDAACn_M1PE (1U) /*!< Bit field size in bits for MPU_RGDAACn_M1PE. */
1377 /*! @brief Read current value of the MPU_RGDAACn_M1PE field. */
1378 #define BR_MPU_RGDAACn_M1PE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M1PE))
1380 /*! @brief Format value for bitfield MPU_RGDAACn_M1PE. */
1381 #define BF_MPU_RGDAACn_M1PE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M1PE) & BM_MPU_RGDAACn_M1PE)
1383 /*! @brief Set the M1PE field to a new value. */
1384 #define BW_MPU_RGDAACn_M1PE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M1PE) = (v))
1388 * @name Register MPU_RGDAACn, field M2UM[14:12] (RW)
1390 * See M3UM description.
1393 #define BP_MPU_RGDAACn_M2UM (12U) /*!< Bit position for MPU_RGDAACn_M2UM. */
1394 #define BM_MPU_RGDAACn_M2UM (0x00007000U) /*!< Bit mask for MPU_RGDAACn_M2UM. */
1395 #define BS_MPU_RGDAACn_M2UM (3U) /*!< Bit field size in bits for MPU_RGDAACn_M2UM. */
1397 /*! @brief Read current value of the MPU_RGDAACn_M2UM field. */
1398 #define BR_MPU_RGDAACn_M2UM(x, n) (HW_MPU_RGDAACn(x, n).B.M2UM)
1400 /*! @brief Format value for bitfield MPU_RGDAACn_M2UM. */
1401 #define BF_MPU_RGDAACn_M2UM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M2UM) & BM_MPU_RGDAACn_M2UM)
1403 /*! @brief Set the M2UM field to a new value. */
1404 #define BW_MPU_RGDAACn_M2UM(x, n, v) (HW_MPU_RGDAACn_WR(x, n, (HW_MPU_RGDAACn_RD(x, n) & ~BM_MPU_RGDAACn_M2UM) | BF_MPU_RGDAACn_M2UM(v)))
1408 * @name Register MPU_RGDAACn, field M2SM[16:15] (RW)
1410 * See M3SM description.
1413 #define BP_MPU_RGDAACn_M2SM (15U) /*!< Bit position for MPU_RGDAACn_M2SM. */
1414 #define BM_MPU_RGDAACn_M2SM (0x00018000U) /*!< Bit mask for MPU_RGDAACn_M2SM. */
1415 #define BS_MPU_RGDAACn_M2SM (2U) /*!< Bit field size in bits for MPU_RGDAACn_M2SM. */
1417 /*! @brief Read current value of the MPU_RGDAACn_M2SM field. */
1418 #define BR_MPU_RGDAACn_M2SM(x, n) (HW_MPU_RGDAACn(x, n).B.M2SM)
1420 /*! @brief Format value for bitfield MPU_RGDAACn_M2SM. */
1421 #define BF_MPU_RGDAACn_M2SM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M2SM) & BM_MPU_RGDAACn_M2SM)
1423 /*! @brief Set the M2SM field to a new value. */
1424 #define BW_MPU_RGDAACn_M2SM(x, n, v) (HW_MPU_RGDAACn_WR(x, n, (HW_MPU_RGDAACn_RD(x, n) & ~BM_MPU_RGDAACn_M2SM) | BF_MPU_RGDAACn_M2SM(v)))
1428 * @name Register MPU_RGDAACn, field M2PE[17] (RW)
1430 * See M3PE description.
1433 #define BP_MPU_RGDAACn_M2PE (17U) /*!< Bit position for MPU_RGDAACn_M2PE. */
1434 #define BM_MPU_RGDAACn_M2PE (0x00020000U) /*!< Bit mask for MPU_RGDAACn_M2PE. */
1435 #define BS_MPU_RGDAACn_M2PE (1U) /*!< Bit field size in bits for MPU_RGDAACn_M2PE. */
1437 /*! @brief Read current value of the MPU_RGDAACn_M2PE field. */
1438 #define BR_MPU_RGDAACn_M2PE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M2PE))
1440 /*! @brief Format value for bitfield MPU_RGDAACn_M2PE. */
1441 #define BF_MPU_RGDAACn_M2PE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M2PE) & BM_MPU_RGDAACn_M2PE)
1443 /*! @brief Set the M2PE field to a new value. */
1444 #define BW_MPU_RGDAACn_M2PE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M2PE) = (v))
1448 * @name Register MPU_RGDAACn, field M3UM[20:18] (RW)
1450 * Defines the access controls for bus master 3 in user mode. M3UM consists of
1451 * three independent bits, enabling read (r), write (w), and execute (x)
1455 * - 0 - An attempted access of that mode may be terminated with an access error
1456 * (if not allowed by another descriptor) and the access not performed.
1457 * - 1 - Allows the given access type to occur
1460 #define BP_MPU_RGDAACn_M3UM (18U) /*!< Bit position for MPU_RGDAACn_M3UM. */
1461 #define BM_MPU_RGDAACn_M3UM (0x001C0000U) /*!< Bit mask for MPU_RGDAACn_M3UM. */
1462 #define BS_MPU_RGDAACn_M3UM (3U) /*!< Bit field size in bits for MPU_RGDAACn_M3UM. */
1464 /*! @brief Read current value of the MPU_RGDAACn_M3UM field. */
1465 #define BR_MPU_RGDAACn_M3UM(x, n) (HW_MPU_RGDAACn(x, n).B.M3UM)
1467 /*! @brief Format value for bitfield MPU_RGDAACn_M3UM. */
1468 #define BF_MPU_RGDAACn_M3UM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M3UM) & BM_MPU_RGDAACn_M3UM)
1470 /*! @brief Set the M3UM field to a new value. */
1471 #define BW_MPU_RGDAACn_M3UM(x, n, v) (HW_MPU_RGDAACn_WR(x, n, (HW_MPU_RGDAACn_RD(x, n) & ~BM_MPU_RGDAACn_M3UM) | BF_MPU_RGDAACn_M3UM(v)))
1475 * @name Register MPU_RGDAACn, field M3SM[22:21] (RW)
1477 * Defines the access controls for bus master 3 in Supervisor mode.
1480 * - 00 - r/w/x; read, write and execute allowed
1481 * - 01 - r/x; read and execute allowed, but no write
1482 * - 10 - r/w; read and write allowed, but no execute
1483 * - 11 - Same as User mode defined in M3UM
1486 #define BP_MPU_RGDAACn_M3SM (21U) /*!< Bit position for MPU_RGDAACn_M3SM. */
1487 #define BM_MPU_RGDAACn_M3SM (0x00600000U) /*!< Bit mask for MPU_RGDAACn_M3SM. */
1488 #define BS_MPU_RGDAACn_M3SM (2U) /*!< Bit field size in bits for MPU_RGDAACn_M3SM. */
1490 /*! @brief Read current value of the MPU_RGDAACn_M3SM field. */
1491 #define BR_MPU_RGDAACn_M3SM(x, n) (HW_MPU_RGDAACn(x, n).B.M3SM)
1493 /*! @brief Format value for bitfield MPU_RGDAACn_M3SM. */
1494 #define BF_MPU_RGDAACn_M3SM(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M3SM) & BM_MPU_RGDAACn_M3SM)
1496 /*! @brief Set the M3SM field to a new value. */
1497 #define BW_MPU_RGDAACn_M3SM(x, n, v) (HW_MPU_RGDAACn_WR(x, n, (HW_MPU_RGDAACn_RD(x, n) & ~BM_MPU_RGDAACn_M3SM) | BF_MPU_RGDAACn_M3SM(v)))
1501 * @name Register MPU_RGDAACn, field M3PE[23] (RW)
1504 * - 0 - Do not include the process identifier in the evaluation
1505 * - 1 - Include the process identifier and mask (RGDn.RGDAAC) in the region hit
1509 #define BP_MPU_RGDAACn_M3PE (23U) /*!< Bit position for MPU_RGDAACn_M3PE. */
1510 #define BM_MPU_RGDAACn_M3PE (0x00800000U) /*!< Bit mask for MPU_RGDAACn_M3PE. */
1511 #define BS_MPU_RGDAACn_M3PE (1U) /*!< Bit field size in bits for MPU_RGDAACn_M3PE. */
1513 /*! @brief Read current value of the MPU_RGDAACn_M3PE field. */
1514 #define BR_MPU_RGDAACn_M3PE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M3PE))
1516 /*! @brief Format value for bitfield MPU_RGDAACn_M3PE. */
1517 #define BF_MPU_RGDAACn_M3PE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M3PE) & BM_MPU_RGDAACn_M3PE)
1519 /*! @brief Set the M3PE field to a new value. */
1520 #define BW_MPU_RGDAACn_M3PE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M3PE) = (v))
1524 * @name Register MPU_RGDAACn, field M4WE[24] (RW)
1527 * - 0 - Bus master 4 writes terminate with an access error and the write is not
1529 * - 1 - Bus master 4 writes allowed
1532 #define BP_MPU_RGDAACn_M4WE (24U) /*!< Bit position for MPU_RGDAACn_M4WE. */
1533 #define BM_MPU_RGDAACn_M4WE (0x01000000U) /*!< Bit mask for MPU_RGDAACn_M4WE. */
1534 #define BS_MPU_RGDAACn_M4WE (1U) /*!< Bit field size in bits for MPU_RGDAACn_M4WE. */
1536 /*! @brief Read current value of the MPU_RGDAACn_M4WE field. */
1537 #define BR_MPU_RGDAACn_M4WE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M4WE))
1539 /*! @brief Format value for bitfield MPU_RGDAACn_M4WE. */
1540 #define BF_MPU_RGDAACn_M4WE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M4WE) & BM_MPU_RGDAACn_M4WE)
1542 /*! @brief Set the M4WE field to a new value. */
1543 #define BW_MPU_RGDAACn_M4WE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M4WE) = (v))
1547 * @name Register MPU_RGDAACn, field M4RE[25] (RW)
1550 * - 0 - Bus master 4 reads terminate with an access error and the read is not
1552 * - 1 - Bus master 4 reads allowed
1555 #define BP_MPU_RGDAACn_M4RE (25U) /*!< Bit position for MPU_RGDAACn_M4RE. */
1556 #define BM_MPU_RGDAACn_M4RE (0x02000000U) /*!< Bit mask for MPU_RGDAACn_M4RE. */
1557 #define BS_MPU_RGDAACn_M4RE (1U) /*!< Bit field size in bits for MPU_RGDAACn_M4RE. */
1559 /*! @brief Read current value of the MPU_RGDAACn_M4RE field. */
1560 #define BR_MPU_RGDAACn_M4RE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M4RE))
1562 /*! @brief Format value for bitfield MPU_RGDAACn_M4RE. */
1563 #define BF_MPU_RGDAACn_M4RE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M4RE) & BM_MPU_RGDAACn_M4RE)
1565 /*! @brief Set the M4RE field to a new value. */
1566 #define BW_MPU_RGDAACn_M4RE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M4RE) = (v))
1570 * @name Register MPU_RGDAACn, field M5WE[26] (RW)
1573 * - 0 - Bus master 5 writes terminate with an access error and the write is not
1575 * - 1 - Bus master 5 writes allowed
1578 #define BP_MPU_RGDAACn_M5WE (26U) /*!< Bit position for MPU_RGDAACn_M5WE. */
1579 #define BM_MPU_RGDAACn_M5WE (0x04000000U) /*!< Bit mask for MPU_RGDAACn_M5WE. */
1580 #define BS_MPU_RGDAACn_M5WE (1U) /*!< Bit field size in bits for MPU_RGDAACn_M5WE. */
1582 /*! @brief Read current value of the MPU_RGDAACn_M5WE field. */
1583 #define BR_MPU_RGDAACn_M5WE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M5WE))
1585 /*! @brief Format value for bitfield MPU_RGDAACn_M5WE. */
1586 #define BF_MPU_RGDAACn_M5WE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M5WE) & BM_MPU_RGDAACn_M5WE)
1588 /*! @brief Set the M5WE field to a new value. */
1589 #define BW_MPU_RGDAACn_M5WE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M5WE) = (v))
1593 * @name Register MPU_RGDAACn, field M5RE[27] (RW)
1596 * - 0 - Bus master 5 reads terminate with an access error and the read is not
1598 * - 1 - Bus master 5 reads allowed
1601 #define BP_MPU_RGDAACn_M5RE (27U) /*!< Bit position for MPU_RGDAACn_M5RE. */
1602 #define BM_MPU_RGDAACn_M5RE (0x08000000U) /*!< Bit mask for MPU_RGDAACn_M5RE. */
1603 #define BS_MPU_RGDAACn_M5RE (1U) /*!< Bit field size in bits for MPU_RGDAACn_M5RE. */
1605 /*! @brief Read current value of the MPU_RGDAACn_M5RE field. */
1606 #define BR_MPU_RGDAACn_M5RE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M5RE))
1608 /*! @brief Format value for bitfield MPU_RGDAACn_M5RE. */
1609 #define BF_MPU_RGDAACn_M5RE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M5RE) & BM_MPU_RGDAACn_M5RE)
1611 /*! @brief Set the M5RE field to a new value. */
1612 #define BW_MPU_RGDAACn_M5RE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M5RE) = (v))
1616 * @name Register MPU_RGDAACn, field M6WE[28] (RW)
1619 * - 0 - Bus master 6 writes terminate with an access error and the write is not
1621 * - 1 - Bus master 6 writes allowed
1624 #define BP_MPU_RGDAACn_M6WE (28U) /*!< Bit position for MPU_RGDAACn_M6WE. */
1625 #define BM_MPU_RGDAACn_M6WE (0x10000000U) /*!< Bit mask for MPU_RGDAACn_M6WE. */
1626 #define BS_MPU_RGDAACn_M6WE (1U) /*!< Bit field size in bits for MPU_RGDAACn_M6WE. */
1628 /*! @brief Read current value of the MPU_RGDAACn_M6WE field. */
1629 #define BR_MPU_RGDAACn_M6WE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M6WE))
1631 /*! @brief Format value for bitfield MPU_RGDAACn_M6WE. */
1632 #define BF_MPU_RGDAACn_M6WE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M6WE) & BM_MPU_RGDAACn_M6WE)
1634 /*! @brief Set the M6WE field to a new value. */
1635 #define BW_MPU_RGDAACn_M6WE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M6WE) = (v))
1639 * @name Register MPU_RGDAACn, field M6RE[29] (RW)
1642 * - 0 - Bus master 6 reads terminate with an access error and the read is not
1644 * - 1 - Bus master 6 reads allowed
1647 #define BP_MPU_RGDAACn_M6RE (29U) /*!< Bit position for MPU_RGDAACn_M6RE. */
1648 #define BM_MPU_RGDAACn_M6RE (0x20000000U) /*!< Bit mask for MPU_RGDAACn_M6RE. */
1649 #define BS_MPU_RGDAACn_M6RE (1U) /*!< Bit field size in bits for MPU_RGDAACn_M6RE. */
1651 /*! @brief Read current value of the MPU_RGDAACn_M6RE field. */
1652 #define BR_MPU_RGDAACn_M6RE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M6RE))
1654 /*! @brief Format value for bitfield MPU_RGDAACn_M6RE. */
1655 #define BF_MPU_RGDAACn_M6RE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M6RE) & BM_MPU_RGDAACn_M6RE)
1657 /*! @brief Set the M6RE field to a new value. */
1658 #define BW_MPU_RGDAACn_M6RE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M6RE) = (v))
1662 * @name Register MPU_RGDAACn, field M7WE[30] (RW)
1665 * - 0 - Bus master 7 writes terminate with an access error and the write is not
1667 * - 1 - Bus master 7 writes allowed
1670 #define BP_MPU_RGDAACn_M7WE (30U) /*!< Bit position for MPU_RGDAACn_M7WE. */
1671 #define BM_MPU_RGDAACn_M7WE (0x40000000U) /*!< Bit mask for MPU_RGDAACn_M7WE. */
1672 #define BS_MPU_RGDAACn_M7WE (1U) /*!< Bit field size in bits for MPU_RGDAACn_M7WE. */
1674 /*! @brief Read current value of the MPU_RGDAACn_M7WE field. */
1675 #define BR_MPU_RGDAACn_M7WE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M7WE))
1677 /*! @brief Format value for bitfield MPU_RGDAACn_M7WE. */
1678 #define BF_MPU_RGDAACn_M7WE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M7WE) & BM_MPU_RGDAACn_M7WE)
1680 /*! @brief Set the M7WE field to a new value. */
1681 #define BW_MPU_RGDAACn_M7WE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M7WE) = (v))
1685 * @name Register MPU_RGDAACn, field M7RE[31] (RW)
1688 * - 0 - Bus master 7 reads terminate with an access error and the read is not
1690 * - 1 - Bus master 7 reads allowed
1693 #define BP_MPU_RGDAACn_M7RE (31U) /*!< Bit position for MPU_RGDAACn_M7RE. */
1694 #define BM_MPU_RGDAACn_M7RE (0x80000000U) /*!< Bit mask for MPU_RGDAACn_M7RE. */
1695 #define BS_MPU_RGDAACn_M7RE (1U) /*!< Bit field size in bits for MPU_RGDAACn_M7RE. */
1697 /*! @brief Read current value of the MPU_RGDAACn_M7RE field. */
1698 #define BR_MPU_RGDAACn_M7RE(x, n) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M7RE))
1700 /*! @brief Format value for bitfield MPU_RGDAACn_M7RE. */
1701 #define BF_MPU_RGDAACn_M7RE(v) ((uint32_t)((uint32_t)(v) << BP_MPU_RGDAACn_M7RE) & BM_MPU_RGDAACn_M7RE)
1703 /*! @brief Set the M7RE field to a new value. */
1704 #define BW_MPU_RGDAACn_M7RE(x, n, v) (BITBAND_ACCESS32(HW_MPU_RGDAACn_ADDR(x, n), BP_MPU_RGDAACn_M7RE) = (v))
1707 /*******************************************************************************
1708 * hw_mpu_t - module struct
1709 ******************************************************************************/
1711 * @brief All MPU module registers.
1714 typedef struct _hw_mpu
1716 __IO hw_mpu_cesr_t CESR
; /*!< [0x0] Control/Error Status Register */
1717 uint8_t _reserved0
[12];
1719 __I hw_mpu_earn_t EARn
; /*!< [0x10] Error Address Register, slave port n */
1720 __I hw_mpu_edrn_t EDRn
; /*!< [0x14] Error Detail Register, slave port n */
1722 uint8_t _reserved1
[968];
1724 __IO hw_mpu_rgdn_word0_t RGDn_WORD0
; /*!< [0x400] Region Descriptor n, Word 0 */
1725 __IO hw_mpu_rgdn_word1_t RGDn_WORD1
; /*!< [0x404] Region Descriptor n, Word 1 */
1726 __IO hw_mpu_rgdn_word2_t RGDn_WORD2
; /*!< [0x408] Region Descriptor n, Word 2 */
1727 __IO hw_mpu_rgdn_word3_t RGDn_WORD3
; /*!< [0x40C] Region Descriptor n, Word 3 */
1729 uint8_t _reserved2
[832];
1730 __IO hw_mpu_rgdaacn_t RGDAACn
[12]; /*!< [0x800] Region Descriptor Alternate Access Control n */
1734 /*! @brief Macro to access all MPU registers. */
1735 /*! @param x MPU module instance base address. */
1736 /*! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
1737 * use the '&' operator, like <code>&HW_MPU(MPU_BASE)</code>. */
1738 #define HW_MPU(x) (*(hw_mpu_t *)(x))
1740 #endif /* __HW_MPU_REGISTERS_H__ */