]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_MCU_K64F/device/device/MK64F12/MK64F12_fb.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_Freescale / TARGET_KPSDK_MCUS / TARGET_MCU_K64F / device / device / MK64F12 / MK64F12_fb.h
1 /*
2 ** ###################################################################
3 **     Compilers:           Keil ARM C/C++ Compiler
4 **                          Freescale C/C++ for Embedded ARM
5 **                          GNU C Compiler
6 **                          IAR ANSI C/C++ Compiler for ARM
7 **
8 **     Reference manual:    K64P144M120SF5RM, Rev.2, January 2014
9 **     Version:             rev. 2.5, 2014-02-10
10 **     Build:               b140604
11 **
12 **     Abstract:
13 **         Extension to the CMSIS register access layer header.
14 **
15 **     Copyright (c) 2014 Freescale Semiconductor, Inc.
16 **     All rights reserved.
17 **
18 **     Redistribution and use in source and binary forms, with or without modification,
19 **     are permitted provided that the following conditions are met:
20 **
21 **     o Redistributions of source code must retain the above copyright notice, this list
22 **       of conditions and the following disclaimer.
23 **
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.
27 **
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.
31 **
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.
42 **
43 **     http:                 www.freescale.com
44 **     mail:                 support@freescale.com
45 **
46 **     Revisions:
47 **     - rev. 1.0 (2013-08-12)
48 **         Initial version.
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.
71 **
72 ** ###################################################################
73 */
74
75 /*
76  * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
77  *
78  * This file was generated automatically and any changes may be lost.
79  */
80 #ifndef __HW_FB_REGISTERS_H__
81 #define __HW_FB_REGISTERS_H__
82
83 #include "MK64F12.h"
84 #include "fsl_bitaccess.h"
85
86 /*
87  * MK64F12 FB
88  *
89  * FlexBus external bus interface
90  *
91  * Registers defined in this header file:
92  * - HW_FB_CSARn - Chip Select Address Register
93  * - HW_FB_CSMRn - Chip Select Mask Register
94  * - HW_FB_CSCRn - Chip Select Control Register
95  * - HW_FB_CSPMCR - Chip Select port Multiplexing Control Register
96  *
97  * - hw_fb_t - Struct containing all module registers.
98  */
99
100 #define HW_FB_INSTANCE_COUNT (1U) /*!< Number of instances of the FB module. */
101
102 /*******************************************************************************
103  * HW_FB_CSARn - Chip Select Address Register
104  ******************************************************************************/
105
106 /*!
107  * @brief HW_FB_CSARn - Chip Select Address Register (RW)
108  *
109  * Reset value: 0x00000000U
110  *
111  * Specifies the associated chip-select's base address.
112  */
113 typedef union _hw_fb_csarn
114 {
115     uint32_t U;
116     struct _hw_fb_csarn_bitfields
117     {
118         uint32_t RESERVED0 : 16;       /*!< [15:0]  */
119         uint32_t BA : 16;              /*!< [31:16] Base Address */
120     } B;
121 } hw_fb_csarn_t;
122
123 /*!
124  * @name Constants and macros for entire FB_CSARn register
125  */
126 /*@{*/
127 #define HW_FB_CSARn_COUNT (6U)
128
129 #define HW_FB_CSARn_ADDR(x, n)   ((x) + 0x0U + (0xCU * (n)))
130
131 #define HW_FB_CSARn(x, n)        (*(__IO hw_fb_csarn_t *) HW_FB_CSARn_ADDR(x, n))
132 #define HW_FB_CSARn_RD(x, n)     (HW_FB_CSARn(x, n).U)
133 #define HW_FB_CSARn_WR(x, n, v)  (HW_FB_CSARn(x, n).U = (v))
134 #define HW_FB_CSARn_SET(x, n, v) (HW_FB_CSARn_WR(x, n, HW_FB_CSARn_RD(x, n) |  (v)))
135 #define HW_FB_CSARn_CLR(x, n, v) (HW_FB_CSARn_WR(x, n, HW_FB_CSARn_RD(x, n) & ~(v)))
136 #define HW_FB_CSARn_TOG(x, n, v) (HW_FB_CSARn_WR(x, n, HW_FB_CSARn_RD(x, n) ^  (v)))
137 /*@}*/
138
139 /*
140  * Constants & macros for individual FB_CSARn bitfields
141  */
142
143 /*!
144  * @name Register FB_CSARn, field BA[31:16] (RW)
145  *
146  * Defines the base address for memory dedicated to the associated chip-select.
147  * BA is compared to bits 31-16 on the internal address bus to determine if the
148  * associated chip-select's memory is being accessed. Because the FlexBus module
149  * is one of the slaves connected to the crossbar switch, it is only accessible
150  * within a certain memory range. See the chip memory map for the applicable
151  * FlexBus "expansion" address range for which the chip-selects can be active. Set the
152  * CSARn and CSMRn registers appropriately before accessing this region.
153  */
154 /*@{*/
155 #define BP_FB_CSARn_BA       (16U)         /*!< Bit position for FB_CSARn_BA. */
156 #define BM_FB_CSARn_BA       (0xFFFF0000U) /*!< Bit mask for FB_CSARn_BA. */
157 #define BS_FB_CSARn_BA       (16U)         /*!< Bit field size in bits for FB_CSARn_BA. */
158
159 /*! @brief Read current value of the FB_CSARn_BA field. */
160 #define BR_FB_CSARn_BA(x, n) (HW_FB_CSARn(x, n).B.BA)
161
162 /*! @brief Format value for bitfield FB_CSARn_BA. */
163 #define BF_FB_CSARn_BA(v)    ((uint32_t)((uint32_t)(v) << BP_FB_CSARn_BA) & BM_FB_CSARn_BA)
164
165 /*! @brief Set the BA field to a new value. */
166 #define BW_FB_CSARn_BA(x, n, v) (HW_FB_CSARn_WR(x, n, (HW_FB_CSARn_RD(x, n) & ~BM_FB_CSARn_BA) | BF_FB_CSARn_BA(v)))
167 /*@}*/
168 /*******************************************************************************
169  * HW_FB_CSMRn - Chip Select Mask Register
170  ******************************************************************************/
171
172 /*!
173  * @brief HW_FB_CSMRn - Chip Select Mask Register (RW)
174  *
175  * Reset value: 0x00000000U
176  *
177  * Specifies the address mask and allowable access types for the associated
178  * chip-select.
179  */
180 typedef union _hw_fb_csmrn
181 {
182     uint32_t U;
183     struct _hw_fb_csmrn_bitfields
184     {
185         uint32_t V : 1;                /*!< [0] Valid */
186         uint32_t RESERVED0 : 7;        /*!< [7:1]  */
187         uint32_t WP : 1;               /*!< [8] Write Protect */
188         uint32_t RESERVED1 : 7;        /*!< [15:9]  */
189         uint32_t BAM : 16;             /*!< [31:16] Base Address Mask */
190     } B;
191 } hw_fb_csmrn_t;
192
193 /*!
194  * @name Constants and macros for entire FB_CSMRn register
195  */
196 /*@{*/
197 #define HW_FB_CSMRn_COUNT (6U)
198
199 #define HW_FB_CSMRn_ADDR(x, n)   ((x) + 0x4U + (0xCU * (n)))
200
201 #define HW_FB_CSMRn(x, n)        (*(__IO hw_fb_csmrn_t *) HW_FB_CSMRn_ADDR(x, n))
202 #define HW_FB_CSMRn_RD(x, n)     (HW_FB_CSMRn(x, n).U)
203 #define HW_FB_CSMRn_WR(x, n, v)  (HW_FB_CSMRn(x, n).U = (v))
204 #define HW_FB_CSMRn_SET(x, n, v) (HW_FB_CSMRn_WR(x, n, HW_FB_CSMRn_RD(x, n) |  (v)))
205 #define HW_FB_CSMRn_CLR(x, n, v) (HW_FB_CSMRn_WR(x, n, HW_FB_CSMRn_RD(x, n) & ~(v)))
206 #define HW_FB_CSMRn_TOG(x, n, v) (HW_FB_CSMRn_WR(x, n, HW_FB_CSMRn_RD(x, n) ^  (v)))
207 /*@}*/
208
209 /*
210  * Constants & macros for individual FB_CSMRn bitfields
211  */
212
213 /*!
214  * @name Register FB_CSMRn, field V[0] (RW)
215  *
216  * Specifies whether the corresponding CSAR, CSMR, and CSCR contents are valid.
217  * Programmed chip-selects do not assert until the V bit is 1b (except for
218  * FB_CS0, which acts as the global chip-select). At reset, FB_CS0 will fire for any
219  * access to the FlexBus memory region. CSMR0[V] must be set as part of the chip
220  * select initialization sequence to allow other chip selects to function as
221  * programmed.
222  *
223  * Values:
224  * - 0 - Chip-select is invalid.
225  * - 1 - Chip-select is valid.
226  */
227 /*@{*/
228 #define BP_FB_CSMRn_V        (0U)          /*!< Bit position for FB_CSMRn_V. */
229 #define BM_FB_CSMRn_V        (0x00000001U) /*!< Bit mask for FB_CSMRn_V. */
230 #define BS_FB_CSMRn_V        (1U)          /*!< Bit field size in bits for FB_CSMRn_V. */
231
232 /*! @brief Read current value of the FB_CSMRn_V field. */
233 #define BR_FB_CSMRn_V(x, n)  (BITBAND_ACCESS32(HW_FB_CSMRn_ADDR(x, n), BP_FB_CSMRn_V))
234
235 /*! @brief Format value for bitfield FB_CSMRn_V. */
236 #define BF_FB_CSMRn_V(v)     ((uint32_t)((uint32_t)(v) << BP_FB_CSMRn_V) & BM_FB_CSMRn_V)
237
238 /*! @brief Set the V field to a new value. */
239 #define BW_FB_CSMRn_V(x, n, v) (BITBAND_ACCESS32(HW_FB_CSMRn_ADDR(x, n), BP_FB_CSMRn_V) = (v))
240 /*@}*/
241
242 /*!
243  * @name Register FB_CSMRn, field WP[8] (RW)
244  *
245  * Controls write accesses to the address range in the corresponding CSAR.
246  *
247  * Values:
248  * - 0 - Write accesses are allowed.
249  * - 1 - Write accesses are not allowed. Attempting to write to the range of
250  *     addresses for which the WP bit is set results in a bus error termination of
251  *     the internal cycle and no external cycle.
252  */
253 /*@{*/
254 #define BP_FB_CSMRn_WP       (8U)          /*!< Bit position for FB_CSMRn_WP. */
255 #define BM_FB_CSMRn_WP       (0x00000100U) /*!< Bit mask for FB_CSMRn_WP. */
256 #define BS_FB_CSMRn_WP       (1U)          /*!< Bit field size in bits for FB_CSMRn_WP. */
257
258 /*! @brief Read current value of the FB_CSMRn_WP field. */
259 #define BR_FB_CSMRn_WP(x, n) (BITBAND_ACCESS32(HW_FB_CSMRn_ADDR(x, n), BP_FB_CSMRn_WP))
260
261 /*! @brief Format value for bitfield FB_CSMRn_WP. */
262 #define BF_FB_CSMRn_WP(v)    ((uint32_t)((uint32_t)(v) << BP_FB_CSMRn_WP) & BM_FB_CSMRn_WP)
263
264 /*! @brief Set the WP field to a new value. */
265 #define BW_FB_CSMRn_WP(x, n, v) (BITBAND_ACCESS32(HW_FB_CSMRn_ADDR(x, n), BP_FB_CSMRn_WP) = (v))
266 /*@}*/
267
268 /*!
269  * @name Register FB_CSMRn, field BAM[31:16] (RW)
270  *
271  * Defines the associated chip-select's block size by masking address bits.
272  *
273  * Values:
274  * - 0 - The corresponding address bit in CSAR is used in the chip-select decode.
275  * - 1 - The corresponding address bit in CSAR is a don't care in the
276  *     chip-select decode.
277  */
278 /*@{*/
279 #define BP_FB_CSMRn_BAM      (16U)         /*!< Bit position for FB_CSMRn_BAM. */
280 #define BM_FB_CSMRn_BAM      (0xFFFF0000U) /*!< Bit mask for FB_CSMRn_BAM. */
281 #define BS_FB_CSMRn_BAM      (16U)         /*!< Bit field size in bits for FB_CSMRn_BAM. */
282
283 /*! @brief Read current value of the FB_CSMRn_BAM field. */
284 #define BR_FB_CSMRn_BAM(x, n) (HW_FB_CSMRn(x, n).B.BAM)
285
286 /*! @brief Format value for bitfield FB_CSMRn_BAM. */
287 #define BF_FB_CSMRn_BAM(v)   ((uint32_t)((uint32_t)(v) << BP_FB_CSMRn_BAM) & BM_FB_CSMRn_BAM)
288
289 /*! @brief Set the BAM field to a new value. */
290 #define BW_FB_CSMRn_BAM(x, n, v) (HW_FB_CSMRn_WR(x, n, (HW_FB_CSMRn_RD(x, n) & ~BM_FB_CSMRn_BAM) | BF_FB_CSMRn_BAM(v)))
291 /*@}*/
292 /*******************************************************************************
293  * HW_FB_CSCRn - Chip Select Control Register
294  ******************************************************************************/
295
296 /*!
297  * @brief HW_FB_CSCRn - Chip Select Control Register (RW)
298  *
299  * Reset value: 0x003FFC00U
300  *
301  * Controls the auto-acknowledge, address setup and hold times, port size, burst
302  * capability, and number of wait states for the associated chip select. To
303  * support the global chip-select (FB_CS0), the CSCR0 reset values differ from the
304  * other CSCRs. The reset value of CSCR0 is as follows: Bits 31-24 are 0b Bit 23-3
305  * are chip-dependent Bits 3-0 are 0b See the chip configuration details for your
306  * particular chip for information on the exact CSCR0 reset value.
307  */
308 typedef union _hw_fb_cscrn
309 {
310     uint32_t U;
311     struct _hw_fb_cscrn_bitfields
312     {
313         uint32_t RESERVED0 : 3;        /*!< [2:0]  */
314         uint32_t BSTW : 1;             /*!< [3] Burst-Write Enable */
315         uint32_t BSTR : 1;             /*!< [4] Burst-Read Enable */
316         uint32_t BEM : 1;              /*!< [5] Byte-Enable Mode */
317         uint32_t PS : 2;               /*!< [7:6] Port Size */
318         uint32_t AA : 1;               /*!< [8] Auto-Acknowledge Enable */
319         uint32_t BLS : 1;              /*!< [9] Byte-Lane Shift */
320         uint32_t WS : 6;               /*!< [15:10] Wait States */
321         uint32_t WRAH : 2;             /*!< [17:16] Write Address Hold or Deselect */
322         uint32_t RDAH : 2;             /*!< [19:18] Read Address Hold or Deselect */
323         uint32_t ASET : 2;             /*!< [21:20] Address Setup */
324         uint32_t EXTS : 1;             /*!< [22]  */
325         uint32_t SWSEN : 1;            /*!< [23] Secondary Wait State Enable */
326         uint32_t RESERVED1 : 2;        /*!< [25:24]  */
327         uint32_t SWS : 6;              /*!< [31:26] Secondary Wait States */
328     } B;
329 } hw_fb_cscrn_t;
330
331 /*!
332  * @name Constants and macros for entire FB_CSCRn register
333  */
334 /*@{*/
335 #define HW_FB_CSCRn_COUNT (6U)
336
337 #define HW_FB_CSCRn_ADDR(x, n)   ((x) + 0x8U + (0xCU * (n)))
338
339 #define HW_FB_CSCRn(x, n)        (*(__IO hw_fb_cscrn_t *) HW_FB_CSCRn_ADDR(x, n))
340 #define HW_FB_CSCRn_RD(x, n)     (HW_FB_CSCRn(x, n).U)
341 #define HW_FB_CSCRn_WR(x, n, v)  (HW_FB_CSCRn(x, n).U = (v))
342 #define HW_FB_CSCRn_SET(x, n, v) (HW_FB_CSCRn_WR(x, n, HW_FB_CSCRn_RD(x, n) |  (v)))
343 #define HW_FB_CSCRn_CLR(x, n, v) (HW_FB_CSCRn_WR(x, n, HW_FB_CSCRn_RD(x, n) & ~(v)))
344 #define HW_FB_CSCRn_TOG(x, n, v) (HW_FB_CSCRn_WR(x, n, HW_FB_CSCRn_RD(x, n) ^  (v)))
345 /*@}*/
346
347 /*
348  * Constants & macros for individual FB_CSCRn bitfields
349  */
350
351 /*!
352  * @name Register FB_CSCRn, field BSTW[3] (RW)
353  *
354  * Specifies whether burst writes are enabled for memory associated with each
355  * chip select.
356  *
357  * Values:
358  * - 0 - Disabled. Data exceeding the specified port size is broken into
359  *     individual, port-sized, non-burst writes. For example, a 32-bit write to an 8-bit
360  *     port takes four byte writes.
361  * - 1 - Enabled. Enables burst write of data larger than the specified port
362  *     size, including 32-bit writes to 8- and 16-bit ports, 16-bit writes to 8-bit
363  *     ports, and line writes to 8-, 16-, and 32-bit ports.
364  */
365 /*@{*/
366 #define BP_FB_CSCRn_BSTW     (3U)          /*!< Bit position for FB_CSCRn_BSTW. */
367 #define BM_FB_CSCRn_BSTW     (0x00000008U) /*!< Bit mask for FB_CSCRn_BSTW. */
368 #define BS_FB_CSCRn_BSTW     (1U)          /*!< Bit field size in bits for FB_CSCRn_BSTW. */
369
370 /*! @brief Read current value of the FB_CSCRn_BSTW field. */
371 #define BR_FB_CSCRn_BSTW(x, n) (BITBAND_ACCESS32(HW_FB_CSCRn_ADDR(x, n), BP_FB_CSCRn_BSTW))
372
373 /*! @brief Format value for bitfield FB_CSCRn_BSTW. */
374 #define BF_FB_CSCRn_BSTW(v)  ((uint32_t)((uint32_t)(v) << BP_FB_CSCRn_BSTW) & BM_FB_CSCRn_BSTW)
375
376 /*! @brief Set the BSTW field to a new value. */
377 #define BW_FB_CSCRn_BSTW(x, n, v) (BITBAND_ACCESS32(HW_FB_CSCRn_ADDR(x, n), BP_FB_CSCRn_BSTW) = (v))
378 /*@}*/
379
380 /*!
381  * @name Register FB_CSCRn, field BSTR[4] (RW)
382  *
383  * Specifies whether burst reads are enabled for memory associated with each
384  * chip select.
385  *
386  * Values:
387  * - 0 - Disabled. Data exceeding the specified port size is broken into
388  *     individual, port-sized, non-burst reads. For example, a 32-bit read from an 8-bit
389  *     port is broken into four 8-bit reads.
390  * - 1 - Enabled. Enables data burst reads larger than the specified port size,
391  *     including 32-bit reads from 8- and 16-bit ports, 16-bit reads from 8-bit
392  *     ports, and line reads from 8-, 16-, and 32-bit ports.
393  */
394 /*@{*/
395 #define BP_FB_CSCRn_BSTR     (4U)          /*!< Bit position for FB_CSCRn_BSTR. */
396 #define BM_FB_CSCRn_BSTR     (0x00000010U) /*!< Bit mask for FB_CSCRn_BSTR. */
397 #define BS_FB_CSCRn_BSTR     (1U)          /*!< Bit field size in bits for FB_CSCRn_BSTR. */
398
399 /*! @brief Read current value of the FB_CSCRn_BSTR field. */
400 #define BR_FB_CSCRn_BSTR(x, n) (BITBAND_ACCESS32(HW_FB_CSCRn_ADDR(x, n), BP_FB_CSCRn_BSTR))
401
402 /*! @brief Format value for bitfield FB_CSCRn_BSTR. */
403 #define BF_FB_CSCRn_BSTR(v)  ((uint32_t)((uint32_t)(v) << BP_FB_CSCRn_BSTR) & BM_FB_CSCRn_BSTR)
404
405 /*! @brief Set the BSTR field to a new value. */
406 #define BW_FB_CSCRn_BSTR(x, n, v) (BITBAND_ACCESS32(HW_FB_CSCRn_ADDR(x, n), BP_FB_CSCRn_BSTR) = (v))
407 /*@}*/
408
409 /*!
410  * @name Register FB_CSCRn, field BEM[5] (RW)
411  *
412  * Specifies whether the corresponding FB_BE is asserted for read accesses.
413  * Certain memories have byte enables that must be asserted during reads and writes.
414  * Write 1b to the BEM bit in the relevant CSCR to provide the appropriate mode
415  * of byte enable support for these SRAMs.
416  *
417  * Values:
418  * - 0 - FB_BE is asserted for data write only.
419  * - 1 - FB_BE is asserted for data read and write accesses.
420  */
421 /*@{*/
422 #define BP_FB_CSCRn_BEM      (5U)          /*!< Bit position for FB_CSCRn_BEM. */
423 #define BM_FB_CSCRn_BEM      (0x00000020U) /*!< Bit mask for FB_CSCRn_BEM. */
424 #define BS_FB_CSCRn_BEM      (1U)          /*!< Bit field size in bits for FB_CSCRn_BEM. */
425
426 /*! @brief Read current value of the FB_CSCRn_BEM field. */
427 #define BR_FB_CSCRn_BEM(x, n) (BITBAND_ACCESS32(HW_FB_CSCRn_ADDR(x, n), BP_FB_CSCRn_BEM))
428
429 /*! @brief Format value for bitfield FB_CSCRn_BEM. */
430 #define BF_FB_CSCRn_BEM(v)   ((uint32_t)((uint32_t)(v) << BP_FB_CSCRn_BEM) & BM_FB_CSCRn_BEM)
431
432 /*! @brief Set the BEM field to a new value. */
433 #define BW_FB_CSCRn_BEM(x, n, v) (BITBAND_ACCESS32(HW_FB_CSCRn_ADDR(x, n), BP_FB_CSCRn_BEM) = (v))
434 /*@}*/
435
436 /*!
437  * @name Register FB_CSCRn, field PS[7:6] (RW)
438  *
439  * Specifies the data port width of the associated chip-select, and determines
440  * where data is driven during write cycles and where data is sampled during read
441  * cycles.
442  *
443  * Values:
444  * - 00 - 32-bit port size. Valid data is sampled and driven on FB_D[31:0].
445  * - 01 - 8-bit port size. Valid data is sampled and driven on FB_D[31:24] when
446  *     BLS is 0b, or FB_D[7:0] when BLS is 1b.
447  */
448 /*@{*/
449 #define BP_FB_CSCRn_PS       (6U)          /*!< Bit position for FB_CSCRn_PS. */
450 #define BM_FB_CSCRn_PS       (0x000000C0U) /*!< Bit mask for FB_CSCRn_PS. */
451 #define BS_FB_CSCRn_PS       (2U)          /*!< Bit field size in bits for FB_CSCRn_PS. */
452
453 /*! @brief Read current value of the FB_CSCRn_PS field. */
454 #define BR_FB_CSCRn_PS(x, n) (HW_FB_CSCRn(x, n).B.PS)
455
456 /*! @brief Format value for bitfield FB_CSCRn_PS. */
457 #define BF_FB_CSCRn_PS(v)    ((uint32_t)((uint32_t)(v) << BP_FB_CSCRn_PS) & BM_FB_CSCRn_PS)
458
459 /*! @brief Set the PS field to a new value. */
460 #define BW_FB_CSCRn_PS(x, n, v) (HW_FB_CSCRn_WR(x, n, (HW_FB_CSCRn_RD(x, n) & ~BM_FB_CSCRn_PS) | BF_FB_CSCRn_PS(v)))
461 /*@}*/
462
463 /*!
464  * @name Register FB_CSCRn, field AA[8] (RW)
465  *
466  * Asserts the internal transfer acknowledge for accesses specified by the
467  * chip-select address. If AA is 1b for a corresponding FB_CSn and the external system
468  * asserts an external FB_TA before the wait-state countdown asserts the
469  * internal FB_TA, the cycle is terminated. Burst cycles increment the address bus
470  * between each internal termination. This field must be 1b if CSPMCR disables FB_TA.
471  *
472  * Values:
473  * - 0 - Disabled. No internal transfer acknowledge is asserted and the cycle is
474  *     terminated externally.
475  * - 1 - Enabled. Internal transfer acknowledge is asserted as specified by WS.
476  */
477 /*@{*/
478 #define BP_FB_CSCRn_AA       (8U)          /*!< Bit position for FB_CSCRn_AA. */
479 #define BM_FB_CSCRn_AA       (0x00000100U) /*!< Bit mask for FB_CSCRn_AA. */
480 #define BS_FB_CSCRn_AA       (1U)          /*!< Bit field size in bits for FB_CSCRn_AA. */
481
482 /*! @brief Read current value of the FB_CSCRn_AA field. */
483 #define BR_FB_CSCRn_AA(x, n) (BITBAND_ACCESS32(HW_FB_CSCRn_ADDR(x, n), BP_FB_CSCRn_AA))
484
485 /*! @brief Format value for bitfield FB_CSCRn_AA. */
486 #define BF_FB_CSCRn_AA(v)    ((uint32_t)((uint32_t)(v) << BP_FB_CSCRn_AA) & BM_FB_CSCRn_AA)
487
488 /*! @brief Set the AA field to a new value. */
489 #define BW_FB_CSCRn_AA(x, n, v) (BITBAND_ACCESS32(HW_FB_CSCRn_ADDR(x, n), BP_FB_CSCRn_AA) = (v))
490 /*@}*/
491
492 /*!
493  * @name Register FB_CSCRn, field BLS[9] (RW)
494  *
495  * Specifies if data on FB_AD appears left-aligned or right-aligned during the
496  * data phase of a FlexBus access.
497  *
498  * Values:
499  * - 0 - Not shifted. Data is left-aligned on FB_AD.
500  * - 1 - Shifted. Data is right-aligned on FB_AD.
501  */
502 /*@{*/
503 #define BP_FB_CSCRn_BLS      (9U)          /*!< Bit position for FB_CSCRn_BLS. */
504 #define BM_FB_CSCRn_BLS      (0x00000200U) /*!< Bit mask for FB_CSCRn_BLS. */
505 #define BS_FB_CSCRn_BLS      (1U)          /*!< Bit field size in bits for FB_CSCRn_BLS. */
506
507 /*! @brief Read current value of the FB_CSCRn_BLS field. */
508 #define BR_FB_CSCRn_BLS(x, n) (BITBAND_ACCESS32(HW_FB_CSCRn_ADDR(x, n), BP_FB_CSCRn_BLS))
509
510 /*! @brief Format value for bitfield FB_CSCRn_BLS. */
511 #define BF_FB_CSCRn_BLS(v)   ((uint32_t)((uint32_t)(v) << BP_FB_CSCRn_BLS) & BM_FB_CSCRn_BLS)
512
513 /*! @brief Set the BLS field to a new value. */
514 #define BW_FB_CSCRn_BLS(x, n, v) (BITBAND_ACCESS32(HW_FB_CSCRn_ADDR(x, n), BP_FB_CSCRn_BLS) = (v))
515 /*@}*/
516
517 /*!
518  * @name Register FB_CSCRn, field WS[15:10] (RW)
519  *
520  * Specifies the number of wait states inserted after FlexBus asserts the
521  * associated chip-select and before an internal transfer acknowledge is generated (WS
522  * = 00h inserts 0 wait states, ..., WS = 3Fh inserts 63 wait states).
523  */
524 /*@{*/
525 #define BP_FB_CSCRn_WS       (10U)         /*!< Bit position for FB_CSCRn_WS. */
526 #define BM_FB_CSCRn_WS       (0x0000FC00U) /*!< Bit mask for FB_CSCRn_WS. */
527 #define BS_FB_CSCRn_WS       (6U)          /*!< Bit field size in bits for FB_CSCRn_WS. */
528
529 /*! @brief Read current value of the FB_CSCRn_WS field. */
530 #define BR_FB_CSCRn_WS(x, n) (HW_FB_CSCRn(x, n).B.WS)
531
532 /*! @brief Format value for bitfield FB_CSCRn_WS. */
533 #define BF_FB_CSCRn_WS(v)    ((uint32_t)((uint32_t)(v) << BP_FB_CSCRn_WS) & BM_FB_CSCRn_WS)
534
535 /*! @brief Set the WS field to a new value. */
536 #define BW_FB_CSCRn_WS(x, n, v) (HW_FB_CSCRn_WR(x, n, (HW_FB_CSCRn_RD(x, n) & ~BM_FB_CSCRn_WS) | BF_FB_CSCRn_WS(v)))
537 /*@}*/
538
539 /*!
540  * @name Register FB_CSCRn, field WRAH[17:16] (RW)
541  *
542  * Controls the address, data, and attribute hold time after the termination of
543  * a write cycle that hits in the associated chip-select's address space. The
544  * hold time applies only at the end of a transfer. Therefore, during a burst
545  * transfer or a transfer to a port size smaller than the transfer size, the hold time
546  * is only added after the last bus cycle.
547  *
548  * Values:
549  * - 00 - 1 cycle (default for all but FB_CS0 )
550  * - 01 - 2 cycles
551  * - 10 - 3 cycles
552  * - 11 - 4 cycles (default for FB_CS0 )
553  */
554 /*@{*/
555 #define BP_FB_CSCRn_WRAH     (16U)         /*!< Bit position for FB_CSCRn_WRAH. */
556 #define BM_FB_CSCRn_WRAH     (0x00030000U) /*!< Bit mask for FB_CSCRn_WRAH. */
557 #define BS_FB_CSCRn_WRAH     (2U)          /*!< Bit field size in bits for FB_CSCRn_WRAH. */
558
559 /*! @brief Read current value of the FB_CSCRn_WRAH field. */
560 #define BR_FB_CSCRn_WRAH(x, n) (HW_FB_CSCRn(x, n).B.WRAH)
561
562 /*! @brief Format value for bitfield FB_CSCRn_WRAH. */
563 #define BF_FB_CSCRn_WRAH(v)  ((uint32_t)((uint32_t)(v) << BP_FB_CSCRn_WRAH) & BM_FB_CSCRn_WRAH)
564
565 /*! @brief Set the WRAH field to a new value. */
566 #define BW_FB_CSCRn_WRAH(x, n, v) (HW_FB_CSCRn_WR(x, n, (HW_FB_CSCRn_RD(x, n) & ~BM_FB_CSCRn_WRAH) | BF_FB_CSCRn_WRAH(v)))
567 /*@}*/
568
569 /*!
570  * @name Register FB_CSCRn, field RDAH[19:18] (RW)
571  *
572  * Controls the address and attribute hold time after the termination during a
573  * read cycle that hits in the associated chip-select's address space. The hold
574  * time applies only at the end of a transfer. Therefore, during a burst transfer
575  * or a transfer to a port size smaller than the transfer size, the hold time is
576  * only added after the last bus cycle. The number of cycles the address and
577  * attributes are held after FB_CSn deassertion depends on the value of the AA bit.
578  *
579  * Values:
580  * - 00 - When AA is 0b, 1 cycle. When AA is 1b, 0 cycles.
581  * - 01 - When AA is 0b, 2 cycles. When AA is 1b, 1 cycle.
582  * - 10 - When AA is 0b, 3 cycles. When AA is 1b, 2 cycles.
583  * - 11 - When AA is 0b, 4 cycles. When AA is 1b, 3 cycles.
584  */
585 /*@{*/
586 #define BP_FB_CSCRn_RDAH     (18U)         /*!< Bit position for FB_CSCRn_RDAH. */
587 #define BM_FB_CSCRn_RDAH     (0x000C0000U) /*!< Bit mask for FB_CSCRn_RDAH. */
588 #define BS_FB_CSCRn_RDAH     (2U)          /*!< Bit field size in bits for FB_CSCRn_RDAH. */
589
590 /*! @brief Read current value of the FB_CSCRn_RDAH field. */
591 #define BR_FB_CSCRn_RDAH(x, n) (HW_FB_CSCRn(x, n).B.RDAH)
592
593 /*! @brief Format value for bitfield FB_CSCRn_RDAH. */
594 #define BF_FB_CSCRn_RDAH(v)  ((uint32_t)((uint32_t)(v) << BP_FB_CSCRn_RDAH) & BM_FB_CSCRn_RDAH)
595
596 /*! @brief Set the RDAH field to a new value. */
597 #define BW_FB_CSCRn_RDAH(x, n, v) (HW_FB_CSCRn_WR(x, n, (HW_FB_CSCRn_RD(x, n) & ~BM_FB_CSCRn_RDAH) | BF_FB_CSCRn_RDAH(v)))
598 /*@}*/
599
600 /*!
601  * @name Register FB_CSCRn, field ASET[21:20] (RW)
602  *
603  * Controls when the chip-select is asserted with respect to assertion of a
604  * valid address and attributes.
605  *
606  * Values:
607  * - 00 - Assert FB_CSn on the first rising clock edge after the address is
608  *     asserted (default for all but FB_CS0 ).
609  * - 01 - Assert FB_CSn on the second rising clock edge after the address is
610  *     asserted.
611  * - 10 - Assert FB_CSn on the third rising clock edge after the address is
612  *     asserted.
613  * - 11 - Assert FB_CSn on the fourth rising clock edge after the address is
614  *     asserted (default for FB_CS0 ).
615  */
616 /*@{*/
617 #define BP_FB_CSCRn_ASET     (20U)         /*!< Bit position for FB_CSCRn_ASET. */
618 #define BM_FB_CSCRn_ASET     (0x00300000U) /*!< Bit mask for FB_CSCRn_ASET. */
619 #define BS_FB_CSCRn_ASET     (2U)          /*!< Bit field size in bits for FB_CSCRn_ASET. */
620
621 /*! @brief Read current value of the FB_CSCRn_ASET field. */
622 #define BR_FB_CSCRn_ASET(x, n) (HW_FB_CSCRn(x, n).B.ASET)
623
624 /*! @brief Format value for bitfield FB_CSCRn_ASET. */
625 #define BF_FB_CSCRn_ASET(v)  ((uint32_t)((uint32_t)(v) << BP_FB_CSCRn_ASET) & BM_FB_CSCRn_ASET)
626
627 /*! @brief Set the ASET field to a new value. */
628 #define BW_FB_CSCRn_ASET(x, n, v) (HW_FB_CSCRn_WR(x, n, (HW_FB_CSCRn_RD(x, n) & ~BM_FB_CSCRn_ASET) | BF_FB_CSCRn_ASET(v)))
629 /*@}*/
630
631 /*!
632  * @name Register FB_CSCRn, field EXTS[22] (RW)
633  *
634  * Extended Transfer Start/Extended Address Latch Enable Controls how long FB_TS
635  * /FB_ALE is asserted.
636  *
637  * Values:
638  * - 0 - Disabled. FB_TS /FB_ALE asserts for one bus clock cycle.
639  * - 1 - Enabled. FB_TS /FB_ALE remains asserted until the first positive clock
640  *     edge after FB_CSn asserts.
641  */
642 /*@{*/
643 #define BP_FB_CSCRn_EXTS     (22U)         /*!< Bit position for FB_CSCRn_EXTS. */
644 #define BM_FB_CSCRn_EXTS     (0x00400000U) /*!< Bit mask for FB_CSCRn_EXTS. */
645 #define BS_FB_CSCRn_EXTS     (1U)          /*!< Bit field size in bits for FB_CSCRn_EXTS. */
646
647 /*! @brief Read current value of the FB_CSCRn_EXTS field. */
648 #define BR_FB_CSCRn_EXTS(x, n) (BITBAND_ACCESS32(HW_FB_CSCRn_ADDR(x, n), BP_FB_CSCRn_EXTS))
649
650 /*! @brief Format value for bitfield FB_CSCRn_EXTS. */
651 #define BF_FB_CSCRn_EXTS(v)  ((uint32_t)((uint32_t)(v) << BP_FB_CSCRn_EXTS) & BM_FB_CSCRn_EXTS)
652
653 /*! @brief Set the EXTS field to a new value. */
654 #define BW_FB_CSCRn_EXTS(x, n, v) (BITBAND_ACCESS32(HW_FB_CSCRn_ADDR(x, n), BP_FB_CSCRn_EXTS) = (v))
655 /*@}*/
656
657 /*!
658  * @name Register FB_CSCRn, field SWSEN[23] (RW)
659  *
660  * Values:
661  * - 0 - Disabled. A number of wait states (specified by WS) are inserted before
662  *     an internal transfer acknowledge is generated for all transfers.
663  * - 1 - Enabled. A number of wait states (specified by SWS) are inserted before
664  *     an internal transfer acknowledge is generated for burst transfer
665  *     secondary terminations.
666  */
667 /*@{*/
668 #define BP_FB_CSCRn_SWSEN    (23U)         /*!< Bit position for FB_CSCRn_SWSEN. */
669 #define BM_FB_CSCRn_SWSEN    (0x00800000U) /*!< Bit mask for FB_CSCRn_SWSEN. */
670 #define BS_FB_CSCRn_SWSEN    (1U)          /*!< Bit field size in bits for FB_CSCRn_SWSEN. */
671
672 /*! @brief Read current value of the FB_CSCRn_SWSEN field. */
673 #define BR_FB_CSCRn_SWSEN(x, n) (BITBAND_ACCESS32(HW_FB_CSCRn_ADDR(x, n), BP_FB_CSCRn_SWSEN))
674
675 /*! @brief Format value for bitfield FB_CSCRn_SWSEN. */
676 #define BF_FB_CSCRn_SWSEN(v) ((uint32_t)((uint32_t)(v) << BP_FB_CSCRn_SWSEN) & BM_FB_CSCRn_SWSEN)
677
678 /*! @brief Set the SWSEN field to a new value. */
679 #define BW_FB_CSCRn_SWSEN(x, n, v) (BITBAND_ACCESS32(HW_FB_CSCRn_ADDR(x, n), BP_FB_CSCRn_SWSEN) = (v))
680 /*@}*/
681
682 /*!
683  * @name Register FB_CSCRn, field SWS[31:26] (RW)
684  *
685  * Used only when the SWSEN bit is 1b. Specifies the number of wait states
686  * inserted before an internal transfer acknowledge is generated for a burst transfer
687  * (except for the first termination, which is controlled by WS).
688  */
689 /*@{*/
690 #define BP_FB_CSCRn_SWS      (26U)         /*!< Bit position for FB_CSCRn_SWS. */
691 #define BM_FB_CSCRn_SWS      (0xFC000000U) /*!< Bit mask for FB_CSCRn_SWS. */
692 #define BS_FB_CSCRn_SWS      (6U)          /*!< Bit field size in bits for FB_CSCRn_SWS. */
693
694 /*! @brief Read current value of the FB_CSCRn_SWS field. */
695 #define BR_FB_CSCRn_SWS(x, n) (HW_FB_CSCRn(x, n).B.SWS)
696
697 /*! @brief Format value for bitfield FB_CSCRn_SWS. */
698 #define BF_FB_CSCRn_SWS(v)   ((uint32_t)((uint32_t)(v) << BP_FB_CSCRn_SWS) & BM_FB_CSCRn_SWS)
699
700 /*! @brief Set the SWS field to a new value. */
701 #define BW_FB_CSCRn_SWS(x, n, v) (HW_FB_CSCRn_WR(x, n, (HW_FB_CSCRn_RD(x, n) & ~BM_FB_CSCRn_SWS) | BF_FB_CSCRn_SWS(v)))
702 /*@}*/
703
704 /*******************************************************************************
705  * HW_FB_CSPMCR - Chip Select port Multiplexing Control Register
706  ******************************************************************************/
707
708 /*!
709  * @brief HW_FB_CSPMCR - Chip Select port Multiplexing Control Register (RW)
710  *
711  * Reset value: 0x00000000U
712  *
713  * Controls the multiplexing of the FlexBus signals. A bus error occurs when you
714  * do any of the following: Write to a reserved address Write to a reserved
715  * field in this register, or Access this register using a size other than 32 bits.
716  */
717 typedef union _hw_fb_cspmcr
718 {
719     uint32_t U;
720     struct _hw_fb_cspmcr_bitfields
721     {
722         uint32_t RESERVED0 : 12;       /*!< [11:0]  */
723         uint32_t GROUP5 : 4;           /*!< [15:12] FlexBus Signal Group 5 Multiplex
724                                         * control */
725         uint32_t GROUP4 : 4;           /*!< [19:16] FlexBus Signal Group 4 Multiplex
726                                         * control */
727         uint32_t GROUP3 : 4;           /*!< [23:20] FlexBus Signal Group 3 Multiplex
728                                         * control */
729         uint32_t GROUP2 : 4;           /*!< [27:24] FlexBus Signal Group 2 Multiplex
730                                         * control */
731         uint32_t GROUP1 : 4;           /*!< [31:28] FlexBus Signal Group 1 Multiplex
732                                         * control */
733     } B;
734 } hw_fb_cspmcr_t;
735
736 /*!
737  * @name Constants and macros for entire FB_CSPMCR register
738  */
739 /*@{*/
740 #define HW_FB_CSPMCR_ADDR(x)     ((x) + 0x60U)
741
742 #define HW_FB_CSPMCR(x)          (*(__IO hw_fb_cspmcr_t *) HW_FB_CSPMCR_ADDR(x))
743 #define HW_FB_CSPMCR_RD(x)       (HW_FB_CSPMCR(x).U)
744 #define HW_FB_CSPMCR_WR(x, v)    (HW_FB_CSPMCR(x).U = (v))
745 #define HW_FB_CSPMCR_SET(x, v)   (HW_FB_CSPMCR_WR(x, HW_FB_CSPMCR_RD(x) |  (v)))
746 #define HW_FB_CSPMCR_CLR(x, v)   (HW_FB_CSPMCR_WR(x, HW_FB_CSPMCR_RD(x) & ~(v)))
747 #define HW_FB_CSPMCR_TOG(x, v)   (HW_FB_CSPMCR_WR(x, HW_FB_CSPMCR_RD(x) ^  (v)))
748 /*@}*/
749
750 /*
751  * Constants & macros for individual FB_CSPMCR bitfields
752  */
753
754 /*!
755  * @name Register FB_CSPMCR, field GROUP5[15:12] (RW)
756  *
757  * Controls the multiplexing of the FB_TA , FB_CS3 , and FB_BE_7_0 signals. When
758  * GROUP5 is not 0000b, you must write 1b to the CSCR[AA] bit. Otherwise, the
759  * bus hangs during a transfer.
760  *
761  * Values:
762  * - 0000 - FB_TA
763  * - 0001 - FB_CS3 . You must also write 1b to CSCR[AA].
764  * - 0010 - FB_BE_7_0 . You must also write 1b to CSCR[AA].
765  */
766 /*@{*/
767 #define BP_FB_CSPMCR_GROUP5  (12U)         /*!< Bit position for FB_CSPMCR_GROUP5. */
768 #define BM_FB_CSPMCR_GROUP5  (0x0000F000U) /*!< Bit mask for FB_CSPMCR_GROUP5. */
769 #define BS_FB_CSPMCR_GROUP5  (4U)          /*!< Bit field size in bits for FB_CSPMCR_GROUP5. */
770
771 /*! @brief Read current value of the FB_CSPMCR_GROUP5 field. */
772 #define BR_FB_CSPMCR_GROUP5(x) (HW_FB_CSPMCR(x).B.GROUP5)
773
774 /*! @brief Format value for bitfield FB_CSPMCR_GROUP5. */
775 #define BF_FB_CSPMCR_GROUP5(v) ((uint32_t)((uint32_t)(v) << BP_FB_CSPMCR_GROUP5) & BM_FB_CSPMCR_GROUP5)
776
777 /*! @brief Set the GROUP5 field to a new value. */
778 #define BW_FB_CSPMCR_GROUP5(x, v) (HW_FB_CSPMCR_WR(x, (HW_FB_CSPMCR_RD(x) & ~BM_FB_CSPMCR_GROUP5) | BF_FB_CSPMCR_GROUP5(v)))
779 /*@}*/
780
781 /*!
782  * @name Register FB_CSPMCR, field GROUP4[19:16] (RW)
783  *
784  * Controls the multiplexing of the FB_TBST , FB_CS2 , and FB_BE_15_8 signals.
785  *
786  * Values:
787  * - 0000 - FB_TBST
788  * - 0001 - FB_CS2
789  * - 0010 - FB_BE_15_8
790  */
791 /*@{*/
792 #define BP_FB_CSPMCR_GROUP4  (16U)         /*!< Bit position for FB_CSPMCR_GROUP4. */
793 #define BM_FB_CSPMCR_GROUP4  (0x000F0000U) /*!< Bit mask for FB_CSPMCR_GROUP4. */
794 #define BS_FB_CSPMCR_GROUP4  (4U)          /*!< Bit field size in bits for FB_CSPMCR_GROUP4. */
795
796 /*! @brief Read current value of the FB_CSPMCR_GROUP4 field. */
797 #define BR_FB_CSPMCR_GROUP4(x) (HW_FB_CSPMCR(x).B.GROUP4)
798
799 /*! @brief Format value for bitfield FB_CSPMCR_GROUP4. */
800 #define BF_FB_CSPMCR_GROUP4(v) ((uint32_t)((uint32_t)(v) << BP_FB_CSPMCR_GROUP4) & BM_FB_CSPMCR_GROUP4)
801
802 /*! @brief Set the GROUP4 field to a new value. */
803 #define BW_FB_CSPMCR_GROUP4(x, v) (HW_FB_CSPMCR_WR(x, (HW_FB_CSPMCR_RD(x) & ~BM_FB_CSPMCR_GROUP4) | BF_FB_CSPMCR_GROUP4(v)))
804 /*@}*/
805
806 /*!
807  * @name Register FB_CSPMCR, field GROUP3[23:20] (RW)
808  *
809  * Controls the multiplexing of the FB_CS5 , FB_TSIZ1, and FB_BE_23_16 signals.
810  *
811  * Values:
812  * - 0000 - FB_CS5
813  * - 0001 - FB_TSIZ1
814  * - 0010 - FB_BE_23_16
815  */
816 /*@{*/
817 #define BP_FB_CSPMCR_GROUP3  (20U)         /*!< Bit position for FB_CSPMCR_GROUP3. */
818 #define BM_FB_CSPMCR_GROUP3  (0x00F00000U) /*!< Bit mask for FB_CSPMCR_GROUP3. */
819 #define BS_FB_CSPMCR_GROUP3  (4U)          /*!< Bit field size in bits for FB_CSPMCR_GROUP3. */
820
821 /*! @brief Read current value of the FB_CSPMCR_GROUP3 field. */
822 #define BR_FB_CSPMCR_GROUP3(x) (HW_FB_CSPMCR(x).B.GROUP3)
823
824 /*! @brief Format value for bitfield FB_CSPMCR_GROUP3. */
825 #define BF_FB_CSPMCR_GROUP3(v) ((uint32_t)((uint32_t)(v) << BP_FB_CSPMCR_GROUP3) & BM_FB_CSPMCR_GROUP3)
826
827 /*! @brief Set the GROUP3 field to a new value. */
828 #define BW_FB_CSPMCR_GROUP3(x, v) (HW_FB_CSPMCR_WR(x, (HW_FB_CSPMCR_RD(x) & ~BM_FB_CSPMCR_GROUP3) | BF_FB_CSPMCR_GROUP3(v)))
829 /*@}*/
830
831 /*!
832  * @name Register FB_CSPMCR, field GROUP2[27:24] (RW)
833  *
834  * Controls the multiplexing of the FB_CS4 , FB_TSIZ0, and FB_BE_31_24 signals.
835  *
836  * Values:
837  * - 0000 - FB_CS4
838  * - 0001 - FB_TSIZ0
839  * - 0010 - FB_BE_31_24
840  */
841 /*@{*/
842 #define BP_FB_CSPMCR_GROUP2  (24U)         /*!< Bit position for FB_CSPMCR_GROUP2. */
843 #define BM_FB_CSPMCR_GROUP2  (0x0F000000U) /*!< Bit mask for FB_CSPMCR_GROUP2. */
844 #define BS_FB_CSPMCR_GROUP2  (4U)          /*!< Bit field size in bits for FB_CSPMCR_GROUP2. */
845
846 /*! @brief Read current value of the FB_CSPMCR_GROUP2 field. */
847 #define BR_FB_CSPMCR_GROUP2(x) (HW_FB_CSPMCR(x).B.GROUP2)
848
849 /*! @brief Format value for bitfield FB_CSPMCR_GROUP2. */
850 #define BF_FB_CSPMCR_GROUP2(v) ((uint32_t)((uint32_t)(v) << BP_FB_CSPMCR_GROUP2) & BM_FB_CSPMCR_GROUP2)
851
852 /*! @brief Set the GROUP2 field to a new value. */
853 #define BW_FB_CSPMCR_GROUP2(x, v) (HW_FB_CSPMCR_WR(x, (HW_FB_CSPMCR_RD(x) & ~BM_FB_CSPMCR_GROUP2) | BF_FB_CSPMCR_GROUP2(v)))
854 /*@}*/
855
856 /*!
857  * @name Register FB_CSPMCR, field GROUP1[31:28] (RW)
858  *
859  * Controls the multiplexing of the FB_ALE, FB_CS1 , and FB_TS signals.
860  *
861  * Values:
862  * - 0000 - FB_ALE
863  * - 0001 - FB_CS1
864  * - 0010 - FB_TS
865  */
866 /*@{*/
867 #define BP_FB_CSPMCR_GROUP1  (28U)         /*!< Bit position for FB_CSPMCR_GROUP1. */
868 #define BM_FB_CSPMCR_GROUP1  (0xF0000000U) /*!< Bit mask for FB_CSPMCR_GROUP1. */
869 #define BS_FB_CSPMCR_GROUP1  (4U)          /*!< Bit field size in bits for FB_CSPMCR_GROUP1. */
870
871 /*! @brief Read current value of the FB_CSPMCR_GROUP1 field. */
872 #define BR_FB_CSPMCR_GROUP1(x) (HW_FB_CSPMCR(x).B.GROUP1)
873
874 /*! @brief Format value for bitfield FB_CSPMCR_GROUP1. */
875 #define BF_FB_CSPMCR_GROUP1(v) ((uint32_t)((uint32_t)(v) << BP_FB_CSPMCR_GROUP1) & BM_FB_CSPMCR_GROUP1)
876
877 /*! @brief Set the GROUP1 field to a new value. */
878 #define BW_FB_CSPMCR_GROUP1(x, v) (HW_FB_CSPMCR_WR(x, (HW_FB_CSPMCR_RD(x) & ~BM_FB_CSPMCR_GROUP1) | BF_FB_CSPMCR_GROUP1(v)))
879 /*@}*/
880
881 /*******************************************************************************
882  * hw_fb_t - module struct
883  ******************************************************************************/
884 /*!
885  * @brief All FB module registers.
886  */
887 #pragma pack(1)
888 typedef struct _hw_fb
889 {
890     struct {
891         __IO hw_fb_csarn_t CSARn;          /*!< [0x0] Chip Select Address Register */
892         __IO hw_fb_csmrn_t CSMRn;          /*!< [0x4] Chip Select Mask Register */
893         __IO hw_fb_cscrn_t CSCRn;          /*!< [0x8] Chip Select Control Register */
894     } CS[6];
895     uint8_t _reserved0[24];
896     __IO hw_fb_cspmcr_t CSPMCR;            /*!< [0x60] Chip Select port Multiplexing Control Register */
897 } hw_fb_t;
898 #pragma pack()
899
900 /*! @brief Macro to access all FB registers. */
901 /*! @param x FB module instance base address. */
902 /*! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
903  *     use the '&' operator, like <code>&HW_FB(FB_BASE)</code>. */
904 #define HW_FB(x)       (*(hw_fb_t *)(x))
905
906 #endif /* __HW_FB_REGISTERS_H__ */
907 /* EOF */