1 /**
2  * \file
3  *
4  * \brief Header file for ATSAME70Q21B
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 _SAME70Q21B_H_
32 #define _SAME70Q21B_H_
33 
34 /** \addtogroup SAME70Q21B_definitions SAME70Q21B definitions
35   This file defines all structures and symbols for SAME70Q21B:
36     - registers and bitfields
37     - peripheral base address
38     - peripheral ID
39     - PIO definitions
40  *  @{
41  */
42 
43 #ifdef __cplusplus
44  extern "C" {
45 #endif
46 
47 /** \defgroup Atmel_glob_defs Atmel Global Defines
48 
49     <strong>IO Type Qualifiers</strong> are used
50     \li to specify the access to peripheral variables.
51     \li for automatic generation of peripheral register debug information.
52 
53     \remark
54     CMSIS core has a syntax that differs from this using i.e. __I, __O, or __IO followed by 'uint<size>_t' respective types.
55     Default the header files will follow the CMSIS core syntax.
56  *  @{
57  */
58 
59 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
60 #include <stdint.h>
61 
62 /* IO definitions (access restrictions to peripheral registers) */
63 #ifndef __cplusplus
64 typedef volatile const uint32_t RoReg;   /**< Read only 32-bit register (volatile const unsigned int) */
65 typedef volatile const uint16_t RoReg16; /**< Read only 16-bit register (volatile const unsigned int) */
66 typedef volatile const uint8_t  RoReg8;  /**< Read only  8-bit register (volatile const unsigned int) */
67 #else
68 typedef volatile       uint32_t RoReg;   /**< Read only 32-bit register (volatile const unsigned int) */
69 typedef volatile       uint16_t RoReg16; /**< Read only 16-bit register (volatile const unsigned int) */
70 typedef volatile       uint8_t  RoReg8;  /**< Read only  8-bit register (volatile const unsigned int) */
71 #endif
72 typedef volatile       uint32_t WoReg;   /**< Write only 32-bit register (volatile unsigned int) */
73 typedef volatile       uint16_t WoReg16; /**< Write only 16-bit register (volatile unsigned int) */
74 typedef volatile       uint8_t  WoReg8;  /**< Write only  8-bit register (volatile unsigned int) */
75 typedef volatile       uint32_t RwReg;   /**< Read-Write 32-bit register (volatile unsigned int) */
76 typedef volatile       uint16_t RwReg16; /**< Read-Write 16-bit register (volatile unsigned int) */
77 typedef volatile       uint8_t  RwReg8;  /**< Read-Write  8-bit register (volatile unsigned int) */
78 
79 #define CAST(type, value) ((type *)(value)) /**< Pointer Type Conversion Macro for C/C++ */
80 #define REG_ACCESS(type, address) (*(type*)(address)) /**< C code: Register value */
81 #else /* Assembler */
82 #define CAST(type, value) (value) /**< Pointer Type Conversion Macro for Assembler */
83 #define REG_ACCESS(type, address) (address) /**< Assembly code: Register address */
84 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
85 
86 #if !defined(SKIP_INTEGER_LITERALS)
87 
88 #if defined(_U_) || defined(_L_) || defined(_UL_)
89   #error "Integer Literals macros already defined elsewhere"
90 #endif
91 
92 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
93 /* Macros that deal with adding suffixes to integer literal constants for C/C++ */
94 #define _U_(x) x ## U    /**< C code: Unsigned integer literal constant value */
95 #define _L_(x) x ## L    /**< C code: Long integer literal constant value */
96 #define _UL_(x) x ## UL  /**< C code: Unsigned Long integer literal constant value */
97 
98 #else /* Assembler */
99 
100 #define _U_(x) x    /**< Assembler: Unsigned integer literal constant value */
101 #define _L_(x) x    /**< Assembler: Long integer literal constant value */
102 #define _UL_(x) x   /**< Assembler: Unsigned Long integer literal constant value */
103 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
104 
105 #endif /* SKIP_INTEGER_LITERALS */
106 /** @}  end of Atmel Global Defines */
107 
108 /** \addtogroup SAME70Q21B_cmsis CMSIS Definitions
109  *  @{
110  */
111 /* ************************************************************************** */
112 /*   CMSIS DEFINITIONS FOR SAME70Q21B */
113 /* ************************************************************************** */
114 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
115 /** Interrupt Number Definition */
116 typedef enum IRQn
117 {
118 /******  CORTEX-M7 Processor Exceptions Numbers ******************************/
119   Reset_IRQn                = -15, /**< 1   Reset Vector, invoked on Power up and warm reset  */
120   NonMaskableInt_IRQn       = -14, /**< 2   Non maskable Interrupt, cannot be stopped or preempted  */
121   HardFault_IRQn            = -13, /**< 3   Hard Fault, all classes of Fault     */
122   MemoryManagement_IRQn     = -12, /**< 4   Memory Management, MPU mismatch, including Access Violation and No Match  */
123   BusFault_IRQn             = -11, /**< 5   Bus Fault, Pre-Fetch-, Memory Access Fault, other address/memory related Fault  */
124   UsageFault_IRQn           = -10, /**< 6   Usage Fault, i.e. Undef Instruction, Illegal State Transition  */
125   SVCall_IRQn               = -5 , /**< 11  System Service Call via SVC instruction  */
126   DebugMonitor_IRQn         = -4 , /**< 12  Debug Monitor                        */
127   PendSV_IRQn               = -2 , /**< 14  Pendable request for system service  */
128   SysTick_IRQn              = -1 , /**< 15  System Tick Timer                    */
129 /******  SAME70Q21B specific Interrupt Numbers ***********************************/
130   SUPC_IRQn                 = 0  , /**< 0   SAME70Q21B Supply Controller (SUPC) */
131   RSTC_IRQn                 = 1  , /**< 1   SAME70Q21B Reset Controller (RSTC)  */
132   RTC_IRQn                  = 2  , /**< 2   SAME70Q21B Real-time Clock (RTC)    */
133   RTT_IRQn                  = 3  , /**< 3   SAME70Q21B Real-time Timer (RTT)    */
134   WDT_IRQn                  = 4  , /**< 4   SAME70Q21B Watchdog Timer (WDT)     */
135   PMC_IRQn                  = 5  , /**< 5   SAME70Q21B Power Management Controller (PMC) */
136   EFC_IRQn                  = 6  , /**< 6   SAME70Q21B Embedded Flash Controller (EFC) */
137   UART0_IRQn                = 7  , /**< 7   SAME70Q21B Universal Asynchronous Receiver Transmitter (UART0) */
138   UART1_IRQn                = 8  , /**< 8   SAME70Q21B Universal Asynchronous Receiver Transmitter (UART1) */
139   PIOA_IRQn                 = 10 , /**< 10  SAME70Q21B Parallel Input/Output Controller (PIOA) */
140   PIOB_IRQn                 = 11 , /**< 11  SAME70Q21B Parallel Input/Output Controller (PIOB) */
141   PIOC_IRQn                 = 12 , /**< 12  SAME70Q21B Parallel Input/Output Controller (PIOC) */
142   USART0_IRQn               = 13 , /**< 13  SAME70Q21B Universal Synchronous Asynchronous Receiver Transmitter (USART0) */
143   USART1_IRQn               = 14 , /**< 14  SAME70Q21B Universal Synchronous Asynchronous Receiver Transmitter (USART1) */
144   USART2_IRQn               = 15 , /**< 15  SAME70Q21B Universal Synchronous Asynchronous Receiver Transmitter (USART2) */
145   PIOD_IRQn                 = 16 , /**< 16  SAME70Q21B Parallel Input/Output Controller (PIOD) */
146   PIOE_IRQn                 = 17 , /**< 17  SAME70Q21B Parallel Input/Output Controller (PIOE) */
147   HSMCI_IRQn                = 18 , /**< 18  SAME70Q21B High Speed MultiMedia Card Interface (HSMCI) */
148   TWIHS0_IRQn               = 19 , /**< 19  SAME70Q21B Two-wire Interface High Speed (TWIHS0) */
149   TWIHS1_IRQn               = 20 , /**< 20  SAME70Q21B Two-wire Interface High Speed (TWIHS1) */
150   SPI0_IRQn                 = 21 , /**< 21  SAME70Q21B Serial Peripheral Interface (SPI0) */
151   SSC_IRQn                  = 22 , /**< 22  SAME70Q21B Synchronous Serial Controller (SSC) */
152   TC0_IRQn                  = 23 , /**< 23  SAME70Q21B Timer Counter (TC0)      */
153   TC1_IRQn                  = 24 , /**< 24  SAME70Q21B Timer Counter (TC0)      */
154   TC2_IRQn                  = 25 , /**< 25  SAME70Q21B Timer Counter (TC0)      */
155   TC3_IRQn                  = 26 , /**< 26  SAME70Q21B Timer Counter (TC1)      */
156   TC4_IRQn                  = 27 , /**< 27  SAME70Q21B Timer Counter (TC1)      */
157   TC5_IRQn                  = 28 , /**< 28  SAME70Q21B Timer Counter (TC1)      */
158   AFEC0_IRQn                = 29 , /**< 29  SAME70Q21B Analog Front-End Controller (AFEC0) */
159   DACC_IRQn                 = 30 , /**< 30  SAME70Q21B Digital-to-Analog Converter Controller (DACC) */
160   PWM0_IRQn                 = 31 , /**< 31  SAME70Q21B Pulse Width Modulation Controller (PWM0) */
161   ICM_IRQn                  = 32 , /**< 32  SAME70Q21B Integrity Check Monitor (ICM) */
162   ACC_IRQn                  = 33 , /**< 33  SAME70Q21B Analog Comparator Controller (ACC) */
163   USBHS_IRQn                = 34 , /**< 34  SAME70Q21B USB High-Speed Interface (USBHS) */
164   MCAN0_INT0_IRQn           = 35 , /**< 35  SAME70Q21B Controller Area Network (MCAN0) */
165   MCAN0_INT1_IRQn           = 36 , /**< 36  SAME70Q21B Controller Area Network (MCAN0) */
166   MCAN1_INT0_IRQn           = 37 , /**< 37  SAME70Q21B Controller Area Network (MCAN1) */
167   MCAN1_INT1_IRQn           = 38 , /**< 38  SAME70Q21B Controller Area Network (MCAN1) */
168   GMAC_IRQn                 = 39 , /**< 39  SAME70Q21B Gigabit Ethernet MAC (GMAC) */
169   AFEC1_IRQn                = 40 , /**< 40  SAME70Q21B Analog Front-End Controller (AFEC1) */
170   TWIHS2_IRQn               = 41 , /**< 41  SAME70Q21B Two-wire Interface High Speed (TWIHS2) */
171   SPI1_IRQn                 = 42 , /**< 42  SAME70Q21B Serial Peripheral Interface (SPI1) */
172   QSPI_IRQn                 = 43 , /**< 43  SAME70Q21B Quad Serial Peripheral Interface (QSPI) */
173   UART2_IRQn                = 44 , /**< 44  SAME70Q21B Universal Asynchronous Receiver Transmitter (UART2) */
174   UART3_IRQn                = 45 , /**< 45  SAME70Q21B Universal Asynchronous Receiver Transmitter (UART3) */
175   UART4_IRQn                = 46 , /**< 46  SAME70Q21B Universal Asynchronous Receiver Transmitter (UART4) */
176   TC6_IRQn                  = 47 , /**< 47  SAME70Q21B Timer Counter (TC2)      */
177   TC7_IRQn                  = 48 , /**< 48  SAME70Q21B Timer Counter (TC2)      */
178   TC8_IRQn                  = 49 , /**< 49  SAME70Q21B Timer Counter (TC2)      */
179   TC9_IRQn                  = 50 , /**< 50  SAME70Q21B Timer Counter (TC3)      */
180   TC10_IRQn                 = 51 , /**< 51  SAME70Q21B Timer Counter (TC3)      */
181   TC11_IRQn                 = 52 , /**< 52  SAME70Q21B Timer Counter (TC3)      */
182   AES_IRQn                  = 56 , /**< 56  SAME70Q21B Advanced Encryption Standard (AES) */
183   TRNG_IRQn                 = 57 , /**< 57  SAME70Q21B True Random Number Generator (TRNG) */
184   XDMAC_IRQn                = 58 , /**< 58  SAME70Q21B Extensible DMA Controller (XDMAC) */
185   ISI_IRQn                  = 59 , /**< 59  SAME70Q21B Image Sensor Interface (ISI) */
186   PWM1_IRQn                 = 60 , /**< 60  SAME70Q21B Pulse Width Modulation Controller (PWM1) */
187   FPU_IRQn                  = 61 , /**< 61  SAME70Q21B Floating Point Unit (FPU) */
188   SDRAMC_IRQn               = 62 , /**< 62  SAME70Q21B SDRAM Controller (SDRAMC) */
189   RSWDT_IRQn                = 63 , /**< 63  SAME70Q21B Reinforced Safety Watchdog Timer (RSWDT) */
190   CCW_IRQn                  = 64 , /**< 64  SAME70Q21B System Control Block (SCB) */
191   CCF_IRQn                  = 65 , /**< 65  SAME70Q21B System Control Block (SCB) */
192   GMAC_Q1_IRQn              = 66 , /**< 66  SAME70Q21B Gigabit Ethernet MAC (GMAC) */
193   GMAC_Q2_IRQn              = 67 , /**< 67  SAME70Q21B Gigabit Ethernet MAC (GMAC) */
194   IXC_IRQn                  = 68 , /**< 68  SAME70Q21B Floating Point Unit (FPU) */
195   I2SC0_IRQn                = 69 , /**< 69  SAME70Q21B Inter-IC Sound Controller (I2SC0) */
196   I2SC1_IRQn                = 70 , /**< 70  SAME70Q21B Inter-IC Sound Controller (I2SC1) */
197   GMAC_Q3_IRQn              = 71 , /**< 71  SAME70Q21B Gigabit Ethernet MAC (GMAC) */
198   GMAC_Q4_IRQn              = 72 , /**< 72  SAME70Q21B Gigabit Ethernet MAC (GMAC) */
199   GMAC_Q5_IRQn              = 73 , /**< 73  SAME70Q21B Gigabit Ethernet MAC (GMAC) */
200 
201   PERIPH_COUNT_IRQn        = 74  /**< Number of peripheral IDs */
202 } IRQn_Type;
203 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
204 
205 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
206 typedef struct _DeviceVectors
207 {
208   /* Stack pointer */
209   void* pvStack;
210   /* Cortex-M handlers */
211   void* pfnReset_Handler;                        /* -15 Reset Vector, invoked on Power up and warm reset  */
212   void* pfnNonMaskableInt_Handler;               /* -14 Non maskable Interrupt, cannot be stopped or preempted  */
213   void* pfnHardFault_Handler;                    /* -13 Hard Fault, all classes of Fault     */
214   void* pfnMemoryManagement_Handler;             /* -12 Memory Management, MPU mismatch, including Access Violation and No Match  */
215   void* pfnBusFault_Handler;                     /* -11 Bus Fault, Pre-Fetch-, Memory Access Fault, other address/memory related Fault  */
216   void* pfnUsageFault_Handler;                   /* -10 Usage Fault, i.e. Undef Instruction, Illegal State Transition  */
217   void* pvReservedC9;
218   void* pvReservedC8;
219   void* pvReservedC7;
220   void* pvReservedC6;
221   void* pfnSVCall_Handler;                       /*  -5 System Service Call via SVC instruction  */
222   void* pfnDebugMonitor_Handler;                 /*  -4 Debug Monitor                        */
223   void* pvReservedC3;
224   void* pfnPendSV_Handler;                       /*  -2 Pendable request for system service  */
225   void* pfnSysTick_Handler;                      /*  -1 System Tick Timer                    */
226 
227 
228   /* Peripheral handlers */
229   void* pfnSUPC_Handler;                         /* 0   SAME70Q21B Supply Controller (SUPC) */
230   void* pfnRSTC_Handler;                         /* 1   SAME70Q21B Reset Controller (RSTC) */
231   void* pfnRTC_Handler;                          /* 2   SAME70Q21B Real-time Clock (RTC) */
232   void* pfnRTT_Handler;                          /* 3   SAME70Q21B Real-time Timer (RTT) */
233   void* pfnWDT_Handler;                          /* 4   SAME70Q21B Watchdog Timer (WDT) */
234   void* pfnPMC_Handler;                          /* 5   SAME70Q21B Power Management Controller (PMC) */
235   void* pfnEFC_Handler;                          /* 6   SAME70Q21B Embedded Flash Controller (EFC) */
236   void* pfnUART0_Handler;                        /* 7   SAME70Q21B Universal Asynchronous Receiver Transmitter (UART0) */
237   void* pfnUART1_Handler;                        /* 8   SAME70Q21B Universal Asynchronous Receiver Transmitter (UART1) */
238   void* pvReserved9;
239   void* pfnPIOA_Handler;                         /* 10  SAME70Q21B Parallel Input/Output Controller (PIOA) */
240   void* pfnPIOB_Handler;                         /* 11  SAME70Q21B Parallel Input/Output Controller (PIOB) */
241   void* pfnPIOC_Handler;                         /* 12  SAME70Q21B Parallel Input/Output Controller (PIOC) */
242   void* pfnUSART0_Handler;                       /* 13  SAME70Q21B Universal Synchronous Asynchronous Receiver Transmitter (USART0) */
243   void* pfnUSART1_Handler;                       /* 14  SAME70Q21B Universal Synchronous Asynchronous Receiver Transmitter (USART1) */
244   void* pfnUSART2_Handler;                       /* 15  SAME70Q21B Universal Synchronous Asynchronous Receiver Transmitter (USART2) */
245   void* pfnPIOD_Handler;                         /* 16  SAME70Q21B Parallel Input/Output Controller (PIOD) */
246   void* pfnPIOE_Handler;                         /* 17  SAME70Q21B Parallel Input/Output Controller (PIOE) */
247   void* pfnHSMCI_Handler;                        /* 18  SAME70Q21B High Speed MultiMedia Card Interface (HSMCI) */
248   void* pfnTWIHS0_Handler;                       /* 19  SAME70Q21B Two-wire Interface High Speed (TWIHS0) */
249   void* pfnTWIHS1_Handler;                       /* 20  SAME70Q21B Two-wire Interface High Speed (TWIHS1) */
250   void* pfnSPI0_Handler;                         /* 21  SAME70Q21B Serial Peripheral Interface (SPI0) */
251   void* pfnSSC_Handler;                          /* 22  SAME70Q21B Synchronous Serial Controller (SSC) */
252   void* pfnTC0_Handler;                          /* 23  SAME70Q21B Timer Counter (TC0) */
253   void* pfnTC1_Handler;                          /* 24  SAME70Q21B Timer Counter (TC0) */
254   void* pfnTC2_Handler;                          /* 25  SAME70Q21B Timer Counter (TC0) */
255   void* pfnTC3_Handler;                          /* 26  SAME70Q21B Timer Counter (TC1) */
256   void* pfnTC4_Handler;                          /* 27  SAME70Q21B Timer Counter (TC1) */
257   void* pfnTC5_Handler;                          /* 28  SAME70Q21B Timer Counter (TC1) */
258   void* pfnAFEC0_Handler;                        /* 29  SAME70Q21B Analog Front-End Controller (AFEC0) */
259   void* pfnDACC_Handler;                         /* 30  SAME70Q21B Digital-to-Analog Converter Controller (DACC) */
260   void* pfnPWM0_Handler;                         /* 31  SAME70Q21B Pulse Width Modulation Controller (PWM0) */
261   void* pfnICM_Handler;                          /* 32  SAME70Q21B Integrity Check Monitor (ICM) */
262   void* pfnACC_Handler;                          /* 33  SAME70Q21B Analog Comparator Controller (ACC) */
263   void* pfnUSBHS_Handler;                        /* 34  SAME70Q21B USB High-Speed Interface (USBHS) */
264   void* pfnMCAN0_INT0_Handler;                   /* 35  SAME70Q21B Controller Area Network (MCAN0) */
265   void* pfnMCAN0_INT1_Handler;                   /* 36  SAME70Q21B Controller Area Network (MCAN0) */
266   void* pfnMCAN1_INT0_Handler;                   /* 37  SAME70Q21B Controller Area Network (MCAN1) */
267   void* pfnMCAN1_INT1_Handler;                   /* 38  SAME70Q21B Controller Area Network (MCAN1) */
268   void* pfnGMAC_Handler;                         /* 39  SAME70Q21B Gigabit Ethernet MAC (GMAC) */
269   void* pfnAFEC1_Handler;                        /* 40  SAME70Q21B Analog Front-End Controller (AFEC1) */
270   void* pfnTWIHS2_Handler;                       /* 41  SAME70Q21B Two-wire Interface High Speed (TWIHS2) */
271   void* pfnSPI1_Handler;                         /* 42  SAME70Q21B Serial Peripheral Interface (SPI1) */
272   void* pfnQSPI_Handler;                         /* 43  SAME70Q21B Quad Serial Peripheral Interface (QSPI) */
273   void* pfnUART2_Handler;                        /* 44  SAME70Q21B Universal Asynchronous Receiver Transmitter (UART2) */
274   void* pfnUART3_Handler;                        /* 45  SAME70Q21B Universal Asynchronous Receiver Transmitter (UART3) */
275   void* pfnUART4_Handler;                        /* 46  SAME70Q21B Universal Asynchronous Receiver Transmitter (UART4) */
276   void* pfnTC6_Handler;                          /* 47  SAME70Q21B Timer Counter (TC2) */
277   void* pfnTC7_Handler;                          /* 48  SAME70Q21B Timer Counter (TC2) */
278   void* pfnTC8_Handler;                          /* 49  SAME70Q21B Timer Counter (TC2) */
279   void* pfnTC9_Handler;                          /* 50  SAME70Q21B Timer Counter (TC3) */
280   void* pfnTC10_Handler;                         /* 51  SAME70Q21B Timer Counter (TC3) */
281   void* pfnTC11_Handler;                         /* 52  SAME70Q21B Timer Counter (TC3) */
282   void* pvReserved53;
283   void* pvReserved54;
284   void* pvReserved55;
285   void* pfnAES_Handler;                          /* 56  SAME70Q21B Advanced Encryption Standard (AES) */
286   void* pfnTRNG_Handler;                         /* 57  SAME70Q21B True Random Number Generator (TRNG) */
287   void* pfnXDMAC_Handler;                        /* 58  SAME70Q21B Extensible DMA Controller (XDMAC) */
288   void* pfnISI_Handler;                          /* 59  SAME70Q21B Image Sensor Interface (ISI) */
289   void* pfnPWM1_Handler;                         /* 60  SAME70Q21B Pulse Width Modulation Controller (PWM1) */
290   void* pfnFPU_Handler;                          /* 61  SAME70Q21B Floating Point Unit (FPU) */
291   void* pfnSDRAMC_Handler;                       /* 62  SAME70Q21B SDRAM Controller (SDRAMC) */
292   void* pfnRSWDT_Handler;                        /* 63  SAME70Q21B Reinforced Safety Watchdog Timer (RSWDT) */
293   void* pfnCCW_Handler;                          /* 64  SAME70Q21B System Control Block (SCB) */
294   void* pfnCCF_Handler;                          /* 65  SAME70Q21B System Control Block (SCB) */
295   void* pfnGMAC_Q1_Handler;                      /* 66  SAME70Q21B Gigabit Ethernet MAC (GMAC) */
296   void* pfnGMAC_Q2_Handler;                      /* 67  SAME70Q21B Gigabit Ethernet MAC (GMAC) */
297   void* pfnIXC_Handler;                          /* 68  SAME70Q21B Floating Point Unit (FPU) */
298   void* pfnI2SC0_Handler;                        /* 69  SAME70Q21B Inter-IC Sound Controller (I2SC0) */
299   void* pfnI2SC1_Handler;                        /* 70  SAME70Q21B Inter-IC Sound Controller (I2SC1) */
300   void* pfnGMAC_Q3_Handler;                      /* 71  SAME70Q21B Gigabit Ethernet MAC (GMAC) */
301   void* pfnGMAC_Q4_Handler;                      /* 72  SAME70Q21B Gigabit Ethernet MAC (GMAC) */
302   void* pfnGMAC_Q5_Handler;                      /* 73  SAME70Q21B Gigabit Ethernet MAC (GMAC) */
303 } DeviceVectors;
304 
305 /* Defines for Deprecated Interrupt and Exceptions handler names */
306 #define pfnMemManage_Handler      pfnMemoryManagement_Handler     /**< \deprecated  Backward compatibility for ASF */
307 #define pfnDebugMon_Handler       pfnDebugMonitor_Handler         /**< \deprecated  Backward compatibility for ASF */
308 #define pfnNMI_Handler            pfnNonMaskableInt_Handler       /**< \deprecated  Backward compatibility for ASF */
309 #define pfnSVC_Handler            pfnSVCall_Handler               /**< \deprecated  Backward compatibility for ASF */
310 
311 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
312 
313 #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
314 #if !defined DONT_USE_PREDEFINED_CORE_HANDLERS
315 
316 /* CORTEX-M7 core handlers */
317 void Reset_Handler                 ( void );
318 void NonMaskableInt_Handler        ( void );
319 void HardFault_Handler             ( void );
320 void MemoryManagement_Handler      ( void );
321 void BusFault_Handler              ( void );
322 void UsageFault_Handler            ( void );
323 void SVCall_Handler                ( void );
324 void DebugMonitor_Handler          ( void );
325 void PendSV_Handler                ( void );
326 void SysTick_Handler               ( void );
327 #endif /* DONT_USE_PREDEFINED_CORE_HANDLERS */
328 
329 #if !defined DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS
330 
331 /* Peripherals handlers */
332 void ACC_Handler                   ( void );
333 void AES_Handler                   ( void );
334 void AFEC0_Handler                 ( void );
335 void AFEC1_Handler                 ( void );
336 void CCF_Handler                   ( void );
337 void CCW_Handler                   ( void );
338 void DACC_Handler                  ( void );
339 void EFC_Handler                   ( void );
340 void FPU_Handler                   ( void );
341 void GMAC_Handler                  ( void );
342 void GMAC_Q1_Handler               ( void );
343 void GMAC_Q2_Handler               ( void );
344 void GMAC_Q3_Handler               ( void );
345 void GMAC_Q4_Handler               ( void );
346 void GMAC_Q5_Handler               ( void );
347 void HSMCI_Handler                 ( void );
348 void I2SC0_Handler                 ( void );
349 void I2SC1_Handler                 ( void );
350 void ICM_Handler                   ( void );
351 void ISI_Handler                   ( void );
352 void IXC_Handler                   ( void );
353 void MCAN0_INT0_Handler            ( void );
354 void MCAN0_INT1_Handler            ( void );
355 void MCAN1_INT0_Handler            ( void );
356 void MCAN1_INT1_Handler            ( void );
357 void PIOA_Handler                  ( void );
358 void PIOB_Handler                  ( void );
359 void PIOC_Handler                  ( void );
360 void PIOD_Handler                  ( void );
361 void PIOE_Handler                  ( void );
362 void PMC_Handler                   ( void );
363 void PWM0_Handler                  ( void );
364 void PWM1_Handler                  ( void );
365 void QSPI_Handler                  ( void );
366 void RSTC_Handler                  ( void );
367 void RSWDT_Handler                 ( void );
368 void RTC_Handler                   ( void );
369 void RTT_Handler                   ( void );
370 void SDRAMC_Handler                ( void );
371 void SPI0_Handler                  ( void );
372 void SPI1_Handler                  ( void );
373 void SSC_Handler                   ( void );
374 void SUPC_Handler                  ( void );
375 void TC0_Handler                   ( void );
376 void TC10_Handler                  ( void );
377 void TC11_Handler                  ( void );
378 void TC1_Handler                   ( void );
379 void TC2_Handler                   ( void );
380 void TC3_Handler                   ( void );
381 void TC4_Handler                   ( void );
382 void TC5_Handler                   ( void );
383 void TC6_Handler                   ( void );
384 void TC7_Handler                   ( void );
385 void TC8_Handler                   ( void );
386 void TC9_Handler                   ( void );
387 void TRNG_Handler                  ( void );
388 void TWIHS0_Handler                ( void );
389 void TWIHS1_Handler                ( void );
390 void TWIHS2_Handler                ( void );
391 void UART0_Handler                 ( void );
392 void UART1_Handler                 ( void );
393 void UART2_Handler                 ( void );
394 void UART3_Handler                 ( void );
395 void UART4_Handler                 ( void );
396 void USART0_Handler                ( void );
397 void USART1_Handler                ( void );
398 void USART2_Handler                ( void );
399 void USBHS_Handler                 ( void );
400 void WDT_Handler                   ( void );
401 void XDMAC_Handler                 ( void );
402 #endif /* DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS */
403 
404 
405 /* Defines for Deprecated Interrupt and Exceptions handler names */
406 #define MemManage_Handler         MemoryManagement_Handler        /**< \deprecated  Backward compatibility for ASF */
407 #define DebugMon_Handler          DebugMonitor_Handler            /**< \deprecated  Backward compatibility for ASF */
408 #define NMI_Handler               NonMaskableInt_Handler          /**< \deprecated  Backward compatibility for ASF */
409 #define SVC_Handler               SVCall_Handler                  /**< \deprecated  Backward compatibility for ASF */
410 
411 #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
412 
413 
414 /*
415  * \brief Configuration of the CORTEX-M7 Processor and Core Peripherals
416  */
417 
418 #define __CM7_REV                 0x0101 /**< CM7 Core Revision                                                         */
419 #define __NVIC_PRIO_BITS               3 /**< Number of Bits used for Priority Levels                                   */
420 #define __Vendor_SysTickConfig         0 /**< Set to 1 if different SysTick Config is used                              */
421 #define __MPU_PRESENT                  1 /**< MPU present or not                                                        */
422 #define __VTOR_PRESENT                 1 /**< Vector Table Offset Register present or not                               */
423 #define __FPU_PRESENT                  1 /**< FPU present or not                                                        */
424 #define __FPU_DP                       1 /**< Double Precision FPU                                                      */
425 #define __ICACHE_PRESENT               1 /**< Instruction Cache present                                                 */
426 #define __DCACHE_PRESENT               1 /**< Data Cache present                                                        */
427 #define __ITCM_PRESENT                 1 /**< Instruction TCM present                                                   */
428 #define __DTCM_PRESENT                 1 /**< Data TCM present                                                          */
429 #define __DEBUG_LVL                    1
430 #define __TRACE_LVL                    1
431 #define __ARCH_ARM                     1
432 #define __ARCH_ARM_CORTEX_M            1
433 #define __DEVICE_IS_SAM                1
434 
435 /*
436  * \brief CMSIS includes
437  */
438 #include <core_cm7.h>
439 #if !defined DONT_USE_CMSIS_INIT
440 #include "system_same70.h"
441 #endif /* DONT_USE_CMSIS_INIT */
442 
443 /** @}  end of SAME70Q21B_cmsis CMSIS Definitions */
444 
445 /** \defgroup SAME70Q21B_api Peripheral Software API
446  *  @{
447  */
448 
449 /* ************************************************************************** */
450 /**  SOFTWARE PERIPHERAL API DEFINITION FOR SAME70Q21B */
451 /* ************************************************************************** */
452 #include "component/acc.h"
453 #include "component/aes.h"
454 #include "component/afec.h"
455 #include "component/chipid.h"
456 #include "component/dacc.h"
457 #include "component/efc.h"
458 #include "component/gmac.h"
459 #include "component/gpbr.h"
460 #include "component/hsmci.h"
461 #include "component/i2sc.h"
462 #include "component/icm.h"
463 #include "component/isi.h"
464 #include "component/matrix.h"
465 #include "component/mcan.h"
466 #include "component/pio.h"
467 #include "component/pmc.h"
468 #include "component/pwm.h"
469 #include "component/qspi.h"
470 #include "component/rstc.h"
471 #include "component/rswdt.h"
472 #include "component/rtc.h"
473 #include "component/rtt.h"
474 #include "component/sdramc.h"
475 #include "component/smc.h"
476 #include "component/spi.h"
477 #include "component/ssc.h"
478 #include "component/supc.h"
479 #include "component/tc.h"
480 #include "component/trng.h"
481 #include "component/twihs.h"
482 #include "component/uart.h"
483 #include "component/usart.h"
484 #include "component/usbhs.h"
485 #include "component/utmi.h"
486 #include "component/wdt.h"
487 #include "component/xdmac.h"
488 /** @}  end of Peripheral Software API */
489 
490 /** \defgroup SAME70Q21B_reg Registers Access Definitions
491  *  @{
492  */
493 
494 /* ************************************************************************** */
495 /*   REGISTER ACCESS DEFINITIONS FOR SAME70Q21B */
496 /* ************************************************************************** */
497 #include "instance/acc.h"
498 #include "instance/aes.h"
499 #include "instance/afec0.h"
500 #include "instance/afec1.h"
501 #include "instance/chipid.h"
502 #include "instance/dacc.h"
503 #include "instance/efc.h"
504 #include "instance/gmac.h"
505 #include "instance/gpbr.h"
506 #include "instance/hsmci.h"
507 #include "instance/i2sc0.h"
508 #include "instance/i2sc1.h"
509 #include "instance/icm.h"
510 #include "instance/isi.h"
511 #include "instance/matrix.h"
512 #include "instance/mcan0.h"
513 #include "instance/mcan1.h"
514 #include "instance/pioa.h"
515 #include "instance/piob.h"
516 #include "instance/pioc.h"
517 #include "instance/piod.h"
518 #include "instance/pioe.h"
519 #include "instance/pmc.h"
520 #include "instance/pwm0.h"
521 #include "instance/pwm1.h"
522 #include "instance/qspi.h"
523 #include "instance/rstc.h"
524 #include "instance/rswdt.h"
525 #include "instance/rtc.h"
526 #include "instance/rtt.h"
527 #include "instance/sdramc.h"
528 #include "instance/smc.h"
529 #include "instance/spi0.h"
530 #include "instance/spi1.h"
531 #include "instance/ssc.h"
532 #include "instance/supc.h"
533 #include "instance/tc0.h"
534 #include "instance/tc1.h"
535 #include "instance/tc2.h"
536 #include "instance/tc3.h"
537 #include "instance/trng.h"
538 #include "instance/twihs0.h"
539 #include "instance/twihs1.h"
540 #include "instance/twihs2.h"
541 #include "instance/uart0.h"
542 #include "instance/uart1.h"
543 #include "instance/uart2.h"
544 #include "instance/uart3.h"
545 #include "instance/uart4.h"
546 #include "instance/usart0.h"
547 #include "instance/usart1.h"
548 #include "instance/usart2.h"
549 #include "instance/usbhs.h"
550 #include "instance/utmi.h"
551 #include "instance/wdt.h"
552 #include "instance/xdmac.h"
553 /** @}  end of Registers Access Definitions */
554 
555 /** \addtogroup SAME70Q21B_id Peripheral Ids Definitions
556  *  @{
557  */
558 
559 /* ************************************************************************** */
560 /*  PERIPHERAL ID DEFINITIONS FOR SAME70Q21B */
561 /* ************************************************************************** */
562 #define ID_SUPC         (  0) /**< \brief Supply Controller (SUPC) */
563 #define ID_RSTC         (  1) /**< \brief Reset Controller (RSTC) */
564 #define ID_RTC          (  2) /**< \brief Real-time Clock (RTC) */
565 #define ID_RTT          (  3) /**< \brief Real-time Timer (RTT) */
566 #define ID_WDT          (  4) /**< \brief Watchdog Timer (WDT) */
567 #define ID_PMC          (  5) /**< \brief Power Management Controller (PMC) */
568 #define ID_EFC          (  6) /**< \brief Embedded Flash Controller (EFC) */
569 #define ID_UART0        (  7) /**< \brief Universal Asynchronous Receiver Transmitter (UART0) */
570 #define ID_UART1        (  8) /**< \brief Universal Asynchronous Receiver Transmitter (UART1) */
571 #define ID_SMC          (  9) /**< \brief Static Memory Controller (SMC) */
572 #define ID_PIOA         ( 10) /**< \brief Parallel Input/Output Controller (PIOA) */
573 #define ID_PIOB         ( 11) /**< \brief Parallel Input/Output Controller (PIOB) */
574 #define ID_PIOC         ( 12) /**< \brief Parallel Input/Output Controller (PIOC) */
575 #define ID_USART0       ( 13) /**< \brief Universal Synchronous Asynchronous Receiver Transmitter (USART0) */
576 #define ID_USART1       ( 14) /**< \brief Universal Synchronous Asynchronous Receiver Transmitter (USART1) */
577 #define ID_USART2       ( 15) /**< \brief Universal Synchronous Asynchronous Receiver Transmitter (USART2) */
578 #define ID_PIOD         ( 16) /**< \brief Parallel Input/Output Controller (PIOD) */
579 #define ID_PIOE         ( 17) /**< \brief Parallel Input/Output Controller (PIOE) */
580 #define ID_HSMCI        ( 18) /**< \brief High Speed MultiMedia Card Interface (HSMCI) */
581 #define ID_TWIHS0       ( 19) /**< \brief Two-wire Interface High Speed (TWIHS0) */
582 #define ID_TWIHS1       ( 20) /**< \brief Two-wire Interface High Speed (TWIHS1) */
583 #define ID_SPI0         ( 21) /**< \brief Serial Peripheral Interface (SPI0) */
584 #define ID_SSC          ( 22) /**< \brief Synchronous Serial Controller (SSC) */
585 #define ID_TC0_CHANNEL0 ( 23) /**< \brief Timer Counter (TC0_CHANNEL0) */
586 #define ID_TC0_CHANNEL1 ( 24) /**< \brief Timer Counter (TC0_CHANNEL1) */
587 #define ID_TC0_CHANNEL2 ( 25) /**< \brief Timer Counter (TC0_CHANNEL2) */
588 #define ID_TC1_CHANNEL0 ( 26) /**< \brief Timer Counter (TC1_CHANNEL0) */
589 #define ID_TC1_CHANNEL1 ( 27) /**< \brief Timer Counter (TC1_CHANNEL1) */
590 #define ID_TC1_CHANNEL2 ( 28) /**< \brief Timer Counter (TC1_CHANNEL2) */
591 #define ID_AFEC0        ( 29) /**< \brief Analog Front-End Controller (AFEC0) */
592 #define ID_DACC         ( 30) /**< \brief Digital-to-Analog Converter Controller (DACC) */
593 #define ID_PWM0         ( 31) /**< \brief Pulse Width Modulation Controller (PWM0) */
594 #define ID_ICM          ( 32) /**< \brief Integrity Check Monitor (ICM) */
595 #define ID_ACC          ( 33) /**< \brief Analog Comparator Controller (ACC) */
596 #define ID_USBHS        ( 34) /**< \brief USB High-Speed Interface (USBHS) */
597 #define ID_MCAN0        ( 35) /**< \brief Controller Area Network (MCAN0) */
598 #define ID_MCAN1        ( 37) /**< \brief Controller Area Network (MCAN1) */
599 #define ID_GMAC         ( 39) /**< \brief Gigabit Ethernet MAC (GMAC) */
600 #define ID_AFEC1        ( 40) /**< \brief Analog Front-End Controller (AFEC1) */
601 #define ID_TWIHS2       ( 41) /**< \brief Two-wire Interface High Speed (TWIHS2) */
602 #define ID_SPI1         ( 42) /**< \brief Serial Peripheral Interface (SPI1) */
603 #define ID_QSPI         ( 43) /**< \brief Quad Serial Peripheral Interface (QSPI) */
604 #define ID_UART2        ( 44) /**< \brief Universal Asynchronous Receiver Transmitter (UART2) */
605 #define ID_UART3        ( 45) /**< \brief Universal Asynchronous Receiver Transmitter (UART3) */
606 #define ID_UART4        ( 46) /**< \brief Universal Asynchronous Receiver Transmitter (UART4) */
607 #define ID_TC2_CHANNEL0 ( 47) /**< \brief Timer Counter (TC2_CHANNEL0) */
608 #define ID_TC2_CHANNEL1 ( 48) /**< \brief Timer Counter (TC2_CHANNEL1) */
609 #define ID_TC2_CHANNEL2 ( 49) /**< \brief Timer Counter (TC2_CHANNEL2) */
610 #define ID_TC3_CHANNEL0 ( 50) /**< \brief Timer Counter (TC3_CHANNEL0) */
611 #define ID_TC3_CHANNEL1 ( 51) /**< \brief Timer Counter (TC3_CHANNEL1) */
612 #define ID_TC3_CHANNEL2 ( 52) /**< \brief Timer Counter (TC3_CHANNEL2) */
613 #define ID_AES          ( 56) /**< \brief Advanced Encryption Standard (AES) */
614 #define ID_TRNG         ( 57) /**< \brief True Random Number Generator (TRNG) */
615 #define ID_XDMAC        ( 58) /**< \brief Extensible DMA Controller (XDMAC) */
616 #define ID_ISI          ( 59) /**< \brief Image Sensor Interface (ISI) */
617 #define ID_PWM1         ( 60) /**< \brief Pulse Width Modulation Controller (PWM1) */
618 #define ID_SDRAMC       ( 62) /**< \brief SDRAM Controller (SDRAMC) */
619 #define ID_RSWDT        ( 63) /**< \brief Reinforced Safety Watchdog Timer (RSWDT) */
620 #define ID_I2SC0        ( 69) /**< \brief Inter-IC Sound Controller (I2SC0) */
621 #define ID_I2SC1        ( 70) /**< \brief Inter-IC Sound Controller (I2SC1) */
622 
623 #define ID_PERIPH_COUNT ( 71) /**< \brief Number of peripheral IDs */
624 /** @}  end of Peripheral Ids Definitions */
625 
626 /** \addtogroup legacy_SAME70Q21B_id Legacy Peripheral Ids Definitions
627  *  @{
628  */
629 
630 /* ************************************************************************** */
631 /*  LEGACY PERIPHERAL ID DEFINITIONS FOR SAME70Q21B */
632 /* ************************************************************************** */
633 #define ID_TC0                   TC0_INSTANCE_ID_CHANNEL0
634 #define ID_TC1                   TC0_INSTANCE_ID_CHANNEL1
635 #define ID_TC2                   TC0_INSTANCE_ID_CHANNEL2
636 #define ID_TC3                   TC1_INSTANCE_ID_CHANNEL0
637 #define ID_TC4                   TC1_INSTANCE_ID_CHANNEL1
638 #define ID_TC5                   TC1_INSTANCE_ID_CHANNEL2
639 #define ID_TC6                   TC2_INSTANCE_ID_CHANNEL0
640 #define ID_TC7                   TC2_INSTANCE_ID_CHANNEL1
641 #define ID_TC8                   TC2_INSTANCE_ID_CHANNEL2
642 #define ID_TC9                   TC3_INSTANCE_ID_CHANNEL0
643 #define ID_TC10                  TC3_INSTANCE_ID_CHANNEL1
644 #define ID_TC11                  TC3_INSTANCE_ID_CHANNEL2
645 /** @}  end of Legacy Peripheral Ids Definitions */
646 
647 /** \addtogroup SAME70Q21B_base Peripheral Base Address Definitions
648  *  @{
649  */
650 
651 /* ************************************************************************** */
652 /*   BASE ADDRESS DEFINITIONS FOR SAME70Q21B */
653 /* ************************************************************************** */
654 #if (defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
655 #define ACC                    (0x40044000)                   /**< \brief (ACC       ) Base Address */
656 #define AES                    (0x4006C000)                   /**< \brief (AES       ) Base Address */
657 #define AFEC0                  (0x4003C000)                   /**< \brief (AFEC0     ) Base Address */
658 #define AFEC1                  (0x40064000)                   /**< \brief (AFEC1     ) Base Address */
659 #define CHIPID                 (0x400E0940)                   /**< \brief (CHIPID    ) Base Address */
660 #define DACC                   (0x40040000)                   /**< \brief (DACC      ) Base Address */
661 #define EFC                    (0x400E0C00)                   /**< \brief (EFC       ) Base Address */
662 #define GMAC                   (0x40050000)                   /**< \brief (GMAC      ) Base Address */
663 #define GPBR                   (0x400E1890)                   /**< \brief (GPBR      ) Base Address */
664 #define HSMCI                  (0x40000000)                   /**< \brief (HSMCI     ) Base Address */
665 #define I2SC0                  (0x4008C000)                   /**< \brief (I2SC0     ) Base Address */
666 #define I2SC1                  (0x40090000)                   /**< \brief (I2SC1     ) Base Address */
667 #define ICM                    (0x40048000)                   /**< \brief (ICM       ) Base Address */
668 #define ISI                    (0x4004C000)                   /**< \brief (ISI       ) Base Address */
669 #define MATRIX                 (0x40088000)                   /**< \brief (MATRIX    ) Base Address */
670 #define MCAN0                  (0x40030000)                   /**< \brief (MCAN0     ) Base Address */
671 #define MCAN1                  (0x40034000)                   /**< \brief (MCAN1     ) Base Address */
672 #define PIOA                   (0x400E0E00)                   /**< \brief (PIOA      ) Base Address */
673 #define PIOB                   (0x400E1000)                   /**< \brief (PIOB      ) Base Address */
674 #define PIOC                   (0x400E1200)                   /**< \brief (PIOC      ) Base Address */
675 #define PIOD                   (0x400E1400)                   /**< \brief (PIOD      ) Base Address */
676 #define PIOE                   (0x400E1600)                   /**< \brief (PIOE      ) Base Address */
677 #define PMC                    (0x400E0600)                   /**< \brief (PMC       ) Base Address */
678 #define PWM0                   (0x40020000)                   /**< \brief (PWM0      ) Base Address */
679 #define PWM1                   (0x4005C000)                   /**< \brief (PWM1      ) Base Address */
680 #define QSPI                   (0x4007C000)                   /**< \brief (QSPI      ) Base Address */
681 #define RSTC                   (0x400E1800)                   /**< \brief (RSTC      ) Base Address */
682 #define RSWDT                  (0x400E1900)                   /**< \brief (RSWDT     ) Base Address */
683 #define RTC                    (0x400E1860)                   /**< \brief (RTC       ) Base Address */
684 #define RTT                    (0x400E1830)                   /**< \brief (RTT       ) Base Address */
685 #define SDRAMC                 (0x40084000)                   /**< \brief (SDRAMC    ) Base Address */
686 #define SMC                    (0x40080000)                   /**< \brief (SMC       ) Base Address */
687 #define SPI0                   (0x40008000)                   /**< \brief (SPI0      ) Base Address */
688 #define SPI1                   (0x40058000)                   /**< \brief (SPI1      ) Base Address */
689 #define SSC                    (0x40004000)                   /**< \brief (SSC       ) Base Address */
690 #define SUPC                   (0x400E1810)                   /**< \brief (SUPC      ) Base Address */
691 #define TC0                    (0x4000C000)                   /**< \brief (TC0       ) Base Address */
692 #define TC1                    (0x40010000)                   /**< \brief (TC1       ) Base Address */
693 #define TC2                    (0x40014000)                   /**< \brief (TC2       ) Base Address */
694 #define TC3                    (0x40054000)                   /**< \brief (TC3       ) Base Address */
695 #define TRNG                   (0x40070000)                   /**< \brief (TRNG      ) Base Address */
696 #define TWIHS0                 (0x40018000)                   /**< \brief (TWIHS0    ) Base Address */
697 #define TWIHS1                 (0x4001C000)                   /**< \brief (TWIHS1    ) Base Address */
698 #define TWIHS2                 (0x40060000)                   /**< \brief (TWIHS2    ) Base Address */
699 #define UART0                  (0x400E0800)                   /**< \brief (UART0     ) Base Address */
700 #define UART1                  (0x400E0A00)                   /**< \brief (UART1     ) Base Address */
701 #define UART2                  (0x400E1A00)                   /**< \brief (UART2     ) Base Address */
702 #define UART3                  (0x400E1C00)                   /**< \brief (UART3     ) Base Address */
703 #define UART4                  (0x400E1E00)                   /**< \brief (UART4     ) Base Address */
704 #define USART0                 (0x40024000)                   /**< \brief (USART0    ) Base Address */
705 #define USART1                 (0x40028000)                   /**< \brief (USART1    ) Base Address */
706 #define USART2                 (0x4002C000)                   /**< \brief (USART2    ) Base Address */
707 #define USBHS                  (0x40038000)                   /**< \brief (USBHS     ) Base Address */
708 #define UTMI                   (0x400E0400)                   /**< \brief (UTMI      ) Base Address */
709 #define WDT                    (0x400E1850)                   /**< \brief (WDT       ) Base Address */
710 #define XDMAC                  (0x40078000)                   /**< \brief (XDMAC     ) Base Address */
711 
712 #else /* For C/C++ compiler */
713 
714 #define ACC                    ((Acc *)0x40044000U)           /**< \brief (ACC       ) Base Address */
715 #define ACC_INST_NUM           1                              /**< \brief (ACC       ) Number of instances */
716 #define ACC_INSTS              { ACC }                        /**< \brief (ACC       ) Instances List */
717 
718 #define AES                    ((Aes *)0x4006C000U)           /**< \brief (AES       ) Base Address */
719 #define AES_INST_NUM           1                              /**< \brief (AES       ) Number of instances */
720 #define AES_INSTS              { AES }                        /**< \brief (AES       ) Instances List */
721 
722 #define AFEC0                  ((Afec *)0x4003C000U)          /**< \brief (AFEC0     ) Base Address */
723 #define AFEC1                  ((Afec *)0x40064000U)          /**< \brief (AFEC1     ) Base Address */
724 #define AFEC_INST_NUM          2                              /**< \brief (AFEC      ) Number of instances */
725 #define AFEC_INSTS             { AFEC0, AFEC1 }               /**< \brief (AFEC      ) Instances List */
726 
727 #define CHIPID                 ((Chipid *)0x400E0940U)        /**< \brief (CHIPID    ) Base Address */
728 #define CHIPID_INST_NUM        1                              /**< \brief (CHIPID    ) Number of instances */
729 #define CHIPID_INSTS           { CHIPID }                     /**< \brief (CHIPID    ) Instances List */
730 
731 #define DACC                   ((Dacc *)0x40040000U)          /**< \brief (DACC      ) Base Address */
732 #define DACC_INST_NUM          1                              /**< \brief (DACC      ) Number of instances */
733 #define DACC_INSTS             { DACC }                       /**< \brief (DACC      ) Instances List */
734 
735 #define EFC                    ((Efc *)0x400E0C00U)           /**< \brief (EFC       ) Base Address */
736 #define EFC_INST_NUM           1                              /**< \brief (EFC       ) Number of instances */
737 #define EFC_INSTS              { EFC }                        /**< \brief (EFC       ) Instances List */
738 
739 #define GMAC                   ((Gmac *)0x40050000U)          /**< \brief (GMAC      ) Base Address */
740 #define GMAC_INST_NUM          1                              /**< \brief (GMAC      ) Number of instances */
741 #define GMAC_INSTS             { GMAC }                       /**< \brief (GMAC      ) Instances List */
742 
743 #define GPBR                   ((Gpbr *)0x400E1890U)          /**< \brief (GPBR      ) Base Address */
744 #define GPBR_INST_NUM          1                              /**< \brief (GPBR      ) Number of instances */
745 #define GPBR_INSTS             { GPBR }                       /**< \brief (GPBR      ) Instances List */
746 
747 #define HSMCI                  ((Hsmci *)0x40000000U)         /**< \brief (HSMCI     ) Base Address */
748 #define HSMCI_INST_NUM         1                              /**< \brief (HSMCI     ) Number of instances */
749 #define HSMCI_INSTS            { HSMCI }                      /**< \brief (HSMCI     ) Instances List */
750 
751 #define I2SC0                  ((I2sc *)0x4008C000U)          /**< \brief (I2SC0     ) Base Address */
752 #define I2SC1                  ((I2sc *)0x40090000U)          /**< \brief (I2SC1     ) Base Address */
753 #define I2SC_INST_NUM          2                              /**< \brief (I2SC      ) Number of instances */
754 #define I2SC_INSTS             { I2SC0, I2SC1 }               /**< \brief (I2SC      ) Instances List */
755 
756 #define ICM                    ((Icm *)0x40048000U)           /**< \brief (ICM       ) Base Address */
757 #define ICM_INST_NUM           1                              /**< \brief (ICM       ) Number of instances */
758 #define ICM_INSTS              { ICM }                        /**< \brief (ICM       ) Instances List */
759 
760 #define ISI                    ((Isi *)0x4004C000U)           /**< \brief (ISI       ) Base Address */
761 #define ISI_INST_NUM           1                              /**< \brief (ISI       ) Number of instances */
762 #define ISI_INSTS              { ISI }                        /**< \brief (ISI       ) Instances List */
763 
764 #define MATRIX                 ((Matrix *)0x40088000U)        /**< \brief (MATRIX    ) Base Address */
765 #define MATRIX_INST_NUM        1                              /**< \brief (MATRIX    ) Number of instances */
766 #define MATRIX_INSTS           { MATRIX }                     /**< \brief (MATRIX    ) Instances List */
767 
768 #define MCAN0                  ((Mcan *)0x40030000U)          /**< \brief (MCAN0     ) Base Address */
769 #define MCAN1                  ((Mcan *)0x40034000U)          /**< \brief (MCAN1     ) Base Address */
770 #define MCAN_INST_NUM          2                              /**< \brief (MCAN      ) Number of instances */
771 #define MCAN_INSTS             { MCAN0, MCAN1 }               /**< \brief (MCAN      ) Instances List */
772 
773 #define PIOA                   ((Pio *)0x400E0E00U)           /**< \brief (PIOA      ) Base Address */
774 #define PIOB                   ((Pio *)0x400E1000U)           /**< \brief (PIOB      ) Base Address */
775 #define PIOC                   ((Pio *)0x400E1200U)           /**< \brief (PIOC      ) Base Address */
776 #define PIOD                   ((Pio *)0x400E1400U)           /**< \brief (PIOD      ) Base Address */
777 #define PIOE                   ((Pio *)0x400E1600U)           /**< \brief (PIOE      ) Base Address */
778 #define PIO_INST_NUM           5                              /**< \brief (PIO       ) Number of instances */
779 #define PIO_INSTS              { PIOA, PIOB, PIOC, PIOD, PIOE } /**< \brief (PIO       ) Instances List */
780 
781 #define PMC                    ((Pmc *)0x400E0600U)           /**< \brief (PMC       ) Base Address */
782 #define PMC_INST_NUM           1                              /**< \brief (PMC       ) Number of instances */
783 #define PMC_INSTS              { PMC }                        /**< \brief (PMC       ) Instances List */
784 
785 #define PWM0                   ((Pwm *)0x40020000U)           /**< \brief (PWM0      ) Base Address */
786 #define PWM1                   ((Pwm *)0x4005C000U)           /**< \brief (PWM1      ) Base Address */
787 #define PWM_INST_NUM           2                              /**< \brief (PWM       ) Number of instances */
788 #define PWM_INSTS              { PWM0, PWM1 }                 /**< \brief (PWM       ) Instances List */
789 
790 #define QSPI                   ((Qspi *)0x4007C000U)          /**< \brief (QSPI      ) Base Address */
791 #define QSPI_INST_NUM          1                              /**< \brief (QSPI      ) Number of instances */
792 #define QSPI_INSTS             { QSPI }                       /**< \brief (QSPI      ) Instances List */
793 
794 #define RSTC                   ((Rstc *)0x400E1800U)          /**< \brief (RSTC      ) Base Address */
795 #define RSTC_INST_NUM          1                              /**< \brief (RSTC      ) Number of instances */
796 #define RSTC_INSTS             { RSTC }                       /**< \brief (RSTC      ) Instances List */
797 
798 #define RSWDT                  ((Rswdt *)0x400E1900U)         /**< \brief (RSWDT     ) Base Address */
799 #define RSWDT_INST_NUM         1                              /**< \brief (RSWDT     ) Number of instances */
800 #define RSWDT_INSTS            { RSWDT }                      /**< \brief (RSWDT     ) Instances List */
801 
802 #define RTC                    ((Rtc *)0x400E1860U)           /**< \brief (RTC       ) Base Address */
803 #define RTC_INST_NUM           1                              /**< \brief (RTC       ) Number of instances */
804 #define RTC_INSTS              { RTC }                        /**< \brief (RTC       ) Instances List */
805 
806 #define RTT                    ((Rtt *)0x400E1830U)           /**< \brief (RTT       ) Base Address */
807 #define RTT_INST_NUM           1                              /**< \brief (RTT       ) Number of instances */
808 #define RTT_INSTS              { RTT }                        /**< \brief (RTT       ) Instances List */
809 
810 #define SDRAMC                 ((Sdramc *)0x40084000U)        /**< \brief (SDRAMC    ) Base Address */
811 #define SDRAMC_INST_NUM        1                              /**< \brief (SDRAMC    ) Number of instances */
812 #define SDRAMC_INSTS           { SDRAMC }                     /**< \brief (SDRAMC    ) Instances List */
813 
814 #define SMC                    ((Smc *)0x40080000U)           /**< \brief (SMC       ) Base Address */
815 #define SMC_INST_NUM           1                              /**< \brief (SMC       ) Number of instances */
816 #define SMC_INSTS              { SMC }                        /**< \brief (SMC       ) Instances List */
817 
818 #define SPI0                   ((Spi *)0x40008000U)           /**< \brief (SPI0      ) Base Address */
819 #define SPI1                   ((Spi *)0x40058000U)           /**< \brief (SPI1      ) Base Address */
820 #define SPI_INST_NUM           2                              /**< \brief (SPI       ) Number of instances */
821 #define SPI_INSTS              { SPI0, SPI1 }                 /**< \brief (SPI       ) Instances List */
822 
823 #define SSC                    ((Ssc *)0x40004000U)           /**< \brief (SSC       ) Base Address */
824 #define SSC_INST_NUM           1                              /**< \brief (SSC       ) Number of instances */
825 #define SSC_INSTS              { SSC }                        /**< \brief (SSC       ) Instances List */
826 
827 #define SUPC                   ((Supc *)0x400E1810U)          /**< \brief (SUPC      ) Base Address */
828 #define SUPC_INST_NUM          1                              /**< \brief (SUPC      ) Number of instances */
829 #define SUPC_INSTS             { SUPC }                       /**< \brief (SUPC      ) Instances List */
830 
831 #define TC0                    ((Tc *)0x4000C000U)            /**< \brief (TC0       ) Base Address */
832 #define TC1                    ((Tc *)0x40010000U)            /**< \brief (TC1       ) Base Address */
833 #define TC2                    ((Tc *)0x40014000U)            /**< \brief (TC2       ) Base Address */
834 #define TC3                    ((Tc *)0x40054000U)            /**< \brief (TC3       ) Base Address */
835 #define TC_INST_NUM            4                              /**< \brief (TC        ) Number of instances */
836 #define TC_INSTS               { TC0, TC1, TC2, TC3 }         /**< \brief (TC        ) Instances List */
837 
838 #define TRNG                   ((Trng *)0x40070000U)          /**< \brief (TRNG      ) Base Address */
839 #define TRNG_INST_NUM          1                              /**< \brief (TRNG      ) Number of instances */
840 #define TRNG_INSTS             { TRNG }                       /**< \brief (TRNG      ) Instances List */
841 
842 #define TWIHS0                 ((Twihs *)0x40018000U)         /**< \brief (TWIHS0    ) Base Address */
843 #define TWIHS1                 ((Twihs *)0x4001C000U)         /**< \brief (TWIHS1    ) Base Address */
844 #define TWIHS2                 ((Twihs *)0x40060000U)         /**< \brief (TWIHS2    ) Base Address */
845 #define TWIHS_INST_NUM         3                              /**< \brief (TWIHS     ) Number of instances */
846 #define TWIHS_INSTS            { TWIHS0, TWIHS1, TWIHS2 }     /**< \brief (TWIHS     ) Instances List */
847 
848 #define UART0                  ((Uart *)0x400E0800U)          /**< \brief (UART0     ) Base Address */
849 #define UART1                  ((Uart *)0x400E0A00U)          /**< \brief (UART1     ) Base Address */
850 #define UART2                  ((Uart *)0x400E1A00U)          /**< \brief (UART2     ) Base Address */
851 #define UART3                  ((Uart *)0x400E1C00U)          /**< \brief (UART3     ) Base Address */
852 #define UART4                  ((Uart *)0x400E1E00U)          /**< \brief (UART4     ) Base Address */
853 #define UART_INST_NUM          5                              /**< \brief (UART      ) Number of instances */
854 #define UART_INSTS             { UART0, UART1, UART2, UART3, UART4 } /**< \brief (UART      ) Instances List */
855 
856 #define USART0                 ((Usart *)0x40024000U)         /**< \brief (USART0    ) Base Address */
857 #define USART1                 ((Usart *)0x40028000U)         /**< \brief (USART1    ) Base Address */
858 #define USART2                 ((Usart *)0x4002C000U)         /**< \brief (USART2    ) Base Address */
859 #define USART_INST_NUM         3                              /**< \brief (USART     ) Number of instances */
860 #define USART_INSTS            { USART0, USART1, USART2 }     /**< \brief (USART     ) Instances List */
861 
862 #define USBHS                  ((Usbhs *)0x40038000U)         /**< \brief (USBHS     ) Base Address */
863 #define USBHS_INST_NUM         1                              /**< \brief (USBHS     ) Number of instances */
864 #define USBHS_INSTS            { USBHS }                      /**< \brief (USBHS     ) Instances List */
865 
866 #define UTMI                   ((Utmi *)0x400E0400U)          /**< \brief (UTMI      ) Base Address */
867 #define UTMI_INST_NUM          1                              /**< \brief (UTMI      ) Number of instances */
868 #define UTMI_INSTS             { UTMI }                       /**< \brief (UTMI      ) Instances List */
869 
870 #define WDT                    ((Wdt *)0x400E1850U)           /**< \brief (WDT       ) Base Address */
871 #define WDT_INST_NUM           1                              /**< \brief (WDT       ) Number of instances */
872 #define WDT_INSTS              { WDT }                        /**< \brief (WDT       ) Instances List */
873 
874 #define XDMAC                  ((Xdmac *)0x40078000U)         /**< \brief (XDMAC     ) Base Address */
875 #define XDMAC_INST_NUM         1                              /**< \brief (XDMAC     ) Number of instances */
876 #define XDMAC_INSTS            { XDMAC }                      /**< \brief (XDMAC     ) Instances List */
877 
878 #endif /* (defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
879 /** @}  end of Peripheral Base Address Definitions */
880 
881 /** \addtogroup SAME70Q21B_pio Peripheral Pio Definitions
882  *  @{
883  */
884 
885 /* ************************************************************************** */
886 /*   PIO DEFINITIONS FOR SAME70Q21B*/
887 /* ************************************************************************** */
888 #include "pio/same70q21b.h"
889 /** @}  end of Peripheral Pio Definitions */
890 
891 /* ************************************************************************** */
892 /*   MEMORY MAPPING DEFINITIONS FOR SAME70Q21B*/
893 /* ************************************************************************** */
894 
895 #define PERIPHERALS_SIZE         _U_(0x20000000)       /* 524288kB Memory segment type: io */
896 #define SYSTEM_SIZE              _U_(0x10000000)       /* 262144kB Memory segment type: io */
897 #define QSPIMEM_SIZE             _U_(0x20000000)       /* 524288kB Memory segment type: other */
898 #define AXIMX_SIZE               _U_(0x00100000)       /* 1024kB Memory segment type: other */
899 #define ITCM_SIZE                _U_(0x00200000)       /* 2048kB Memory segment type: other */
900 #define IFLASH_SIZE              _U_(0x00200000)       /* 2048kB Memory segment type: flash */
901 #define IFLASH_PAGE_SIZE         _U_(       512)
902 #define IFLASH_NB_OF_PAGES       _U_(      4096)
903 
904 #define IROM_SIZE                _U_(0x00004000)       /*   16kB Memory segment type: rom */
905 #define DTCM_SIZE                _U_(0x00020000)       /*  128kB Memory segment type: other */
906 #define IRAM_SIZE                _U_(0x00060000)       /*  384kB Memory segment type: ram */
907 #define EBI_CS0_SIZE             _U_(0x01000000)       /* 16384kB Memory segment type: other */
908 #define EBI_CS1_SIZE             _U_(0x01000000)       /* 16384kB Memory segment type: other */
909 #define EBI_CS2_SIZE             _U_(0x01000000)       /* 16384kB Memory segment type: other */
910 #define EBI_CS3_SIZE             _U_(0x01000000)       /* 16384kB Memory segment type: other */
911 #define SDRAM_CS_SIZE            _U_(0x10000000)       /* 262144kB Memory segment type: other */
912 
913 #define PERIPHERALS_ADDR         _U_(0x40000000)       /**< PERIPHERALS base address (type: io)*/
914 #define SYSTEM_ADDR              _U_(0xe0000000)       /**< SYSTEM base address (type: io)*/
915 #define QSPIMEM_ADDR             _U_(0x80000000)       /**< QSPIMEM base address (type: other)*/
916 #define AXIMX_ADDR               _U_(0xa0000000)       /**< AXIMX base address (type: other)*/
917 #define ITCM_ADDR                _U_(0x00000000)       /**< ITCM base address (type: other)*/
918 #define IFLASH_ADDR              _U_(0x00400000)       /**< IFLASH base address (type: flash)*/
919 #define IROM_ADDR                _U_(0x00800000)       /**< IROM base address (type: rom)*/
920 #define DTCM_ADDR                _U_(0x20000000)       /**< DTCM base address (type: other)*/
921 #define IRAM_ADDR                _U_(0x20400000)       /**< IRAM base address (type: ram)*/
922 #define EBI_CS0_ADDR             _U_(0x60000000)       /**< EBI_CS0 base address (type: other)*/
923 #define EBI_CS1_ADDR             _U_(0x61000000)       /**< EBI_CS1 base address (type: other)*/
924 #define EBI_CS2_ADDR             _U_(0x62000000)       /**< EBI_CS2 base address (type: other)*/
925 #define EBI_CS3_ADDR             _U_(0x63000000)       /**< EBI_CS3 base address (type: other)*/
926 #define SDRAM_CS_ADDR            _U_(0x70000000)       /**< SDRAM_CS base address (type: other)*/
927 
928 /* ************************************************************************** */
929 /**  DEVICE SIGNATURES FOR SAME70Q21B */
930 /* ************************************************************************** */
931 #define JTAGID                   _UL_(0X05B3D03F)
932 #define CHIP_JTAGID              _UL_(0X05B3D03F)
933 #define CHIP_CIDR                _UL_(0XA1020E01)
934 #define CHIP_EXID                _UL_(0X00000002)
935 
936 /* ************************************************************************** */
937 /**  ELECTRICAL DEFINITIONS FOR SAME70Q21B */
938 /* ************************************************************************** */
939 #define CHIP_FREQ_SLCK_RC_MIN          _UL_(20000)
940 #define CHIP_FREQ_SLCK_RC              _UL_(32000)     /**< \brief Typical Slow Clock Internal RC frequency*/
941 #define CHIP_FREQ_SLCK_RC_MAX          _UL_(44000)
942 #define CHIP_FREQ_MAINCK_RC_4MHZ       _UL_(4000000)
943 #define CHIP_FREQ_MAINCK_RC_8MHZ       _UL_(8000000)
944 #define CHIP_FREQ_MAINCK_RC_12MHZ      _UL_(12000000)
945 #define CHIP_FREQ_CPU_MAX              _UL_(300000000)
946 #define CHIP_FREQ_XTAL_32K             _UL_(32768)
947 #define CHIP_FREQ_XTAL_12M             _UL_(12000000)
948 #define CHIP_FREQ_FWS_0                _UL_(23000000)  /**< \brief Maximum operating frequency when FWS is 0*/
949 #define CHIP_FREQ_FWS_1                _UL_(46000000)  /**< \brief Maximum operating frequency when FWS is 1*/
950 #define CHIP_FREQ_FWS_2                _UL_(69000000)  /**< \brief Maximum operating frequency when FWS is 2*/
951 #define CHIP_FREQ_FWS_3                _UL_(92000000)  /**< \brief Maximum operating frequency when FWS is 3*/
952 #define CHIP_FREQ_FWS_4                _UL_(115000000) /**< \brief Maximum operating frequency when FWS is 4*/
953 #define CHIP_FREQ_FWS_5                _UL_(138000000) /**< \brief Maximum operating frequency when FWS is 5*/
954 #define CHIP_FREQ_FWS_6                _UL_(150000000) /**< \brief Maximum operating frequency when FWS is 6*/
955 #define CHIP_FREQ_FWS_NUMBER           _UL_(7)         /**< \brief Number of FWS ranges*/
956 
957 
958 
959 #ifdef __cplusplus
960 }
961 #endif
962 
963 /** @}  end of SAME70Q21B definitions */
964 
965 
966 #endif /* _SAME70Q21B_H_ */
967