SAME54P20A Test Project
adc0.h
Go to the documentation of this file.
1 
30 #ifndef _SAME54_ADC0_INSTANCE_
31 #define _SAME54_ADC0_INSTANCE_
32 
33 /* ========== Register definition for ADC0 peripheral ========== */
34 #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
35 #define REG_ADC0_CTRLA (0x43001C00)
36 #define REG_ADC0_EVCTRL (0x43001C02)
37 #define REG_ADC0_DBGCTRL (0x43001C03)
38 #define REG_ADC0_INPUTCTRL (0x43001C04)
39 #define REG_ADC0_CTRLB (0x43001C06)
40 #define REG_ADC0_REFCTRL (0x43001C08)
41 #define REG_ADC0_AVGCTRL (0x43001C0A)
42 #define REG_ADC0_SAMPCTRL (0x43001C0B)
43 #define REG_ADC0_WINLT (0x43001C0C)
44 #define REG_ADC0_WINUT (0x43001C0E)
45 #define REG_ADC0_GAINCORR (0x43001C10)
46 #define REG_ADC0_OFFSETCORR (0x43001C12)
47 #define REG_ADC0_SWTRIG (0x43001C14)
48 #define REG_ADC0_INTENCLR (0x43001C2C)
49 #define REG_ADC0_INTENSET (0x43001C2D)
50 #define REG_ADC0_INTFLAG (0x43001C2E)
51 #define REG_ADC0_STATUS (0x43001C2F)
52 #define REG_ADC0_SYNCBUSY (0x43001C30)
53 #define REG_ADC0_DSEQDATA (0x43001C34)
54 #define REG_ADC0_DSEQCTRL (0x43001C38)
55 #define REG_ADC0_DSEQSTAT (0x43001C3C)
56 #define REG_ADC0_RESULT (0x43001C40)
57 #define REG_ADC0_RESS (0x43001C44)
58 #define REG_ADC0_CALIB (0x43001C48)
59 #else
60 #define REG_ADC0_CTRLA (*(RwReg16*)0x43001C00UL)
61 #define REG_ADC0_EVCTRL (*(RwReg8 *)0x43001C02UL)
62 #define REG_ADC0_DBGCTRL (*(RwReg8 *)0x43001C03UL)
63 #define REG_ADC0_INPUTCTRL (*(RwReg16*)0x43001C04UL)
64 #define REG_ADC0_CTRLB (*(RwReg16*)0x43001C06UL)
65 #define REG_ADC0_REFCTRL (*(RwReg8 *)0x43001C08UL)
66 #define REG_ADC0_AVGCTRL (*(RwReg8 *)0x43001C0AUL)
67 #define REG_ADC0_SAMPCTRL (*(RwReg8 *)0x43001C0BUL)
68 #define REG_ADC0_WINLT (*(RwReg16*)0x43001C0CUL)
69 #define REG_ADC0_WINUT (*(RwReg16*)0x43001C0EUL)
70 #define REG_ADC0_GAINCORR (*(RwReg16*)0x43001C10UL)
71 #define REG_ADC0_OFFSETCORR (*(RwReg16*)0x43001C12UL)
72 #define REG_ADC0_SWTRIG (*(RwReg8 *)0x43001C14UL)
73 #define REG_ADC0_INTENCLR (*(RwReg8 *)0x43001C2CUL)
74 #define REG_ADC0_INTENSET (*(RwReg8 *)0x43001C2DUL)
75 #define REG_ADC0_INTFLAG (*(RwReg8 *)0x43001C2EUL)
76 #define REG_ADC0_STATUS (*(RoReg8 *)0x43001C2FUL)
77 #define REG_ADC0_SYNCBUSY (*(RoReg *)0x43001C30UL)
78 #define REG_ADC0_DSEQDATA (*(WoReg *)0x43001C34UL)
79 #define REG_ADC0_DSEQCTRL (*(RwReg *)0x43001C38UL)
80 #define REG_ADC0_DSEQSTAT (*(RoReg *)0x43001C3CUL)
81 #define REG_ADC0_RESULT (*(RoReg16*)0x43001C40UL)
82 #define REG_ADC0_RESS (*(RoReg16*)0x43001C44UL)
83 #define REG_ADC0_CALIB (*(RwReg16*)0x43001C48UL)
84 #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
85 
86 /* ========== Instance parameters for ADC0 peripheral ========== */
87 #define ADC0_BANDGAP 27 // MUXPOS value to select BANDGAP
88 #define ADC0_CTAT 29 // MUXPOS value to select CTAT
89 #define ADC0_DMAC_ID_RESRDY 68 // index of DMA RESRDY trigger
90 #define ADC0_DMAC_ID_SEQ 69 // Index of DMA SEQ trigger
91 #define ADC0_EXTCHANNEL_MSB 15 // Number of external channels
92 #define ADC0_GCLK_ID 40 // index of Generic Clock
93 #define ADC0_MASTER_SLAVE_MODE 1 // ADC Master/Slave Mode
94 #define ADC0_OPAMP2 0 // MUXPOS value to select OPAMP2
95 #define ADC0_OPAMP01 0 // MUXPOS value to select OPAMP01
96 #define ADC0_PTAT 28 // MUXPOS value to select PTAT
97 #define ADC0_TOUCH_IMPLEMENTED 1 // TOUCH implemented or not
98 
99 #endif /* _SAME54_ADC0_INSTANCE_ */