SAME54P20A Test Project
adc1.h
Go to the documentation of this file.
1 
30 #ifndef _SAME54_ADC1_INSTANCE_
31 #define _SAME54_ADC1_INSTANCE_
32 
33 /* ========== Register definition for ADC1 peripheral ========== */
34 #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
35 #define REG_ADC1_CTRLA (0x43002000)
36 #define REG_ADC1_EVCTRL (0x43002002)
37 #define REG_ADC1_DBGCTRL (0x43002003)
38 #define REG_ADC1_INPUTCTRL (0x43002004)
39 #define REG_ADC1_CTRLB (0x43002006)
40 #define REG_ADC1_REFCTRL (0x43002008)
41 #define REG_ADC1_AVGCTRL (0x4300200A)
42 #define REG_ADC1_SAMPCTRL (0x4300200B)
43 #define REG_ADC1_WINLT (0x4300200C)
44 #define REG_ADC1_WINUT (0x4300200E)
45 #define REG_ADC1_GAINCORR (0x43002010)
46 #define REG_ADC1_OFFSETCORR (0x43002012)
47 #define REG_ADC1_SWTRIG (0x43002014)
48 #define REG_ADC1_INTENCLR (0x4300202C)
49 #define REG_ADC1_INTENSET (0x4300202D)
50 #define REG_ADC1_INTFLAG (0x4300202E)
51 #define REG_ADC1_STATUS (0x4300202F)
52 #define REG_ADC1_SYNCBUSY (0x43002030)
53 #define REG_ADC1_DSEQDATA (0x43002034)
54 #define REG_ADC1_DSEQCTRL (0x43002038)
55 #define REG_ADC1_DSEQSTAT (0x4300203C)
56 #define REG_ADC1_RESULT (0x43002040)
57 #define REG_ADC1_RESS (0x43002044)
58 #define REG_ADC1_CALIB (0x43002048)
59 #else
60 #define REG_ADC1_CTRLA (*(RwReg16*)0x43002000UL)
61 #define REG_ADC1_EVCTRL (*(RwReg8 *)0x43002002UL)
62 #define REG_ADC1_DBGCTRL (*(RwReg8 *)0x43002003UL)
63 #define REG_ADC1_INPUTCTRL (*(RwReg16*)0x43002004UL)
64 #define REG_ADC1_CTRLB (*(RwReg16*)0x43002006UL)
65 #define REG_ADC1_REFCTRL (*(RwReg8 *)0x43002008UL)
66 #define REG_ADC1_AVGCTRL (*(RwReg8 *)0x4300200AUL)
67 #define REG_ADC1_SAMPCTRL (*(RwReg8 *)0x4300200BUL)
68 #define REG_ADC1_WINLT (*(RwReg16*)0x4300200CUL)
69 #define REG_ADC1_WINUT (*(RwReg16*)0x4300200EUL)
70 #define REG_ADC1_GAINCORR (*(RwReg16*)0x43002010UL)
71 #define REG_ADC1_OFFSETCORR (*(RwReg16*)0x43002012UL)
72 #define REG_ADC1_SWTRIG (*(RwReg8 *)0x43002014UL)
73 #define REG_ADC1_INTENCLR (*(RwReg8 *)0x4300202CUL)
74 #define REG_ADC1_INTENSET (*(RwReg8 *)0x4300202DUL)
75 #define REG_ADC1_INTFLAG (*(RwReg8 *)0x4300202EUL)
76 #define REG_ADC1_STATUS (*(RoReg8 *)0x4300202FUL)
77 #define REG_ADC1_SYNCBUSY (*(RoReg *)0x43002030UL)
78 #define REG_ADC1_DSEQDATA (*(WoReg *)0x43002034UL)
79 #define REG_ADC1_DSEQCTRL (*(RwReg *)0x43002038UL)
80 #define REG_ADC1_DSEQSTAT (*(RoReg *)0x4300203CUL)
81 #define REG_ADC1_RESULT (*(RoReg16*)0x43002040UL)
82 #define REG_ADC1_RESS (*(RoReg16*)0x43002044UL)
83 #define REG_ADC1_CALIB (*(RwReg16*)0x43002048UL)
84 #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
85 
86 /* ========== Instance parameters for ADC1 peripheral ========== */
87 #define ADC1_BANDGAP 27 // MUXPOS value to select BANDGAP
88 #define ADC1_CTAT 29 // MUXPOS value to select CTAT
89 #define ADC1_DMAC_ID_RESRDY 70 // Index of DMA RESRDY trigger
90 #define ADC1_DMAC_ID_SEQ 71 // Index of DMA SEQ trigger
91 #define ADC1_EXTCHANNEL_MSB 15 // Number of external channels
92 #define ADC1_GCLK_ID 41 // Index of Generic Clock
93 #define ADC1_MASTER_SLAVE_MODE 2 // ADC Master/Slave Mode
94 #define ADC1_OPAMP2 0 // MUXPOS value to select OPAMP2
95 #define ADC1_OPAMP01 0 // MUXPOS value to select OPAMP01
96 #define ADC1_PTAT 28 // MUXPOS value to select PTAT
97 #define ADC1_TOUCH_IMPLEMENTED 0 // TOUCH implemented or not
98 #define ADC1_TOUCH_LINES_NUM 1 // Number of touch lines
99 
100 #endif /* _SAME54_ADC1_INSTANCE_ */