mcr_regs.h 10.4 KB
Newer Older
schneider's avatar
schneider committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/**
 * @file    mcr_regs.h
 * @brief   Registers, Bit Masks and Bit Positions for the MCR Peripheral Module.
 */

/* ****************************************************************************
 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Except as contained in this notice, the name of Maxim Integrated
 * Products, Inc. shall not be used except as stated in the Maxim Integrated
 * Products, Inc. Branding Policy.
 *
 * The mere transfer of this software does not imply any licenses
 * of trade secrets, proprietary technology, copyrights, patents,
 * trademarks, maskwork rights, or any other form of intellectual
 * property whatsoever. Maxim Integrated Products, Inc. retains all
 * ownership rights.
 *
 *
 *************************************************************************** */

#ifndef _MCR_REGS_H_
#define _MCR_REGS_H_

/* **** Includes **** */
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif
 
#if defined (__ICCARM__)
  #pragma system_include
#endif
 
#if defined (__CC_ARM)
  #pragma anon_unions
#endif
/// @cond
/*
    If types are not defined elsewhere (CMSIS) define them here
*/
#ifndef __IO
#define __IO volatile
#endif
#ifndef __I
#define __I  volatile const
#endif
#ifndef __O
#define __O  volatile
#endif
#ifndef __R
#define __R  volatile const
#endif
/// @endcond

/* **** Definitions **** */

/**
 * @ingroup     mcr
 * @defgroup    mcr_registers MCR_Registers
 * @brief       Registers, Bit Masks and Bit Positions for the MCR Peripheral Module.
 * @details Misc Control.
 */

/**
 * @ingroup mcr_registers
 * Structure type to access the MCR Registers.
 */
typedef struct {
    __IO uint32_t eccen;                /**< <tt>\b 0x00:</tt> MCR ECCEN Register */
90
    __R  uint32_t rsv_0x4;
schneider's avatar
schneider committed
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    __IO uint32_t outen;                /**< <tt>\b 0x08:</tt> MCR OUTEN Register */
    __IO uint32_t aincomp;              /**< <tt>\b 0x0C:</tt> MCR AINCOMP Register */
    __IO uint32_t ctrl;                 /**< <tt>\b 0x10:</tt> MCR CTRL Register */
} mxc_mcr_regs_t;

/* Register offsets for module MCR */
/**
 * @ingroup    mcr_registers
 * @defgroup   MCR_Register_Offsets Register Offsets
 * @brief      MCR Peripheral Register Offsets from the MCR Base Peripheral Address. 
 * @{
 */
 #define MXC_R_MCR_ECCEN                    ((uint32_t)0x00000000UL) /**< Offset from MCR Base Address: <tt> 0x0000</tt> */ 
 #define MXC_R_MCR_OUTEN                    ((uint32_t)0x00000008UL) /**< Offset from MCR Base Address: <tt> 0x0008</tt> */ 
 #define MXC_R_MCR_AINCOMP                  ((uint32_t)0x0000000CUL) /**< Offset from MCR Base Address: <tt> 0x000C</tt> */ 
 #define MXC_R_MCR_CTRL                     ((uint32_t)0x00000010UL) /**< Offset from MCR Base Address: <tt> 0x0010</tt> */ 
/**@} end of group mcr_registers */

/**
 * @ingroup  mcr_registers
 * @defgroup MCR_ECCEN MCR_ECCEN
 * @brief    ECC Enable Register
 * @{
 */
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
 #define MXC_F_MCR_ECCEN_SYSRAM0ECCEN_POS               0 /**< ECCEN_SYSRAM0ECCEN Position */
 #define MXC_F_MCR_ECCEN_SYSRAM0ECCEN                   ((uint32_t)(0x1UL << MXC_F_MCR_ECCEN_SYSRAM0ECCEN_POS)) /**< ECCEN_SYSRAM0ECCEN Mask */

 #define MXC_F_MCR_ECCEN_SYSRAM1ECCEN_POS               1 /**< ECCEN_SYSRAM1ECCEN Position */
 #define MXC_F_MCR_ECCEN_SYSRAM1ECCEN                   ((uint32_t)(0x1UL << MXC_F_MCR_ECCEN_SYSRAM1ECCEN_POS)) /**< ECCEN_SYSRAM1ECCEN Mask */

 #define MXC_F_MCR_ECCEN_SYSRAM2ECCEN_POS               2 /**< ECCEN_SYSRAM2ECCEN Position */
 #define MXC_F_MCR_ECCEN_SYSRAM2ECCEN                   ((uint32_t)(0x1UL << MXC_F_MCR_ECCEN_SYSRAM2ECCEN_POS)) /**< ECCEN_SYSRAM2ECCEN Mask */

 #define MXC_F_MCR_ECCEN_SYSRAM3ECCEN_POS               3 /**< ECCEN_SYSRAM3ECCEN Position */
 #define MXC_F_MCR_ECCEN_SYSRAM3ECCEN                   ((uint32_t)(0x1UL << MXC_F_MCR_ECCEN_SYSRAM3ECCEN_POS)) /**< ECCEN_SYSRAM3ECCEN Mask */

 #define MXC_F_MCR_ECCEN_SYSRAM4ECCEN_POS               4 /**< ECCEN_SYSRAM4ECCEN Position */
 #define MXC_F_MCR_ECCEN_SYSRAM4ECCEN                   ((uint32_t)(0x1UL << MXC_F_MCR_ECCEN_SYSRAM4ECCEN_POS)) /**< ECCEN_SYSRAM4ECCEN Mask */

 #define MXC_F_MCR_ECCEN_SYSRAM5ECCEN_POS               5 /**< ECCEN_SYSRAM5ECCEN Position */
 #define MXC_F_MCR_ECCEN_SYSRAM5ECCEN                   ((uint32_t)(0x1UL << MXC_F_MCR_ECCEN_SYSRAM5ECCEN_POS)) /**< ECCEN_SYSRAM5ECCEN Mask */
schneider's avatar
schneider committed
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213

 #define MXC_F_MCR_ECCEN_IC0ECCEN_POS                   8 /**< ECCEN_IC0ECCEN Position */
 #define MXC_F_MCR_ECCEN_IC0ECCEN                       ((uint32_t)(0x1UL << MXC_F_MCR_ECCEN_IC0ECCEN_POS)) /**< ECCEN_IC0ECCEN Mask */

 #define MXC_F_MCR_ECCEN_IC1ECCEN_POS                   9 /**< ECCEN_IC1ECCEN Position */
 #define MXC_F_MCR_ECCEN_IC1ECCEN                       ((uint32_t)(0x1UL << MXC_F_MCR_ECCEN_IC1ECCEN_POS)) /**< ECCEN_IC1ECCEN Mask */

 #define MXC_F_MCR_ECCEN_ICXIPECCEN_POS                 10 /**< ECCEN_ICXIPECCEN Position */
 #define MXC_F_MCR_ECCEN_ICXIPECCEN                     ((uint32_t)(0x1UL << MXC_F_MCR_ECCEN_ICXIPECCEN_POS)) /**< ECCEN_ICXIPECCEN Mask */

 #define MXC_F_MCR_ECCEN_FL0ECCEN_POS                   11 /**< ECCEN_FL0ECCEN Position */
 #define MXC_F_MCR_ECCEN_FL0ECCEN                       ((uint32_t)(0x1UL << MXC_F_MCR_ECCEN_FL0ECCEN_POS)) /**< ECCEN_FL0ECCEN Mask */

 #define MXC_F_MCR_ECCEN_FL1ECCEN_POS                   12 /**< ECCEN_FL1ECCEN Position */
 #define MXC_F_MCR_ECCEN_FL1ECCEN                       ((uint32_t)(0x1UL << MXC_F_MCR_ECCEN_FL1ECCEN_POS)) /**< ECCEN_FL1ECCEN Mask */

/**@} end of group MCR_ECCEN_Register */

/**
 * @ingroup  mcr_registers
 * @defgroup MCR_OUTEN MCR_OUTEN
 * @brief    GPIOOUT_EN Function Enable Register
 * @{
 */
 #define MXC_F_MCR_OUTEN_SQWOUT0EN_POS                  0 /**< OUTEN_SQWOUT0EN Position */
 #define MXC_F_MCR_OUTEN_SQWOUT0EN                      ((uint32_t)(0x1UL << MXC_F_MCR_OUTEN_SQWOUT0EN_POS)) /**< OUTEN_SQWOUT0EN Mask */

 #define MXC_F_MCR_OUTEN_SQWOUT1EN_POS                  1 /**< OUTEN_SQWOUT1EN Position */
 #define MXC_F_MCR_OUTEN_SQWOUT1EN                      ((uint32_t)(0x1UL << MXC_F_MCR_OUTEN_SQWOUT1EN_POS)) /**< OUTEN_SQWOUT1EN Mask */

 #define MXC_F_MCR_OUTEN_PDOWNOUT0EN_POS                2 /**< OUTEN_PDOWNOUT0EN Position */
 #define MXC_F_MCR_OUTEN_PDOWNOUT0EN                    ((uint32_t)(0x1UL << MXC_F_MCR_OUTEN_PDOWNOUT0EN_POS)) /**< OUTEN_PDOWNOUT0EN Mask */

 #define MXC_F_MCR_OUTEN_PDOWNOUT1EN_POS                3 /**< OUTEN_PDOWNOUT1EN Position */
 #define MXC_F_MCR_OUTEN_PDOWNOUT1EN                    ((uint32_t)(0x1UL << MXC_F_MCR_OUTEN_PDOWNOUT1EN_POS)) /**< OUTEN_PDOWNOUT1EN Mask */

/**@} end of group MCR_OUTEN_Register */

/**
 * @ingroup  mcr_registers
 * @defgroup MCR_AINCOMP MCR_AINCOMP
 * @brief    Comparator Power Control Register
 * @{
 */
 #define MXC_F_MCR_AINCOMP_AINCOMP0PD_POS               0 /**< AINCOMP_AINCOMP0PD Position */
 #define MXC_F_MCR_AINCOMP_AINCOMP0PD                   ((uint32_t)(0x1UL << MXC_F_MCR_AINCOMP_AINCOMP0PD_POS)) /**< AINCOMP_AINCOMP0PD Mask */

 #define MXC_F_MCR_AINCOMP_AINCOMP1PD_POS               1 /**< AINCOMP_AINCOMP1PD Position */
 #define MXC_F_MCR_AINCOMP_AINCOMP1PD                   ((uint32_t)(0x1UL << MXC_F_MCR_AINCOMP_AINCOMP1PD_POS)) /**< AINCOMP_AINCOMP1PD Mask */

 #define MXC_F_MCR_AINCOMP_AINCOMP2PD_POS               2 /**< AINCOMP_AINCOMP2PD Position */
 #define MXC_F_MCR_AINCOMP_AINCOMP2PD                   ((uint32_t)(0x1UL << MXC_F_MCR_AINCOMP_AINCOMP2PD_POS)) /**< AINCOMP_AINCOMP2PD Mask */

 #define MXC_F_MCR_AINCOMP_AINCOMP3PD_POS               3 /**< AINCOMP_AINCOMP3PD Position */
 #define MXC_F_MCR_AINCOMP_AINCOMP3PD                   ((uint32_t)(0x1UL << MXC_F_MCR_AINCOMP_AINCOMP3PD_POS)) /**< AINCOMP_AINCOMP3PD Mask */

 #define MXC_F_MCR_AINCOMP_AINCOMPHYST_POS              4 /**< AINCOMP_AINCOMPHYST Position */
 #define MXC_F_MCR_AINCOMP_AINCOMPHYST                  ((uint32_t)(0x3UL << MXC_F_MCR_AINCOMP_AINCOMPHYST_POS)) /**< AINCOMP_AINCOMPHYST Mask */

/**@} end of group MCR_AINCOMP_Register */

/**
 * @ingroup  mcr_registers
 * @defgroup MCR_CTRL MCR_CTRL
 * @brief    Misc Power State Control Register
 * @{
 */
 #define MXC_F_MCR_CTRL_VDDCSWEN_POS                    0 /**< CTRL_VDDCSWEN Position */
 #define MXC_F_MCR_CTRL_VDDCSWEN                        ((uint32_t)(0x1UL << MXC_F_MCR_CTRL_VDDCSWEN_POS)) /**< CTRL_VDDCSWEN Mask */

 #define MXC_F_MCR_CTRL_VDDCSW_POS                      1 /**< CTRL_VDDCSW Position */
 #define MXC_F_MCR_CTRL_VDDCSW                          ((uint32_t)(0x3UL << MXC_F_MCR_CTRL_VDDCSW_POS)) /**< CTRL_VDDCSW Mask */

 #define MXC_F_MCR_CTRL_USBSWEN_N_POS                   3 /**< CTRL_USBSWEN_N Position */
 #define MXC_F_MCR_CTRL_USBSWEN_N                       ((uint32_t)(0x1UL << MXC_F_MCR_CTRL_USBSWEN_N_POS)) /**< CTRL_USBSWEN_N Mask */

 #define MXC_F_MCR_CTRL_BUCKCLKSCALEN_POS               8 /**< CTRL_BUCKCLKSCALEN Position */
 #define MXC_F_MCR_CTRL_BUCKCLKSCALEN                   ((uint32_t)(0x1UL << MXC_F_MCR_CTRL_BUCKCLKSCALEN_POS)) /**< CTRL_BUCKCLKSCALEN Mask */

 #define MXC_F_MCR_CTRL_P1M_POS                         9 /**< CTRL_P1M Position */
 #define MXC_F_MCR_CTRL_P1M                             ((uint32_t)(0x1UL << MXC_F_MCR_CTRL_P1M_POS)) /**< CTRL_P1M Mask */

214
215
 #define MXC_F_MCR_CTRL_RSTN_VOLTAGE_SEL_POS            10 /**< CTRL_RSTN_VOLTAGE_SEL Position */
 #define MXC_F_MCR_CTRL_RSTN_VOLTAGE_SEL                ((uint32_t)(0x1UL << MXC_F_MCR_CTRL_RSTN_VOLTAGE_SEL_POS)) /**< CTRL_RSTN_VOLTAGE_SEL Mask */
schneider's avatar
schneider committed
216
217
218
219
220
221
222
223

/**@} end of group MCR_CTRL_Register */

#ifdef __cplusplus
}
#endif

#endif /* _MCR_REGS_H_ */