SAMV71 Xplained Ultra Software Package 1.5

samv71q21.h

00001 /* ---------------------------------------------------------------------------- */
00002 /*                  Atmel Microcontroller Software Support                      */
00003 /*                       SAM Software Package License                           */
00004 /* ---------------------------------------------------------------------------- */
00005 /* Copyright (c) 2015, Atmel Corporation                                        */
00006 /*                                                                              */
00007 /* All rights reserved.                                                         */
00008 /*                                                                              */
00009 /* Redistribution and use in source and binary forms, with or without           */
00010 /* modification, are permitted provided that the following condition is met:    */
00011 /*                                                                              */
00012 /* - Redistributions of source code must retain the above copyright notice,     */
00013 /* this list of conditions and the disclaimer below.                            */
00014 /*                                                                              */
00015 /* Atmel's name may not be used to endorse or promote products derived from     */
00016 /* this software without specific prior written permission.                     */
00017 /*                                                                              */
00018 /* DISCLAIMER:  THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR   */
00019 /* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
00020 /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE   */
00021 /* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,      */
00022 /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
00023 /* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,  */
00024 /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF    */
00025 /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING         */
00026 /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
00027 /* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                           */
00028 /* ---------------------------------------------------------------------------- */
00029 
00030 #ifndef _SAMV71Q21_
00031 #define _SAMV71Q21_
00032 
00033 /** \addtogroup SAMV71Q21_definitions SAMV71Q21 definitions
00034   This file defines all structures and symbols for SAMV71Q21:
00035     - registers and bitfields
00036     - peripheral base address
00037     - peripheral ID
00038     - PIO definitions
00039 */
00040 /*@{*/
00041 
00042 #ifdef __cplusplus
00043  extern "C" {
00044 #endif
00045 
00046 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
00047 #include <stdint.h>
00048 #endif
00049 
00050 /* ************************************************************************** */
00051 /*   CMSIS DEFINITIONS FOR SAMV71Q21 */
00052 /* ************************************************************************** */
00053 /** \addtogroup SAMV71Q21_cmsis CMSIS Definitions */
00054 /*@{*/
00055 
00056 /**< Interrupt Number Definition */
00057 typedef enum IRQn
00058 {
00059 /******  Cortex-M7 Processor Exceptions Numbers ******************************/
00060   NonMaskableInt_IRQn   = -14, /**<  2 Non Maskable Interrupt                */
00061   HardFault_IRQn        = -13, /**<  3 HardFault Interrupt                   */
00062   MemoryManagement_IRQn = -12, /**<  4 Cortex-M7 Memory Management Interrupt */
00063   BusFault_IRQn         = -11, /**<  5 Cortex-M7 Bus Fault Interrupt         */
00064   UsageFault_IRQn       = -10, /**<  6 Cortex-M7 Usage Fault Interrupt       */
00065   SVCall_IRQn           = -5,  /**< 11 Cortex-M7 SV Call Interrupt           */
00066   DebugMonitor_IRQn     = -4,  /**< 12 Cortex-M7 Debug Monitor Interrupt     */
00067   PendSV_IRQn           = -2,  /**< 14 Cortex-M7 Pend SV Interrupt           */
00068   SysTick_IRQn          = -1,  /**< 15 Cortex-M7 System Tick Interrupt       */
00069 /******  SAMV71Q21 specific Interrupt Numbers *********************************/
00070 
00071   SUPC_IRQn            =  0, /**<  0 SAMV71Q21 Supply Controller (SUPC) */
00072   RSTC_IRQn            =  1, /**<  1 SAMV71Q21 Reset Controller (RSTC) */
00073   RTC_IRQn             =  2, /**<  2 SAMV71Q21 Real Time Clock (RTC) */
00074   RTT_IRQn             =  3, /**<  3 SAMV71Q21 Real Time Timer (RTT) */
00075   WDT_IRQn             =  4, /**<  4 SAMV71Q21 Watchdog Timer (WDT) */
00076   PMC_IRQn             =  5, /**<  5 SAMV71Q21 Power Management Controller (PMC) */
00077   EFC_IRQn             =  6, /**<  6 SAMV71Q21 Enhanced Embedded Flash Controller (EFC) */
00078   UART0_IRQn           =  7, /**<  7 SAMV71Q21 UART 0 (UART0) */
00079   UART1_IRQn           =  8, /**<  8 SAMV71Q21 UART 1 (UART1) */
00080   PIOA_IRQn            = 10, /**< 10 SAMV71Q21 Parallel I/O Controller A (PIOA) */
00081   PIOB_IRQn            = 11, /**< 11 SAMV71Q21 Parallel I/O Controller B (PIOB) */
00082   PIOC_IRQn            = 12, /**< 12 SAMV71Q21 Parallel I/O Controller C (PIOC) */
00083   USART0_IRQn          = 13, /**< 13 SAMV71Q21 USART 0 (USART0) */
00084   USART1_IRQn          = 14, /**< 14 SAMV71Q21 USART 1 (USART1) */
00085   USART2_IRQn          = 15, /**< 15 SAMV71Q21 USART 2 (USART2) */
00086   PIOD_IRQn            = 16, /**< 16 SAMV71Q21 Parallel I/O Controller D (PIOD) */
00087   PIOE_IRQn            = 17, /**< 17 SAMV71Q21 Parallel I/O Controller E (PIOE) */
00088   HSMCI_IRQn           = 18, /**< 18 SAMV71Q21 Multimedia Card Interface (HSMCI) */
00089   TWIHS0_IRQn          = 19, /**< 19 SAMV71Q21 Two Wire Interface 0 HS (TWIHS0) */
00090   TWIHS1_IRQn          = 20, /**< 20 SAMV71Q21 Two Wire Interface 1 HS (TWIHS1) */
00091   SPI0_IRQn            = 21, /**< 21 SAMV71Q21 Serial Peripheral Interface 0 (SPI0) */
00092   SSC_IRQn             = 22, /**< 22 SAMV71Q21 Synchronous Serial Controller (SSC) */
00093   TC0_IRQn             = 23, /**< 23 SAMV71Q21 Timer/Counter 0 (TC0) */
00094   TC1_IRQn             = 24, /**< 24 SAMV71Q21 Timer/Counter 1 (TC1) */
00095   TC2_IRQn             = 25, /**< 25 SAMV71Q21 Timer/Counter 2 (TC2) */
00096   TC3_IRQn             = 26, /**< 26 SAMV71Q21 Timer/Counter 3 (TC3) */
00097   TC4_IRQn             = 27, /**< 27 SAMV71Q21 Timer/Counter 4 (TC4) */
00098   TC5_IRQn             = 28, /**< 28 SAMV71Q21 Timer/Counter 5 (TC5) */
00099   AFEC0_IRQn           = 29, /**< 29 SAMV71Q21 Analog Front End 0 (AFEC0) */
00100   DACC_IRQn            = 30, /**< 30 SAMV71Q21 Digital To Analog Converter (DACC) */
00101   PWM0_IRQn            = 31, /**< 31 SAMV71Q21 Pulse Width Modulation 0 (PWM0) */
00102   ICM_IRQn             = 32, /**< 32 SAMV71Q21 Integrity Check Monitor (ICM) */
00103   ACC_IRQn             = 33, /**< 33 SAMV71Q21 Analog Comparator (ACC) */
00104   USBHS_IRQn           = 34, /**< 34 SAMV71Q21 USB Host / Device Controller (USBHS) */
00105   MCAN0_IRQn           = 35, /**< 35 SAMV71Q21 MCAN Controller 0 (MCAN0) */
00106   MCAN0_LINE1_IRQn     = 36, /**< 36 SAMV71Q21 MCAN Controller 0 LINE1 (MCAN0) */
00107   MCAN1_IRQn           = 37, /**< 37 SAMV71Q21 MCAN Controller 1 (MCAN1) */
00108   MCAN1_LINE1_IRQn     = 38, /**< 38 SAMV71Q21 MCAN Controller 1 LINE1 (MCAN1) */
00109   GMAC_IRQn            = 39, /**< 39 SAMV71Q21 Ethernet MAC (GMAC) */
00110   AFEC1_IRQn           = 40, /**< 40 SAMV71Q21 Analog Front End 1 (AFEC1) */
00111   TWIHS2_IRQn          = 41, /**< 41 SAMV71Q21 Two Wire Interface 2 HS (TWIHS2) */
00112   SPI1_IRQn            = 42, /**< 42 SAMV71Q21 Serial Peripheral Interface 1 (SPI1) */
00113   QSPI_IRQn            = 43, /**< 43 SAMV71Q21 Quad I/O Serial Peripheral Interface (QSPI) */
00114   UART2_IRQn           = 44, /**< 44 SAMV71Q21 UART 2 (UART2) */
00115   UART3_IRQn           = 45, /**< 45 SAMV71Q21 UART 3 (UART3) */
00116   UART4_IRQn           = 46, /**< 46 SAMV71Q21 UART 4 (UART4) */
00117   TC6_IRQn             = 47, /**< 47 SAMV71Q21 Timer/Counter 6 (TC6) */
00118   TC7_IRQn             = 48, /**< 48 SAMV71Q21 Timer/Counter 7 (TC7) */
00119   TC8_IRQn             = 49, /**< 49 SAMV71Q21 Timer/Counter 8 (TC8) */
00120   TC9_IRQn             = 50, /**< 50 SAMV71Q21 Timer/Counter 9 (TC9) */
00121   TC10_IRQn            = 51, /**< 51 SAMV71Q21 Timer/Counter 10 (TC10) */
00122   TC11_IRQn            = 52, /**< 52 SAMV71Q21 Timer/Counter 11 (TC11) */
00123   MLB_IRQn             = 53, /**< 53 SAMV71Q21 MediaLB (MLB) */
00124   AES_IRQn             = 56, /**< 56 SAMV71Q21 AES (AES) */
00125   TRNG_IRQn            = 57, /**< 57 SAMV71Q21 True Random Generator (TRNG) */
00126   XDMAC_IRQn           = 58, /**< 58 SAMV71Q21 DMA (XDMAC) */
00127   ISI_IRQn             = 59, /**< 59 SAMV71Q21 Camera Interface (ISI) */
00128   PWM1_IRQn            = 60, /**< 60 SAMV71Q21 Pulse Width Modulation 1 (PWM1) */
00129   SDRAMC_IRQn          = 62, /**< 62 SAMV71Q21 SDRAM Controller (SDRAMC) */
00130   RSWDT_IRQn           = 63, /**< 63 SAMV71Q21 Reinforced Secure Watchdog Timer (RSWDT) */
00131 
00132   PERIPH_COUNT_IRQn    = 64  /**< Number of peripheral IDs */
00133 } IRQn_Type;
00134 
00135 typedef struct _DeviceVectors
00136 {
00137   /* Stack pointer */
00138   void* pvStack;
00139 
00140   /* Cortex-M handlers */
00141   void* pfnReset_Handler;
00142   void* pfnNMI_Handler;
00143   void* pfnHardFault_Handler;
00144   void* pfnMemManage_Handler;
00145   void* pfnBusFault_Handler;
00146   void* pfnUsageFault_Handler;
00147   void* pfnReserved1_Handler;
00148   void* pfnReserved2_Handler;
00149   void* pfnReserved3_Handler;
00150   void* pfnReserved4_Handler;
00151   void* pfnSVC_Handler;
00152   void* pfnDebugMon_Handler;
00153   void* pfnReserved5_Handler;
00154   void* pfnPendSV_Handler;
00155   void* pfnSysTick_Handler;
00156 
00157   /* Peripheral handlers */
00158   void* pfnSUPC_Handler;   /*  0 Supply Controller */
00159   void* pfnRSTC_Handler;   /*  1 Reset Controller */
00160   void* pfnRTC_Handler;    /*  2 Real Time Clock */
00161   void* pfnRTT_Handler;    /*  3 Real Time Timer */
00162   void* pfnWDT_Handler;    /*  4 Watchdog Timer */
00163   void* pfnPMC_Handler;    /*  5 Power Management Controller */
00164   void* pfnEFC_Handler;    /*  6 Enhanced Embedded Flash Controller */
00165   void* pfnUART0_Handler;  /*  7 UART 0 */
00166   void* pfnUART1_Handler;  /*  8 UART 1 */
00167   void* pvReserved9;
00168   void* pfnPIOA_Handler;   /* 10 Parallel I/O Controller A */
00169   void* pfnPIOB_Handler;   /* 11 Parallel I/O Controller B */
00170   void* pfnPIOC_Handler;   /* 12 Parallel I/O Controller C */
00171   void* pfnUSART0_Handler; /* 13 USART 0 */
00172   void* pfnUSART1_Handler; /* 14 USART 1 */
00173   void* pfnUSART2_Handler; /* 15 USART 2 */
00174   void* pfnPIOD_Handler;   /* 16 Parallel I/O Controller D */
00175   void* pfnPIOE_Handler;   /* 17 Parallel I/O Controller E */
00176   void* pfnHSMCI_Handler;  /* 18 Multimedia Card Interface */
00177   void* pfnTWIHS0_Handler; /* 19 Two Wire Interface 0 HS */
00178   void* pfnTWIHS1_Handler; /* 20 Two Wire Interface 1 HS */
00179   void* pfnSPI0_Handler;   /* 21 Serial Peripheral Interface 0 */
00180   void* pfnSSC_Handler;    /* 22 Synchronous Serial Controller */
00181   void* pfnTC0_Handler;    /* 23 Timer/Counter 0 */
00182   void* pfnTC1_Handler;    /* 24 Timer/Counter 1 */
00183   void* pfnTC2_Handler;    /* 25 Timer/Counter 2 */
00184   void* pfnTC3_Handler;    /* 26 Timer/Counter 3 */
00185   void* pfnTC4_Handler;    /* 27 Timer/Counter 4 */
00186   void* pfnTC5_Handler;    /* 28 Timer/Counter 5 */
00187   void* pfnAFEC0_Handler;  /* 29 Analog Front End 0 */
00188   void* pfnDACC_Handler;   /* 30 Digital To Analog Converter */
00189   void* pfnPWM0_Handler;   /* 31 Pulse Width Modulation 0 */
00190   void* pfnICM_Handler;    /* 32 Integrity Check Monitor */
00191   void* pfnACC_Handler;    /* 33 Analog Comparator */
00192   void* pfnUSBHS_Handler;  /* 34 USB Host / Device Controller */
00193   void* pfnMCAN0_Handler;  /* 35 MCAN Controller 0 */
00194   void* pfnMCAN0_Line1_Handler;  /* 36 MCAN Controller 0 */
00195   void* pfnMCAN1_Handler;  /* 37 MCAN Controller 1 */
00196   void* pfnMCAN1_Line1_Handler;  /* 38 MCAN Controller 1 */
00197   void* pfnGMAC_Handler;   /* 39 Ethernet MAC */
00198   void* pfnAFEC1_Handler;  /* 40 Analog Front End 1 */
00199   void* pfnTWIHS2_Handler; /* 41 Two Wire Interface 2 HS */
00200   void* pfnSPI1_Handler;   /* 42 Serial Peripheral Interface 1 */
00201   void* pfnQSPI_Handler;   /* 43 Quad I/O Serial Peripheral Interface */
00202   void* pfnUART2_Handler;  /* 44 UART 2 */
00203   void* pfnUART3_Handler;  /* 45 UART 3 */
00204   void* pfnUART4_Handler;  /* 46 UART 4 */
00205   void* pfnTC6_Handler;    /* 47 Timer/Counter 6 */
00206   void* pfnTC7_Handler;    /* 48 Timer/Counter 7 */
00207   void* pfnTC8_Handler;    /* 49 Timer/Counter 8 */
00208   void* pfnTC9_Handler;    /* 50 Timer/Counter 9 */
00209   void* pfnTC10_Handler;   /* 51 Timer/Counter 10 */
00210   void* pfnTC11_Handler;   /* 52 Timer/Counter 11 */
00211   void* pfnMLB_Handler;    /* 53 MediaLB */
00212   void* pvReserved54;
00213   void* pvReserved55;
00214   void* pfnAES_Handler;    /* 56 AES */
00215   void* pfnTRNG_Handler;   /* 57 True Random Generator */
00216   void* pfnXDMAC_Handler;  /* 58 DMA */
00217   void* pfnISI_Handler;    /* 59 Camera Interface */
00218   void* pfnPWM1_Handler;   /* 60 Pulse Width Modulation 1 */
00219   void* pvReserved61;
00220   void* pfnSDRAMC_Handler; /* 62 SDRAM Controller */
00221   void* pfnRSWDT_Handler;  /* 63 Reinforced Secure Watchdog Timer */
00222 } DeviceVectors;
00223 
00224 /* Cortex-M7 core handlers */
00225 void Reset_Handler      ( void );
00226 void NMI_Handler        ( void );
00227 void HardFault_Handler  ( void );
00228 void MemManage_Handler  ( void );
00229 void BusFault_Handler   ( void );
00230 void UsageFault_Handler ( void );
00231 void SVC_Handler        ( void );
00232 void DebugMon_Handler   ( void );
00233 void PendSV_Handler     ( void );
00234 void SysTick_Handler    ( void );
00235 
00236 /* Peripherals handlers */
00237 void ACC_Handler        ( void );
00238 void AES_Handler        ( void );
00239 void AFEC0_Handler      ( void );
00240 void AFEC1_Handler      ( void );
00241 void DACC_Handler       ( void );
00242 void EFC_Handler        ( void );
00243 void GMAC_Handler       ( void );
00244 void HSMCI_Handler      ( void );
00245 void ICM_Handler        ( void );
00246 void ISI_Handler        ( void );
00247 void MCAN0_Handler      ( void );
00248 void MCAN0_Line1_Handler  ( void );
00249 void MCAN1_Handler      ( void );
00250 void MCAN1_Line1_Handler  ( void );
00251 void MLB_Handler        ( void );
00252 void PIOA_Handler       ( void );
00253 void PIOB_Handler       ( void );
00254 void PIOC_Handler       ( void );
00255 void PIOD_Handler       ( void );
00256 void PIOE_Handler       ( void );
00257 void PMC_Handler        ( void );
00258 void PWM0_Handler       ( void );
00259 void PWM1_Handler       ( void );
00260 void QSPI_Handler       ( void );
00261 void RSTC_Handler       ( void );
00262 void RSWDT_Handler      ( void );
00263 void RTC_Handler        ( void );
00264 void RTT_Handler        ( void );
00265 void SDRAMC_Handler     ( void );
00266 void SPI0_Handler       ( void );
00267 void SPI1_Handler       ( void );
00268 void SSC_Handler        ( void );
00269 void SUPC_Handler       ( void );
00270 void TC0_Handler        ( void );
00271 void TC1_Handler        ( void );
00272 void TC2_Handler        ( void );
00273 void TC3_Handler        ( void );
00274 void TC4_Handler        ( void );
00275 void TC5_Handler        ( void );
00276 void TC6_Handler        ( void );
00277 void TC7_Handler        ( void );
00278 void TC8_Handler        ( void );
00279 void TC9_Handler        ( void );
00280 void TC10_Handler       ( void );
00281 void TC11_Handler       ( void );
00282 void TRNG_Handler       ( void );
00283 void TWIHS0_Handler     ( void );
00284 void TWIHS1_Handler     ( void );
00285 void TWIHS2_Handler     ( void );
00286 void UART0_Handler      ( void );
00287 void UART1_Handler      ( void );
00288 void UART2_Handler      ( void );
00289 void UART3_Handler      ( void );
00290 void UART4_Handler      ( void );
00291 void USART0_Handler     ( void );
00292 void USART1_Handler     ( void );
00293 void USART2_Handler     ( void );
00294 void USBHS_Handler      ( void );
00295 void WDT_Handler        ( void );
00296 void XDMAC_Handler      ( void );
00297 
00298 /**
00299  * \brief Configuration of the Cortex-M7 Processor and Core Peripherals
00300  */
00301 
00302 #define __CM7_REV              0x0000 /**< SAMV71Q21 core revision number ([15:8] revision number, [7:0] patch number) */
00303 #define __MPU_PRESENT          1      /**< SAMV71Q21 does provide a MPU */
00304 #define __NVIC_PRIO_BITS       3      /**< SAMV71Q21 uses 3 Bits for the Priority Levels */
00305 #define __FPU_PRESENT          1      /**< SAMV71Q21 does provide a FPU                */
00306 #define __FPU_DP               1      /**< SAMV71Q21 Double precision FPU              */
00307 #define __ICACHE_PRESENT       1      /**< SAMV71Q21 does provide an Instruction Cache */
00308 #define __DCACHE_PRESENT       1      /**< SAMV71Q21 does provide a Data Cache         */
00309 #define __DTCM_PRESENT         1      /**< SAMV71Q21 does provide a Data TCM           */
00310 #define __ITCM_PRESENT         1      /**< SAMV71Q21 does provide an Instruction TCM   */
00311 #define __Vendor_SysTickConfig 0      /**< Set to 1 if different SysTick Config is used */
00312 
00313 /*
00314  * \brief CMSIS includes
00315  */
00316 
00317 #include <core_cm7.h>
00318 #if !defined DONT_USE_CMSIS_INIT
00319 #include "system_samv71.h"
00320 #endif /* DONT_USE_CMSIS_INIT */
00321 
00322 /*@}*/
00323 
00324 /* ************************************************************************** */
00325 /**  SOFTWARE PERIPHERAL API DEFINITION FOR SAMV71Q21 */
00326 /* ************************************************************************** */
00327 /** \addtogroup SAMV71Q21_api Peripheral Software API */
00328 /*@{*/
00329 
00330 #include "component/component_acc.h"
00331 #include "component/component_aes.h"
00332 #include "component/component_afec.h"
00333 #include "component/component_chipid.h"
00334 #include "component/component_dacc.h"
00335 #include "component/component_efc.h"
00336 #include "component/component_gmac.h"
00337 #include "component/component_gpbr.h"
00338 #include "component/component_hsmci.h"
00339 #include "component/component_icm.h"
00340 #include "component/component_isi.h"
00341 #include "component/component_matrix.h"
00342 #include "component/component_mcan.h"
00343 #include "component/component_mlb.h"
00344 #include "component/component_pio.h"
00345 #include "component/component_pmc.h"
00346 #include "component/component_pwm.h"
00347 #include "component/component_qspi.h"
00348 #include "component/component_rstc.h"
00349 #include "component/component_rswdt.h"
00350 #include "component/component_rtc.h"
00351 #include "component/component_rtt.h"
00352 #include "component/component_sdramc.h"
00353 #include "component/component_smc.h"
00354 #include "component/component_spi.h"
00355 #include "component/component_ssc.h"
00356 #include "component/component_supc.h"
00357 #include "component/component_tc.h"
00358 #include "component/component_trng.h"
00359 #include "component/component_twihs.h"
00360 #include "component/component_uart.h"
00361 #include "component/component_usart.h"
00362 #include "component/component_usbhs.h"
00363 #include "component/component_utmi.h"
00364 #include "component/component_wdt.h"
00365 #include "component/component_xdmac.h"
00366 /*@}*/
00367 
00368 /* ************************************************************************** */
00369 /*   REGISTER ACCESS DEFINITIONS FOR SAMV71Q21 */
00370 /* ************************************************************************** */
00371 /** \addtogroup SAMV71Q21_reg Registers Access Definitions */
00372 /*@{*/
00373 
00374 #include "instance/instance_hsmci.h"
00375 #include "instance/instance_ssc.h"
00376 #include "instance/instance_spi0.h"
00377 #include "instance/instance_tc0.h"
00378 #include "instance/instance_tc1.h"
00379 #include "instance/instance_tc2.h"
00380 #include "instance/instance_twihs0.h"
00381 #include "instance/instance_twihs1.h"
00382 #include "instance/instance_pwm0.h"
00383 #include "instance/instance_usart0.h"
00384 #include "instance/instance_usart1.h"
00385 #include "instance/instance_usart2.h"
00386 #include "instance/instance_mcan0.h"
00387 #include "instance/instance_mcan1.h"
00388 #include "instance/instance_usbhs.h"
00389 #include "instance/instance_afec0.h"
00390 #include "instance/instance_dacc.h"
00391 #include "instance/instance_acc.h"
00392 #include "instance/instance_icm.h"
00393 #include "instance/instance_isi.h"
00394 #include "instance/instance_gmac.h"
00395 #include "instance/instance_tc3.h"
00396 #include "instance/instance_spi1.h"
00397 #include "instance/instance_pwm1.h"
00398 #include "instance/instance_twihs2.h"
00399 #include "instance/instance_afec1.h"
00400 #include "instance/instance_mlb.h"
00401 #include "instance/instance_aes.h"
00402 #include "instance/instance_trng.h"
00403 #include "instance/instance_xdmac.h"
00404 #include "instance/instance_qspi.h"
00405 #include "instance/instance_smc.h"
00406 #include "instance/instance_sdramc.h"
00407 #include "instance/instance_matrix.h"
00408 #include "instance/instance_utmi.h"
00409 #include "instance/instance_pmc.h"
00410 #include "instance/instance_uart0.h"
00411 #include "instance/instance_chipid.h"
00412 #include "instance/instance_uart1.h"
00413 #include "instance/instance_efc.h"
00414 #include "instance/instance_pioa.h"
00415 #include "instance/instance_piob.h"
00416 #include "instance/instance_pioc.h"
00417 #include "instance/instance_piod.h"
00418 #include "instance/instance_pioe.h"
00419 #include "instance/instance_rstc.h"
00420 #include "instance/instance_supc.h"
00421 #include "instance/instance_rtt.h"
00422 #include "instance/instance_wdt.h"
00423 #include "instance/instance_rtc.h"
00424 #include "instance/instance_gpbr.h"
00425 #include "instance/instance_rswdt.h"
00426 #include "instance/instance_uart2.h"
00427 #include "instance/instance_uart3.h"
00428 #include "instance/instance_uart4.h"
00429 /*@}*/
00430 
00431 /* ************************************************************************** */
00432 /*   PERIPHERAL ID DEFINITIONS FOR SAMV71Q21 */
00433 /* ************************************************************************** */
00434 /** \addtogroup SAMV71Q21_id Peripheral Ids Definitions */
00435 /*@{*/
00436 
00437 #define ID_SUPC   ( 0) /**< \brief Supply Controller (SUPC) */
00438 #define ID_RSTC   ( 1) /**< \brief Reset Controller (RSTC) */
00439 #define ID_RTC    ( 2) /**< \brief Real Time Clock (RTC) */
00440 #define ID_RTT    ( 3) /**< \brief Real Time Timer (RTT) */
00441 #define ID_WDT    ( 4) /**< \brief Watchdog Timer (WDT) */
00442 #define ID_PMC    ( 5) /**< \brief Power Management Controller (PMC) */
00443 #define ID_EFC    ( 6) /**< \brief Enhanced Embedded Flash Controller (EFC) */
00444 #define ID_UART0  ( 7) /**< \brief UART 0 (UART0) */
00445 #define ID_UART1  ( 8) /**< \brief UART 1 (UART1) */
00446 #define ID_SMC    ( 9) /**< \brief Static Memory Controller (SMC) */
00447 #define ID_PIOA   (10) /**< \brief Parallel I/O Controller A (PIOA) */
00448 #define ID_PIOB   (11) /**< \brief Parallel I/O Controller B (PIOB) */
00449 #define ID_PIOC   (12) /**< \brief Parallel I/O Controller C (PIOC) */
00450 #define ID_USART0 (13) /**< \brief USART 0 (USART0) */
00451 #define ID_USART1 (14) /**< \brief USART 1 (USART1) */
00452 #define ID_USART2 (15) /**< \brief USART 2 (USART2) */
00453 #define ID_PIOD   (16) /**< \brief Parallel I/O Controller D (PIOD) */
00454 #define ID_PIOE   (17) /**< \brief Parallel I/O Controller E (PIOE) */
00455 #define ID_HSMCI  (18) /**< \brief Multimedia Card Interface (HSMCI) */
00456 #define ID_TWIHS0 (19) /**< \brief Two Wire Interface 0 HS (TWIHS0) */
00457 #define ID_TWIHS1 (20) /**< \brief Two Wire Interface 1 HS (TWIHS1) */
00458 #define ID_SPI0   (21) /**< \brief Serial Peripheral Interface 0 (SPI0) */
00459 #define ID_SSC    (22) /**< \brief Synchronous Serial Controller (SSC) */
00460 #define ID_TC0    (23) /**< \brief Timer/Counter 0 (TC0) */
00461 #define ID_TC1    (24) /**< \brief Timer/Counter 1 (TC1) */
00462 #define ID_TC2    (25) /**< \brief Timer/Counter 2 (TC2) */
00463 #define ID_TC3    (26) /**< \brief Timer/Counter 3 (TC3) */
00464 #define ID_TC4    (27) /**< \brief Timer/Counter 4 (TC4) */
00465 #define ID_TC5    (28) /**< \brief Timer/Counter 5 (TC5) */
00466 #define ID_AFEC0  (29) /**< \brief Analog Front End 0 (AFEC0) */
00467 #define ID_DACC   (30) /**< \brief Digital To Analog Converter (DACC) */
00468 #define ID_PWM0   (31) /**< \brief Pulse Width Modulation 0 (PWM0) */
00469 #define ID_ICM    (32) /**< \brief Integrity Check Monitor (ICM) */
00470 #define ID_ACC    (33) /**< \brief Analog Comparator (ACC) */
00471 #define ID_USBHS  (34) /**< \brief USB Host / Device Controller (USBHS) */
00472 #define ID_MCAN0  (35) /**< \brief MCAN Controller 0 (MCAN0) */
00473 #define ID_MCAN1  (37) /**< \brief MCAN Controller 1 (MCAN1) */
00474 #define ID_GMAC   (39) /**< \brief Ethernet MAC (GMAC) */
00475 #define ID_AFEC1  (40) /**< \brief Analog Front End 1 (AFEC1) */
00476 #define ID_TWIHS2 (41) /**< \brief Two Wire Interface 2 HS (TWIHS2) */
00477 #define ID_SPI1   (42) /**< \brief Serial Peripheral Interface 1 (SPI1) */
00478 #define ID_QSPI   (43) /**< \brief Quad I/O Serial Peripheral Interface (QSPI) */
00479 #define ID_UART2  (44) /**< \brief UART 2 (UART2) */
00480 #define ID_UART3  (45) /**< \brief UART 3 (UART3) */
00481 #define ID_UART4  (46) /**< \brief UART 4 (UART4) */
00482 #define ID_TC6    (47) /**< \brief Timer/Counter 6 (TC6) */
00483 #define ID_TC7    (48) /**< \brief Timer/Counter 7 (TC7) */
00484 #define ID_TC8    (49) /**< \brief Timer/Counter 8 (TC8) */
00485 #define ID_TC9    (50) /**< \brief Timer/Counter 9 (TC9) */
00486 #define ID_TC10   (51) /**< \brief Timer/Counter 10 (TC10) */
00487 #define ID_TC11   (52) /**< \brief Timer/Counter 11 (TC11) */
00488 #define ID_MLB    (53) /**< \brief MediaLB (MLB) */
00489 #define ID_AES    (56) /**< \brief AES (AES) */
00490 #define ID_TRNG   (57) /**< \brief True Random Generator (TRNG) */
00491 #define ID_XDMAC  (58) /**< \brief DMA (XDMAC) */
00492 #define ID_ISI    (59) /**< \brief Camera Interface (ISI) */
00493 #define ID_PWM1   (60) /**< \brief Pulse Width Modulation 1 (PWM1) */
00494 #define ID_SDRAMC (62) /**< \brief SDRAM Controller (SDRAMC) */
00495 #define ID_RSWDT  (63) /**< \brief Reinforced Secure Watchdog Timer (RSWDT) */
00496 
00497 #define ID_PERIPH_COUNT (64) /**< \brief Number of peripheral IDs */
00498 /*@}*/
00499 
00500 /* ************************************************************************** */
00501 /*   BASE ADDRESS DEFINITIONS FOR SAMV71Q21 */
00502 /* ************************************************************************** */
00503 /** \addtogroup SAMV71Q21_base Peripheral Base Address Definitions */
00504 /*@{*/
00505 
00506 #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
00507 #define HSMCI  (0x40000000U) /**< \brief (HSMCI ) Base Address */
00508 #define SSC    (0x40004000U) /**< \brief (SSC   ) Base Address */
00509 #define SPI0   (0x40008000U) /**< \brief (SPI0  ) Base Address */
00510 #define TC0    (0x4000C000U) /**< \brief (TC0   ) Base Address */
00511 #define TC1    (0x40010000U) /**< \brief (TC1   ) Base Address */
00512 #define TC2    (0x40014000U) /**< \brief (TC2   ) Base Address */
00513 #define TWIHS0 (0x40018000U) /**< \brief (TWIHS0) Base Address */
00514 #define TWIHS1 (0x4001C000U) /**< \brief (TWIHS1) Base Address */
00515 #define PWM0   (0x40020000U) /**< \brief (PWM0  ) Base Address */
00516 #define USART0 (0x40024000U) /**< \brief (USART0) Base Address */
00517 #define USART1 (0x40028000U) /**< \brief (USART1) Base Address */
00518 #define USART2 (0x4002C000U) /**< \brief (USART2) Base Address */
00519 #define MCAN0  (0x40030000U) /**< \brief (MCAN0 ) Base Address */
00520 #define MCAN1  (0x40034000U) /**< \brief (MCAN1 ) Base Address */
00521 #define USBHS  (0x40038000U) /**< \brief (USBHS ) Base Address */
00522 #define AFEC0  (0x4003C000U) /**< \brief (AFEC0 ) Base Address */
00523 #define DACC   (0x40040000U) /**< \brief (DACC  ) Base Address */
00524 #define ACC    (0x40044000U) /**< \brief (ACC   ) Base Address */
00525 #define ICM    (0x40048000U) /**< \brief (ICM   ) Base Address */
00526 #define ISI    (0x4004C000U) /**< \brief (ISI   ) Base Address */
00527 #define GMAC   (0x40050000U) /**< \brief (GMAC  ) Base Address */
00528 #define TC3    (0x40054000U) /**< \brief (TC3   ) Base Address */
00529 #define SPI1   (0x40058000U) /**< \brief (SPI1  ) Base Address */
00530 #define PWM1   (0x4005C000U) /**< \brief (PWM1  ) Base Address */
00531 #define TWIHS2 (0x40060000U) /**< \brief (TWIHS2) Base Address */
00532 #define AFEC1  (0x40064000U) /**< \brief (AFEC1 ) Base Address */
00533 #define MLB    (0x40068000U) /**< \brief (MLB   ) Base Address */
00534 #define AES    (0x4006C000U) /**< \brief (AES   ) Base Address */
00535 #define TRNG   (0x40070000U) /**< \brief (TRNG  ) Base Address */
00536 #define XDMAC  (0x40078000U) /**< \brief (XDMAC ) Base Address */
00537 #define QSPI   (0x4007C000U) /**< \brief (QSPI  ) Base Address */
00538 #define SMC    (0x40080000U) /**< \brief (SMC   ) Base Address */
00539 #define SDRAMC (0x40084000U) /**< \brief (SDRAMC) Base Address */
00540 #define MATRIX (0x40088000U) /**< \brief (MATRIX) Base Address */
00541 #define UTMI   (0x400E0400U) /**< \brief (UTMI  ) Base Address */
00542 #define PMC    (0x400E0600U) /**< \brief (PMC   ) Base Address */
00543 #define UART0  (0x400E0800U) /**< \brief (UART0 ) Base Address */
00544 #define CHIPID (0x400E0940U) /**< \brief (CHIPID) Base Address */
00545 #define UART1  (0x400E0A00U) /**< \brief (UART1 ) Base Address */
00546 #define EFC    (0x400E0C00U) /**< \brief (EFC   ) Base Address */
00547 #define PIOA   (0x400E0E00U) /**< \brief (PIOA  ) Base Address */
00548 #define PIOB   (0x400E1000U) /**< \brief (PIOB  ) Base Address */
00549 #define PIOC   (0x400E1200U) /**< \brief (PIOC  ) Base Address */
00550 #define PIOD   (0x400E1400U) /**< \brief (PIOD  ) Base Address */
00551 #define PIOE   (0x400E1600U) /**< \brief (PIOE  ) Base Address */
00552 #define RSTC   (0x400E1800U) /**< \brief (RSTC  ) Base Address */
00553 #define SUPC   (0x400E1810U) /**< \brief (SUPC  ) Base Address */
00554 #define RTT    (0x400E1830U) /**< \brief (RTT   ) Base Address */
00555 #define WDT    (0x400E1850U) /**< \brief (WDT   ) Base Address */
00556 #define RTC    (0x400E1860U) /**< \brief (RTC   ) Base Address */
00557 #define GPBR   (0x400E1890U) /**< \brief (GPBR  ) Base Address */
00558 #define RSWDT  (0x400E1900U) /**< \brief (RSWDT ) Base Address */
00559 #define UART2  (0x400E1A00U) /**< \brief (UART2 ) Base Address */
00560 #define UART3  (0x400E1C00U) /**< \brief (UART3 ) Base Address */
00561 #define UART4  (0x400E1E00U) /**< \brief (UART4 ) Base Address */
00562 #else
00563 #define HSMCI  ((Hsmci  *)0x40000000U) /**< \brief (HSMCI ) Base Address */
00564 #define SSC    ((Ssc    *)0x40004000U) /**< \brief (SSC   ) Base Address */
00565 #define SPI0   ((Spi    *)0x40008000U) /**< \brief (SPI0  ) Base Address */
00566 #define TC0    ((Tc     *)0x4000C000U) /**< \brief (TC0   ) Base Address */
00567 #define TC1    ((Tc     *)0x40010000U) /**< \brief (TC1   ) Base Address */
00568 #define TC2    ((Tc     *)0x40014000U) /**< \brief (TC2   ) Base Address */
00569 #define TWIHS0 ((Twihs  *)0x40018000U) /**< \brief (TWIHS0) Base Address */
00570 #define TWIHS1 ((Twihs  *)0x4001C000U) /**< \brief (TWIHS1) Base Address */
00571 #define PWM0   ((Pwm    *)0x40020000U) /**< \brief (PWM0  ) Base Address */
00572 #define USART0 ((Usart  *)0x40024000U) /**< \brief (USART0) Base Address */
00573 #define USART1 ((Usart  *)0x40028000U) /**< \brief (USART1) Base Address */
00574 #define USART2 ((Usart  *)0x4002C000U) /**< \brief (USART2) Base Address */
00575 #define MCAN0  ((Mcan   *)0x40030000U) /**< \brief (MCAN0 ) Base Address */
00576 #define MCAN1  ((Mcan   *)0x40034000U) /**< \brief (MCAN1 ) Base Address */
00577 #define USBHS  ((Usbhs  *)0x40038000U) /**< \brief (USBHS ) Base Address */
00578 #define AFEC0  ((Afec   *)0x4003C000U) /**< \brief (AFEC0 ) Base Address */
00579 #define DACC   ((Dacc   *)0x40040000U) /**< \brief (DACC  ) Base Address */
00580 #define ACC    ((Acc    *)0x40044000U) /**< \brief (ACC   ) Base Address */
00581 #define ICM    ((Icm    *)0x40048000U) /**< \brief (ICM   ) Base Address */
00582 #define ISI    ((Isi    *)0x4004C000U) /**< \brief (ISI   ) Base Address */
00583 #define GMAC   ((Gmac   *)0x40050000U) /**< \brief (GMAC  ) Base Address */
00584 #define TC3    ((Tc     *)0x40054000U) /**< \brief (TC3   ) Base Address */
00585 #define SPI1   ((Spi    *)0x40058000U) /**< \brief (SPI1  ) Base Address */
00586 #define PWM1   ((Pwm    *)0x4005C000U) /**< \brief (PWM1  ) Base Address */
00587 #define TWIHS2 ((Twihs  *)0x40060000U) /**< \brief (TWIHS2) Base Address */
00588 #define AFEC1  ((Afec   *)0x40064000U) /**< \brief (AFEC1 ) Base Address */
00589 #define MLB    ((Mlb    *)0x40068000U) /**< \brief (MLB   ) Base Address */
00590 #define AES    ((Aes    *)0x4006C000U) /**< \brief (AES   ) Base Address */
00591 #define TRNG   ((Trng   *)0x40070000U) /**< \brief (TRNG  ) Base Address */
00592 #define XDMAC  ((Xdmac  *)0x40078000U) /**< \brief (XDMAC ) Base Address */
00593 #define QSPI   ((Qspi   *)0x4007C000U) /**< \brief (QSPI  ) Base Address */
00594 #define SMC    ((Smc    *)0x40080000U) /**< \brief (SMC   ) Base Address */
00595 #define SDRAMC ((Sdramc *)0x40084000U) /**< \brief (SDRAMC) Base Address */
00596 #define MATRIX ((Matrix *)0x40088000U) /**< \brief (MATRIX) Base Address */
00597 #define UTMI   ((Utmi   *)0x400E0400U) /**< \brief (UTMI  ) Base Address */
00598 #define PMC    ((Pmc    *)0x400E0600U) /**< \brief (PMC   ) Base Address */
00599 #define UART0  ((Uart   *)0x400E0800U) /**< \brief (UART0 ) Base Address */
00600 #define CHIPID ((Chipid *)0x400E0940U) /**< \brief (CHIPID) Base Address */
00601 #define UART1  ((Uart   *)0x400E0A00U) /**< \brief (UART1 ) Base Address */
00602 #define EFC    ((Efc    *)0x400E0C00U) /**< \brief (EFC   ) Base Address */
00603 #define PIOA   ((Pio    *)0x400E0E00U) /**< \brief (PIOA  ) Base Address */
00604 #define PIOB   ((Pio    *)0x400E1000U) /**< \brief (PIOB  ) Base Address */
00605 #define PIOC   ((Pio    *)0x400E1200U) /**< \brief (PIOC  ) Base Address */
00606 #define PIOD   ((Pio    *)0x400E1400U) /**< \brief (PIOD  ) Base Address */
00607 #define PIOE   ((Pio    *)0x400E1600U) /**< \brief (PIOE  ) Base Address */
00608 #define RSTC   ((Rstc   *)0x400E1800U) /**< \brief (RSTC  ) Base Address */
00609 #define SUPC   ((Supc   *)0x400E1810U) /**< \brief (SUPC  ) Base Address */
00610 #define RTT    ((Rtt    *)0x400E1830U) /**< \brief (RTT   ) Base Address */
00611 #define WDT    ((Wdt    *)0x400E1850U) /**< \brief (WDT   ) Base Address */
00612 #define RTC    ((Rtc    *)0x400E1860U) /**< \brief (RTC   ) Base Address */
00613 #define GPBR   ((Gpbr   *)0x400E1890U) /**< \brief (GPBR  ) Base Address */
00614 #define RSWDT  ((Rswdt  *)0x400E1900U) /**< \brief (RSWDT ) Base Address */
00615 #define UART2  ((Uart   *)0x400E1A00U) /**< \brief (UART2 ) Base Address */
00616 #define UART3  ((Uart   *)0x400E1C00U) /**< \brief (UART3 ) Base Address */
00617 #define UART4  ((Uart   *)0x400E1E00U) /**< \brief (UART4 ) Base Address */
00618 #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
00619 /*@}*/
00620 
00621 /* ************************************************************************** */
00622 /*   PIO DEFINITIONS FOR SAMV71Q21 */
00623 /* ************************************************************************** */
00624 /** \addtogroup SAMV71Q21_pio Peripheral Pio Definitions */
00625 /*@{*/
00626 
00627 #include "pio/pio_samv71q21.h"
00628 /*@}*/
00629 
00630 /* ************************************************************************** */
00631 /*   MEMORY MAPPING DEFINITIONS FOR SAMV71Q21 */
00632 /* ************************************************************************** */
00633 
00634 #define IFLASH_SIZE             (0x200000u)
00635 #define IFLASH_PAGE_SIZE        (512u)
00636 #define IFLASH_LOCK_REGION_SIZE (8192u)
00637 #define IFLASH_NB_OF_PAGES      (4096u)
00638 #define IFLASH_NB_OF_LOCK_BITS  (128u)
00639 #define IRAM_SIZE               (0x60000u)
00640 
00641 #define QSPIMEM_ADDR  (0x80000000u) /**< QSPI Memory base address */
00642 #define AXIMX_ADDR    (0xA0000000u) /**< AXI Bus Matrix base address */
00643 #define ITCM_ADDR     (0x00000000u) /**< Instruction Tightly Coupled Memory base address */
00644 #define IFLASH_ADDR   (0x00400000u) /**< Internal Flash base address */
00645 #define IROM_ADDR     (0x00800000u) /**< Internal ROM base address */
00646 #define DTCM_ADDR     (0x20000000u) /**< Data Tightly Coupled Memory base address */
00647 #define IRAM_ADDR     (0x20400000u) /**< Internal RAM base address */
00648 #define EBI_CS0_ADDR  (0x60000000u) /**< EBI Chip Select 0 base address */
00649 #define EBI_CS1_ADDR  (0x61000000u) /**< EBI Chip Select 1 base address */
00650 #define EBI_CS2_ADDR  (0x62000000u) /**< EBI Chip Select 2 base address */
00651 #define EBI_CS3_ADDR  (0x63000000u) /**< EBI Chip Select 3 base address */
00652 #define SDRAM_CS_ADDR (0x70000000u) /**< SDRAM Chip Select base address */
00653 #define USBHS_RAM_ADDR (0xA0100000u)/**< USB RAM  base address */
00654 
00655 /* ************************************************************************** */
00656 /*   MISCELLANEOUS DEFINITIONS FOR SAMV71Q21 */
00657 /* ************************************************************************** */
00658 
00659 #define CHIP_JTAGID (0x05B3D03FUL)
00660 #define CHIP_CIDR   (0xA1220E00UL)
00661 #define CHIP_EXID   (0x00000002UL)
00662 
00663 /* ************************************************************************** */
00664 /*   ELECTRICAL DEFINITIONS FOR SAMV71Q21 */
00665 /* ************************************************************************** */
00666 
00667 /* %ATMEL_ELECTRICAL% */
00668 
00669 /* Device characteristics */
00670 #define CHIP_FREQ_SLCK_RC_MIN           (20000UL)
00671 #define CHIP_FREQ_SLCK_RC               (32000UL)
00672 #define CHIP_FREQ_SLCK_RC_MAX           (44000UL)
00673 #define CHIP_FREQ_MAINCK_RC_4MHZ        (4000000UL)
00674 #define CHIP_FREQ_MAINCK_RC_8MHZ        (8000000UL)
00675 #define CHIP_FREQ_MAINCK_RC_12MHZ       (12000000UL)
00676 #define CHIP_FREQ_CPU_MAX               (120000000UL)
00677 #define CHIP_FREQ_XTAL_32K              (32768UL)
00678 #define CHIP_FREQ_XTAL_12M              (12000000UL)
00679 
00680 /* Embedded Flash Read Wait State (VDDCORE set at 1.20V) */
00681 #define CHIP_FREQ_FWS_0                 (20000000UL)  /**< \brief Maximum operating frequency when FWS is 0 */
00682 #define CHIP_FREQ_FWS_1                 (40000000UL)  /**< \brief Maximum operating frequency when FWS is 1 */
00683 #define CHIP_FREQ_FWS_2                 (60000000UL)  /**< \brief Maximum operating frequency when FWS is 2 */
00684 #define CHIP_FREQ_FWS_3                 (80000000UL)  /**< \brief Maximum operating frequency when FWS is 3 */
00685 #define CHIP_FREQ_FWS_4                 (100000000UL) /**< \brief Maximum operating frequency when FWS is 4 */
00686 #define CHIP_FREQ_FWS_5                 (123000000UL) /**< \brief Maximum operating frequency when FWS is 5 */
00687 
00688 #ifdef __cplusplus
00689 }
00690 #endif
00691 
00692 /*@}*/
00693 
00694 #endif /* _SAMV71Q21_ */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines