1 /** 2 * \file 3 * 4 * Copyright (c) 2015 Atmel Corporation. All rights reserved. 5 * 6 * \asf_license_start 7 * 8 * \page License 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions are met: 12 * 13 * 1. Redistributions of source code must retain the above copyright notice, 14 * this list of conditions and the following disclaimer. 15 * 16 * 2. Redistributions in binary form must reproduce the above copyright notice, 17 * this list of conditions and the following disclaimer in the documentation 18 * and/or other materials provided with the distribution. 19 * 20 * 3. The name of Atmel may not be used to endorse or promote products derived 21 * from this software without specific prior written permission. 22 * 23 * 4. This software may only be redistributed and used in connection with an 24 * Atmel microcontroller product. 25 * 26 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 27 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 29 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 30 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 34 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 * POSSIBILITY OF SUCH DAMAGE. 37 * 38 * \asf_license_stop 39 * 40 */ 41 /* 42 * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> 43 */ 44 45 #ifndef _SAMV71N19_ 46 #define _SAMV71N19_ 47 48 /** \addtogroup SAMV71N19_definitions SAMV71N19 definitions 49 This file defines all structures and symbols for SAMV71N19: 50 - registers and bitfields 51 - peripheral base address 52 - peripheral ID 53 - PIO definitions 54 */ 55 /*@{*/ 56 57 #ifdef __cplusplus 58 extern "C" { 59 #endif 60 61 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 62 #include <stdint.h> 63 #endif 64 65 /* ************************************************************************** */ 66 /* CMSIS DEFINITIONS FOR SAMV71N19 */ 67 /* ************************************************************************** */ 68 /** \addtogroup SAMV71N19_cmsis CMSIS Definitions */ 69 /*@{*/ 70 71 /**< Interrupt Number Definition */ 72 typedef enum IRQn 73 { 74 /****** Cortex-M7 Processor Exceptions Numbers ******************************/ 75 NonMaskableInt_IRQn = -14, /**< 2 Non Maskable Interrupt */ 76 HardFault_IRQn = -13, /**< 3 HardFault Interrupt */ 77 MemoryManagement_IRQn = -12, /**< 4 Cortex-M7 Memory Management Interrupt */ 78 BusFault_IRQn = -11, /**< 5 Cortex-M7 Bus Fault Interrupt */ 79 UsageFault_IRQn = -10, /**< 6 Cortex-M7 Usage Fault Interrupt */ 80 SVCall_IRQn = -5, /**< 11 Cortex-M7 SV Call Interrupt */ 81 DebugMonitor_IRQn = -4, /**< 12 Cortex-M7 Debug Monitor Interrupt */ 82 PendSV_IRQn = -2, /**< 14 Cortex-M7 Pend SV Interrupt */ 83 SysTick_IRQn = -1, /**< 15 Cortex-M7 System Tick Interrupt */ 84 /****** SAMV71N19 specific Interrupt Numbers *********************************/ 85 86 SUPC_IRQn = 0, /**< 0 SAMV71N19 Supply Controller (SUPC) */ 87 RSTC_IRQn = 1, /**< 1 SAMV71N19 Reset Controller (RSTC) */ 88 RTC_IRQn = 2, /**< 2 SAMV71N19 Real Time Clock (RTC) */ 89 RTT_IRQn = 3, /**< 3 SAMV71N19 Real Time Timer (RTT) */ 90 WDT_IRQn = 4, /**< 4 SAMV71N19 Watchdog Timer (WDT) */ 91 PMC_IRQn = 5, /**< 5 SAMV71N19 Power Management Controller (PMC) */ 92 EFC_IRQn = 6, /**< 6 SAMV71N19 Enhanced Embedded Flash Controller (EFC) */ 93 UART0_IRQn = 7, /**< 7 SAMV71N19 UART 0 (UART0) */ 94 UART1_IRQn = 8, /**< 8 SAMV71N19 UART 1 (UART1) */ 95 PIOA_IRQn = 10, /**< 10 SAMV71N19 Parallel I/O Controller A (PIOA) */ 96 PIOB_IRQn = 11, /**< 11 SAMV71N19 Parallel I/O Controller B (PIOB) */ 97 USART0_IRQn = 13, /**< 13 SAMV71N19 USART 0 (USART0) */ 98 USART1_IRQn = 14, /**< 14 SAMV71N19 USART 1 (USART1) */ 99 USART2_IRQn = 15, /**< 15 SAMV71N19 USART 2 (USART2) */ 100 PIOD_IRQn = 16, /**< 16 SAMV71N19 Parallel I/O Controller D (PIOD) */ 101 HSMCI_IRQn = 18, /**< 18 SAMV71N19 Multimedia Card Interface (HSMCI) */ 102 TWIHS0_IRQn = 19, /**< 19 SAMV71N19 Two Wire Interface 0 HS (TWIHS0) */ 103 TWIHS1_IRQn = 20, /**< 20 SAMV71N19 Two Wire Interface 1 HS (TWIHS1) */ 104 SPI0_IRQn = 21, /**< 21 SAMV71N19 Serial Peripheral Interface 0 (SPI0) */ 105 SSC_IRQn = 22, /**< 22 SAMV71N19 Synchronous Serial Controller (SSC) */ 106 TC0_IRQn = 23, /**< 23 SAMV71N19 Timer/Counter 0 (TC0) */ 107 TC1_IRQn = 24, /**< 24 SAMV71N19 Timer/Counter 1 (TC1) */ 108 TC2_IRQn = 25, /**< 25 SAMV71N19 Timer/Counter 2 (TC2) */ 109 AFEC0_IRQn = 29, /**< 29 SAMV71N19 Analog Front End 0 (AFEC0) */ 110 DACC_IRQn = 30, /**< 30 SAMV71N19 Digital To Analog Converter (DACC) */ 111 PWM0_IRQn = 31, /**< 31 SAMV71N19 Pulse Width Modulation 0 (PWM0) */ 112 ICM_IRQn = 32, /**< 32 SAMV71N19 Integrity Check Monitor (ICM) */ 113 ACC_IRQn = 33, /**< 33 SAMV71N19 Analog Comparator (ACC) */ 114 USBHS_IRQn = 34, /**< 34 SAMV71N19 USB Host / Device Controller (USBHS) */ 115 MCAN0_IRQn = 35, /**< 35 SAMV71N19 MCAN Controller 0 (MCAN0) */ 116 MCAN1_IRQn = 37, /**< 37 SAMV71N19 MCAN Controller 1 (MCAN1) */ 117 GMAC_IRQn = 39, /**< 39 SAMV71N19 Ethernet MAC (GMAC) */ 118 AFEC1_IRQn = 40, /**< 40 SAMV71N19 Analog Front End 1 (AFEC1) */ 119 TWIHS2_IRQn = 41, /**< 41 SAMV71N19 Two Wire Interface 2 HS (TWIHS2) */ 120 SPI1_IRQn = 42, /**< 42 SAMV71N19 Serial Peripheral Interface 1 (SPI1) */ 121 QSPI_IRQn = 43, /**< 43 SAMV71N19 Quad I/O Serial Peripheral Interface (QSPI) */ 122 UART2_IRQn = 44, /**< 44 SAMV71N19 UART 2 (UART2) */ 123 UART3_IRQn = 45, /**< 45 SAMV71N19 UART 3 (UART3) */ 124 UART4_IRQn = 46, /**< 46 SAMV71N19 UART 4 (UART4) */ 125 TC9_IRQn = 50, /**< 50 SAMV71N19 Timer/Counter 9 (TC9) */ 126 TC10_IRQn = 51, /**< 51 SAMV71N19 Timer/Counter 10 (TC10) */ 127 TC11_IRQn = 52, /**< 52 SAMV71N19 Timer/Counter 11 (TC11) */ 128 MLB_IRQn = 53, /**< 53 SAMV71N19 MediaLB (MLB) */ 129 AES_IRQn = 56, /**< 56 SAMV71N19 AES (AES) */ 130 TRNG_IRQn = 57, /**< 57 SAMV71N19 True Random Generator (TRNG) */ 131 XDMAC_IRQn = 58, /**< 58 SAMV71N19 DMA (XDMAC) */ 132 ISI_IRQn = 59, /**< 59 SAMV71N19 Camera Interface (ISI) */ 133 PWM1_IRQn = 60, /**< 60 SAMV71N19 Pulse Width Modulation 1 (PWM1) */ 134 RSWDT_IRQn = 63, /**< 63 SAMV71N19 Reinforced Secure Watchdog Timer (RSWDT) */ 135 136 PERIPH_COUNT_IRQn = 64 /**< Number of peripheral IDs */ 137 } IRQn_Type; 138 139 typedef struct _DeviceVectors 140 { 141 /* Stack pointer */ 142 void* pvStack; 143 144 /* Cortex-M handlers */ 145 void* pfnReset_Handler; 146 void* pfnNMI_Handler; 147 void* pfnHardFault_Handler; 148 void* pfnMemManage_Handler; 149 void* pfnBusFault_Handler; 150 void* pfnUsageFault_Handler; 151 void* pfnReserved1_Handler; 152 void* pfnReserved2_Handler; 153 void* pfnReserved3_Handler; 154 void* pfnReserved4_Handler; 155 void* pfnSVC_Handler; 156 void* pfnDebugMon_Handler; 157 void* pfnReserved5_Handler; 158 void* pfnPendSV_Handler; 159 void* pfnSysTick_Handler; 160 161 /* Peripheral handlers */ 162 void* pfnSUPC_Handler; /* 0 Supply Controller */ 163 void* pfnRSTC_Handler; /* 1 Reset Controller */ 164 void* pfnRTC_Handler; /* 2 Real Time Clock */ 165 void* pfnRTT_Handler; /* 3 Real Time Timer */ 166 void* pfnWDT_Handler; /* 4 Watchdog Timer */ 167 void* pfnPMC_Handler; /* 5 Power Management Controller */ 168 void* pfnEFC_Handler; /* 6 Enhanced Embedded Flash Controller */ 169 void* pfnUART0_Handler; /* 7 UART 0 */ 170 void* pfnUART1_Handler; /* 8 UART 1 */ 171 void* pvReserved9; 172 void* pfnPIOA_Handler; /* 10 Parallel I/O Controller A */ 173 void* pfnPIOB_Handler; /* 11 Parallel I/O Controller B */ 174 void* pvReserved12; 175 void* pfnUSART0_Handler; /* 13 USART 0 */ 176 void* pfnUSART1_Handler; /* 14 USART 1 */ 177 void* pfnUSART2_Handler; /* 15 USART 2 */ 178 void* pfnPIOD_Handler; /* 16 Parallel I/O Controller D */ 179 void* pvReserved17; 180 void* pfnHSMCI_Handler; /* 18 Multimedia Card Interface */ 181 void* pfnTWIHS0_Handler; /* 19 Two Wire Interface 0 HS */ 182 void* pfnTWIHS1_Handler; /* 20 Two Wire Interface 1 HS */ 183 void* pfnSPI0_Handler; /* 21 Serial Peripheral Interface 0 */ 184 void* pfnSSC_Handler; /* 22 Synchronous Serial Controller */ 185 void* pfnTC0_Handler; /* 23 Timer/Counter 0 */ 186 void* pfnTC1_Handler; /* 24 Timer/Counter 1 */ 187 void* pfnTC2_Handler; /* 25 Timer/Counter 2 */ 188 void* pvReserved26; 189 void* pvReserved27; 190 void* pvReserved28; 191 void* pfnAFEC0_Handler; /* 29 Analog Front End 0 */ 192 void* pfnDACC_Handler; /* 30 Digital To Analog Converter */ 193 void* pfnPWM0_Handler; /* 31 Pulse Width Modulation 0 */ 194 void* pfnICM_Handler; /* 32 Integrity Check Monitor */ 195 void* pfnACC_Handler; /* 33 Analog Comparator */ 196 void* pfnUSBHS_Handler; /* 34 USB Host / Device Controller */ 197 void* pfnMCAN0_Handler; /* 35 MCAN Controller 0 */ 198 void* pvReserved36; 199 void* pfnMCAN1_Handler; /* 37 MCAN Controller 1 */ 200 void* pvReserved38; 201 void* pfnGMAC_Handler; /* 39 Ethernet MAC */ 202 void* pfnAFEC1_Handler; /* 40 Analog Front End 1 */ 203 void* pfnTWIHS2_Handler; /* 41 Two Wire Interface 2 HS */ 204 void* pfnSPI1_Handler; /* 42 Serial Peripheral Interface 1 */ 205 void* pfnQSPI_Handler; /* 43 Quad I/O Serial Peripheral Interface */ 206 void* pfnUART2_Handler; /* 44 UART 2 */ 207 void* pfnUART3_Handler; /* 45 UART 3 */ 208 void* pfnUART4_Handler; /* 46 UART 4 */ 209 void* pvReserved47; 210 void* pvReserved48; 211 void* pvReserved49; 212 void* pfnTC9_Handler; /* 50 Timer/Counter 9 */ 213 void* pfnTC10_Handler; /* 51 Timer/Counter 10 */ 214 void* pfnTC11_Handler; /* 52 Timer/Counter 11 */ 215 void* pfnMLB_Handler; /* 53 MediaLB */ 216 void* pvReserved54; 217 void* pvReserved55; 218 void* pfnAES_Handler; /* 56 AES */ 219 void* pfnTRNG_Handler; /* 57 True Random Generator */ 220 void* pfnXDMAC_Handler; /* 58 DMA */ 221 void* pfnISI_Handler; /* 59 Camera Interface */ 222 void* pfnPWM1_Handler; /* 60 Pulse Width Modulation 1 */ 223 void* pvReserved61; 224 void* pvReserved62; 225 void* pfnRSWDT_Handler; /* 63 Reinforced Secure Watchdog Timer */ 226 } DeviceVectors; 227 228 /* Cortex-M7 core handlers */ 229 void Reset_Handler ( void ); 230 void NMI_Handler ( void ); 231 void HardFault_Handler ( void ); 232 void MemManage_Handler ( void ); 233 void BusFault_Handler ( void ); 234 void UsageFault_Handler ( void ); 235 void SVC_Handler ( void ); 236 void DebugMon_Handler ( void ); 237 void PendSV_Handler ( void ); 238 void SysTick_Handler ( void ); 239 240 /* Peripherals handlers */ 241 void ACC_Handler ( void ); 242 void AES_Handler ( void ); 243 void AFEC0_Handler ( void ); 244 void AFEC1_Handler ( void ); 245 void DACC_Handler ( void ); 246 void EFC_Handler ( void ); 247 void GMAC_Handler ( void ); 248 void HSMCI_Handler ( void ); 249 void ICM_Handler ( void ); 250 void ISI_Handler ( void ); 251 void MCAN0_Handler ( void ); 252 void MCAN1_Handler ( void ); 253 void MLB_Handler ( void ); 254 void PIOA_Handler ( void ); 255 void PIOB_Handler ( void ); 256 void PIOD_Handler ( void ); 257 void PMC_Handler ( void ); 258 void PWM0_Handler ( void ); 259 void PWM1_Handler ( void ); 260 void QSPI_Handler ( void ); 261 void RSTC_Handler ( void ); 262 void RSWDT_Handler ( void ); 263 void RTC_Handler ( void ); 264 void RTT_Handler ( void ); 265 void SPI0_Handler ( void ); 266 void SPI1_Handler ( void ); 267 void SSC_Handler ( void ); 268 void SUPC_Handler ( void ); 269 void TC0_Handler ( void ); 270 void TC1_Handler ( void ); 271 void TC2_Handler ( void ); 272 void TC9_Handler ( void ); 273 void TC10_Handler ( void ); 274 void TC11_Handler ( void ); 275 void TRNG_Handler ( void ); 276 void TWIHS0_Handler ( void ); 277 void TWIHS1_Handler ( void ); 278 void TWIHS2_Handler ( void ); 279 void UART0_Handler ( void ); 280 void UART1_Handler ( void ); 281 void UART2_Handler ( void ); 282 void UART3_Handler ( void ); 283 void UART4_Handler ( void ); 284 void USART0_Handler ( void ); 285 void USART1_Handler ( void ); 286 void USART2_Handler ( void ); 287 void USBHS_Handler ( void ); 288 void WDT_Handler ( void ); 289 void XDMAC_Handler ( void ); 290 291 /** 292 * \brief Configuration of the Cortex-M7 Processor and Core Peripherals 293 */ 294 295 #define __CM7_REV 0x0000 /**< SAMV71N19 core revision number ([15:8] revision number, [7:0] patch number) */ 296 #define __MPU_PRESENT 1 /**< SAMV71N19 does provide a MPU */ 297 #define __NVIC_PRIO_BITS 3 /**< SAMV71N19 uses 3 Bits for the Priority Levels */ 298 #define __FPU_PRESENT 1 /**< SAMV71N19 does provide a FPU */ 299 #define __FPU_DP 1 /**< SAMV71N19 Double precision FPU */ 300 #define __ICACHE_PRESENT 1 /**< SAMV71N19 does provide an Instruction Cache */ 301 #define __DCACHE_PRESENT 1 /**< SAMV71N19 does provide a Data Cache */ 302 #define __DTCM_PRESENT 1 /**< SAMV71N19 does provide a Data TCM */ 303 #define __ITCM_PRESENT 1 /**< SAMV71N19 does provide an Instruction TCM */ 304 #define __Vendor_SysTickConfig 0 /**< Set to 1 if different SysTick Config is used */ 305 306 /* 307 * \brief CMSIS includes 308 */ 309 310 #include <core_cm7.h> 311 #if !defined DONT_USE_CMSIS_INIT 312 #include "system_samv71.h" 313 #endif /* DONT_USE_CMSIS_INIT */ 314 315 /*@}*/ 316 317 /* ************************************************************************** */ 318 /** SOFTWARE PERIPHERAL API DEFINITION FOR SAMV71N19 */ 319 /* ************************************************************************** */ 320 /** \addtogroup SAMV71N19_api Peripheral Software API */ 321 /*@{*/ 322 323 #include "component/acc.h" 324 #include "component/aes.h" 325 #include "component/afec.h" 326 #include "component/chipid.h" 327 #include "component/dacc.h" 328 #include "component/efc.h" 329 #include "component/gmac.h" 330 #include "component/gpbr.h" 331 #include "component/hsmci.h" 332 #include "component/icm.h" 333 #include "component/isi.h" 334 #include "component/matrix.h" 335 #include "component/mcan.h" 336 #include "component/mlb.h" 337 #include "component/pio.h" 338 #include "component/pmc.h" 339 #include "component/pwm.h" 340 #include "component/qspi.h" 341 #include "component/rstc.h" 342 #include "component/rswdt.h" 343 #include "component/rtc.h" 344 #include "component/rtt.h" 345 #include "component/spi.h" 346 #include "component/ssc.h" 347 #include "component/supc.h" 348 #include "component/tc.h" 349 #include "component/trng.h" 350 #include "component/twihs.h" 351 #include "component/uart.h" 352 #include "component/usart.h" 353 #include "component/usbhs.h" 354 #include "component/utmi.h" 355 #include "component/wdt.h" 356 #include "component/xdmac.h" 357 /*@}*/ 358 359 /* ************************************************************************** */ 360 /* REGISTER ACCESS DEFINITIONS FOR SAMV71N19 */ 361 /* ************************************************************************** */ 362 /** \addtogroup SAMV71N19_reg Registers Access Definitions */ 363 /*@{*/ 364 365 #include "instance/hsmci.h" 366 #include "instance/ssc.h" 367 #include "instance/spi0.h" 368 #include "instance/tc0.h" 369 #include "instance/twihs0.h" 370 #include "instance/twihs1.h" 371 #include "instance/pwm0.h" 372 #include "instance/usart0.h" 373 #include "instance/usart1.h" 374 #include "instance/usart2.h" 375 #include "instance/mcan0.h" 376 #include "instance/mcan1.h" 377 #include "instance/usbhs.h" 378 #include "instance/afec0.h" 379 #include "instance/dacc.h" 380 #include "instance/acc.h" 381 #include "instance/icm.h" 382 #include "instance/isi.h" 383 #include "instance/gmac.h" 384 #include "instance/tc3.h" 385 #include "instance/spi1.h" 386 #include "instance/pwm1.h" 387 #include "instance/twihs2.h" 388 #include "instance/afec1.h" 389 #include "instance/mlb.h" 390 #include "instance/aes.h" 391 #include "instance/trng.h" 392 #include "instance/xdmac.h" 393 #include "instance/qspi.h" 394 #include "instance/matrix.h" 395 #include "instance/utmi.h" 396 #include "instance/pmc.h" 397 #include "instance/uart0.h" 398 #include "instance/chipid.h" 399 #include "instance/uart1.h" 400 #include "instance/efc.h" 401 #include "instance/pioa.h" 402 #include "instance/piob.h" 403 #include "instance/piod.h" 404 #include "instance/rstc.h" 405 #include "instance/supc.h" 406 #include "instance/rtt.h" 407 #include "instance/wdt.h" 408 #include "instance/rtc.h" 409 #include "instance/gpbr.h" 410 #include "instance/rswdt.h" 411 #include "instance/uart2.h" 412 #include "instance/uart3.h" 413 #include "instance/uart4.h" 414 /*@}*/ 415 416 /* ************************************************************************** */ 417 /* PERIPHERAL ID DEFINITIONS FOR SAMV71N19 */ 418 /* ************************************************************************** */ 419 /** \addtogroup SAMV71N19_id Peripheral Ids Definitions */ 420 /*@{*/ 421 422 #define ID_SUPC ( 0) /**< \brief Supply Controller (SUPC) */ 423 #define ID_RSTC ( 1) /**< \brief Reset Controller (RSTC) */ 424 #define ID_RTC ( 2) /**< \brief Real Time Clock (RTC) */ 425 #define ID_RTT ( 3) /**< \brief Real Time Timer (RTT) */ 426 #define ID_WDT ( 4) /**< \brief Watchdog Timer (WDT) */ 427 #define ID_PMC ( 5) /**< \brief Power Management Controller (PMC) */ 428 #define ID_EFC ( 6) /**< \brief Enhanced Embedded Flash Controller (EFC) */ 429 #define ID_UART0 ( 7) /**< \brief UART 0 (UART0) */ 430 #define ID_UART1 ( 8) /**< \brief UART 1 (UART1) */ 431 #define ID_PIOA (10) /**< \brief Parallel I/O Controller A (PIOA) */ 432 #define ID_PIOB (11) /**< \brief Parallel I/O Controller B (PIOB) */ 433 #define ID_USART0 (13) /**< \brief USART 0 (USART0) */ 434 #define ID_USART1 (14) /**< \brief USART 1 (USART1) */ 435 #define ID_USART2 (15) /**< \brief USART 2 (USART2) */ 436 #define ID_PIOD (16) /**< \brief Parallel I/O Controller D (PIOD) */ 437 #define ID_HSMCI (18) /**< \brief Multimedia Card Interface (HSMCI) */ 438 #define ID_TWIHS0 (19) /**< \brief Two Wire Interface 0 HS (TWIHS0) */ 439 #define ID_TWIHS1 (20) /**< \brief Two Wire Interface 1 HS (TWIHS1) */ 440 #define ID_SPI0 (21) /**< \brief Serial Peripheral Interface 0 (SPI0) */ 441 #define ID_SSC (22) /**< \brief Synchronous Serial Controller (SSC) */ 442 #define ID_TC0 (23) /**< \brief Timer/Counter 0 (TC0) */ 443 #define ID_TC1 (24) /**< \brief Timer/Counter 1 (TC1) */ 444 #define ID_TC2 (25) /**< \brief Timer/Counter 2 (TC2) */ 445 #define ID_AFEC0 (29) /**< \brief Analog Front End 0 (AFEC0) */ 446 #define ID_DACC (30) /**< \brief Digital To Analog Converter (DACC) */ 447 #define ID_PWM0 (31) /**< \brief Pulse Width Modulation 0 (PWM0) */ 448 #define ID_ICM (32) /**< \brief Integrity Check Monitor (ICM) */ 449 #define ID_ACC (33) /**< \brief Analog Comparator (ACC) */ 450 #define ID_USBHS (34) /**< \brief USB Host / Device Controller (USBHS) */ 451 #define ID_MCAN0 (35) /**< \brief MCAN Controller 0 (MCAN0) */ 452 #define ID_MCAN1 (37) /**< \brief MCAN Controller 1 (MCAN1) */ 453 #define ID_GMAC (39) /**< \brief Ethernet MAC (GMAC) */ 454 #define ID_AFEC1 (40) /**< \brief Analog Front End 1 (AFEC1) */ 455 #define ID_TWIHS2 (41) /**< \brief Two Wire Interface 2 HS (TWIHS2) */ 456 #define ID_SPI1 (42) /**< \brief Serial Peripheral Interface 1 (SPI1) */ 457 #define ID_QSPI (43) /**< \brief Quad I/O Serial Peripheral Interface (QSPI) */ 458 #define ID_UART2 (44) /**< \brief UART 2 (UART2) */ 459 #define ID_UART3 (45) /**< \brief UART 3 (UART3) */ 460 #define ID_UART4 (46) /**< \brief UART 4 (UART4) */ 461 #define ID_TC9 (50) /**< \brief Timer/Counter 9 (TC9) */ 462 #define ID_TC10 (51) /**< \brief Timer/Counter 10 (TC10) */ 463 #define ID_TC11 (52) /**< \brief Timer/Counter 11 (TC11) */ 464 #define ID_MLB (53) /**< \brief MediaLB (MLB) */ 465 #define ID_AES (56) /**< \brief AES (AES) */ 466 #define ID_TRNG (57) /**< \brief True Random Generator (TRNG) */ 467 #define ID_XDMAC (58) /**< \brief DMA (XDMAC) */ 468 #define ID_ISI (59) /**< \brief Camera Interface (ISI) */ 469 #define ID_PWM1 (60) /**< \brief Pulse Width Modulation 1 (PWM1) */ 470 #define ID_RSWDT (63) /**< \brief Reinforced Secure Watchdog Timer (RSWDT) */ 471 472 #define ID_PERIPH_COUNT (64) /**< \brief Number of peripheral IDs */ 473 /*@}*/ 474 475 /* ************************************************************************** */ 476 /* BASE ADDRESS DEFINITIONS FOR SAMV71N19 */ 477 /* ************************************************************************** */ 478 /** \addtogroup SAMV71N19_base Peripheral Base Address Definitions */ 479 /*@{*/ 480 481 #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 482 #define HSMCI (0x40000000U) /**< \brief (HSMCI ) Base Address */ 483 #define SSC (0x40004000U) /**< \brief (SSC ) Base Address */ 484 #define SPI0 (0x40008000U) /**< \brief (SPI0 ) Base Address */ 485 #define TC0 (0x4000C000U) /**< \brief (TC0 ) Base Address */ 486 #define TWIHS0 (0x40018000U) /**< \brief (TWIHS0) Base Address */ 487 #define TWIHS1 (0x4001C000U) /**< \brief (TWIHS1) Base Address */ 488 #define PWM0 (0x40020000U) /**< \brief (PWM0 ) Base Address */ 489 #define USART0 (0x40024000U) /**< \brief (USART0) Base Address */ 490 #define USART1 (0x40028000U) /**< \brief (USART1) Base Address */ 491 #define USART2 (0x4002C000U) /**< \brief (USART2) Base Address */ 492 #define MCAN0 (0x40030000U) /**< \brief (MCAN0 ) Base Address */ 493 #define MCAN1 (0x40034000U) /**< \brief (MCAN1 ) Base Address */ 494 #define USBHS (0x40038000U) /**< \brief (USBHS ) Base Address */ 495 #define AFEC0 (0x4003C000U) /**< \brief (AFEC0 ) Base Address */ 496 #define DACC (0x40040000U) /**< \brief (DACC ) Base Address */ 497 #define ACC (0x40044000U) /**< \brief (ACC ) Base Address */ 498 #define ICM (0x40048000U) /**< \brief (ICM ) Base Address */ 499 #define ISI (0x4004C000U) /**< \brief (ISI ) Base Address */ 500 #define GMAC (0x40050000U) /**< \brief (GMAC ) Base Address */ 501 #define TC3 (0x40054000U) /**< \brief (TC3 ) Base Address */ 502 #define SPI1 (0x40058000U) /**< \brief (SPI1 ) Base Address */ 503 #define PWM1 (0x4005C000U) /**< \brief (PWM1 ) Base Address */ 504 #define TWIHS2 (0x40060000U) /**< \brief (TWIHS2) Base Address */ 505 #define AFEC1 (0x40064000U) /**< \brief (AFEC1 ) Base Address */ 506 #define MLB (0x40068000U) /**< \brief (MLB ) Base Address */ 507 #define AES (0x4006C000U) /**< \brief (AES ) Base Address */ 508 #define TRNG (0x40070000U) /**< \brief (TRNG ) Base Address */ 509 #define XDMAC (0x40078000U) /**< \brief (XDMAC ) Base Address */ 510 #define QSPI (0x4007C000U) /**< \brief (QSPI ) Base Address */ 511 #define MATRIX (0x40088000U) /**< \brief (MATRIX) Base Address */ 512 #define UTMI (0x400E0400U) /**< \brief (UTMI ) Base Address */ 513 #define PMC (0x400E0600U) /**< \brief (PMC ) Base Address */ 514 #define UART0 (0x400E0800U) /**< \brief (UART0 ) Base Address */ 515 #define CHIPID (0x400E0940U) /**< \brief (CHIPID) Base Address */ 516 #define UART1 (0x400E0A00U) /**< \brief (UART1 ) Base Address */ 517 #define EFC (0x400E0C00U) /**< \brief (EFC ) Base Address */ 518 #define PIOA (0x400E0E00U) /**< \brief (PIOA ) Base Address */ 519 #define PIOB (0x400E1000U) /**< \brief (PIOB ) Base Address */ 520 #define PIOD (0x400E1400U) /**< \brief (PIOD ) Base Address */ 521 #define RSTC (0x400E1800U) /**< \brief (RSTC ) Base Address */ 522 #define SUPC (0x400E1810U) /**< \brief (SUPC ) Base Address */ 523 #define RTT (0x400E1830U) /**< \brief (RTT ) Base Address */ 524 #define WDT (0x400E1850U) /**< \brief (WDT ) Base Address */ 525 #define RTC (0x400E1860U) /**< \brief (RTC ) Base Address */ 526 #define GPBR (0x400E1890U) /**< \brief (GPBR ) Base Address */ 527 #define RSWDT (0x400E1900U) /**< \brief (RSWDT ) Base Address */ 528 #define UART2 (0x400E1A00U) /**< \brief (UART2 ) Base Address */ 529 #define UART3 (0x400E1C00U) /**< \brief (UART3 ) Base Address */ 530 #define UART4 (0x400E1E00U) /**< \brief (UART4 ) Base Address */ 531 #else 532 #define HSMCI ((Hsmci *)0x40000000U) /**< \brief (HSMCI ) Base Address */ 533 #define SSC ((Ssc *)0x40004000U) /**< \brief (SSC ) Base Address */ 534 #define SPI0 ((Spi *)0x40008000U) /**< \brief (SPI0 ) Base Address */ 535 #define TC0 ((Tc *)0x4000C000U) /**< \brief (TC0 ) Base Address */ 536 #define TWIHS0 ((Twihs *)0x40018000U) /**< \brief (TWIHS0) Base Address */ 537 #define TWIHS1 ((Twihs *)0x4001C000U) /**< \brief (TWIHS1) Base Address */ 538 #define PWM0 ((Pwm *)0x40020000U) /**< \brief (PWM0 ) Base Address */ 539 #define USART0 ((Usart *)0x40024000U) /**< \brief (USART0) Base Address */ 540 #define USART1 ((Usart *)0x40028000U) /**< \brief (USART1) Base Address */ 541 #define USART2 ((Usart *)0x4002C000U) /**< \brief (USART2) Base Address */ 542 #define MCAN0 ((Mcan *)0x40030000U) /**< \brief (MCAN0 ) Base Address */ 543 #define MCAN1 ((Mcan *)0x40034000U) /**< \brief (MCAN1 ) Base Address */ 544 #define USBHS ((Usbhs *)0x40038000U) /**< \brief (USBHS ) Base Address */ 545 #define AFEC0 ((Afec *)0x4003C000U) /**< \brief (AFEC0 ) Base Address */ 546 #define DACC ((Dacc *)0x40040000U) /**< \brief (DACC ) Base Address */ 547 #define ACC ((Acc *)0x40044000U) /**< \brief (ACC ) Base Address */ 548 #define ICM ((Icm *)0x40048000U) /**< \brief (ICM ) Base Address */ 549 #define ISI ((Isi *)0x4004C000U) /**< \brief (ISI ) Base Address */ 550 #define GMAC ((Gmac *)0x40050000U) /**< \brief (GMAC ) Base Address */ 551 #define TC3 ((Tc *)0x40054000U) /**< \brief (TC3 ) Base Address */ 552 #define SPI1 ((Spi *)0x40058000U) /**< \brief (SPI1 ) Base Address */ 553 #define PWM1 ((Pwm *)0x4005C000U) /**< \brief (PWM1 ) Base Address */ 554 #define TWIHS2 ((Twihs *)0x40060000U) /**< \brief (TWIHS2) Base Address */ 555 #define AFEC1 ((Afec *)0x40064000U) /**< \brief (AFEC1 ) Base Address */ 556 #define MLB ((Mlb *)0x40068000U) /**< \brief (MLB ) Base Address */ 557 #define AES ((Aes *)0x4006C000U) /**< \brief (AES ) Base Address */ 558 #define TRNG ((Trng *)0x40070000U) /**< \brief (TRNG ) Base Address */ 559 #define XDMAC ((Xdmac *)0x40078000U) /**< \brief (XDMAC ) Base Address */ 560 #define QSPI ((Qspi *)0x4007C000U) /**< \brief (QSPI ) Base Address */ 561 #define MATRIX ((Matrix *)0x40088000U) /**< \brief (MATRIX) Base Address */ 562 #define UTMI ((Utmi *)0x400E0400U) /**< \brief (UTMI ) Base Address */ 563 #define PMC ((Pmc *)0x400E0600U) /**< \brief (PMC ) Base Address */ 564 #define UART0 ((Uart *)0x400E0800U) /**< \brief (UART0 ) Base Address */ 565 #define CHIPID ((Chipid *)0x400E0940U) /**< \brief (CHIPID) Base Address */ 566 #define UART1 ((Uart *)0x400E0A00U) /**< \brief (UART1 ) Base Address */ 567 #define EFC ((Efc *)0x400E0C00U) /**< \brief (EFC ) Base Address */ 568 #define PIOA ((Pio *)0x400E0E00U) /**< \brief (PIOA ) Base Address */ 569 #define PIOB ((Pio *)0x400E1000U) /**< \brief (PIOB ) Base Address */ 570 #define PIOD ((Pio *)0x400E1400U) /**< \brief (PIOD ) Base Address */ 571 #define RSTC ((Rstc *)0x400E1800U) /**< \brief (RSTC ) Base Address */ 572 #define SUPC ((Supc *)0x400E1810U) /**< \brief (SUPC ) Base Address */ 573 #define RTT ((Rtt *)0x400E1830U) /**< \brief (RTT ) Base Address */ 574 #define WDT ((Wdt *)0x400E1850U) /**< \brief (WDT ) Base Address */ 575 #define RTC ((Rtc *)0x400E1860U) /**< \brief (RTC ) Base Address */ 576 #define GPBR ((Gpbr *)0x400E1890U) /**< \brief (GPBR ) Base Address */ 577 #define RSWDT ((Rswdt *)0x400E1900U) /**< \brief (RSWDT ) Base Address */ 578 #define UART2 ((Uart *)0x400E1A00U) /**< \brief (UART2 ) Base Address */ 579 #define UART3 ((Uart *)0x400E1C00U) /**< \brief (UART3 ) Base Address */ 580 #define UART4 ((Uart *)0x400E1E00U) /**< \brief (UART4 ) Base Address */ 581 #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 582 /*@}*/ 583 584 /* ************************************************************************** */ 585 /* PIO DEFINITIONS FOR SAMV71N19 */ 586 /* ************************************************************************** */ 587 /** \addtogroup SAMV71N19_pio Peripheral Pio Definitions */ 588 /*@{*/ 589 590 #include "pio/samv71n19.h" 591 /*@}*/ 592 593 /* ************************************************************************** */ 594 /* MEMORY MAPPING DEFINITIONS FOR SAMV71N19 */ 595 /* ************************************************************************** */ 596 597 #define IFLASH_SIZE (0x80000u) 598 #define IFLASH_PAGE_SIZE (512u) 599 #define IFLASH_LOCK_REGION_SIZE (8192u) 600 #define IFLASH_NB_OF_PAGES (1024u) 601 #define IFLASH_NB_OF_LOCK_BITS (32u) 602 #define IRAM_SIZE (0x40000u) 603 604 #define QSPIMEM_ADDR (0x80000000u) /**< QSPI Memory base address */ 605 #define AXIMX_ADDR (0xA0000000u) /**< AXI Bus Matrix base address */ 606 #define ITCM_ADDR (0x00000000u) /**< Instruction Tightly Coupled Memory base address */ 607 #define IFLASH_ADDR (0x00400000u) /**< Internal Flash base address */ 608 #define IROM_ADDR (0x00800000u) /**< Internal ROM base address */ 609 #define DTCM_ADDR (0x20000000u) /**< Data Tightly Coupled Memory base address */ 610 #define IRAM_ADDR (0x20400000u) /**< Internal RAM base address */ 611 #define EBI_CS0_ADDR (0x60000000u) /**< EBI Chip Select 0 base address */ 612 #define EBI_CS1_ADDR (0x61000000u) /**< EBI Chip Select 1 base address */ 613 #define EBI_CS2_ADDR (0x62000000u) /**< EBI Chip Select 2 base address */ 614 #define EBI_CS3_ADDR (0x63000000u) /**< EBI Chip Select 3 base address */ 615 #define SDRAM_CS_ADDR (0x70000000u) /**< SDRAM Chip Select base address */ 616 617 /* ************************************************************************** */ 618 /* MISCELLANEOUS DEFINITIONS FOR SAMV71N19 */ 619 /* ************************************************************************** */ 620 621 #define CHIP_JTAGID (0x05B3D03FUL) 622 #define CHIP_CIDR (0xA12D0A00UL) 623 #define CHIP_EXID (0x00000001UL) 624 625 /* ************************************************************************** */ 626 /* ELECTRICAL DEFINITIONS FOR SAMV71N19 */ 627 /* ************************************************************************** */ 628 629 /* %ATMEL_ELECTRICAL% */ 630 631 /* Device characteristics */ 632 #define CHIP_FREQ_SLCK_RC_MIN (20000UL) 633 #define CHIP_FREQ_SLCK_RC (32000UL) 634 #define CHIP_FREQ_SLCK_RC_MAX (44000UL) 635 #define CHIP_FREQ_MAINCK_RC_4MHZ (4000000UL) 636 #define CHIP_FREQ_MAINCK_RC_8MHZ (8000000UL) 637 #define CHIP_FREQ_MAINCK_RC_12MHZ (12000000UL) 638 #define CHIP_FREQ_CPU_MAX (300000000UL) 639 #define CHIP_FREQ_XTAL_32K (32768UL) 640 #define CHIP_FREQ_XTAL_12M (12000000UL) 641 642 /* Embedded Flash Read Wait State (VDDCORE set at 1.20V) */ 643 #define CHIP_FREQ_FWS_0 (20000000UL) /**< \brief Maximum operating frequency when FWS is 0 */ 644 #define CHIP_FREQ_FWS_1 (40000000UL) /**< \brief Maximum operating frequency when FWS is 1 */ 645 #define CHIP_FREQ_FWS_2 (60000000UL) /**< \brief Maximum operating frequency when FWS is 2 */ 646 #define CHIP_FREQ_FWS_3 (80000000UL) /**< \brief Maximum operating frequency when FWS is 3 */ 647 #define CHIP_FREQ_FWS_4 (100000000UL) /**< \brief Maximum operating frequency when FWS is 4 */ 648 #define CHIP_FREQ_FWS_5 (123000000UL) /**< \brief Maximum operating frequency when FWS is 5 */ 649 650 #ifdef __cplusplus 651 } 652 #endif 653 654 /*@}*/ 655 656 #endif /* _SAMV71N19_ */ 657