SAME54P20A Test Project
ccl.h
Go to the documentation of this file.
1 
30 #ifndef _SAME54_CCL_COMPONENT_
31 #define _SAME54_CCL_COMPONENT_
32 
33 /* ========================================================================== */
35 /* ========================================================================== */
38 
39 #define CCL_U2225
40 #define REV_CCL 0x110
41 
42 /* -------- CCL_CTRL : (CCL Offset: 0x0) (R/W 8) Control -------- */
43 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
44 typedef union {
45  struct {
46  uint8_t SWRST:1;
47  uint8_t ENABLE:1;
48  uint8_t :4;
49  uint8_t RUNSTDBY:1;
50  uint8_t :1;
51  } bit;
52  uint8_t reg;
54 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
55 
56 #define CCL_CTRL_OFFSET 0x0
57 #define CCL_CTRL_RESETVALUE _U_(0x00)
59 #define CCL_CTRL_SWRST_Pos 0
60 #define CCL_CTRL_SWRST (_U_(0x1) << CCL_CTRL_SWRST_Pos)
61 #define CCL_CTRL_ENABLE_Pos 1
62 #define CCL_CTRL_ENABLE (_U_(0x1) << CCL_CTRL_ENABLE_Pos)
63 #define CCL_CTRL_RUNSTDBY_Pos 6
64 #define CCL_CTRL_RUNSTDBY (_U_(0x1) << CCL_CTRL_RUNSTDBY_Pos)
65 #define CCL_CTRL_MASK _U_(0x43)
67 /* -------- CCL_SEQCTRL : (CCL Offset: 0x4) (R/W 8) SEQ Control x -------- */
68 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
69 typedef union {
70  struct {
71  uint8_t SEQSEL:4;
72  uint8_t :4;
73  } bit;
74  uint8_t reg;
76 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
77 
78 #define CCL_SEQCTRL_OFFSET 0x4
79 #define CCL_SEQCTRL_RESETVALUE _U_(0x00)
81 #define CCL_SEQCTRL_SEQSEL_Pos 0
82 #define CCL_SEQCTRL_SEQSEL_Msk (_U_(0xF) << CCL_SEQCTRL_SEQSEL_Pos)
83 #define CCL_SEQCTRL_SEQSEL(value) (CCL_SEQCTRL_SEQSEL_Msk & ((value) << CCL_SEQCTRL_SEQSEL_Pos))
84 #define CCL_SEQCTRL_SEQSEL_DISABLE_Val _U_(0x0)
85 #define CCL_SEQCTRL_SEQSEL_DFF_Val _U_(0x1)
86 #define CCL_SEQCTRL_SEQSEL_JK_Val _U_(0x2)
87 #define CCL_SEQCTRL_SEQSEL_LATCH_Val _U_(0x3)
88 #define CCL_SEQCTRL_SEQSEL_RS_Val _U_(0x4)
89 #define CCL_SEQCTRL_SEQSEL_DISABLE (CCL_SEQCTRL_SEQSEL_DISABLE_Val << CCL_SEQCTRL_SEQSEL_Pos)
90 #define CCL_SEQCTRL_SEQSEL_DFF (CCL_SEQCTRL_SEQSEL_DFF_Val << CCL_SEQCTRL_SEQSEL_Pos)
91 #define CCL_SEQCTRL_SEQSEL_JK (CCL_SEQCTRL_SEQSEL_JK_Val << CCL_SEQCTRL_SEQSEL_Pos)
92 #define CCL_SEQCTRL_SEQSEL_LATCH (CCL_SEQCTRL_SEQSEL_LATCH_Val << CCL_SEQCTRL_SEQSEL_Pos)
93 #define CCL_SEQCTRL_SEQSEL_RS (CCL_SEQCTRL_SEQSEL_RS_Val << CCL_SEQCTRL_SEQSEL_Pos)
94 #define CCL_SEQCTRL_MASK _U_(0x0F)
96 /* -------- CCL_LUTCTRL : (CCL Offset: 0x8) (R/W 32) LUT Control x -------- */
97 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
98 typedef union {
99  struct {
100  uint32_t :1;
101  uint32_t ENABLE:1;
102  uint32_t :2;
103  uint32_t FILTSEL:2;
104  uint32_t :1;
105  uint32_t EDGESEL:1;
106  uint32_t INSEL0:4;
107  uint32_t INSEL1:4;
108  uint32_t INSEL2:4;
109  uint32_t INVEI:1;
110  uint32_t LUTEI:1;
111  uint32_t LUTEO:1;
112  uint32_t :1;
113  uint32_t TRUTH:8;
114  } bit;
115  uint32_t reg;
117 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
118 
119 #define CCL_LUTCTRL_OFFSET 0x8
120 #define CCL_LUTCTRL_RESETVALUE _U_(0x00000000)
122 #define CCL_LUTCTRL_ENABLE_Pos 1
123 #define CCL_LUTCTRL_ENABLE (_U_(0x1) << CCL_LUTCTRL_ENABLE_Pos)
124 #define CCL_LUTCTRL_FILTSEL_Pos 4
125 #define CCL_LUTCTRL_FILTSEL_Msk (_U_(0x3) << CCL_LUTCTRL_FILTSEL_Pos)
126 #define CCL_LUTCTRL_FILTSEL(value) (CCL_LUTCTRL_FILTSEL_Msk & ((value) << CCL_LUTCTRL_FILTSEL_Pos))
127 #define CCL_LUTCTRL_FILTSEL_DISABLE_Val _U_(0x0)
128 #define CCL_LUTCTRL_FILTSEL_SYNCH_Val _U_(0x1)
129 #define CCL_LUTCTRL_FILTSEL_FILTER_Val _U_(0x2)
130 #define CCL_LUTCTRL_FILTSEL_DISABLE (CCL_LUTCTRL_FILTSEL_DISABLE_Val << CCL_LUTCTRL_FILTSEL_Pos)
131 #define CCL_LUTCTRL_FILTSEL_SYNCH (CCL_LUTCTRL_FILTSEL_SYNCH_Val << CCL_LUTCTRL_FILTSEL_Pos)
132 #define CCL_LUTCTRL_FILTSEL_FILTER (CCL_LUTCTRL_FILTSEL_FILTER_Val << CCL_LUTCTRL_FILTSEL_Pos)
133 #define CCL_LUTCTRL_EDGESEL_Pos 7
134 #define CCL_LUTCTRL_EDGESEL (_U_(0x1) << CCL_LUTCTRL_EDGESEL_Pos)
135 #define CCL_LUTCTRL_INSEL0_Pos 8
136 #define CCL_LUTCTRL_INSEL0_Msk (_U_(0xF) << CCL_LUTCTRL_INSEL0_Pos)
137 #define CCL_LUTCTRL_INSEL0(value) (CCL_LUTCTRL_INSEL0_Msk & ((value) << CCL_LUTCTRL_INSEL0_Pos))
138 #define CCL_LUTCTRL_INSEL0_MASK_Val _U_(0x0)
139 #define CCL_LUTCTRL_INSEL0_FEEDBACK_Val _U_(0x1)
140 #define CCL_LUTCTRL_INSEL0_LINK_Val _U_(0x2)
141 #define CCL_LUTCTRL_INSEL0_EVENT_Val _U_(0x3)
142 #define CCL_LUTCTRL_INSEL0_IO_Val _U_(0x4)
143 #define CCL_LUTCTRL_INSEL0_AC_Val _U_(0x5)
144 #define CCL_LUTCTRL_INSEL0_TC_Val _U_(0x6)
145 #define CCL_LUTCTRL_INSEL0_ALTTC_Val _U_(0x7)
146 #define CCL_LUTCTRL_INSEL0_TCC_Val _U_(0x8)
147 #define CCL_LUTCTRL_INSEL0_SERCOM_Val _U_(0x9)
148 #define CCL_LUTCTRL_INSEL0_MASK (CCL_LUTCTRL_INSEL0_MASK_Val << CCL_LUTCTRL_INSEL0_Pos)
149 #define CCL_LUTCTRL_INSEL0_FEEDBACK (CCL_LUTCTRL_INSEL0_FEEDBACK_Val << CCL_LUTCTRL_INSEL0_Pos)
150 #define CCL_LUTCTRL_INSEL0_LINK (CCL_LUTCTRL_INSEL0_LINK_Val << CCL_LUTCTRL_INSEL0_Pos)
151 #define CCL_LUTCTRL_INSEL0_EVENT (CCL_LUTCTRL_INSEL0_EVENT_Val << CCL_LUTCTRL_INSEL0_Pos)
152 #define CCL_LUTCTRL_INSEL0_IO (CCL_LUTCTRL_INSEL0_IO_Val << CCL_LUTCTRL_INSEL0_Pos)
153 #define CCL_LUTCTRL_INSEL0_AC (CCL_LUTCTRL_INSEL0_AC_Val << CCL_LUTCTRL_INSEL0_Pos)
154 #define CCL_LUTCTRL_INSEL0_TC (CCL_LUTCTRL_INSEL0_TC_Val << CCL_LUTCTRL_INSEL0_Pos)
155 #define CCL_LUTCTRL_INSEL0_ALTTC (CCL_LUTCTRL_INSEL0_ALTTC_Val << CCL_LUTCTRL_INSEL0_Pos)
156 #define CCL_LUTCTRL_INSEL0_TCC (CCL_LUTCTRL_INSEL0_TCC_Val << CCL_LUTCTRL_INSEL0_Pos)
157 #define CCL_LUTCTRL_INSEL0_SERCOM (CCL_LUTCTRL_INSEL0_SERCOM_Val << CCL_LUTCTRL_INSEL0_Pos)
158 #define CCL_LUTCTRL_INSEL1_Pos 12
159 #define CCL_LUTCTRL_INSEL1_Msk (_U_(0xF) << CCL_LUTCTRL_INSEL1_Pos)
160 #define CCL_LUTCTRL_INSEL1(value) (CCL_LUTCTRL_INSEL1_Msk & ((value) << CCL_LUTCTRL_INSEL1_Pos))
161 #define CCL_LUTCTRL_INSEL1_MASK_Val _U_(0x0)
162 #define CCL_LUTCTRL_INSEL1_FEEDBACK_Val _U_(0x1)
163 #define CCL_LUTCTRL_INSEL1_LINK_Val _U_(0x2)
164 #define CCL_LUTCTRL_INSEL1_EVENT_Val _U_(0x3)
165 #define CCL_LUTCTRL_INSEL1_IO_Val _U_(0x4)
166 #define CCL_LUTCTRL_INSEL1_AC_Val _U_(0x5)
167 #define CCL_LUTCTRL_INSEL1_TC_Val _U_(0x6)
168 #define CCL_LUTCTRL_INSEL1_ALTTC_Val _U_(0x7)
169 #define CCL_LUTCTRL_INSEL1_TCC_Val _U_(0x8)
170 #define CCL_LUTCTRL_INSEL1_SERCOM_Val _U_(0x9)
171 #define CCL_LUTCTRL_INSEL1_MASK (CCL_LUTCTRL_INSEL1_MASK_Val << CCL_LUTCTRL_INSEL1_Pos)
172 #define CCL_LUTCTRL_INSEL1_FEEDBACK (CCL_LUTCTRL_INSEL1_FEEDBACK_Val << CCL_LUTCTRL_INSEL1_Pos)
173 #define CCL_LUTCTRL_INSEL1_LINK (CCL_LUTCTRL_INSEL1_LINK_Val << CCL_LUTCTRL_INSEL1_Pos)
174 #define CCL_LUTCTRL_INSEL1_EVENT (CCL_LUTCTRL_INSEL1_EVENT_Val << CCL_LUTCTRL_INSEL1_Pos)
175 #define CCL_LUTCTRL_INSEL1_IO (CCL_LUTCTRL_INSEL1_IO_Val << CCL_LUTCTRL_INSEL1_Pos)
176 #define CCL_LUTCTRL_INSEL1_AC (CCL_LUTCTRL_INSEL1_AC_Val << CCL_LUTCTRL_INSEL1_Pos)
177 #define CCL_LUTCTRL_INSEL1_TC (CCL_LUTCTRL_INSEL1_TC_Val << CCL_LUTCTRL_INSEL1_Pos)
178 #define CCL_LUTCTRL_INSEL1_ALTTC (CCL_LUTCTRL_INSEL1_ALTTC_Val << CCL_LUTCTRL_INSEL1_Pos)
179 #define CCL_LUTCTRL_INSEL1_TCC (CCL_LUTCTRL_INSEL1_TCC_Val << CCL_LUTCTRL_INSEL1_Pos)
180 #define CCL_LUTCTRL_INSEL1_SERCOM (CCL_LUTCTRL_INSEL1_SERCOM_Val << CCL_LUTCTRL_INSEL1_Pos)
181 #define CCL_LUTCTRL_INSEL2_Pos 16
182 #define CCL_LUTCTRL_INSEL2_Msk (_U_(0xF) << CCL_LUTCTRL_INSEL2_Pos)
183 #define CCL_LUTCTRL_INSEL2(value) (CCL_LUTCTRL_INSEL2_Msk & ((value) << CCL_LUTCTRL_INSEL2_Pos))
184 #define CCL_LUTCTRL_INSEL2_MASK_Val _U_(0x0)
185 #define CCL_LUTCTRL_INSEL2_FEEDBACK_Val _U_(0x1)
186 #define CCL_LUTCTRL_INSEL2_LINK_Val _U_(0x2)
187 #define CCL_LUTCTRL_INSEL2_EVENT_Val _U_(0x3)
188 #define CCL_LUTCTRL_INSEL2_IO_Val _U_(0x4)
189 #define CCL_LUTCTRL_INSEL2_AC_Val _U_(0x5)
190 #define CCL_LUTCTRL_INSEL2_TC_Val _U_(0x6)
191 #define CCL_LUTCTRL_INSEL2_ALTTC_Val _U_(0x7)
192 #define CCL_LUTCTRL_INSEL2_TCC_Val _U_(0x8)
193 #define CCL_LUTCTRL_INSEL2_SERCOM_Val _U_(0x9)
194 #define CCL_LUTCTRL_INSEL2_MASK (CCL_LUTCTRL_INSEL2_MASK_Val << CCL_LUTCTRL_INSEL2_Pos)
195 #define CCL_LUTCTRL_INSEL2_FEEDBACK (CCL_LUTCTRL_INSEL2_FEEDBACK_Val << CCL_LUTCTRL_INSEL2_Pos)
196 #define CCL_LUTCTRL_INSEL2_LINK (CCL_LUTCTRL_INSEL2_LINK_Val << CCL_LUTCTRL_INSEL2_Pos)
197 #define CCL_LUTCTRL_INSEL2_EVENT (CCL_LUTCTRL_INSEL2_EVENT_Val << CCL_LUTCTRL_INSEL2_Pos)
198 #define CCL_LUTCTRL_INSEL2_IO (CCL_LUTCTRL_INSEL2_IO_Val << CCL_LUTCTRL_INSEL2_Pos)
199 #define CCL_LUTCTRL_INSEL2_AC (CCL_LUTCTRL_INSEL2_AC_Val << CCL_LUTCTRL_INSEL2_Pos)
200 #define CCL_LUTCTRL_INSEL2_TC (CCL_LUTCTRL_INSEL2_TC_Val << CCL_LUTCTRL_INSEL2_Pos)
201 #define CCL_LUTCTRL_INSEL2_ALTTC (CCL_LUTCTRL_INSEL2_ALTTC_Val << CCL_LUTCTRL_INSEL2_Pos)
202 #define CCL_LUTCTRL_INSEL2_TCC (CCL_LUTCTRL_INSEL2_TCC_Val << CCL_LUTCTRL_INSEL2_Pos)
203 #define CCL_LUTCTRL_INSEL2_SERCOM (CCL_LUTCTRL_INSEL2_SERCOM_Val << CCL_LUTCTRL_INSEL2_Pos)
204 #define CCL_LUTCTRL_INVEI_Pos 20
205 #define CCL_LUTCTRL_INVEI (_U_(0x1) << CCL_LUTCTRL_INVEI_Pos)
206 #define CCL_LUTCTRL_LUTEI_Pos 21
207 #define CCL_LUTCTRL_LUTEI (_U_(0x1) << CCL_LUTCTRL_LUTEI_Pos)
208 #define CCL_LUTCTRL_LUTEO_Pos 22
209 #define CCL_LUTCTRL_LUTEO (_U_(0x1) << CCL_LUTCTRL_LUTEO_Pos)
210 #define CCL_LUTCTRL_TRUTH_Pos 24
211 #define CCL_LUTCTRL_TRUTH_Msk (_U_(0xFF) << CCL_LUTCTRL_TRUTH_Pos)
212 #define CCL_LUTCTRL_TRUTH(value) (CCL_LUTCTRL_TRUTH_Msk & ((value) << CCL_LUTCTRL_TRUTH_Pos))
213 #define CCL_LUTCTRL_MASK _U_(0xFF7FFFB2)
216 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
217 typedef struct {
219  RoReg8 Reserved1[0x3];
220  __IO CCL_SEQCTRL_Type SEQCTRL[2];
221  RoReg8 Reserved2[0x2];
222  __IO CCL_LUTCTRL_Type LUTCTRL[4];
223 } Ccl;
224 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
225 
228 #endif /* _SAME54_CCL_COMPONENT_ */
CCL_CTRL_Type::reg
uint8_t reg
Definition: ccl.h:52
CCL_CTRL_Type::RUNSTDBY
uint8_t RUNSTDBY
Definition: ccl.h:49
CCL_LUTCTRL_Type::ENABLE
uint32_t ENABLE
Definition: ccl.h:101
CCL_LUTCTRL_Type::INSEL0
uint32_t INSEL0
Definition: ccl.h:106
CCL_LUTCTRL_Type::EDGESEL
uint32_t EDGESEL
Definition: ccl.h:105
CCL_SEQCTRL_Type::reg
uint8_t reg
Definition: ccl.h:74
CCL_CTRL_Type::SWRST
uint8_t SWRST
Definition: ccl.h:46
CCL_CTRL_Type
Definition: ccl.h:44
CCL_LUTCTRL_Type::TRUTH
uint32_t TRUTH
Definition: ccl.h:113
CCL_LUTCTRL_Type::LUTEI
uint32_t LUTEI
Definition: ccl.h:110
CCL_SEQCTRL_Type
Definition: ccl.h:69
Ccl::CTRL
__IO CCL_CTRL_Type CTRL
Offset: 0x0 (R/W 8) Control.
Definition: ccl.h:218
CCL_LUTCTRL_Type::reg
uint32_t reg
Definition: ccl.h:115
CCL_LUTCTRL_Type
Definition: ccl.h:98
RoReg8
volatile const uint8_t RoReg8
Definition: same54n19a.h:53
CCL_SEQCTRL_Type::SEQSEL
uint8_t SEQSEL
Definition: ccl.h:71
Ccl
CCL hardware registers.
Definition: ccl.h:217
CCL_CTRL_Type::ENABLE
uint8_t ENABLE
Definition: ccl.h:47
CCL_LUTCTRL_Type::INVEI
uint32_t INVEI
Definition: ccl.h:109
CCL_LUTCTRL_Type::LUTEO
uint32_t LUTEO
Definition: ccl.h:111
CCL_LUTCTRL_Type::INSEL1
uint32_t INSEL1
Definition: ccl.h:107
CCL_LUTCTRL_Type::INSEL2
uint32_t INSEL2
Definition: ccl.h:108
CCL_LUTCTRL_Type::FILTSEL
uint32_t FILTSEL
Definition: ccl.h:103