EFM32 Zero Gecko Software Documentation  efm32zg-doc-5.1.2
efm32zg_prs.h
Go to the documentation of this file.
1 /**************************************************************************/
32 /**************************************************************************/
36 /**************************************************************************/
41 typedef struct
42 {
43  __IOM uint32_t SWPULSE;
44  __IOM uint32_t SWLEVEL;
45  __IOM uint32_t ROUTE;
47  uint32_t RESERVED0[1];
49 } PRS_TypeDef;
51 /**************************************************************************/
56 /* Bit fields for PRS SWPULSE */
57 #define _PRS_SWPULSE_RESETVALUE 0x00000000UL
58 #define _PRS_SWPULSE_MASK 0x0000000FUL
59 #define PRS_SWPULSE_CH0PULSE (0x1UL << 0)
60 #define _PRS_SWPULSE_CH0PULSE_SHIFT 0
61 #define _PRS_SWPULSE_CH0PULSE_MASK 0x1UL
62 #define _PRS_SWPULSE_CH0PULSE_DEFAULT 0x00000000UL
63 #define PRS_SWPULSE_CH0PULSE_DEFAULT (_PRS_SWPULSE_CH0PULSE_DEFAULT << 0)
64 #define PRS_SWPULSE_CH1PULSE (0x1UL << 1)
65 #define _PRS_SWPULSE_CH1PULSE_SHIFT 1
66 #define _PRS_SWPULSE_CH1PULSE_MASK 0x2UL
67 #define _PRS_SWPULSE_CH1PULSE_DEFAULT 0x00000000UL
68 #define PRS_SWPULSE_CH1PULSE_DEFAULT (_PRS_SWPULSE_CH1PULSE_DEFAULT << 1)
69 #define PRS_SWPULSE_CH2PULSE (0x1UL << 2)
70 #define _PRS_SWPULSE_CH2PULSE_SHIFT 2
71 #define _PRS_SWPULSE_CH2PULSE_MASK 0x4UL
72 #define _PRS_SWPULSE_CH2PULSE_DEFAULT 0x00000000UL
73 #define PRS_SWPULSE_CH2PULSE_DEFAULT (_PRS_SWPULSE_CH2PULSE_DEFAULT << 2)
74 #define PRS_SWPULSE_CH3PULSE (0x1UL << 3)
75 #define _PRS_SWPULSE_CH3PULSE_SHIFT 3
76 #define _PRS_SWPULSE_CH3PULSE_MASK 0x8UL
77 #define _PRS_SWPULSE_CH3PULSE_DEFAULT 0x00000000UL
78 #define PRS_SWPULSE_CH3PULSE_DEFAULT (_PRS_SWPULSE_CH3PULSE_DEFAULT << 3)
80 /* Bit fields for PRS SWLEVEL */
81 #define _PRS_SWLEVEL_RESETVALUE 0x00000000UL
82 #define _PRS_SWLEVEL_MASK 0x0000000FUL
83 #define PRS_SWLEVEL_CH0LEVEL (0x1UL << 0)
84 #define _PRS_SWLEVEL_CH0LEVEL_SHIFT 0
85 #define _PRS_SWLEVEL_CH0LEVEL_MASK 0x1UL
86 #define _PRS_SWLEVEL_CH0LEVEL_DEFAULT 0x00000000UL
87 #define PRS_SWLEVEL_CH0LEVEL_DEFAULT (_PRS_SWLEVEL_CH0LEVEL_DEFAULT << 0)
88 #define PRS_SWLEVEL_CH1LEVEL (0x1UL << 1)
89 #define _PRS_SWLEVEL_CH1LEVEL_SHIFT 1
90 #define _PRS_SWLEVEL_CH1LEVEL_MASK 0x2UL
91 #define _PRS_SWLEVEL_CH1LEVEL_DEFAULT 0x00000000UL
92 #define PRS_SWLEVEL_CH1LEVEL_DEFAULT (_PRS_SWLEVEL_CH1LEVEL_DEFAULT << 1)
93 #define PRS_SWLEVEL_CH2LEVEL (0x1UL << 2)
94 #define _PRS_SWLEVEL_CH2LEVEL_SHIFT 2
95 #define _PRS_SWLEVEL_CH2LEVEL_MASK 0x4UL
96 #define _PRS_SWLEVEL_CH2LEVEL_DEFAULT 0x00000000UL
97 #define PRS_SWLEVEL_CH2LEVEL_DEFAULT (_PRS_SWLEVEL_CH2LEVEL_DEFAULT << 2)
98 #define PRS_SWLEVEL_CH3LEVEL (0x1UL << 3)
99 #define _PRS_SWLEVEL_CH3LEVEL_SHIFT 3
100 #define _PRS_SWLEVEL_CH3LEVEL_MASK 0x8UL
101 #define _PRS_SWLEVEL_CH3LEVEL_DEFAULT 0x00000000UL
102 #define PRS_SWLEVEL_CH3LEVEL_DEFAULT (_PRS_SWLEVEL_CH3LEVEL_DEFAULT << 3)
104 /* Bit fields for PRS ROUTE */
105 #define _PRS_ROUTE_RESETVALUE 0x00000000UL
106 #define _PRS_ROUTE_MASK 0x0000070FUL
107 #define PRS_ROUTE_CH0PEN (0x1UL << 0)
108 #define _PRS_ROUTE_CH0PEN_SHIFT 0
109 #define _PRS_ROUTE_CH0PEN_MASK 0x1UL
110 #define _PRS_ROUTE_CH0PEN_DEFAULT 0x00000000UL
111 #define PRS_ROUTE_CH0PEN_DEFAULT (_PRS_ROUTE_CH0PEN_DEFAULT << 0)
112 #define PRS_ROUTE_CH1PEN (0x1UL << 1)
113 #define _PRS_ROUTE_CH1PEN_SHIFT 1
114 #define _PRS_ROUTE_CH1PEN_MASK 0x2UL
115 #define _PRS_ROUTE_CH1PEN_DEFAULT 0x00000000UL
116 #define PRS_ROUTE_CH1PEN_DEFAULT (_PRS_ROUTE_CH1PEN_DEFAULT << 1)
117 #define PRS_ROUTE_CH2PEN (0x1UL << 2)
118 #define _PRS_ROUTE_CH2PEN_SHIFT 2
119 #define _PRS_ROUTE_CH2PEN_MASK 0x4UL
120 #define _PRS_ROUTE_CH2PEN_DEFAULT 0x00000000UL
121 #define PRS_ROUTE_CH2PEN_DEFAULT (_PRS_ROUTE_CH2PEN_DEFAULT << 2)
122 #define PRS_ROUTE_CH3PEN (0x1UL << 3)
123 #define _PRS_ROUTE_CH3PEN_SHIFT 3
124 #define _PRS_ROUTE_CH3PEN_MASK 0x8UL
125 #define _PRS_ROUTE_CH3PEN_DEFAULT 0x00000000UL
126 #define PRS_ROUTE_CH3PEN_DEFAULT (_PRS_ROUTE_CH3PEN_DEFAULT << 3)
127 #define _PRS_ROUTE_LOCATION_SHIFT 8
128 #define _PRS_ROUTE_LOCATION_MASK 0x700UL
129 #define _PRS_ROUTE_LOCATION_LOC0 0x00000000UL
130 #define _PRS_ROUTE_LOCATION_DEFAULT 0x00000000UL
131 #define _PRS_ROUTE_LOCATION_LOC1 0x00000001UL
132 #define _PRS_ROUTE_LOCATION_LOC2 0x00000002UL
133 #define PRS_ROUTE_LOCATION_LOC0 (_PRS_ROUTE_LOCATION_LOC0 << 8)
134 #define PRS_ROUTE_LOCATION_DEFAULT (_PRS_ROUTE_LOCATION_DEFAULT << 8)
135 #define PRS_ROUTE_LOCATION_LOC1 (_PRS_ROUTE_LOCATION_LOC1 << 8)
136 #define PRS_ROUTE_LOCATION_LOC2 (_PRS_ROUTE_LOCATION_LOC2 << 8)
138 /* Bit fields for PRS CH_CTRL */
139 #define _PRS_CH_CTRL_RESETVALUE 0x00000000UL
140 #define _PRS_CH_CTRL_MASK 0x133F0007UL
141 #define _PRS_CH_CTRL_SIGSEL_SHIFT 0
142 #define _PRS_CH_CTRL_SIGSEL_MASK 0x7UL
143 #define _PRS_CH_CTRL_SIGSEL_VCMPOUT 0x00000000UL
144 #define _PRS_CH_CTRL_SIGSEL_ACMP0OUT 0x00000000UL
145 #define _PRS_CH_CTRL_SIGSEL_ADC0SINGLE 0x00000000UL
146 #define _PRS_CH_CTRL_SIGSEL_USART1IRTX 0x00000000UL
147 #define _PRS_CH_CTRL_SIGSEL_TIMER0UF 0x00000000UL
148 #define _PRS_CH_CTRL_SIGSEL_TIMER1UF 0x00000000UL
149 #define _PRS_CH_CTRL_SIGSEL_RTCOF 0x00000000UL
150 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN0 0x00000000UL
151 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN8 0x00000000UL
152 #define _PRS_CH_CTRL_SIGSEL_PCNT0TCC 0x00000000UL
153 #define _PRS_CH_CTRL_SIGSEL_ADC0SCAN 0x00000001UL
154 #define _PRS_CH_CTRL_SIGSEL_USART1TXC 0x00000001UL
155 #define _PRS_CH_CTRL_SIGSEL_TIMER0OF 0x00000001UL
156 #define _PRS_CH_CTRL_SIGSEL_TIMER1OF 0x00000001UL
157 #define _PRS_CH_CTRL_SIGSEL_RTCCOMP0 0x00000001UL
158 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN1 0x00000001UL
159 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN9 0x00000001UL
160 #define _PRS_CH_CTRL_SIGSEL_USART1RXDATAV 0x00000002UL
161 #define _PRS_CH_CTRL_SIGSEL_TIMER0CC0 0x00000002UL
162 #define _PRS_CH_CTRL_SIGSEL_TIMER1CC0 0x00000002UL
163 #define _PRS_CH_CTRL_SIGSEL_RTCCOMP1 0x00000002UL
164 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN2 0x00000002UL
165 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN10 0x00000002UL
166 #define _PRS_CH_CTRL_SIGSEL_TIMER0CC1 0x00000003UL
167 #define _PRS_CH_CTRL_SIGSEL_TIMER1CC1 0x00000003UL
168 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN3 0x00000003UL
169 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN11 0x00000003UL
170 #define _PRS_CH_CTRL_SIGSEL_TIMER0CC2 0x00000004UL
171 #define _PRS_CH_CTRL_SIGSEL_TIMER1CC2 0x00000004UL
172 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN4 0x00000004UL
173 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN12 0x00000004UL
174 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN5 0x00000005UL
175 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN13 0x00000005UL
176 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN6 0x00000006UL
177 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN14 0x00000006UL
178 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN7 0x00000007UL
179 #define _PRS_CH_CTRL_SIGSEL_GPIOPIN15 0x00000007UL
180 #define PRS_CH_CTRL_SIGSEL_VCMPOUT (_PRS_CH_CTRL_SIGSEL_VCMPOUT << 0)
181 #define PRS_CH_CTRL_SIGSEL_ACMP0OUT (_PRS_CH_CTRL_SIGSEL_ACMP0OUT << 0)
182 #define PRS_CH_CTRL_SIGSEL_ADC0SINGLE (_PRS_CH_CTRL_SIGSEL_ADC0SINGLE << 0)
183 #define PRS_CH_CTRL_SIGSEL_USART1IRTX (_PRS_CH_CTRL_SIGSEL_USART1IRTX << 0)
184 #define PRS_CH_CTRL_SIGSEL_TIMER0UF (_PRS_CH_CTRL_SIGSEL_TIMER0UF << 0)
185 #define PRS_CH_CTRL_SIGSEL_TIMER1UF (_PRS_CH_CTRL_SIGSEL_TIMER1UF << 0)
186 #define PRS_CH_CTRL_SIGSEL_RTCOF (_PRS_CH_CTRL_SIGSEL_RTCOF << 0)
187 #define PRS_CH_CTRL_SIGSEL_GPIOPIN0 (_PRS_CH_CTRL_SIGSEL_GPIOPIN0 << 0)
188 #define PRS_CH_CTRL_SIGSEL_GPIOPIN8 (_PRS_CH_CTRL_SIGSEL_GPIOPIN8 << 0)
189 #define PRS_CH_CTRL_SIGSEL_PCNT0TCC (_PRS_CH_CTRL_SIGSEL_PCNT0TCC << 0)
190 #define PRS_CH_CTRL_SIGSEL_ADC0SCAN (_PRS_CH_CTRL_SIGSEL_ADC0SCAN << 0)
191 #define PRS_CH_CTRL_SIGSEL_USART1TXC (_PRS_CH_CTRL_SIGSEL_USART1TXC << 0)
192 #define PRS_CH_CTRL_SIGSEL_TIMER0OF (_PRS_CH_CTRL_SIGSEL_TIMER0OF << 0)
193 #define PRS_CH_CTRL_SIGSEL_TIMER1OF (_PRS_CH_CTRL_SIGSEL_TIMER1OF << 0)
194 #define PRS_CH_CTRL_SIGSEL_RTCCOMP0 (_PRS_CH_CTRL_SIGSEL_RTCCOMP0 << 0)
195 #define PRS_CH_CTRL_SIGSEL_GPIOPIN1 (_PRS_CH_CTRL_SIGSEL_GPIOPIN1 << 0)
196 #define PRS_CH_CTRL_SIGSEL_GPIOPIN9 (_PRS_CH_CTRL_SIGSEL_GPIOPIN9 << 0)
197 #define PRS_CH_CTRL_SIGSEL_USART1RXDATAV (_PRS_CH_CTRL_SIGSEL_USART1RXDATAV << 0)
198 #define PRS_CH_CTRL_SIGSEL_TIMER0CC0 (_PRS_CH_CTRL_SIGSEL_TIMER0CC0 << 0)
199 #define PRS_CH_CTRL_SIGSEL_TIMER1CC0 (_PRS_CH_CTRL_SIGSEL_TIMER1CC0 << 0)
200 #define PRS_CH_CTRL_SIGSEL_RTCCOMP1 (_PRS_CH_CTRL_SIGSEL_RTCCOMP1 << 0)
201 #define PRS_CH_CTRL_SIGSEL_GPIOPIN2 (_PRS_CH_CTRL_SIGSEL_GPIOPIN2 << 0)
202 #define PRS_CH_CTRL_SIGSEL_GPIOPIN10 (_PRS_CH_CTRL_SIGSEL_GPIOPIN10 << 0)
203 #define PRS_CH_CTRL_SIGSEL_TIMER0CC1 (_PRS_CH_CTRL_SIGSEL_TIMER0CC1 << 0)
204 #define PRS_CH_CTRL_SIGSEL_TIMER1CC1 (_PRS_CH_CTRL_SIGSEL_TIMER1CC1 << 0)
205 #define PRS_CH_CTRL_SIGSEL_GPIOPIN3 (_PRS_CH_CTRL_SIGSEL_GPIOPIN3 << 0)
206 #define PRS_CH_CTRL_SIGSEL_GPIOPIN11 (_PRS_CH_CTRL_SIGSEL_GPIOPIN11 << 0)
207 #define PRS_CH_CTRL_SIGSEL_TIMER0CC2 (_PRS_CH_CTRL_SIGSEL_TIMER0CC2 << 0)
208 #define PRS_CH_CTRL_SIGSEL_TIMER1CC2 (_PRS_CH_CTRL_SIGSEL_TIMER1CC2 << 0)
209 #define PRS_CH_CTRL_SIGSEL_GPIOPIN4 (_PRS_CH_CTRL_SIGSEL_GPIOPIN4 << 0)
210 #define PRS_CH_CTRL_SIGSEL_GPIOPIN12 (_PRS_CH_CTRL_SIGSEL_GPIOPIN12 << 0)
211 #define PRS_CH_CTRL_SIGSEL_GPIOPIN5 (_PRS_CH_CTRL_SIGSEL_GPIOPIN5 << 0)
212 #define PRS_CH_CTRL_SIGSEL_GPIOPIN13 (_PRS_CH_CTRL_SIGSEL_GPIOPIN13 << 0)
213 #define PRS_CH_CTRL_SIGSEL_GPIOPIN6 (_PRS_CH_CTRL_SIGSEL_GPIOPIN6 << 0)
214 #define PRS_CH_CTRL_SIGSEL_GPIOPIN14 (_PRS_CH_CTRL_SIGSEL_GPIOPIN14 << 0)
215 #define PRS_CH_CTRL_SIGSEL_GPIOPIN7 (_PRS_CH_CTRL_SIGSEL_GPIOPIN7 << 0)
216 #define PRS_CH_CTRL_SIGSEL_GPIOPIN15 (_PRS_CH_CTRL_SIGSEL_GPIOPIN15 << 0)
217 #define _PRS_CH_CTRL_SOURCESEL_SHIFT 16
218 #define _PRS_CH_CTRL_SOURCESEL_MASK 0x3F0000UL
219 #define _PRS_CH_CTRL_SOURCESEL_NONE 0x00000000UL
220 #define _PRS_CH_CTRL_SOURCESEL_VCMP 0x00000001UL
221 #define _PRS_CH_CTRL_SOURCESEL_ACMP0 0x00000002UL
222 #define _PRS_CH_CTRL_SOURCESEL_ADC0 0x00000008UL
223 #define _PRS_CH_CTRL_SOURCESEL_USART1 0x00000011UL
224 #define _PRS_CH_CTRL_SOURCESEL_TIMER0 0x0000001CUL
225 #define _PRS_CH_CTRL_SOURCESEL_TIMER1 0x0000001DUL
226 #define _PRS_CH_CTRL_SOURCESEL_RTC 0x00000028UL
227 #define _PRS_CH_CTRL_SOURCESEL_GPIOL 0x00000030UL
228 #define _PRS_CH_CTRL_SOURCESEL_GPIOH 0x00000031UL
229 #define _PRS_CH_CTRL_SOURCESEL_PCNT0 0x00000036UL
230 #define PRS_CH_CTRL_SOURCESEL_NONE (_PRS_CH_CTRL_SOURCESEL_NONE << 16)
231 #define PRS_CH_CTRL_SOURCESEL_VCMP (_PRS_CH_CTRL_SOURCESEL_VCMP << 16)
232 #define PRS_CH_CTRL_SOURCESEL_ACMP0 (_PRS_CH_CTRL_SOURCESEL_ACMP0 << 16)
233 #define PRS_CH_CTRL_SOURCESEL_ADC0 (_PRS_CH_CTRL_SOURCESEL_ADC0 << 16)
234 #define PRS_CH_CTRL_SOURCESEL_USART1 (_PRS_CH_CTRL_SOURCESEL_USART1 << 16)
235 #define PRS_CH_CTRL_SOURCESEL_TIMER0 (_PRS_CH_CTRL_SOURCESEL_TIMER0 << 16)
236 #define PRS_CH_CTRL_SOURCESEL_TIMER1 (_PRS_CH_CTRL_SOURCESEL_TIMER1 << 16)
237 #define PRS_CH_CTRL_SOURCESEL_RTC (_PRS_CH_CTRL_SOURCESEL_RTC << 16)
238 #define PRS_CH_CTRL_SOURCESEL_GPIOL (_PRS_CH_CTRL_SOURCESEL_GPIOL << 16)
239 #define PRS_CH_CTRL_SOURCESEL_GPIOH (_PRS_CH_CTRL_SOURCESEL_GPIOH << 16)
240 #define PRS_CH_CTRL_SOURCESEL_PCNT0 (_PRS_CH_CTRL_SOURCESEL_PCNT0 << 16)
241 #define _PRS_CH_CTRL_EDSEL_SHIFT 24
242 #define _PRS_CH_CTRL_EDSEL_MASK 0x3000000UL
243 #define _PRS_CH_CTRL_EDSEL_DEFAULT 0x00000000UL
244 #define _PRS_CH_CTRL_EDSEL_OFF 0x00000000UL
245 #define _PRS_CH_CTRL_EDSEL_POSEDGE 0x00000001UL
246 #define _PRS_CH_CTRL_EDSEL_NEGEDGE 0x00000002UL
247 #define _PRS_CH_CTRL_EDSEL_BOTHEDGES 0x00000003UL
248 #define PRS_CH_CTRL_EDSEL_DEFAULT (_PRS_CH_CTRL_EDSEL_DEFAULT << 24)
249 #define PRS_CH_CTRL_EDSEL_OFF (_PRS_CH_CTRL_EDSEL_OFF << 24)
250 #define PRS_CH_CTRL_EDSEL_POSEDGE (_PRS_CH_CTRL_EDSEL_POSEDGE << 24)
251 #define PRS_CH_CTRL_EDSEL_NEGEDGE (_PRS_CH_CTRL_EDSEL_NEGEDGE << 24)
252 #define PRS_CH_CTRL_EDSEL_BOTHEDGES (_PRS_CH_CTRL_EDSEL_BOTHEDGES << 24)
253 #define PRS_CH_CTRL_ASYNC (0x1UL << 28)
254 #define _PRS_CH_CTRL_ASYNC_SHIFT 28
255 #define _PRS_CH_CTRL_ASYNC_MASK 0x10000000UL
256 #define _PRS_CH_CTRL_ASYNC_DEFAULT 0x00000000UL
257 #define PRS_CH_CTRL_ASYNC_DEFAULT (_PRS_CH_CTRL_ASYNC_DEFAULT << 28)
__IOM uint32_t ROUTE
Definition: efm32zg_prs.h:45
PRS_CH EFM32ZG PRS CH.
__IOM uint32_t SWLEVEL
Definition: efm32zg_prs.h:44
__IOM uint32_t SWPULSE
Definition: efm32zg_prs.h:43