SAME54P20A Test Project
tc.h
Go to the documentation of this file.
1 
30 #ifndef _SAME54_TC_COMPONENT_
31 #define _SAME54_TC_COMPONENT_
32 
33 /* ========================================================================== */
35 /* ========================================================================== */
38 
39 #define TC_U2249
40 #define REV_TC 0x300
41 
42 /* -------- TC_CTRLA : (TC Offset: 0x00) (R/W 32) Control A -------- */
43 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
44 typedef union {
45  struct {
46  uint32_t SWRST:1;
47  uint32_t ENABLE:1;
48  uint32_t MODE:2;
49  uint32_t PRESCSYNC:2;
50  uint32_t RUNSTDBY:1;
51  uint32_t ONDEMAND:1;
52  uint32_t PRESCALER:3;
53  uint32_t ALOCK:1;
54  uint32_t :4;
55  uint32_t CAPTEN0:1;
56  uint32_t CAPTEN1:1;
57  uint32_t :2;
58  uint32_t COPEN0:1;
59  uint32_t COPEN1:1;
60  uint32_t :2;
61  uint32_t CAPTMODE0:2;
62  uint32_t :1;
63  uint32_t CAPTMODE1:2;
64  uint32_t :3;
65  } bit;
66  struct {
67  uint32_t :16;
68  uint32_t CAPTEN:2;
69  uint32_t :2;
70  uint32_t COPEN:2;
71  uint32_t :10;
72  } vec;
73  uint32_t reg;
75 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
76 
77 #define TC_CTRLA_OFFSET 0x00
78 #define TC_CTRLA_RESETVALUE _U_(0x00000000)
80 #define TC_CTRLA_SWRST_Pos 0
81 #define TC_CTRLA_SWRST (_U_(0x1) << TC_CTRLA_SWRST_Pos)
82 #define TC_CTRLA_ENABLE_Pos 1
83 #define TC_CTRLA_ENABLE (_U_(0x1) << TC_CTRLA_ENABLE_Pos)
84 #define TC_CTRLA_MODE_Pos 2
85 #define TC_CTRLA_MODE_Msk (_U_(0x3) << TC_CTRLA_MODE_Pos)
86 #define TC_CTRLA_MODE(value) (TC_CTRLA_MODE_Msk & ((value) << TC_CTRLA_MODE_Pos))
87 #define TC_CTRLA_MODE_COUNT16_Val _U_(0x0)
88 #define TC_CTRLA_MODE_COUNT8_Val _U_(0x1)
89 #define TC_CTRLA_MODE_COUNT32_Val _U_(0x2)
90 #define TC_CTRLA_MODE_COUNT16 (TC_CTRLA_MODE_COUNT16_Val << TC_CTRLA_MODE_Pos)
91 #define TC_CTRLA_MODE_COUNT8 (TC_CTRLA_MODE_COUNT8_Val << TC_CTRLA_MODE_Pos)
92 #define TC_CTRLA_MODE_COUNT32 (TC_CTRLA_MODE_COUNT32_Val << TC_CTRLA_MODE_Pos)
93 #define TC_CTRLA_PRESCSYNC_Pos 4
94 #define TC_CTRLA_PRESCSYNC_Msk (_U_(0x3) << TC_CTRLA_PRESCSYNC_Pos)
95 #define TC_CTRLA_PRESCSYNC(value) (TC_CTRLA_PRESCSYNC_Msk & ((value) << TC_CTRLA_PRESCSYNC_Pos))
96 #define TC_CTRLA_PRESCSYNC_GCLK_Val _U_(0x0)
97 #define TC_CTRLA_PRESCSYNC_PRESC_Val _U_(0x1)
98 #define TC_CTRLA_PRESCSYNC_RESYNC_Val _U_(0x2)
99 #define TC_CTRLA_PRESCSYNC_GCLK (TC_CTRLA_PRESCSYNC_GCLK_Val << TC_CTRLA_PRESCSYNC_Pos)
100 #define TC_CTRLA_PRESCSYNC_PRESC (TC_CTRLA_PRESCSYNC_PRESC_Val << TC_CTRLA_PRESCSYNC_Pos)
101 #define TC_CTRLA_PRESCSYNC_RESYNC (TC_CTRLA_PRESCSYNC_RESYNC_Val << TC_CTRLA_PRESCSYNC_Pos)
102 #define TC_CTRLA_RUNSTDBY_Pos 6
103 #define TC_CTRLA_RUNSTDBY (_U_(0x1) << TC_CTRLA_RUNSTDBY_Pos)
104 #define TC_CTRLA_ONDEMAND_Pos 7
105 #define TC_CTRLA_ONDEMAND (_U_(0x1) << TC_CTRLA_ONDEMAND_Pos)
106 #define TC_CTRLA_PRESCALER_Pos 8
107 #define TC_CTRLA_PRESCALER_Msk (_U_(0x7) << TC_CTRLA_PRESCALER_Pos)
108 #define TC_CTRLA_PRESCALER(value) (TC_CTRLA_PRESCALER_Msk & ((value) << TC_CTRLA_PRESCALER_Pos))
109 #define TC_CTRLA_PRESCALER_DIV1_Val _U_(0x0)
110 #define TC_CTRLA_PRESCALER_DIV2_Val _U_(0x1)
111 #define TC_CTRLA_PRESCALER_DIV4_Val _U_(0x2)
112 #define TC_CTRLA_PRESCALER_DIV8_Val _U_(0x3)
113 #define TC_CTRLA_PRESCALER_DIV16_Val _U_(0x4)
114 #define TC_CTRLA_PRESCALER_DIV64_Val _U_(0x5)
115 #define TC_CTRLA_PRESCALER_DIV256_Val _U_(0x6)
116 #define TC_CTRLA_PRESCALER_DIV1024_Val _U_(0x7)
117 #define TC_CTRLA_PRESCALER_DIV1 (TC_CTRLA_PRESCALER_DIV1_Val << TC_CTRLA_PRESCALER_Pos)
118 #define TC_CTRLA_PRESCALER_DIV2 (TC_CTRLA_PRESCALER_DIV2_Val << TC_CTRLA_PRESCALER_Pos)
119 #define TC_CTRLA_PRESCALER_DIV4 (TC_CTRLA_PRESCALER_DIV4_Val << TC_CTRLA_PRESCALER_Pos)
120 #define TC_CTRLA_PRESCALER_DIV8 (TC_CTRLA_PRESCALER_DIV8_Val << TC_CTRLA_PRESCALER_Pos)
121 #define TC_CTRLA_PRESCALER_DIV16 (TC_CTRLA_PRESCALER_DIV16_Val << TC_CTRLA_PRESCALER_Pos)
122 #define TC_CTRLA_PRESCALER_DIV64 (TC_CTRLA_PRESCALER_DIV64_Val << TC_CTRLA_PRESCALER_Pos)
123 #define TC_CTRLA_PRESCALER_DIV256 (TC_CTRLA_PRESCALER_DIV256_Val << TC_CTRLA_PRESCALER_Pos)
124 #define TC_CTRLA_PRESCALER_DIV1024 (TC_CTRLA_PRESCALER_DIV1024_Val << TC_CTRLA_PRESCALER_Pos)
125 #define TC_CTRLA_ALOCK_Pos 11
126 #define TC_CTRLA_ALOCK (_U_(0x1) << TC_CTRLA_ALOCK_Pos)
127 #define TC_CTRLA_CAPTEN0_Pos 16
128 #define TC_CTRLA_CAPTEN0 (_U_(1) << TC_CTRLA_CAPTEN0_Pos)
129 #define TC_CTRLA_CAPTEN1_Pos 17
130 #define TC_CTRLA_CAPTEN1 (_U_(1) << TC_CTRLA_CAPTEN1_Pos)
131 #define TC_CTRLA_CAPTEN_Pos 16
132 #define TC_CTRLA_CAPTEN_Msk (_U_(0x3) << TC_CTRLA_CAPTEN_Pos)
133 #define TC_CTRLA_CAPTEN(value) (TC_CTRLA_CAPTEN_Msk & ((value) << TC_CTRLA_CAPTEN_Pos))
134 #define TC_CTRLA_COPEN0_Pos 20
135 #define TC_CTRLA_COPEN0 (_U_(1) << TC_CTRLA_COPEN0_Pos)
136 #define TC_CTRLA_COPEN1_Pos 21
137 #define TC_CTRLA_COPEN1 (_U_(1) << TC_CTRLA_COPEN1_Pos)
138 #define TC_CTRLA_COPEN_Pos 20
139 #define TC_CTRLA_COPEN_Msk (_U_(0x3) << TC_CTRLA_COPEN_Pos)
140 #define TC_CTRLA_COPEN(value) (TC_CTRLA_COPEN_Msk & ((value) << TC_CTRLA_COPEN_Pos))
141 #define TC_CTRLA_CAPTMODE0_Pos 24
142 #define TC_CTRLA_CAPTMODE0_Msk (_U_(0x3) << TC_CTRLA_CAPTMODE0_Pos)
143 #define TC_CTRLA_CAPTMODE0(value) (TC_CTRLA_CAPTMODE0_Msk & ((value) << TC_CTRLA_CAPTMODE0_Pos))
144 #define TC_CTRLA_CAPTMODE0_DEFAULT_Val _U_(0x0)
145 #define TC_CTRLA_CAPTMODE0_CAPTMIN_Val _U_(0x1)
146 #define TC_CTRLA_CAPTMODE0_CAPTMAX_Val _U_(0x2)
147 #define TC_CTRLA_CAPTMODE0_DEFAULT (TC_CTRLA_CAPTMODE0_DEFAULT_Val << TC_CTRLA_CAPTMODE0_Pos)
148 #define TC_CTRLA_CAPTMODE0_CAPTMIN (TC_CTRLA_CAPTMODE0_CAPTMIN_Val << TC_CTRLA_CAPTMODE0_Pos)
149 #define TC_CTRLA_CAPTMODE0_CAPTMAX (TC_CTRLA_CAPTMODE0_CAPTMAX_Val << TC_CTRLA_CAPTMODE0_Pos)
150 #define TC_CTRLA_CAPTMODE1_Pos 27
151 #define TC_CTRLA_CAPTMODE1_Msk (_U_(0x3) << TC_CTRLA_CAPTMODE1_Pos)
152 #define TC_CTRLA_CAPTMODE1(value) (TC_CTRLA_CAPTMODE1_Msk & ((value) << TC_CTRLA_CAPTMODE1_Pos))
153 #define TC_CTRLA_CAPTMODE1_DEFAULT_Val _U_(0x0)
154 #define TC_CTRLA_CAPTMODE1_CAPTMIN_Val _U_(0x1)
155 #define TC_CTRLA_CAPTMODE1_CAPTMAX_Val _U_(0x2)
156 #define TC_CTRLA_CAPTMODE1_DEFAULT (TC_CTRLA_CAPTMODE1_DEFAULT_Val << TC_CTRLA_CAPTMODE1_Pos)
157 #define TC_CTRLA_CAPTMODE1_CAPTMIN (TC_CTRLA_CAPTMODE1_CAPTMIN_Val << TC_CTRLA_CAPTMODE1_Pos)
158 #define TC_CTRLA_CAPTMODE1_CAPTMAX (TC_CTRLA_CAPTMODE1_CAPTMAX_Val << TC_CTRLA_CAPTMODE1_Pos)
159 #define TC_CTRLA_MASK _U_(0x1B330FFF)
161 /* -------- TC_CTRLBCLR : (TC Offset: 0x04) (R/W 8) Control B Clear -------- */
162 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
163 typedef union {
164  struct {
165  uint8_t DIR:1;
166  uint8_t LUPD:1;
167  uint8_t ONESHOT:1;
168  uint8_t :2;
169  uint8_t CMD:3;
170  } bit;
171  uint8_t reg;
173 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
174 
175 #define TC_CTRLBCLR_OFFSET 0x04
176 #define TC_CTRLBCLR_RESETVALUE _U_(0x00)
178 #define TC_CTRLBCLR_DIR_Pos 0
179 #define TC_CTRLBCLR_DIR (_U_(0x1) << TC_CTRLBCLR_DIR_Pos)
180 #define TC_CTRLBCLR_LUPD_Pos 1
181 #define TC_CTRLBCLR_LUPD (_U_(0x1) << TC_CTRLBCLR_LUPD_Pos)
182 #define TC_CTRLBCLR_ONESHOT_Pos 2
183 #define TC_CTRLBCLR_ONESHOT (_U_(0x1) << TC_CTRLBCLR_ONESHOT_Pos)
184 #define TC_CTRLBCLR_CMD_Pos 5
185 #define TC_CTRLBCLR_CMD_Msk (_U_(0x7) << TC_CTRLBCLR_CMD_Pos)
186 #define TC_CTRLBCLR_CMD(value) (TC_CTRLBCLR_CMD_Msk & ((value) << TC_CTRLBCLR_CMD_Pos))
187 #define TC_CTRLBCLR_CMD_NONE_Val _U_(0x0)
188 #define TC_CTRLBCLR_CMD_RETRIGGER_Val _U_(0x1)
189 #define TC_CTRLBCLR_CMD_STOP_Val _U_(0x2)
190 #define TC_CTRLBCLR_CMD_UPDATE_Val _U_(0x3)
191 #define TC_CTRLBCLR_CMD_READSYNC_Val _U_(0x4)
192 #define TC_CTRLBCLR_CMD_DMAOS_Val _U_(0x5)
193 #define TC_CTRLBCLR_CMD_NONE (TC_CTRLBCLR_CMD_NONE_Val << TC_CTRLBCLR_CMD_Pos)
194 #define TC_CTRLBCLR_CMD_RETRIGGER (TC_CTRLBCLR_CMD_RETRIGGER_Val << TC_CTRLBCLR_CMD_Pos)
195 #define TC_CTRLBCLR_CMD_STOP (TC_CTRLBCLR_CMD_STOP_Val << TC_CTRLBCLR_CMD_Pos)
196 #define TC_CTRLBCLR_CMD_UPDATE (TC_CTRLBCLR_CMD_UPDATE_Val << TC_CTRLBCLR_CMD_Pos)
197 #define TC_CTRLBCLR_CMD_READSYNC (TC_CTRLBCLR_CMD_READSYNC_Val << TC_CTRLBCLR_CMD_Pos)
198 #define TC_CTRLBCLR_CMD_DMAOS (TC_CTRLBCLR_CMD_DMAOS_Val << TC_CTRLBCLR_CMD_Pos)
199 #define TC_CTRLBCLR_MASK _U_(0xE7)
201 /* -------- TC_CTRLBSET : (TC Offset: 0x05) (R/W 8) Control B Set -------- */
202 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
203 typedef union {
204  struct {
205  uint8_t DIR:1;
206  uint8_t LUPD:1;
207  uint8_t ONESHOT:1;
208  uint8_t :2;
209  uint8_t CMD:3;
210  } bit;
211  uint8_t reg;
213 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
214 
215 #define TC_CTRLBSET_OFFSET 0x05
216 #define TC_CTRLBSET_RESETVALUE _U_(0x00)
218 #define TC_CTRLBSET_DIR_Pos 0
219 #define TC_CTRLBSET_DIR (_U_(0x1) << TC_CTRLBSET_DIR_Pos)
220 #define TC_CTRLBSET_LUPD_Pos 1
221 #define TC_CTRLBSET_LUPD (_U_(0x1) << TC_CTRLBSET_LUPD_Pos)
222 #define TC_CTRLBSET_ONESHOT_Pos 2
223 #define TC_CTRLBSET_ONESHOT (_U_(0x1) << TC_CTRLBSET_ONESHOT_Pos)
224 #define TC_CTRLBSET_CMD_Pos 5
225 #define TC_CTRLBSET_CMD_Msk (_U_(0x7) << TC_CTRLBSET_CMD_Pos)
226 #define TC_CTRLBSET_CMD(value) (TC_CTRLBSET_CMD_Msk & ((value) << TC_CTRLBSET_CMD_Pos))
227 #define TC_CTRLBSET_CMD_NONE_Val _U_(0x0)
228 #define TC_CTRLBSET_CMD_RETRIGGER_Val _U_(0x1)
229 #define TC_CTRLBSET_CMD_STOP_Val _U_(0x2)
230 #define TC_CTRLBSET_CMD_UPDATE_Val _U_(0x3)
231 #define TC_CTRLBSET_CMD_READSYNC_Val _U_(0x4)
232 #define TC_CTRLBSET_CMD_DMAOS_Val _U_(0x5)
233 #define TC_CTRLBSET_CMD_NONE (TC_CTRLBSET_CMD_NONE_Val << TC_CTRLBSET_CMD_Pos)
234 #define TC_CTRLBSET_CMD_RETRIGGER (TC_CTRLBSET_CMD_RETRIGGER_Val << TC_CTRLBSET_CMD_Pos)
235 #define TC_CTRLBSET_CMD_STOP (TC_CTRLBSET_CMD_STOP_Val << TC_CTRLBSET_CMD_Pos)
236 #define TC_CTRLBSET_CMD_UPDATE (TC_CTRLBSET_CMD_UPDATE_Val << TC_CTRLBSET_CMD_Pos)
237 #define TC_CTRLBSET_CMD_READSYNC (TC_CTRLBSET_CMD_READSYNC_Val << TC_CTRLBSET_CMD_Pos)
238 #define TC_CTRLBSET_CMD_DMAOS (TC_CTRLBSET_CMD_DMAOS_Val << TC_CTRLBSET_CMD_Pos)
239 #define TC_CTRLBSET_MASK _U_(0xE7)
241 /* -------- TC_EVCTRL : (TC Offset: 0x06) (R/W 16) Event Control -------- */
242 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
243 typedef union {
244  struct {
245  uint16_t EVACT:3;
246  uint16_t :1;
247  uint16_t TCINV:1;
248  uint16_t TCEI:1;
249  uint16_t :2;
250  uint16_t OVFEO:1;
251  uint16_t :3;
252  uint16_t MCEO0:1;
253  uint16_t MCEO1:1;
254  uint16_t :2;
255  } bit;
256  struct {
257  uint16_t :12;
258  uint16_t MCEO:2;
259  uint16_t :2;
260  } vec;
261  uint16_t reg;
263 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
264 
265 #define TC_EVCTRL_OFFSET 0x06
266 #define TC_EVCTRL_RESETVALUE _U_(0x0000)
268 #define TC_EVCTRL_EVACT_Pos 0
269 #define TC_EVCTRL_EVACT_Msk (_U_(0x7) << TC_EVCTRL_EVACT_Pos)
270 #define TC_EVCTRL_EVACT(value) (TC_EVCTRL_EVACT_Msk & ((value) << TC_EVCTRL_EVACT_Pos))
271 #define TC_EVCTRL_EVACT_OFF_Val _U_(0x0)
272 #define TC_EVCTRL_EVACT_RETRIGGER_Val _U_(0x1)
273 #define TC_EVCTRL_EVACT_COUNT_Val _U_(0x2)
274 #define TC_EVCTRL_EVACT_START_Val _U_(0x3)
275 #define TC_EVCTRL_EVACT_STAMP_Val _U_(0x4)
276 #define TC_EVCTRL_EVACT_PPW_Val _U_(0x5)
277 #define TC_EVCTRL_EVACT_PWP_Val _U_(0x6)
278 #define TC_EVCTRL_EVACT_PW_Val _U_(0x7)
279 #define TC_EVCTRL_EVACT_OFF (TC_EVCTRL_EVACT_OFF_Val << TC_EVCTRL_EVACT_Pos)
280 #define TC_EVCTRL_EVACT_RETRIGGER (TC_EVCTRL_EVACT_RETRIGGER_Val << TC_EVCTRL_EVACT_Pos)
281 #define TC_EVCTRL_EVACT_COUNT (TC_EVCTRL_EVACT_COUNT_Val << TC_EVCTRL_EVACT_Pos)
282 #define TC_EVCTRL_EVACT_START (TC_EVCTRL_EVACT_START_Val << TC_EVCTRL_EVACT_Pos)
283 #define TC_EVCTRL_EVACT_STAMP (TC_EVCTRL_EVACT_STAMP_Val << TC_EVCTRL_EVACT_Pos)
284 #define TC_EVCTRL_EVACT_PPW (TC_EVCTRL_EVACT_PPW_Val << TC_EVCTRL_EVACT_Pos)
285 #define TC_EVCTRL_EVACT_PWP (TC_EVCTRL_EVACT_PWP_Val << TC_EVCTRL_EVACT_Pos)
286 #define TC_EVCTRL_EVACT_PW (TC_EVCTRL_EVACT_PW_Val << TC_EVCTRL_EVACT_Pos)
287 #define TC_EVCTRL_TCINV_Pos 4
288 #define TC_EVCTRL_TCINV (_U_(0x1) << TC_EVCTRL_TCINV_Pos)
289 #define TC_EVCTRL_TCEI_Pos 5
290 #define TC_EVCTRL_TCEI (_U_(0x1) << TC_EVCTRL_TCEI_Pos)
291 #define TC_EVCTRL_OVFEO_Pos 8
292 #define TC_EVCTRL_OVFEO (_U_(0x1) << TC_EVCTRL_OVFEO_Pos)
293 #define TC_EVCTRL_MCEO0_Pos 12
294 #define TC_EVCTRL_MCEO0 (_U_(1) << TC_EVCTRL_MCEO0_Pos)
295 #define TC_EVCTRL_MCEO1_Pos 13
296 #define TC_EVCTRL_MCEO1 (_U_(1) << TC_EVCTRL_MCEO1_Pos)
297 #define TC_EVCTRL_MCEO_Pos 12
298 #define TC_EVCTRL_MCEO_Msk (_U_(0x3) << TC_EVCTRL_MCEO_Pos)
299 #define TC_EVCTRL_MCEO(value) (TC_EVCTRL_MCEO_Msk & ((value) << TC_EVCTRL_MCEO_Pos))
300 #define TC_EVCTRL_MASK _U_(0x3137)
302 /* -------- TC_INTENCLR : (TC Offset: 0x08) (R/W 8) Interrupt Enable Clear -------- */
303 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
304 typedef union {
305  struct {
306  uint8_t OVF:1;
307  uint8_t ERR:1;
308  uint8_t :2;
309  uint8_t MC0:1;
310  uint8_t MC1:1;
311  uint8_t :2;
312  } bit;
313  struct {
314  uint8_t :4;
315  uint8_t MC:2;
316  uint8_t :2;
317  } vec;
318  uint8_t reg;
320 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
321 
322 #define TC_INTENCLR_OFFSET 0x08
323 #define TC_INTENCLR_RESETVALUE _U_(0x00)
325 #define TC_INTENCLR_OVF_Pos 0
326 #define TC_INTENCLR_OVF (_U_(0x1) << TC_INTENCLR_OVF_Pos)
327 #define TC_INTENCLR_ERR_Pos 1
328 #define TC_INTENCLR_ERR (_U_(0x1) << TC_INTENCLR_ERR_Pos)
329 #define TC_INTENCLR_MC0_Pos 4
330 #define TC_INTENCLR_MC0 (_U_(1) << TC_INTENCLR_MC0_Pos)
331 #define TC_INTENCLR_MC1_Pos 5
332 #define TC_INTENCLR_MC1 (_U_(1) << TC_INTENCLR_MC1_Pos)
333 #define TC_INTENCLR_MC_Pos 4
334 #define TC_INTENCLR_MC_Msk (_U_(0x3) << TC_INTENCLR_MC_Pos)
335 #define TC_INTENCLR_MC(value) (TC_INTENCLR_MC_Msk & ((value) << TC_INTENCLR_MC_Pos))
336 #define TC_INTENCLR_MASK _U_(0x33)
338 /* -------- TC_INTENSET : (TC Offset: 0x09) (R/W 8) Interrupt Enable Set -------- */
339 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
340 typedef union {
341  struct {
342  uint8_t OVF:1;
343  uint8_t ERR:1;
344  uint8_t :2;
345  uint8_t MC0:1;
346  uint8_t MC1:1;
347  uint8_t :2;
348  } bit;
349  struct {
350  uint8_t :4;
351  uint8_t MC:2;
352  uint8_t :2;
353  } vec;
354  uint8_t reg;
356 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
357 
358 #define TC_INTENSET_OFFSET 0x09
359 #define TC_INTENSET_RESETVALUE _U_(0x00)
361 #define TC_INTENSET_OVF_Pos 0
362 #define TC_INTENSET_OVF (_U_(0x1) << TC_INTENSET_OVF_Pos)
363 #define TC_INTENSET_ERR_Pos 1
364 #define TC_INTENSET_ERR (_U_(0x1) << TC_INTENSET_ERR_Pos)
365 #define TC_INTENSET_MC0_Pos 4
366 #define TC_INTENSET_MC0 (_U_(1) << TC_INTENSET_MC0_Pos)
367 #define TC_INTENSET_MC1_Pos 5
368 #define TC_INTENSET_MC1 (_U_(1) << TC_INTENSET_MC1_Pos)
369 #define TC_INTENSET_MC_Pos 4
370 #define TC_INTENSET_MC_Msk (_U_(0x3) << TC_INTENSET_MC_Pos)
371 #define TC_INTENSET_MC(value) (TC_INTENSET_MC_Msk & ((value) << TC_INTENSET_MC_Pos))
372 #define TC_INTENSET_MASK _U_(0x33)
374 /* -------- TC_INTFLAG : (TC Offset: 0x0A) (R/W 8) Interrupt Flag Status and Clear -------- */
375 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
376 typedef union { // __I to avoid read-modify-write on write-to-clear register
377  struct {
378  __I uint8_t OVF:1;
379  __I uint8_t ERR:1;
380  __I uint8_t :2;
381  __I uint8_t MC0:1;
382  __I uint8_t MC1:1;
383  __I uint8_t :2;
384  } bit;
385  struct {
386  __I uint8_t :4;
387  __I uint8_t MC:2;
388  __I uint8_t :2;
389  } vec;
390  uint8_t reg;
392 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
393 
394 #define TC_INTFLAG_OFFSET 0x0A
395 #define TC_INTFLAG_RESETVALUE _U_(0x00)
397 #define TC_INTFLAG_OVF_Pos 0
398 #define TC_INTFLAG_OVF (_U_(0x1) << TC_INTFLAG_OVF_Pos)
399 #define TC_INTFLAG_ERR_Pos 1
400 #define TC_INTFLAG_ERR (_U_(0x1) << TC_INTFLAG_ERR_Pos)
401 #define TC_INTFLAG_MC0_Pos 4
402 #define TC_INTFLAG_MC0 (_U_(1) << TC_INTFLAG_MC0_Pos)
403 #define TC_INTFLAG_MC1_Pos 5
404 #define TC_INTFLAG_MC1 (_U_(1) << TC_INTFLAG_MC1_Pos)
405 #define TC_INTFLAG_MC_Pos 4
406 #define TC_INTFLAG_MC_Msk (_U_(0x3) << TC_INTFLAG_MC_Pos)
407 #define TC_INTFLAG_MC(value) (TC_INTFLAG_MC_Msk & ((value) << TC_INTFLAG_MC_Pos))
408 #define TC_INTFLAG_MASK _U_(0x33)
410 /* -------- TC_STATUS : (TC Offset: 0x0B) (R/W 8) Status -------- */
411 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
412 typedef union {
413  struct {
414  uint8_t STOP:1;
415  uint8_t SLAVE:1;
416  uint8_t :1;
417  uint8_t PERBUFV:1;
418  uint8_t CCBUFV0:1;
419  uint8_t CCBUFV1:1;
420  uint8_t :2;
421  } bit;
422  struct {
423  uint8_t :4;
424  uint8_t CCBUFV:2;
425  uint8_t :2;
426  } vec;
427  uint8_t reg;
429 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
430 
431 #define TC_STATUS_OFFSET 0x0B
432 #define TC_STATUS_RESETVALUE _U_(0x01)
434 #define TC_STATUS_STOP_Pos 0
435 #define TC_STATUS_STOP (_U_(0x1) << TC_STATUS_STOP_Pos)
436 #define TC_STATUS_SLAVE_Pos 1
437 #define TC_STATUS_SLAVE (_U_(0x1) << TC_STATUS_SLAVE_Pos)
438 #define TC_STATUS_PERBUFV_Pos 3
439 #define TC_STATUS_PERBUFV (_U_(0x1) << TC_STATUS_PERBUFV_Pos)
440 #define TC_STATUS_CCBUFV0_Pos 4
441 #define TC_STATUS_CCBUFV0 (_U_(1) << TC_STATUS_CCBUFV0_Pos)
442 #define TC_STATUS_CCBUFV1_Pos 5
443 #define TC_STATUS_CCBUFV1 (_U_(1) << TC_STATUS_CCBUFV1_Pos)
444 #define TC_STATUS_CCBUFV_Pos 4
445 #define TC_STATUS_CCBUFV_Msk (_U_(0x3) << TC_STATUS_CCBUFV_Pos)
446 #define TC_STATUS_CCBUFV(value) (TC_STATUS_CCBUFV_Msk & ((value) << TC_STATUS_CCBUFV_Pos))
447 #define TC_STATUS_MASK _U_(0x3B)
449 /* -------- TC_WAVE : (TC Offset: 0x0C) (R/W 8) Waveform Generation Control -------- */
450 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
451 typedef union {
452  struct {
453  uint8_t WAVEGEN:2;
454  uint8_t :6;
455  } bit;
456  uint8_t reg;
457 } TC_WAVE_Type;
458 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
459 
460 #define TC_WAVE_OFFSET 0x0C
461 #define TC_WAVE_RESETVALUE _U_(0x00)
463 #define TC_WAVE_WAVEGEN_Pos 0
464 #define TC_WAVE_WAVEGEN_Msk (_U_(0x3) << TC_WAVE_WAVEGEN_Pos)
465 #define TC_WAVE_WAVEGEN(value) (TC_WAVE_WAVEGEN_Msk & ((value) << TC_WAVE_WAVEGEN_Pos))
466 #define TC_WAVE_WAVEGEN_NFRQ_Val _U_(0x0)
467 #define TC_WAVE_WAVEGEN_MFRQ_Val _U_(0x1)
468 #define TC_WAVE_WAVEGEN_NPWM_Val _U_(0x2)
469 #define TC_WAVE_WAVEGEN_MPWM_Val _U_(0x3)
470 #define TC_WAVE_WAVEGEN_NFRQ (TC_WAVE_WAVEGEN_NFRQ_Val << TC_WAVE_WAVEGEN_Pos)
471 #define TC_WAVE_WAVEGEN_MFRQ (TC_WAVE_WAVEGEN_MFRQ_Val << TC_WAVE_WAVEGEN_Pos)
472 #define TC_WAVE_WAVEGEN_NPWM (TC_WAVE_WAVEGEN_NPWM_Val << TC_WAVE_WAVEGEN_Pos)
473 #define TC_WAVE_WAVEGEN_MPWM (TC_WAVE_WAVEGEN_MPWM_Val << TC_WAVE_WAVEGEN_Pos)
474 #define TC_WAVE_MASK _U_(0x03)
476 /* -------- TC_DRVCTRL : (TC Offset: 0x0D) (R/W 8) Control C -------- */
477 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
478 typedef union {
479  struct {
480  uint8_t INVEN0:1;
481  uint8_t INVEN1:1;
482  uint8_t :6;
483  } bit;
484  struct {
485  uint8_t INVEN:2;
486  uint8_t :6;
487  } vec;
488  uint8_t reg;
490 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
491 
492 #define TC_DRVCTRL_OFFSET 0x0D
493 #define TC_DRVCTRL_RESETVALUE _U_(0x00)
495 #define TC_DRVCTRL_INVEN0_Pos 0
496 #define TC_DRVCTRL_INVEN0 (_U_(1) << TC_DRVCTRL_INVEN0_Pos)
497 #define TC_DRVCTRL_INVEN1_Pos 1
498 #define TC_DRVCTRL_INVEN1 (_U_(1) << TC_DRVCTRL_INVEN1_Pos)
499 #define TC_DRVCTRL_INVEN_Pos 0
500 #define TC_DRVCTRL_INVEN_Msk (_U_(0x3) << TC_DRVCTRL_INVEN_Pos)
501 #define TC_DRVCTRL_INVEN(value) (TC_DRVCTRL_INVEN_Msk & ((value) << TC_DRVCTRL_INVEN_Pos))
502 #define TC_DRVCTRL_MASK _U_(0x03)
504 /* -------- TC_DBGCTRL : (TC Offset: 0x0F) (R/W 8) Debug Control -------- */
505 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
506 typedef union {
507  struct {
508  uint8_t DBGRUN:1;
509  uint8_t :7;
510  } bit;
511  uint8_t reg;
513 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
514 
515 #define TC_DBGCTRL_OFFSET 0x0F
516 #define TC_DBGCTRL_RESETVALUE _U_(0x00)
518 #define TC_DBGCTRL_DBGRUN_Pos 0
519 #define TC_DBGCTRL_DBGRUN (_U_(0x1) << TC_DBGCTRL_DBGRUN_Pos)
520 #define TC_DBGCTRL_MASK _U_(0x01)
522 /* -------- TC_SYNCBUSY : (TC Offset: 0x10) (R/ 32) Synchronization Status -------- */
523 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
524 typedef union {
525  struct {
526  uint32_t SWRST:1;
527  uint32_t ENABLE:1;
528  uint32_t CTRLB:1;
529  uint32_t STATUS:1;
530  uint32_t COUNT:1;
531  uint32_t PER:1;
532  uint32_t CC0:1;
533  uint32_t CC1:1;
534  uint32_t :24;
535  } bit;
536  struct {
537  uint32_t :6;
538  uint32_t CC:2;
539  uint32_t :24;
540  } vec;
541  uint32_t reg;
543 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
544 
545 #define TC_SYNCBUSY_OFFSET 0x10
546 #define TC_SYNCBUSY_RESETVALUE _U_(0x00000000)
548 #define TC_SYNCBUSY_SWRST_Pos 0
549 #define TC_SYNCBUSY_SWRST (_U_(0x1) << TC_SYNCBUSY_SWRST_Pos)
550 #define TC_SYNCBUSY_ENABLE_Pos 1
551 #define TC_SYNCBUSY_ENABLE (_U_(0x1) << TC_SYNCBUSY_ENABLE_Pos)
552 #define TC_SYNCBUSY_CTRLB_Pos 2
553 #define TC_SYNCBUSY_CTRLB (_U_(0x1) << TC_SYNCBUSY_CTRLB_Pos)
554 #define TC_SYNCBUSY_STATUS_Pos 3
555 #define TC_SYNCBUSY_STATUS (_U_(0x1) << TC_SYNCBUSY_STATUS_Pos)
556 #define TC_SYNCBUSY_COUNT_Pos 4
557 #define TC_SYNCBUSY_COUNT (_U_(0x1) << TC_SYNCBUSY_COUNT_Pos)
558 #define TC_SYNCBUSY_PER_Pos 5
559 #define TC_SYNCBUSY_PER (_U_(0x1) << TC_SYNCBUSY_PER_Pos)
560 #define TC_SYNCBUSY_CC0_Pos 6
561 #define TC_SYNCBUSY_CC0 (_U_(1) << TC_SYNCBUSY_CC0_Pos)
562 #define TC_SYNCBUSY_CC1_Pos 7
563 #define TC_SYNCBUSY_CC1 (_U_(1) << TC_SYNCBUSY_CC1_Pos)
564 #define TC_SYNCBUSY_CC_Pos 6
565 #define TC_SYNCBUSY_CC_Msk (_U_(0x3) << TC_SYNCBUSY_CC_Pos)
566 #define TC_SYNCBUSY_CC(value) (TC_SYNCBUSY_CC_Msk & ((value) << TC_SYNCBUSY_CC_Pos))
567 #define TC_SYNCBUSY_MASK _U_(0x000000FF)
569 /* -------- TC_COUNT16_COUNT : (TC Offset: 0x14) (R/W 16) COUNT16 COUNT16 Count -------- */
570 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
571 typedef union {
572  struct {
573  uint16_t COUNT:16;
574  } bit;
575  uint16_t reg;
577 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
578 
579 #define TC_COUNT16_COUNT_OFFSET 0x14
580 #define TC_COUNT16_COUNT_RESETVALUE _U_(0x0000)
582 #define TC_COUNT16_COUNT_COUNT_Pos 0
583 #define TC_COUNT16_COUNT_COUNT_Msk (_U_(0xFFFF) << TC_COUNT16_COUNT_COUNT_Pos)
584 #define TC_COUNT16_COUNT_COUNT(value) (TC_COUNT16_COUNT_COUNT_Msk & ((value) << TC_COUNT16_COUNT_COUNT_Pos))
585 #define TC_COUNT16_COUNT_MASK _U_(0xFFFF)
587 /* -------- TC_COUNT32_COUNT : (TC Offset: 0x14) (R/W 32) COUNT32 COUNT32 Count -------- */
588 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
589 typedef union {
590  struct {
591  uint32_t COUNT:32;
592  } bit;
593  uint32_t reg;
595 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
596 
597 #define TC_COUNT32_COUNT_OFFSET 0x14
598 #define TC_COUNT32_COUNT_RESETVALUE _U_(0x00000000)
600 #define TC_COUNT32_COUNT_COUNT_Pos 0
601 #define TC_COUNT32_COUNT_COUNT_Msk (_U_(0xFFFFFFFF) << TC_COUNT32_COUNT_COUNT_Pos)
602 #define TC_COUNT32_COUNT_COUNT(value) (TC_COUNT32_COUNT_COUNT_Msk & ((value) << TC_COUNT32_COUNT_COUNT_Pos))
603 #define TC_COUNT32_COUNT_MASK _U_(0xFFFFFFFF)
605 /* -------- TC_COUNT8_COUNT : (TC Offset: 0x14) (R/W 8) COUNT8 COUNT8 Count -------- */
606 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
607 typedef union {
608  struct {
609  uint8_t COUNT:8;
610  } bit;
611  uint8_t reg;
613 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
614 
615 #define TC_COUNT8_COUNT_OFFSET 0x14
616 #define TC_COUNT8_COUNT_RESETVALUE _U_(0x00)
618 #define TC_COUNT8_COUNT_COUNT_Pos 0
619 #define TC_COUNT8_COUNT_COUNT_Msk (_U_(0xFF) << TC_COUNT8_COUNT_COUNT_Pos)
620 #define TC_COUNT8_COUNT_COUNT(value) (TC_COUNT8_COUNT_COUNT_Msk & ((value) << TC_COUNT8_COUNT_COUNT_Pos))
621 #define TC_COUNT8_COUNT_MASK _U_(0xFF)
623 /* -------- TC_COUNT8_PER : (TC Offset: 0x1B) (R/W 8) COUNT8 COUNT8 Period -------- */
624 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
625 typedef union {
626  struct {
627  uint8_t PER:8;
628  } bit;
629  uint8_t reg;
631 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
632 
633 #define TC_COUNT8_PER_OFFSET 0x1B
634 #define TC_COUNT8_PER_RESETVALUE _U_(0xFF)
636 #define TC_COUNT8_PER_PER_Pos 0
637 #define TC_COUNT8_PER_PER_Msk (_U_(0xFF) << TC_COUNT8_PER_PER_Pos)
638 #define TC_COUNT8_PER_PER(value) (TC_COUNT8_PER_PER_Msk & ((value) << TC_COUNT8_PER_PER_Pos))
639 #define TC_COUNT8_PER_MASK _U_(0xFF)
641 /* -------- TC_COUNT16_CC : (TC Offset: 0x1C) (R/W 16) COUNT16 COUNT16 Compare and Capture -------- */
642 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
643 typedef union {
644  struct {
645  uint16_t CC:16;
646  } bit;
647  uint16_t reg;
649 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
650 
651 #define TC_COUNT16_CC_OFFSET 0x1C
652 #define TC_COUNT16_CC_RESETVALUE _U_(0x0000)
654 #define TC_COUNT16_CC_CC_Pos 0
655 #define TC_COUNT16_CC_CC_Msk (_U_(0xFFFF) << TC_COUNT16_CC_CC_Pos)
656 #define TC_COUNT16_CC_CC(value) (TC_COUNT16_CC_CC_Msk & ((value) << TC_COUNT16_CC_CC_Pos))
657 #define TC_COUNT16_CC_MASK _U_(0xFFFF)
659 /* -------- TC_COUNT32_CC : (TC Offset: 0x1C) (R/W 32) COUNT32 COUNT32 Compare and Capture -------- */
660 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
661 typedef union {
662  struct {
663  uint32_t CC:32;
664  } bit;
665  uint32_t reg;
667 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
668 
669 #define TC_COUNT32_CC_OFFSET 0x1C
670 #define TC_COUNT32_CC_RESETVALUE _U_(0x00000000)
672 #define TC_COUNT32_CC_CC_Pos 0
673 #define TC_COUNT32_CC_CC_Msk (_U_(0xFFFFFFFF) << TC_COUNT32_CC_CC_Pos)
674 #define TC_COUNT32_CC_CC(value) (TC_COUNT32_CC_CC_Msk & ((value) << TC_COUNT32_CC_CC_Pos))
675 #define TC_COUNT32_CC_MASK _U_(0xFFFFFFFF)
677 /* -------- TC_COUNT8_CC : (TC Offset: 0x1C) (R/W 8) COUNT8 COUNT8 Compare and Capture -------- */
678 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
679 typedef union {
680  struct {
681  uint8_t CC:8;
682  } bit;
683  uint8_t reg;
685 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
686 
687 #define TC_COUNT8_CC_OFFSET 0x1C
688 #define TC_COUNT8_CC_RESETVALUE _U_(0x00)
690 #define TC_COUNT8_CC_CC_Pos 0
691 #define TC_COUNT8_CC_CC_Msk (_U_(0xFF) << TC_COUNT8_CC_CC_Pos)
692 #define TC_COUNT8_CC_CC(value) (TC_COUNT8_CC_CC_Msk & ((value) << TC_COUNT8_CC_CC_Pos))
693 #define TC_COUNT8_CC_MASK _U_(0xFF)
695 /* -------- TC_COUNT8_PERBUF : (TC Offset: 0x2F) (R/W 8) COUNT8 COUNT8 Period Buffer -------- */
696 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
697 typedef union {
698  struct {
699  uint8_t PERBUF:8;
700  } bit;
701  uint8_t reg;
703 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
704 
705 #define TC_COUNT8_PERBUF_OFFSET 0x2F
706 #define TC_COUNT8_PERBUF_RESETVALUE _U_(0xFF)
708 #define TC_COUNT8_PERBUF_PERBUF_Pos 0
709 #define TC_COUNT8_PERBUF_PERBUF_Msk (_U_(0xFF) << TC_COUNT8_PERBUF_PERBUF_Pos)
710 #define TC_COUNT8_PERBUF_PERBUF(value) (TC_COUNT8_PERBUF_PERBUF_Msk & ((value) << TC_COUNT8_PERBUF_PERBUF_Pos))
711 #define TC_COUNT8_PERBUF_MASK _U_(0xFF)
713 /* -------- TC_COUNT16_CCBUF : (TC Offset: 0x30) (R/W 16) COUNT16 COUNT16 Compare and Capture Buffer -------- */
714 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
715 typedef union {
716  struct {
717  uint16_t CCBUF:16;
718  } bit;
719  uint16_t reg;
721 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
722 
723 #define TC_COUNT16_CCBUF_OFFSET 0x30
724 #define TC_COUNT16_CCBUF_RESETVALUE _U_(0x0000)
726 #define TC_COUNT16_CCBUF_CCBUF_Pos 0
727 #define TC_COUNT16_CCBUF_CCBUF_Msk (_U_(0xFFFF) << TC_COUNT16_CCBUF_CCBUF_Pos)
728 #define TC_COUNT16_CCBUF_CCBUF(value) (TC_COUNT16_CCBUF_CCBUF_Msk & ((value) << TC_COUNT16_CCBUF_CCBUF_Pos))
729 #define TC_COUNT16_CCBUF_MASK _U_(0xFFFF)
731 /* -------- TC_COUNT32_CCBUF : (TC Offset: 0x30) (R/W 32) COUNT32 COUNT32 Compare and Capture Buffer -------- */
732 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
733 typedef union {
734  struct {
735  uint32_t CCBUF:32;
736  } bit;
737  uint32_t reg;
739 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
740 
741 #define TC_COUNT32_CCBUF_OFFSET 0x30
742 #define TC_COUNT32_CCBUF_RESETVALUE _U_(0x00000000)
744 #define TC_COUNT32_CCBUF_CCBUF_Pos 0
745 #define TC_COUNT32_CCBUF_CCBUF_Msk (_U_(0xFFFFFFFF) << TC_COUNT32_CCBUF_CCBUF_Pos)
746 #define TC_COUNT32_CCBUF_CCBUF(value) (TC_COUNT32_CCBUF_CCBUF_Msk & ((value) << TC_COUNT32_CCBUF_CCBUF_Pos))
747 #define TC_COUNT32_CCBUF_MASK _U_(0xFFFFFFFF)
749 /* -------- TC_COUNT8_CCBUF : (TC Offset: 0x30) (R/W 8) COUNT8 COUNT8 Compare and Capture Buffer -------- */
750 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
751 typedef union {
752  struct {
753  uint8_t CCBUF:8;
754  } bit;
755  uint8_t reg;
757 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
758 
759 #define TC_COUNT8_CCBUF_OFFSET 0x30
760 #define TC_COUNT8_CCBUF_RESETVALUE _U_(0x00)
762 #define TC_COUNT8_CCBUF_CCBUF_Pos 0
763 #define TC_COUNT8_CCBUF_CCBUF_Msk (_U_(0xFF) << TC_COUNT8_CCBUF_CCBUF_Pos)
764 #define TC_COUNT8_CCBUF_CCBUF(value) (TC_COUNT8_CCBUF_CCBUF_Msk & ((value) << TC_COUNT8_CCBUF_CCBUF_Pos))
765 #define TC_COUNT8_CCBUF_MASK _U_(0xFF)
768 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
769 typedef struct { /* 8-bit Counter Mode */
780  RoReg8 Reserved1[0x1];
784  RoReg8 Reserved2[0x6];
786  __IO TC_COUNT8_CC_Type CC[2];
787  RoReg8 Reserved3[0x11];
789  __IO TC_COUNT8_CCBUF_Type CCBUF[2];
790 } TcCount8;
791 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
792 
794 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
795 typedef struct { /* 16-bit Counter Mode */
806  RoReg8 Reserved1[0x1];
810  RoReg8 Reserved2[0x6];
811  __IO TC_COUNT16_CC_Type CC[2];
812  RoReg8 Reserved3[0x10];
813  __IO TC_COUNT16_CCBUF_Type CCBUF[2];
814 } TcCount16;
815 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
816 
818 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
819 typedef struct { /* 32-bit Counter Mode */
830  RoReg8 Reserved1[0x1];
834  RoReg8 Reserved2[0x4];
835  __IO TC_COUNT32_CC_Type CC[2];
836  RoReg8 Reserved3[0xC];
837  __IO TC_COUNT32_CCBUF_Type CCBUF[2];
838 } TcCount32;
839 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
840 
841 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
842 typedef union {
846 } Tc;
847 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
848 
851 #endif /* _SAME54_TC_COMPONENT_ */
TC_COUNT32_CCBUF_Type
Definition: tc.h:733
TC_STATUS_Type::CCBUFV1
uint8_t CCBUFV1
Definition: tc.h:419
TcCount32::COUNT
__IO TC_COUNT32_COUNT_Type COUNT
Offset: 0x14 (R/W 32) COUNT32 Count.
Definition: tc.h:833
TC_INTFLAG_Type::ERR
__I uint8_t ERR
Definition: tc.h:379
TC_COUNT16_COUNT_Type::reg
uint16_t reg
Definition: tc.h:575
TC_COUNT32_CC_Type
Definition: tc.h:661
TC_INTENSET_Type
Definition: tc.h:340
TC_CTRLBSET_Type::ONESHOT
uint8_t ONESHOT
Definition: tc.h:207
TcCount16::INTENCLR
__IO TC_INTENCLR_Type INTENCLR
Offset: 0x08 (R/W 8) Interrupt Enable Clear.
Definition: tc.h:800
Tc::COUNT16
TcCount16 COUNT16
Offset: 0x00 16-bit Counter Mode.
Definition: tc.h:844
TC_EVCTRL_Type
Definition: tc.h:243
TC_COUNT32_COUNT_Type::COUNT
uint32_t COUNT
Definition: tc.h:591
TcCount8::CTRLBCLR
__IO TC_CTRLBCLR_Type CTRLBCLR
Offset: 0x04 (R/W 8) Control B Clear.
Definition: tc.h:771
TC_INTENCLR_Type
Definition: tc.h:304
TC_EVCTRL_Type::OVFEO
uint16_t OVFEO
Definition: tc.h:250
TC_COUNT8_CC_Type::reg
uint8_t reg
Definition: tc.h:683
TcCount8::DRVCTRL
__IO TC_DRVCTRL_Type DRVCTRL
Offset: 0x0D (R/W 8) Control C.
Definition: tc.h:779
TcCount32::CTRLBCLR
__IO TC_CTRLBCLR_Type CTRLBCLR
Offset: 0x04 (R/W 8) Control B Clear.
Definition: tc.h:821
TC_EVCTRL_Type::TCEI
uint16_t TCEI
Definition: tc.h:248
TcCount8::INTENCLR
__IO TC_INTENCLR_Type INTENCLR
Offset: 0x08 (R/W 8) Interrupt Enable Clear.
Definition: tc.h:774
TC_CTRLBSET_Type::LUPD
uint8_t LUPD
Definition: tc.h:206
TC_CTRLA_Type::ENABLE
uint32_t ENABLE
Definition: tc.h:47
TC_SYNCBUSY_Type::SWRST
uint32_t SWRST
Definition: tc.h:526
TcCount8::STATUS
__IO TC_STATUS_Type STATUS
Offset: 0x0B (R/W 8) Status.
Definition: tc.h:777
TC_COUNT16_CC_Type::reg
uint16_t reg
Definition: tc.h:647
TC_COUNT8_CCBUF_Type::reg
uint8_t reg
Definition: tc.h:755
TC_CTRLBSET_Type::reg
uint8_t reg
Definition: tc.h:211
TC_STATUS_Type::SLAVE
uint8_t SLAVE
Definition: tc.h:415
TcCount32::CTRLA
__IO TC_CTRLA_Type CTRLA
Offset: 0x00 (R/W 32) Control A.
Definition: tc.h:820
TcCount16::SYNCBUSY
__I TC_SYNCBUSY_Type SYNCBUSY
Offset: 0x10 (R/ 32) Synchronization Status.
Definition: tc.h:808
TcCount16::CTRLA
__IO TC_CTRLA_Type CTRLA
Offset: 0x00 (R/W 32) Control A.
Definition: tc.h:796
TC_INTENCLR_Type::MC0
uint8_t MC0
Definition: tc.h:309
TC_STATUS_Type
Definition: tc.h:412
TC_INTENSET_Type::MC
uint8_t MC
Definition: tc.h:351
TC_INTENSET_Type::ERR
uint8_t ERR
Definition: tc.h:343
TC_CTRLBCLR_Type::LUPD
uint8_t LUPD
Definition: tc.h:166
TC_CTRLBCLR_Type::reg
uint8_t reg
Definition: tc.h:171
TC_CTRLA_Type::COPEN
uint32_t COPEN
Definition: tc.h:70
TC_COUNT16_CCBUF_Type::CCBUF
uint16_t CCBUF
Definition: tc.h:717
TcCount16::INTENSET
__IO TC_INTENSET_Type INTENSET
Offset: 0x09 (R/W 8) Interrupt Enable Set.
Definition: tc.h:801
TC_SYNCBUSY_Type
Definition: tc.h:524
TC_SYNCBUSY_Type::CC0
uint32_t CC0
Definition: tc.h:532
TC_SYNCBUSY_Type::CC
uint32_t CC
Definition: tc.h:538
TC_COUNT16_CCBUF_Type::reg
uint16_t reg
Definition: tc.h:719
TC_STATUS_Type::CCBUFV
uint8_t CCBUFV
Definition: tc.h:424
TC_WAVE_Type
Definition: tc.h:451
TC_COUNT8_PER_Type
Definition: tc.h:625
TC_CTRLBCLR_Type::ONESHOT
uint8_t ONESHOT
Definition: tc.h:167
TC_SYNCBUSY_Type::ENABLE
uint32_t ENABLE
Definition: tc.h:527
TcCount8::CTRLBSET
__IO TC_CTRLBSET_Type CTRLBSET
Offset: 0x05 (R/W 8) Control B Set.
Definition: tc.h:772
TC_DRVCTRL_Type::reg
uint8_t reg
Definition: tc.h:488
TC_COUNT32_COUNT_Type::reg
uint32_t reg
Definition: tc.h:593
TC_CTRLA_Type::ALOCK
uint32_t ALOCK
Definition: tc.h:53
TC_COUNT8_COUNT_Type
Definition: tc.h:607
TcCount8::INTFLAG
__IO TC_INTFLAG_Type INTFLAG
Offset: 0x0A (R/W 8) Interrupt Flag Status and Clear.
Definition: tc.h:776
TC_CTRLA_Type::COPEN1
uint32_t COPEN1
Definition: tc.h:59
TC_CTRLA_Type::CAPTEN
uint32_t CAPTEN
Definition: tc.h:68
TC_COUNT32_CC_Type::CC
uint32_t CC
Definition: tc.h:663
TC_COUNT8_CC_Type
Definition: tc.h:679
TC_COUNT32_COUNT_Type
Definition: tc.h:589
TC_INTENSET_Type::reg
uint8_t reg
Definition: tc.h:354
TC_DRVCTRL_Type::INVEN
uint8_t INVEN
Definition: tc.h:485
TC_COUNT8_PER_Type::reg
uint8_t reg
Definition: tc.h:629
TC_COUNT32_CCBUF_Type::reg
uint32_t reg
Definition: tc.h:737
TC_CTRLA_Type::PRESCALER
uint32_t PRESCALER
Definition: tc.h:52
TcCount32::DBGCTRL
__IO TC_DBGCTRL_Type DBGCTRL
Offset: 0x0F (R/W 8) Debug Control.
Definition: tc.h:831
TC_COUNT8_PERBUF_Type::reg
uint8_t reg
Definition: tc.h:701
TC_CTRLA_Type
Definition: tc.h:44
TC_CTRLBCLR_Type::CMD
uint8_t CMD
Definition: tc.h:169
TC_DBGCTRL_Type::DBGRUN
uint8_t DBGRUN
Definition: tc.h:508
TC_INTENCLR_Type::MC1
uint8_t MC1
Definition: tc.h:310
Tc
Definition: tc.h:842
TC_STATUS_Type::PERBUFV
uint8_t PERBUFV
Definition: tc.h:417
TcCount16::STATUS
__IO TC_STATUS_Type STATUS
Offset: 0x0B (R/W 8) Status.
Definition: tc.h:803
TC_CTRLA_Type::COPEN0
uint32_t COPEN0
Definition: tc.h:58
TC_COUNT8_COUNT_Type::reg
uint8_t reg
Definition: tc.h:611
TC_INTFLAG_Type::MC
__I uint8_t MC
Definition: tc.h:387
Tc::COUNT8
TcCount8 COUNT8
Offset: 0x00 8-bit Counter Mode.
Definition: tc.h:843
TcCount8
TC_COUNT8 hardware registers.
Definition: tc.h:769
TC_CTRLA_Type::reg
uint32_t reg
Definition: tc.h:73
TC_WAVE_Type::WAVEGEN
uint8_t WAVEGEN
Definition: tc.h:453
TcCount32::SYNCBUSY
__I TC_SYNCBUSY_Type SYNCBUSY
Offset: 0x10 (R/ 32) Synchronization Status.
Definition: tc.h:832
TcCount16::CTRLBCLR
__IO TC_CTRLBCLR_Type CTRLBCLR
Offset: 0x04 (R/W 8) Control B Clear.
Definition: tc.h:797
TC_INTFLAG_Type::uint8_t
__I uint8_t
Definition: tc.h:380
Tc::COUNT32
TcCount32 COUNT32
Offset: 0x00 32-bit Counter Mode.
Definition: tc.h:845
TcCount32::INTENSET
__IO TC_INTENSET_Type INTENSET
Offset: 0x09 (R/W 8) Interrupt Enable Set.
Definition: tc.h:825
TC_INTENCLR_Type::ERR
uint8_t ERR
Definition: tc.h:307
TC_EVCTRL_Type::reg
uint16_t reg
Definition: tc.h:261
TcCount16::EVCTRL
__IO TC_EVCTRL_Type EVCTRL
Offset: 0x06 (R/W 16) Event Control.
Definition: tc.h:799
TC_CTRLA_Type::RUNSTDBY
uint32_t RUNSTDBY
Definition: tc.h:50
TC_CTRLA_Type::SWRST
uint32_t SWRST
Definition: tc.h:46
TC_INTENSET_Type::MC0
uint8_t MC0
Definition: tc.h:345
TC_INTFLAG_Type::OVF
__I uint8_t OVF
Definition: tc.h:378
TC_CTRLBCLR_Type
Definition: tc.h:163
TC_DRVCTRL_Type
Definition: tc.h:478
TC_INTENSET_Type::MC1
uint8_t MC1
Definition: tc.h:346
TcCount8::DBGCTRL
__IO TC_DBGCTRL_Type DBGCTRL
Offset: 0x0F (R/W 8) Debug Control.
Definition: tc.h:781
TcCount16::COUNT
__IO TC_COUNT16_COUNT_Type COUNT
Offset: 0x14 (R/W 16) COUNT16 Count.
Definition: tc.h:809
TC_WAVE_Type::reg
uint8_t reg
Definition: tc.h:456
TC_INTENCLR_Type::reg
uint8_t reg
Definition: tc.h:318
TC_SYNCBUSY_Type::COUNT
uint32_t COUNT
Definition: tc.h:530
TcCount32
TC_COUNT32 hardware registers.
Definition: tc.h:819
TC_INTFLAG_Type::MC0
__I uint8_t MC0
Definition: tc.h:381
TC_EVCTRL_Type::TCINV
uint16_t TCINV
Definition: tc.h:247
TC_SYNCBUSY_Type::CC1
uint32_t CC1
Definition: tc.h:533
TcCount32::WAVE
__IO TC_WAVE_Type WAVE
Offset: 0x0C (R/W 8) Waveform Generation Control.
Definition: tc.h:828
TcCount16
TC_COUNT16 hardware registers.
Definition: tc.h:795
TC_EVCTRL_Type::MCEO0
uint16_t MCEO0
Definition: tc.h:252
TcCount16::WAVE
__IO TC_WAVE_Type WAVE
Offset: 0x0C (R/W 8) Waveform Generation Control.
Definition: tc.h:804
TcCount32::STATUS
__IO TC_STATUS_Type STATUS
Offset: 0x0B (R/W 8) Status.
Definition: tc.h:827
TC_DBGCTRL_Type
Definition: tc.h:506
TC_COUNT8_PER_Type::PER
uint8_t PER
Definition: tc.h:627
TC_INTFLAG_Type
Definition: tc.h:376
TcCount8::INTENSET
__IO TC_INTENSET_Type INTENSET
Offset: 0x09 (R/W 8) Interrupt Enable Set.
Definition: tc.h:775
TC_CTRLA_Type::PRESCSYNC
uint32_t PRESCSYNC
Definition: tc.h:49
TC_CTRLA_Type::MODE
uint32_t MODE
Definition: tc.h:48
TcCount8::PER
__IO TC_COUNT8_PER_Type PER
Offset: 0x1B (R/W 8) COUNT8 Period.
Definition: tc.h:785
TcCount32::CTRLBSET
__IO TC_CTRLBSET_Type CTRLBSET
Offset: 0x05 (R/W 8) Control B Set.
Definition: tc.h:822
TC_COUNT32_CCBUF_Type::CCBUF
uint32_t CCBUF
Definition: tc.h:735
TC_CTRLBSET_Type
Definition: tc.h:203
TC_INTENSET_Type::OVF
uint8_t OVF
Definition: tc.h:342
TcCount8::PERBUF
__IO TC_COUNT8_PERBUF_Type PERBUF
Offset: 0x2F (R/W 8) COUNT8 Period Buffer.
Definition: tc.h:788
TC_COUNT8_PERBUF_Type
Definition: tc.h:697
TcCount8::WAVE
__IO TC_WAVE_Type WAVE
Offset: 0x0C (R/W 8) Waveform Generation Control.
Definition: tc.h:778
TC_CTRLBCLR_Type::DIR
uint8_t DIR
Definition: tc.h:165
TcCount32::DRVCTRL
__IO TC_DRVCTRL_Type DRVCTRL
Offset: 0x0D (R/W 8) Control C.
Definition: tc.h:829
TcCount8::CTRLA
__IO TC_CTRLA_Type CTRLA
Offset: 0x00 (R/W 32) Control A.
Definition: tc.h:770
TC_COUNT16_CC_Type::CC
uint16_t CC
Definition: tc.h:645
TC_CTRLA_Type::CAPTMODE1
uint32_t CAPTMODE1
Definition: tc.h:63
TC_SYNCBUSY_Type::reg
uint32_t reg
Definition: tc.h:541
TC_DBGCTRL_Type::reg
uint8_t reg
Definition: tc.h:511
TC_COUNT8_CCBUF_Type::CCBUF
uint8_t CCBUF
Definition: tc.h:753
TC_STATUS_Type::CCBUFV0
uint8_t CCBUFV0
Definition: tc.h:418
TcCount32::EVCTRL
__IO TC_EVCTRL_Type EVCTRL
Offset: 0x06 (R/W 16) Event Control.
Definition: tc.h:823
TC_CTRLA_Type::CAPTEN0
uint32_t CAPTEN0
Definition: tc.h:55
TC_EVCTRL_Type::MCEO1
uint16_t MCEO1
Definition: tc.h:253
TcCount8::SYNCBUSY
__I TC_SYNCBUSY_Type SYNCBUSY
Offset: 0x10 (R/ 32) Synchronization Status.
Definition: tc.h:782
TcCount16::DRVCTRL
__IO TC_DRVCTRL_Type DRVCTRL
Offset: 0x0D (R/W 8) Control C.
Definition: tc.h:805
TC_COUNT16_CCBUF_Type
Definition: tc.h:715
RoReg8
volatile const uint8_t RoReg8
Definition: same54n19a.h:53
TC_SYNCBUSY_Type::CTRLB
uint32_t CTRLB
Definition: tc.h:528
TcCount8::COUNT
__IO TC_COUNT8_COUNT_Type COUNT
Offset: 0x14 (R/W 8) COUNT8 Count.
Definition: tc.h:783
TC_COUNT16_COUNT_Type::COUNT
uint16_t COUNT
Definition: tc.h:573
TC_COUNT16_CC_Type
Definition: tc.h:643
TC_INTFLAG_Type::reg
uint8_t reg
Definition: tc.h:390
TC_COUNT8_CC_Type::CC
uint8_t CC
Definition: tc.h:681
TC_EVCTRL_Type::MCEO
uint16_t MCEO
Definition: tc.h:258
TC_CTRLBSET_Type::DIR
uint8_t DIR
Definition: tc.h:205
TC_CTRLBSET_Type::CMD
uint8_t CMD
Definition: tc.h:209
TC_COUNT8_CCBUF_Type
Definition: tc.h:751
TC_COUNT8_COUNT_Type::COUNT
uint8_t COUNT
Definition: tc.h:609
TC_INTENCLR_Type::MC
uint8_t MC
Definition: tc.h:315
TC_CTRLA_Type::CAPTMODE0
uint32_t CAPTMODE0
Definition: tc.h:61
TC_SYNCBUSY_Type::STATUS
uint32_t STATUS
Definition: tc.h:529
TC_SYNCBUSY_Type::PER
uint32_t PER
Definition: tc.h:531
TcCount16::DBGCTRL
__IO TC_DBGCTRL_Type DBGCTRL
Offset: 0x0F (R/W 8) Debug Control.
Definition: tc.h:807
TcCount16::CTRLBSET
__IO TC_CTRLBSET_Type CTRLBSET
Offset: 0x05 (R/W 8) Control B Set.
Definition: tc.h:798
TcCount32::INTENCLR
__IO TC_INTENCLR_Type INTENCLR
Offset: 0x08 (R/W 8) Interrupt Enable Clear.
Definition: tc.h:824
TC_COUNT8_PERBUF_Type::PERBUF
uint8_t PERBUF
Definition: tc.h:699
TC_CTRLA_Type::CAPTEN1
uint32_t CAPTEN1
Definition: tc.h:56
TC_INTFLAG_Type::MC1
__I uint8_t MC1
Definition: tc.h:382
TC_DRVCTRL_Type::INVEN0
uint8_t INVEN0
Definition: tc.h:480
TC_INTENCLR_Type::OVF
uint8_t OVF
Definition: tc.h:306
TC_COUNT32_CC_Type::reg
uint32_t reg
Definition: tc.h:665
TC_STATUS_Type::STOP
uint8_t STOP
Definition: tc.h:414
TC_DRVCTRL_Type::INVEN1
uint8_t INVEN1
Definition: tc.h:481
TC_STATUS_Type::reg
uint8_t reg
Definition: tc.h:427
TC_EVCTRL_Type::EVACT
uint16_t EVACT
Definition: tc.h:245
TcCount16::INTFLAG
__IO TC_INTFLAG_Type INTFLAG
Offset: 0x0A (R/W 8) Interrupt Flag Status and Clear.
Definition: tc.h:802
TcCount8::EVCTRL
__IO TC_EVCTRL_Type EVCTRL
Offset: 0x06 (R/W 16) Event Control.
Definition: tc.h:773
TcCount32::INTFLAG
__IO TC_INTFLAG_Type INTFLAG
Offset: 0x0A (R/W 8) Interrupt Flag Status and Clear.
Definition: tc.h:826
TC_COUNT16_COUNT_Type
Definition: tc.h:571
TC_CTRLA_Type::ONDEMAND
uint32_t ONDEMAND
Definition: tc.h:51