1 //-----------------------------------------------------------------------------
2 // Copyright 2012 (c) Silicon Laboratories Inc.
3 //
4 // SPDX-License-Identifier: Zlib
5 //
6 // This siHAL software is provided 'as-is', without any express or implied
7 // warranty. In no event will the authors be held liable for any damages
8 // arising from the use of this software.
9 //
10 // Permission is granted to anyone to use this software for any purpose,
11 // including commercial applications, and to alter it and redistribute it
12 // freely, subject to the following restrictions:
13 //
14 // 1. The origin of this software must not be misrepresented; you must not
15 //    claim that you wrote the original software. If you use this software
16 //    in a product, an acknowledgment in the product documentation would be
17 //    appreciated but is not required.
18 // 2. Altered source versions must be plainly marked as such, and must not be
19 //    misrepresented as being the original software.
20 // 3. This notice may not be removed or altered from any source distribution.
21 //-----------------------------------------------------------------------------
22 //
23 // Script: 0.61
24 // Version: 1
25 
26 #ifndef __SI32_PVTOSC_A_REGISTERS_H__
27 #define __SI32_PVTOSC_A_REGISTERS_H__
28 
29 #include <stdint.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 struct SI32_PVTOSC_A_CONTROL_Struct
36 {
37    union
38    {
39       struct
40       {
41          // Digital LDO Oscillator Enable
42          volatile uint32_t DIGOSCEN: 1;
43          // Memory LDO Oscillator Enable
44          volatile uint32_t MEMOSCEN: 1;
45                   uint32_t reserved0: 2;
46          // Digital LDO Oscillator Mode
47          volatile uint32_t DIGOSCMD: 1;
48          // High Voltage Oscillator Mode
49          volatile uint32_t MEMOSCMD: 1;
50          // Clock Select
51          volatile uint32_t CLKSEL: 1;
52                   uint32_t reserved1: 25;
53       };
54       volatile uint32_t U32;
55    };
56 };
57 
58 #define SI32_PVTOSC_A_CONTROL_DIGOSCEN_MASK  0x00000001
59 #define SI32_PVTOSC_A_CONTROL_DIGOSCEN_SHIFT  0
60 // Disable the digital LDO PVT oscillator.
61 #define SI32_PVTOSC_A_CONTROL_DIGOSCEN_DISABLED_VALUE  0
62 #define SI32_PVTOSC_A_CONTROL_DIGOSCEN_DISABLED_U32 \
63    (SI32_PVTOSC_A_CONTROL_DIGOSCEN_DISABLED_VALUE << SI32_PVTOSC_A_CONTROL_DIGOSCEN_SHIFT)
64 // Enable the digital LDO PVT oscillator.
65 #define SI32_PVTOSC_A_CONTROL_DIGOSCEN_ENABLED_VALUE  1
66 #define SI32_PVTOSC_A_CONTROL_DIGOSCEN_ENABLED_U32 \
67    (SI32_PVTOSC_A_CONTROL_DIGOSCEN_ENABLED_VALUE << SI32_PVTOSC_A_CONTROL_DIGOSCEN_SHIFT)
68 
69 #define SI32_PVTOSC_A_CONTROL_MEMOSCEN_MASK  0x00000002
70 #define SI32_PVTOSC_A_CONTROL_MEMOSCEN_SHIFT  1
71 // Disable the memory LDO PVT oscillator.
72 #define SI32_PVTOSC_A_CONTROL_MEMOSCEN_DISABLED_VALUE  0
73 #define SI32_PVTOSC_A_CONTROL_MEMOSCEN_DISABLED_U32 \
74    (SI32_PVTOSC_A_CONTROL_MEMOSCEN_DISABLED_VALUE << SI32_PVTOSC_A_CONTROL_MEMOSCEN_SHIFT)
75 // Enable the memory LDO PVT oscillator.
76 #define SI32_PVTOSC_A_CONTROL_MEMOSCEN_ENABLED_VALUE  1
77 #define SI32_PVTOSC_A_CONTROL_MEMOSCEN_ENABLED_U32 \
78    (SI32_PVTOSC_A_CONTROL_MEMOSCEN_ENABLED_VALUE << SI32_PVTOSC_A_CONTROL_MEMOSCEN_SHIFT)
79 
80 #define SI32_PVTOSC_A_CONTROL_DIGOSCMD_MASK  0x00000010
81 #define SI32_PVTOSC_A_CONTROL_DIGOSCMD_SHIFT  4
82 // Select fast mode for the digital LDO PVT oscillator.
83 #define SI32_PVTOSC_A_CONTROL_DIGOSCMD_FAST_VALUE  0
84 #define SI32_PVTOSC_A_CONTROL_DIGOSCMD_FAST_U32 \
85    (SI32_PVTOSC_A_CONTROL_DIGOSCMD_FAST_VALUE << SI32_PVTOSC_A_CONTROL_DIGOSCMD_SHIFT)
86 // Select slow mode for the digital LDO PVT oscillator.
87 #define SI32_PVTOSC_A_CONTROL_DIGOSCMD_SLOW_VALUE  1
88 #define SI32_PVTOSC_A_CONTROL_DIGOSCMD_SLOW_U32 \
89    (SI32_PVTOSC_A_CONTROL_DIGOSCMD_SLOW_VALUE << SI32_PVTOSC_A_CONTROL_DIGOSCMD_SHIFT)
90 
91 #define SI32_PVTOSC_A_CONTROL_MEMOSCMD_MASK  0x00000020
92 #define SI32_PVTOSC_A_CONTROL_MEMOSCMD_SHIFT  5
93 // Select fast mode for the memory LDO PVT oscillator.
94 #define SI32_PVTOSC_A_CONTROL_MEMOSCMD_FAST_VALUE  0
95 #define SI32_PVTOSC_A_CONTROL_MEMOSCMD_FAST_U32 \
96    (SI32_PVTOSC_A_CONTROL_MEMOSCMD_FAST_VALUE << SI32_PVTOSC_A_CONTROL_MEMOSCMD_SHIFT)
97 // Select slow mode for the memory LDO PVT oscillator.
98 #define SI32_PVTOSC_A_CONTROL_MEMOSCMD_SLOW_VALUE  1
99 #define SI32_PVTOSC_A_CONTROL_MEMOSCMD_SLOW_U32 \
100    (SI32_PVTOSC_A_CONTROL_MEMOSCMD_SLOW_VALUE << SI32_PVTOSC_A_CONTROL_MEMOSCMD_SHIFT)
101 
102 #define SI32_PVTOSC_A_CONTROL_CLKSEL_MASK  0x00000040
103 #define SI32_PVTOSC_A_CONTROL_CLKSEL_SHIFT  6
104 // Select the digital and memory oscillators as the inputs to the clock dividers.
105 #define SI32_PVTOSC_A_CONTROL_CLKSEL_OSCILLATORS_VALUE  0
106 #define SI32_PVTOSC_A_CONTROL_CLKSEL_OSCILLATORS_U32 \
107    (SI32_PVTOSC_A_CONTROL_CLKSEL_OSCILLATORS_VALUE << SI32_PVTOSC_A_CONTROL_CLKSEL_SHIFT)
108 // Select the APB clock as the input to the clock dividers.
109 #define SI32_PVTOSC_A_CONTROL_CLKSEL_AHB_VALUE  1
110 #define SI32_PVTOSC_A_CONTROL_CLKSEL_AHB_U32 \
111    (SI32_PVTOSC_A_CONTROL_CLKSEL_AHB_VALUE << SI32_PVTOSC_A_CONTROL_CLKSEL_SHIFT)
112 
113 
114 
115 typedef struct SI32_PVTOSC_A_Struct
116 {
117    struct SI32_PVTOSC_A_CONTROL_Struct             CONTROL        ; // Base Address + 0x0
118    volatile uint32_t                               CONTROL_SET;
119    volatile uint32_t                               CONTROL_CLR;
120    uint32_t                                        reserved0;
121 } SI32_PVTOSC_A_Type;
122 
123 #ifdef __cplusplus
124 }
125 #endif
126 
127 #endif // __SI32_PVTOSC_A_REGISTERS_H__
128 
129 //-eof--------------------------------------------------------------------------
130 
131