MAX32650 Peripheral Driver API
Peripheral Driver API for the MAX32650
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
tmr_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_MAX32650_INCLUDE_TMR_REGS_H_
29#define LIBRARIES_CMSIS_DEVICE_MAXIM_MAX32650_INCLUDE_TMR_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 cnt;
78 __IO uint32_t cmp;
79 __IO uint32_t pwm;
80 __IO uint32_t intr;
81 __IO uint32_t cn;
82 __IO uint32_t nolcmp;
84
85/* Register offsets for module TMR */
92#define MXC_R_TMR_CNT ((uint32_t)0x00000000UL)
93#define MXC_R_TMR_CMP ((uint32_t)0x00000004UL)
94#define MXC_R_TMR_PWM ((uint32_t)0x00000008UL)
95#define MXC_R_TMR_INTR ((uint32_t)0x0000000CUL)
96#define MXC_R_TMR_CN ((uint32_t)0x00000010UL)
97#define MXC_R_TMR_NOLCMP ((uint32_t)0x00000014UL)
106#define MXC_F_TMR_CNT_COUNT_POS 0
107#define MXC_F_TMR_CNT_COUNT ((uint32_t)(0xFFFFFFFFUL << MXC_F_TMR_CNT_COUNT_POS))
118#define MXC_F_TMR_CMP_COMPARE_POS 0
119#define MXC_F_TMR_CMP_COMPARE ((uint32_t)(0xFFFFFFFFUL << MXC_F_TMR_CMP_COMPARE_POS))
130#define MXC_F_TMR_PWM_PWM_POS 0
131#define MXC_F_TMR_PWM_PWM ((uint32_t)(0xFFFFFFFFUL << MXC_F_TMR_PWM_PWM_POS))
142#define MXC_F_TMR_INTR_IRQ_POS 0
143#define MXC_F_TMR_INTR_IRQ ((uint32_t)(0x1UL << MXC_F_TMR_INTR_IRQ_POS))
153#define MXC_F_TMR_CN_TMODE_POS 0
154#define MXC_F_TMR_CN_TMODE ((uint32_t)(0x7UL << MXC_F_TMR_CN_TMODE_POS))
155#define MXC_V_TMR_CN_TMODE_ONESHOT ((uint32_t)0x0UL)
156#define MXC_S_TMR_CN_TMODE_ONESHOT (MXC_V_TMR_CN_TMODE_ONESHOT << MXC_F_TMR_CN_TMODE_POS)
157#define MXC_V_TMR_CN_TMODE_CONTINUOUS ((uint32_t)0x1UL)
158#define MXC_S_TMR_CN_TMODE_CONTINUOUS (MXC_V_TMR_CN_TMODE_CONTINUOUS << MXC_F_TMR_CN_TMODE_POS)
159#define MXC_V_TMR_CN_TMODE_COUNTER ((uint32_t)0x2UL)
160#define MXC_S_TMR_CN_TMODE_COUNTER (MXC_V_TMR_CN_TMODE_COUNTER << MXC_F_TMR_CN_TMODE_POS)
161#define MXC_V_TMR_CN_TMODE_PWM ((uint32_t)0x3UL)
162#define MXC_S_TMR_CN_TMODE_PWM (MXC_V_TMR_CN_TMODE_PWM << MXC_F_TMR_CN_TMODE_POS)
163#define MXC_V_TMR_CN_TMODE_CAPTURE ((uint32_t)0x4UL)
164#define MXC_S_TMR_CN_TMODE_CAPTURE (MXC_V_TMR_CN_TMODE_CAPTURE << MXC_F_TMR_CN_TMODE_POS)
165#define MXC_V_TMR_CN_TMODE_COMPARE ((uint32_t)0x5UL)
166#define MXC_S_TMR_CN_TMODE_COMPARE (MXC_V_TMR_CN_TMODE_COMPARE << MXC_F_TMR_CN_TMODE_POS)
167#define MXC_V_TMR_CN_TMODE_GATED ((uint32_t)0x6UL)
168#define MXC_S_TMR_CN_TMODE_GATED (MXC_V_TMR_CN_TMODE_GATED << MXC_F_TMR_CN_TMODE_POS)
169#define MXC_V_TMR_CN_TMODE_CAPTURECOMPARE ((uint32_t)0x7UL)
170#define MXC_S_TMR_CN_TMODE_CAPTURECOMPARE (MXC_V_TMR_CN_TMODE_CAPTURECOMPARE << MXC_F_TMR_CN_TMODE_POS)
172#define MXC_F_TMR_CN_PRES_POS 3
173#define MXC_F_TMR_CN_PRES ((uint32_t)(0x7UL << MXC_F_TMR_CN_PRES_POS))
174#define MXC_V_TMR_CN_PRES_DIV1 ((uint32_t)0x0UL)
175#define MXC_S_TMR_CN_PRES_DIV1 (MXC_V_TMR_CN_PRES_DIV1 << MXC_F_TMR_CN_PRES_POS)
176#define MXC_V_TMR_CN_PRES_DIV2 ((uint32_t)0x1UL)
177#define MXC_S_TMR_CN_PRES_DIV2 (MXC_V_TMR_CN_PRES_DIV2 << MXC_F_TMR_CN_PRES_POS)
178#define MXC_V_TMR_CN_PRES_DIV4 ((uint32_t)0x2UL)
179#define MXC_S_TMR_CN_PRES_DIV4 (MXC_V_TMR_CN_PRES_DIV4 << MXC_F_TMR_CN_PRES_POS)
180#define MXC_V_TMR_CN_PRES_DIV8 ((uint32_t)0x3UL)
181#define MXC_S_TMR_CN_PRES_DIV8 (MXC_V_TMR_CN_PRES_DIV8 << MXC_F_TMR_CN_PRES_POS)
182#define MXC_V_TMR_CN_PRES_DIV16 ((uint32_t)0x4UL)
183#define MXC_S_TMR_CN_PRES_DIV16 (MXC_V_TMR_CN_PRES_DIV16 << MXC_F_TMR_CN_PRES_POS)
184#define MXC_V_TMR_CN_PRES_DIV32 ((uint32_t)0x5UL)
185#define MXC_S_TMR_CN_PRES_DIV32 (MXC_V_TMR_CN_PRES_DIV32 << MXC_F_TMR_CN_PRES_POS)
186#define MXC_V_TMR_CN_PRES_DIV64 ((uint32_t)0x6UL)
187#define MXC_S_TMR_CN_PRES_DIV64 (MXC_V_TMR_CN_PRES_DIV64 << MXC_F_TMR_CN_PRES_POS)
188#define MXC_V_TMR_CN_PRES_DIV128 ((uint32_t)0x7UL)
189#define MXC_S_TMR_CN_PRES_DIV128 (MXC_V_TMR_CN_PRES_DIV128 << MXC_F_TMR_CN_PRES_POS)
190#define MXC_V_TMR_CN_PRES_DIV256 ((uint32_t)0x0UL)
191#define MXC_S_TMR_CN_PRES_DIV256 (MXC_V_TMR_CN_PRES_DIV256 << MXC_F_TMR_CN_PRES_POS)
192#define MXC_V_TMR_CN_PRES_DIV512 ((uint32_t)0x2UL)
193#define MXC_S_TMR_CN_PRES_DIV512 (MXC_V_TMR_CN_PRES_DIV512 << MXC_F_TMR_CN_PRES_POS)
194#define MXC_V_TMR_CN_PRES_DIV1024 ((uint32_t)0x3UL)
195#define MXC_S_TMR_CN_PRES_DIV1024 (MXC_V_TMR_CN_PRES_DIV1024 << MXC_F_TMR_CN_PRES_POS)
196#define MXC_V_TMR_CN_PRES_DIV2048 ((uint32_t)0x4UL)
197#define MXC_S_TMR_CN_PRES_DIV2048 (MXC_V_TMR_CN_PRES_DIV2048 << MXC_F_TMR_CN_PRES_POS)
198#define MXC_V_TMR_CN_PRES_DIV4096 ((uint32_t)0x5UL)
199#define MXC_S_TMR_CN_PRES_DIV4096 (MXC_V_TMR_CN_PRES_DIV4096 << MXC_F_TMR_CN_PRES_POS)
201#define MXC_F_TMR_CN_TPOL_POS 6
202#define MXC_F_TMR_CN_TPOL ((uint32_t)(0x1UL << MXC_F_TMR_CN_TPOL_POS))
203#define MXC_V_TMR_CN_TPOL_ACTIVEHI ((uint32_t)0x0UL)
204#define MXC_S_TMR_CN_TPOL_ACTIVEHI (MXC_V_TMR_CN_TPOL_ACTIVEHI << MXC_F_TMR_CN_TPOL_POS)
205#define MXC_V_TMR_CN_TPOL_ACTIVELO ((uint32_t)0x1UL)
206#define MXC_S_TMR_CN_TPOL_ACTIVELO (MXC_V_TMR_CN_TPOL_ACTIVELO << MXC_F_TMR_CN_TPOL_POS)
208#define MXC_F_TMR_CN_TEN_POS 7
209#define MXC_F_TMR_CN_TEN ((uint32_t)(0x1UL << MXC_F_TMR_CN_TEN_POS))
210#define MXC_V_TMR_CN_TEN_DIS ((uint32_t)0x0UL)
211#define MXC_S_TMR_CN_TEN_DIS (MXC_V_TMR_CN_TEN_DIS << MXC_F_TMR_CN_TEN_POS)
212#define MXC_V_TMR_CN_TEN_EN ((uint32_t)0x1UL)
213#define MXC_S_TMR_CN_TEN_EN (MXC_V_TMR_CN_TEN_EN << MXC_F_TMR_CN_TEN_POS)
215#define MXC_F_TMR_CN_PRES3_POS 8
216#define MXC_F_TMR_CN_PRES3 ((uint32_t)(0x1UL << MXC_F_TMR_CN_PRES3_POS))
217#define MXC_V_TMR_CN_PRES3_DIV1 ((uint32_t)0x0UL)
218#define MXC_S_TMR_CN_PRES3_DIV1 (MXC_V_TMR_CN_PRES3_DIV1 << MXC_F_TMR_CN_PRES3_POS)
219#define MXC_V_TMR_CN_PRES3_DIV2 ((uint32_t)0x0UL)
220#define MXC_S_TMR_CN_PRES3_DIV2 (MXC_V_TMR_CN_PRES3_DIV2 << MXC_F_TMR_CN_PRES3_POS)
221#define MXC_V_TMR_CN_PRES3_DIV4 ((uint32_t)0x0UL)
222#define MXC_S_TMR_CN_PRES3_DIV4 (MXC_V_TMR_CN_PRES3_DIV4 << MXC_F_TMR_CN_PRES3_POS)
223#define MXC_V_TMR_CN_PRES3_DIV8 ((uint32_t)0x0UL)
224#define MXC_S_TMR_CN_PRES3_DIV8 (MXC_V_TMR_CN_PRES3_DIV8 << MXC_F_TMR_CN_PRES3_POS)
225#define MXC_V_TMR_CN_PRES3_DIV16 ((uint32_t)0x0UL)
226#define MXC_S_TMR_CN_PRES3_DIV16 (MXC_V_TMR_CN_PRES3_DIV16 << MXC_F_TMR_CN_PRES3_POS)
227#define MXC_V_TMR_CN_PRES3_DIV32 ((uint32_t)0x0UL)
228#define MXC_S_TMR_CN_PRES3_DIV32 (MXC_V_TMR_CN_PRES3_DIV32 << MXC_F_TMR_CN_PRES3_POS)
229#define MXC_V_TMR_CN_PRES3_DIV64 ((uint32_t)0x0UL)
230#define MXC_S_TMR_CN_PRES3_DIV64 (MXC_V_TMR_CN_PRES3_DIV64 << MXC_F_TMR_CN_PRES3_POS)
231#define MXC_V_TMR_CN_PRES3_DIV128 ((uint32_t)0x0UL)
232#define MXC_S_TMR_CN_PRES3_DIV128 (MXC_V_TMR_CN_PRES3_DIV128 << MXC_F_TMR_CN_PRES3_POS)
233#define MXC_V_TMR_CN_PRES3_DIV256 ((uint32_t)0x1UL)
234#define MXC_S_TMR_CN_PRES3_DIV256 (MXC_V_TMR_CN_PRES3_DIV256 << MXC_F_TMR_CN_PRES3_POS)
235#define MXC_V_TMR_CN_PRES3_DIV512 ((uint32_t)0x1UL)
236#define MXC_S_TMR_CN_PRES3_DIV512 (MXC_V_TMR_CN_PRES3_DIV512 << MXC_F_TMR_CN_PRES3_POS)
237#define MXC_V_TMR_CN_PRES3_DIV1024 ((uint32_t)0x1UL)
238#define MXC_S_TMR_CN_PRES3_DIV1024 (MXC_V_TMR_CN_PRES3_DIV1024 << MXC_F_TMR_CN_PRES3_POS)
239#define MXC_V_TMR_CN_PRES3_DIV2048 ((uint32_t)0x1UL)
240#define MXC_S_TMR_CN_PRES3_DIV2048 (MXC_V_TMR_CN_PRES3_DIV2048 << MXC_F_TMR_CN_PRES3_POS)
241#define MXC_V_TMR_CN_PRES3_DIV4096 ((uint32_t)0x1UL)
242#define MXC_S_TMR_CN_PRES3_DIV4096 (MXC_V_TMR_CN_PRES3_DIV4096 << MXC_F_TMR_CN_PRES3_POS)
244#define MXC_F_TMR_CN_PWMSYNC_POS 9
245#define MXC_F_TMR_CN_PWMSYNC ((uint32_t)(0x1UL << MXC_F_TMR_CN_PWMSYNC_POS))
246#define MXC_V_TMR_CN_PWMSYNC_DIS ((uint32_t)0x0UL)
247#define MXC_S_TMR_CN_PWMSYNC_DIS (MXC_V_TMR_CN_PWMSYNC_DIS << MXC_F_TMR_CN_PWMSYNC_POS)
248#define MXC_V_TMR_CN_PWMSYNC_EN ((uint32_t)0x1UL)
249#define MXC_S_TMR_CN_PWMSYNC_EN (MXC_V_TMR_CN_PWMSYNC_EN << MXC_F_TMR_CN_PWMSYNC_POS)
251#define MXC_F_TMR_CN_NOLHPOL_POS 10
252#define MXC_F_TMR_CN_NOLHPOL ((uint32_t)(0x1UL << MXC_F_TMR_CN_NOLHPOL_POS))
253#define MXC_V_TMR_CN_NOLHPOL_NORMAL ((uint32_t)0x0UL)
254#define MXC_S_TMR_CN_NOLHPOL_NORMAL (MXC_V_TMR_CN_NOLHPOL_NORMAL << MXC_F_TMR_CN_NOLHPOL_POS)
255#define MXC_V_TMR_CN_NOLHPOL_INVERT ((uint32_t)0x1UL)
256#define MXC_S_TMR_CN_NOLHPOL_INVERT (MXC_V_TMR_CN_NOLHPOL_INVERT << MXC_F_TMR_CN_NOLHPOL_POS)
258#define MXC_F_TMR_CN_NOLLPOL_POS 11
259#define MXC_F_TMR_CN_NOLLPOL ((uint32_t)(0x1UL << MXC_F_TMR_CN_NOLLPOL_POS))
260#define MXC_V_TMR_CN_NOLLPOL_NORMAL ((uint32_t)0x0UL)
261#define MXC_S_TMR_CN_NOLLPOL_NORMAL (MXC_V_TMR_CN_NOLLPOL_NORMAL << MXC_F_TMR_CN_NOLLPOL_POS)
262#define MXC_V_TMR_CN_NOLLPOL_INVERT ((uint32_t)0x1UL)
263#define MXC_S_TMR_CN_NOLLPOL_INVERT (MXC_V_TMR_CN_NOLLPOL_INVERT << MXC_F_TMR_CN_NOLLPOL_POS)
265#define MXC_F_TMR_CN_PWMCKBD_POS 12
266#define MXC_F_TMR_CN_PWMCKBD ((uint32_t)(0x1UL << MXC_F_TMR_CN_PWMCKBD_POS))
267#define MXC_V_TMR_CN_PWMCKBD_DIS ((uint32_t)0x1UL)
268#define MXC_S_TMR_CN_PWMCKBD_DIS (MXC_V_TMR_CN_PWMCKBD_DIS << MXC_F_TMR_CN_PWMCKBD_POS)
269#define MXC_V_TMR_CN_PWMCKBD_EN ((uint32_t)0x0UL)
270#define MXC_S_TMR_CN_PWMCKBD_EN (MXC_V_TMR_CN_PWMCKBD_EN << MXC_F_TMR_CN_PWMCKBD_POS)
280#define MXC_F_TMR_NOLCMP_NOLLCMP_POS 0
281#define MXC_F_TMR_NOLCMP_NOLLCMP ((uint32_t)(0xFFUL << MXC_F_TMR_NOLCMP_NOLLCMP_POS))
283#define MXC_F_TMR_NOLCMP_NOLHCMP_POS 8
284#define MXC_F_TMR_NOLCMP_NOLHCMP ((uint32_t)(0xFFUL << MXC_F_TMR_NOLCMP_NOLHCMP_POS))
288#ifdef __cplusplus
289}
290#endif
291
292#endif // LIBRARIES_CMSIS_DEVICE_MAXIM_MAX32650_INCLUDE_TMR_REGS_H_
__IO uint32_t cn
Definition: tmr_regs.h:81
__IO uint32_t pwm
Definition: tmr_regs.h:79
__IO uint32_t nolcmp
Definition: tmr_regs.h:82
__IO uint32_t cnt
Definition: tmr_regs.h:77
__IO uint32_t cmp
Definition: tmr_regs.h:78
__IO uint32_t intr
Definition: tmr_regs.h:80
Definition: tmr_regs.h:76