MAX32660 Peripheral Driver API
Peripheral Driver API for the MAX32660
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules
gcr_regs.h
Go to the documentation of this file.
1
8/******************************************************************************
9 *
10 * Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
11 * Analog Devices, Inc.),
12 * Copyright (C) 2023-2024 Analog Devices, Inc.
13 *
14 * Licensed under the Apache License, Version 2.0 (the "License");
15 * you may not use this file except in compliance with the License.
16 * You may obtain a copy of the License at
17 *
18 * http://www.apache.org/licenses/LICENSE-2.0
19 *
20 * Unless required by applicable law or agreed to in writing, software
21 * distributed under the License is distributed on an "AS IS" BASIS,
22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 * See the License for the specific language governing permissions and
24 * limitations under the License.
25 *
26 ******************************************************************************/
27
28#ifndef LIBRARIES_CMSIS_DEVICE_MAXIM_MAX32660_INCLUDE_GCR_REGS_H_
29#define LIBRARIES_CMSIS_DEVICE_MAXIM_MAX32660_INCLUDE_GCR_REGS_H_
30
31/* **** Includes **** */
32#include <stdint.h>
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38#if defined (__ICCARM__)
39 #pragma system_include
40#endif
41
42#if defined (__CC_ARM)
43 #pragma anon_unions
44#endif
46/*
47 If types are not defined elsewhere (CMSIS) define them here
48*/
49#ifndef __IO
50#define __IO volatile
51#endif
52#ifndef __I
53#define __I volatile const
54#endif
55#ifndef __O
56#define __O volatile
57#endif
58#ifndef __R
59#define __R volatile const
60#endif
62
63/* **** Definitions **** */
64
76typedef struct {
77 __IO uint32_t scon;
78 __IO uint32_t rst0;
79 __IO uint32_t clk_ctrl;
80 __IO uint32_t pm;
81 __R uint32_t rsv_0x10_0x23[5];
82 __IO uint32_t pclk_dis0;
83 __IO uint32_t mem_ctrl;
84 __IO uint32_t mem_zctrl;
85 __R uint32_t rsv_0x30_0x3f[4];
86 __IO uint32_t sys_stat;
87 __IO uint32_t rst1;
88 __IO uint32_t pclk_dis1;
89 __IO uint32_t evten;
90 __I uint32_t rev;
91 __IO uint32_t sys_ie;
93
94/* Register offsets for module GCR */
101#define MXC_R_GCR_SCON ((uint32_t)0x00000000UL)
102#define MXC_R_GCR_RST0 ((uint32_t)0x00000004UL)
103#define MXC_R_GCR_CLK_CTRL ((uint32_t)0x00000008UL)
104#define MXC_R_GCR_PM ((uint32_t)0x0000000CUL)
105#define MXC_R_GCR_PCLK_DIS0 ((uint32_t)0x00000024UL)
106#define MXC_R_GCR_MEM_CTRL ((uint32_t)0x00000028UL)
107#define MXC_R_GCR_MEM_ZCTRL ((uint32_t)0x0000002CUL)
108#define MXC_R_GCR_SYS_STAT ((uint32_t)0x00000040UL)
109#define MXC_R_GCR_RST1 ((uint32_t)0x00000044UL)
110#define MXC_R_GCR_PCLK_DIS1 ((uint32_t)0x00000048UL)
111#define MXC_R_GCR_EVTEN ((uint32_t)0x0000004CUL)
112#define MXC_R_GCR_REV ((uint32_t)0x00000050UL)
113#define MXC_R_GCR_SYS_IE ((uint32_t)0x00000054UL)
122#define MXC_F_GCR_SCON_FLASH_PAGE_FLIP_POS 4
123#define MXC_F_GCR_SCON_FLASH_PAGE_FLIP ((uint32_t)(0x1UL << MXC_F_GCR_SCON_FLASH_PAGE_FLIP_POS))
125#define MXC_F_GCR_SCON_FPU_DIS_POS 5
126#define MXC_F_GCR_SCON_FPU_DIS ((uint32_t)(0x1UL << MXC_F_GCR_SCON_FPU_DIS_POS))
128#define MXC_F_GCR_SCON_ICC0_FLUSH_POS 6
129#define MXC_F_GCR_SCON_ICC0_FLUSH ((uint32_t)(0x1UL << MXC_F_GCR_SCON_ICC0_FLUSH_POS))
131#define MXC_F_GCR_SCON_SWD_DIS_POS 14
132#define MXC_F_GCR_SCON_SWD_DIS ((uint32_t)(0x1UL << MXC_F_GCR_SCON_SWD_DIS_POS))
142#define MXC_F_GCR_RST0_DMA_POS 0
143#define MXC_F_GCR_RST0_DMA ((uint32_t)(0x1UL << MXC_F_GCR_RST0_DMA_POS))
145#define MXC_F_GCR_RST0_WDT0_POS 1
146#define MXC_F_GCR_RST0_WDT0 ((uint32_t)(0x1UL << MXC_F_GCR_RST0_WDT0_POS))
148#define MXC_F_GCR_RST0_GPIO0_POS 2
149#define MXC_F_GCR_RST0_GPIO0 ((uint32_t)(0x1UL << MXC_F_GCR_RST0_GPIO0_POS))
151#define MXC_F_GCR_RST0_TIMER0_POS 5
152#define MXC_F_GCR_RST0_TIMER0 ((uint32_t)(0x1UL << MXC_F_GCR_RST0_TIMER0_POS))
154#define MXC_F_GCR_RST0_TIMER1_POS 6
155#define MXC_F_GCR_RST0_TIMER1 ((uint32_t)(0x1UL << MXC_F_GCR_RST0_TIMER1_POS))
157#define MXC_F_GCR_RST0_TIMER2_POS 7
158#define MXC_F_GCR_RST0_TIMER2 ((uint32_t)(0x1UL << MXC_F_GCR_RST0_TIMER2_POS))
160#define MXC_F_GCR_RST0_UART0_POS 11
161#define MXC_F_GCR_RST0_UART0 ((uint32_t)(0x1UL << MXC_F_GCR_RST0_UART0_POS))
163#define MXC_F_GCR_RST0_UART1_POS 12
164#define MXC_F_GCR_RST0_UART1 ((uint32_t)(0x1UL << MXC_F_GCR_RST0_UART1_POS))
166#define MXC_F_GCR_RST0_SPI0_POS 13
167#define MXC_F_GCR_RST0_SPI0 ((uint32_t)(0x1UL << MXC_F_GCR_RST0_SPI0_POS))
169#define MXC_F_GCR_RST0_SPI1_POS 14
170#define MXC_F_GCR_RST0_SPI1 ((uint32_t)(0x1UL << MXC_F_GCR_RST0_SPI1_POS))
172#define MXC_F_GCR_RST0_I2C0_POS 16
173#define MXC_F_GCR_RST0_I2C0 ((uint32_t)(0x1UL << MXC_F_GCR_RST0_I2C0_POS))
175#define MXC_F_GCR_RST0_RTC_POS 17
176#define MXC_F_GCR_RST0_RTC ((uint32_t)(0x1UL << MXC_F_GCR_RST0_RTC_POS))
178#define MXC_F_GCR_RST0_SOFT_POS 29
179#define MXC_F_GCR_RST0_SOFT ((uint32_t)(0x1UL << MXC_F_GCR_RST0_SOFT_POS))
181#define MXC_F_GCR_RST0_PERIPH_POS 30
182#define MXC_F_GCR_RST0_PERIPH ((uint32_t)(0x1UL << MXC_F_GCR_RST0_PERIPH_POS))
184#define MXC_F_GCR_RST0_SYSTEM_POS 31
185#define MXC_F_GCR_RST0_SYSTEM ((uint32_t)(0x1UL << MXC_F_GCR_RST0_SYSTEM_POS))
195#define MXC_F_GCR_CLK_CTRL_PSC_POS 6
196#define MXC_F_GCR_CLK_CTRL_PSC ((uint32_t)(0x7UL << MXC_F_GCR_CLK_CTRL_PSC_POS))
197#define MXC_V_GCR_CLK_CTRL_PSC_DIV1 ((uint32_t)0x0UL)
198#define MXC_S_GCR_CLK_CTRL_PSC_DIV1 (MXC_V_GCR_CLK_CTRL_PSC_DIV1 << MXC_F_GCR_CLK_CTRL_PSC_POS)
199#define MXC_V_GCR_CLK_CTRL_PSC_DIV2 ((uint32_t)0x1UL)
200#define MXC_S_GCR_CLK_CTRL_PSC_DIV2 (MXC_V_GCR_CLK_CTRL_PSC_DIV2 << MXC_F_GCR_CLK_CTRL_PSC_POS)
201#define MXC_V_GCR_CLK_CTRL_PSC_DIV4 ((uint32_t)0x2UL)
202#define MXC_S_GCR_CLK_CTRL_PSC_DIV4 (MXC_V_GCR_CLK_CTRL_PSC_DIV4 << MXC_F_GCR_CLK_CTRL_PSC_POS)
203#define MXC_V_GCR_CLK_CTRL_PSC_DIV8 ((uint32_t)0x3UL)
204#define MXC_S_GCR_CLK_CTRL_PSC_DIV8 (MXC_V_GCR_CLK_CTRL_PSC_DIV8 << MXC_F_GCR_CLK_CTRL_PSC_POS)
205#define MXC_V_GCR_CLK_CTRL_PSC_DIV16 ((uint32_t)0x4UL)
206#define MXC_S_GCR_CLK_CTRL_PSC_DIV16 (MXC_V_GCR_CLK_CTRL_PSC_DIV16 << MXC_F_GCR_CLK_CTRL_PSC_POS)
207#define MXC_V_GCR_CLK_CTRL_PSC_DIV32 ((uint32_t)0x5UL)
208#define MXC_S_GCR_CLK_CTRL_PSC_DIV32 (MXC_V_GCR_CLK_CTRL_PSC_DIV32 << MXC_F_GCR_CLK_CTRL_PSC_POS)
209#define MXC_V_GCR_CLK_CTRL_PSC_DIV64 ((uint32_t)0x6UL)
210#define MXC_S_GCR_CLK_CTRL_PSC_DIV64 (MXC_V_GCR_CLK_CTRL_PSC_DIV64 << MXC_F_GCR_CLK_CTRL_PSC_POS)
211#define MXC_V_GCR_CLK_CTRL_PSC_DIV128 ((uint32_t)0x7UL)
212#define MXC_S_GCR_CLK_CTRL_PSC_DIV128 (MXC_V_GCR_CLK_CTRL_PSC_DIV128 << MXC_F_GCR_CLK_CTRL_PSC_POS)
214#define MXC_F_GCR_CLK_CTRL_CLKSEL_POS 9
215#define MXC_F_GCR_CLK_CTRL_CLKSEL ((uint32_t)(0x7UL << MXC_F_GCR_CLK_CTRL_CLKSEL_POS))
216#define MXC_V_GCR_CLK_CTRL_CLKSEL_HIRC ((uint32_t)0x0UL)
217#define MXC_S_GCR_CLK_CTRL_CLKSEL_HIRC (MXC_V_GCR_CLK_CTRL_CLKSEL_HIRC << MXC_F_GCR_CLK_CTRL_CLKSEL_POS)
218#define MXC_V_GCR_CLK_CTRL_CLKSEL_NANORING ((uint32_t)0x3UL)
219#define MXC_S_GCR_CLK_CTRL_CLKSEL_NANORING (MXC_V_GCR_CLK_CTRL_CLKSEL_NANORING << MXC_F_GCR_CLK_CTRL_CLKSEL_POS)
220#define MXC_V_GCR_CLK_CTRL_CLKSEL_HFXIN ((uint32_t)0x6UL)
221#define MXC_S_GCR_CLK_CTRL_CLKSEL_HFXIN (MXC_V_GCR_CLK_CTRL_CLKSEL_HFXIN << MXC_F_GCR_CLK_CTRL_CLKSEL_POS)
223#define MXC_F_GCR_CLK_CTRL_CLKRDY_POS 13
224#define MXC_F_GCR_CLK_CTRL_CLKRDY ((uint32_t)(0x1UL << MXC_F_GCR_CLK_CTRL_CLKRDY_POS))
226#define MXC_F_GCR_CLK_CTRL_X32K_EN_POS 17
227#define MXC_F_GCR_CLK_CTRL_X32K_EN ((uint32_t)(0x1UL << MXC_F_GCR_CLK_CTRL_X32K_EN_POS))
229#define MXC_F_GCR_CLK_CTRL_HIRC_EN_POS 18
230#define MXC_F_GCR_CLK_CTRL_HIRC_EN ((uint32_t)(0x1UL << MXC_F_GCR_CLK_CTRL_HIRC_EN_POS))
232#define MXC_F_GCR_CLK_CTRL_X32K_RDY_POS 25
233#define MXC_F_GCR_CLK_CTRL_X32K_RDY ((uint32_t)(0x1UL << MXC_F_GCR_CLK_CTRL_X32K_RDY_POS))
235#define MXC_F_GCR_CLK_CTRL_HIRC_RDY_POS 26
236#define MXC_F_GCR_CLK_CTRL_HIRC_RDY ((uint32_t)(0x1UL << MXC_F_GCR_CLK_CTRL_HIRC_RDY_POS))
238#define MXC_F_GCR_CLK_CTRL_LIRC8K_RDY_POS 29
239#define MXC_F_GCR_CLK_CTRL_LIRC8K_RDY ((uint32_t)(0x1UL << MXC_F_GCR_CLK_CTRL_LIRC8K_RDY_POS))
249#define MXC_F_GCR_PM_MODE_POS 0
250#define MXC_F_GCR_PM_MODE ((uint32_t)(0x7UL << MXC_F_GCR_PM_MODE_POS))
251#define MXC_V_GCR_PM_MODE_ACTIVE ((uint32_t)0x0UL)
252#define MXC_S_GCR_PM_MODE_ACTIVE (MXC_V_GCR_PM_MODE_ACTIVE << MXC_F_GCR_PM_MODE_POS)
253#define MXC_V_GCR_PM_MODE_SHUTDOWN ((uint32_t)0x3UL)
254#define MXC_S_GCR_PM_MODE_SHUTDOWN (MXC_V_GCR_PM_MODE_SHUTDOWN << MXC_F_GCR_PM_MODE_POS)
255#define MXC_V_GCR_PM_MODE_BACKUP ((uint32_t)0x4UL)
256#define MXC_S_GCR_PM_MODE_BACKUP (MXC_V_GCR_PM_MODE_BACKUP << MXC_F_GCR_PM_MODE_POS)
258#define MXC_F_GCR_PM_GPIOWK_EN_POS 4
259#define MXC_F_GCR_PM_GPIOWK_EN ((uint32_t)(0x1UL << MXC_F_GCR_PM_GPIOWK_EN_POS))
261#define MXC_F_GCR_PM_RTCWK_EN_POS 5
262#define MXC_F_GCR_PM_RTCWK_EN ((uint32_t)(0x1UL << MXC_F_GCR_PM_RTCWK_EN_POS))
264#define MXC_F_GCR_PM_HFIOPD_POS 15
265#define MXC_F_GCR_PM_HFIOPD ((uint32_t)(0x1UL << MXC_F_GCR_PM_HFIOPD_POS))
275#define MXC_F_GCR_PCLK_DIS0_GPIO0D_POS 0
276#define MXC_F_GCR_PCLK_DIS0_GPIO0D ((uint32_t)(0x1UL << MXC_F_GCR_PCLK_DIS0_GPIO0D_POS))
278#define MXC_F_GCR_PCLK_DIS0_DMAD_POS 5
279#define MXC_F_GCR_PCLK_DIS0_DMAD ((uint32_t)(0x1UL << MXC_F_GCR_PCLK_DIS0_DMAD_POS))
281#define MXC_F_GCR_PCLK_DIS0_SPI0D_POS 6
282#define MXC_F_GCR_PCLK_DIS0_SPI0D ((uint32_t)(0x1UL << MXC_F_GCR_PCLK_DIS0_SPI0D_POS))
284#define MXC_F_GCR_PCLK_DIS0_SPI1D_POS 7
285#define MXC_F_GCR_PCLK_DIS0_SPI1D ((uint32_t)(0x1UL << MXC_F_GCR_PCLK_DIS0_SPI1D_POS))
287#define MXC_F_GCR_PCLK_DIS0_UART0D_POS 9
288#define MXC_F_GCR_PCLK_DIS0_UART0D ((uint32_t)(0x1UL << MXC_F_GCR_PCLK_DIS0_UART0D_POS))
290#define MXC_F_GCR_PCLK_DIS0_UART1D_POS 10
291#define MXC_F_GCR_PCLK_DIS0_UART1D ((uint32_t)(0x1UL << MXC_F_GCR_PCLK_DIS0_UART1D_POS))
293#define MXC_F_GCR_PCLK_DIS0_I2C0D_POS 13
294#define MXC_F_GCR_PCLK_DIS0_I2C0D ((uint32_t)(0x1UL << MXC_F_GCR_PCLK_DIS0_I2C0D_POS))
296#define MXC_F_GCR_PCLK_DIS0_TIMER0D_POS 15
297#define MXC_F_GCR_PCLK_DIS0_TIMER0D ((uint32_t)(0x1UL << MXC_F_GCR_PCLK_DIS0_TIMER0D_POS))
299#define MXC_F_GCR_PCLK_DIS0_TIMER1D_POS 16
300#define MXC_F_GCR_PCLK_DIS0_TIMER1D ((uint32_t)(0x1UL << MXC_F_GCR_PCLK_DIS0_TIMER1D_POS))
302#define MXC_F_GCR_PCLK_DIS0_TIMER2D_POS 17
303#define MXC_F_GCR_PCLK_DIS0_TIMER2D ((uint32_t)(0x1UL << MXC_F_GCR_PCLK_DIS0_TIMER2D_POS))
305#define MXC_F_GCR_PCLK_DIS0_I2C1D_POS 28
306#define MXC_F_GCR_PCLK_DIS0_I2C1D ((uint32_t)(0x1UL << MXC_F_GCR_PCLK_DIS0_I2C1D_POS))
316#define MXC_F_GCR_MEM_CTRL_FWS_POS 0
317#define MXC_F_GCR_MEM_CTRL_FWS ((uint32_t)(0x7UL << MXC_F_GCR_MEM_CTRL_FWS_POS))
319#define MXC_F_GCR_MEM_CTRL_RAM0_LS_POS 8
320#define MXC_F_GCR_MEM_CTRL_RAM0_LS ((uint32_t)(0x1UL << MXC_F_GCR_MEM_CTRL_RAM0_LS_POS))
322#define MXC_F_GCR_MEM_CTRL_RAM1_LS_POS 9
323#define MXC_F_GCR_MEM_CTRL_RAM1_LS ((uint32_t)(0x1UL << MXC_F_GCR_MEM_CTRL_RAM1_LS_POS))
325#define MXC_F_GCR_MEM_CTRL_RAM2_LS_POS 10
326#define MXC_F_GCR_MEM_CTRL_RAM2_LS ((uint32_t)(0x1UL << MXC_F_GCR_MEM_CTRL_RAM2_LS_POS))
328#define MXC_F_GCR_MEM_CTRL_RAM3_LS_POS 11
329#define MXC_F_GCR_MEM_CTRL_RAM3_LS ((uint32_t)(0x1UL << MXC_F_GCR_MEM_CTRL_RAM3_LS_POS))
331#define MXC_F_GCR_MEM_CTRL_ICACHE_RET_POS 12
332#define MXC_F_GCR_MEM_CTRL_ICACHE_RET ((uint32_t)(0x1UL << MXC_F_GCR_MEM_CTRL_ICACHE_RET_POS))
342#define MXC_F_GCR_MEM_ZCTRL_SRAM_ZERO_POS 0
343#define MXC_F_GCR_MEM_ZCTRL_SRAM_ZERO ((uint32_t)(0x1UL << MXC_F_GCR_MEM_ZCTRL_SRAM_ZERO_POS))
345#define MXC_F_GCR_MEM_ZCTRL_ICACHE_ZERO_POS 1
346#define MXC_F_GCR_MEM_ZCTRL_ICACHE_ZERO ((uint32_t)(0x1UL << MXC_F_GCR_MEM_ZCTRL_ICACHE_ZERO_POS))
356#define MXC_F_GCR_SYS_STAT_ICECLOCK_POS 0
357#define MXC_F_GCR_SYS_STAT_ICECLOCK ((uint32_t)(0x1UL << MXC_F_GCR_SYS_STAT_ICECLOCK_POS))
367#define MXC_F_GCR_RST1_I2C1_POS 0
368#define MXC_F_GCR_RST1_I2C1 ((uint32_t)(0x1UL << MXC_F_GCR_RST1_I2C1_POS))
378#define MXC_F_GCR_PCLK_DIS1_FLCD_POS 3
379#define MXC_F_GCR_PCLK_DIS1_FLCD ((uint32_t)(0x1UL << MXC_F_GCR_PCLK_DIS1_FLCD_POS))
381#define MXC_F_GCR_PCLK_DIS1_ICCD_POS 11
382#define MXC_F_GCR_PCLK_DIS1_ICCD ((uint32_t)(0x1UL << MXC_F_GCR_PCLK_DIS1_ICCD_POS))
392#define MXC_F_GCR_EVTEN_DMAEVENT_POS 0
393#define MXC_F_GCR_EVTEN_DMAEVENT ((uint32_t)(0x1UL << MXC_F_GCR_EVTEN_DMAEVENT_POS))
395#define MXC_F_GCR_EVTEN_RX_EVT_POS 1
396#define MXC_F_GCR_EVTEN_RX_EVT ((uint32_t)(0x1UL << MXC_F_GCR_EVTEN_RX_EVT_POS))
406#define MXC_F_GCR_REV_REVISION_POS 0
407#define MXC_F_GCR_REV_REVISION ((uint32_t)(0xFFFFUL << MXC_F_GCR_REV_REVISION_POS))
417#define MXC_F_GCR_SYS_IE_ICEULIE_POS 0
418#define MXC_F_GCR_SYS_IE_ICEULIE ((uint32_t)(0x1UL << MXC_F_GCR_SYS_IE_ICEULIE_POS))
422#ifdef __cplusplus
423}
424#endif
425
426#endif // LIBRARIES_CMSIS_DEVICE_MAXIM_MAX32660_INCLUDE_GCR_REGS_H_
__IO uint32_t pclk_dis1
Definition: gcr_regs.h:88
__IO uint32_t sys_ie
Definition: gcr_regs.h:91
__IO uint32_t rst0
Definition: gcr_regs.h:78
__IO uint32_t scon
Definition: gcr_regs.h:77
__IO uint32_t evten
Definition: gcr_regs.h:89
__IO uint32_t pm
Definition: gcr_regs.h:80
__I uint32_t rev
Definition: gcr_regs.h:90
__IO uint32_t mem_zctrl
Definition: gcr_regs.h:84
__IO uint32_t pclk_dis0
Definition: gcr_regs.h:82
__IO uint32_t rst1
Definition: gcr_regs.h:87
__IO uint32_t mem_ctrl
Definition: gcr_regs.h:83
__IO uint32_t clk_ctrl
Definition: gcr_regs.h:79
__IO uint32_t sys_stat
Definition: gcr_regs.h:86
Definition: gcr_regs.h:76