1 /**
2  * \file
3  *
4  * \brief Component description for TC
5  *
6  * Copyright (c) 2019 Microchip Technology Inc.
7  *
8  * \license_start
9  *
10  * \page License
11  *
12  * SPDX-License-Identifier: Apache-2.0
13  *
14  * Licensed under the Apache License, Version 2.0 (the "License");
15  * you may not use this file except in compliance with the License.
16  * You may obtain a copy of the License at
17  *
18  *   http://www.apache.org/licenses/LICENSE-2.0
19  *
20  * Unless required by applicable law or agreed to in writing, software
21  * distributed under the License is distributed on an "AS IS" BASIS,
22  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23  * See the License for the specific language governing permissions and
24  * limitations under the License.
25  *
26  * \license_stop
27  *
28  */
29 
30 /* file generated from device description version 2019-01-18T21:19:59Z */
31 #ifndef _SAME70_TC_COMPONENT_H_
32 #define _SAME70_TC_COMPONENT_H_
33 #define _SAME70_TC_COMPONENT_         /**< \deprecated  Backward compatibility for ASF */
34 
35 /** \addtogroup SAME_SAME70 Timer Counter
36  *  @{
37  */
38 /* ========================================================================== */
39 /**  SOFTWARE API DEFINITION FOR TC */
40 /* ========================================================================== */
41 #ifndef COMPONENT_TYPEDEF_STYLE
42   #define COMPONENT_TYPEDEF_STYLE 'R'  /**< Defines default style of typedefs for the component header files ('R' = RFO, 'N' = NTO)*/
43 #endif
44 
45 #define TC_6082                       /**< (TC) Module ID */
46 #define REV_TC ZL                     /**< (TC) Module revision */
47 
48 /* -------- TC_CCR : (TC Offset: 0x00) (/W 32) Channel Control Register (channel = 0) -------- */
49 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
50 #if COMPONENT_TYPEDEF_STYLE == 'N'
51 typedef union {
52   struct {
53     uint32_t CLKEN:1;                   /**< bit:      0  Counter Clock Enable Command             */
54     uint32_t CLKDIS:1;                  /**< bit:      1  Counter Clock Disable Command            */
55     uint32_t SWTRG:1;                   /**< bit:      2  Software Trigger Command                 */
56     uint32_t :29;                       /**< bit:  3..31  Reserved */
57   } bit;                                /**< Structure used for bit  access */
58   uint32_t reg;                         /**< Type used for register access */
59 } TC_CCR_Type;
60 #endif
61 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
62 
63 #define TC_CCR_OFFSET                       (0x00)                                        /**<  (TC_CCR) Channel Control Register (channel = 0)  Offset */
64 
65 #define TC_CCR_CLKEN_Pos                    0                                              /**< (TC_CCR) Counter Clock Enable Command Position */
66 #define TC_CCR_CLKEN_Msk                    (_U_(0x1) << TC_CCR_CLKEN_Pos)                 /**< (TC_CCR) Counter Clock Enable Command Mask */
67 #define TC_CCR_CLKEN                        TC_CCR_CLKEN_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CCR_CLKEN_Msk instead */
68 #define TC_CCR_CLKDIS_Pos                   1                                              /**< (TC_CCR) Counter Clock Disable Command Position */
69 #define TC_CCR_CLKDIS_Msk                   (_U_(0x1) << TC_CCR_CLKDIS_Pos)                /**< (TC_CCR) Counter Clock Disable Command Mask */
70 #define TC_CCR_CLKDIS                       TC_CCR_CLKDIS_Msk                              /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CCR_CLKDIS_Msk instead */
71 #define TC_CCR_SWTRG_Pos                    2                                              /**< (TC_CCR) Software Trigger Command Position */
72 #define TC_CCR_SWTRG_Msk                    (_U_(0x1) << TC_CCR_SWTRG_Pos)                 /**< (TC_CCR) Software Trigger Command Mask */
73 #define TC_CCR_SWTRG                        TC_CCR_SWTRG_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CCR_SWTRG_Msk instead */
74 #define TC_CCR_MASK                         _U_(0x07)                                      /**< \deprecated (TC_CCR) Register MASK  (Use TC_CCR_Msk instead)  */
75 #define TC_CCR_Msk                          _U_(0x07)                                      /**< (TC_CCR) Register Mask  */
76 
77 
78 /* -------- TC_CMR : (TC Offset: 0x04) (R/W 32) Channel Mode Register (channel = 0) -------- */
79 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
80 #if COMPONENT_TYPEDEF_STYLE == 'N'
81 typedef union {
82   struct {
83     uint32_t TCCLKS:3;                  /**< bit:   0..2  Clock Selection                          */
84     uint32_t CLKI:1;                    /**< bit:      3  Clock Invert                             */
85     uint32_t BURST:2;                   /**< bit:   4..5  Burst Signal Selection                   */
86     uint32_t :9;                        /**< bit:  6..14  Reserved */
87     uint32_t WAVE:1;                    /**< bit:     15  Waveform Mode                            */
88     uint32_t :16;                       /**< bit: 16..31  Reserved */
89   } bit;                                /**< Structure used for bit  access */
90   struct { // CAPTURE mode
91     uint32_t :6;                        /**< bit:   0..5  Reserved */
92     uint32_t LDBSTOP:1;                 /**< bit:      6  Counter Clock Stopped with RB Loading    */
93     uint32_t LDBDIS:1;                  /**< bit:      7  Counter Clock Disable with RB Loading    */
94     uint32_t ETRGEDG:2;                 /**< bit:   8..9  External Trigger Edge Selection          */
95     uint32_t ABETRG:1;                  /**< bit:     10  TIOAx or TIOBx External Trigger Selection */
96     uint32_t :3;                        /**< bit: 11..13  Reserved */
97     uint32_t CPCTRG:1;                  /**< bit:     14  RC Compare Trigger Enable                */
98     uint32_t :1;                        /**< bit:     15  Reserved */
99     uint32_t LDRA:2;                    /**< bit: 16..17  RA Loading Edge Selection                */
100     uint32_t LDRB:2;                    /**< bit: 18..19  RB Loading Edge Selection                */
101     uint32_t SBSMPLR:3;                 /**< bit: 20..22  Loading Edge Subsampling Ratio           */
102     uint32_t :9;                        /**< bit: 23..31  Reserved */
103   } CAPTURE;                                /**< Structure used for CAPTURE mode access */
104   struct { // WAVEFORM mode
105     uint32_t :6;                        /**< bit:   0..5  Reserved */
106     uint32_t CPCSTOP:1;                 /**< bit:      6  Counter Clock Stopped with RC Compare    */
107     uint32_t CPCDIS:1;                  /**< bit:      7  Counter Clock Disable with RC Loading    */
108     uint32_t EEVTEDG:2;                 /**< bit:   8..9  External Event Edge Selection            */
109     uint32_t EEVT:2;                    /**< bit: 10..11  External Event Selection                 */
110     uint32_t ENETRG:1;                  /**< bit:     12  External Event Trigger Enable            */
111     uint32_t WAVSEL:2;                  /**< bit: 13..14  Waveform Selection                       */
112     uint32_t :1;                        /**< bit:     15  Reserved */
113     uint32_t ACPA:2;                    /**< bit: 16..17  RA Compare Effect on TIOAx               */
114     uint32_t ACPC:2;                    /**< bit: 18..19  RC Compare Effect on TIOAx               */
115     uint32_t AEEVT:2;                   /**< bit: 20..21  External Event Effect on TIOAx           */
116     uint32_t ASWTRG:2;                  /**< bit: 22..23  Software Trigger Effect on TIOAx         */
117     uint32_t BCPB:2;                    /**< bit: 24..25  RB Compare Effect on TIOBx               */
118     uint32_t BCPC:2;                    /**< bit: 26..27  RC Compare Effect on TIOBx               */
119     uint32_t BEEVT:2;                   /**< bit: 28..29  External Event Effect on TIOBx           */
120     uint32_t BSWTRG:2;                  /**< bit: 30..31  Software Trigger Effect on TIOBx         */
121   } WAVEFORM;                                /**< Structure used for WAVEFORM mode access */
122   uint32_t reg;                         /**< Type used for register access */
123 } TC_CMR_Type;
124 #endif
125 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
126 
127 #define TC_CMR_OFFSET                       (0x04)                                        /**<  (TC_CMR) Channel Mode Register (channel = 0)  Offset */
128 
129 #define TC_CMR_TCCLKS_Pos                   0                                              /**< (TC_CMR) Clock Selection Position */
130 #define TC_CMR_TCCLKS_Msk                   (_U_(0x7) << TC_CMR_TCCLKS_Pos)                /**< (TC_CMR) Clock Selection Mask */
131 #define TC_CMR_TCCLKS(value)                (TC_CMR_TCCLKS_Msk & ((value) << TC_CMR_TCCLKS_Pos))
132 #define   TC_CMR_TCCLKS_TIMER_CLOCK1_Val    _U_(0x0)                                       /**< (TC_CMR) Clock selected: internal PCK6 clock signal (from PMC)  */
133 #define   TC_CMR_TCCLKS_TIMER_CLOCK2_Val    _U_(0x1)                                       /**< (TC_CMR) Clock selected: internal MCK/8 clock signal (from PMC)  */
134 #define   TC_CMR_TCCLKS_TIMER_CLOCK3_Val    _U_(0x2)                                       /**< (TC_CMR) Clock selected: internal MCK/32 clock signal (from PMC)  */
135 #define   TC_CMR_TCCLKS_TIMER_CLOCK4_Val    _U_(0x3)                                       /**< (TC_CMR) Clock selected: internal MCK/128 clock signal (from PMC)  */
136 #define   TC_CMR_TCCLKS_TIMER_CLOCK5_Val    _U_(0x4)                                       /**< (TC_CMR) Clock selected: internal SLCK clock signal (from PMC)  */
137 #define   TC_CMR_TCCLKS_XC0_Val             _U_(0x5)                                       /**< (TC_CMR) Clock selected: XC0  */
138 #define   TC_CMR_TCCLKS_XC1_Val             _U_(0x6)                                       /**< (TC_CMR) Clock selected: XC1  */
139 #define   TC_CMR_TCCLKS_XC2_Val             _U_(0x7)                                       /**< (TC_CMR) Clock selected: XC2  */
140 #define TC_CMR_TCCLKS_TIMER_CLOCK1          (TC_CMR_TCCLKS_TIMER_CLOCK1_Val << TC_CMR_TCCLKS_Pos)  /**< (TC_CMR) Clock selected: internal PCK6 clock signal (from PMC) Position  */
141 #define TC_CMR_TCCLKS_TIMER_CLOCK2          (TC_CMR_TCCLKS_TIMER_CLOCK2_Val << TC_CMR_TCCLKS_Pos)  /**< (TC_CMR) Clock selected: internal MCK/8 clock signal (from PMC) Position  */
142 #define TC_CMR_TCCLKS_TIMER_CLOCK3          (TC_CMR_TCCLKS_TIMER_CLOCK3_Val << TC_CMR_TCCLKS_Pos)  /**< (TC_CMR) Clock selected: internal MCK/32 clock signal (from PMC) Position  */
143 #define TC_CMR_TCCLKS_TIMER_CLOCK4          (TC_CMR_TCCLKS_TIMER_CLOCK4_Val << TC_CMR_TCCLKS_Pos)  /**< (TC_CMR) Clock selected: internal MCK/128 clock signal (from PMC) Position  */
144 #define TC_CMR_TCCLKS_TIMER_CLOCK5          (TC_CMR_TCCLKS_TIMER_CLOCK5_Val << TC_CMR_TCCLKS_Pos)  /**< (TC_CMR) Clock selected: internal SLCK clock signal (from PMC) Position  */
145 #define TC_CMR_TCCLKS_XC0                   (TC_CMR_TCCLKS_XC0_Val << TC_CMR_TCCLKS_Pos)   /**< (TC_CMR) Clock selected: XC0 Position  */
146 #define TC_CMR_TCCLKS_XC1                   (TC_CMR_TCCLKS_XC1_Val << TC_CMR_TCCLKS_Pos)   /**< (TC_CMR) Clock selected: XC1 Position  */
147 #define TC_CMR_TCCLKS_XC2                   (TC_CMR_TCCLKS_XC2_Val << TC_CMR_TCCLKS_Pos)   /**< (TC_CMR) Clock selected: XC2 Position  */
148 #define TC_CMR_CLKI_Pos                     3                                              /**< (TC_CMR) Clock Invert Position */
149 #define TC_CMR_CLKI_Msk                     (_U_(0x1) << TC_CMR_CLKI_Pos)                  /**< (TC_CMR) Clock Invert Mask */
150 #define TC_CMR_CLKI                         TC_CMR_CLKI_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CMR_CLKI_Msk instead */
151 #define TC_CMR_BURST_Pos                    4                                              /**< (TC_CMR) Burst Signal Selection Position */
152 #define TC_CMR_BURST_Msk                    (_U_(0x3) << TC_CMR_BURST_Pos)                 /**< (TC_CMR) Burst Signal Selection Mask */
153 #define TC_CMR_BURST(value)                 (TC_CMR_BURST_Msk & ((value) << TC_CMR_BURST_Pos))
154 #define   TC_CMR_BURST_NONE_Val             _U_(0x0)                                       /**< (TC_CMR) The clock is not gated by an external signal.  */
155 #define   TC_CMR_BURST_XC0_Val              _U_(0x1)                                       /**< (TC_CMR) XC0 is ANDed with the selected clock.  */
156 #define   TC_CMR_BURST_XC1_Val              _U_(0x2)                                       /**< (TC_CMR) XC1 is ANDed with the selected clock.  */
157 #define   TC_CMR_BURST_XC2_Val              _U_(0x3)                                       /**< (TC_CMR) XC2 is ANDed with the selected clock.  */
158 #define TC_CMR_BURST_NONE                   (TC_CMR_BURST_NONE_Val << TC_CMR_BURST_Pos)    /**< (TC_CMR) The clock is not gated by an external signal. Position  */
159 #define TC_CMR_BURST_XC0                    (TC_CMR_BURST_XC0_Val << TC_CMR_BURST_Pos)     /**< (TC_CMR) XC0 is ANDed with the selected clock. Position  */
160 #define TC_CMR_BURST_XC1                    (TC_CMR_BURST_XC1_Val << TC_CMR_BURST_Pos)     /**< (TC_CMR) XC1 is ANDed with the selected clock. Position  */
161 #define TC_CMR_BURST_XC2                    (TC_CMR_BURST_XC2_Val << TC_CMR_BURST_Pos)     /**< (TC_CMR) XC2 is ANDed with the selected clock. Position  */
162 #define TC_CMR_WAVE_Pos                     15                                             /**< (TC_CMR) Waveform Mode Position */
163 #define TC_CMR_WAVE_Msk                     (_U_(0x1) << TC_CMR_WAVE_Pos)                  /**< (TC_CMR) Waveform Mode Mask */
164 #define TC_CMR_WAVE                         TC_CMR_WAVE_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CMR_WAVE_Msk instead */
165 #define TC_CMR_MASK                         _U_(0x803F)                                    /**< \deprecated (TC_CMR) Register MASK  (Use TC_CMR_Msk instead)  */
166 #define TC_CMR_Msk                          _U_(0x803F)                                    /**< (TC_CMR) Register Mask  */
167 
168 /* CAPTURE mode */
169 #define TC_CMR_CAPTURE_LDBSTOP_Pos          6                                              /**< (TC_CMR) Counter Clock Stopped with RB Loading Position */
170 #define TC_CMR_CAPTURE_LDBSTOP_Msk          (_U_(0x1) << TC_CMR_CAPTURE_LDBSTOP_Pos)       /**< (TC_CMR) Counter Clock Stopped with RB Loading Mask */
171 #define TC_CMR_CAPTURE_LDBSTOP              TC_CMR_CAPTURE_LDBSTOP_Msk                     /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CMR_CAPTURE_LDBSTOP_Msk instead */
172 #define TC_CMR_CAPTURE_LDBDIS_Pos           7                                              /**< (TC_CMR) Counter Clock Disable with RB Loading Position */
173 #define TC_CMR_CAPTURE_LDBDIS_Msk           (_U_(0x1) << TC_CMR_CAPTURE_LDBDIS_Pos)        /**< (TC_CMR) Counter Clock Disable with RB Loading Mask */
174 #define TC_CMR_CAPTURE_LDBDIS               TC_CMR_CAPTURE_LDBDIS_Msk                      /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CMR_CAPTURE_LDBDIS_Msk instead */
175 #define TC_CMR_CAPTURE_ETRGEDG_Pos          8                                              /**< (TC_CMR) External Trigger Edge Selection Position */
176 #define TC_CMR_CAPTURE_ETRGEDG_Msk          (_U_(0x3) << TC_CMR_CAPTURE_ETRGEDG_Pos)       /**< (TC_CMR) External Trigger Edge Selection Mask */
177 #define TC_CMR_CAPTURE_ETRGEDG(value)       (TC_CMR_CAPTURE_ETRGEDG_Msk & ((value) << TC_CMR_CAPTURE_ETRGEDG_Pos))
178 #define   TC_CMR_CAPTURE_ETRGEDG_NONE_Val   _U_(0x0)                                       /**< (TC_CMR) CAPTURE The clock is not gated by an external signal.  */
179 #define   TC_CMR_CAPTURE_ETRGEDG_RISING_Val _U_(0x1)                                       /**< (TC_CMR) CAPTURE Rising edge  */
180 #define   TC_CMR_CAPTURE_ETRGEDG_FALLING_Val _U_(0x2)                                       /**< (TC_CMR) CAPTURE Falling edge  */
181 #define   TC_CMR_CAPTURE_ETRGEDG_EDGE_Val   _U_(0x3)                                       /**< (TC_CMR) CAPTURE Each edge  */
182 #define TC_CMR_CAPTURE_ETRGEDG_NONE         (TC_CMR_CAPTURE_ETRGEDG_NONE_Val << TC_CMR_CAPTURE_ETRGEDG_Pos)  /**< (TC_CMR) The clock is not gated by an external signal. Position  */
183 #define TC_CMR_CAPTURE_ETRGEDG_RISING       (TC_CMR_CAPTURE_ETRGEDG_RISING_Val << TC_CMR_CAPTURE_ETRGEDG_Pos)  /**< (TC_CMR) Rising edge Position  */
184 #define TC_CMR_CAPTURE_ETRGEDG_FALLING      (TC_CMR_CAPTURE_ETRGEDG_FALLING_Val << TC_CMR_CAPTURE_ETRGEDG_Pos)  /**< (TC_CMR) Falling edge Position  */
185 #define TC_CMR_CAPTURE_ETRGEDG_EDGE         (TC_CMR_CAPTURE_ETRGEDG_EDGE_Val << TC_CMR_CAPTURE_ETRGEDG_Pos)  /**< (TC_CMR) Each edge Position  */
186 #define TC_CMR_CAPTURE_ABETRG_Pos           10                                             /**< (TC_CMR) TIOAx or TIOBx External Trigger Selection Position */
187 #define TC_CMR_CAPTURE_ABETRG_Msk           (_U_(0x1) << TC_CMR_CAPTURE_ABETRG_Pos)        /**< (TC_CMR) TIOAx or TIOBx External Trigger Selection Mask */
188 #define TC_CMR_CAPTURE_ABETRG               TC_CMR_CAPTURE_ABETRG_Msk                      /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CMR_CAPTURE_ABETRG_Msk instead */
189 #define TC_CMR_CAPTURE_CPCTRG_Pos           14                                             /**< (TC_CMR) RC Compare Trigger Enable Position */
190 #define TC_CMR_CAPTURE_CPCTRG_Msk           (_U_(0x1) << TC_CMR_CAPTURE_CPCTRG_Pos)        /**< (TC_CMR) RC Compare Trigger Enable Mask */
191 #define TC_CMR_CAPTURE_CPCTRG               TC_CMR_CAPTURE_CPCTRG_Msk                      /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CMR_CAPTURE_CPCTRG_Msk instead */
192 #define TC_CMR_CAPTURE_LDRA_Pos             16                                             /**< (TC_CMR) RA Loading Edge Selection Position */
193 #define TC_CMR_CAPTURE_LDRA_Msk             (_U_(0x3) << TC_CMR_CAPTURE_LDRA_Pos)          /**< (TC_CMR) RA Loading Edge Selection Mask */
194 #define TC_CMR_CAPTURE_LDRA(value)          (TC_CMR_CAPTURE_LDRA_Msk & ((value) << TC_CMR_CAPTURE_LDRA_Pos))
195 #define   TC_CMR_CAPTURE_LDRA_NONE_Val      _U_(0x0)                                       /**< (TC_CMR) CAPTURE None  */
196 #define   TC_CMR_CAPTURE_LDRA_RISING_Val    _U_(0x1)                                       /**< (TC_CMR) CAPTURE Rising edge of TIOAx  */
197 #define   TC_CMR_CAPTURE_LDRA_FALLING_Val   _U_(0x2)                                       /**< (TC_CMR) CAPTURE Falling edge of TIOAx  */
198 #define   TC_CMR_CAPTURE_LDRA_EDGE_Val      _U_(0x3)                                       /**< (TC_CMR) CAPTURE Each edge of TIOAx  */
199 #define TC_CMR_CAPTURE_LDRA_NONE            (TC_CMR_CAPTURE_LDRA_NONE_Val << TC_CMR_CAPTURE_LDRA_Pos)  /**< (TC_CMR) None Position  */
200 #define TC_CMR_CAPTURE_LDRA_RISING          (TC_CMR_CAPTURE_LDRA_RISING_Val << TC_CMR_CAPTURE_LDRA_Pos)  /**< (TC_CMR) Rising edge of TIOAx Position  */
201 #define TC_CMR_CAPTURE_LDRA_FALLING         (TC_CMR_CAPTURE_LDRA_FALLING_Val << TC_CMR_CAPTURE_LDRA_Pos)  /**< (TC_CMR) Falling edge of TIOAx Position  */
202 #define TC_CMR_CAPTURE_LDRA_EDGE            (TC_CMR_CAPTURE_LDRA_EDGE_Val << TC_CMR_CAPTURE_LDRA_Pos)  /**< (TC_CMR) Each edge of TIOAx Position  */
203 #define TC_CMR_CAPTURE_LDRB_Pos             18                                             /**< (TC_CMR) RB Loading Edge Selection Position */
204 #define TC_CMR_CAPTURE_LDRB_Msk             (_U_(0x3) << TC_CMR_CAPTURE_LDRB_Pos)          /**< (TC_CMR) RB Loading Edge Selection Mask */
205 #define TC_CMR_CAPTURE_LDRB(value)          (TC_CMR_CAPTURE_LDRB_Msk & ((value) << TC_CMR_CAPTURE_LDRB_Pos))
206 #define   TC_CMR_CAPTURE_LDRB_NONE_Val      _U_(0x0)                                       /**< (TC_CMR) CAPTURE None  */
207 #define   TC_CMR_CAPTURE_LDRB_RISING_Val    _U_(0x1)                                       /**< (TC_CMR) CAPTURE Rising edge of TIOAx  */
208 #define   TC_CMR_CAPTURE_LDRB_FALLING_Val   _U_(0x2)                                       /**< (TC_CMR) CAPTURE Falling edge of TIOAx  */
209 #define   TC_CMR_CAPTURE_LDRB_EDGE_Val      _U_(0x3)                                       /**< (TC_CMR) CAPTURE Each edge of TIOAx  */
210 #define TC_CMR_CAPTURE_LDRB_NONE            (TC_CMR_CAPTURE_LDRB_NONE_Val << TC_CMR_CAPTURE_LDRB_Pos)  /**< (TC_CMR) None Position  */
211 #define TC_CMR_CAPTURE_LDRB_RISING          (TC_CMR_CAPTURE_LDRB_RISING_Val << TC_CMR_CAPTURE_LDRB_Pos)  /**< (TC_CMR) Rising edge of TIOAx Position  */
212 #define TC_CMR_CAPTURE_LDRB_FALLING         (TC_CMR_CAPTURE_LDRB_FALLING_Val << TC_CMR_CAPTURE_LDRB_Pos)  /**< (TC_CMR) Falling edge of TIOAx Position  */
213 #define TC_CMR_CAPTURE_LDRB_EDGE            (TC_CMR_CAPTURE_LDRB_EDGE_Val << TC_CMR_CAPTURE_LDRB_Pos)  /**< (TC_CMR) Each edge of TIOAx Position  */
214 #define TC_CMR_CAPTURE_SBSMPLR_Pos          20                                             /**< (TC_CMR) Loading Edge Subsampling Ratio Position */
215 #define TC_CMR_CAPTURE_SBSMPLR_Msk          (_U_(0x7) << TC_CMR_CAPTURE_SBSMPLR_Pos)       /**< (TC_CMR) Loading Edge Subsampling Ratio Mask */
216 #define TC_CMR_CAPTURE_SBSMPLR(value)       (TC_CMR_CAPTURE_SBSMPLR_Msk & ((value) << TC_CMR_CAPTURE_SBSMPLR_Pos))
217 #define   TC_CMR_CAPTURE_SBSMPLR_ONE_Val    _U_(0x0)                                       /**< (TC_CMR) CAPTURE Load a Capture Register each selected edge  */
218 #define   TC_CMR_CAPTURE_SBSMPLR_HALF_Val   _U_(0x1)                                       /**< (TC_CMR) CAPTURE Load a Capture Register every 2 selected edges  */
219 #define   TC_CMR_CAPTURE_SBSMPLR_FOURTH_Val _U_(0x2)                                       /**< (TC_CMR) CAPTURE Load a Capture Register every 4 selected edges  */
220 #define   TC_CMR_CAPTURE_SBSMPLR_EIGHTH_Val _U_(0x3)                                       /**< (TC_CMR) CAPTURE Load a Capture Register every 8 selected edges  */
221 #define   TC_CMR_CAPTURE_SBSMPLR_SIXTEENTH_Val _U_(0x4)                                       /**< (TC_CMR) CAPTURE Load a Capture Register every 16 selected edges  */
222 #define TC_CMR_CAPTURE_SBSMPLR_ONE          (TC_CMR_CAPTURE_SBSMPLR_ONE_Val << TC_CMR_CAPTURE_SBSMPLR_Pos)  /**< (TC_CMR) Load a Capture Register each selected edge Position  */
223 #define TC_CMR_CAPTURE_SBSMPLR_HALF         (TC_CMR_CAPTURE_SBSMPLR_HALF_Val << TC_CMR_CAPTURE_SBSMPLR_Pos)  /**< (TC_CMR) Load a Capture Register every 2 selected edges Position  */
224 #define TC_CMR_CAPTURE_SBSMPLR_FOURTH       (TC_CMR_CAPTURE_SBSMPLR_FOURTH_Val << TC_CMR_CAPTURE_SBSMPLR_Pos)  /**< (TC_CMR) Load a Capture Register every 4 selected edges Position  */
225 #define TC_CMR_CAPTURE_SBSMPLR_EIGHTH       (TC_CMR_CAPTURE_SBSMPLR_EIGHTH_Val << TC_CMR_CAPTURE_SBSMPLR_Pos)  /**< (TC_CMR) Load a Capture Register every 8 selected edges Position  */
226 #define TC_CMR_CAPTURE_SBSMPLR_SIXTEENTH    (TC_CMR_CAPTURE_SBSMPLR_SIXTEENTH_Val << TC_CMR_CAPTURE_SBSMPLR_Pos)  /**< (TC_CMR) Load a Capture Register every 16 selected edges Position  */
227 #define TC_CMR_CAPTURE_MASK                 _U_(0x7F47C0)                                  /**< \deprecated (TC_CMR_CAPTURE) Register MASK  (Use TC_CMR_CAPTURE_Msk instead)  */
228 #define TC_CMR_CAPTURE_Msk                  _U_(0x7F47C0)                                  /**< (TC_CMR_CAPTURE) Register Mask  */
229 
230 /* WAVEFORM mode */
231 #define TC_CMR_WAVEFORM_CPCSTOP_Pos         6                                              /**< (TC_CMR) Counter Clock Stopped with RC Compare Position */
232 #define TC_CMR_WAVEFORM_CPCSTOP_Msk         (_U_(0x1) << TC_CMR_WAVEFORM_CPCSTOP_Pos)      /**< (TC_CMR) Counter Clock Stopped with RC Compare Mask */
233 #define TC_CMR_WAVEFORM_CPCSTOP             TC_CMR_WAVEFORM_CPCSTOP_Msk                    /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CMR_WAVEFORM_CPCSTOP_Msk instead */
234 #define TC_CMR_WAVEFORM_CPCDIS_Pos          7                                              /**< (TC_CMR) Counter Clock Disable with RC Loading Position */
235 #define TC_CMR_WAVEFORM_CPCDIS_Msk          (_U_(0x1) << TC_CMR_WAVEFORM_CPCDIS_Pos)       /**< (TC_CMR) Counter Clock Disable with RC Loading Mask */
236 #define TC_CMR_WAVEFORM_CPCDIS              TC_CMR_WAVEFORM_CPCDIS_Msk                     /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CMR_WAVEFORM_CPCDIS_Msk instead */
237 #define TC_CMR_WAVEFORM_EEVTEDG_Pos         8                                              /**< (TC_CMR) External Event Edge Selection Position */
238 #define TC_CMR_WAVEFORM_EEVTEDG_Msk         (_U_(0x3) << TC_CMR_WAVEFORM_EEVTEDG_Pos)      /**< (TC_CMR) External Event Edge Selection Mask */
239 #define TC_CMR_WAVEFORM_EEVTEDG(value)      (TC_CMR_WAVEFORM_EEVTEDG_Msk & ((value) << TC_CMR_WAVEFORM_EEVTEDG_Pos))
240 #define   TC_CMR_WAVEFORM_EEVTEDG_NONE_Val  _U_(0x0)                                       /**< (TC_CMR) WAVEFORM None  */
241 #define   TC_CMR_WAVEFORM_EEVTEDG_RISING_Val _U_(0x1)                                       /**< (TC_CMR) WAVEFORM Rising edge  */
242 #define   TC_CMR_WAVEFORM_EEVTEDG_FALLING_Val _U_(0x2)                                       /**< (TC_CMR) WAVEFORM Falling edge  */
243 #define   TC_CMR_WAVEFORM_EEVTEDG_EDGE_Val  _U_(0x3)                                       /**< (TC_CMR) WAVEFORM Each edges  */
244 #define TC_CMR_WAVEFORM_EEVTEDG_NONE        (TC_CMR_WAVEFORM_EEVTEDG_NONE_Val << TC_CMR_WAVEFORM_EEVTEDG_Pos)  /**< (TC_CMR) None Position  */
245 #define TC_CMR_WAVEFORM_EEVTEDG_RISING      (TC_CMR_WAVEFORM_EEVTEDG_RISING_Val << TC_CMR_WAVEFORM_EEVTEDG_Pos)  /**< (TC_CMR) Rising edge Position  */
246 #define TC_CMR_WAVEFORM_EEVTEDG_FALLING     (TC_CMR_WAVEFORM_EEVTEDG_FALLING_Val << TC_CMR_WAVEFORM_EEVTEDG_Pos)  /**< (TC_CMR) Falling edge Position  */
247 #define TC_CMR_WAVEFORM_EEVTEDG_EDGE        (TC_CMR_WAVEFORM_EEVTEDG_EDGE_Val << TC_CMR_WAVEFORM_EEVTEDG_Pos)  /**< (TC_CMR) Each edges Position  */
248 #define TC_CMR_WAVEFORM_EEVT_Pos            10                                             /**< (TC_CMR) External Event Selection Position */
249 #define TC_CMR_WAVEFORM_EEVT_Msk            (_U_(0x3) << TC_CMR_WAVEFORM_EEVT_Pos)         /**< (TC_CMR) External Event Selection Mask */
250 #define TC_CMR_WAVEFORM_EEVT(value)         (TC_CMR_WAVEFORM_EEVT_Msk & ((value) << TC_CMR_WAVEFORM_EEVT_Pos))
251 #define   TC_CMR_WAVEFORM_EEVT_TIOB_Val     _U_(0x0)                                       /**< (TC_CMR) WAVEFORM TIOB  */
252 #define   TC_CMR_WAVEFORM_EEVT_XC0_Val      _U_(0x1)                                       /**< (TC_CMR) WAVEFORM XC0  */
253 #define   TC_CMR_WAVEFORM_EEVT_XC1_Val      _U_(0x2)                                       /**< (TC_CMR) WAVEFORM XC1  */
254 #define   TC_CMR_WAVEFORM_EEVT_XC2_Val      _U_(0x3)                                       /**< (TC_CMR) WAVEFORM XC2  */
255 #define TC_CMR_WAVEFORM_EEVT_TIOB           (TC_CMR_WAVEFORM_EEVT_TIOB_Val << TC_CMR_WAVEFORM_EEVT_Pos)  /**< (TC_CMR) TIOB Position  */
256 #define TC_CMR_WAVEFORM_EEVT_XC0            (TC_CMR_WAVEFORM_EEVT_XC0_Val << TC_CMR_WAVEFORM_EEVT_Pos)  /**< (TC_CMR) XC0 Position  */
257 #define TC_CMR_WAVEFORM_EEVT_XC1            (TC_CMR_WAVEFORM_EEVT_XC1_Val << TC_CMR_WAVEFORM_EEVT_Pos)  /**< (TC_CMR) XC1 Position  */
258 #define TC_CMR_WAVEFORM_EEVT_XC2            (TC_CMR_WAVEFORM_EEVT_XC2_Val << TC_CMR_WAVEFORM_EEVT_Pos)  /**< (TC_CMR) XC2 Position  */
259 #define TC_CMR_WAVEFORM_ENETRG_Pos          12                                             /**< (TC_CMR) External Event Trigger Enable Position */
260 #define TC_CMR_WAVEFORM_ENETRG_Msk          (_U_(0x1) << TC_CMR_WAVEFORM_ENETRG_Pos)       /**< (TC_CMR) External Event Trigger Enable Mask */
261 #define TC_CMR_WAVEFORM_ENETRG              TC_CMR_WAVEFORM_ENETRG_Msk                     /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CMR_WAVEFORM_ENETRG_Msk instead */
262 #define TC_CMR_WAVEFORM_WAVSEL_Pos          13                                             /**< (TC_CMR) Waveform Selection Position */
263 #define TC_CMR_WAVEFORM_WAVSEL_Msk          (_U_(0x3) << TC_CMR_WAVEFORM_WAVSEL_Pos)       /**< (TC_CMR) Waveform Selection Mask */
264 #define TC_CMR_WAVEFORM_WAVSEL(value)       (TC_CMR_WAVEFORM_WAVSEL_Msk & ((value) << TC_CMR_WAVEFORM_WAVSEL_Pos))
265 #define   TC_CMR_WAVEFORM_WAVSEL_UP_Val     _U_(0x0)                                       /**< (TC_CMR) WAVEFORM UP mode without automatic trigger on RC Compare  */
266 #define   TC_CMR_WAVEFORM_WAVSEL_UPDOWN_Val _U_(0x1)                                       /**< (TC_CMR) WAVEFORM UPDOWN mode without automatic trigger on RC Compare  */
267 #define   TC_CMR_WAVEFORM_WAVSEL_UP_RC_Val  _U_(0x2)                                       /**< (TC_CMR) WAVEFORM UP mode with automatic trigger on RC Compare  */
268 #define   TC_CMR_WAVEFORM_WAVSEL_UPDOWN_RC_Val _U_(0x3)                                       /**< (TC_CMR) WAVEFORM UPDOWN mode with automatic trigger on RC Compare  */
269 #define TC_CMR_WAVEFORM_WAVSEL_UP           (TC_CMR_WAVEFORM_WAVSEL_UP_Val << TC_CMR_WAVEFORM_WAVSEL_Pos)  /**< (TC_CMR) UP mode without automatic trigger on RC Compare Position  */
270 #define TC_CMR_WAVEFORM_WAVSEL_UPDOWN       (TC_CMR_WAVEFORM_WAVSEL_UPDOWN_Val << TC_CMR_WAVEFORM_WAVSEL_Pos)  /**< (TC_CMR) UPDOWN mode without automatic trigger on RC Compare Position  */
271 #define TC_CMR_WAVEFORM_WAVSEL_UP_RC        (TC_CMR_WAVEFORM_WAVSEL_UP_RC_Val << TC_CMR_WAVEFORM_WAVSEL_Pos)  /**< (TC_CMR) UP mode with automatic trigger on RC Compare Position  */
272 #define TC_CMR_WAVEFORM_WAVSEL_UPDOWN_RC    (TC_CMR_WAVEFORM_WAVSEL_UPDOWN_RC_Val << TC_CMR_WAVEFORM_WAVSEL_Pos)  /**< (TC_CMR) UPDOWN mode with automatic trigger on RC Compare Position  */
273 #define TC_CMR_WAVEFORM_ACPA_Pos            16                                             /**< (TC_CMR) RA Compare Effect on TIOAx Position */
274 #define TC_CMR_WAVEFORM_ACPA_Msk            (_U_(0x3) << TC_CMR_WAVEFORM_ACPA_Pos)         /**< (TC_CMR) RA Compare Effect on TIOAx Mask */
275 #define TC_CMR_WAVEFORM_ACPA(value)         (TC_CMR_WAVEFORM_ACPA_Msk & ((value) << TC_CMR_WAVEFORM_ACPA_Pos))
276 #define   TC_CMR_WAVEFORM_ACPA_NONE_Val     _U_(0x0)                                       /**< (TC_CMR) WAVEFORM NONE  */
277 #define   TC_CMR_WAVEFORM_ACPA_SET_Val      _U_(0x1)                                       /**< (TC_CMR) WAVEFORM SET  */
278 #define   TC_CMR_WAVEFORM_ACPA_CLEAR_Val    _U_(0x2)                                       /**< (TC_CMR) WAVEFORM CLEAR  */
279 #define   TC_CMR_WAVEFORM_ACPA_TOGGLE_Val   _U_(0x3)                                       /**< (TC_CMR) WAVEFORM TOGGLE  */
280 #define TC_CMR_WAVEFORM_ACPA_NONE           (TC_CMR_WAVEFORM_ACPA_NONE_Val << TC_CMR_WAVEFORM_ACPA_Pos)  /**< (TC_CMR) NONE Position  */
281 #define TC_CMR_WAVEFORM_ACPA_SET            (TC_CMR_WAVEFORM_ACPA_SET_Val << TC_CMR_WAVEFORM_ACPA_Pos)  /**< (TC_CMR) SET Position  */
282 #define TC_CMR_WAVEFORM_ACPA_CLEAR          (TC_CMR_WAVEFORM_ACPA_CLEAR_Val << TC_CMR_WAVEFORM_ACPA_Pos)  /**< (TC_CMR) CLEAR Position  */
283 #define TC_CMR_WAVEFORM_ACPA_TOGGLE         (TC_CMR_WAVEFORM_ACPA_TOGGLE_Val << TC_CMR_WAVEFORM_ACPA_Pos)  /**< (TC_CMR) TOGGLE Position  */
284 #define TC_CMR_WAVEFORM_ACPC_Pos            18                                             /**< (TC_CMR) RC Compare Effect on TIOAx Position */
285 #define TC_CMR_WAVEFORM_ACPC_Msk            (_U_(0x3) << TC_CMR_WAVEFORM_ACPC_Pos)         /**< (TC_CMR) RC Compare Effect on TIOAx Mask */
286 #define TC_CMR_WAVEFORM_ACPC(value)         (TC_CMR_WAVEFORM_ACPC_Msk & ((value) << TC_CMR_WAVEFORM_ACPC_Pos))
287 #define   TC_CMR_WAVEFORM_ACPC_NONE_Val     _U_(0x0)                                       /**< (TC_CMR) WAVEFORM NONE  */
288 #define   TC_CMR_WAVEFORM_ACPC_SET_Val      _U_(0x1)                                       /**< (TC_CMR) WAVEFORM SET  */
289 #define   TC_CMR_WAVEFORM_ACPC_CLEAR_Val    _U_(0x2)                                       /**< (TC_CMR) WAVEFORM CLEAR  */
290 #define   TC_CMR_WAVEFORM_ACPC_TOGGLE_Val   _U_(0x3)                                       /**< (TC_CMR) WAVEFORM TOGGLE  */
291 #define TC_CMR_WAVEFORM_ACPC_NONE           (TC_CMR_WAVEFORM_ACPC_NONE_Val << TC_CMR_WAVEFORM_ACPC_Pos)  /**< (TC_CMR) NONE Position  */
292 #define TC_CMR_WAVEFORM_ACPC_SET            (TC_CMR_WAVEFORM_ACPC_SET_Val << TC_CMR_WAVEFORM_ACPC_Pos)  /**< (TC_CMR) SET Position  */
293 #define TC_CMR_WAVEFORM_ACPC_CLEAR          (TC_CMR_WAVEFORM_ACPC_CLEAR_Val << TC_CMR_WAVEFORM_ACPC_Pos)  /**< (TC_CMR) CLEAR Position  */
294 #define TC_CMR_WAVEFORM_ACPC_TOGGLE         (TC_CMR_WAVEFORM_ACPC_TOGGLE_Val << TC_CMR_WAVEFORM_ACPC_Pos)  /**< (TC_CMR) TOGGLE Position  */
295 #define TC_CMR_WAVEFORM_AEEVT_Pos           20                                             /**< (TC_CMR) External Event Effect on TIOAx Position */
296 #define TC_CMR_WAVEFORM_AEEVT_Msk           (_U_(0x3) << TC_CMR_WAVEFORM_AEEVT_Pos)        /**< (TC_CMR) External Event Effect on TIOAx Mask */
297 #define TC_CMR_WAVEFORM_AEEVT(value)        (TC_CMR_WAVEFORM_AEEVT_Msk & ((value) << TC_CMR_WAVEFORM_AEEVT_Pos))
298 #define   TC_CMR_WAVEFORM_AEEVT_NONE_Val    _U_(0x0)                                       /**< (TC_CMR) WAVEFORM NONE  */
299 #define   TC_CMR_WAVEFORM_AEEVT_SET_Val     _U_(0x1)                                       /**< (TC_CMR) WAVEFORM SET  */
300 #define   TC_CMR_WAVEFORM_AEEVT_CLEAR_Val   _U_(0x2)                                       /**< (TC_CMR) WAVEFORM CLEAR  */
301 #define   TC_CMR_WAVEFORM_AEEVT_TOGGLE_Val  _U_(0x3)                                       /**< (TC_CMR) WAVEFORM TOGGLE  */
302 #define TC_CMR_WAVEFORM_AEEVT_NONE          (TC_CMR_WAVEFORM_AEEVT_NONE_Val << TC_CMR_WAVEFORM_AEEVT_Pos)  /**< (TC_CMR) NONE Position  */
303 #define TC_CMR_WAVEFORM_AEEVT_SET           (TC_CMR_WAVEFORM_AEEVT_SET_Val << TC_CMR_WAVEFORM_AEEVT_Pos)  /**< (TC_CMR) SET Position  */
304 #define TC_CMR_WAVEFORM_AEEVT_CLEAR         (TC_CMR_WAVEFORM_AEEVT_CLEAR_Val << TC_CMR_WAVEFORM_AEEVT_Pos)  /**< (TC_CMR) CLEAR Position  */
305 #define TC_CMR_WAVEFORM_AEEVT_TOGGLE        (TC_CMR_WAVEFORM_AEEVT_TOGGLE_Val << TC_CMR_WAVEFORM_AEEVT_Pos)  /**< (TC_CMR) TOGGLE Position  */
306 #define TC_CMR_WAVEFORM_ASWTRG_Pos          22                                             /**< (TC_CMR) Software Trigger Effect on TIOAx Position */
307 #define TC_CMR_WAVEFORM_ASWTRG_Msk          (_U_(0x3) << TC_CMR_WAVEFORM_ASWTRG_Pos)       /**< (TC_CMR) Software Trigger Effect on TIOAx Mask */
308 #define TC_CMR_WAVEFORM_ASWTRG(value)       (TC_CMR_WAVEFORM_ASWTRG_Msk & ((value) << TC_CMR_WAVEFORM_ASWTRG_Pos))
309 #define   TC_CMR_WAVEFORM_ASWTRG_NONE_Val   _U_(0x0)                                       /**< (TC_CMR) WAVEFORM NONE  */
310 #define   TC_CMR_WAVEFORM_ASWTRG_SET_Val    _U_(0x1)                                       /**< (TC_CMR) WAVEFORM SET  */
311 #define   TC_CMR_WAVEFORM_ASWTRG_CLEAR_Val  _U_(0x2)                                       /**< (TC_CMR) WAVEFORM CLEAR  */
312 #define   TC_CMR_WAVEFORM_ASWTRG_TOGGLE_Val _U_(0x3)                                       /**< (TC_CMR) WAVEFORM TOGGLE  */
313 #define TC_CMR_WAVEFORM_ASWTRG_NONE         (TC_CMR_WAVEFORM_ASWTRG_NONE_Val << TC_CMR_WAVEFORM_ASWTRG_Pos)  /**< (TC_CMR) NONE Position  */
314 #define TC_CMR_WAVEFORM_ASWTRG_SET          (TC_CMR_WAVEFORM_ASWTRG_SET_Val << TC_CMR_WAVEFORM_ASWTRG_Pos)  /**< (TC_CMR) SET Position  */
315 #define TC_CMR_WAVEFORM_ASWTRG_CLEAR        (TC_CMR_WAVEFORM_ASWTRG_CLEAR_Val << TC_CMR_WAVEFORM_ASWTRG_Pos)  /**< (TC_CMR) CLEAR Position  */
316 #define TC_CMR_WAVEFORM_ASWTRG_TOGGLE       (TC_CMR_WAVEFORM_ASWTRG_TOGGLE_Val << TC_CMR_WAVEFORM_ASWTRG_Pos)  /**< (TC_CMR) TOGGLE Position  */
317 #define TC_CMR_WAVEFORM_BCPB_Pos            24                                             /**< (TC_CMR) RB Compare Effect on TIOBx Position */
318 #define TC_CMR_WAVEFORM_BCPB_Msk            (_U_(0x3) << TC_CMR_WAVEFORM_BCPB_Pos)         /**< (TC_CMR) RB Compare Effect on TIOBx Mask */
319 #define TC_CMR_WAVEFORM_BCPB(value)         (TC_CMR_WAVEFORM_BCPB_Msk & ((value) << TC_CMR_WAVEFORM_BCPB_Pos))
320 #define   TC_CMR_WAVEFORM_BCPB_NONE_Val     _U_(0x0)                                       /**< (TC_CMR) WAVEFORM NONE  */
321 #define   TC_CMR_WAVEFORM_BCPB_SET_Val      _U_(0x1)                                       /**< (TC_CMR) WAVEFORM SET  */
322 #define   TC_CMR_WAVEFORM_BCPB_CLEAR_Val    _U_(0x2)                                       /**< (TC_CMR) WAVEFORM CLEAR  */
323 #define   TC_CMR_WAVEFORM_BCPB_TOGGLE_Val   _U_(0x3)                                       /**< (TC_CMR) WAVEFORM TOGGLE  */
324 #define TC_CMR_WAVEFORM_BCPB_NONE           (TC_CMR_WAVEFORM_BCPB_NONE_Val << TC_CMR_WAVEFORM_BCPB_Pos)  /**< (TC_CMR) NONE Position  */
325 #define TC_CMR_WAVEFORM_BCPB_SET            (TC_CMR_WAVEFORM_BCPB_SET_Val << TC_CMR_WAVEFORM_BCPB_Pos)  /**< (TC_CMR) SET Position  */
326 #define TC_CMR_WAVEFORM_BCPB_CLEAR          (TC_CMR_WAVEFORM_BCPB_CLEAR_Val << TC_CMR_WAVEFORM_BCPB_Pos)  /**< (TC_CMR) CLEAR Position  */
327 #define TC_CMR_WAVEFORM_BCPB_TOGGLE         (TC_CMR_WAVEFORM_BCPB_TOGGLE_Val << TC_CMR_WAVEFORM_BCPB_Pos)  /**< (TC_CMR) TOGGLE Position  */
328 #define TC_CMR_WAVEFORM_BCPC_Pos            26                                             /**< (TC_CMR) RC Compare Effect on TIOBx Position */
329 #define TC_CMR_WAVEFORM_BCPC_Msk            (_U_(0x3) << TC_CMR_WAVEFORM_BCPC_Pos)         /**< (TC_CMR) RC Compare Effect on TIOBx Mask */
330 #define TC_CMR_WAVEFORM_BCPC(value)         (TC_CMR_WAVEFORM_BCPC_Msk & ((value) << TC_CMR_WAVEFORM_BCPC_Pos))
331 #define   TC_CMR_WAVEFORM_BCPC_NONE_Val     _U_(0x0)                                       /**< (TC_CMR) WAVEFORM NONE  */
332 #define   TC_CMR_WAVEFORM_BCPC_SET_Val      _U_(0x1)                                       /**< (TC_CMR) WAVEFORM SET  */
333 #define   TC_CMR_WAVEFORM_BCPC_CLEAR_Val    _U_(0x2)                                       /**< (TC_CMR) WAVEFORM CLEAR  */
334 #define   TC_CMR_WAVEFORM_BCPC_TOGGLE_Val   _U_(0x3)                                       /**< (TC_CMR) WAVEFORM TOGGLE  */
335 #define TC_CMR_WAVEFORM_BCPC_NONE           (TC_CMR_WAVEFORM_BCPC_NONE_Val << TC_CMR_WAVEFORM_BCPC_Pos)  /**< (TC_CMR) NONE Position  */
336 #define TC_CMR_WAVEFORM_BCPC_SET            (TC_CMR_WAVEFORM_BCPC_SET_Val << TC_CMR_WAVEFORM_BCPC_Pos)  /**< (TC_CMR) SET Position  */
337 #define TC_CMR_WAVEFORM_BCPC_CLEAR          (TC_CMR_WAVEFORM_BCPC_CLEAR_Val << TC_CMR_WAVEFORM_BCPC_Pos)  /**< (TC_CMR) CLEAR Position  */
338 #define TC_CMR_WAVEFORM_BCPC_TOGGLE         (TC_CMR_WAVEFORM_BCPC_TOGGLE_Val << TC_CMR_WAVEFORM_BCPC_Pos)  /**< (TC_CMR) TOGGLE Position  */
339 #define TC_CMR_WAVEFORM_BEEVT_Pos           28                                             /**< (TC_CMR) External Event Effect on TIOBx Position */
340 #define TC_CMR_WAVEFORM_BEEVT_Msk           (_U_(0x3) << TC_CMR_WAVEFORM_BEEVT_Pos)        /**< (TC_CMR) External Event Effect on TIOBx Mask */
341 #define TC_CMR_WAVEFORM_BEEVT(value)        (TC_CMR_WAVEFORM_BEEVT_Msk & ((value) << TC_CMR_WAVEFORM_BEEVT_Pos))
342 #define   TC_CMR_WAVEFORM_BEEVT_NONE_Val    _U_(0x0)                                       /**< (TC_CMR) WAVEFORM NONE  */
343 #define   TC_CMR_WAVEFORM_BEEVT_SET_Val     _U_(0x1)                                       /**< (TC_CMR) WAVEFORM SET  */
344 #define   TC_CMR_WAVEFORM_BEEVT_CLEAR_Val   _U_(0x2)                                       /**< (TC_CMR) WAVEFORM CLEAR  */
345 #define   TC_CMR_WAVEFORM_BEEVT_TOGGLE_Val  _U_(0x3)                                       /**< (TC_CMR) WAVEFORM TOGGLE  */
346 #define TC_CMR_WAVEFORM_BEEVT_NONE          (TC_CMR_WAVEFORM_BEEVT_NONE_Val << TC_CMR_WAVEFORM_BEEVT_Pos)  /**< (TC_CMR) NONE Position  */
347 #define TC_CMR_WAVEFORM_BEEVT_SET           (TC_CMR_WAVEFORM_BEEVT_SET_Val << TC_CMR_WAVEFORM_BEEVT_Pos)  /**< (TC_CMR) SET Position  */
348 #define TC_CMR_WAVEFORM_BEEVT_CLEAR         (TC_CMR_WAVEFORM_BEEVT_CLEAR_Val << TC_CMR_WAVEFORM_BEEVT_Pos)  /**< (TC_CMR) CLEAR Position  */
349 #define TC_CMR_WAVEFORM_BEEVT_TOGGLE        (TC_CMR_WAVEFORM_BEEVT_TOGGLE_Val << TC_CMR_WAVEFORM_BEEVT_Pos)  /**< (TC_CMR) TOGGLE Position  */
350 #define TC_CMR_WAVEFORM_BSWTRG_Pos          30                                             /**< (TC_CMR) Software Trigger Effect on TIOBx Position */
351 #define TC_CMR_WAVEFORM_BSWTRG_Msk          (_U_(0x3) << TC_CMR_WAVEFORM_BSWTRG_Pos)       /**< (TC_CMR) Software Trigger Effect on TIOBx Mask */
352 #define TC_CMR_WAVEFORM_BSWTRG(value)       (TC_CMR_WAVEFORM_BSWTRG_Msk & ((value) << TC_CMR_WAVEFORM_BSWTRG_Pos))
353 #define   TC_CMR_WAVEFORM_BSWTRG_NONE_Val   _U_(0x0)                                       /**< (TC_CMR) WAVEFORM NONE  */
354 #define   TC_CMR_WAVEFORM_BSWTRG_SET_Val    _U_(0x1)                                       /**< (TC_CMR) WAVEFORM SET  */
355 #define   TC_CMR_WAVEFORM_BSWTRG_CLEAR_Val  _U_(0x2)                                       /**< (TC_CMR) WAVEFORM CLEAR  */
356 #define   TC_CMR_WAVEFORM_BSWTRG_TOGGLE_Val _U_(0x3)                                       /**< (TC_CMR) WAVEFORM TOGGLE  */
357 #define TC_CMR_WAVEFORM_BSWTRG_NONE         (TC_CMR_WAVEFORM_BSWTRG_NONE_Val << TC_CMR_WAVEFORM_BSWTRG_Pos)  /**< (TC_CMR) NONE Position  */
358 #define TC_CMR_WAVEFORM_BSWTRG_SET          (TC_CMR_WAVEFORM_BSWTRG_SET_Val << TC_CMR_WAVEFORM_BSWTRG_Pos)  /**< (TC_CMR) SET Position  */
359 #define TC_CMR_WAVEFORM_BSWTRG_CLEAR        (TC_CMR_WAVEFORM_BSWTRG_CLEAR_Val << TC_CMR_WAVEFORM_BSWTRG_Pos)  /**< (TC_CMR) CLEAR Position  */
360 #define TC_CMR_WAVEFORM_BSWTRG_TOGGLE       (TC_CMR_WAVEFORM_BSWTRG_TOGGLE_Val << TC_CMR_WAVEFORM_BSWTRG_Pos)  /**< (TC_CMR) TOGGLE Position  */
361 #define TC_CMR_WAVEFORM_MASK                _U_(0xFFFF7FC0)                                /**< \deprecated (TC_CMR_WAVEFORM) Register MASK  (Use TC_CMR_WAVEFORM_Msk instead)  */
362 #define TC_CMR_WAVEFORM_Msk                 _U_(0xFFFF7FC0)                                /**< (TC_CMR_WAVEFORM) Register Mask  */
363 
364 
365 /* -------- TC_SMMR : (TC Offset: 0x08) (R/W 32) Stepper Motor Mode Register (channel = 0) -------- */
366 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
367 #if COMPONENT_TYPEDEF_STYLE == 'N'
368 typedef union {
369   struct {
370     uint32_t GCEN:1;                    /**< bit:      0  Gray Count Enable                        */
371     uint32_t DOWN:1;                    /**< bit:      1  Down Count                               */
372     uint32_t :30;                       /**< bit:  2..31  Reserved */
373   } bit;                                /**< Structure used for bit  access */
374   uint32_t reg;                         /**< Type used for register access */
375 } TC_SMMR_Type;
376 #endif
377 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
378 
379 #define TC_SMMR_OFFSET                      (0x08)                                        /**<  (TC_SMMR) Stepper Motor Mode Register (channel = 0)  Offset */
380 
381 #define TC_SMMR_GCEN_Pos                    0                                              /**< (TC_SMMR) Gray Count Enable Position */
382 #define TC_SMMR_GCEN_Msk                    (_U_(0x1) << TC_SMMR_GCEN_Pos)                 /**< (TC_SMMR) Gray Count Enable Mask */
383 #define TC_SMMR_GCEN                        TC_SMMR_GCEN_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SMMR_GCEN_Msk instead */
384 #define TC_SMMR_DOWN_Pos                    1                                              /**< (TC_SMMR) Down Count Position */
385 #define TC_SMMR_DOWN_Msk                    (_U_(0x1) << TC_SMMR_DOWN_Pos)                 /**< (TC_SMMR) Down Count Mask */
386 #define TC_SMMR_DOWN                        TC_SMMR_DOWN_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SMMR_DOWN_Msk instead */
387 #define TC_SMMR_MASK                        _U_(0x03)                                      /**< \deprecated (TC_SMMR) Register MASK  (Use TC_SMMR_Msk instead)  */
388 #define TC_SMMR_Msk                         _U_(0x03)                                      /**< (TC_SMMR) Register Mask  */
389 
390 
391 /* -------- TC_RAB : (TC Offset: 0x0c) (R/ 32) Register AB (channel = 0) -------- */
392 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
393 #if COMPONENT_TYPEDEF_STYLE == 'N'
394 typedef union {
395   struct {
396     uint32_t RAB:32;                    /**< bit:  0..31  Register A or Register B                 */
397   } bit;                                /**< Structure used for bit  access */
398   uint32_t reg;                         /**< Type used for register access */
399 } TC_RAB_Type;
400 #endif
401 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
402 
403 #define TC_RAB_OFFSET                       (0x0C)                                        /**<  (TC_RAB) Register AB (channel = 0)  Offset */
404 
405 #define TC_RAB_RAB_Pos                      0                                              /**< (TC_RAB) Register A or Register B Position */
406 #define TC_RAB_RAB_Msk                      (_U_(0xFFFFFFFF) << TC_RAB_RAB_Pos)            /**< (TC_RAB) Register A or Register B Mask */
407 #define TC_RAB_RAB(value)                   (TC_RAB_RAB_Msk & ((value) << TC_RAB_RAB_Pos))
408 #define TC_RAB_MASK                         _U_(0xFFFFFFFF)                                /**< \deprecated (TC_RAB) Register MASK  (Use TC_RAB_Msk instead)  */
409 #define TC_RAB_Msk                          _U_(0xFFFFFFFF)                                /**< (TC_RAB) Register Mask  */
410 
411 
412 /* -------- TC_CV : (TC Offset: 0x10) (R/ 32) Counter Value (channel = 0) -------- */
413 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
414 #if COMPONENT_TYPEDEF_STYLE == 'N'
415 typedef union {
416   struct {
417     uint32_t CV:32;                     /**< bit:  0..31  Counter Value                            */
418   } bit;                                /**< Structure used for bit  access */
419   uint32_t reg;                         /**< Type used for register access */
420 } TC_CV_Type;
421 #endif
422 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
423 
424 #define TC_CV_OFFSET                        (0x10)                                        /**<  (TC_CV) Counter Value (channel = 0)  Offset */
425 
426 #define TC_CV_CV_Pos                        0                                              /**< (TC_CV) Counter Value Position */
427 #define TC_CV_CV_Msk                        (_U_(0xFFFFFFFF) << TC_CV_CV_Pos)              /**< (TC_CV) Counter Value Mask */
428 #define TC_CV_CV(value)                     (TC_CV_CV_Msk & ((value) << TC_CV_CV_Pos))
429 #define TC_CV_MASK                          _U_(0xFFFFFFFF)                                /**< \deprecated (TC_CV) Register MASK  (Use TC_CV_Msk instead)  */
430 #define TC_CV_Msk                           _U_(0xFFFFFFFF)                                /**< (TC_CV) Register Mask  */
431 
432 
433 /* -------- TC_RA : (TC Offset: 0x14) (R/W 32) Register A (channel = 0) -------- */
434 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
435 #if COMPONENT_TYPEDEF_STYLE == 'N'
436 typedef union {
437   struct {
438     uint32_t RA:32;                     /**< bit:  0..31  Register A                               */
439   } bit;                                /**< Structure used for bit  access */
440   uint32_t reg;                         /**< Type used for register access */
441 } TC_RA_Type;
442 #endif
443 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
444 
445 #define TC_RA_OFFSET                        (0x14)                                        /**<  (TC_RA) Register A (channel = 0)  Offset */
446 
447 #define TC_RA_RA_Pos                        0                                              /**< (TC_RA) Register A Position */
448 #define TC_RA_RA_Msk                        (_U_(0xFFFFFFFF) << TC_RA_RA_Pos)              /**< (TC_RA) Register A Mask */
449 #define TC_RA_RA(value)                     (TC_RA_RA_Msk & ((value) << TC_RA_RA_Pos))
450 #define TC_RA_MASK                          _U_(0xFFFFFFFF)                                /**< \deprecated (TC_RA) Register MASK  (Use TC_RA_Msk instead)  */
451 #define TC_RA_Msk                           _U_(0xFFFFFFFF)                                /**< (TC_RA) Register Mask  */
452 
453 
454 /* -------- TC_RB : (TC Offset: 0x18) (R/W 32) Register B (channel = 0) -------- */
455 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
456 #if COMPONENT_TYPEDEF_STYLE == 'N'
457 typedef union {
458   struct {
459     uint32_t RB:32;                     /**< bit:  0..31  Register B                               */
460   } bit;                                /**< Structure used for bit  access */
461   uint32_t reg;                         /**< Type used for register access */
462 } TC_RB_Type;
463 #endif
464 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
465 
466 #define TC_RB_OFFSET                        (0x18)                                        /**<  (TC_RB) Register B (channel = 0)  Offset */
467 
468 #define TC_RB_RB_Pos                        0                                              /**< (TC_RB) Register B Position */
469 #define TC_RB_RB_Msk                        (_U_(0xFFFFFFFF) << TC_RB_RB_Pos)              /**< (TC_RB) Register B Mask */
470 #define TC_RB_RB(value)                     (TC_RB_RB_Msk & ((value) << TC_RB_RB_Pos))
471 #define TC_RB_MASK                          _U_(0xFFFFFFFF)                                /**< \deprecated (TC_RB) Register MASK  (Use TC_RB_Msk instead)  */
472 #define TC_RB_Msk                           _U_(0xFFFFFFFF)                                /**< (TC_RB) Register Mask  */
473 
474 
475 /* -------- TC_RC : (TC Offset: 0x1c) (R/W 32) Register C (channel = 0) -------- */
476 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
477 #if COMPONENT_TYPEDEF_STYLE == 'N'
478 typedef union {
479   struct {
480     uint32_t RC:32;                     /**< bit:  0..31  Register C                               */
481   } bit;                                /**< Structure used for bit  access */
482   uint32_t reg;                         /**< Type used for register access */
483 } TC_RC_Type;
484 #endif
485 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
486 
487 #define TC_RC_OFFSET                        (0x1C)                                        /**<  (TC_RC) Register C (channel = 0)  Offset */
488 
489 #define TC_RC_RC_Pos                        0                                              /**< (TC_RC) Register C Position */
490 #define TC_RC_RC_Msk                        (_U_(0xFFFFFFFF) << TC_RC_RC_Pos)              /**< (TC_RC) Register C Mask */
491 #define TC_RC_RC(value)                     (TC_RC_RC_Msk & ((value) << TC_RC_RC_Pos))
492 #define TC_RC_MASK                          _U_(0xFFFFFFFF)                                /**< \deprecated (TC_RC) Register MASK  (Use TC_RC_Msk instead)  */
493 #define TC_RC_Msk                           _U_(0xFFFFFFFF)                                /**< (TC_RC) Register Mask  */
494 
495 
496 /* -------- TC_SR : (TC Offset: 0x20) (R/ 32) Status Register (channel = 0) -------- */
497 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
498 #if COMPONENT_TYPEDEF_STYLE == 'N'
499 typedef union {
500   struct {
501     uint32_t COVFS:1;                   /**< bit:      0  Counter Overflow Status (cleared on read) */
502     uint32_t LOVRS:1;                   /**< bit:      1  Load Overrun Status (cleared on read)    */
503     uint32_t CPAS:1;                    /**< bit:      2  RA Compare Status (cleared on read)      */
504     uint32_t CPBS:1;                    /**< bit:      3  RB Compare Status (cleared on read)      */
505     uint32_t CPCS:1;                    /**< bit:      4  RC Compare Status (cleared on read)      */
506     uint32_t LDRAS:1;                   /**< bit:      5  RA Loading Status (cleared on read)      */
507     uint32_t LDRBS:1;                   /**< bit:      6  RB Loading Status (cleared on read)      */
508     uint32_t ETRGS:1;                   /**< bit:      7  External Trigger Status (cleared on read) */
509     uint32_t :8;                        /**< bit:  8..15  Reserved */
510     uint32_t CLKSTA:1;                  /**< bit:     16  Clock Enabling Status                    */
511     uint32_t MTIOA:1;                   /**< bit:     17  TIOAx Mirror                             */
512     uint32_t MTIOB:1;                   /**< bit:     18  TIOBx Mirror                             */
513     uint32_t :13;                       /**< bit: 19..31  Reserved */
514   } bit;                                /**< Structure used for bit  access */
515   uint32_t reg;                         /**< Type used for register access */
516 } TC_SR_Type;
517 #endif
518 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
519 
520 #define TC_SR_OFFSET                        (0x20)                                        /**<  (TC_SR) Status Register (channel = 0)  Offset */
521 
522 #define TC_SR_COVFS_Pos                     0                                              /**< (TC_SR) Counter Overflow Status (cleared on read) Position */
523 #define TC_SR_COVFS_Msk                     (_U_(0x1) << TC_SR_COVFS_Pos)                  /**< (TC_SR) Counter Overflow Status (cleared on read) Mask */
524 #define TC_SR_COVFS                         TC_SR_COVFS_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SR_COVFS_Msk instead */
525 #define TC_SR_LOVRS_Pos                     1                                              /**< (TC_SR) Load Overrun Status (cleared on read) Position */
526 #define TC_SR_LOVRS_Msk                     (_U_(0x1) << TC_SR_LOVRS_Pos)                  /**< (TC_SR) Load Overrun Status (cleared on read) Mask */
527 #define TC_SR_LOVRS                         TC_SR_LOVRS_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SR_LOVRS_Msk instead */
528 #define TC_SR_CPAS_Pos                      2                                              /**< (TC_SR) RA Compare Status (cleared on read) Position */
529 #define TC_SR_CPAS_Msk                      (_U_(0x1) << TC_SR_CPAS_Pos)                   /**< (TC_SR) RA Compare Status (cleared on read) Mask */
530 #define TC_SR_CPAS                          TC_SR_CPAS_Msk                                 /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SR_CPAS_Msk instead */
531 #define TC_SR_CPBS_Pos                      3                                              /**< (TC_SR) RB Compare Status (cleared on read) Position */
532 #define TC_SR_CPBS_Msk                      (_U_(0x1) << TC_SR_CPBS_Pos)                   /**< (TC_SR) RB Compare Status (cleared on read) Mask */
533 #define TC_SR_CPBS                          TC_SR_CPBS_Msk                                 /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SR_CPBS_Msk instead */
534 #define TC_SR_CPCS_Pos                      4                                              /**< (TC_SR) RC Compare Status (cleared on read) Position */
535 #define TC_SR_CPCS_Msk                      (_U_(0x1) << TC_SR_CPCS_Pos)                   /**< (TC_SR) RC Compare Status (cleared on read) Mask */
536 #define TC_SR_CPCS                          TC_SR_CPCS_Msk                                 /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SR_CPCS_Msk instead */
537 #define TC_SR_LDRAS_Pos                     5                                              /**< (TC_SR) RA Loading Status (cleared on read) Position */
538 #define TC_SR_LDRAS_Msk                     (_U_(0x1) << TC_SR_LDRAS_Pos)                  /**< (TC_SR) RA Loading Status (cleared on read) Mask */
539 #define TC_SR_LDRAS                         TC_SR_LDRAS_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SR_LDRAS_Msk instead */
540 #define TC_SR_LDRBS_Pos                     6                                              /**< (TC_SR) RB Loading Status (cleared on read) Position */
541 #define TC_SR_LDRBS_Msk                     (_U_(0x1) << TC_SR_LDRBS_Pos)                  /**< (TC_SR) RB Loading Status (cleared on read) Mask */
542 #define TC_SR_LDRBS                         TC_SR_LDRBS_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SR_LDRBS_Msk instead */
543 #define TC_SR_ETRGS_Pos                     7                                              /**< (TC_SR) External Trigger Status (cleared on read) Position */
544 #define TC_SR_ETRGS_Msk                     (_U_(0x1) << TC_SR_ETRGS_Pos)                  /**< (TC_SR) External Trigger Status (cleared on read) Mask */
545 #define TC_SR_ETRGS                         TC_SR_ETRGS_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SR_ETRGS_Msk instead */
546 #define TC_SR_CLKSTA_Pos                    16                                             /**< (TC_SR) Clock Enabling Status Position */
547 #define TC_SR_CLKSTA_Msk                    (_U_(0x1) << TC_SR_CLKSTA_Pos)                 /**< (TC_SR) Clock Enabling Status Mask */
548 #define TC_SR_CLKSTA                        TC_SR_CLKSTA_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SR_CLKSTA_Msk instead */
549 #define TC_SR_MTIOA_Pos                     17                                             /**< (TC_SR) TIOAx Mirror Position */
550 #define TC_SR_MTIOA_Msk                     (_U_(0x1) << TC_SR_MTIOA_Pos)                  /**< (TC_SR) TIOAx Mirror Mask */
551 #define TC_SR_MTIOA                         TC_SR_MTIOA_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SR_MTIOA_Msk instead */
552 #define TC_SR_MTIOB_Pos                     18                                             /**< (TC_SR) TIOBx Mirror Position */
553 #define TC_SR_MTIOB_Msk                     (_U_(0x1) << TC_SR_MTIOB_Pos)                  /**< (TC_SR) TIOBx Mirror Mask */
554 #define TC_SR_MTIOB                         TC_SR_MTIOB_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SR_MTIOB_Msk instead */
555 #define TC_SR_MASK                          _U_(0x700FF)                                   /**< \deprecated (TC_SR) Register MASK  (Use TC_SR_Msk instead)  */
556 #define TC_SR_Msk                           _U_(0x700FF)                                   /**< (TC_SR) Register Mask  */
557 
558 
559 /* -------- TC_IER : (TC Offset: 0x24) (/W 32) Interrupt Enable Register (channel = 0) -------- */
560 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
561 #if COMPONENT_TYPEDEF_STYLE == 'N'
562 typedef union {
563   struct {
564     uint32_t COVFS:1;                   /**< bit:      0  Counter Overflow                         */
565     uint32_t LOVRS:1;                   /**< bit:      1  Load Overrun                             */
566     uint32_t CPAS:1;                    /**< bit:      2  RA Compare                               */
567     uint32_t CPBS:1;                    /**< bit:      3  RB Compare                               */
568     uint32_t CPCS:1;                    /**< bit:      4  RC Compare                               */
569     uint32_t LDRAS:1;                   /**< bit:      5  RA Loading                               */
570     uint32_t LDRBS:1;                   /**< bit:      6  RB Loading                               */
571     uint32_t ETRGS:1;                   /**< bit:      7  External Trigger                         */
572     uint32_t :24;                       /**< bit:  8..31  Reserved */
573   } bit;                                /**< Structure used for bit  access */
574   uint32_t reg;                         /**< Type used for register access */
575 } TC_IER_Type;
576 #endif
577 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
578 
579 #define TC_IER_OFFSET                       (0x24)                                        /**<  (TC_IER) Interrupt Enable Register (channel = 0)  Offset */
580 
581 #define TC_IER_COVFS_Pos                    0                                              /**< (TC_IER) Counter Overflow Position */
582 #define TC_IER_COVFS_Msk                    (_U_(0x1) << TC_IER_COVFS_Pos)                 /**< (TC_IER) Counter Overflow Mask */
583 #define TC_IER_COVFS                        TC_IER_COVFS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IER_COVFS_Msk instead */
584 #define TC_IER_LOVRS_Pos                    1                                              /**< (TC_IER) Load Overrun Position */
585 #define TC_IER_LOVRS_Msk                    (_U_(0x1) << TC_IER_LOVRS_Pos)                 /**< (TC_IER) Load Overrun Mask */
586 #define TC_IER_LOVRS                        TC_IER_LOVRS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IER_LOVRS_Msk instead */
587 #define TC_IER_CPAS_Pos                     2                                              /**< (TC_IER) RA Compare Position */
588 #define TC_IER_CPAS_Msk                     (_U_(0x1) << TC_IER_CPAS_Pos)                  /**< (TC_IER) RA Compare Mask */
589 #define TC_IER_CPAS                         TC_IER_CPAS_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IER_CPAS_Msk instead */
590 #define TC_IER_CPBS_Pos                     3                                              /**< (TC_IER) RB Compare Position */
591 #define TC_IER_CPBS_Msk                     (_U_(0x1) << TC_IER_CPBS_Pos)                  /**< (TC_IER) RB Compare Mask */
592 #define TC_IER_CPBS                         TC_IER_CPBS_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IER_CPBS_Msk instead */
593 #define TC_IER_CPCS_Pos                     4                                              /**< (TC_IER) RC Compare Position */
594 #define TC_IER_CPCS_Msk                     (_U_(0x1) << TC_IER_CPCS_Pos)                  /**< (TC_IER) RC Compare Mask */
595 #define TC_IER_CPCS                         TC_IER_CPCS_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IER_CPCS_Msk instead */
596 #define TC_IER_LDRAS_Pos                    5                                              /**< (TC_IER) RA Loading Position */
597 #define TC_IER_LDRAS_Msk                    (_U_(0x1) << TC_IER_LDRAS_Pos)                 /**< (TC_IER) RA Loading Mask */
598 #define TC_IER_LDRAS                        TC_IER_LDRAS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IER_LDRAS_Msk instead */
599 #define TC_IER_LDRBS_Pos                    6                                              /**< (TC_IER) RB Loading Position */
600 #define TC_IER_LDRBS_Msk                    (_U_(0x1) << TC_IER_LDRBS_Pos)                 /**< (TC_IER) RB Loading Mask */
601 #define TC_IER_LDRBS                        TC_IER_LDRBS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IER_LDRBS_Msk instead */
602 #define TC_IER_ETRGS_Pos                    7                                              /**< (TC_IER) External Trigger Position */
603 #define TC_IER_ETRGS_Msk                    (_U_(0x1) << TC_IER_ETRGS_Pos)                 /**< (TC_IER) External Trigger Mask */
604 #define TC_IER_ETRGS                        TC_IER_ETRGS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IER_ETRGS_Msk instead */
605 #define TC_IER_MASK                         _U_(0xFF)                                      /**< \deprecated (TC_IER) Register MASK  (Use TC_IER_Msk instead)  */
606 #define TC_IER_Msk                          _U_(0xFF)                                      /**< (TC_IER) Register Mask  */
607 
608 
609 /* -------- TC_IDR : (TC Offset: 0x28) (/W 32) Interrupt Disable Register (channel = 0) -------- */
610 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
611 #if COMPONENT_TYPEDEF_STYLE == 'N'
612 typedef union {
613   struct {
614     uint32_t COVFS:1;                   /**< bit:      0  Counter Overflow                         */
615     uint32_t LOVRS:1;                   /**< bit:      1  Load Overrun                             */
616     uint32_t CPAS:1;                    /**< bit:      2  RA Compare                               */
617     uint32_t CPBS:1;                    /**< bit:      3  RB Compare                               */
618     uint32_t CPCS:1;                    /**< bit:      4  RC Compare                               */
619     uint32_t LDRAS:1;                   /**< bit:      5  RA Loading                               */
620     uint32_t LDRBS:1;                   /**< bit:      6  RB Loading                               */
621     uint32_t ETRGS:1;                   /**< bit:      7  External Trigger                         */
622     uint32_t :24;                       /**< bit:  8..31  Reserved */
623   } bit;                                /**< Structure used for bit  access */
624   uint32_t reg;                         /**< Type used for register access */
625 } TC_IDR_Type;
626 #endif
627 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
628 
629 #define TC_IDR_OFFSET                       (0x28)                                        /**<  (TC_IDR) Interrupt Disable Register (channel = 0)  Offset */
630 
631 #define TC_IDR_COVFS_Pos                    0                                              /**< (TC_IDR) Counter Overflow Position */
632 #define TC_IDR_COVFS_Msk                    (_U_(0x1) << TC_IDR_COVFS_Pos)                 /**< (TC_IDR) Counter Overflow Mask */
633 #define TC_IDR_COVFS                        TC_IDR_COVFS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IDR_COVFS_Msk instead */
634 #define TC_IDR_LOVRS_Pos                    1                                              /**< (TC_IDR) Load Overrun Position */
635 #define TC_IDR_LOVRS_Msk                    (_U_(0x1) << TC_IDR_LOVRS_Pos)                 /**< (TC_IDR) Load Overrun Mask */
636 #define TC_IDR_LOVRS                        TC_IDR_LOVRS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IDR_LOVRS_Msk instead */
637 #define TC_IDR_CPAS_Pos                     2                                              /**< (TC_IDR) RA Compare Position */
638 #define TC_IDR_CPAS_Msk                     (_U_(0x1) << TC_IDR_CPAS_Pos)                  /**< (TC_IDR) RA Compare Mask */
639 #define TC_IDR_CPAS                         TC_IDR_CPAS_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IDR_CPAS_Msk instead */
640 #define TC_IDR_CPBS_Pos                     3                                              /**< (TC_IDR) RB Compare Position */
641 #define TC_IDR_CPBS_Msk                     (_U_(0x1) << TC_IDR_CPBS_Pos)                  /**< (TC_IDR) RB Compare Mask */
642 #define TC_IDR_CPBS                         TC_IDR_CPBS_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IDR_CPBS_Msk instead */
643 #define TC_IDR_CPCS_Pos                     4                                              /**< (TC_IDR) RC Compare Position */
644 #define TC_IDR_CPCS_Msk                     (_U_(0x1) << TC_IDR_CPCS_Pos)                  /**< (TC_IDR) RC Compare Mask */
645 #define TC_IDR_CPCS                         TC_IDR_CPCS_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IDR_CPCS_Msk instead */
646 #define TC_IDR_LDRAS_Pos                    5                                              /**< (TC_IDR) RA Loading Position */
647 #define TC_IDR_LDRAS_Msk                    (_U_(0x1) << TC_IDR_LDRAS_Pos)                 /**< (TC_IDR) RA Loading Mask */
648 #define TC_IDR_LDRAS                        TC_IDR_LDRAS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IDR_LDRAS_Msk instead */
649 #define TC_IDR_LDRBS_Pos                    6                                              /**< (TC_IDR) RB Loading Position */
650 #define TC_IDR_LDRBS_Msk                    (_U_(0x1) << TC_IDR_LDRBS_Pos)                 /**< (TC_IDR) RB Loading Mask */
651 #define TC_IDR_LDRBS                        TC_IDR_LDRBS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IDR_LDRBS_Msk instead */
652 #define TC_IDR_ETRGS_Pos                    7                                              /**< (TC_IDR) External Trigger Position */
653 #define TC_IDR_ETRGS_Msk                    (_U_(0x1) << TC_IDR_ETRGS_Pos)                 /**< (TC_IDR) External Trigger Mask */
654 #define TC_IDR_ETRGS                        TC_IDR_ETRGS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IDR_ETRGS_Msk instead */
655 #define TC_IDR_MASK                         _U_(0xFF)                                      /**< \deprecated (TC_IDR) Register MASK  (Use TC_IDR_Msk instead)  */
656 #define TC_IDR_Msk                          _U_(0xFF)                                      /**< (TC_IDR) Register Mask  */
657 
658 
659 /* -------- TC_IMR : (TC Offset: 0x2c) (R/ 32) Interrupt Mask Register (channel = 0) -------- */
660 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
661 #if COMPONENT_TYPEDEF_STYLE == 'N'
662 typedef union {
663   struct {
664     uint32_t COVFS:1;                   /**< bit:      0  Counter Overflow                         */
665     uint32_t LOVRS:1;                   /**< bit:      1  Load Overrun                             */
666     uint32_t CPAS:1;                    /**< bit:      2  RA Compare                               */
667     uint32_t CPBS:1;                    /**< bit:      3  RB Compare                               */
668     uint32_t CPCS:1;                    /**< bit:      4  RC Compare                               */
669     uint32_t LDRAS:1;                   /**< bit:      5  RA Loading                               */
670     uint32_t LDRBS:1;                   /**< bit:      6  RB Loading                               */
671     uint32_t ETRGS:1;                   /**< bit:      7  External Trigger                         */
672     uint32_t :24;                       /**< bit:  8..31  Reserved */
673   } bit;                                /**< Structure used for bit  access */
674   uint32_t reg;                         /**< Type used for register access */
675 } TC_IMR_Type;
676 #endif
677 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
678 
679 #define TC_IMR_OFFSET                       (0x2C)                                        /**<  (TC_IMR) Interrupt Mask Register (channel = 0)  Offset */
680 
681 #define TC_IMR_COVFS_Pos                    0                                              /**< (TC_IMR) Counter Overflow Position */
682 #define TC_IMR_COVFS_Msk                    (_U_(0x1) << TC_IMR_COVFS_Pos)                 /**< (TC_IMR) Counter Overflow Mask */
683 #define TC_IMR_COVFS                        TC_IMR_COVFS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IMR_COVFS_Msk instead */
684 #define TC_IMR_LOVRS_Pos                    1                                              /**< (TC_IMR) Load Overrun Position */
685 #define TC_IMR_LOVRS_Msk                    (_U_(0x1) << TC_IMR_LOVRS_Pos)                 /**< (TC_IMR) Load Overrun Mask */
686 #define TC_IMR_LOVRS                        TC_IMR_LOVRS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IMR_LOVRS_Msk instead */
687 #define TC_IMR_CPAS_Pos                     2                                              /**< (TC_IMR) RA Compare Position */
688 #define TC_IMR_CPAS_Msk                     (_U_(0x1) << TC_IMR_CPAS_Pos)                  /**< (TC_IMR) RA Compare Mask */
689 #define TC_IMR_CPAS                         TC_IMR_CPAS_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IMR_CPAS_Msk instead */
690 #define TC_IMR_CPBS_Pos                     3                                              /**< (TC_IMR) RB Compare Position */
691 #define TC_IMR_CPBS_Msk                     (_U_(0x1) << TC_IMR_CPBS_Pos)                  /**< (TC_IMR) RB Compare Mask */
692 #define TC_IMR_CPBS                         TC_IMR_CPBS_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IMR_CPBS_Msk instead */
693 #define TC_IMR_CPCS_Pos                     4                                              /**< (TC_IMR) RC Compare Position */
694 #define TC_IMR_CPCS_Msk                     (_U_(0x1) << TC_IMR_CPCS_Pos)                  /**< (TC_IMR) RC Compare Mask */
695 #define TC_IMR_CPCS                         TC_IMR_CPCS_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IMR_CPCS_Msk instead */
696 #define TC_IMR_LDRAS_Pos                    5                                              /**< (TC_IMR) RA Loading Position */
697 #define TC_IMR_LDRAS_Msk                    (_U_(0x1) << TC_IMR_LDRAS_Pos)                 /**< (TC_IMR) RA Loading Mask */
698 #define TC_IMR_LDRAS                        TC_IMR_LDRAS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IMR_LDRAS_Msk instead */
699 #define TC_IMR_LDRBS_Pos                    6                                              /**< (TC_IMR) RB Loading Position */
700 #define TC_IMR_LDRBS_Msk                    (_U_(0x1) << TC_IMR_LDRBS_Pos)                 /**< (TC_IMR) RB Loading Mask */
701 #define TC_IMR_LDRBS                        TC_IMR_LDRBS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IMR_LDRBS_Msk instead */
702 #define TC_IMR_ETRGS_Pos                    7                                              /**< (TC_IMR) External Trigger Position */
703 #define TC_IMR_ETRGS_Msk                    (_U_(0x1) << TC_IMR_ETRGS_Pos)                 /**< (TC_IMR) External Trigger Mask */
704 #define TC_IMR_ETRGS                        TC_IMR_ETRGS_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_IMR_ETRGS_Msk instead */
705 #define TC_IMR_MASK                         _U_(0xFF)                                      /**< \deprecated (TC_IMR) Register MASK  (Use TC_IMR_Msk instead)  */
706 #define TC_IMR_Msk                          _U_(0xFF)                                      /**< (TC_IMR) Register Mask  */
707 
708 
709 /* -------- TC_EMR : (TC Offset: 0x30) (R/W 32) Extended Mode Register (channel = 0) -------- */
710 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
711 #if COMPONENT_TYPEDEF_STYLE == 'N'
712 typedef union {
713   struct {
714     uint32_t TRIGSRCA:2;                /**< bit:   0..1  Trigger Source for Input A               */
715     uint32_t :2;                        /**< bit:   2..3  Reserved */
716     uint32_t TRIGSRCB:2;                /**< bit:   4..5  Trigger Source for Input B               */
717     uint32_t :2;                        /**< bit:   6..7  Reserved */
718     uint32_t NODIVCLK:1;                /**< bit:      8  No Divided Clock                         */
719     uint32_t :23;                       /**< bit:  9..31  Reserved */
720   } bit;                                /**< Structure used for bit  access */
721   uint32_t reg;                         /**< Type used for register access */
722 } TC_EMR_Type;
723 #endif
724 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
725 
726 #define TC_EMR_OFFSET                       (0x30)                                        /**<  (TC_EMR) Extended Mode Register (channel = 0)  Offset */
727 
728 #define TC_EMR_TRIGSRCA_Pos                 0                                              /**< (TC_EMR) Trigger Source for Input A Position */
729 #define TC_EMR_TRIGSRCA_Msk                 (_U_(0x3) << TC_EMR_TRIGSRCA_Pos)              /**< (TC_EMR) Trigger Source for Input A Mask */
730 #define TC_EMR_TRIGSRCA(value)              (TC_EMR_TRIGSRCA_Msk & ((value) << TC_EMR_TRIGSRCA_Pos))
731 #define   TC_EMR_TRIGSRCA_EXTERNAL_TIOAx_Val _U_(0x0)                                       /**< (TC_EMR) The trigger/capture input A is driven by external pin TIOAx  */
732 #define   TC_EMR_TRIGSRCA_PWMx_Val          _U_(0x1)                                       /**< (TC_EMR) The trigger/capture input A is driven internally by PWMx  */
733 #define TC_EMR_TRIGSRCA_EXTERNAL_TIOAx      (TC_EMR_TRIGSRCA_EXTERNAL_TIOAx_Val << TC_EMR_TRIGSRCA_Pos)  /**< (TC_EMR) The trigger/capture input A is driven by external pin TIOAx Position  */
734 #define TC_EMR_TRIGSRCA_PWMx                (TC_EMR_TRIGSRCA_PWMx_Val << TC_EMR_TRIGSRCA_Pos)  /**< (TC_EMR) The trigger/capture input A is driven internally by PWMx Position  */
735 #define TC_EMR_TRIGSRCB_Pos                 4                                              /**< (TC_EMR) Trigger Source for Input B Position */
736 #define TC_EMR_TRIGSRCB_Msk                 (_U_(0x3) << TC_EMR_TRIGSRCB_Pos)              /**< (TC_EMR) Trigger Source for Input B Mask */
737 #define TC_EMR_TRIGSRCB(value)              (TC_EMR_TRIGSRCB_Msk & ((value) << TC_EMR_TRIGSRCB_Pos))
738 #define   TC_EMR_TRIGSRCB_EXTERNAL_TIOBx_Val _U_(0x0)                                       /**< (TC_EMR) The trigger/capture input B is driven by external pin TIOBx  */
739 #define   TC_EMR_TRIGSRCB_PWMx_Val          _U_(0x1)                                       /**< (TC_EMR) For TC0 to TC10: The trigger/capture input B is driven internally by the comparator output (see Figure 7-16) of the PWMx.For TC11: The trigger/capture input B is driven internally by the GTSUCOMP signal of the Ethernet MAC (GMAC).  */
740 #define TC_EMR_TRIGSRCB_EXTERNAL_TIOBx      (TC_EMR_TRIGSRCB_EXTERNAL_TIOBx_Val << TC_EMR_TRIGSRCB_Pos)  /**< (TC_EMR) The trigger/capture input B is driven by external pin TIOBx Position  */
741 #define TC_EMR_TRIGSRCB_PWMx                (TC_EMR_TRIGSRCB_PWMx_Val << TC_EMR_TRIGSRCB_Pos)  /**< (TC_EMR) For TC0 to TC10: The trigger/capture input B is driven internally by the comparator output (see Figure 7-16) of the PWMx.For TC11: The trigger/capture input B is driven internally by the GTSUCOMP signal of the Ethernet MAC (GMAC). Position  */
742 #define TC_EMR_NODIVCLK_Pos                 8                                              /**< (TC_EMR) No Divided Clock Position */
743 #define TC_EMR_NODIVCLK_Msk                 (_U_(0x1) << TC_EMR_NODIVCLK_Pos)              /**< (TC_EMR) No Divided Clock Mask */
744 #define TC_EMR_NODIVCLK                     TC_EMR_NODIVCLK_Msk                            /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_EMR_NODIVCLK_Msk instead */
745 #define TC_EMR_MASK                         _U_(0x133)                                     /**< \deprecated (TC_EMR) Register MASK  (Use TC_EMR_Msk instead)  */
746 #define TC_EMR_Msk                          _U_(0x133)                                     /**< (TC_EMR) Register Mask  */
747 
748 
749 /* -------- TC_BCR : (TC Offset: 0xc0) (/W 32) Block Control Register -------- */
750 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
751 #if COMPONENT_TYPEDEF_STYLE == 'N'
752 typedef union {
753   struct {
754     uint32_t SYNC:1;                    /**< bit:      0  Synchro Command                          */
755     uint32_t :31;                       /**< bit:  1..31  Reserved */
756   } bit;                                /**< Structure used for bit  access */
757   uint32_t reg;                         /**< Type used for register access */
758 } TC_BCR_Type;
759 #endif
760 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
761 
762 #define TC_BCR_OFFSET                       (0xC0)                                        /**<  (TC_BCR) Block Control Register  Offset */
763 
764 #define TC_BCR_SYNC_Pos                     0                                              /**< (TC_BCR) Synchro Command Position */
765 #define TC_BCR_SYNC_Msk                     (_U_(0x1) << TC_BCR_SYNC_Pos)                  /**< (TC_BCR) Synchro Command Mask */
766 #define TC_BCR_SYNC                         TC_BCR_SYNC_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_BCR_SYNC_Msk instead */
767 #define TC_BCR_MASK                         _U_(0x01)                                      /**< \deprecated (TC_BCR) Register MASK  (Use TC_BCR_Msk instead)  */
768 #define TC_BCR_Msk                          _U_(0x01)                                      /**< (TC_BCR) Register Mask  */
769 
770 
771 /* -------- TC_BMR : (TC Offset: 0xc4) (R/W 32) Block Mode Register -------- */
772 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
773 #if COMPONENT_TYPEDEF_STYLE == 'N'
774 typedef union {
775   struct {
776     uint32_t TC0XC0S:2;                 /**< bit:   0..1  External Clock Signal 0 Selection        */
777     uint32_t TC1XC1S:2;                 /**< bit:   2..3  External Clock Signal 1 Selection        */
778     uint32_t TC2XC2S:2;                 /**< bit:   4..5  External Clock Signal 2 Selection        */
779     uint32_t :2;                        /**< bit:   6..7  Reserved */
780     uint32_t QDEN:1;                    /**< bit:      8  Quadrature Decoder Enabled               */
781     uint32_t POSEN:1;                   /**< bit:      9  Position Enabled                         */
782     uint32_t SPEEDEN:1;                 /**< bit:     10  Speed Enabled                            */
783     uint32_t QDTRANS:1;                 /**< bit:     11  Quadrature Decoding Transparent          */
784     uint32_t EDGPHA:1;                  /**< bit:     12  Edge on PHA Count Mode                   */
785     uint32_t INVA:1;                    /**< bit:     13  Inverted PHA                             */
786     uint32_t INVB:1;                    /**< bit:     14  Inverted PHB                             */
787     uint32_t INVIDX:1;                  /**< bit:     15  Inverted Index                           */
788     uint32_t SWAP:1;                    /**< bit:     16  Swap PHA and PHB                         */
789     uint32_t IDXPHB:1;                  /**< bit:     17  Index Pin is PHB Pin                     */
790     uint32_t AUTOC:1;                   /**< bit:     18  AutoCorrection of missing pulses         */
791     uint32_t :1;                        /**< bit:     19  Reserved */
792     uint32_t MAXFILT:6;                 /**< bit: 20..25  Maximum Filter                           */
793     uint32_t MAXCMP:4;                  /**< bit: 26..29  Maximum Consecutive Missing Pulses       */
794     uint32_t :2;                        /**< bit: 30..31  Reserved */
795   } bit;                                /**< Structure used for bit  access */
796   uint32_t reg;                         /**< Type used for register access */
797 } TC_BMR_Type;
798 #endif
799 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
800 
801 #define TC_BMR_OFFSET                       (0xC4)                                        /**<  (TC_BMR) Block Mode Register  Offset */
802 
803 #define TC_BMR_TC0XC0S_Pos                  0                                              /**< (TC_BMR) External Clock Signal 0 Selection Position */
804 #define TC_BMR_TC0XC0S_Msk                  (_U_(0x3) << TC_BMR_TC0XC0S_Pos)               /**< (TC_BMR) External Clock Signal 0 Selection Mask */
805 #define TC_BMR_TC0XC0S(value)               (TC_BMR_TC0XC0S_Msk & ((value) << TC_BMR_TC0XC0S_Pos))
806 #define   TC_BMR_TC0XC0S_TCLK0_Val          _U_(0x0)                                       /**< (TC_BMR) Signal connected to XC0: TCLK0  */
807 #define   TC_BMR_TC0XC0S_TIOA1_Val          _U_(0x2)                                       /**< (TC_BMR) Signal connected to XC0: TIOA1  */
808 #define   TC_BMR_TC0XC0S_TIOA2_Val          _U_(0x3)                                       /**< (TC_BMR) Signal connected to XC0: TIOA2  */
809 #define TC_BMR_TC0XC0S_TCLK0                (TC_BMR_TC0XC0S_TCLK0_Val << TC_BMR_TC0XC0S_Pos)  /**< (TC_BMR) Signal connected to XC0: TCLK0 Position  */
810 #define TC_BMR_TC0XC0S_TIOA1                (TC_BMR_TC0XC0S_TIOA1_Val << TC_BMR_TC0XC0S_Pos)  /**< (TC_BMR) Signal connected to XC0: TIOA1 Position  */
811 #define TC_BMR_TC0XC0S_TIOA2                (TC_BMR_TC0XC0S_TIOA2_Val << TC_BMR_TC0XC0S_Pos)  /**< (TC_BMR) Signal connected to XC0: TIOA2 Position  */
812 #define TC_BMR_TC1XC1S_Pos                  2                                              /**< (TC_BMR) External Clock Signal 1 Selection Position */
813 #define TC_BMR_TC1XC1S_Msk                  (_U_(0x3) << TC_BMR_TC1XC1S_Pos)               /**< (TC_BMR) External Clock Signal 1 Selection Mask */
814 #define TC_BMR_TC1XC1S(value)               (TC_BMR_TC1XC1S_Msk & ((value) << TC_BMR_TC1XC1S_Pos))
815 #define   TC_BMR_TC1XC1S_TCLK1_Val          _U_(0x0)                                       /**< (TC_BMR) Signal connected to XC1: TCLK1  */
816 #define   TC_BMR_TC1XC1S_TIOA0_Val          _U_(0x2)                                       /**< (TC_BMR) Signal connected to XC1: TIOA0  */
817 #define   TC_BMR_TC1XC1S_TIOA2_Val          _U_(0x3)                                       /**< (TC_BMR) Signal connected to XC1: TIOA2  */
818 #define TC_BMR_TC1XC1S_TCLK1                (TC_BMR_TC1XC1S_TCLK1_Val << TC_BMR_TC1XC1S_Pos)  /**< (TC_BMR) Signal connected to XC1: TCLK1 Position  */
819 #define TC_BMR_TC1XC1S_TIOA0                (TC_BMR_TC1XC1S_TIOA0_Val << TC_BMR_TC1XC1S_Pos)  /**< (TC_BMR) Signal connected to XC1: TIOA0 Position  */
820 #define TC_BMR_TC1XC1S_TIOA2                (TC_BMR_TC1XC1S_TIOA2_Val << TC_BMR_TC1XC1S_Pos)  /**< (TC_BMR) Signal connected to XC1: TIOA2 Position  */
821 #define TC_BMR_TC2XC2S_Pos                  4                                              /**< (TC_BMR) External Clock Signal 2 Selection Position */
822 #define TC_BMR_TC2XC2S_Msk                  (_U_(0x3) << TC_BMR_TC2XC2S_Pos)               /**< (TC_BMR) External Clock Signal 2 Selection Mask */
823 #define TC_BMR_TC2XC2S(value)               (TC_BMR_TC2XC2S_Msk & ((value) << TC_BMR_TC2XC2S_Pos))
824 #define   TC_BMR_TC2XC2S_TCLK2_Val          _U_(0x0)                                       /**< (TC_BMR) Signal connected to XC2: TCLK2  */
825 #define   TC_BMR_TC2XC2S_TIOA0_Val          _U_(0x2)                                       /**< (TC_BMR) Signal connected to XC2: TIOA0  */
826 #define   TC_BMR_TC2XC2S_TIOA1_Val          _U_(0x3)                                       /**< (TC_BMR) Signal connected to XC2: TIOA1  */
827 #define TC_BMR_TC2XC2S_TCLK2                (TC_BMR_TC2XC2S_TCLK2_Val << TC_BMR_TC2XC2S_Pos)  /**< (TC_BMR) Signal connected to XC2: TCLK2 Position  */
828 #define TC_BMR_TC2XC2S_TIOA0                (TC_BMR_TC2XC2S_TIOA0_Val << TC_BMR_TC2XC2S_Pos)  /**< (TC_BMR) Signal connected to XC2: TIOA0 Position  */
829 #define TC_BMR_TC2XC2S_TIOA1                (TC_BMR_TC2XC2S_TIOA1_Val << TC_BMR_TC2XC2S_Pos)  /**< (TC_BMR) Signal connected to XC2: TIOA1 Position  */
830 #define TC_BMR_QDEN_Pos                     8                                              /**< (TC_BMR) Quadrature Decoder Enabled Position */
831 #define TC_BMR_QDEN_Msk                     (_U_(0x1) << TC_BMR_QDEN_Pos)                  /**< (TC_BMR) Quadrature Decoder Enabled Mask */
832 #define TC_BMR_QDEN                         TC_BMR_QDEN_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_BMR_QDEN_Msk instead */
833 #define TC_BMR_POSEN_Pos                    9                                              /**< (TC_BMR) Position Enabled Position */
834 #define TC_BMR_POSEN_Msk                    (_U_(0x1) << TC_BMR_POSEN_Pos)                 /**< (TC_BMR) Position Enabled Mask */
835 #define TC_BMR_POSEN                        TC_BMR_POSEN_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_BMR_POSEN_Msk instead */
836 #define TC_BMR_SPEEDEN_Pos                  10                                             /**< (TC_BMR) Speed Enabled Position */
837 #define TC_BMR_SPEEDEN_Msk                  (_U_(0x1) << TC_BMR_SPEEDEN_Pos)               /**< (TC_BMR) Speed Enabled Mask */
838 #define TC_BMR_SPEEDEN                      TC_BMR_SPEEDEN_Msk                             /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_BMR_SPEEDEN_Msk instead */
839 #define TC_BMR_QDTRANS_Pos                  11                                             /**< (TC_BMR) Quadrature Decoding Transparent Position */
840 #define TC_BMR_QDTRANS_Msk                  (_U_(0x1) << TC_BMR_QDTRANS_Pos)               /**< (TC_BMR) Quadrature Decoding Transparent Mask */
841 #define TC_BMR_QDTRANS                      TC_BMR_QDTRANS_Msk                             /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_BMR_QDTRANS_Msk instead */
842 #define TC_BMR_EDGPHA_Pos                   12                                             /**< (TC_BMR) Edge on PHA Count Mode Position */
843 #define TC_BMR_EDGPHA_Msk                   (_U_(0x1) << TC_BMR_EDGPHA_Pos)                /**< (TC_BMR) Edge on PHA Count Mode Mask */
844 #define TC_BMR_EDGPHA                       TC_BMR_EDGPHA_Msk                              /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_BMR_EDGPHA_Msk instead */
845 #define TC_BMR_INVA_Pos                     13                                             /**< (TC_BMR) Inverted PHA Position */
846 #define TC_BMR_INVA_Msk                     (_U_(0x1) << TC_BMR_INVA_Pos)                  /**< (TC_BMR) Inverted PHA Mask */
847 #define TC_BMR_INVA                         TC_BMR_INVA_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_BMR_INVA_Msk instead */
848 #define TC_BMR_INVB_Pos                     14                                             /**< (TC_BMR) Inverted PHB Position */
849 #define TC_BMR_INVB_Msk                     (_U_(0x1) << TC_BMR_INVB_Pos)                  /**< (TC_BMR) Inverted PHB Mask */
850 #define TC_BMR_INVB                         TC_BMR_INVB_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_BMR_INVB_Msk instead */
851 #define TC_BMR_INVIDX_Pos                   15                                             /**< (TC_BMR) Inverted Index Position */
852 #define TC_BMR_INVIDX_Msk                   (_U_(0x1) << TC_BMR_INVIDX_Pos)                /**< (TC_BMR) Inverted Index Mask */
853 #define TC_BMR_INVIDX                       TC_BMR_INVIDX_Msk                              /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_BMR_INVIDX_Msk instead */
854 #define TC_BMR_SWAP_Pos                     16                                             /**< (TC_BMR) Swap PHA and PHB Position */
855 #define TC_BMR_SWAP_Msk                     (_U_(0x1) << TC_BMR_SWAP_Pos)                  /**< (TC_BMR) Swap PHA and PHB Mask */
856 #define TC_BMR_SWAP                         TC_BMR_SWAP_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_BMR_SWAP_Msk instead */
857 #define TC_BMR_IDXPHB_Pos                   17                                             /**< (TC_BMR) Index Pin is PHB Pin Position */
858 #define TC_BMR_IDXPHB_Msk                   (_U_(0x1) << TC_BMR_IDXPHB_Pos)                /**< (TC_BMR) Index Pin is PHB Pin Mask */
859 #define TC_BMR_IDXPHB                       TC_BMR_IDXPHB_Msk                              /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_BMR_IDXPHB_Msk instead */
860 #define TC_BMR_AUTOC_Pos                    18                                             /**< (TC_BMR) AutoCorrection of missing pulses Position */
861 #define TC_BMR_AUTOC_Msk                    (_U_(0x1) << TC_BMR_AUTOC_Pos)                 /**< (TC_BMR) AutoCorrection of missing pulses Mask */
862 #define TC_BMR_AUTOC                        TC_BMR_AUTOC_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_BMR_AUTOC_Msk instead */
863 #define TC_BMR_MAXFILT_Pos                  20                                             /**< (TC_BMR) Maximum Filter Position */
864 #define TC_BMR_MAXFILT_Msk                  (_U_(0x3F) << TC_BMR_MAXFILT_Pos)              /**< (TC_BMR) Maximum Filter Mask */
865 #define TC_BMR_MAXFILT(value)               (TC_BMR_MAXFILT_Msk & ((value) << TC_BMR_MAXFILT_Pos))
866 #define TC_BMR_MAXCMP_Pos                   26                                             /**< (TC_BMR) Maximum Consecutive Missing Pulses Position */
867 #define TC_BMR_MAXCMP_Msk                   (_U_(0xF) << TC_BMR_MAXCMP_Pos)                /**< (TC_BMR) Maximum Consecutive Missing Pulses Mask */
868 #define TC_BMR_MAXCMP(value)                (TC_BMR_MAXCMP_Msk & ((value) << TC_BMR_MAXCMP_Pos))
869 #define TC_BMR_MASK                         _U_(0x3FF7FF3F)                                /**< \deprecated (TC_BMR) Register MASK  (Use TC_BMR_Msk instead)  */
870 #define TC_BMR_Msk                          _U_(0x3FF7FF3F)                                /**< (TC_BMR) Register Mask  */
871 
872 
873 /* -------- TC_QIER : (TC Offset: 0xc8) (/W 32) QDEC Interrupt Enable Register -------- */
874 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
875 #if COMPONENT_TYPEDEF_STYLE == 'N'
876 typedef union {
877   struct {
878     uint32_t IDX:1;                     /**< bit:      0  Index                                    */
879     uint32_t DIRCHG:1;                  /**< bit:      1  Direction Change                         */
880     uint32_t QERR:1;                    /**< bit:      2  Quadrature Error                         */
881     uint32_t MPE:1;                     /**< bit:      3  Consecutive Missing Pulse Error          */
882     uint32_t :28;                       /**< bit:  4..31  Reserved */
883   } bit;                                /**< Structure used for bit  access */
884   uint32_t reg;                         /**< Type used for register access */
885 } TC_QIER_Type;
886 #endif
887 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
888 
889 #define TC_QIER_OFFSET                      (0xC8)                                        /**<  (TC_QIER) QDEC Interrupt Enable Register  Offset */
890 
891 #define TC_QIER_IDX_Pos                     0                                              /**< (TC_QIER) Index Position */
892 #define TC_QIER_IDX_Msk                     (_U_(0x1) << TC_QIER_IDX_Pos)                  /**< (TC_QIER) Index Mask */
893 #define TC_QIER_IDX                         TC_QIER_IDX_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QIER_IDX_Msk instead */
894 #define TC_QIER_DIRCHG_Pos                  1                                              /**< (TC_QIER) Direction Change Position */
895 #define TC_QIER_DIRCHG_Msk                  (_U_(0x1) << TC_QIER_DIRCHG_Pos)               /**< (TC_QIER) Direction Change Mask */
896 #define TC_QIER_DIRCHG                      TC_QIER_DIRCHG_Msk                             /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QIER_DIRCHG_Msk instead */
897 #define TC_QIER_QERR_Pos                    2                                              /**< (TC_QIER) Quadrature Error Position */
898 #define TC_QIER_QERR_Msk                    (_U_(0x1) << TC_QIER_QERR_Pos)                 /**< (TC_QIER) Quadrature Error Mask */
899 #define TC_QIER_QERR                        TC_QIER_QERR_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QIER_QERR_Msk instead */
900 #define TC_QIER_MPE_Pos                     3                                              /**< (TC_QIER) Consecutive Missing Pulse Error Position */
901 #define TC_QIER_MPE_Msk                     (_U_(0x1) << TC_QIER_MPE_Pos)                  /**< (TC_QIER) Consecutive Missing Pulse Error Mask */
902 #define TC_QIER_MPE                         TC_QIER_MPE_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QIER_MPE_Msk instead */
903 #define TC_QIER_MASK                        _U_(0x0F)                                      /**< \deprecated (TC_QIER) Register MASK  (Use TC_QIER_Msk instead)  */
904 #define TC_QIER_Msk                         _U_(0x0F)                                      /**< (TC_QIER) Register Mask  */
905 
906 
907 /* -------- TC_QIDR : (TC Offset: 0xcc) (/W 32) QDEC Interrupt Disable Register -------- */
908 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
909 #if COMPONENT_TYPEDEF_STYLE == 'N'
910 typedef union {
911   struct {
912     uint32_t IDX:1;                     /**< bit:      0  Index                                    */
913     uint32_t DIRCHG:1;                  /**< bit:      1  Direction Change                         */
914     uint32_t QERR:1;                    /**< bit:      2  Quadrature Error                         */
915     uint32_t MPE:1;                     /**< bit:      3  Consecutive Missing Pulse Error          */
916     uint32_t :28;                       /**< bit:  4..31  Reserved */
917   } bit;                                /**< Structure used for bit  access */
918   uint32_t reg;                         /**< Type used for register access */
919 } TC_QIDR_Type;
920 #endif
921 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
922 
923 #define TC_QIDR_OFFSET                      (0xCC)                                        /**<  (TC_QIDR) QDEC Interrupt Disable Register  Offset */
924 
925 #define TC_QIDR_IDX_Pos                     0                                              /**< (TC_QIDR) Index Position */
926 #define TC_QIDR_IDX_Msk                     (_U_(0x1) << TC_QIDR_IDX_Pos)                  /**< (TC_QIDR) Index Mask */
927 #define TC_QIDR_IDX                         TC_QIDR_IDX_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QIDR_IDX_Msk instead */
928 #define TC_QIDR_DIRCHG_Pos                  1                                              /**< (TC_QIDR) Direction Change Position */
929 #define TC_QIDR_DIRCHG_Msk                  (_U_(0x1) << TC_QIDR_DIRCHG_Pos)               /**< (TC_QIDR) Direction Change Mask */
930 #define TC_QIDR_DIRCHG                      TC_QIDR_DIRCHG_Msk                             /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QIDR_DIRCHG_Msk instead */
931 #define TC_QIDR_QERR_Pos                    2                                              /**< (TC_QIDR) Quadrature Error Position */
932 #define TC_QIDR_QERR_Msk                    (_U_(0x1) << TC_QIDR_QERR_Pos)                 /**< (TC_QIDR) Quadrature Error Mask */
933 #define TC_QIDR_QERR                        TC_QIDR_QERR_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QIDR_QERR_Msk instead */
934 #define TC_QIDR_MPE_Pos                     3                                              /**< (TC_QIDR) Consecutive Missing Pulse Error Position */
935 #define TC_QIDR_MPE_Msk                     (_U_(0x1) << TC_QIDR_MPE_Pos)                  /**< (TC_QIDR) Consecutive Missing Pulse Error Mask */
936 #define TC_QIDR_MPE                         TC_QIDR_MPE_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QIDR_MPE_Msk instead */
937 #define TC_QIDR_MASK                        _U_(0x0F)                                      /**< \deprecated (TC_QIDR) Register MASK  (Use TC_QIDR_Msk instead)  */
938 #define TC_QIDR_Msk                         _U_(0x0F)                                      /**< (TC_QIDR) Register Mask  */
939 
940 
941 /* -------- TC_QIMR : (TC Offset: 0xd0) (R/ 32) QDEC Interrupt Mask Register -------- */
942 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
943 #if COMPONENT_TYPEDEF_STYLE == 'N'
944 typedef union {
945   struct {
946     uint32_t IDX:1;                     /**< bit:      0  Index                                    */
947     uint32_t DIRCHG:1;                  /**< bit:      1  Direction Change                         */
948     uint32_t QERR:1;                    /**< bit:      2  Quadrature Error                         */
949     uint32_t MPE:1;                     /**< bit:      3  Consecutive Missing Pulse Error          */
950     uint32_t :28;                       /**< bit:  4..31  Reserved */
951   } bit;                                /**< Structure used for bit  access */
952   uint32_t reg;                         /**< Type used for register access */
953 } TC_QIMR_Type;
954 #endif
955 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
956 
957 #define TC_QIMR_OFFSET                      (0xD0)                                        /**<  (TC_QIMR) QDEC Interrupt Mask Register  Offset */
958 
959 #define TC_QIMR_IDX_Pos                     0                                              /**< (TC_QIMR) Index Position */
960 #define TC_QIMR_IDX_Msk                     (_U_(0x1) << TC_QIMR_IDX_Pos)                  /**< (TC_QIMR) Index Mask */
961 #define TC_QIMR_IDX                         TC_QIMR_IDX_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QIMR_IDX_Msk instead */
962 #define TC_QIMR_DIRCHG_Pos                  1                                              /**< (TC_QIMR) Direction Change Position */
963 #define TC_QIMR_DIRCHG_Msk                  (_U_(0x1) << TC_QIMR_DIRCHG_Pos)               /**< (TC_QIMR) Direction Change Mask */
964 #define TC_QIMR_DIRCHG                      TC_QIMR_DIRCHG_Msk                             /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QIMR_DIRCHG_Msk instead */
965 #define TC_QIMR_QERR_Pos                    2                                              /**< (TC_QIMR) Quadrature Error Position */
966 #define TC_QIMR_QERR_Msk                    (_U_(0x1) << TC_QIMR_QERR_Pos)                 /**< (TC_QIMR) Quadrature Error Mask */
967 #define TC_QIMR_QERR                        TC_QIMR_QERR_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QIMR_QERR_Msk instead */
968 #define TC_QIMR_MPE_Pos                     3                                              /**< (TC_QIMR) Consecutive Missing Pulse Error Position */
969 #define TC_QIMR_MPE_Msk                     (_U_(0x1) << TC_QIMR_MPE_Pos)                  /**< (TC_QIMR) Consecutive Missing Pulse Error Mask */
970 #define TC_QIMR_MPE                         TC_QIMR_MPE_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QIMR_MPE_Msk instead */
971 #define TC_QIMR_MASK                        _U_(0x0F)                                      /**< \deprecated (TC_QIMR) Register MASK  (Use TC_QIMR_Msk instead)  */
972 #define TC_QIMR_Msk                         _U_(0x0F)                                      /**< (TC_QIMR) Register Mask  */
973 
974 
975 /* -------- TC_QISR : (TC Offset: 0xd4) (R/ 32) QDEC Interrupt Status Register -------- */
976 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
977 #if COMPONENT_TYPEDEF_STYLE == 'N'
978 typedef union {
979   struct {
980     uint32_t IDX:1;                     /**< bit:      0  Index                                    */
981     uint32_t DIRCHG:1;                  /**< bit:      1  Direction Change                         */
982     uint32_t QERR:1;                    /**< bit:      2  Quadrature Error                         */
983     uint32_t MPE:1;                     /**< bit:      3  Consecutive Missing Pulse Error          */
984     uint32_t :4;                        /**< bit:   4..7  Reserved */
985     uint32_t DIR:1;                     /**< bit:      8  Direction                                */
986     uint32_t :23;                       /**< bit:  9..31  Reserved */
987   } bit;                                /**< Structure used for bit  access */
988   uint32_t reg;                         /**< Type used for register access */
989 } TC_QISR_Type;
990 #endif
991 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
992 
993 #define TC_QISR_OFFSET                      (0xD4)                                        /**<  (TC_QISR) QDEC Interrupt Status Register  Offset */
994 
995 #define TC_QISR_IDX_Pos                     0                                              /**< (TC_QISR) Index Position */
996 #define TC_QISR_IDX_Msk                     (_U_(0x1) << TC_QISR_IDX_Pos)                  /**< (TC_QISR) Index Mask */
997 #define TC_QISR_IDX                         TC_QISR_IDX_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QISR_IDX_Msk instead */
998 #define TC_QISR_DIRCHG_Pos                  1                                              /**< (TC_QISR) Direction Change Position */
999 #define TC_QISR_DIRCHG_Msk                  (_U_(0x1) << TC_QISR_DIRCHG_Pos)               /**< (TC_QISR) Direction Change Mask */
1000 #define TC_QISR_DIRCHG                      TC_QISR_DIRCHG_Msk                             /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QISR_DIRCHG_Msk instead */
1001 #define TC_QISR_QERR_Pos                    2                                              /**< (TC_QISR) Quadrature Error Position */
1002 #define TC_QISR_QERR_Msk                    (_U_(0x1) << TC_QISR_QERR_Pos)                 /**< (TC_QISR) Quadrature Error Mask */
1003 #define TC_QISR_QERR                        TC_QISR_QERR_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QISR_QERR_Msk instead */
1004 #define TC_QISR_MPE_Pos                     3                                              /**< (TC_QISR) Consecutive Missing Pulse Error Position */
1005 #define TC_QISR_MPE_Msk                     (_U_(0x1) << TC_QISR_MPE_Pos)                  /**< (TC_QISR) Consecutive Missing Pulse Error Mask */
1006 #define TC_QISR_MPE                         TC_QISR_MPE_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QISR_MPE_Msk instead */
1007 #define TC_QISR_DIR_Pos                     8                                              /**< (TC_QISR) Direction Position */
1008 #define TC_QISR_DIR_Msk                     (_U_(0x1) << TC_QISR_DIR_Pos)                  /**< (TC_QISR) Direction Mask */
1009 #define TC_QISR_DIR                         TC_QISR_DIR_Msk                                /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_QISR_DIR_Msk instead */
1010 #define TC_QISR_MASK                        _U_(0x10F)                                     /**< \deprecated (TC_QISR) Register MASK  (Use TC_QISR_Msk instead)  */
1011 #define TC_QISR_Msk                         _U_(0x10F)                                     /**< (TC_QISR) Register Mask  */
1012 
1013 
1014 /* -------- TC_FMR : (TC Offset: 0xd8) (R/W 32) Fault Mode Register -------- */
1015 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
1016 #if COMPONENT_TYPEDEF_STYLE == 'N'
1017 typedef union {
1018   struct {
1019     uint32_t ENCF0:1;                   /**< bit:      0  Enable Compare Fault Channel 0           */
1020     uint32_t ENCF1:1;                   /**< bit:      1  Enable Compare Fault Channel 1           */
1021     uint32_t :30;                       /**< bit:  2..31  Reserved */
1022   } bit;                                /**< Structure used for bit  access */
1023   struct {
1024     uint32_t ENCF:2;                    /**< bit:   0..1  Enable Compare Fault Channel x           */
1025     uint32_t :30;                       /**< bit:  2..31 Reserved */
1026   } vec;                                /**< Structure used for vec  access  */
1027   uint32_t reg;                         /**< Type used for register access */
1028 } TC_FMR_Type;
1029 #endif
1030 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
1031 
1032 #define TC_FMR_OFFSET                       (0xD8)                                        /**<  (TC_FMR) Fault Mode Register  Offset */
1033 
1034 #define TC_FMR_ENCF0_Pos                    0                                              /**< (TC_FMR) Enable Compare Fault Channel 0 Position */
1035 #define TC_FMR_ENCF0_Msk                    (_U_(0x1) << TC_FMR_ENCF0_Pos)                 /**< (TC_FMR) Enable Compare Fault Channel 0 Mask */
1036 #define TC_FMR_ENCF0                        TC_FMR_ENCF0_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_FMR_ENCF0_Msk instead */
1037 #define TC_FMR_ENCF1_Pos                    1                                              /**< (TC_FMR) Enable Compare Fault Channel 1 Position */
1038 #define TC_FMR_ENCF1_Msk                    (_U_(0x1) << TC_FMR_ENCF1_Pos)                 /**< (TC_FMR) Enable Compare Fault Channel 1 Mask */
1039 #define TC_FMR_ENCF1                        TC_FMR_ENCF1_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_FMR_ENCF1_Msk instead */
1040 #define TC_FMR_MASK                         _U_(0x03)                                      /**< \deprecated (TC_FMR) Register MASK  (Use TC_FMR_Msk instead)  */
1041 #define TC_FMR_Msk                          _U_(0x03)                                      /**< (TC_FMR) Register Mask  */
1042 
1043 #define TC_FMR_ENCF_Pos                     0                                              /**< (TC_FMR Position) Enable Compare Fault Channel x */
1044 #define TC_FMR_ENCF_Msk                     (_U_(0x3) << TC_FMR_ENCF_Pos)                  /**< (TC_FMR Mask) ENCF */
1045 #define TC_FMR_ENCF(value)                  (TC_FMR_ENCF_Msk & ((value) << TC_FMR_ENCF_Pos))
1046 
1047 /* -------- TC_WPMR : (TC Offset: 0xe4) (R/W 32) Write Protection Mode Register -------- */
1048 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
1049 #if COMPONENT_TYPEDEF_STYLE == 'N'
1050 typedef union {
1051   struct {
1052     uint32_t WPEN:1;                    /**< bit:      0  Write Protection Enable                  */
1053     uint32_t :7;                        /**< bit:   1..7  Reserved */
1054     uint32_t WPKEY:24;                  /**< bit:  8..31  Write Protection Key                     */
1055   } bit;                                /**< Structure used for bit  access */
1056   uint32_t reg;                         /**< Type used for register access */
1057 } TC_WPMR_Type;
1058 #endif
1059 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
1060 
1061 #define TC_WPMR_OFFSET                      (0xE4)                                        /**<  (TC_WPMR) Write Protection Mode Register  Offset */
1062 
1063 #define TC_WPMR_WPEN_Pos                    0                                              /**< (TC_WPMR) Write Protection Enable Position */
1064 #define TC_WPMR_WPEN_Msk                    (_U_(0x1) << TC_WPMR_WPEN_Pos)                 /**< (TC_WPMR) Write Protection Enable Mask */
1065 #define TC_WPMR_WPEN                        TC_WPMR_WPEN_Msk                               /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_WPMR_WPEN_Msk instead */
1066 #define TC_WPMR_WPKEY_Pos                   8                                              /**< (TC_WPMR) Write Protection Key Position */
1067 #define TC_WPMR_WPKEY_Msk                   (_U_(0xFFFFFF) << TC_WPMR_WPKEY_Pos)           /**< (TC_WPMR) Write Protection Key Mask */
1068 #define TC_WPMR_WPKEY(value)                (TC_WPMR_WPKEY_Msk & ((value) << TC_WPMR_WPKEY_Pos))
1069 #define   TC_WPMR_WPKEY_PASSWD_Val          _U_(0x54494D)                                  /**< (TC_WPMR) Writing any other value in this field aborts the write operation of the WPEN bit.Always reads as 0.  */
1070 #define TC_WPMR_WPKEY_PASSWD                (TC_WPMR_WPKEY_PASSWD_Val << TC_WPMR_WPKEY_Pos)  /**< (TC_WPMR) Writing any other value in this field aborts the write operation of the WPEN bit.Always reads as 0. Position  */
1071 #define TC_WPMR_MASK                        _U_(0xFFFFFF01)                                /**< \deprecated (TC_WPMR) Register MASK  (Use TC_WPMR_Msk instead)  */
1072 #define TC_WPMR_Msk                         _U_(0xFFFFFF01)                                /**< (TC_WPMR) Register Mask  */
1073 
1074 
1075 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
1076 #if COMPONENT_TYPEDEF_STYLE == 'R'
1077 /** \brief TC_CHANNEL hardware registers */
1078 typedef struct {
1079   __O  uint32_t TC_CCR;         /**< (TC_CHANNEL Offset: 0x00) Channel Control Register (channel = 0) */
1080   __IO uint32_t TC_CMR;         /**< (TC_CHANNEL Offset: 0x04) Channel Mode Register (channel = 0) */
1081   __IO uint32_t TC_SMMR;        /**< (TC_CHANNEL Offset: 0x08) Stepper Motor Mode Register (channel = 0) */
1082   __I  uint32_t TC_RAB;         /**< (TC_CHANNEL Offset: 0x0C) Register AB (channel = 0) */
1083   __I  uint32_t TC_CV;          /**< (TC_CHANNEL Offset: 0x10) Counter Value (channel = 0) */
1084   __IO uint32_t TC_RA;          /**< (TC_CHANNEL Offset: 0x14) Register A (channel = 0) */
1085   __IO uint32_t TC_RB;          /**< (TC_CHANNEL Offset: 0x18) Register B (channel = 0) */
1086   __IO uint32_t TC_RC;          /**< (TC_CHANNEL Offset: 0x1C) Register C (channel = 0) */
1087   __I  uint32_t TC_SR;          /**< (TC_CHANNEL Offset: 0x20) Status Register (channel = 0) */
1088   __O  uint32_t TC_IER;         /**< (TC_CHANNEL Offset: 0x24) Interrupt Enable Register (channel = 0) */
1089   __O  uint32_t TC_IDR;         /**< (TC_CHANNEL Offset: 0x28) Interrupt Disable Register (channel = 0) */
1090   __I  uint32_t TC_IMR;         /**< (TC_CHANNEL Offset: 0x2C) Interrupt Mask Register (channel = 0) */
1091   __IO uint32_t TC_EMR;         /**< (TC_CHANNEL Offset: 0x30) Extended Mode Register (channel = 0) */
1092   __I  uint8_t                        Reserved1[12];
1093 } TcChannel;
1094 
1095 #define TCCHANNEL_NUMBER 3
1096 /** \brief TC hardware registers */
1097 typedef struct {
1098        TcChannel TcChannel[TCCHANNEL_NUMBER]; /**< Offset: 0x00 Channel Control Register (channel = 0) */
1099   __O  uint32_t TC_BCR;         /**< (TC Offset: 0xC0) Block Control Register */
1100   __IO uint32_t TC_BMR;         /**< (TC Offset: 0xC4) Block Mode Register */
1101   __O  uint32_t TC_QIER;        /**< (TC Offset: 0xC8) QDEC Interrupt Enable Register */
1102   __O  uint32_t TC_QIDR;        /**< (TC Offset: 0xCC) QDEC Interrupt Disable Register */
1103   __I  uint32_t TC_QIMR;        /**< (TC Offset: 0xD0) QDEC Interrupt Mask Register */
1104   __I  uint32_t TC_QISR;        /**< (TC Offset: 0xD4) QDEC Interrupt Status Register */
1105   __IO uint32_t TC_FMR;         /**< (TC Offset: 0xD8) Fault Mode Register */
1106   __I  uint8_t                        Reserved1[8];
1107   __IO uint32_t TC_WPMR;        /**< (TC Offset: 0xE4) Write Protection Mode Register */
1108 } Tc;
1109 
1110 #elif COMPONENT_TYPEDEF_STYLE == 'N'
1111 /** \brief TC_CHANNEL hardware registers */
1112 typedef struct {
1113   __O  TC_CCR_Type                    TC_CCR;         /**< Offset: 0x00 ( /W  32) Channel Control Register (channel = 0) */
1114   __IO TC_CMR_Type                    TC_CMR;         /**< Offset: 0x04 (R/W  32) Channel Mode Register (channel = 0) */
1115   __IO TC_SMMR_Type                   TC_SMMR;        /**< Offset: 0x08 (R/W  32) Stepper Motor Mode Register (channel = 0) */
1116   __I  TC_RAB_Type                    TC_RAB;         /**< Offset: 0x0C (R/   32) Register AB (channel = 0) */
1117   __I  TC_CV_Type                     TC_CV;          /**< Offset: 0x10 (R/   32) Counter Value (channel = 0) */
1118   __IO TC_RA_Type                     TC_RA;          /**< Offset: 0x14 (R/W  32) Register A (channel = 0) */
1119   __IO TC_RB_Type                     TC_RB;          /**< Offset: 0x18 (R/W  32) Register B (channel = 0) */
1120   __IO TC_RC_Type                     TC_RC;          /**< Offset: 0x1C (R/W  32) Register C (channel = 0) */
1121   __I  TC_SR_Type                     TC_SR;          /**< Offset: 0x20 (R/   32) Status Register (channel = 0) */
1122   __O  TC_IER_Type                    TC_IER;         /**< Offset: 0x24 ( /W  32) Interrupt Enable Register (channel = 0) */
1123   __O  TC_IDR_Type                    TC_IDR;         /**< Offset: 0x28 ( /W  32) Interrupt Disable Register (channel = 0) */
1124   __I  TC_IMR_Type                    TC_IMR;         /**< Offset: 0x2C (R/   32) Interrupt Mask Register (channel = 0) */
1125   __IO TC_EMR_Type                    TC_EMR;         /**< Offset: 0x30 (R/W  32) Extended Mode Register (channel = 0) */
1126   __I  uint8_t                        Reserved1[12];
1127 } TcChannel;
1128 
1129 /** \brief TC hardware registers */
1130 typedef struct {
1131        TcChannel                      TC_CHANNEL[3];   /**< Offset: 0x00 Channel Control Register (channel = 0) */
1132   __O  TC_BCR_Type                    TC_BCR;         /**< Offset: 0xC0 ( /W  32) Block Control Register */
1133   __IO TC_BMR_Type                    TC_BMR;         /**< Offset: 0xC4 (R/W  32) Block Mode Register */
1134   __O  TC_QIER_Type                   TC_QIER;        /**< Offset: 0xC8 ( /W  32) QDEC Interrupt Enable Register */
1135   __O  TC_QIDR_Type                   TC_QIDR;        /**< Offset: 0xCC ( /W  32) QDEC Interrupt Disable Register */
1136   __I  TC_QIMR_Type                   TC_QIMR;        /**< Offset: 0xD0 (R/   32) QDEC Interrupt Mask Register */
1137   __I  TC_QISR_Type                   TC_QISR;        /**< Offset: 0xD4 (R/   32) QDEC Interrupt Status Register */
1138   __IO TC_FMR_Type                    TC_FMR;         /**< Offset: 0xD8 (R/W  32) Fault Mode Register */
1139   __I  uint8_t                        Reserved1[8];
1140   __IO TC_WPMR_Type                   TC_WPMR;        /**< Offset: 0xE4 (R/W  32) Write Protection Mode Register */
1141 } Tc;
1142 
1143 #else /* COMPONENT_TYPEDEF_STYLE */
1144 #error Unknown component typedef style
1145 #endif /* COMPONENT_TYPEDEF_STYLE */
1146 
1147 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
1148 /** @}  end of Timer Counter */
1149 
1150 #if !(defined(DO_NOT_USE_DEPRECATED_MACROS))
1151 #include "deprecated/tc.h"
1152 #endif /* DO_NOT_USE_DEPRECATED_MACROS */
1153 #endif /* _SAME70_TC_COMPONENT_H_ */
1154