MAX32665 Peripheral Driver API
Peripheral Driver API for the MAX32665
simo_regs.h
1 
6 /* ****************************************************************************
7  * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a
10  * copy of this software and associated documentation files (the "Software"),
11  * to deal in the Software without restriction, including without limitation
12  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13  * and/or sell copies of the Software, and to permit persons to whom the
14  * Software is furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included
17  * in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22  * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
23  * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  *
27  * Except as contained in this notice, the name of Maxim Integrated
28  * Products, Inc. shall not be used except as stated in the Maxim Integrated
29  * Products, Inc. Branding Policy.
30  *
31  * The mere transfer of this software does not imply any licenses
32  * of trade secrets, proprietary technology, copyrights, patents,
33  * trademarks, maskwork rights, or any other form of intellectual
34  * property whatsoever. Maxim Integrated Products, Inc. retains all
35  * ownership rights.
36  *
37  *
38  *************************************************************************** */
39 
40 #ifndef _SIMO_REGS_H_
41 #define _SIMO_REGS_H_
42 
43 /* **** Includes **** */
44 #include <stdint.h>
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 #if defined (__ICCARM__)
51  #pragma system_include
52 #endif
53 
54 #if defined (__CC_ARM)
55  #pragma anon_unions
56 #endif
57 /*
59  If types are not defined elsewhere (CMSIS) define them here
60 */
61 #ifndef __IO
62 #define __IO volatile
63 #endif
64 #ifndef __I
65 #define __I volatile const
66 #endif
67 #ifndef __O
68 #define __O volatile
69 #endif
70 #ifndef __R
71 #define __R volatile const
72 #endif
73 
75 /* **** Definitions **** */
76 
88 typedef struct {
89  __R uint32_t rsv_0x0;
90  __IO uint32_t vrego_a;
91  __IO uint32_t vrego_b;
92  __IO uint32_t vrego_c;
93  __IO uint32_t vrego_d;
94  __IO uint32_t ipka;
95  __IO uint32_t ipkb;
96  __IO uint32_t maxton;
97  __I uint32_t iload_a;
98  __I uint32_t iload_b;
99  __I uint32_t iload_c;
100  __I uint32_t iload_d;
101  __IO uint32_t buck_alert_thr_a;
102  __IO uint32_t buck_alert_thr_b;
103  __IO uint32_t buck_alert_thr_c;
104  __IO uint32_t buck_alert_thr_d;
105  __I uint32_t buck_out_ready;
106  __I uint32_t zero_cross_cal_a;
107  __I uint32_t zero_cross_cal_b;
108  __I uint32_t zero_cross_cal_c;
109  __I uint32_t zero_cross_cal_d;
111 
112 /* Register offsets for module SIMO */
119  #define MXC_R_SIMO_VREGO_A ((uint32_t)0x00000004UL)
120  #define MXC_R_SIMO_VREGO_B ((uint32_t)0x00000008UL)
121  #define MXC_R_SIMO_VREGO_C ((uint32_t)0x0000000CUL)
122  #define MXC_R_SIMO_VREGO_D ((uint32_t)0x00000010UL)
123  #define MXC_R_SIMO_IPKA ((uint32_t)0x00000014UL)
124  #define MXC_R_SIMO_IPKB ((uint32_t)0x00000018UL)
125  #define MXC_R_SIMO_MAXTON ((uint32_t)0x0000001CUL)
126  #define MXC_R_SIMO_ILOAD_A ((uint32_t)0x00000020UL)
127  #define MXC_R_SIMO_ILOAD_B ((uint32_t)0x00000024UL)
128  #define MXC_R_SIMO_ILOAD_C ((uint32_t)0x00000028UL)
129  #define MXC_R_SIMO_ILOAD_D ((uint32_t)0x0000002CUL)
130  #define MXC_R_SIMO_BUCK_ALERT_THR_A ((uint32_t)0x00000030UL)
131  #define MXC_R_SIMO_BUCK_ALERT_THR_B ((uint32_t)0x00000034UL)
132  #define MXC_R_SIMO_BUCK_ALERT_THR_C ((uint32_t)0x00000038UL)
133  #define MXC_R_SIMO_BUCK_ALERT_THR_D ((uint32_t)0x0000003CUL)
134  #define MXC_R_SIMO_BUCK_OUT_READY ((uint32_t)0x00000040UL)
135  #define MXC_R_SIMO_ZERO_CROSS_CAL_A ((uint32_t)0x00000044UL)
136  #define MXC_R_SIMO_ZERO_CROSS_CAL_B ((uint32_t)0x00000048UL)
137  #define MXC_R_SIMO_ZERO_CROSS_CAL_C ((uint32_t)0x0000004CUL)
138  #define MXC_R_SIMO_ZERO_CROSS_CAL_D ((uint32_t)0x00000050UL)
147  #define MXC_F_SIMO_VREGO_A_VSETA_POS 0
148  #define MXC_F_SIMO_VREGO_A_VSETA ((uint32_t)(0x7FUL << MXC_F_SIMO_VREGO_A_VSETA_POS))
150  #define MXC_F_SIMO_VREGO_A_RANGEA_POS 7
151  #define MXC_F_SIMO_VREGO_A_RANGEA ((uint32_t)(0x1UL << MXC_F_SIMO_VREGO_A_RANGEA_POS))
161  #define MXC_F_SIMO_VREGO_B_VSETB_POS 0
162  #define MXC_F_SIMO_VREGO_B_VSETB ((uint32_t)(0x7FUL << MXC_F_SIMO_VREGO_B_VSETB_POS))
164  #define MXC_F_SIMO_VREGO_B_RANGEB_POS 7
165  #define MXC_F_SIMO_VREGO_B_RANGEB ((uint32_t)(0x1UL << MXC_F_SIMO_VREGO_B_RANGEB_POS))
175  #define MXC_F_SIMO_VREGO_C_VSETC_POS 0
176  #define MXC_F_SIMO_VREGO_C_VSETC ((uint32_t)(0x7FUL << MXC_F_SIMO_VREGO_C_VSETC_POS))
178  #define MXC_F_SIMO_VREGO_C_RANGEC_POS 7
179  #define MXC_F_SIMO_VREGO_C_RANGEC ((uint32_t)(0x1UL << MXC_F_SIMO_VREGO_C_RANGEC_POS))
189  #define MXC_F_SIMO_VREGO_D_VSETD_POS 0
190  #define MXC_F_SIMO_VREGO_D_VSETD ((uint32_t)(0x7FUL << MXC_F_SIMO_VREGO_D_VSETD_POS))
192  #define MXC_F_SIMO_VREGO_D_RANGED_POS 7
193  #define MXC_F_SIMO_VREGO_D_RANGED ((uint32_t)(0x1UL << MXC_F_SIMO_VREGO_D_RANGED_POS))
203  #define MXC_F_SIMO_IPKA_IPKSETA_POS 0
204  #define MXC_F_SIMO_IPKA_IPKSETA ((uint32_t)(0xFUL << MXC_F_SIMO_IPKA_IPKSETA_POS))
206  #define MXC_F_SIMO_IPKA_IPKSETB_POS 4
207  #define MXC_F_SIMO_IPKA_IPKSETB ((uint32_t)(0xFUL << MXC_F_SIMO_IPKA_IPKSETB_POS))
217  #define MXC_F_SIMO_IPKB_IPKSETC_POS 0
218  #define MXC_F_SIMO_IPKB_IPKSETC ((uint32_t)(0xFUL << MXC_F_SIMO_IPKB_IPKSETC_POS))
220  #define MXC_F_SIMO_IPKB_IPKSETD_POS 4
221  #define MXC_F_SIMO_IPKB_IPKSETD ((uint32_t)(0xFUL << MXC_F_SIMO_IPKB_IPKSETD_POS))
231  #define MXC_F_SIMO_MAXTON_TONSET_POS 0
232  #define MXC_F_SIMO_MAXTON_TONSET ((uint32_t)(0xFUL << MXC_F_SIMO_MAXTON_TONSET_POS))
242  #define MXC_F_SIMO_ILOAD_A_ILOADA_POS 0
243  #define MXC_F_SIMO_ILOAD_A_ILOADA ((uint32_t)(0xFFUL << MXC_F_SIMO_ILOAD_A_ILOADA_POS))
253  #define MXC_F_SIMO_ILOAD_B_ILOADB_POS 0
254  #define MXC_F_SIMO_ILOAD_B_ILOADB ((uint32_t)(0xFFUL << MXC_F_SIMO_ILOAD_B_ILOADB_POS))
264  #define MXC_F_SIMO_ILOAD_C_ILOADC_POS 0
265  #define MXC_F_SIMO_ILOAD_C_ILOADC ((uint32_t)(0xFFUL << MXC_F_SIMO_ILOAD_C_ILOADC_POS))
275  #define MXC_F_SIMO_ILOAD_D_ILOADD_POS 0
276  #define MXC_F_SIMO_ILOAD_D_ILOADD ((uint32_t)(0xFFUL << MXC_F_SIMO_ILOAD_D_ILOADD_POS))
286  #define MXC_F_SIMO_BUCK_ALERT_THR_A_BUCKTHRA_POS 0
287  #define MXC_F_SIMO_BUCK_ALERT_THR_A_BUCKTHRA ((uint32_t)(0xFFUL << MXC_F_SIMO_BUCK_ALERT_THR_A_BUCKTHRA_POS))
297  #define MXC_F_SIMO_BUCK_ALERT_THR_B_BUCKTHRB_POS 0
298  #define MXC_F_SIMO_BUCK_ALERT_THR_B_BUCKTHRB ((uint32_t)(0xFFUL << MXC_F_SIMO_BUCK_ALERT_THR_B_BUCKTHRB_POS))
308  #define MXC_F_SIMO_BUCK_ALERT_THR_C_BUCKTHRC_POS 0
309  #define MXC_F_SIMO_BUCK_ALERT_THR_C_BUCKTHRC ((uint32_t)(0xFFUL << MXC_F_SIMO_BUCK_ALERT_THR_C_BUCKTHRC_POS))
319  #define MXC_F_SIMO_BUCK_ALERT_THR_D_BUCKTHRD_POS 0
320  #define MXC_F_SIMO_BUCK_ALERT_THR_D_BUCKTHRD ((uint32_t)(0xFFUL << MXC_F_SIMO_BUCK_ALERT_THR_D_BUCKTHRD_POS))
330  #define MXC_F_SIMO_BUCK_OUT_READY_BUCKOUTRDYA_POS 0
331  #define MXC_F_SIMO_BUCK_OUT_READY_BUCKOUTRDYA ((uint32_t)(0x1UL << MXC_F_SIMO_BUCK_OUT_READY_BUCKOUTRDYA_POS))
333  #define MXC_F_SIMO_BUCK_OUT_READY_BUCKOUTRDYB_POS 1
334  #define MXC_F_SIMO_BUCK_OUT_READY_BUCKOUTRDYB ((uint32_t)(0x1UL << MXC_F_SIMO_BUCK_OUT_READY_BUCKOUTRDYB_POS))
336  #define MXC_F_SIMO_BUCK_OUT_READY_BUCKOUTRDYC_POS 2
337  #define MXC_F_SIMO_BUCK_OUT_READY_BUCKOUTRDYC ((uint32_t)(0x1UL << MXC_F_SIMO_BUCK_OUT_READY_BUCKOUTRDYC_POS))
339  #define MXC_F_SIMO_BUCK_OUT_READY_BUCKOUTRDYD_POS 3
340  #define MXC_F_SIMO_BUCK_OUT_READY_BUCKOUTRDYD ((uint32_t)(0x1UL << MXC_F_SIMO_BUCK_OUT_READY_BUCKOUTRDYD_POS))
350  #define MXC_F_SIMO_ZERO_CROSS_CAL_A_ZXCALA_POS 0
351  #define MXC_F_SIMO_ZERO_CROSS_CAL_A_ZXCALA ((uint32_t)(0xFUL << MXC_F_SIMO_ZERO_CROSS_CAL_A_ZXCALA_POS))
361  #define MXC_F_SIMO_ZERO_CROSS_CAL_B_ZXCALB_POS 0
362  #define MXC_F_SIMO_ZERO_CROSS_CAL_B_ZXCALB ((uint32_t)(0xFUL << MXC_F_SIMO_ZERO_CROSS_CAL_B_ZXCALB_POS))
372  #define MXC_F_SIMO_ZERO_CROSS_CAL_C_ZXCALC_POS 0
373  #define MXC_F_SIMO_ZERO_CROSS_CAL_C_ZXCALC ((uint32_t)(0xFUL << MXC_F_SIMO_ZERO_CROSS_CAL_C_ZXCALC_POS))
383  #define MXC_F_SIMO_ZERO_CROSS_CAL_D_ZXCALD_POS 0
384  #define MXC_F_SIMO_ZERO_CROSS_CAL_D_ZXCALD ((uint32_t)(0xFUL << MXC_F_SIMO_ZERO_CROSS_CAL_D_ZXCALD_POS))
388 #ifdef __cplusplus
389 }
390 #endif
391 
392 #endif /* _SIMO_REGS_H_ */
mxc_simo_regs_t::ipka
__IO uint32_t ipka
Definition: simo_regs.h:94
mxc_simo_regs_t::ipkb
__IO uint32_t ipkb
Definition: simo_regs.h:95
mxc_simo_regs_t::buck_alert_thr_c
__IO uint32_t buck_alert_thr_c
Definition: simo_regs.h:103
mxc_simo_regs_t::vrego_c
__IO uint32_t vrego_c
Definition: simo_regs.h:92
mxc_simo_regs_t::maxton
__IO uint32_t maxton
Definition: simo_regs.h:96
mxc_simo_regs_t::vrego_b
__IO uint32_t vrego_b
Definition: simo_regs.h:91
mxc_simo_regs_t::iload_c
__I uint32_t iload_c
Definition: simo_regs.h:99
mxc_simo_regs_t::iload_b
__I uint32_t iload_b
Definition: simo_regs.h:98
mxc_simo_regs_t::iload_d
__I uint32_t iload_d
Definition: simo_regs.h:100
mxc_simo_regs_t::vrego_d
__IO uint32_t vrego_d
Definition: simo_regs.h:93
mxc_simo_regs_t::buck_alert_thr_b
__IO uint32_t buck_alert_thr_b
Definition: simo_regs.h:102
mxc_simo_regs_t::buck_out_ready
__I uint32_t buck_out_ready
Definition: simo_regs.h:105
mxc_simo_regs_t::zero_cross_cal_b
__I uint32_t zero_cross_cal_b
Definition: simo_regs.h:107
mxc_simo_regs_t
Definition: simo_regs.h:88
mxc_simo_regs_t::buck_alert_thr_a
__IO uint32_t buck_alert_thr_a
Definition: simo_regs.h:101
mxc_simo_regs_t::zero_cross_cal_a
__I uint32_t zero_cross_cal_a
Definition: simo_regs.h:106
mxc_simo_regs_t::zero_cross_cal_c
__I uint32_t zero_cross_cal_c
Definition: simo_regs.h:108
mxc_simo_regs_t::buck_alert_thr_d
__IO uint32_t buck_alert_thr_d
Definition: simo_regs.h:104
mxc_simo_regs_t::iload_a
__I uint32_t iload_a
Definition: simo_regs.h:97
mxc_simo_regs_t::zero_cross_cal_d
__I uint32_t zero_cross_cal_d
Definition: simo_regs.h:109
mxc_simo_regs_t::vrego_a
__IO uint32_t vrego_a
Definition: simo_regs.h:90