EFM32 Gecko Software Documentation
efm32g-doc-5.1.2
Main Page
Modules
Files
Documentation Home
silabs.com
File List
efm32g_pcnt.h
Go to the documentation of this file.
1
/**************************************************************************/
32
/**************************************************************************/
36
/**************************************************************************/
41
typedef
struct
42
{
43
__IOM uint32_t
CTRL
;
44
__IOM uint32_t
CMD
;
45
__IM uint32_t
STATUS
;
46
__IM uint32_t
CNT
;
47
__IM uint32_t
TOP
;
48
__IOM uint32_t
TOPB
;
49
__IM uint32_t
IF
;
50
__IOM uint32_t
IFS
;
51
__IOM uint32_t
IFC
;
52
__IOM uint32_t
IEN
;
53
__IOM uint32_t
ROUTE
;
55
__IOM uint32_t
FREEZE
;
56
__IM uint32_t
SYNCBUSY
;
57
}
PCNT_TypeDef
;
59
/**************************************************************************/
64
/* Bit fields for PCNT CTRL */
65
#define _PCNT_CTRL_RESETVALUE 0x00000000UL
66
#define _PCNT_CTRL_MASK 0x0000003FUL
67
#define _PCNT_CTRL_MODE_SHIFT 0
68
#define _PCNT_CTRL_MODE_MASK 0x3UL
69
#define _PCNT_CTRL_MODE_DEFAULT 0x00000000UL
70
#define _PCNT_CTRL_MODE_DISABLE 0x00000000UL
71
#define _PCNT_CTRL_MODE_OVSSINGLE 0x00000001UL
72
#define _PCNT_CTRL_MODE_EXTCLKSINGLE 0x00000002UL
73
#define _PCNT_CTRL_MODE_EXTCLKQUAD 0x00000003UL
74
#define PCNT_CTRL_MODE_DEFAULT (_PCNT_CTRL_MODE_DEFAULT << 0)
75
#define PCNT_CTRL_MODE_DISABLE (_PCNT_CTRL_MODE_DISABLE << 0)
76
#define PCNT_CTRL_MODE_OVSSINGLE (_PCNT_CTRL_MODE_OVSSINGLE << 0)
77
#define PCNT_CTRL_MODE_EXTCLKSINGLE (_PCNT_CTRL_MODE_EXTCLKSINGLE << 0)
78
#define PCNT_CTRL_MODE_EXTCLKQUAD (_PCNT_CTRL_MODE_EXTCLKQUAD << 0)
79
#define PCNT_CTRL_CNTDIR (0x1UL << 2)
80
#define _PCNT_CTRL_CNTDIR_SHIFT 2
81
#define _PCNT_CTRL_CNTDIR_MASK 0x4UL
82
#define _PCNT_CTRL_CNTDIR_DEFAULT 0x00000000UL
83
#define _PCNT_CTRL_CNTDIR_UP 0x00000000UL
84
#define _PCNT_CTRL_CNTDIR_DOWN 0x00000001UL
85
#define PCNT_CTRL_CNTDIR_DEFAULT (_PCNT_CTRL_CNTDIR_DEFAULT << 2)
86
#define PCNT_CTRL_CNTDIR_UP (_PCNT_CTRL_CNTDIR_UP << 2)
87
#define PCNT_CTRL_CNTDIR_DOWN (_PCNT_CTRL_CNTDIR_DOWN << 2)
88
#define PCNT_CTRL_EDGE (0x1UL << 3)
89
#define _PCNT_CTRL_EDGE_SHIFT 3
90
#define _PCNT_CTRL_EDGE_MASK 0x8UL
91
#define _PCNT_CTRL_EDGE_DEFAULT 0x00000000UL
92
#define _PCNT_CTRL_EDGE_POS 0x00000000UL
93
#define _PCNT_CTRL_EDGE_NEG 0x00000001UL
94
#define PCNT_CTRL_EDGE_DEFAULT (_PCNT_CTRL_EDGE_DEFAULT << 3)
95
#define PCNT_CTRL_EDGE_POS (_PCNT_CTRL_EDGE_POS << 3)
96
#define PCNT_CTRL_EDGE_NEG (_PCNT_CTRL_EDGE_NEG << 3)
97
#define PCNT_CTRL_FILT (0x1UL << 4)
98
#define _PCNT_CTRL_FILT_SHIFT 4
99
#define _PCNT_CTRL_FILT_MASK 0x10UL
100
#define _PCNT_CTRL_FILT_DEFAULT 0x00000000UL
101
#define PCNT_CTRL_FILT_DEFAULT (_PCNT_CTRL_FILT_DEFAULT << 4)
102
#define PCNT_CTRL_RSTEN (0x1UL << 5)
103
#define _PCNT_CTRL_RSTEN_SHIFT 5
104
#define _PCNT_CTRL_RSTEN_MASK 0x20UL
105
#define _PCNT_CTRL_RSTEN_DEFAULT 0x00000000UL
106
#define PCNT_CTRL_RSTEN_DEFAULT (_PCNT_CTRL_RSTEN_DEFAULT << 5)
108
/* Bit fields for PCNT CMD */
109
#define _PCNT_CMD_RESETVALUE 0x00000000UL
110
#define _PCNT_CMD_MASK 0x00000003UL
111
#define PCNT_CMD_LCNTIM (0x1UL << 0)
112
#define _PCNT_CMD_LCNTIM_SHIFT 0
113
#define _PCNT_CMD_LCNTIM_MASK 0x1UL
114
#define _PCNT_CMD_LCNTIM_DEFAULT 0x00000000UL
115
#define PCNT_CMD_LCNTIM_DEFAULT (_PCNT_CMD_LCNTIM_DEFAULT << 0)
116
#define PCNT_CMD_LTOPBIM (0x1UL << 1)
117
#define _PCNT_CMD_LTOPBIM_SHIFT 1
118
#define _PCNT_CMD_LTOPBIM_MASK 0x2UL
119
#define _PCNT_CMD_LTOPBIM_DEFAULT 0x00000000UL
120
#define PCNT_CMD_LTOPBIM_DEFAULT (_PCNT_CMD_LTOPBIM_DEFAULT << 1)
122
/* Bit fields for PCNT STATUS */
123
#define _PCNT_STATUS_RESETVALUE 0x00000000UL
124
#define _PCNT_STATUS_MASK 0x00000001UL
125
#define PCNT_STATUS_DIR (0x1UL << 0)
126
#define _PCNT_STATUS_DIR_SHIFT 0
127
#define _PCNT_STATUS_DIR_MASK 0x1UL
128
#define _PCNT_STATUS_DIR_DEFAULT 0x00000000UL
129
#define _PCNT_STATUS_DIR_UP 0x00000000UL
130
#define _PCNT_STATUS_DIR_DOWN 0x00000001UL
131
#define PCNT_STATUS_DIR_DEFAULT (_PCNT_STATUS_DIR_DEFAULT << 0)
132
#define PCNT_STATUS_DIR_UP (_PCNT_STATUS_DIR_UP << 0)
133
#define PCNT_STATUS_DIR_DOWN (_PCNT_STATUS_DIR_DOWN << 0)
135
/* Bit fields for PCNT CNT */
136
#define _PCNT_CNT_RESETVALUE 0x00000000UL
137
#define _PCNT_CNT_MASK 0x0000FFFFUL
138
#define _PCNT_CNT_CNT_SHIFT 0
139
#define _PCNT_CNT_CNT_MASK 0xFFFFUL
140
#define _PCNT_CNT_CNT_DEFAULT 0x00000000UL
141
#define PCNT_CNT_CNT_DEFAULT (_PCNT_CNT_CNT_DEFAULT << 0)
143
/* Bit fields for PCNT TOP */
144
#define _PCNT_TOP_RESETVALUE 0x000000FFUL
145
#define _PCNT_TOP_MASK 0x0000FFFFUL
146
#define _PCNT_TOP_TOP_SHIFT 0
147
#define _PCNT_TOP_TOP_MASK 0xFFFFUL
148
#define _PCNT_TOP_TOP_DEFAULT 0x000000FFUL
149
#define PCNT_TOP_TOP_DEFAULT (_PCNT_TOP_TOP_DEFAULT << 0)
151
/* Bit fields for PCNT TOPB */
152
#define _PCNT_TOPB_RESETVALUE 0x000000FFUL
153
#define _PCNT_TOPB_MASK 0x0000FFFFUL
154
#define _PCNT_TOPB_TOPB_SHIFT 0
155
#define _PCNT_TOPB_TOPB_MASK 0xFFFFUL
156
#define _PCNT_TOPB_TOPB_DEFAULT 0x000000FFUL
157
#define PCNT_TOPB_TOPB_DEFAULT (_PCNT_TOPB_TOPB_DEFAULT << 0)
159
/* Bit fields for PCNT IF */
160
#define _PCNT_IF_RESETVALUE 0x00000000UL
161
#define _PCNT_IF_MASK 0x00000007UL
162
#define PCNT_IF_UF (0x1UL << 0)
163
#define _PCNT_IF_UF_SHIFT 0
164
#define _PCNT_IF_UF_MASK 0x1UL
165
#define _PCNT_IF_UF_DEFAULT 0x00000000UL
166
#define PCNT_IF_UF_DEFAULT (_PCNT_IF_UF_DEFAULT << 0)
167
#define PCNT_IF_OF (0x1UL << 1)
168
#define _PCNT_IF_OF_SHIFT 1
169
#define _PCNT_IF_OF_MASK 0x2UL
170
#define _PCNT_IF_OF_DEFAULT 0x00000000UL
171
#define PCNT_IF_OF_DEFAULT (_PCNT_IF_OF_DEFAULT << 1)
172
#define PCNT_IF_DIRCNG (0x1UL << 2)
173
#define _PCNT_IF_DIRCNG_SHIFT 2
174
#define _PCNT_IF_DIRCNG_MASK 0x4UL
175
#define _PCNT_IF_DIRCNG_DEFAULT 0x00000000UL
176
#define PCNT_IF_DIRCNG_DEFAULT (_PCNT_IF_DIRCNG_DEFAULT << 2)
178
/* Bit fields for PCNT IFS */
179
#define _PCNT_IFS_RESETVALUE 0x00000000UL
180
#define _PCNT_IFS_MASK 0x00000007UL
181
#define PCNT_IFS_UF (0x1UL << 0)
182
#define _PCNT_IFS_UF_SHIFT 0
183
#define _PCNT_IFS_UF_MASK 0x1UL
184
#define _PCNT_IFS_UF_DEFAULT 0x00000000UL
185
#define PCNT_IFS_UF_DEFAULT (_PCNT_IFS_UF_DEFAULT << 0)
186
#define PCNT_IFS_OF (0x1UL << 1)
187
#define _PCNT_IFS_OF_SHIFT 1
188
#define _PCNT_IFS_OF_MASK 0x2UL
189
#define _PCNT_IFS_OF_DEFAULT 0x00000000UL
190
#define PCNT_IFS_OF_DEFAULT (_PCNT_IFS_OF_DEFAULT << 1)
191
#define PCNT_IFS_DIRCNG (0x1UL << 2)
192
#define _PCNT_IFS_DIRCNG_SHIFT 2
193
#define _PCNT_IFS_DIRCNG_MASK 0x4UL
194
#define _PCNT_IFS_DIRCNG_DEFAULT 0x00000000UL
195
#define PCNT_IFS_DIRCNG_DEFAULT (_PCNT_IFS_DIRCNG_DEFAULT << 2)
197
/* Bit fields for PCNT IFC */
198
#define _PCNT_IFC_RESETVALUE 0x00000000UL
199
#define _PCNT_IFC_MASK 0x00000007UL
200
#define PCNT_IFC_UF (0x1UL << 0)
201
#define _PCNT_IFC_UF_SHIFT 0
202
#define _PCNT_IFC_UF_MASK 0x1UL
203
#define _PCNT_IFC_UF_DEFAULT 0x00000000UL
204
#define PCNT_IFC_UF_DEFAULT (_PCNT_IFC_UF_DEFAULT << 0)
205
#define PCNT_IFC_OF (0x1UL << 1)
206
#define _PCNT_IFC_OF_SHIFT 1
207
#define _PCNT_IFC_OF_MASK 0x2UL
208
#define _PCNT_IFC_OF_DEFAULT 0x00000000UL
209
#define PCNT_IFC_OF_DEFAULT (_PCNT_IFC_OF_DEFAULT << 1)
210
#define PCNT_IFC_DIRCNG (0x1UL << 2)
211
#define _PCNT_IFC_DIRCNG_SHIFT 2
212
#define _PCNT_IFC_DIRCNG_MASK 0x4UL
213
#define _PCNT_IFC_DIRCNG_DEFAULT 0x00000000UL
214
#define PCNT_IFC_DIRCNG_DEFAULT (_PCNT_IFC_DIRCNG_DEFAULT << 2)
216
/* Bit fields for PCNT IEN */
217
#define _PCNT_IEN_RESETVALUE 0x00000000UL
218
#define _PCNT_IEN_MASK 0x00000007UL
219
#define PCNT_IEN_UF (0x1UL << 0)
220
#define _PCNT_IEN_UF_SHIFT 0
221
#define _PCNT_IEN_UF_MASK 0x1UL
222
#define _PCNT_IEN_UF_DEFAULT 0x00000000UL
223
#define PCNT_IEN_UF_DEFAULT (_PCNT_IEN_UF_DEFAULT << 0)
224
#define PCNT_IEN_OF (0x1UL << 1)
225
#define _PCNT_IEN_OF_SHIFT 1
226
#define _PCNT_IEN_OF_MASK 0x2UL
227
#define _PCNT_IEN_OF_DEFAULT 0x00000000UL
228
#define PCNT_IEN_OF_DEFAULT (_PCNT_IEN_OF_DEFAULT << 1)
229
#define PCNT_IEN_DIRCNG (0x1UL << 2)
230
#define _PCNT_IEN_DIRCNG_SHIFT 2
231
#define _PCNT_IEN_DIRCNG_MASK 0x4UL
232
#define _PCNT_IEN_DIRCNG_DEFAULT 0x00000000UL
233
#define PCNT_IEN_DIRCNG_DEFAULT (_PCNT_IEN_DIRCNG_DEFAULT << 2)
235
/* Bit fields for PCNT ROUTE */
236
#define _PCNT_ROUTE_RESETVALUE 0x00000000UL
237
#define _PCNT_ROUTE_MASK 0x00000300UL
238
#define _PCNT_ROUTE_LOCATION_SHIFT 8
239
#define _PCNT_ROUTE_LOCATION_MASK 0x300UL
240
#define _PCNT_ROUTE_LOCATION_LOC0 0x00000000UL
241
#define _PCNT_ROUTE_LOCATION_DEFAULT 0x00000000UL
242
#define _PCNT_ROUTE_LOCATION_LOC1 0x00000001UL
243
#define _PCNT_ROUTE_LOCATION_LOC2 0x00000002UL
244
#define PCNT_ROUTE_LOCATION_LOC0 (_PCNT_ROUTE_LOCATION_LOC0 << 8)
245
#define PCNT_ROUTE_LOCATION_DEFAULT (_PCNT_ROUTE_LOCATION_DEFAULT << 8)
246
#define PCNT_ROUTE_LOCATION_LOC1 (_PCNT_ROUTE_LOCATION_LOC1 << 8)
247
#define PCNT_ROUTE_LOCATION_LOC2 (_PCNT_ROUTE_LOCATION_LOC2 << 8)
249
/* Bit fields for PCNT FREEZE */
250
#define _PCNT_FREEZE_RESETVALUE 0x00000000UL
251
#define _PCNT_FREEZE_MASK 0x00000001UL
252
#define PCNT_FREEZE_REGFREEZE (0x1UL << 0)
253
#define _PCNT_FREEZE_REGFREEZE_SHIFT 0
254
#define _PCNT_FREEZE_REGFREEZE_MASK 0x1UL
255
#define _PCNT_FREEZE_REGFREEZE_DEFAULT 0x00000000UL
256
#define _PCNT_FREEZE_REGFREEZE_UPDATE 0x00000000UL
257
#define _PCNT_FREEZE_REGFREEZE_FREEZE 0x00000001UL
258
#define PCNT_FREEZE_REGFREEZE_DEFAULT (_PCNT_FREEZE_REGFREEZE_DEFAULT << 0)
259
#define PCNT_FREEZE_REGFREEZE_UPDATE (_PCNT_FREEZE_REGFREEZE_UPDATE << 0)
260
#define PCNT_FREEZE_REGFREEZE_FREEZE (_PCNT_FREEZE_REGFREEZE_FREEZE << 0)
262
/* Bit fields for PCNT SYNCBUSY */
263
#define _PCNT_SYNCBUSY_RESETVALUE 0x00000000UL
264
#define _PCNT_SYNCBUSY_MASK 0x00000007UL
265
#define PCNT_SYNCBUSY_CTRL (0x1UL << 0)
266
#define _PCNT_SYNCBUSY_CTRL_SHIFT 0
267
#define _PCNT_SYNCBUSY_CTRL_MASK 0x1UL
268
#define _PCNT_SYNCBUSY_CTRL_DEFAULT 0x00000000UL
269
#define PCNT_SYNCBUSY_CTRL_DEFAULT (_PCNT_SYNCBUSY_CTRL_DEFAULT << 0)
270
#define PCNT_SYNCBUSY_CMD (0x1UL << 1)
271
#define _PCNT_SYNCBUSY_CMD_SHIFT 1
272
#define _PCNT_SYNCBUSY_CMD_MASK 0x2UL
273
#define _PCNT_SYNCBUSY_CMD_DEFAULT 0x00000000UL
274
#define PCNT_SYNCBUSY_CMD_DEFAULT (_PCNT_SYNCBUSY_CMD_DEFAULT << 1)
275
#define PCNT_SYNCBUSY_TOPB (0x1UL << 2)
276
#define _PCNT_SYNCBUSY_TOPB_SHIFT 2
277
#define _PCNT_SYNCBUSY_TOPB_MASK 0x4UL
278
#define _PCNT_SYNCBUSY_TOPB_DEFAULT 0x00000000UL
279
#define PCNT_SYNCBUSY_TOPB_DEFAULT (_PCNT_SYNCBUSY_TOPB_DEFAULT << 2)
PCNT_TypeDef::TOP
__IM uint32_t TOP
Definition:
efm32g_pcnt.h:47
PCNT_TypeDef::ROUTE
__IOM uint32_t ROUTE
Definition:
efm32g_pcnt.h:53
PCNT_TypeDef::IFC
__IOM uint32_t IFC
Definition:
efm32g_pcnt.h:51
PCNT_TypeDef
Definition:
efm32g_pcnt.h:41
PCNT_TypeDef::CMD
__IOM uint32_t CMD
Definition:
efm32g_pcnt.h:44
PCNT_TypeDef::SYNCBUSY
__IM uint32_t SYNCBUSY
Definition:
efm32g_pcnt.h:56
PCNT_TypeDef::STATUS
__IM uint32_t STATUS
Definition:
efm32g_pcnt.h:45
PCNT_TypeDef::IF
__IM uint32_t IF
Definition:
efm32g_pcnt.h:49
PCNT_TypeDef::TOPB
__IOM uint32_t TOPB
Definition:
efm32g_pcnt.h:48
PCNT_TypeDef::CNT
__IM uint32_t CNT
Definition:
efm32g_pcnt.h:46
PCNT_TypeDef::CTRL
__IOM uint32_t CTRL
Definition:
efm32g_pcnt.h:43
PCNT_TypeDef::FREEZE
__IOM uint32_t FREEZE
Definition:
efm32g_pcnt.h:55
PCNT_TypeDef::IFS
__IOM uint32_t IFS
Definition:
efm32g_pcnt.h:50
PCNT_TypeDef::IEN
__IOM uint32_t IEN
Definition:
efm32g_pcnt.h:52
platform
Device
SiliconLabs
EFM32G
Include
efm32g_pcnt.h
Generated on Thu Mar 9 2017 20:44:29 for EFM32 Gecko Software Documentation by
1.8.10