SAME54P20A Test Project
ac.h
Go to the documentation of this file.
1 
30 #ifndef _SAME54_AC_COMPONENT_
31 #define _SAME54_AC_COMPONENT_
32 
33 /* ========================================================================== */
35 /* ========================================================================== */
38 
39 #define AC_U2501
40 #define REV_AC 0x100
41 
42 /* -------- AC_CTRLA : (AC Offset: 0x00) (R/W 8) Control A -------- */
43 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
44 typedef union {
45  struct {
46  uint8_t SWRST:1;
47  uint8_t ENABLE:1;
48  uint8_t :6;
49  } bit;
50  uint8_t reg;
52 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
53 
54 #define AC_CTRLA_OFFSET 0x00
55 #define AC_CTRLA_RESETVALUE _U_(0x00)
57 #define AC_CTRLA_SWRST_Pos 0
58 #define AC_CTRLA_SWRST (_U_(0x1) << AC_CTRLA_SWRST_Pos)
59 #define AC_CTRLA_ENABLE_Pos 1
60 #define AC_CTRLA_ENABLE (_U_(0x1) << AC_CTRLA_ENABLE_Pos)
61 #define AC_CTRLA_MASK _U_(0x03)
63 /* -------- AC_CTRLB : (AC Offset: 0x01) ( /W 8) Control B -------- */
64 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
65 typedef union {
66  struct {
67  uint8_t START0:1;
68  uint8_t START1:1;
69  uint8_t :6;
70  } bit;
71  struct {
72  uint8_t START:2;
73  uint8_t :6;
74  } vec;
75  uint8_t reg;
77 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
78 
79 #define AC_CTRLB_OFFSET 0x01
80 #define AC_CTRLB_RESETVALUE _U_(0x00)
82 #define AC_CTRLB_START0_Pos 0
83 #define AC_CTRLB_START0 (_U_(1) << AC_CTRLB_START0_Pos)
84 #define AC_CTRLB_START1_Pos 1
85 #define AC_CTRLB_START1 (_U_(1) << AC_CTRLB_START1_Pos)
86 #define AC_CTRLB_START_Pos 0
87 #define AC_CTRLB_START_Msk (_U_(0x3) << AC_CTRLB_START_Pos)
88 #define AC_CTRLB_START(value) (AC_CTRLB_START_Msk & ((value) << AC_CTRLB_START_Pos))
89 #define AC_CTRLB_MASK _U_(0x03)
91 /* -------- AC_EVCTRL : (AC Offset: 0x02) (R/W 16) Event Control -------- */
92 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
93 typedef union {
94  struct {
95  uint16_t COMPEO0:1;
96  uint16_t COMPEO1:1;
97  uint16_t :2;
98  uint16_t WINEO0:1;
99  uint16_t :3;
100  uint16_t COMPEI0:1;
101  uint16_t COMPEI1:1;
102  uint16_t :2;
103  uint16_t INVEI0:1;
104  uint16_t INVEI1:1;
105  uint16_t :2;
106  } bit;
107  struct {
108  uint16_t COMPEO:2;
109  uint16_t :2;
110  uint16_t WINEO:1;
111  uint16_t :3;
112  uint16_t COMPEI:2;
113  uint16_t :2;
114  uint16_t INVEI:2;
115  uint16_t :2;
116  } vec;
117  uint16_t reg;
119 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
120 
121 #define AC_EVCTRL_OFFSET 0x02
122 #define AC_EVCTRL_RESETVALUE _U_(0x0000)
124 #define AC_EVCTRL_COMPEO0_Pos 0
125 #define AC_EVCTRL_COMPEO0 (_U_(1) << AC_EVCTRL_COMPEO0_Pos)
126 #define AC_EVCTRL_COMPEO1_Pos 1
127 #define AC_EVCTRL_COMPEO1 (_U_(1) << AC_EVCTRL_COMPEO1_Pos)
128 #define AC_EVCTRL_COMPEO_Pos 0
129 #define AC_EVCTRL_COMPEO_Msk (_U_(0x3) << AC_EVCTRL_COMPEO_Pos)
130 #define AC_EVCTRL_COMPEO(value) (AC_EVCTRL_COMPEO_Msk & ((value) << AC_EVCTRL_COMPEO_Pos))
131 #define AC_EVCTRL_WINEO0_Pos 4
132 #define AC_EVCTRL_WINEO0 (_U_(1) << AC_EVCTRL_WINEO0_Pos)
133 #define AC_EVCTRL_WINEO_Pos 4
134 #define AC_EVCTRL_WINEO_Msk (_U_(0x1) << AC_EVCTRL_WINEO_Pos)
135 #define AC_EVCTRL_WINEO(value) (AC_EVCTRL_WINEO_Msk & ((value) << AC_EVCTRL_WINEO_Pos))
136 #define AC_EVCTRL_COMPEI0_Pos 8
137 #define AC_EVCTRL_COMPEI0 (_U_(1) << AC_EVCTRL_COMPEI0_Pos)
138 #define AC_EVCTRL_COMPEI1_Pos 9
139 #define AC_EVCTRL_COMPEI1 (_U_(1) << AC_EVCTRL_COMPEI1_Pos)
140 #define AC_EVCTRL_COMPEI_Pos 8
141 #define AC_EVCTRL_COMPEI_Msk (_U_(0x3) << AC_EVCTRL_COMPEI_Pos)
142 #define AC_EVCTRL_COMPEI(value) (AC_EVCTRL_COMPEI_Msk & ((value) << AC_EVCTRL_COMPEI_Pos))
143 #define AC_EVCTRL_INVEI0_Pos 12
144 #define AC_EVCTRL_INVEI0 (_U_(1) << AC_EVCTRL_INVEI0_Pos)
145 #define AC_EVCTRL_INVEI1_Pos 13
146 #define AC_EVCTRL_INVEI1 (_U_(1) << AC_EVCTRL_INVEI1_Pos)
147 #define AC_EVCTRL_INVEI_Pos 12
148 #define AC_EVCTRL_INVEI_Msk (_U_(0x3) << AC_EVCTRL_INVEI_Pos)
149 #define AC_EVCTRL_INVEI(value) (AC_EVCTRL_INVEI_Msk & ((value) << AC_EVCTRL_INVEI_Pos))
150 #define AC_EVCTRL_MASK _U_(0x3313)
152 /* -------- AC_INTENCLR : (AC Offset: 0x04) (R/W 8) Interrupt Enable Clear -------- */
153 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
154 typedef union {
155  struct {
156  uint8_t COMP0:1;
157  uint8_t COMP1:1;
158  uint8_t :2;
159  uint8_t WIN0:1;
160  uint8_t :3;
161  } bit;
162  struct {
163  uint8_t COMP:2;
164  uint8_t :2;
165  uint8_t WIN:1;
166  uint8_t :3;
167  } vec;
168  uint8_t reg;
170 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
171 
172 #define AC_INTENCLR_OFFSET 0x04
173 #define AC_INTENCLR_RESETVALUE _U_(0x00)
175 #define AC_INTENCLR_COMP0_Pos 0
176 #define AC_INTENCLR_COMP0 (_U_(1) << AC_INTENCLR_COMP0_Pos)
177 #define AC_INTENCLR_COMP1_Pos 1
178 #define AC_INTENCLR_COMP1 (_U_(1) << AC_INTENCLR_COMP1_Pos)
179 #define AC_INTENCLR_COMP_Pos 0
180 #define AC_INTENCLR_COMP_Msk (_U_(0x3) << AC_INTENCLR_COMP_Pos)
181 #define AC_INTENCLR_COMP(value) (AC_INTENCLR_COMP_Msk & ((value) << AC_INTENCLR_COMP_Pos))
182 #define AC_INTENCLR_WIN0_Pos 4
183 #define AC_INTENCLR_WIN0 (_U_(1) << AC_INTENCLR_WIN0_Pos)
184 #define AC_INTENCLR_WIN_Pos 4
185 #define AC_INTENCLR_WIN_Msk (_U_(0x1) << AC_INTENCLR_WIN_Pos)
186 #define AC_INTENCLR_WIN(value) (AC_INTENCLR_WIN_Msk & ((value) << AC_INTENCLR_WIN_Pos))
187 #define AC_INTENCLR_MASK _U_(0x13)
189 /* -------- AC_INTENSET : (AC Offset: 0x05) (R/W 8) Interrupt Enable Set -------- */
190 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
191 typedef union {
192  struct {
193  uint8_t COMP0:1;
194  uint8_t COMP1:1;
195  uint8_t :2;
196  uint8_t WIN0:1;
197  uint8_t :3;
198  } bit;
199  struct {
200  uint8_t COMP:2;
201  uint8_t :2;
202  uint8_t WIN:1;
203  uint8_t :3;
204  } vec;
205  uint8_t reg;
207 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
208 
209 #define AC_INTENSET_OFFSET 0x05
210 #define AC_INTENSET_RESETVALUE _U_(0x00)
212 #define AC_INTENSET_COMP0_Pos 0
213 #define AC_INTENSET_COMP0 (_U_(1) << AC_INTENSET_COMP0_Pos)
214 #define AC_INTENSET_COMP1_Pos 1
215 #define AC_INTENSET_COMP1 (_U_(1) << AC_INTENSET_COMP1_Pos)
216 #define AC_INTENSET_COMP_Pos 0
217 #define AC_INTENSET_COMP_Msk (_U_(0x3) << AC_INTENSET_COMP_Pos)
218 #define AC_INTENSET_COMP(value) (AC_INTENSET_COMP_Msk & ((value) << AC_INTENSET_COMP_Pos))
219 #define AC_INTENSET_WIN0_Pos 4
220 #define AC_INTENSET_WIN0 (_U_(1) << AC_INTENSET_WIN0_Pos)
221 #define AC_INTENSET_WIN_Pos 4
222 #define AC_INTENSET_WIN_Msk (_U_(0x1) << AC_INTENSET_WIN_Pos)
223 #define AC_INTENSET_WIN(value) (AC_INTENSET_WIN_Msk & ((value) << AC_INTENSET_WIN_Pos))
224 #define AC_INTENSET_MASK _U_(0x13)
226 /* -------- AC_INTFLAG : (AC Offset: 0x06) (R/W 8) Interrupt Flag Status and Clear -------- */
227 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
228 typedef union { // __I to avoid read-modify-write on write-to-clear register
229  struct {
230  __I uint8_t COMP0:1;
231  __I uint8_t COMP1:1;
232  __I uint8_t :2;
233  __I uint8_t WIN0:1;
234  __I uint8_t :3;
235  } bit;
236  struct {
237  __I uint8_t COMP:2;
238  __I uint8_t :2;
239  __I uint8_t WIN:1;
240  __I uint8_t :3;
241  } vec;
242  uint8_t reg;
244 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
245 
246 #define AC_INTFLAG_OFFSET 0x06
247 #define AC_INTFLAG_RESETVALUE _U_(0x00)
249 #define AC_INTFLAG_COMP0_Pos 0
250 #define AC_INTFLAG_COMP0 (_U_(1) << AC_INTFLAG_COMP0_Pos)
251 #define AC_INTFLAG_COMP1_Pos 1
252 #define AC_INTFLAG_COMP1 (_U_(1) << AC_INTFLAG_COMP1_Pos)
253 #define AC_INTFLAG_COMP_Pos 0
254 #define AC_INTFLAG_COMP_Msk (_U_(0x3) << AC_INTFLAG_COMP_Pos)
255 #define AC_INTFLAG_COMP(value) (AC_INTFLAG_COMP_Msk & ((value) << AC_INTFLAG_COMP_Pos))
256 #define AC_INTFLAG_WIN0_Pos 4
257 #define AC_INTFLAG_WIN0 (_U_(1) << AC_INTFLAG_WIN0_Pos)
258 #define AC_INTFLAG_WIN_Pos 4
259 #define AC_INTFLAG_WIN_Msk (_U_(0x1) << AC_INTFLAG_WIN_Pos)
260 #define AC_INTFLAG_WIN(value) (AC_INTFLAG_WIN_Msk & ((value) << AC_INTFLAG_WIN_Pos))
261 #define AC_INTFLAG_MASK _U_(0x13)
263 /* -------- AC_STATUSA : (AC Offset: 0x07) (R/ 8) Status A -------- */
264 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
265 typedef union {
266  struct {
267  uint8_t STATE0:1;
268  uint8_t STATE1:1;
269  uint8_t :2;
270  uint8_t WSTATE0:2;
271  uint8_t :2;
272  } bit;
273  struct {
274  uint8_t STATE:2;
275  uint8_t :6;
276  } vec;
277  uint8_t reg;
279 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
280 
281 #define AC_STATUSA_OFFSET 0x07
282 #define AC_STATUSA_RESETVALUE _U_(0x00)
284 #define AC_STATUSA_STATE0_Pos 0
285 #define AC_STATUSA_STATE0 (_U_(1) << AC_STATUSA_STATE0_Pos)
286 #define AC_STATUSA_STATE1_Pos 1
287 #define AC_STATUSA_STATE1 (_U_(1) << AC_STATUSA_STATE1_Pos)
288 #define AC_STATUSA_STATE_Pos 0
289 #define AC_STATUSA_STATE_Msk (_U_(0x3) << AC_STATUSA_STATE_Pos)
290 #define AC_STATUSA_STATE(value) (AC_STATUSA_STATE_Msk & ((value) << AC_STATUSA_STATE_Pos))
291 #define AC_STATUSA_WSTATE0_Pos 4
292 #define AC_STATUSA_WSTATE0_Msk (_U_(0x3) << AC_STATUSA_WSTATE0_Pos)
293 #define AC_STATUSA_WSTATE0(value) (AC_STATUSA_WSTATE0_Msk & ((value) << AC_STATUSA_WSTATE0_Pos))
294 #define AC_STATUSA_WSTATE0_ABOVE_Val _U_(0x0)
295 #define AC_STATUSA_WSTATE0_INSIDE_Val _U_(0x1)
296 #define AC_STATUSA_WSTATE0_BELOW_Val _U_(0x2)
297 #define AC_STATUSA_WSTATE0_ABOVE (AC_STATUSA_WSTATE0_ABOVE_Val << AC_STATUSA_WSTATE0_Pos)
298 #define AC_STATUSA_WSTATE0_INSIDE (AC_STATUSA_WSTATE0_INSIDE_Val << AC_STATUSA_WSTATE0_Pos)
299 #define AC_STATUSA_WSTATE0_BELOW (AC_STATUSA_WSTATE0_BELOW_Val << AC_STATUSA_WSTATE0_Pos)
300 #define AC_STATUSA_MASK _U_(0x33)
302 /* -------- AC_STATUSB : (AC Offset: 0x08) (R/ 8) Status B -------- */
303 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
304 typedef union {
305  struct {
306  uint8_t READY0:1;
307  uint8_t READY1:1;
308  uint8_t :6;
309  } bit;
310  struct {
311  uint8_t READY:2;
312  uint8_t :6;
313  } vec;
314  uint8_t reg;
316 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
317 
318 #define AC_STATUSB_OFFSET 0x08
319 #define AC_STATUSB_RESETVALUE _U_(0x00)
321 #define AC_STATUSB_READY0_Pos 0
322 #define AC_STATUSB_READY0 (_U_(1) << AC_STATUSB_READY0_Pos)
323 #define AC_STATUSB_READY1_Pos 1
324 #define AC_STATUSB_READY1 (_U_(1) << AC_STATUSB_READY1_Pos)
325 #define AC_STATUSB_READY_Pos 0
326 #define AC_STATUSB_READY_Msk (_U_(0x3) << AC_STATUSB_READY_Pos)
327 #define AC_STATUSB_READY(value) (AC_STATUSB_READY_Msk & ((value) << AC_STATUSB_READY_Pos))
328 #define AC_STATUSB_MASK _U_(0x03)
330 /* -------- AC_DBGCTRL : (AC Offset: 0x09) (R/W 8) Debug Control -------- */
331 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
332 typedef union {
333  struct {
334  uint8_t DBGRUN:1;
335  uint8_t :7;
336  } bit;
337  uint8_t reg;
339 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
340 
341 #define AC_DBGCTRL_OFFSET 0x09
342 #define AC_DBGCTRL_RESETVALUE _U_(0x00)
344 #define AC_DBGCTRL_DBGRUN_Pos 0
345 #define AC_DBGCTRL_DBGRUN (_U_(0x1) << AC_DBGCTRL_DBGRUN_Pos)
346 #define AC_DBGCTRL_MASK _U_(0x01)
348 /* -------- AC_WINCTRL : (AC Offset: 0x0A) (R/W 8) Window Control -------- */
349 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
350 typedef union {
351  struct {
352  uint8_t WEN0:1;
353  uint8_t WINTSEL0:2;
354  uint8_t :5;
355  } bit;
356  uint8_t reg;
358 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
359 
360 #define AC_WINCTRL_OFFSET 0x0A
361 #define AC_WINCTRL_RESETVALUE _U_(0x00)
363 #define AC_WINCTRL_WEN0_Pos 0
364 #define AC_WINCTRL_WEN0 (_U_(0x1) << AC_WINCTRL_WEN0_Pos)
365 #define AC_WINCTRL_WINTSEL0_Pos 1
366 #define AC_WINCTRL_WINTSEL0_Msk (_U_(0x3) << AC_WINCTRL_WINTSEL0_Pos)
367 #define AC_WINCTRL_WINTSEL0(value) (AC_WINCTRL_WINTSEL0_Msk & ((value) << AC_WINCTRL_WINTSEL0_Pos))
368 #define AC_WINCTRL_WINTSEL0_ABOVE_Val _U_(0x0)
369 #define AC_WINCTRL_WINTSEL0_INSIDE_Val _U_(0x1)
370 #define AC_WINCTRL_WINTSEL0_BELOW_Val _U_(0x2)
371 #define AC_WINCTRL_WINTSEL0_OUTSIDE_Val _U_(0x3)
372 #define AC_WINCTRL_WINTSEL0_ABOVE (AC_WINCTRL_WINTSEL0_ABOVE_Val << AC_WINCTRL_WINTSEL0_Pos)
373 #define AC_WINCTRL_WINTSEL0_INSIDE (AC_WINCTRL_WINTSEL0_INSIDE_Val << AC_WINCTRL_WINTSEL0_Pos)
374 #define AC_WINCTRL_WINTSEL0_BELOW (AC_WINCTRL_WINTSEL0_BELOW_Val << AC_WINCTRL_WINTSEL0_Pos)
375 #define AC_WINCTRL_WINTSEL0_OUTSIDE (AC_WINCTRL_WINTSEL0_OUTSIDE_Val << AC_WINCTRL_WINTSEL0_Pos)
376 #define AC_WINCTRL_MASK _U_(0x07)
378 /* -------- AC_SCALER : (AC Offset: 0x0C) (R/W 8) Scaler n -------- */
379 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
380 typedef union {
381  struct {
382  uint8_t VALUE:6;
383  uint8_t :2;
384  } bit;
385  uint8_t reg;
387 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
388 
389 #define AC_SCALER_OFFSET 0x0C
390 #define AC_SCALER_RESETVALUE _U_(0x00)
392 #define AC_SCALER_VALUE_Pos 0
393 #define AC_SCALER_VALUE_Msk (_U_(0x3F) << AC_SCALER_VALUE_Pos)
394 #define AC_SCALER_VALUE(value) (AC_SCALER_VALUE_Msk & ((value) << AC_SCALER_VALUE_Pos))
395 #define AC_SCALER_MASK _U_(0x3F)
397 /* -------- AC_COMPCTRL : (AC Offset: 0x10) (R/W 32) Comparator Control n -------- */
398 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
399 typedef union {
400  struct {
401  uint32_t :1;
402  uint32_t ENABLE:1;
403  uint32_t SINGLE:1;
404  uint32_t INTSEL:2;
405  uint32_t :1;
406  uint32_t RUNSTDBY:1;
407  uint32_t :1;
408  uint32_t MUXNEG:3;
409  uint32_t :1;
410  uint32_t MUXPOS:3;
411  uint32_t SWAP:1;
412  uint32_t SPEED:2;
413  uint32_t :1;
414  uint32_t HYSTEN:1;
415  uint32_t HYST:2;
416  uint32_t :2;
417  uint32_t FLEN:3;
418  uint32_t :1;
419  uint32_t OUT:2;
420  uint32_t :2;
421  } bit;
422  uint32_t reg;
424 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
425 
426 #define AC_COMPCTRL_OFFSET 0x10
427 #define AC_COMPCTRL_RESETVALUE _U_(0x00000000)
429 #define AC_COMPCTRL_ENABLE_Pos 1
430 #define AC_COMPCTRL_ENABLE (_U_(0x1) << AC_COMPCTRL_ENABLE_Pos)
431 #define AC_COMPCTRL_SINGLE_Pos 2
432 #define AC_COMPCTRL_SINGLE (_U_(0x1) << AC_COMPCTRL_SINGLE_Pos)
433 #define AC_COMPCTRL_INTSEL_Pos 3
434 #define AC_COMPCTRL_INTSEL_Msk (_U_(0x3) << AC_COMPCTRL_INTSEL_Pos)
435 #define AC_COMPCTRL_INTSEL(value) (AC_COMPCTRL_INTSEL_Msk & ((value) << AC_COMPCTRL_INTSEL_Pos))
436 #define AC_COMPCTRL_INTSEL_TOGGLE_Val _U_(0x0)
437 #define AC_COMPCTRL_INTSEL_RISING_Val _U_(0x1)
438 #define AC_COMPCTRL_INTSEL_FALLING_Val _U_(0x2)
439 #define AC_COMPCTRL_INTSEL_EOC_Val _U_(0x3)
440 #define AC_COMPCTRL_INTSEL_TOGGLE (AC_COMPCTRL_INTSEL_TOGGLE_Val << AC_COMPCTRL_INTSEL_Pos)
441 #define AC_COMPCTRL_INTSEL_RISING (AC_COMPCTRL_INTSEL_RISING_Val << AC_COMPCTRL_INTSEL_Pos)
442 #define AC_COMPCTRL_INTSEL_FALLING (AC_COMPCTRL_INTSEL_FALLING_Val << AC_COMPCTRL_INTSEL_Pos)
443 #define AC_COMPCTRL_INTSEL_EOC (AC_COMPCTRL_INTSEL_EOC_Val << AC_COMPCTRL_INTSEL_Pos)
444 #define AC_COMPCTRL_RUNSTDBY_Pos 6
445 #define AC_COMPCTRL_RUNSTDBY (_U_(0x1) << AC_COMPCTRL_RUNSTDBY_Pos)
446 #define AC_COMPCTRL_MUXNEG_Pos 8
447 #define AC_COMPCTRL_MUXNEG_Msk (_U_(0x7) << AC_COMPCTRL_MUXNEG_Pos)
448 #define AC_COMPCTRL_MUXNEG(value) (AC_COMPCTRL_MUXNEG_Msk & ((value) << AC_COMPCTRL_MUXNEG_Pos))
449 #define AC_COMPCTRL_MUXNEG_PIN0_Val _U_(0x0)
450 #define AC_COMPCTRL_MUXNEG_PIN1_Val _U_(0x1)
451 #define AC_COMPCTRL_MUXNEG_PIN2_Val _U_(0x2)
452 #define AC_COMPCTRL_MUXNEG_PIN3_Val _U_(0x3)
453 #define AC_COMPCTRL_MUXNEG_GND_Val _U_(0x4)
454 #define AC_COMPCTRL_MUXNEG_VSCALE_Val _U_(0x5)
455 #define AC_COMPCTRL_MUXNEG_BANDGAP_Val _U_(0x6)
456 #define AC_COMPCTRL_MUXNEG_DAC_Val _U_(0x7)
457 #define AC_COMPCTRL_MUXNEG_PIN0 (AC_COMPCTRL_MUXNEG_PIN0_Val << AC_COMPCTRL_MUXNEG_Pos)
458 #define AC_COMPCTRL_MUXNEG_PIN1 (AC_COMPCTRL_MUXNEG_PIN1_Val << AC_COMPCTRL_MUXNEG_Pos)
459 #define AC_COMPCTRL_MUXNEG_PIN2 (AC_COMPCTRL_MUXNEG_PIN2_Val << AC_COMPCTRL_MUXNEG_Pos)
460 #define AC_COMPCTRL_MUXNEG_PIN3 (AC_COMPCTRL_MUXNEG_PIN3_Val << AC_COMPCTRL_MUXNEG_Pos)
461 #define AC_COMPCTRL_MUXNEG_GND (AC_COMPCTRL_MUXNEG_GND_Val << AC_COMPCTRL_MUXNEG_Pos)
462 #define AC_COMPCTRL_MUXNEG_VSCALE (AC_COMPCTRL_MUXNEG_VSCALE_Val << AC_COMPCTRL_MUXNEG_Pos)
463 #define AC_COMPCTRL_MUXNEG_BANDGAP (AC_COMPCTRL_MUXNEG_BANDGAP_Val << AC_COMPCTRL_MUXNEG_Pos)
464 #define AC_COMPCTRL_MUXNEG_DAC (AC_COMPCTRL_MUXNEG_DAC_Val << AC_COMPCTRL_MUXNEG_Pos)
465 #define AC_COMPCTRL_MUXPOS_Pos 12
466 #define AC_COMPCTRL_MUXPOS_Msk (_U_(0x7) << AC_COMPCTRL_MUXPOS_Pos)
467 #define AC_COMPCTRL_MUXPOS(value) (AC_COMPCTRL_MUXPOS_Msk & ((value) << AC_COMPCTRL_MUXPOS_Pos))
468 #define AC_COMPCTRL_MUXPOS_PIN0_Val _U_(0x0)
469 #define AC_COMPCTRL_MUXPOS_PIN1_Val _U_(0x1)
470 #define AC_COMPCTRL_MUXPOS_PIN2_Val _U_(0x2)
471 #define AC_COMPCTRL_MUXPOS_PIN3_Val _U_(0x3)
472 #define AC_COMPCTRL_MUXPOS_VSCALE_Val _U_(0x4)
473 #define AC_COMPCTRL_MUXPOS_PIN0 (AC_COMPCTRL_MUXPOS_PIN0_Val << AC_COMPCTRL_MUXPOS_Pos)
474 #define AC_COMPCTRL_MUXPOS_PIN1 (AC_COMPCTRL_MUXPOS_PIN1_Val << AC_COMPCTRL_MUXPOS_Pos)
475 #define AC_COMPCTRL_MUXPOS_PIN2 (AC_COMPCTRL_MUXPOS_PIN2_Val << AC_COMPCTRL_MUXPOS_Pos)
476 #define AC_COMPCTRL_MUXPOS_PIN3 (AC_COMPCTRL_MUXPOS_PIN3_Val << AC_COMPCTRL_MUXPOS_Pos)
477 #define AC_COMPCTRL_MUXPOS_VSCALE (AC_COMPCTRL_MUXPOS_VSCALE_Val << AC_COMPCTRL_MUXPOS_Pos)
478 #define AC_COMPCTRL_SWAP_Pos 15
479 #define AC_COMPCTRL_SWAP (_U_(0x1) << AC_COMPCTRL_SWAP_Pos)
480 #define AC_COMPCTRL_SPEED_Pos 16
481 #define AC_COMPCTRL_SPEED_Msk (_U_(0x3) << AC_COMPCTRL_SPEED_Pos)
482 #define AC_COMPCTRL_SPEED(value) (AC_COMPCTRL_SPEED_Msk & ((value) << AC_COMPCTRL_SPEED_Pos))
483 #define AC_COMPCTRL_SPEED_HIGH_Val _U_(0x3)
484 #define AC_COMPCTRL_SPEED_HIGH (AC_COMPCTRL_SPEED_HIGH_Val << AC_COMPCTRL_SPEED_Pos)
485 #define AC_COMPCTRL_HYSTEN_Pos 19
486 #define AC_COMPCTRL_HYSTEN (_U_(0x1) << AC_COMPCTRL_HYSTEN_Pos)
487 #define AC_COMPCTRL_HYST_Pos 20
488 #define AC_COMPCTRL_HYST_Msk (_U_(0x3) << AC_COMPCTRL_HYST_Pos)
489 #define AC_COMPCTRL_HYST(value) (AC_COMPCTRL_HYST_Msk & ((value) << AC_COMPCTRL_HYST_Pos))
490 #define AC_COMPCTRL_HYST_HYST50_Val _U_(0x0)
491 #define AC_COMPCTRL_HYST_HYST100_Val _U_(0x1)
492 #define AC_COMPCTRL_HYST_HYST150_Val _U_(0x2)
493 #define AC_COMPCTRL_HYST_HYST50 (AC_COMPCTRL_HYST_HYST50_Val << AC_COMPCTRL_HYST_Pos)
494 #define AC_COMPCTRL_HYST_HYST100 (AC_COMPCTRL_HYST_HYST100_Val << AC_COMPCTRL_HYST_Pos)
495 #define AC_COMPCTRL_HYST_HYST150 (AC_COMPCTRL_HYST_HYST150_Val << AC_COMPCTRL_HYST_Pos)
496 #define AC_COMPCTRL_FLEN_Pos 24
497 #define AC_COMPCTRL_FLEN_Msk (_U_(0x7) << AC_COMPCTRL_FLEN_Pos)
498 #define AC_COMPCTRL_FLEN(value) (AC_COMPCTRL_FLEN_Msk & ((value) << AC_COMPCTRL_FLEN_Pos))
499 #define AC_COMPCTRL_FLEN_OFF_Val _U_(0x0)
500 #define AC_COMPCTRL_FLEN_MAJ3_Val _U_(0x1)
501 #define AC_COMPCTRL_FLEN_MAJ5_Val _U_(0x2)
502 #define AC_COMPCTRL_FLEN_OFF (AC_COMPCTRL_FLEN_OFF_Val << AC_COMPCTRL_FLEN_Pos)
503 #define AC_COMPCTRL_FLEN_MAJ3 (AC_COMPCTRL_FLEN_MAJ3_Val << AC_COMPCTRL_FLEN_Pos)
504 #define AC_COMPCTRL_FLEN_MAJ5 (AC_COMPCTRL_FLEN_MAJ5_Val << AC_COMPCTRL_FLEN_Pos)
505 #define AC_COMPCTRL_OUT_Pos 28
506 #define AC_COMPCTRL_OUT_Msk (_U_(0x3) << AC_COMPCTRL_OUT_Pos)
507 #define AC_COMPCTRL_OUT(value) (AC_COMPCTRL_OUT_Msk & ((value) << AC_COMPCTRL_OUT_Pos))
508 #define AC_COMPCTRL_OUT_OFF_Val _U_(0x0)
509 #define AC_COMPCTRL_OUT_ASYNC_Val _U_(0x1)
510 #define AC_COMPCTRL_OUT_SYNC_Val _U_(0x2)
511 #define AC_COMPCTRL_OUT_OFF (AC_COMPCTRL_OUT_OFF_Val << AC_COMPCTRL_OUT_Pos)
512 #define AC_COMPCTRL_OUT_ASYNC (AC_COMPCTRL_OUT_ASYNC_Val << AC_COMPCTRL_OUT_Pos)
513 #define AC_COMPCTRL_OUT_SYNC (AC_COMPCTRL_OUT_SYNC_Val << AC_COMPCTRL_OUT_Pos)
514 #define AC_COMPCTRL_MASK _U_(0x373BF75E)
516 /* -------- AC_SYNCBUSY : (AC Offset: 0x20) (R/ 32) Synchronization Busy -------- */
517 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
518 typedef union {
519  struct {
520  uint32_t SWRST:1;
521  uint32_t ENABLE:1;
522  uint32_t WINCTRL:1;
523  uint32_t COMPCTRL0:1;
524  uint32_t COMPCTRL1:1;
525  uint32_t :27;
526  } bit;
527  struct {
528  uint32_t :3;
529  uint32_t COMPCTRL:2;
530  uint32_t :27;
531  } vec;
532  uint32_t reg;
534 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
535 
536 #define AC_SYNCBUSY_OFFSET 0x20
537 #define AC_SYNCBUSY_RESETVALUE _U_(0x00000000)
539 #define AC_SYNCBUSY_SWRST_Pos 0
540 #define AC_SYNCBUSY_SWRST (_U_(0x1) << AC_SYNCBUSY_SWRST_Pos)
541 #define AC_SYNCBUSY_ENABLE_Pos 1
542 #define AC_SYNCBUSY_ENABLE (_U_(0x1) << AC_SYNCBUSY_ENABLE_Pos)
543 #define AC_SYNCBUSY_WINCTRL_Pos 2
544 #define AC_SYNCBUSY_WINCTRL (_U_(0x1) << AC_SYNCBUSY_WINCTRL_Pos)
545 #define AC_SYNCBUSY_COMPCTRL0_Pos 3
546 #define AC_SYNCBUSY_COMPCTRL0 (_U_(1) << AC_SYNCBUSY_COMPCTRL0_Pos)
547 #define AC_SYNCBUSY_COMPCTRL1_Pos 4
548 #define AC_SYNCBUSY_COMPCTRL1 (_U_(1) << AC_SYNCBUSY_COMPCTRL1_Pos)
549 #define AC_SYNCBUSY_COMPCTRL_Pos 3
550 #define AC_SYNCBUSY_COMPCTRL_Msk (_U_(0x3) << AC_SYNCBUSY_COMPCTRL_Pos)
551 #define AC_SYNCBUSY_COMPCTRL(value) (AC_SYNCBUSY_COMPCTRL_Msk & ((value) << AC_SYNCBUSY_COMPCTRL_Pos))
552 #define AC_SYNCBUSY_MASK _U_(0x0000001F)
554 /* -------- AC_CALIB : (AC Offset: 0x24) (R/W 16) Calibration -------- */
555 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
556 typedef union {
557  struct {
558  uint16_t BIAS0:2;
559  uint16_t :14;
560  } bit;
561  uint16_t reg;
562 } AC_CALIB_Type;
563 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
564 
565 #define AC_CALIB_OFFSET 0x24
566 #define AC_CALIB_RESETVALUE _U_(0x0101)
568 #define AC_CALIB_BIAS0_Pos 0
569 #define AC_CALIB_BIAS0_Msk (_U_(0x3) << AC_CALIB_BIAS0_Pos)
570 #define AC_CALIB_BIAS0(value) (AC_CALIB_BIAS0_Msk & ((value) << AC_CALIB_BIAS0_Pos))
571 #define AC_CALIB_MASK _U_(0x0003)
574 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
575 typedef struct {
586  RoReg8 Reserved1[0x1];
587  __IO AC_SCALER_Type SCALER[2];
588  RoReg8 Reserved2[0x2];
589  __IO AC_COMPCTRL_Type COMPCTRL[2];
590  RoReg8 Reserved3[0x8];
593 } Ac;
594 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
595 
598 #endif /* _SAME54_AC_COMPONENT_ */
AC_INTENSET_Type::COMP1
uint8_t COMP1
Definition: ac.h:194
AC_INTENCLR_Type::WIN
uint8_t WIN
Definition: ac.h:165
AC_STATUSA_Type::STATE1
uint8_t STATE1
Definition: ac.h:268
AC_CTRLB_Type::START0
uint8_t START0
Definition: ac.h:67
AC_INTENSET_Type
Definition: ac.h:191
AC_COMPCTRL_Type::SINGLE
uint32_t SINGLE
Definition: ac.h:403
AC_SYNCBUSY_Type::SWRST
uint32_t SWRST
Definition: ac.h:520
AC_SCALER_Type::reg
uint8_t reg
Definition: ac.h:385
AC_EVCTRL_Type::INVEI0
uint16_t INVEI0
Definition: ac.h:103
AC_EVCTRL_Type::WINEO0
uint16_t WINEO0
Definition: ac.h:98
AC_CALIB_Type
Definition: ac.h:556
AC_SYNCBUSY_Type::WINCTRL
uint32_t WINCTRL
Definition: ac.h:522
AC_EVCTRL_Type::COMPEI0
uint16_t COMPEI0
Definition: ac.h:100
Ac::WINCTRL
__IO AC_WINCTRL_Type WINCTRL
Offset: 0x0A (R/W 8) Window Control.
Definition: ac.h:585
AC_STATUSA_Type::WSTATE0
uint8_t WSTATE0
Definition: ac.h:270
AC_COMPCTRL_Type::MUXPOS
uint32_t MUXPOS
Definition: ac.h:410
AC_CALIB_Type::BIAS0
uint16_t BIAS0
Definition: ac.h:558
AC_STATUSB_Type
Definition: ac.h:304
AC_INTENSET_Type::COMP0
uint8_t COMP0
Definition: ac.h:193
AC_EVCTRL_Type::COMPEO0
uint16_t COMPEO0
Definition: ac.h:95
AC_COMPCTRL_Type::SPEED
uint32_t SPEED
Definition: ac.h:412
AC_CALIB_Type::reg
uint16_t reg
Definition: ac.h:561
AC_COMPCTRL_Type::RUNSTDBY
uint32_t RUNSTDBY
Definition: ac.h:406
AC_EVCTRL_Type::COMPEI
uint16_t COMPEI
Definition: ac.h:112
AC_EVCTRL_Type
Definition: ac.h:93
AC_DBGCTRL_Type::reg
uint8_t reg
Definition: ac.h:337
AC_EVCTRL_Type::INVEI
uint16_t INVEI
Definition: ac.h:114
AC_WINCTRL_Type::WINTSEL0
uint8_t WINTSEL0
Definition: ac.h:353
Ac::DBGCTRL
__IO AC_DBGCTRL_Type DBGCTRL
Offset: 0x09 (R/W 8) Debug Control.
Definition: ac.h:584
Ac::INTFLAG
__IO AC_INTFLAG_Type INTFLAG
Offset: 0x06 (R/W 8) Interrupt Flag Status and Clear.
Definition: ac.h:581
AC_INTFLAG_Type::WIN
__I uint8_t WIN
Definition: ac.h:239
AC_COMPCTRL_Type::SWAP
uint32_t SWAP
Definition: ac.h:411
AC_SYNCBUSY_Type
Definition: ac.h:518
AC_CTRLB_Type::START1
uint8_t START1
Definition: ac.h:68
AC_EVCTRL_Type::COMPEO
uint16_t COMPEO
Definition: ac.h:108
AC_WINCTRL_Type::reg
uint8_t reg
Definition: ac.h:356
AC_EVCTRL_Type::COMPEO1
uint16_t COMPEO1
Definition: ac.h:96
AC_STATUSB_Type::reg
uint8_t reg
Definition: ac.h:314
AC_CTRLA_Type::reg
uint8_t reg
Definition: ac.h:50
AC_STATUSB_Type::READY
uint8_t READY
Definition: ac.h:311
AC_INTFLAG_Type::COMP
__I uint8_t COMP
Definition: ac.h:237
AC_CTRLB_Type
Definition: ac.h:65
AC_STATUSA_Type::STATE
uint8_t STATE
Definition: ac.h:274
AC_INTENCLR_Type::COMP0
uint8_t COMP0
Definition: ac.h:156
AC_COMPCTRL_Type::MUXNEG
uint32_t MUXNEG
Definition: ac.h:408
AC_INTFLAG_Type::reg
uint8_t reg
Definition: ac.h:242
AC_SYNCBUSY_Type::ENABLE
uint32_t ENABLE
Definition: ac.h:521
Ac::EVCTRL
__IO AC_EVCTRL_Type EVCTRL
Offset: 0x02 (R/W 16) Event Control.
Definition: ac.h:578
AC_INTFLAG_Type
Definition: ac.h:228
AC_INTENCLR_Type::COMP
uint8_t COMP
Definition: ac.h:163
Ac::INTENCLR
__IO AC_INTENCLR_Type INTENCLR
Offset: 0x04 (R/W 8) Interrupt Enable Clear.
Definition: ac.h:579
AC_INTENCLR_Type::reg
uint8_t reg
Definition: ac.h:168
Ac::STATUSB
__I AC_STATUSB_Type STATUSB
Offset: 0x08 (R/ 8) Status B.
Definition: ac.h:583
AC_INTFLAG_Type::COMP1
__I uint8_t COMP1
Definition: ac.h:231
AC_COMPCTRL_Type::INTSEL
uint32_t INTSEL
Definition: ac.h:404
AC_WINCTRL_Type
Definition: ac.h:350
AC_INTENSET_Type::COMP
uint8_t COMP
Definition: ac.h:200
AC_CTRLB_Type::START
uint8_t START
Definition: ac.h:72
Ac::CTRLB
__O AC_CTRLB_Type CTRLB
Offset: 0x01 ( /W 8) Control B.
Definition: ac.h:577
AC_SCALER_Type::VALUE
uint8_t VALUE
Definition: ac.h:382
AC_EVCTRL_Type::WINEO
uint16_t WINEO
Definition: ac.h:110
AC_INTFLAG_Type::WIN0
__I uint8_t WIN0
Definition: ac.h:233
AC_CTRLA_Type::SWRST
uint8_t SWRST
Definition: ac.h:46
AC_STATUSB_Type::READY0
uint8_t READY0
Definition: ac.h:306
AC_EVCTRL_Type::reg
uint16_t reg
Definition: ac.h:117
AC_STATUSA_Type
Definition: ac.h:265
AC_COMPCTRL_Type::HYSTEN
uint32_t HYSTEN
Definition: ac.h:414
AC_COMPCTRL_Type::ENABLE
uint32_t ENABLE
Definition: ac.h:402
AC_INTENSET_Type::WIN
uint8_t WIN
Definition: ac.h:202
AC_INTENSET_Type::WIN0
uint8_t WIN0
Definition: ac.h:196
AC_WINCTRL_Type::WEN0
uint8_t WEN0
Definition: ac.h:352
AC_SCALER_Type
Definition: ac.h:380
AC_INTENSET_Type::reg
uint8_t reg
Definition: ac.h:205
AC_COMPCTRL_Type::OUT
uint32_t OUT
Definition: ac.h:419
AC_STATUSA_Type::STATE0
uint8_t STATE0
Definition: ac.h:267
Ac::CALIB
__IO AC_CALIB_Type CALIB
Offset: 0x24 (R/W 16) Calibration.
Definition: ac.h:592
Ac::STATUSA
__I AC_STATUSA_Type STATUSA
Offset: 0x07 (R/ 8) Status A.
Definition: ac.h:582
Ac
AC hardware registers.
Definition: ac.h:575
Ac::SYNCBUSY
__I AC_SYNCBUSY_Type SYNCBUSY
Offset: 0x20 (R/ 32) Synchronization Busy.
Definition: ac.h:591
AC_SYNCBUSY_Type::reg
uint32_t reg
Definition: ac.h:532
AC_COMPCTRL_Type::HYST
uint32_t HYST
Definition: ac.h:415
AC_INTFLAG_Type::COMP0
__I uint8_t COMP0
Definition: ac.h:230
AC_COMPCTRL_Type
Definition: ac.h:399
Ac::CTRLA
__IO AC_CTRLA_Type CTRLA
Offset: 0x00 (R/W 8) Control A.
Definition: ac.h:576
AC_STATUSB_Type::READY1
uint8_t READY1
Definition: ac.h:307
AC_CTRLA_Type
Definition: ac.h:44
AC_SYNCBUSY_Type::COMPCTRL1
uint32_t COMPCTRL1
Definition: ac.h:524
AC_SYNCBUSY_Type::COMPCTRL
uint32_t COMPCTRL
Definition: ac.h:529
RoReg8
volatile const uint8_t RoReg8
Definition: same54n19a.h:53
AC_CTRLA_Type::ENABLE
uint8_t ENABLE
Definition: ac.h:47
AC_INTFLAG_Type::uint8_t
__I uint8_t
Definition: ac.h:232
AC_EVCTRL_Type::COMPEI1
uint16_t COMPEI1
Definition: ac.h:101
AC_SYNCBUSY_Type::COMPCTRL0
uint32_t COMPCTRL0
Definition: ac.h:523
AC_COMPCTRL_Type::reg
uint32_t reg
Definition: ac.h:422
AC_INTENCLR_Type
Definition: ac.h:154
AC_COMPCTRL_Type::FLEN
uint32_t FLEN
Definition: ac.h:417
Ac::INTENSET
__IO AC_INTENSET_Type INTENSET
Offset: 0x05 (R/W 8) Interrupt Enable Set.
Definition: ac.h:580
AC_CTRLB_Type::reg
uint8_t reg
Definition: ac.h:75
AC_EVCTRL_Type::INVEI1
uint16_t INVEI1
Definition: ac.h:104
AC_STATUSA_Type::reg
uint8_t reg
Definition: ac.h:277
AC_DBGCTRL_Type
Definition: ac.h:332
AC_DBGCTRL_Type::DBGRUN
uint8_t DBGRUN
Definition: ac.h:334
AC_INTENCLR_Type::WIN0
uint8_t WIN0
Definition: ac.h:159
AC_INTENCLR_Type::COMP1
uint8_t COMP1
Definition: ac.h:157