afec.h
Go to the documentation of this file.
1 
31 /*
32  * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
33  */
34 
35 #ifndef _SAME70_AFEC_COMPONENT_
36 #define _SAME70_AFEC_COMPONENT_
37 
38 /* ============================================================================= */
40 /* ============================================================================= */
43 
44 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
45 
46 typedef struct {
47  __O uint32_t AFEC_CR;
48  __IO uint32_t AFEC_MR;
49  __IO uint32_t AFEC_EMR;
50  __IO uint32_t AFEC_SEQ1R;
51  __IO uint32_t AFEC_SEQ2R;
52  __O uint32_t AFEC_CHER;
53  __O uint32_t AFEC_CHDR;
54  __I uint32_t AFEC_CHSR;
55  __I uint32_t AFEC_LCDR;
56  __O uint32_t AFEC_IER;
57  __O uint32_t AFEC_IDR;
58  __I uint32_t AFEC_IMR;
59  __I uint32_t AFEC_ISR;
60  __I uint32_t Reserved1[6];
61  __I uint32_t AFEC_OVER;
62  __IO uint32_t AFEC_CWR;
63  __IO uint32_t AFEC_CGR;
64  __I uint32_t Reserved2[2];
65  __IO uint32_t AFEC_DIFFR;
66  __IO uint32_t AFEC_CSELR;
67  __I uint32_t AFEC_CDR;
68  __IO uint32_t AFEC_COCR;
69  __IO uint32_t AFEC_TEMPMR;
70  __IO uint32_t AFEC_TEMPCWR;
71  __I uint32_t Reserved3[7];
72  __IO uint32_t AFEC_ACR;
73  __I uint32_t Reserved4[2];
74  __IO uint32_t AFEC_SHMR;
75  __I uint32_t Reserved5[11];
76  __IO uint32_t AFEC_COSR;
77  __IO uint32_t AFEC_CVR;
78  __IO uint32_t AFEC_CECR;
79  __I uint32_t Reserved6[2];
80  __IO uint32_t AFEC_WPMR;
81  __I uint32_t AFEC_WPSR;
82  __I uint32_t Reserved7[4];
83  __I uint32_t AFEC_VERSION;
84 } Afec;
85 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
86 /* -------- AFEC_CR : (AFEC Offset: 0x00) AFEC Control Register -------- */
87 #define AFEC_CR_SWRST (0x1u << 0)
88 #define AFEC_CR_START (0x1u << 1)
89 /* -------- AFEC_MR : (AFEC Offset: 0x04) AFEC Mode Register -------- */
90 #define AFEC_MR_TRGEN (0x1u << 0)
91 #define AFEC_MR_TRGEN_DIS (0x0u << 0)
92 #define AFEC_MR_TRGEN_EN (0x1u << 0)
93 #define AFEC_MR_TRGSEL_Pos 1
94 #define AFEC_MR_TRGSEL_Msk (0x7u << AFEC_MR_TRGSEL_Pos)
95 #define AFEC_MR_TRGSEL(value) ((AFEC_MR_TRGSEL_Msk & ((value) << AFEC_MR_TRGSEL_Pos)))
96 #define AFEC_MR_TRGSEL_AFEC_TRIG0 (0x0u << 1)
97 #define AFEC_MR_TRGSEL_AFEC_TRIG1 (0x1u << 1)
98 #define AFEC_MR_TRGSEL_AFEC_TRIG2 (0x2u << 1)
99 #define AFEC_MR_TRGSEL_AFEC_TRIG3 (0x3u << 1)
100 #define AFEC_MR_TRGSEL_AFEC_TRIG4 (0x4u << 1)
101 #define AFEC_MR_TRGSEL_AFEC_TRIG5 (0x5u << 1)
102 #define AFEC_MR_TRGSEL_AFEC_TRIG6 (0x6u << 1)
103 #define AFEC_MR_SLEEP (0x1u << 5)
104 #define AFEC_MR_SLEEP_NORMAL (0x0u << 5)
105 #define AFEC_MR_SLEEP_SLEEP (0x1u << 5)
106 #define AFEC_MR_FWUP (0x1u << 6)
107 #define AFEC_MR_FWUP_OFF (0x0u << 6)
108 #define AFEC_MR_FWUP_ON (0x1u << 6)
109 #define AFEC_MR_FREERUN (0x1u << 7)
110 #define AFEC_MR_FREERUN_OFF (0x0u << 7)
111 #define AFEC_MR_FREERUN_ON (0x1u << 7)
112 #define AFEC_MR_PRESCAL_Pos 8
113 #define AFEC_MR_PRESCAL_Msk (0xffu << AFEC_MR_PRESCAL_Pos)
114 #define AFEC_MR_PRESCAL(value) ((AFEC_MR_PRESCAL_Msk & ((value) << AFEC_MR_PRESCAL_Pos)))
115 #define AFEC_MR_STARTUP_Pos 16
116 #define AFEC_MR_STARTUP_Msk (0xfu << AFEC_MR_STARTUP_Pos)
117 #define AFEC_MR_STARTUP(value) ((AFEC_MR_STARTUP_Msk & ((value) << AFEC_MR_STARTUP_Pos)))
118 #define AFEC_MR_STARTUP_SUT0 (0x0u << 16)
119 #define AFEC_MR_STARTUP_SUT8 (0x1u << 16)
120 #define AFEC_MR_STARTUP_SUT16 (0x2u << 16)
121 #define AFEC_MR_STARTUP_SUT24 (0x3u << 16)
122 #define AFEC_MR_STARTUP_SUT64 (0x4u << 16)
123 #define AFEC_MR_STARTUP_SUT80 (0x5u << 16)
124 #define AFEC_MR_STARTUP_SUT96 (0x6u << 16)
125 #define AFEC_MR_STARTUP_SUT112 (0x7u << 16)
126 #define AFEC_MR_STARTUP_SUT512 (0x8u << 16)
127 #define AFEC_MR_STARTUP_SUT576 (0x9u << 16)
128 #define AFEC_MR_STARTUP_SUT640 (0xAu << 16)
129 #define AFEC_MR_STARTUP_SUT704 (0xBu << 16)
130 #define AFEC_MR_STARTUP_SUT768 (0xCu << 16)
131 #define AFEC_MR_STARTUP_SUT832 (0xDu << 16)
132 #define AFEC_MR_STARTUP_SUT896 (0xEu << 16)
133 #define AFEC_MR_STARTUP_SUT960 (0xFu << 16)
134 #define AFEC_MR_ONE (0x1u << 23)
135 #define AFEC_MR_TRACKTIM_Pos 24
136 #define AFEC_MR_TRACKTIM_Msk (0xfu << AFEC_MR_TRACKTIM_Pos)
137 #define AFEC_MR_TRACKTIM(value) ((AFEC_MR_TRACKTIM_Msk & ((value) << AFEC_MR_TRACKTIM_Pos)))
138 #define AFEC_MR_TRANSFER_Pos 28
139 #define AFEC_MR_TRANSFER_Msk (0x3u << AFEC_MR_TRANSFER_Pos)
140 #define AFEC_MR_TRANSFER(value) ((AFEC_MR_TRANSFER_Msk & ((value) << AFEC_MR_TRANSFER_Pos)))
141 #define AFEC_MR_USEQ (0x1u << 31)
142 #define AFEC_MR_USEQ_NUM_ORDER (0x0u << 31)
143 #define AFEC_MR_USEQ_REG_ORDER (0x1u << 31)
144 /* -------- AFEC_EMR : (AFEC Offset: 0x08) AFEC Extended Mode Register -------- */
145 #define AFEC_EMR_CMPMODE_Pos 0
146 #define AFEC_EMR_CMPMODE_Msk (0x3u << AFEC_EMR_CMPMODE_Pos)
147 #define AFEC_EMR_CMPMODE(value) ((AFEC_EMR_CMPMODE_Msk & ((value) << AFEC_EMR_CMPMODE_Pos)))
148 #define AFEC_EMR_CMPMODE_LOW (0x0u << 0)
149 #define AFEC_EMR_CMPMODE_HIGH (0x1u << 0)
150 #define AFEC_EMR_CMPMODE_IN (0x2u << 0)
151 #define AFEC_EMR_CMPMODE_OUT (0x3u << 0)
152 #define AFEC_EMR_CMPSEL_Pos 3
153 #define AFEC_EMR_CMPSEL_Msk (0x1fu << AFEC_EMR_CMPSEL_Pos)
154 #define AFEC_EMR_CMPSEL(value) ((AFEC_EMR_CMPSEL_Msk & ((value) << AFEC_EMR_CMPSEL_Pos)))
155 #define AFEC_EMR_CMPALL (0x1u << 9)
156 #define AFEC_EMR_CMPFILTER_Pos 12
157 #define AFEC_EMR_CMPFILTER_Msk (0x3u << AFEC_EMR_CMPFILTER_Pos)
158 #define AFEC_EMR_CMPFILTER(value) ((AFEC_EMR_CMPFILTER_Msk & ((value) << AFEC_EMR_CMPFILTER_Pos)))
159 #define AFEC_EMR_RES_Pos 16
160 #define AFEC_EMR_RES_Msk (0x7u << AFEC_EMR_RES_Pos)
161 #define AFEC_EMR_RES(value) ((AFEC_EMR_RES_Msk & ((value) << AFEC_EMR_RES_Pos)))
162 #define AFEC_EMR_RES_NO_AVERAGE (0x0u << 16)
163 #define AFEC_EMR_RES_OSR4 (0x2u << 16)
164 #define AFEC_EMR_RES_OSR16 (0x3u << 16)
165 #define AFEC_EMR_RES_OSR64 (0x4u << 16)
166 #define AFEC_EMR_RES_OSR256 (0x5u << 16)
167 #define AFEC_EMR_TAG (0x1u << 24)
168 #define AFEC_EMR_STM (0x1u << 25)
169 #define AFEC_EMR_SIGNMODE_Pos 28
170 #define AFEC_EMR_SIGNMODE_Msk (0x3u << AFEC_EMR_SIGNMODE_Pos)
171 #define AFEC_EMR_SIGNMODE(value) ((AFEC_EMR_SIGNMODE_Msk & ((value) << AFEC_EMR_SIGNMODE_Pos)))
172 #define AFEC_EMR_SIGNMODE_SE_UNSG_DF_SIGN (0x0u << 28)
173 #define AFEC_EMR_SIGNMODE_SE_SIGN_DF_UNSG (0x1u << 28)
174 #define AFEC_EMR_SIGNMODE_ALL_UNSIGNED (0x2u << 28)
175 #define AFEC_EMR_SIGNMODE_ALL_SIGNED (0x3u << 28)
176 /* -------- AFEC_SEQ1R : (AFEC Offset: 0x0C) AFEC Channel Sequence 1 Register -------- */
177 #define AFEC_SEQ1R_USCH0_Pos 0
178 #define AFEC_SEQ1R_USCH0_Msk (0xfu << AFEC_SEQ1R_USCH0_Pos)
179 #define AFEC_SEQ1R_USCH0(value) ((AFEC_SEQ1R_USCH0_Msk & ((value) << AFEC_SEQ1R_USCH0_Pos)))
180 #define AFEC_SEQ1R_USCH1_Pos 4
181 #define AFEC_SEQ1R_USCH1_Msk (0xfu << AFEC_SEQ1R_USCH1_Pos)
182 #define AFEC_SEQ1R_USCH1(value) ((AFEC_SEQ1R_USCH1_Msk & ((value) << AFEC_SEQ1R_USCH1_Pos)))
183 #define AFEC_SEQ1R_USCH2_Pos 8
184 #define AFEC_SEQ1R_USCH2_Msk (0xfu << AFEC_SEQ1R_USCH2_Pos)
185 #define AFEC_SEQ1R_USCH2(value) ((AFEC_SEQ1R_USCH2_Msk & ((value) << AFEC_SEQ1R_USCH2_Pos)))
186 #define AFEC_SEQ1R_USCH3_Pos 12
187 #define AFEC_SEQ1R_USCH3_Msk (0xfu << AFEC_SEQ1R_USCH3_Pos)
188 #define AFEC_SEQ1R_USCH3(value) ((AFEC_SEQ1R_USCH3_Msk & ((value) << AFEC_SEQ1R_USCH3_Pos)))
189 #define AFEC_SEQ1R_USCH4_Pos 16
190 #define AFEC_SEQ1R_USCH4_Msk (0xfu << AFEC_SEQ1R_USCH4_Pos)
191 #define AFEC_SEQ1R_USCH4(value) ((AFEC_SEQ1R_USCH4_Msk & ((value) << AFEC_SEQ1R_USCH4_Pos)))
192 #define AFEC_SEQ1R_USCH5_Pos 20
193 #define AFEC_SEQ1R_USCH5_Msk (0xfu << AFEC_SEQ1R_USCH5_Pos)
194 #define AFEC_SEQ1R_USCH5(value) ((AFEC_SEQ1R_USCH5_Msk & ((value) << AFEC_SEQ1R_USCH5_Pos)))
195 #define AFEC_SEQ1R_USCH6_Pos 24
196 #define AFEC_SEQ1R_USCH6_Msk (0xfu << AFEC_SEQ1R_USCH6_Pos)
197 #define AFEC_SEQ1R_USCH6(value) ((AFEC_SEQ1R_USCH6_Msk & ((value) << AFEC_SEQ1R_USCH6_Pos)))
198 #define AFEC_SEQ1R_USCH7_Pos 28
199 #define AFEC_SEQ1R_USCH7_Msk (0xfu << AFEC_SEQ1R_USCH7_Pos)
200 #define AFEC_SEQ1R_USCH7(value) ((AFEC_SEQ1R_USCH7_Msk & ((value) << AFEC_SEQ1R_USCH7_Pos)))
201 /* -------- AFEC_SEQ2R : (AFEC Offset: 0x10) AFEC Channel Sequence 2 Register -------- */
202 #define AFEC_SEQ2R_USCH8_Pos 0
203 #define AFEC_SEQ2R_USCH8_Msk (0xfu << AFEC_SEQ2R_USCH8_Pos)
204 #define AFEC_SEQ2R_USCH8(value) ((AFEC_SEQ2R_USCH8_Msk & ((value) << AFEC_SEQ2R_USCH8_Pos)))
205 #define AFEC_SEQ2R_USCH9_Pos 4
206 #define AFEC_SEQ2R_USCH9_Msk (0xfu << AFEC_SEQ2R_USCH9_Pos)
207 #define AFEC_SEQ2R_USCH9(value) ((AFEC_SEQ2R_USCH9_Msk & ((value) << AFEC_SEQ2R_USCH9_Pos)))
208 #define AFEC_SEQ2R_USCH10_Pos 8
209 #define AFEC_SEQ2R_USCH10_Msk (0xfu << AFEC_SEQ2R_USCH10_Pos)
210 #define AFEC_SEQ2R_USCH10(value) ((AFEC_SEQ2R_USCH10_Msk & ((value) << AFEC_SEQ2R_USCH10_Pos)))
211 #define AFEC_SEQ2R_USCH11_Pos 12
212 #define AFEC_SEQ2R_USCH11_Msk (0xfu << AFEC_SEQ2R_USCH11_Pos)
213 #define AFEC_SEQ2R_USCH11(value) ((AFEC_SEQ2R_USCH11_Msk & ((value) << AFEC_SEQ2R_USCH11_Pos)))
214 #define AFEC_SEQ2R_USCH12_Pos 16
215 #define AFEC_SEQ2R_USCH12_Msk (0xfu << AFEC_SEQ2R_USCH12_Pos)
216 #define AFEC_SEQ2R_USCH12(value) ((AFEC_SEQ2R_USCH12_Msk & ((value) << AFEC_SEQ2R_USCH12_Pos)))
217 #define AFEC_SEQ2R_USCH13_Pos 20
218 #define AFEC_SEQ2R_USCH13_Msk (0xfu << AFEC_SEQ2R_USCH13_Pos)
219 #define AFEC_SEQ2R_USCH13(value) ((AFEC_SEQ2R_USCH13_Msk & ((value) << AFEC_SEQ2R_USCH13_Pos)))
220 #define AFEC_SEQ2R_USCH14_Pos 24
221 #define AFEC_SEQ2R_USCH14_Msk (0xfu << AFEC_SEQ2R_USCH14_Pos)
222 #define AFEC_SEQ2R_USCH14(value) ((AFEC_SEQ2R_USCH14_Msk & ((value) << AFEC_SEQ2R_USCH14_Pos)))
223 #define AFEC_SEQ2R_USCH15_Pos 28
224 #define AFEC_SEQ2R_USCH15_Msk (0xfu << AFEC_SEQ2R_USCH15_Pos)
225 #define AFEC_SEQ2R_USCH15(value) ((AFEC_SEQ2R_USCH15_Msk & ((value) << AFEC_SEQ2R_USCH15_Pos)))
226 /* -------- AFEC_CHER : (AFEC Offset: 0x14) AFEC Channel Enable Register -------- */
227 #define AFEC_CHER_CH0 (0x1u << 0)
228 #define AFEC_CHER_CH1 (0x1u << 1)
229 #define AFEC_CHER_CH2 (0x1u << 2)
230 #define AFEC_CHER_CH3 (0x1u << 3)
231 #define AFEC_CHER_CH4 (0x1u << 4)
232 #define AFEC_CHER_CH5 (0x1u << 5)
233 #define AFEC_CHER_CH6 (0x1u << 6)
234 #define AFEC_CHER_CH7 (0x1u << 7)
235 #define AFEC_CHER_CH8 (0x1u << 8)
236 #define AFEC_CHER_CH9 (0x1u << 9)
237 #define AFEC_CHER_CH10 (0x1u << 10)
238 #define AFEC_CHER_CH11 (0x1u << 11)
239 /* -------- AFEC_CHDR : (AFEC Offset: 0x18) AFEC Channel Disable Register -------- */
240 #define AFEC_CHDR_CH0 (0x1u << 0)
241 #define AFEC_CHDR_CH1 (0x1u << 1)
242 #define AFEC_CHDR_CH2 (0x1u << 2)
243 #define AFEC_CHDR_CH3 (0x1u << 3)
244 #define AFEC_CHDR_CH4 (0x1u << 4)
245 #define AFEC_CHDR_CH5 (0x1u << 5)
246 #define AFEC_CHDR_CH6 (0x1u << 6)
247 #define AFEC_CHDR_CH7 (0x1u << 7)
248 #define AFEC_CHDR_CH8 (0x1u << 8)
249 #define AFEC_CHDR_CH9 (0x1u << 9)
250 #define AFEC_CHDR_CH10 (0x1u << 10)
251 #define AFEC_CHDR_CH11 (0x1u << 11)
252 /* -------- AFEC_CHSR : (AFEC Offset: 0x1C) AFEC Channel Status Register -------- */
253 #define AFEC_CHSR_CH0 (0x1u << 0)
254 #define AFEC_CHSR_CH1 (0x1u << 1)
255 #define AFEC_CHSR_CH2 (0x1u << 2)
256 #define AFEC_CHSR_CH3 (0x1u << 3)
257 #define AFEC_CHSR_CH4 (0x1u << 4)
258 #define AFEC_CHSR_CH5 (0x1u << 5)
259 #define AFEC_CHSR_CH6 (0x1u << 6)
260 #define AFEC_CHSR_CH7 (0x1u << 7)
261 #define AFEC_CHSR_CH8 (0x1u << 8)
262 #define AFEC_CHSR_CH9 (0x1u << 9)
263 #define AFEC_CHSR_CH10 (0x1u << 10)
264 #define AFEC_CHSR_CH11 (0x1u << 11)
265 /* -------- AFEC_LCDR : (AFEC Offset: 0x20) AFEC Last Converted Data Register -------- */
266 #define AFEC_LCDR_LDATA_Pos 0
267 #define AFEC_LCDR_LDATA_Msk (0xffffu << AFEC_LCDR_LDATA_Pos)
268 #define AFEC_LCDR_CHNB_Pos 24
269 #define AFEC_LCDR_CHNB_Msk (0xfu << AFEC_LCDR_CHNB_Pos)
270 /* -------- AFEC_IER : (AFEC Offset: 0x24) AFEC Interrupt Enable Register -------- */
271 #define AFEC_IER_EOC0 (0x1u << 0)
272 #define AFEC_IER_EOC1 (0x1u << 1)
273 #define AFEC_IER_EOC2 (0x1u << 2)
274 #define AFEC_IER_EOC3 (0x1u << 3)
275 #define AFEC_IER_EOC4 (0x1u << 4)
276 #define AFEC_IER_EOC5 (0x1u << 5)
277 #define AFEC_IER_EOC6 (0x1u << 6)
278 #define AFEC_IER_EOC7 (0x1u << 7)
279 #define AFEC_IER_EOC8 (0x1u << 8)
280 #define AFEC_IER_EOC9 (0x1u << 9)
281 #define AFEC_IER_EOC10 (0x1u << 10)
282 #define AFEC_IER_EOC11 (0x1u << 11)
283 #define AFEC_IER_DRDY (0x1u << 24)
284 #define AFEC_IER_GOVRE (0x1u << 25)
285 #define AFEC_IER_COMPE (0x1u << 26)
286 #define AFEC_IER_TEMPCHG (0x1u << 30)
287 /* -------- AFEC_IDR : (AFEC Offset: 0x28) AFEC Interrupt Disable Register -------- */
288 #define AFEC_IDR_EOC0 (0x1u << 0)
289 #define AFEC_IDR_EOC1 (0x1u << 1)
290 #define AFEC_IDR_EOC2 (0x1u << 2)
291 #define AFEC_IDR_EOC3 (0x1u << 3)
292 #define AFEC_IDR_EOC4 (0x1u << 4)
293 #define AFEC_IDR_EOC5 (0x1u << 5)
294 #define AFEC_IDR_EOC6 (0x1u << 6)
295 #define AFEC_IDR_EOC7 (0x1u << 7)
296 #define AFEC_IDR_EOC8 (0x1u << 8)
297 #define AFEC_IDR_EOC9 (0x1u << 9)
298 #define AFEC_IDR_EOC10 (0x1u << 10)
299 #define AFEC_IDR_EOC11 (0x1u << 11)
300 #define AFEC_IDR_DRDY (0x1u << 24)
301 #define AFEC_IDR_GOVRE (0x1u << 25)
302 #define AFEC_IDR_COMPE (0x1u << 26)
303 #define AFEC_IDR_TEMPCHG (0x1u << 30)
304 /* -------- AFEC_IMR : (AFEC Offset: 0x2C) AFEC Interrupt Mask Register -------- */
305 #define AFEC_IMR_EOC0 (0x1u << 0)
306 #define AFEC_IMR_EOC1 (0x1u << 1)
307 #define AFEC_IMR_EOC2 (0x1u << 2)
308 #define AFEC_IMR_EOC3 (0x1u << 3)
309 #define AFEC_IMR_EOC4 (0x1u << 4)
310 #define AFEC_IMR_EOC5 (0x1u << 5)
311 #define AFEC_IMR_EOC6 (0x1u << 6)
312 #define AFEC_IMR_EOC7 (0x1u << 7)
313 #define AFEC_IMR_EOC8 (0x1u << 8)
314 #define AFEC_IMR_EOC9 (0x1u << 9)
315 #define AFEC_IMR_EOC10 (0x1u << 10)
316 #define AFEC_IMR_EOC11 (0x1u << 11)
317 #define AFEC_IMR_DRDY (0x1u << 24)
318 #define AFEC_IMR_GOVRE (0x1u << 25)
319 #define AFEC_IMR_COMPE (0x1u << 26)
320 #define AFEC_IMR_TEMPCHG (0x1u << 30)
321 /* -------- AFEC_ISR : (AFEC Offset: 0x30) AFEC Interrupt Status Register -------- */
322 #define AFEC_ISR_EOC0 (0x1u << 0)
323 #define AFEC_ISR_EOC1 (0x1u << 1)
324 #define AFEC_ISR_EOC2 (0x1u << 2)
325 #define AFEC_ISR_EOC3 (0x1u << 3)
326 #define AFEC_ISR_EOC4 (0x1u << 4)
327 #define AFEC_ISR_EOC5 (0x1u << 5)
328 #define AFEC_ISR_EOC6 (0x1u << 6)
329 #define AFEC_ISR_EOC7 (0x1u << 7)
330 #define AFEC_ISR_EOC8 (0x1u << 8)
331 #define AFEC_ISR_EOC9 (0x1u << 9)
332 #define AFEC_ISR_EOC10 (0x1u << 10)
333 #define AFEC_ISR_EOC11 (0x1u << 11)
334 #define AFEC_ISR_DRDY (0x1u << 24)
335 #define AFEC_ISR_GOVRE (0x1u << 25)
336 #define AFEC_ISR_COMPE (0x1u << 26)
337 #define AFEC_ISR_TEMPCHG (0x1u << 30)
338 /* -------- AFEC_OVER : (AFEC Offset: 0x4C) AFEC Overrun Status Register -------- */
339 #define AFEC_OVER_OVRE0 (0x1u << 0)
340 #define AFEC_OVER_OVRE1 (0x1u << 1)
341 #define AFEC_OVER_OVRE2 (0x1u << 2)
342 #define AFEC_OVER_OVRE3 (0x1u << 3)
343 #define AFEC_OVER_OVRE4 (0x1u << 4)
344 #define AFEC_OVER_OVRE5 (0x1u << 5)
345 #define AFEC_OVER_OVRE6 (0x1u << 6)
346 #define AFEC_OVER_OVRE7 (0x1u << 7)
347 #define AFEC_OVER_OVRE8 (0x1u << 8)
348 #define AFEC_OVER_OVRE9 (0x1u << 9)
349 #define AFEC_OVER_OVRE10 (0x1u << 10)
350 #define AFEC_OVER_OVRE11 (0x1u << 11)
351 /* -------- AFEC_CWR : (AFEC Offset: 0x50) AFEC Compare Window Register -------- */
352 #define AFEC_CWR_LOWTHRES_Pos 0
353 #define AFEC_CWR_LOWTHRES_Msk (0xffffu << AFEC_CWR_LOWTHRES_Pos)
354 #define AFEC_CWR_LOWTHRES(value) ((AFEC_CWR_LOWTHRES_Msk & ((value) << AFEC_CWR_LOWTHRES_Pos)))
355 #define AFEC_CWR_HIGHTHRES_Pos 16
356 #define AFEC_CWR_HIGHTHRES_Msk (0xffffu << AFEC_CWR_HIGHTHRES_Pos)
357 #define AFEC_CWR_HIGHTHRES(value) ((AFEC_CWR_HIGHTHRES_Msk & ((value) << AFEC_CWR_HIGHTHRES_Pos)))
358 /* -------- AFEC_CGR : (AFEC Offset: 0x54) AFEC Channel Gain Register -------- */
359 #define AFEC_CGR_GAIN0_Pos 0
360 #define AFEC_CGR_GAIN0_Msk (0x3u << AFEC_CGR_GAIN0_Pos)
361 #define AFEC_CGR_GAIN0(value) ((AFEC_CGR_GAIN0_Msk & ((value) << AFEC_CGR_GAIN0_Pos)))
362 #define AFEC_CGR_GAIN1_Pos 2
363 #define AFEC_CGR_GAIN1_Msk (0x3u << AFEC_CGR_GAIN1_Pos)
364 #define AFEC_CGR_GAIN1(value) ((AFEC_CGR_GAIN1_Msk & ((value) << AFEC_CGR_GAIN1_Pos)))
365 #define AFEC_CGR_GAIN2_Pos 4
366 #define AFEC_CGR_GAIN2_Msk (0x3u << AFEC_CGR_GAIN2_Pos)
367 #define AFEC_CGR_GAIN2(value) ((AFEC_CGR_GAIN2_Msk & ((value) << AFEC_CGR_GAIN2_Pos)))
368 #define AFEC_CGR_GAIN3_Pos 6
369 #define AFEC_CGR_GAIN3_Msk (0x3u << AFEC_CGR_GAIN3_Pos)
370 #define AFEC_CGR_GAIN3(value) ((AFEC_CGR_GAIN3_Msk & ((value) << AFEC_CGR_GAIN3_Pos)))
371 #define AFEC_CGR_GAIN4_Pos 8
372 #define AFEC_CGR_GAIN4_Msk (0x3u << AFEC_CGR_GAIN4_Pos)
373 #define AFEC_CGR_GAIN4(value) ((AFEC_CGR_GAIN4_Msk & ((value) << AFEC_CGR_GAIN4_Pos)))
374 #define AFEC_CGR_GAIN5_Pos 10
375 #define AFEC_CGR_GAIN5_Msk (0x3u << AFEC_CGR_GAIN5_Pos)
376 #define AFEC_CGR_GAIN5(value) ((AFEC_CGR_GAIN5_Msk & ((value) << AFEC_CGR_GAIN5_Pos)))
377 #define AFEC_CGR_GAIN6_Pos 12
378 #define AFEC_CGR_GAIN6_Msk (0x3u << AFEC_CGR_GAIN6_Pos)
379 #define AFEC_CGR_GAIN6(value) ((AFEC_CGR_GAIN6_Msk & ((value) << AFEC_CGR_GAIN6_Pos)))
380 #define AFEC_CGR_GAIN7_Pos 14
381 #define AFEC_CGR_GAIN7_Msk (0x3u << AFEC_CGR_GAIN7_Pos)
382 #define AFEC_CGR_GAIN7(value) ((AFEC_CGR_GAIN7_Msk & ((value) << AFEC_CGR_GAIN7_Pos)))
383 #define AFEC_CGR_GAIN8_Pos 16
384 #define AFEC_CGR_GAIN8_Msk (0x3u << AFEC_CGR_GAIN8_Pos)
385 #define AFEC_CGR_GAIN8(value) ((AFEC_CGR_GAIN8_Msk & ((value) << AFEC_CGR_GAIN8_Pos)))
386 #define AFEC_CGR_GAIN9_Pos 18
387 #define AFEC_CGR_GAIN9_Msk (0x3u << AFEC_CGR_GAIN9_Pos)
388 #define AFEC_CGR_GAIN9(value) ((AFEC_CGR_GAIN9_Msk & ((value) << AFEC_CGR_GAIN9_Pos)))
389 #define AFEC_CGR_GAIN10_Pos 20
390 #define AFEC_CGR_GAIN10_Msk (0x3u << AFEC_CGR_GAIN10_Pos)
391 #define AFEC_CGR_GAIN10(value) ((AFEC_CGR_GAIN10_Msk & ((value) << AFEC_CGR_GAIN10_Pos)))
392 #define AFEC_CGR_GAIN11_Pos 22
393 #define AFEC_CGR_GAIN11_Msk (0x3u << AFEC_CGR_GAIN11_Pos)
394 #define AFEC_CGR_GAIN11(value) ((AFEC_CGR_GAIN11_Msk & ((value) << AFEC_CGR_GAIN11_Pos)))
395 /* -------- AFEC_DIFFR : (AFEC Offset: 0x60) AFEC Channel Differential Register -------- */
396 #define AFEC_DIFFR_DIFF0 (0x1u << 0)
397 #define AFEC_DIFFR_DIFF1 (0x1u << 1)
398 #define AFEC_DIFFR_DIFF2 (0x1u << 2)
399 #define AFEC_DIFFR_DIFF3 (0x1u << 3)
400 #define AFEC_DIFFR_DIFF4 (0x1u << 4)
401 #define AFEC_DIFFR_DIFF5 (0x1u << 5)
402 #define AFEC_DIFFR_DIFF6 (0x1u << 6)
403 #define AFEC_DIFFR_DIFF7 (0x1u << 7)
404 #define AFEC_DIFFR_DIFF8 (0x1u << 8)
405 #define AFEC_DIFFR_DIFF9 (0x1u << 9)
406 #define AFEC_DIFFR_DIFF10 (0x1u << 10)
407 #define AFEC_DIFFR_DIFF11 (0x1u << 11)
408 /* -------- AFEC_CSELR : (AFEC Offset: 0x64) AFEC Channel Selection Register -------- */
409 #define AFEC_CSELR_CSEL_Pos 0
410 #define AFEC_CSELR_CSEL_Msk (0xfu << AFEC_CSELR_CSEL_Pos)
411 #define AFEC_CSELR_CSEL(value) ((AFEC_CSELR_CSEL_Msk & ((value) << AFEC_CSELR_CSEL_Pos)))
412 /* -------- AFEC_CDR : (AFEC Offset: 0x68) AFEC Channel Data Register -------- */
413 #define AFEC_CDR_DATA_Pos 0
414 #define AFEC_CDR_DATA_Msk (0xffffu << AFEC_CDR_DATA_Pos)
415 /* -------- AFEC_COCR : (AFEC Offset: 0x6C) AFEC Channel Offset Compensation Register -------- */
416 #define AFEC_COCR_AOFF_Pos 0
417 #define AFEC_COCR_AOFF_Msk (0xfffu << AFEC_COCR_AOFF_Pos)
418 #define AFEC_COCR_AOFF(value) ((AFEC_COCR_AOFF_Msk & ((value) << AFEC_COCR_AOFF_Pos)))
419 /* -------- AFEC_TEMPMR : (AFEC Offset: 0x70) AFEC Temperature Sensor Mode Register -------- */
420 #define AFEC_TEMPMR_RTCT (0x1u << 0)
421 #define AFEC_TEMPMR_TEMPCMPMOD_Pos 4
422 #define AFEC_TEMPMR_TEMPCMPMOD_Msk (0x3u << AFEC_TEMPMR_TEMPCMPMOD_Pos)
423 #define AFEC_TEMPMR_TEMPCMPMOD(value) ((AFEC_TEMPMR_TEMPCMPMOD_Msk & ((value) << AFEC_TEMPMR_TEMPCMPMOD_Pos)))
424 #define AFEC_TEMPMR_TEMPCMPMOD_LOW (0x0u << 4)
425 #define AFEC_TEMPMR_TEMPCMPMOD_HIGH (0x1u << 4)
426 #define AFEC_TEMPMR_TEMPCMPMOD_IN (0x2u << 4)
427 #define AFEC_TEMPMR_TEMPCMPMOD_OUT (0x3u << 4)
428 /* -------- AFEC_TEMPCWR : (AFEC Offset: 0x74) AFEC Temperature Compare Window Register -------- */
429 #define AFEC_TEMPCWR_TLOWTHRES_Pos 0
430 #define AFEC_TEMPCWR_TLOWTHRES_Msk (0xffffu << AFEC_TEMPCWR_TLOWTHRES_Pos)
431 #define AFEC_TEMPCWR_TLOWTHRES(value) ((AFEC_TEMPCWR_TLOWTHRES_Msk & ((value) << AFEC_TEMPCWR_TLOWTHRES_Pos)))
432 #define AFEC_TEMPCWR_THIGHTHRES_Pos 16
433 #define AFEC_TEMPCWR_THIGHTHRES_Msk (0xffffu << AFEC_TEMPCWR_THIGHTHRES_Pos)
434 #define AFEC_TEMPCWR_THIGHTHRES(value) ((AFEC_TEMPCWR_THIGHTHRES_Msk & ((value) << AFEC_TEMPCWR_THIGHTHRES_Pos)))
435 /* -------- AFEC_ACR : (AFEC Offset: 0x94) AFEC Analog Control Register -------- */
436 #define AFEC_ACR_PGA0EN (0x1u << 2)
437 #define AFEC_ACR_PGA1EN (0x1u << 3)
438 #define AFEC_ACR_IBCTL_Pos 8
439 #define AFEC_ACR_IBCTL_Msk (0x3u << AFEC_ACR_IBCTL_Pos)
440 #define AFEC_ACR_IBCTL(value) ((AFEC_ACR_IBCTL_Msk & ((value) << AFEC_ACR_IBCTL_Pos)))
441 /* -------- AFEC_SHMR : (AFEC Offset: 0xA0) AFEC Sample & Hold Mode Register -------- */
442 #define AFEC_SHMR_DUAL0 (0x1u << 0)
443 #define AFEC_SHMR_DUAL1 (0x1u << 1)
444 #define AFEC_SHMR_DUAL2 (0x1u << 2)
445 #define AFEC_SHMR_DUAL3 (0x1u << 3)
446 #define AFEC_SHMR_DUAL4 (0x1u << 4)
447 #define AFEC_SHMR_DUAL5 (0x1u << 5)
448 #define AFEC_SHMR_DUAL6 (0x1u << 6)
449 #define AFEC_SHMR_DUAL7 (0x1u << 7)
450 #define AFEC_SHMR_DUAL8 (0x1u << 8)
451 #define AFEC_SHMR_DUAL9 (0x1u << 9)
452 #define AFEC_SHMR_DUAL10 (0x1u << 10)
453 #define AFEC_SHMR_DUAL11 (0x1u << 11)
454 /* -------- AFEC_COSR : (AFEC Offset: 0xD0) AFEC Correction Select Register -------- */
455 #define AFEC_COSR_CSEL (0x1u << 0)
456 /* -------- AFEC_CVR : (AFEC Offset: 0xD4) AFEC Correction Values Register -------- */
457 #define AFEC_CVR_OFFSETCORR_Pos 0
458 #define AFEC_CVR_OFFSETCORR_Msk (0xffffu << AFEC_CVR_OFFSETCORR_Pos)
459 #define AFEC_CVR_OFFSETCORR(value) ((AFEC_CVR_OFFSETCORR_Msk & ((value) << AFEC_CVR_OFFSETCORR_Pos)))
460 #define AFEC_CVR_GAINCORR_Pos 16
461 #define AFEC_CVR_GAINCORR_Msk (0xffffu << AFEC_CVR_GAINCORR_Pos)
462 #define AFEC_CVR_GAINCORR(value) ((AFEC_CVR_GAINCORR_Msk & ((value) << AFEC_CVR_GAINCORR_Pos)))
463 /* -------- AFEC_CECR : (AFEC Offset: 0xD8) AFEC Channel Error Correction Register -------- */
464 #define AFEC_CECR_ECORR0 (0x1u << 0)
465 #define AFEC_CECR_ECORR1 (0x1u << 1)
466 #define AFEC_CECR_ECORR2 (0x1u << 2)
467 #define AFEC_CECR_ECORR3 (0x1u << 3)
468 #define AFEC_CECR_ECORR4 (0x1u << 4)
469 #define AFEC_CECR_ECORR5 (0x1u << 5)
470 #define AFEC_CECR_ECORR6 (0x1u << 6)
471 #define AFEC_CECR_ECORR7 (0x1u << 7)
472 #define AFEC_CECR_ECORR8 (0x1u << 8)
473 #define AFEC_CECR_ECORR9 (0x1u << 9)
474 #define AFEC_CECR_ECORR10 (0x1u << 10)
475 #define AFEC_CECR_ECORR11 (0x1u << 11)
476 /* -------- AFEC_WPMR : (AFEC Offset: 0xE4) AFEC Write Protection Mode Register -------- */
477 #define AFEC_WPMR_WPEN (0x1u << 0)
478 #define AFEC_WPMR_WPKEY_Pos 8
479 #define AFEC_WPMR_WPKEY_Msk (0xffffffu << AFEC_WPMR_WPKEY_Pos)
480 #define AFEC_WPMR_WPKEY(value) ((AFEC_WPMR_WPKEY_Msk & ((value) << AFEC_WPMR_WPKEY_Pos)))
481 #define AFEC_WPMR_WPKEY_PASSWD (0x414443u << 8)
482 /* -------- AFEC_WPSR : (AFEC Offset: 0xE8) AFEC Write Protection Status Register -------- */
483 #define AFEC_WPSR_WPVS (0x1u << 0)
484 #define AFEC_WPSR_WPVSRC_Pos 8
485 #define AFEC_WPSR_WPVSRC_Msk (0xffffu << AFEC_WPSR_WPVSRC_Pos)
486 /* -------- AFEC_VERSION : (AFEC Offset: 0xFC) AFEC Version Register -------- */
487 #define AFEC_VERSION_VERSION_Pos 0
488 #define AFEC_VERSION_VERSION_Msk (0xfffu << AFEC_VERSION_VERSION_Pos)
489 #define AFEC_VERSION_MFN_Pos 16
490 #define AFEC_VERSION_MFN_Msk (0x7u << AFEC_VERSION_MFN_Pos)
493 
494 
495 #endif /* _SAME70_AFEC_COMPONENT_ */
__IO uint32_t AFEC_COCR
(Afec Offset: 0x6C) AFEC Channel Offset Compensation Register
Definition: afec.h:68
__I uint32_t AFEC_LCDR
(Afec Offset: 0x20) AFEC Last Converted Data Register
Definition: afec.h:55
__I uint32_t AFEC_IMR
(Afec Offset: 0x2C) AFEC Interrupt Mask Register
Definition: afec.h:58
#define __IO
Definition: core_cm7.h:266
__IO uint32_t AFEC_WPMR
(Afec Offset: 0xE4) AFEC Write Protection Mode Register
Definition: afec.h:80
#define __O
Definition: core_cm7.h:265
__O uint32_t AFEC_CHDR
(Afec Offset: 0x18) AFEC Channel Disable Register
Definition: afec.h:53
__I uint32_t AFEC_OVER
(Afec Offset: 0x4C) AFEC Overrun Status Register
Definition: afec.h:61
__IO uint32_t AFEC_SEQ1R
(Afec Offset: 0x0C) AFEC Channel Sequence 1 Register
Definition: afec.h:50
__O uint32_t AFEC_IDR
(Afec Offset: 0x28) AFEC Interrupt Disable Register
Definition: afec.h:57
__IO uint32_t AFEC_TEMPCWR
(Afec Offset: 0x74) AFEC Temperature Compare Window Register
Definition: afec.h:70
__O uint32_t AFEC_CHER
(Afec Offset: 0x14) AFEC Channel Enable Register
Definition: afec.h:52
__IO uint32_t AFEC_EMR
(Afec Offset: 0x08) AFEC Extended Mode Register
Definition: afec.h:49
__IO uint32_t AFEC_SEQ2R
(Afec Offset: 0x10) AFEC Channel Sequence 2 Register
Definition: afec.h:51
__IO uint32_t AFEC_TEMPMR
(Afec Offset: 0x70) AFEC Temperature Sensor Mode Register
Definition: afec.h:69
__I uint32_t AFEC_VERSION
(Afec Offset: 0xFC) AFEC Version Register
Definition: afec.h:83
__O uint32_t AFEC_IER
(Afec Offset: 0x24) AFEC Interrupt Enable Register
Definition: afec.h:56
__IO uint32_t AFEC_CGR
(Afec Offset: 0x54) AFEC Channel Gain Register
Definition: afec.h:63
__IO uint32_t AFEC_COSR
(Afec Offset: 0xD0) AFEC Correction Select Register
Definition: afec.h:76
__I uint32_t AFEC_ISR
(Afec Offset: 0x30) AFEC Interrupt Status Register
Definition: afec.h:59
__IO uint32_t AFEC_CVR
(Afec Offset: 0xD4) AFEC Correction Values Register
Definition: afec.h:77
Afec hardware registers.
Definition: afec.h:46
__I uint32_t AFEC_WPSR
(Afec Offset: 0xE8) AFEC Write Protection Status Register
Definition: afec.h:81
__IO uint32_t AFEC_CECR
(Afec Offset: 0xD8) AFEC Channel Error Correction Register
Definition: afec.h:78
__IO uint32_t AFEC_CWR
(Afec Offset: 0x50) AFEC Compare Window Register
Definition: afec.h:62
__IO uint32_t AFEC_SHMR
(Afec Offset: 0xA0) AFEC Sample & Hold Mode Register
Definition: afec.h:74
__I uint32_t AFEC_CHSR
(Afec Offset: 0x1C) AFEC Channel Status Register
Definition: afec.h:54
__IO uint32_t AFEC_DIFFR
(Afec Offset: 0x60) AFEC Channel Differential Register
Definition: afec.h:65
__IO uint32_t AFEC_MR
(Afec Offset: 0x04) AFEC Mode Register
Definition: afec.h:48
__O uint32_t AFEC_CR
(Afec Offset: 0x00) AFEC Control Register
Definition: afec.h:47
__IO uint32_t AFEC_CSELR
(Afec Offset: 0x64) AFEC Channel Selection Register
Definition: afec.h:66
__IO uint32_t AFEC_ACR
(Afec Offset: 0x94) AFEC Analog Control Register
Definition: afec.h:72
#define __I
Definition: core_cm7.h:263
__I uint32_t AFEC_CDR
(Afec Offset: 0x68) AFEC Channel Data Register
Definition: afec.h:67


inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:18:13