Robobo
component_smc.h
1 /* ----------------------------------------------------------------------------
2  * SAM Software Package License
3  * ----------------------------------------------------------------------------
4  * Copyright (c) 2012, Atmel Corporation
5  *
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following condition is met:
10  *
11  * - Redistributions of source code must retain the above copyright notice,
12  * this list of conditions and the disclaimer below.
13  *
14  * Atmel's name may not be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
20  * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
23  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  * ----------------------------------------------------------------------------
28  */
29 
30 #ifndef _SAM3U_SMC_COMPONENT_
31 #define _SAM3U_SMC_COMPONENT_
32 
33 /* ============================================================================= */
35 /* ============================================================================= */
38 
39 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
40 
41 typedef struct {
42  RwReg SMC_SETUP;
43  RwReg SMC_PULSE;
44  RwReg SMC_CYCLE;
46  RwReg SMC_MODE;
47 } SmcCs_number;
49 #define SMCCS_NUMBER_NUMBER 4
50 typedef struct {
79  SmcCs_number SMC_CS_NUMBER[SMCCS_NUMBER_NUMBER];
80  RoReg Reserved1[20];
81  RwReg SMC_OCMS;
82  WoReg SMC_KEY1;
83  WoReg SMC_KEY2;
84  RoReg Reserved2[50];
86  RoReg SMC_WPSR;
87 } Smc;
88 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
89 /* -------- SMC_CFG : (SMC Offset: 0x000) SMC NFC Configuration Register -------- */
90 #define SMC_CFG_PAGESIZE_Pos 0
91 #define SMC_CFG_PAGESIZE_Msk (0x3u << SMC_CFG_PAGESIZE_Pos)
92 #define SMC_CFG_PAGESIZE_PS512_16 (0x0u << 0)
93 #define SMC_CFG_PAGESIZE_PS1024_32 (0x1u << 0)
94 #define SMC_CFG_PAGESIZE_PS2048_64 (0x2u << 0)
95 #define SMC_CFG_PAGESIZE_PS4096_128 (0x3u << 0)
96 #define SMC_CFG_WSPARE (0x1u << 8)
97 #define SMC_CFG_RSPARE (0x1u << 9)
98 #define SMC_CFG_EDGECTRL (0x1u << 12)
99 #define SMC_CFG_RBEDGE (0x1u << 13)
100 #define SMC_CFG_DTOCYC_Pos 16
101 #define SMC_CFG_DTOCYC_Msk (0xfu << SMC_CFG_DTOCYC_Pos)
102 #define SMC_CFG_DTOCYC(value) ((SMC_CFG_DTOCYC_Msk & ((value) << SMC_CFG_DTOCYC_Pos)))
103 #define SMC_CFG_DTOMUL_Pos 20
104 #define SMC_CFG_DTOMUL_Msk (0x7u << SMC_CFG_DTOMUL_Pos)
105 #define SMC_CFG_DTOMUL_X1 (0x0u << 20)
106 #define SMC_CFG_DTOMUL_X16 (0x1u << 20)
107 #define SMC_CFG_DTOMUL_X128 (0x2u << 20)
108 #define SMC_CFG_DTOMUL_X256 (0x3u << 20)
109 #define SMC_CFG_DTOMUL_X1024 (0x4u << 20)
110 #define SMC_CFG_DTOMUL_X4096 (0x5u << 20)
111 #define SMC_CFG_DTOMUL_X65536 (0x6u << 20)
112 #define SMC_CFG_DTOMUL_X1048576 (0x7u << 20)
113 /* -------- SMC_CTRL : (SMC Offset: 0x004) SMC NFC Control Register -------- */
114 #define SMC_CTRL_NFCEN (0x1u << 0)
115 #define SMC_CTRL_NFCDIS (0x1u << 1)
116 /* -------- SMC_SR : (SMC Offset: 0x008) SMC NFC Status Register -------- */
117 #define SMC_SR_SMCSTS (0x1u << 0)
118 #define SMC_SR_RB_RISE (0x1u << 4)
119 #define SMC_SR_RB_FALL (0x1u << 5)
120 #define SMC_SR_NFCBUSY (0x1u << 8)
121 #define SMC_SR_NFCWR (0x1u << 11)
122 #define SMC_SR_NFCSID_Pos 12
123 #define SMC_SR_NFCSID_Msk (0x7u << SMC_SR_NFCSID_Pos)
124 #define SMC_SR_XFRDONE (0x1u << 16)
125 #define SMC_SR_CMDDONE (0x1u << 17)
126 #define SMC_SR_DTOE (0x1u << 20)
127 #define SMC_SR_UNDEF (0x1u << 21)
128 #define SMC_SR_AWB (0x1u << 22)
129 #define SMC_SR_NFCASE (0x1u << 23)
130 #define SMC_SR_RB_EDGE0 (0x1u << 24)
131 /* -------- SMC_IER : (SMC Offset: 0x00C) SMC NFC Interrupt Enable Register -------- */
132 #define SMC_IER_RB_RISE (0x1u << 4)
133 #define SMC_IER_RB_FALL (0x1u << 5)
134 #define SMC_IER_XFRDONE (0x1u << 16)
135 #define SMC_IER_CMDDONE (0x1u << 17)
136 #define SMC_IER_DTOE (0x1u << 20)
137 #define SMC_IER_UNDEF (0x1u << 21)
138 #define SMC_IER_AWB (0x1u << 22)
139 #define SMC_IER_NFCASE (0x1u << 23)
140 #define SMC_IER_RB_EDGE0 (0x1u << 24)
141 /* -------- SMC_IDR : (SMC Offset: 0x010) SMC NFC Interrupt Disable Register -------- */
142 #define SMC_IDR_RB_RISE (0x1u << 4)
143 #define SMC_IDR_RB_FALL (0x1u << 5)
144 #define SMC_IDR_XFRDONE (0x1u << 16)
145 #define SMC_IDR_CMDDONE (0x1u << 17)
146 #define SMC_IDR_DTOE (0x1u << 20)
147 #define SMC_IDR_UNDEF (0x1u << 21)
148 #define SMC_IDR_AWB (0x1u << 22)
149 #define SMC_IDR_NFCASE (0x1u << 23)
150 #define SMC_IDR_RB_EDGE0 (0x1u << 24)
151 /* -------- SMC_IMR : (SMC Offset: 0x014) SMC NFC Interrupt Mask Register -------- */
152 #define SMC_IMR_RB_RISE (0x1u << 4)
153 #define SMC_IMR_RB_FALL (0x1u << 5)
154 #define SMC_IMR_XFRDONE (0x1u << 16)
155 #define SMC_IMR_CMDDONE (0x1u << 17)
156 #define SMC_IMR_DTOE (0x1u << 20)
157 #define SMC_IMR_UNDEF (0x1u << 21)
158 #define SMC_IMR_AWB (0x1u << 22)
159 #define SMC_IMR_NFCASE (0x1u << 23)
160 #define SMC_IMR_RB_EDGE0 (0x1u << 24)
161 /* -------- SMC_ADDR : (SMC Offset: 0x018) SMC NFC Address Cycle Zero Register -------- */
162 #define SMC_ADDR_ADDR_CYCLE0_Pos 0
163 #define SMC_ADDR_ADDR_CYCLE0_Msk (0xffu << SMC_ADDR_ADDR_CYCLE0_Pos)
164 #define SMC_ADDR_ADDR_CYCLE0(value) ((SMC_ADDR_ADDR_CYCLE0_Msk & ((value) << SMC_ADDR_ADDR_CYCLE0_Pos)))
165 /* -------- SMC_BANK : (SMC Offset: 0x01C) SMC Bank Address Register -------- */
166 #define SMC_BANK_BANK_Pos 0
167 #define SMC_BANK_BANK_Msk (0x7u << SMC_BANK_BANK_Pos)
168 #define SMC_BANK_BANK(value) ((SMC_BANK_BANK_Msk & ((value) << SMC_BANK_BANK_Pos)))
169 /* -------- SMC_ECC_CTRL : (SMC Offset: 0x020) SMC ECC Control Register -------- */
170 #define SMC_ECC_CTRL_RST (0x1u << 0)
171 #define SMC_ECC_CTRL_SWRST (0x1u << 1)
172 /* -------- SMC_ECC_MD : (SMC Offset: 0x024) SMC ECC Mode Register -------- */
173 #define SMC_ECC_MD_ECC_PAGESIZE_Pos 0
174 #define SMC_ECC_MD_ECC_PAGESIZE_Msk (0x3u << SMC_ECC_MD_ECC_PAGESIZE_Pos)
175 #define SMC_ECC_MD_ECC_PAGESIZE_PS512_16 (0x0u << 0)
176 #define SMC_ECC_MD_ECC_PAGESIZE_PS1024_32 (0x1u << 0)
177 #define SMC_ECC_MD_ECC_PAGESIZE_PS2048_64 (0x2u << 0)
178 #define SMC_ECC_MD_ECC_PAGESIZE_PS4096_128 (0x3u << 0)
179 #define SMC_ECC_MD_TYPCORREC_Pos 4
180 #define SMC_ECC_MD_TYPCORREC_Msk (0x3u << SMC_ECC_MD_TYPCORREC_Pos)
181 #define SMC_ECC_MD_TYPCORREC_CPAGE (0x0u << 4)
182 #define SMC_ECC_MD_TYPCORREC_C256B (0x1u << 4)
183 #define SMC_ECC_MD_TYPCORREC_C512B (0x2u << 4)
184 /* -------- SMC_ECC_SR1 : (SMC Offset: 0x028) SMC ECC Status 1 Register -------- */
185 #define SMC_ECC_SR1_RECERR0 (0x1u << 0)
186 #define SMC_ECC_SR1_ECCERR0_Pos 1
187 #define SMC_ECC_SR1_ECCERR0_Msk (0x3u << SMC_ECC_SR1_ECCERR0_Pos)
188 #define SMC_ECC_SR1_RECERR1 (0x1u << 4)
189 #define SMC_ECC_SR1_ECCERR1 (0x1u << 5)
190 #define SMC_ECC_SR1_MULERR1 (0x1u << 6)
191 #define SMC_ECC_SR1_RECERR2 (0x1u << 8)
192 #define SMC_ECC_SR1_ECCERR2 (0x1u << 9)
193 #define SMC_ECC_SR1_MULERR2 (0x1u << 10)
194 #define SMC_ECC_SR1_RECERR3 (0x1u << 12)
195 #define SMC_ECC_SR1_ECCERR3 (0x1u << 13)
196 #define SMC_ECC_SR1_MULERR3 (0x1u << 14)
197 #define SMC_ECC_SR1_RECERR4 (0x1u << 16)
198 #define SMC_ECC_SR1_ECCERR4_Pos 17
199 #define SMC_ECC_SR1_ECCERR4_Msk (0x3u << SMC_ECC_SR1_ECCERR4_Pos)
200 #define SMC_ECC_SR1_RECERR5 (0x1u << 20)
201 #define SMC_ECC_SR1_ECCERR5_Pos 21
202 #define SMC_ECC_SR1_ECCERR5_Msk (0x3u << SMC_ECC_SR1_ECCERR5_Pos)
203 #define SMC_ECC_SR1_RECERR6 (0x1u << 24)
204 #define SMC_ECC_SR1_ECCERR6_Pos 25
205 #define SMC_ECC_SR1_ECCERR6_Msk (0x3u << SMC_ECC_SR1_ECCERR6_Pos)
206 #define SMC_ECC_SR1_RECERR7 (0x1u << 28)
207 #define SMC_ECC_SR1_ECCERR7_Pos 29
208 #define SMC_ECC_SR1_ECCERR7_Msk (0x3u << SMC_ECC_SR1_ECCERR7_Pos)
209 /* -------- SMC_ECC_PR0 : (SMC Offset: 0x02C) SMC ECC Parity 0 Register -------- */
210 #define SMC_ECC_PR0_BITADDR_Pos 0
211 #define SMC_ECC_PR0_BITADDR_Msk (0xfu << SMC_ECC_PR0_BITADDR_Pos)
212 #define SMC_ECC_PR0_WORDADDR_Pos 4
213 #define SMC_ECC_PR0_WORDADDR_Msk (0xfffu << SMC_ECC_PR0_WORDADDR_Pos)
214 #define SMC_ECC_PR0_BITADDR_W9BIT_Pos 0
215 #define SMC_ECC_PR0_BITADDR_W9BIT_Msk (0x7u << SMC_ECC_PR0_BITADDR_W9BIT_Pos)
216 #define SMC_ECC_PR0_WORDADDR_W9BIT_Pos 3
217 #define SMC_ECC_PR0_WORDADDR_W9BIT_Msk (0x1ffu << SMC_ECC_PR0_WORDADDR_W9BIT_Pos)
218 #define SMC_ECC_PR0_NPARITY_Pos 12
219 #define SMC_ECC_PR0_NPARITY_Msk (0xfffu << SMC_ECC_PR0_NPARITY_Pos)
220 #define SMC_ECC_PR0_BITADDR_W8BIT_Pos 0
221 #define SMC_ECC_PR0_BITADDR_W8BIT_Msk (0x7u << SMC_ECC_PR0_BITADDR_W8BIT_Pos)
222 #define SMC_ECC_PR0_WORDADDR_W8BIT_Pos 3
223 #define SMC_ECC_PR0_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR0_WORDADDR_W8BIT_Pos)
224 #define SMC_ECC_PR0_NPARITY_W8BIT_Pos 12
225 #define SMC_ECC_PR0_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR0_NPARITY_W8BIT_Pos)
226 /* -------- SMC_ECC_PR1 : (SMC Offset: 0x030) SMC ECC parity 1 Register -------- */
227 #define SMC_ECC_PR1_NPARITY_Pos 0
228 #define SMC_ECC_PR1_NPARITY_Msk (0xffffu << SMC_ECC_PR1_NPARITY_Pos)
229 #define SMC_ECC_PR1_BITADDR_Pos 0
230 #define SMC_ECC_PR1_BITADDR_Msk (0x7u << SMC_ECC_PR1_BITADDR_Pos)
231 #define SMC_ECC_PR1_WORDADDR_Pos 3
232 #define SMC_ECC_PR1_WORDADDR_Msk (0x1ffu << SMC_ECC_PR1_WORDADDR_Pos)
233 #define SMC_ECC_PR1_NPARITY_W9BIT_Pos 12
234 #define SMC_ECC_PR1_NPARITY_W9BIT_Msk (0xfffu << SMC_ECC_PR1_NPARITY_W9BIT_Pos)
235 #define SMC_ECC_PR1_WORDADDR_W8BIT_Pos 3
236 #define SMC_ECC_PR1_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR1_WORDADDR_W8BIT_Pos)
237 #define SMC_ECC_PR1_NPARITY_W8BIT_Pos 12
238 #define SMC_ECC_PR1_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR1_NPARITY_W8BIT_Pos)
239 /* -------- SMC_ECC_SR2 : (SMC Offset: 0x034) SMC ECC status 2 Register -------- */
240 #define SMC_ECC_SR2_RECERR8 (0x1u << 0)
241 #define SMC_ECC_SR2_ECCERR8_Pos 1
242 #define SMC_ECC_SR2_ECCERR8_Msk (0x3u << SMC_ECC_SR2_ECCERR8_Pos)
243 #define SMC_ECC_SR2_RECERR9 (0x1u << 4)
244 #define SMC_ECC_SR2_ECCERR9 (0x1u << 5)
245 #define SMC_ECC_SR2_MULERR9 (0x1u << 6)
246 #define SMC_ECC_SR2_RECERR10 (0x1u << 8)
247 #define SMC_ECC_SR2_ECCERR10 (0x1u << 9)
248 #define SMC_ECC_SR2_MULERR10 (0x1u << 10)
249 #define SMC_ECC_SR2_RECERR11 (0x1u << 12)
250 #define SMC_ECC_SR2_ECCERR11 (0x1u << 13)
251 #define SMC_ECC_SR2_MULERR11 (0x1u << 14)
252 #define SMC_ECC_SR2_RECERR12 (0x1u << 16)
253 #define SMC_ECC_SR2_ECCERR12_Pos 17
254 #define SMC_ECC_SR2_ECCERR12_Msk (0x3u << SMC_ECC_SR2_ECCERR12_Pos)
255 #define SMC_ECC_SR2_RECERR13 (0x1u << 20)
256 #define SMC_ECC_SR2_ECCERR13_Pos 21
257 #define SMC_ECC_SR2_ECCERR13_Msk (0x3u << SMC_ECC_SR2_ECCERR13_Pos)
258 #define SMC_ECC_SR2_RECERR14 (0x1u << 24)
259 #define SMC_ECC_SR2_ECCERR14_Pos 25
260 #define SMC_ECC_SR2_ECCERR14_Msk (0x3u << SMC_ECC_SR2_ECCERR14_Pos)
261 #define SMC_ECC_SR2_RECERR15 (0x1u << 28)
262 #define SMC_ECC_SR2_ECCERR15_Pos 29
263 #define SMC_ECC_SR2_ECCERR15_Msk (0x3u << SMC_ECC_SR2_ECCERR15_Pos)
264 /* -------- SMC_ECC_PR2 : (SMC Offset: 0x038) SMC ECC parity 2 Register -------- */
265 #define SMC_ECC_PR2_BITADDR_Pos 0
266 #define SMC_ECC_PR2_BITADDR_Msk (0x7u << SMC_ECC_PR2_BITADDR_Pos)
267 #define SMC_ECC_PR2_WORDADDR_Pos 3
268 #define SMC_ECC_PR2_WORDADDR_Msk (0x1ffu << SMC_ECC_PR2_WORDADDR_Pos)
269 #define SMC_ECC_PR2_NPARITY_Pos 12
270 #define SMC_ECC_PR2_NPARITY_Msk (0xfffu << SMC_ECC_PR2_NPARITY_Pos)
271 #define SMC_ECC_PR2_WORDADDR_W8BIT_Pos 3
272 #define SMC_ECC_PR2_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR2_WORDADDR_W8BIT_Pos)
273 #define SMC_ECC_PR2_NPARITY_W8BIT_Pos 12
274 #define SMC_ECC_PR2_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR2_NPARITY_W8BIT_Pos)
275 /* -------- SMC_ECC_PR3 : (SMC Offset: 0x03C) SMC ECC parity 3 Register -------- */
276 #define SMC_ECC_PR3_BITADDR_Pos 0
277 #define SMC_ECC_PR3_BITADDR_Msk (0x7u << SMC_ECC_PR3_BITADDR_Pos)
278 #define SMC_ECC_PR3_WORDADDR_Pos 3
279 #define SMC_ECC_PR3_WORDADDR_Msk (0x1ffu << SMC_ECC_PR3_WORDADDR_Pos)
280 #define SMC_ECC_PR3_NPARITY_Pos 12
281 #define SMC_ECC_PR3_NPARITY_Msk (0xfffu << SMC_ECC_PR3_NPARITY_Pos)
282 #define SMC_ECC_PR3_WORDADDR_W8BIT_Pos 3
283 #define SMC_ECC_PR3_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR3_WORDADDR_W8BIT_Pos)
284 #define SMC_ECC_PR3_NPARITY_W8BIT_Pos 12
285 #define SMC_ECC_PR3_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR3_NPARITY_W8BIT_Pos)
286 /* -------- SMC_ECC_PR4 : (SMC Offset: 0x040) SMC ECC parity 4 Register -------- */
287 #define SMC_ECC_PR4_BITADDR_Pos 0
288 #define SMC_ECC_PR4_BITADDR_Msk (0x7u << SMC_ECC_PR4_BITADDR_Pos)
289 #define SMC_ECC_PR4_WORDADDR_Pos 3
290 #define SMC_ECC_PR4_WORDADDR_Msk (0x1ffu << SMC_ECC_PR4_WORDADDR_Pos)
291 #define SMC_ECC_PR4_NPARITY_Pos 12
292 #define SMC_ECC_PR4_NPARITY_Msk (0xfffu << SMC_ECC_PR4_NPARITY_Pos)
293 #define SMC_ECC_PR4_WORDADDR_W8BIT_Pos 3
294 #define SMC_ECC_PR4_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR4_WORDADDR_W8BIT_Pos)
295 #define SMC_ECC_PR4_NPARITY_W8BIT_Pos 12
296 #define SMC_ECC_PR4_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR4_NPARITY_W8BIT_Pos)
297 /* -------- SMC_ECC_PR5 : (SMC Offset: 0x044) SMC ECC parity 5 Register -------- */
298 #define SMC_ECC_PR5_BITADDR_Pos 0
299 #define SMC_ECC_PR5_BITADDR_Msk (0x7u << SMC_ECC_PR5_BITADDR_Pos)
300 #define SMC_ECC_PR5_WORDADDR_Pos 3
301 #define SMC_ECC_PR5_WORDADDR_Msk (0x1ffu << SMC_ECC_PR5_WORDADDR_Pos)
302 #define SMC_ECC_PR5_NPARITY_Pos 12
303 #define SMC_ECC_PR5_NPARITY_Msk (0xfffu << SMC_ECC_PR5_NPARITY_Pos)
304 #define SMC_ECC_PR5_WORDADDR_W8BIT_Pos 3
305 #define SMC_ECC_PR5_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR5_WORDADDR_W8BIT_Pos)
306 #define SMC_ECC_PR5_NPARITY_W8BIT_Pos 12
307 #define SMC_ECC_PR5_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR5_NPARITY_W8BIT_Pos)
308 /* -------- SMC_ECC_PR6 : (SMC Offset: 0x048) SMC ECC parity 6 Register -------- */
309 #define SMC_ECC_PR6_BITADDR_Pos 0
310 #define SMC_ECC_PR6_BITADDR_Msk (0x7u << SMC_ECC_PR6_BITADDR_Pos)
311 #define SMC_ECC_PR6_WORDADDR_Pos 3
312 #define SMC_ECC_PR6_WORDADDR_Msk (0x1ffu << SMC_ECC_PR6_WORDADDR_Pos)
313 #define SMC_ECC_PR6_NPARITY_Pos 12
314 #define SMC_ECC_PR6_NPARITY_Msk (0xfffu << SMC_ECC_PR6_NPARITY_Pos)
315 #define SMC_ECC_PR6_WORDADDR_W8BIT_Pos 3
316 #define SMC_ECC_PR6_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR6_WORDADDR_W8BIT_Pos)
317 #define SMC_ECC_PR6_NPARITY_W8BIT_Pos 12
318 #define SMC_ECC_PR6_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR6_NPARITY_W8BIT_Pos)
319 /* -------- SMC_ECC_PR7 : (SMC Offset: 0x04C) SMC ECC parity 7 Register -------- */
320 #define SMC_ECC_PR7_BITADDR_Pos 0
321 #define SMC_ECC_PR7_BITADDR_Msk (0x7u << SMC_ECC_PR7_BITADDR_Pos)
322 #define SMC_ECC_PR7_WORDADDR_Pos 3
323 #define SMC_ECC_PR7_WORDADDR_Msk (0x1ffu << SMC_ECC_PR7_WORDADDR_Pos)
324 #define SMC_ECC_PR7_NPARITY_Pos 12
325 #define SMC_ECC_PR7_NPARITY_Msk (0xfffu << SMC_ECC_PR7_NPARITY_Pos)
326 #define SMC_ECC_PR7_WORDADDR_W8BIT_Pos 3
327 #define SMC_ECC_PR7_WORDADDR_W8BIT_Msk (0xffu << SMC_ECC_PR7_WORDADDR_W8BIT_Pos)
328 #define SMC_ECC_PR7_NPARITY_W8BIT_Pos 12
329 #define SMC_ECC_PR7_NPARITY_W8BIT_Msk (0x7ffu << SMC_ECC_PR7_NPARITY_W8BIT_Pos)
330 /* -------- SMC_ECC_PR8 : (SMC Offset: 0x050) SMC ECC parity 8 Register -------- */
331 #define SMC_ECC_PR8_BITADDR_Pos 0
332 #define SMC_ECC_PR8_BITADDR_Msk (0x7u << SMC_ECC_PR8_BITADDR_Pos)
333 #define SMC_ECC_PR8_WORDADDR_Pos 3
334 #define SMC_ECC_PR8_WORDADDR_Msk (0xffu << SMC_ECC_PR8_WORDADDR_Pos)
335 #define SMC_ECC_PR8_NPARITY_Pos 12
336 #define SMC_ECC_PR8_NPARITY_Msk (0x7ffu << SMC_ECC_PR8_NPARITY_Pos)
337 /* -------- SMC_ECC_PR9 : (SMC Offset: 0x054) SMC ECC parity 9 Register -------- */
338 #define SMC_ECC_PR9_BITADDR_Pos 0
339 #define SMC_ECC_PR9_BITADDR_Msk (0x7u << SMC_ECC_PR9_BITADDR_Pos)
340 #define SMC_ECC_PR9_WORDADDR_Pos 3
341 #define SMC_ECC_PR9_WORDADDR_Msk (0xffu << SMC_ECC_PR9_WORDADDR_Pos)
342 #define SMC_ECC_PR9_NPARITY_Pos 12
343 #define SMC_ECC_PR9_NPARITY_Msk (0x7ffu << SMC_ECC_PR9_NPARITY_Pos)
344 /* -------- SMC_ECC_PR10 : (SMC Offset: 0x058) SMC ECC parity 10 Register -------- */
345 #define SMC_ECC_PR10_BITADDR_Pos 0
346 #define SMC_ECC_PR10_BITADDR_Msk (0x7u << SMC_ECC_PR10_BITADDR_Pos)
347 #define SMC_ECC_PR10_WORDADDR_Pos 3
348 #define SMC_ECC_PR10_WORDADDR_Msk (0xffu << SMC_ECC_PR10_WORDADDR_Pos)
349 #define SMC_ECC_PR10_NPARITY_Pos 12
350 #define SMC_ECC_PR10_NPARITY_Msk (0x7ffu << SMC_ECC_PR10_NPARITY_Pos)
351 /* -------- SMC_ECC_PR11 : (SMC Offset: 0x05C) SMC ECC parity 11 Register -------- */
352 #define SMC_ECC_PR11_BITADDR_Pos 0
353 #define SMC_ECC_PR11_BITADDR_Msk (0x7u << SMC_ECC_PR11_BITADDR_Pos)
354 #define SMC_ECC_PR11_WORDADDR_Pos 3
355 #define SMC_ECC_PR11_WORDADDR_Msk (0xffu << SMC_ECC_PR11_WORDADDR_Pos)
356 #define SMC_ECC_PR11_NPARITY_Pos 12
357 #define SMC_ECC_PR11_NPARITY_Msk (0x7ffu << SMC_ECC_PR11_NPARITY_Pos)
358 /* -------- SMC_ECC_PR12 : (SMC Offset: 0x060) SMC ECC parity 12 Register -------- */
359 #define SMC_ECC_PR12_BITADDR_Pos 0
360 #define SMC_ECC_PR12_BITADDR_Msk (0x7u << SMC_ECC_PR12_BITADDR_Pos)
361 #define SMC_ECC_PR12_WORDADDR_Pos 3
362 #define SMC_ECC_PR12_WORDADDR_Msk (0xffu << SMC_ECC_PR12_WORDADDR_Pos)
363 #define SMC_ECC_PR12_NPARITY_Pos 12
364 #define SMC_ECC_PR12_NPARITY_Msk (0x7ffu << SMC_ECC_PR12_NPARITY_Pos)
365 /* -------- SMC_ECC_PR13 : (SMC Offset: 0x064) SMC ECC parity 13 Register -------- */
366 #define SMC_ECC_PR13_BITADDR_Pos 0
367 #define SMC_ECC_PR13_BITADDR_Msk (0x7u << SMC_ECC_PR13_BITADDR_Pos)
368 #define SMC_ECC_PR13_WORDADDR_Pos 3
369 #define SMC_ECC_PR13_WORDADDR_Msk (0xffu << SMC_ECC_PR13_WORDADDR_Pos)
370 #define SMC_ECC_PR13_NPARITY_Pos 12
371 #define SMC_ECC_PR13_NPARITY_Msk (0x7ffu << SMC_ECC_PR13_NPARITY_Pos)
372 /* -------- SMC_ECC_PR14 : (SMC Offset: 0x068) SMC ECC parity 14 Register -------- */
373 #define SMC_ECC_PR14_BITADDR_Pos 0
374 #define SMC_ECC_PR14_BITADDR_Msk (0x7u << SMC_ECC_PR14_BITADDR_Pos)
375 #define SMC_ECC_PR14_WORDADDR_Pos 3
376 #define SMC_ECC_PR14_WORDADDR_Msk (0xffu << SMC_ECC_PR14_WORDADDR_Pos)
377 #define SMC_ECC_PR14_NPARITY_Pos 12
378 #define SMC_ECC_PR14_NPARITY_Msk (0x7ffu << SMC_ECC_PR14_NPARITY_Pos)
379 /* -------- SMC_ECC_PR15 : (SMC Offset: 0x06C) SMC ECC parity 15 Register -------- */
380 #define SMC_ECC_PR15_BITADDR_Pos 0
381 #define SMC_ECC_PR15_BITADDR_Msk (0x7u << SMC_ECC_PR15_BITADDR_Pos)
382 #define SMC_ECC_PR15_WORDADDR_Pos 3
383 #define SMC_ECC_PR15_WORDADDR_Msk (0xffu << SMC_ECC_PR15_WORDADDR_Pos)
384 #define SMC_ECC_PR15_NPARITY_Pos 12
385 #define SMC_ECC_PR15_NPARITY_Msk (0x7ffu << SMC_ECC_PR15_NPARITY_Pos)
386 /* -------- SMC_SETUP : (SMC Offset: N/A) SMC Setup Register -------- */
387 #define SMC_SETUP_NWE_SETUP_Pos 0
388 #define SMC_SETUP_NWE_SETUP_Msk (0x3fu << SMC_SETUP_NWE_SETUP_Pos)
389 #define SMC_SETUP_NWE_SETUP(value) ((SMC_SETUP_NWE_SETUP_Msk & ((value) << SMC_SETUP_NWE_SETUP_Pos)))
390 #define SMC_SETUP_NCS_WR_SETUP_Pos 8
391 #define SMC_SETUP_NCS_WR_SETUP_Msk (0x3fu << SMC_SETUP_NCS_WR_SETUP_Pos)
392 #define SMC_SETUP_NCS_WR_SETUP(value) ((SMC_SETUP_NCS_WR_SETUP_Msk & ((value) << SMC_SETUP_NCS_WR_SETUP_Pos)))
393 #define SMC_SETUP_NRD_SETUP_Pos 16
394 #define SMC_SETUP_NRD_SETUP_Msk (0x3fu << SMC_SETUP_NRD_SETUP_Pos)
395 #define SMC_SETUP_NRD_SETUP(value) ((SMC_SETUP_NRD_SETUP_Msk & ((value) << SMC_SETUP_NRD_SETUP_Pos)))
396 #define SMC_SETUP_NCS_RD_SETUP_Pos 24
397 #define SMC_SETUP_NCS_RD_SETUP_Msk (0x3fu << SMC_SETUP_NCS_RD_SETUP_Pos)
398 #define SMC_SETUP_NCS_RD_SETUP(value) ((SMC_SETUP_NCS_RD_SETUP_Msk & ((value) << SMC_SETUP_NCS_RD_SETUP_Pos)))
399 /* -------- SMC_PULSE : (SMC Offset: N/A) SMC Pulse Register -------- */
400 #define SMC_PULSE_NWE_PULSE_Pos 0
401 #define SMC_PULSE_NWE_PULSE_Msk (0x3fu << SMC_PULSE_NWE_PULSE_Pos)
402 #define SMC_PULSE_NWE_PULSE(value) ((SMC_PULSE_NWE_PULSE_Msk & ((value) << SMC_PULSE_NWE_PULSE_Pos)))
403 #define SMC_PULSE_NCS_WR_PULSE_Pos 8
404 #define SMC_PULSE_NCS_WR_PULSE_Msk (0x3fu << SMC_PULSE_NCS_WR_PULSE_Pos)
405 #define SMC_PULSE_NCS_WR_PULSE(value) ((SMC_PULSE_NCS_WR_PULSE_Msk & ((value) << SMC_PULSE_NCS_WR_PULSE_Pos)))
406 #define SMC_PULSE_NRD_PULSE_Pos 16
407 #define SMC_PULSE_NRD_PULSE_Msk (0x3fu << SMC_PULSE_NRD_PULSE_Pos)
408 #define SMC_PULSE_NRD_PULSE(value) ((SMC_PULSE_NRD_PULSE_Msk & ((value) << SMC_PULSE_NRD_PULSE_Pos)))
409 #define SMC_PULSE_NCS_RD_PULSE_Pos 24
410 #define SMC_PULSE_NCS_RD_PULSE_Msk (0x3fu << SMC_PULSE_NCS_RD_PULSE_Pos)
411 #define SMC_PULSE_NCS_RD_PULSE(value) ((SMC_PULSE_NCS_RD_PULSE_Msk & ((value) << SMC_PULSE_NCS_RD_PULSE_Pos)))
412 /* -------- SMC_CYCLE : (SMC Offset: N/A) SMC Cycle Register -------- */
413 #define SMC_CYCLE_NWE_CYCLE_Pos 0
414 #define SMC_CYCLE_NWE_CYCLE_Msk (0x1ffu << SMC_CYCLE_NWE_CYCLE_Pos)
415 #define SMC_CYCLE_NWE_CYCLE(value) ((SMC_CYCLE_NWE_CYCLE_Msk & ((value) << SMC_CYCLE_NWE_CYCLE_Pos)))
416 #define SMC_CYCLE_NRD_CYCLE_Pos 16
417 #define SMC_CYCLE_NRD_CYCLE_Msk (0x1ffu << SMC_CYCLE_NRD_CYCLE_Pos)
418 #define SMC_CYCLE_NRD_CYCLE(value) ((SMC_CYCLE_NRD_CYCLE_Msk & ((value) << SMC_CYCLE_NRD_CYCLE_Pos)))
419 /* -------- SMC_TIMINGS : (SMC Offset: N/A) SMC Timings Register -------- */
420 #define SMC_TIMINGS_TCLR_Pos 0
421 #define SMC_TIMINGS_TCLR_Msk (0xfu << SMC_TIMINGS_TCLR_Pos)
422 #define SMC_TIMINGS_TCLR(value) ((SMC_TIMINGS_TCLR_Msk & ((value) << SMC_TIMINGS_TCLR_Pos)))
423 #define SMC_TIMINGS_TADL_Pos 4
424 #define SMC_TIMINGS_TADL_Msk (0xfu << SMC_TIMINGS_TADL_Pos)
425 #define SMC_TIMINGS_TADL(value) ((SMC_TIMINGS_TADL_Msk & ((value) << SMC_TIMINGS_TADL_Pos)))
426 #define SMC_TIMINGS_TAR_Pos 8
427 #define SMC_TIMINGS_TAR_Msk (0xfu << SMC_TIMINGS_TAR_Pos)
428 #define SMC_TIMINGS_TAR(value) ((SMC_TIMINGS_TAR_Msk & ((value) << SMC_TIMINGS_TAR_Pos)))
429 #define SMC_TIMINGS_OCMS (0x1u << 12)
430 #define SMC_TIMINGS_TRR_Pos 16
431 #define SMC_TIMINGS_TRR_Msk (0xfu << SMC_TIMINGS_TRR_Pos)
432 #define SMC_TIMINGS_TRR(value) ((SMC_TIMINGS_TRR_Msk & ((value) << SMC_TIMINGS_TRR_Pos)))
433 #define SMC_TIMINGS_TWB_Pos 24
434 #define SMC_TIMINGS_TWB_Msk (0xfu << SMC_TIMINGS_TWB_Pos)
435 #define SMC_TIMINGS_TWB(value) ((SMC_TIMINGS_TWB_Msk & ((value) << SMC_TIMINGS_TWB_Pos)))
436 #define SMC_TIMINGS_RBNSEL_Pos 28
437 #define SMC_TIMINGS_RBNSEL_Msk (0x7u << SMC_TIMINGS_RBNSEL_Pos)
438 #define SMC_TIMINGS_RBNSEL(value) ((SMC_TIMINGS_RBNSEL_Msk & ((value) << SMC_TIMINGS_RBNSEL_Pos)))
439 #define SMC_TIMINGS_NFSEL (0x1u << 31)
440 /* -------- SMC_MODE : (SMC Offset: N/A) SMC Mode Register -------- */
441 #define SMC_MODE_READ_MODE (0x1u << 0)
442 #define SMC_MODE_READ_MODE_NCS_CTRL (0x0u << 0)
443 #define SMC_MODE_READ_MODE_NRD_CTRL (0x1u << 0)
444 #define SMC_MODE_WRITE_MODE (0x1u << 1)
445 #define SMC_MODE_WRITE_MODE_NCS_CTRL (0x0u << 1)
446 #define SMC_MODE_WRITE_MODE_NWE_CTRL (0x1u << 1)
447 #define SMC_MODE_EXNW_MODE_Pos 4
448 #define SMC_MODE_EXNW_MODE_Msk (0x3u << SMC_MODE_EXNW_MODE_Pos)
449 #define SMC_MODE_EXNW_MODE_DISABLED (0x0u << 4)
450 #define SMC_MODE_EXNW_MODE_FROZEN (0x2u << 4)
451 #define SMC_MODE_EXNW_MODE_READY (0x3u << 4)
452 #define SMC_MODE_BAT (0x1u << 8)
453 #define SMC_MODE_DBW (0x1u << 12)
454 #define SMC_MODE_DBW_BIT_8 (0x0u << 12)
455 #define SMC_MODE_DBW_BIT_16 (0x1u << 12)
456 #define SMC_MODE_TDF_CYCLES_Pos 16
457 #define SMC_MODE_TDF_CYCLES_Msk (0xfu << SMC_MODE_TDF_CYCLES_Pos)
458 #define SMC_MODE_TDF_CYCLES(value) ((SMC_MODE_TDF_CYCLES_Msk & ((value) << SMC_MODE_TDF_CYCLES_Pos)))
459 #define SMC_MODE_TDF_MODE (0x1u << 20)
460 /* -------- SMC_OCMS : (SMC Offset: 0x110) SMC OCMS Register -------- */
461 #define SMC_OCMS_SMSE (0x1u << 0)
462 #define SMC_OCMS_SRSE (0x1u << 1)
463 /* -------- SMC_KEY1 : (SMC Offset: 0x114) SMC OCMS KEY1 Register -------- */
464 #define SMC_KEY1_KEY1_Pos 0
465 #define SMC_KEY1_KEY1_Msk (0xffffffffu << SMC_KEY1_KEY1_Pos)
466 #define SMC_KEY1_KEY1(value) ((SMC_KEY1_KEY1_Msk & ((value) << SMC_KEY1_KEY1_Pos)))
467 /* -------- SMC_KEY2 : (SMC Offset: 0x118) SMC OCMS KEY2 Register -------- */
468 #define SMC_KEY2_KEY2_Pos 0
469 #define SMC_KEY2_KEY2_Msk (0xffffffffu << SMC_KEY2_KEY2_Pos)
470 #define SMC_KEY2_KEY2(value) ((SMC_KEY2_KEY2_Msk & ((value) << SMC_KEY2_KEY2_Pos)))
471 /* -------- SMC_WPCR : (SMC Offset: 0x1E4) Write Protection Control Register -------- */
472 #define SMC_WPCR_WP_EN (0x1u << 0)
473 #define SMC_WPCR_WP_KEY_Pos 8
474 #define SMC_WPCR_WP_KEY_Msk (0xffffffu << SMC_WPCR_WP_KEY_Pos)
475 #define SMC_WPCR_WP_KEY(value) ((SMC_WPCR_WP_KEY_Msk & ((value) << SMC_WPCR_WP_KEY_Pos)))
476 /* -------- SMC_WPSR : (SMC Offset: 0x1E8) Write Protection Status Register -------- */
477 #define SMC_WPSR_WP_VS_Pos 0
478 #define SMC_WPSR_WP_VS_Msk (0xfu << SMC_WPSR_WP_VS_Pos)
479 #define SMC_WPSR_WP_VSRC_Pos 8
480 #define SMC_WPSR_WP_VSRC_Msk (0xffffu << SMC_WPSR_WP_VSRC_Pos)
483 
484 
485 #endif /* _SAM3U_SMC_COMPONENT_ */
RoReg SMC_ECC_PR5
(Smc Offset: 0x044) SMC ECC parity 5 Register
Definition: component_smc.h:68
RoReg SMC_ECC_PR15
(Smc Offset: 0x06C) SMC ECC parity 15 Register
Definition: component_smc.h:78
WoReg SMC_IDR
(Smc Offset: 0x010) SMC NFC Interrupt Disable Register
Definition: component_smc.h:55
volatile uint32_t RwReg
Definition: sam3n00a.h:54
Definition: component_smc.h:49
RoReg SMC_ECC_PR14
(Smc Offset: 0x068) SMC ECC parity 14 Register
Definition: component_smc.h:77
RoReg SMC_ECC_PR2
(Smc Offset: 0x038) SMC ECC parity 2 Register
Definition: component_smc.h:65
RoReg SMC_ECC_SR2
(Smc Offset: 0x034) SMC ECC status 2 Register
Definition: component_smc.h:64
volatile uint32_t WoReg
Definition: sam3n00a.h:53
#define SMCCS_NUMBER_NUMBER
Smc hardware registers.
Definition: component_smc.h:49
WoReg SMC_WPCR
(Smc Offset: 0x1E4) Write Protection Control Register
Definition: component_smc.h:85
RwReg SMC_ECC_MD
(Smc Offset: 0x024) SMC ECC Mode Register
Definition: component_smc.h:60
RoReg SMC_ECC_PR11
(Smc Offset: 0x05C) SMC ECC parity 11 Register
Definition: component_smc.h:74
RoReg SMC_ECC_PR9
(Smc Offset: 0x054) SMC ECC parity 9 Register
Definition: component_smc.h:72
RoReg SMC_IMR
(Smc Offset: 0x014) SMC NFC Interrupt Mask Register
Definition: component_smc.h:56
RoReg SMC_ECC_PR3
(Smc Offset: 0x03C) SMC ECC parity 3 Register
Definition: component_smc.h:66
RoReg SMC_ECC_PR1
(Smc Offset: 0x030) SMC ECC parity 1 Register
Definition: component_smc.h:63
RoReg SMC_ECC_PR12
(Smc Offset: 0x060) SMC ECC parity 12 Register
Definition: component_smc.h:75
RwReg SMC_TIMINGS
(SmcCs_number Offset: 0xC) SMC Timings Register
Definition: component_smc.h:45
WoReg SMC_ECC_CTRL
(Smc Offset: 0x020) SMC ECC Control Register
Definition: component_smc.h:59
WoReg SMC_CTRL
(Smc Offset: 0x004) SMC NFC Control Register
Definition: component_smc.h:52
RoReg SMC_ECC_PR6
(Smc Offset: 0x048) SMC ECC parity 6 Register
Definition: component_smc.h:69
RwReg SMC_BANK
(Smc Offset: 0x01C) SMC Bank Address Register
Definition: component_smc.h:58
RwReg SMC_CFG
(Smc Offset: 0x000) SMC NFC Configuration Register
Definition: component_smc.h:51
RoReg SMC_ECC_PR8
(Smc Offset: 0x050) SMC ECC parity 8 Register
Definition: component_smc.h:71
RoReg SMC_ECC_PR0
(Smc Offset: 0x02C) SMC ECC Parity 0 Register
Definition: component_smc.h:62
RoReg SMC_ECC_SR1
(Smc Offset: 0x028) SMC ECC Status 1 Register
Definition: component_smc.h:61
volatile const uint32_t RoReg
Definition: sam3n00a.h:49
RoReg SMC_ECC_PR10
(Smc Offset: 0x058) SMC ECC parity 10 Register
Definition: component_smc.h:73
SmcCs_number hardware registers.
Definition: component_smc.h:41
RoReg SMC_ECC_PR7
(Smc Offset: 0x04C) SMC ECC parity 7 Register
Definition: component_smc.h:70
RoReg SMC_SR
(Smc Offset: 0x008) SMC NFC Status Register
Definition: component_smc.h:53
RwReg SMC_ADDR
(Smc Offset: 0x018) SMC NFC Address Cycle Zero Register
Definition: component_smc.h:57
RoReg SMC_ECC_PR4
(Smc Offset: 0x040) SMC ECC parity 4 Register
Definition: component_smc.h:67
RoReg SMC_ECC_PR13
(Smc Offset: 0x064) SMC ECC parity 13 Register
Definition: component_smc.h:76
WoReg SMC_IER
(Smc Offset: 0x00C) SMC NFC Interrupt Enable Register
Definition: component_smc.h:54