1 /** 2 * \file 3 * 4 * \brief Header file for SAMD21E18A 5 * 6 * Copyright (c) 2016 Atmel Corporation, 7 * a wholly owned subsidiary of Microchip Technology Inc. 8 * 9 * \asf_license_start 10 * 11 * \page License 12 * 13 * Licensed under the Apache License, Version 2.0 (the "License"); 14 * you may not use this file except in compliance with the License. 15 * You may obtain a copy of the Licence at 16 * 17 * http://www.apache.org/licenses/LICENSE-2.0 18 * 19 * Unless required by applicable law or agreed to in writing, software 20 * distributed under the License is distributed on an "AS IS" BASIS, 21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 * See the License for the specific language governing permissions and 23 * limitations under the License. 24 * 25 * \asf_license_stop 26 * 27 */ 28 29 #ifndef _SAMD21E18A_ 30 #define _SAMD21E18A_ 31 32 /** 33 * \ingroup SAMD21_definitions 34 * \addtogroup SAMD21E18A_definitions SAMD21E18A definitions 35 * This file defines all structures and symbols for SAMD21E18A: 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 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 48 #include <stdint.h> 49 #ifndef __cplusplus 50 typedef volatile const uint32_t RoReg; /**< Read only 32-bit register (volatile const unsigned int) */ 51 typedef volatile const uint16_t RoReg16; /**< Read only 16-bit register (volatile const unsigned int) */ 52 typedef volatile const uint8_t RoReg8; /**< Read only 8-bit register (volatile const unsigned int) */ 53 #else 54 typedef volatile uint32_t RoReg; /**< Read only 32-bit register (volatile const unsigned int) */ 55 typedef volatile uint16_t RoReg16; /**< Read only 16-bit register (volatile const unsigned int) */ 56 typedef volatile uint8_t RoReg8; /**< Read only 8-bit register (volatile const unsigned int) */ 57 #endif 58 typedef volatile uint32_t WoReg; /**< Write only 32-bit register (volatile unsigned int) */ 59 typedef volatile uint16_t WoReg16; /**< Write only 16-bit register (volatile unsigned int) */ 60 typedef volatile uint32_t WoReg8; /**< Write only 8-bit register (volatile unsigned int) */ 61 typedef volatile uint32_t RwReg; /**< Read-Write 32-bit register (volatile unsigned int) */ 62 typedef volatile uint16_t RwReg16; /**< Read-Write 16-bit register (volatile unsigned int) */ 63 typedef volatile uint8_t RwReg8; /**< Read-Write 8-bit register (volatile unsigned int) */ 64 #endif 65 66 #if !defined(SKIP_INTEGER_LITERALS) 67 #if defined(_U_) || defined(_L_) || defined(_UL_) 68 #error "Integer Literals macros already defined elsewhere" 69 #endif 70 71 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 72 /* Macros that deal with adding suffixes to integer literal constants for C/C++ */ 73 #define _U_(x) x ## U /**< C code: Unsigned integer literal constant value */ 74 #define _L_(x) x ## L /**< C code: Long integer literal constant value */ 75 #define _UL_(x) x ## UL /**< C code: Unsigned Long integer literal constant value */ 76 #else /* Assembler */ 77 #define _U_(x) x /**< Assembler: Unsigned integer literal constant value */ 78 #define _L_(x) x /**< Assembler: Long integer literal constant value */ 79 #define _UL_(x) x /**< Assembler: Unsigned Long integer literal constant value */ 80 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 81 #endif /* SKIP_INTEGER_LITERALS */ 82 83 /* ************************************************************************** */ 84 /** CMSIS DEFINITIONS FOR SAMD21E18A */ 85 /* ************************************************************************** */ 86 /** \defgroup SAMD21E18A_cmsis CMSIS Definitions */ 87 /*@{*/ 88 89 /** Interrupt Number Definition */ 90 typedef enum IRQn 91 { 92 /****** Cortex-M0+ Processor Exceptions Numbers ******************************/ 93 NonMaskableInt_IRQn = -14,/**< 2 Non Maskable Interrupt */ 94 HardFault_IRQn = -13,/**< 3 Cortex-M0+ Hard Fault Interrupt */ 95 SVCall_IRQn = -5, /**< 11 Cortex-M0+ SV Call Interrupt */ 96 PendSV_IRQn = -2, /**< 14 Cortex-M0+ Pend SV Interrupt */ 97 SysTick_IRQn = -1, /**< 15 Cortex-M0+ System Tick Interrupt */ 98 /****** SAMD21E18A-specific Interrupt Numbers ***********************/ 99 PM_IRQn = 0, /**< 0 SAMD21E18A Power Manager (PM) */ 100 SYSCTRL_IRQn = 1, /**< 1 SAMD21E18A System Control (SYSCTRL) */ 101 WDT_IRQn = 2, /**< 2 SAMD21E18A Watchdog Timer (WDT) */ 102 RTC_IRQn = 3, /**< 3 SAMD21E18A Real-Time Counter (RTC) */ 103 EIC_IRQn = 4, /**< 4 SAMD21E18A External Interrupt Controller (EIC) */ 104 NVMCTRL_IRQn = 5, /**< 5 SAMD21E18A Non-Volatile Memory Controller (NVMCTRL) */ 105 DMAC_IRQn = 6, /**< 6 SAMD21E18A Direct Memory Access Controller (DMAC) */ 106 USB_IRQn = 7, /**< 7 SAMD21E18A Universal Serial Bus (USB) */ 107 EVSYS_IRQn = 8, /**< 8 SAMD21E18A Event System Interface (EVSYS) */ 108 SERCOM0_IRQn = 9, /**< 9 SAMD21E18A Serial Communication Interface 0 (SERCOM0) */ 109 SERCOM1_IRQn = 10, /**< 10 SAMD21E18A Serial Communication Interface 1 (SERCOM1) */ 110 SERCOM2_IRQn = 11, /**< 11 SAMD21E18A Serial Communication Interface 2 (SERCOM2) */ 111 SERCOM3_IRQn = 12, /**< 12 SAMD21E18A Serial Communication Interface 3 (SERCOM3) */ 112 TCC0_IRQn = 15, /**< 15 SAMD21E18A Timer Counter Control 0 (TCC0) */ 113 TCC1_IRQn = 16, /**< 16 SAMD21E18A Timer Counter Control 1 (TCC1) */ 114 TCC2_IRQn = 17, /**< 17 SAMD21E18A Timer Counter Control 2 (TCC2) */ 115 TC3_IRQn = 18, /**< 18 SAMD21E18A Basic Timer Counter 3 (TC3) */ 116 TC4_IRQn = 19, /**< 19 SAMD21E18A Basic Timer Counter 4 (TC4) */ 117 TC5_IRQn = 20, /**< 20 SAMD21E18A Basic Timer Counter 5 (TC5) */ 118 ADC_IRQn = 23, /**< 23 SAMD21E18A Analog Digital Converter (ADC) */ 119 AC_IRQn = 24, /**< 24 SAMD21E18A Analog Comparators (AC) */ 120 DAC_IRQn = 25, /**< 25 SAMD21E18A Digital Analog Converter (DAC) */ 121 PTC_IRQn = 26, /**< 26 SAMD21E18A Peripheral Touch Controller (PTC) */ 122 I2S_IRQn = 27, /**< 27 SAMD21E18A Inter-IC Sound Interface (I2S) */ 123 124 PERIPH_COUNT_IRQn = 28 /**< Number of peripheral IDs */ 125 } IRQn_Type; 126 127 typedef struct _DeviceVectors 128 { 129 /* Stack pointer */ 130 void* pvStack; 131 132 /* Cortex-M handlers */ 133 void* pfnReset_Handler; 134 void* pfnNMI_Handler; 135 void* pfnHardFault_Handler; 136 void* pvReservedM12; 137 void* pvReservedM11; 138 void* pvReservedM10; 139 void* pvReservedM9; 140 void* pvReservedM8; 141 void* pvReservedM7; 142 void* pvReservedM6; 143 void* pfnSVC_Handler; 144 void* pvReservedM4; 145 void* pvReservedM3; 146 void* pfnPendSV_Handler; 147 void* pfnSysTick_Handler; 148 149 /* Peripheral handlers */ 150 void* pfnPM_Handler; /* 0 Power Manager */ 151 void* pfnSYSCTRL_Handler; /* 1 System Control */ 152 void* pfnWDT_Handler; /* 2 Watchdog Timer */ 153 void* pfnRTC_Handler; /* 3 Real-Time Counter */ 154 void* pfnEIC_Handler; /* 4 External Interrupt Controller */ 155 void* pfnNVMCTRL_Handler; /* 5 Non-Volatile Memory Controller */ 156 void* pfnDMAC_Handler; /* 6 Direct Memory Access Controller */ 157 void* pfnUSB_Handler; /* 7 Universal Serial Bus */ 158 void* pfnEVSYS_Handler; /* 8 Event System Interface */ 159 void* pfnSERCOM0_Handler; /* 9 Serial Communication Interface 0 */ 160 void* pfnSERCOM1_Handler; /* 10 Serial Communication Interface 1 */ 161 void* pfnSERCOM2_Handler; /* 11 Serial Communication Interface 2 */ 162 void* pfnSERCOM3_Handler; /* 12 Serial Communication Interface 3 */ 163 void* pvReserved13; 164 void* pvReserved14; 165 void* pfnTCC0_Handler; /* 15 Timer Counter Control 0 */ 166 void* pfnTCC1_Handler; /* 16 Timer Counter Control 1 */ 167 void* pfnTCC2_Handler; /* 17 Timer Counter Control 2 */ 168 void* pfnTC3_Handler; /* 18 Basic Timer Counter 3 */ 169 void* pfnTC4_Handler; /* 19 Basic Timer Counter 4 */ 170 void* pfnTC5_Handler; /* 20 Basic Timer Counter 5 */ 171 void* pvReserved21; 172 void* pvReserved22; 173 void* pfnADC_Handler; /* 23 Analog Digital Converter */ 174 void* pfnAC_Handler; /* 24 Analog Comparators */ 175 void* pfnDAC_Handler; /* 25 Digital Analog Converter */ 176 void* pfnPTC_Handler; /* 26 Peripheral Touch Controller */ 177 void* pfnI2S_Handler; /* 27 Inter-IC Sound Interface */ 178 void* pvReserved28; 179 } DeviceVectors; 180 181 /* Cortex-M0+ processor handlers */ 182 void Reset_Handler ( void ); 183 void NMI_Handler ( void ); 184 void HardFault_Handler ( void ); 185 void SVC_Handler ( void ); 186 void PendSV_Handler ( void ); 187 void SysTick_Handler ( void ); 188 189 /* Peripherals handlers */ 190 void PM_Handler ( void ); 191 void SYSCTRL_Handler ( void ); 192 void WDT_Handler ( void ); 193 void RTC_Handler ( void ); 194 void EIC_Handler ( void ); 195 void NVMCTRL_Handler ( void ); 196 void DMAC_Handler ( void ); 197 void USB_Handler ( void ); 198 void EVSYS_Handler ( void ); 199 void SERCOM0_Handler ( void ); 200 void SERCOM1_Handler ( void ); 201 void SERCOM2_Handler ( void ); 202 void SERCOM3_Handler ( void ); 203 void TCC0_Handler ( void ); 204 void TCC1_Handler ( void ); 205 void TCC2_Handler ( void ); 206 void TC3_Handler ( void ); 207 void TC4_Handler ( void ); 208 void TC5_Handler ( void ); 209 void ADC_Handler ( void ); 210 void AC_Handler ( void ); 211 void DAC_Handler ( void ); 212 void PTC_Handler ( void ); 213 void I2S_Handler ( void ); 214 215 /* 216 * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals 217 */ 218 219 #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ 220 #define __MPU_PRESENT 0 /*!< MPU present or not */ 221 #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ 222 #define __VTOR_PRESENT 1 /*!< VTOR present or not */ 223 #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */ 224 225 /** 226 * \brief CMSIS includes 227 */ 228 229 #include <core_cm0plus.h> 230 #if !defined DONT_USE_CMSIS_INIT 231 #include "system_samd21.h" 232 #endif /* DONT_USE_CMSIS_INIT */ 233 234 /*@}*/ 235 236 /* ************************************************************************** */ 237 /** SOFTWARE PERIPHERAL API DEFINITION FOR SAMD21E18A */ 238 /* ************************************************************************** */ 239 /** \defgroup SAMD21E18A_api Peripheral Software API */ 240 /*@{*/ 241 242 #include "component/ac.h" 243 #include "component/adc.h" 244 #include "component/dac.h" 245 #include "component/dmac.h" 246 #include "component/dsu.h" 247 #include "component/eic.h" 248 #include "component/evsys.h" 249 #include "component/gclk.h" 250 #include "component/hmatrixb.h" 251 #include "component/i2s.h" 252 #include "component/mtb.h" 253 #include "component/nvmctrl.h" 254 #include "component/pac.h" 255 #include "component/pm.h" 256 #include "component/port.h" 257 #include "component/rtc.h" 258 #include "component/sercom.h" 259 #include "component/sysctrl.h" 260 #include "component/tc.h" 261 #include "component/tcc.h" 262 #include "component/usb.h" 263 #include "component/wdt.h" 264 /*@}*/ 265 266 /* ************************************************************************** */ 267 /** REGISTERS ACCESS DEFINITIONS FOR SAMD21E18A */ 268 /* ************************************************************************** */ 269 /** \defgroup SAMD21E18A_reg Registers Access Definitions */ 270 /*@{*/ 271 272 #include "instance/ac.h" 273 #include "instance/adc.h" 274 #include "instance/dac.h" 275 #include "instance/dmac.h" 276 #include "instance/dsu.h" 277 #include "instance/eic.h" 278 #include "instance/evsys.h" 279 #include "instance/gclk.h" 280 #include "instance/sbmatrix.h" 281 #include "instance/i2s.h" 282 #include "instance/mtb.h" 283 #include "instance/nvmctrl.h" 284 #include "instance/pac0.h" 285 #include "instance/pac1.h" 286 #include "instance/pac2.h" 287 #include "instance/pm.h" 288 #include "instance/port.h" 289 #include "instance/rtc.h" 290 #include "instance/sercom0.h" 291 #include "instance/sercom1.h" 292 #include "instance/sercom2.h" 293 #include "instance/sercom3.h" 294 #include "instance/sysctrl.h" 295 #include "instance/tc3.h" 296 #include "instance/tc4.h" 297 #include "instance/tc5.h" 298 #include "instance/tcc0.h" 299 #include "instance/tcc1.h" 300 #include "instance/tcc2.h" 301 #include "instance/usb.h" 302 #include "instance/wdt.h" 303 /*@}*/ 304 305 /* ************************************************************************** */ 306 /** PERIPHERAL ID DEFINITIONS FOR SAMD21E18A */ 307 /* ************************************************************************** */ 308 /** \defgroup SAMD21E18A_id Peripheral Ids Definitions */ 309 /*@{*/ 310 311 // Peripheral instances on HPB0 bridge 312 #define ID_PAC0 0 /**< \brief Peripheral Access Controller 0 (PAC0) */ 313 #define ID_PM 1 /**< \brief Power Manager (PM) */ 314 #define ID_SYSCTRL 2 /**< \brief System Control (SYSCTRL) */ 315 #define ID_GCLK 3 /**< \brief Generic Clock Generator (GCLK) */ 316 #define ID_WDT 4 /**< \brief Watchdog Timer (WDT) */ 317 #define ID_RTC 5 /**< \brief Real-Time Counter (RTC) */ 318 #define ID_EIC 6 /**< \brief External Interrupt Controller (EIC) */ 319 320 // Peripheral instances on HPB1 bridge 321 #define ID_PAC1 32 /**< \brief Peripheral Access Controller 1 (PAC1) */ 322 #define ID_DSU 33 /**< \brief Device Service Unit (DSU) */ 323 #define ID_NVMCTRL 34 /**< \brief Non-Volatile Memory Controller (NVMCTRL) */ 324 #define ID_PORT 35 /**< \brief Port Module (PORT) */ 325 #define ID_DMAC 36 /**< \brief Direct Memory Access Controller (DMAC) */ 326 #define ID_USB 37 /**< \brief Universal Serial Bus (USB) */ 327 #define ID_MTB 38 /**< \brief Cortex-M0+ Micro-Trace Buffer (MTB) */ 328 #define ID_SBMATRIX 39 /**< \brief HSB Matrix (SBMATRIX) */ 329 330 // Peripheral instances on HPB2 bridge 331 #define ID_PAC2 64 /**< \brief Peripheral Access Controller 2 (PAC2) */ 332 #define ID_EVSYS 65 /**< \brief Event System Interface (EVSYS) */ 333 #define ID_SERCOM0 66 /**< \brief Serial Communication Interface 0 (SERCOM0) */ 334 #define ID_SERCOM1 67 /**< \brief Serial Communication Interface 1 (SERCOM1) */ 335 #define ID_SERCOM2 68 /**< \brief Serial Communication Interface 2 (SERCOM2) */ 336 #define ID_SERCOM3 69 /**< \brief Serial Communication Interface 3 (SERCOM3) */ 337 #define ID_TCC0 72 /**< \brief Timer Counter Control 0 (TCC0) */ 338 #define ID_TCC1 73 /**< \brief Timer Counter Control 1 (TCC1) */ 339 #define ID_TCC2 74 /**< \brief Timer Counter Control 2 (TCC2) */ 340 #define ID_TC3 75 /**< \brief Basic Timer Counter 3 (TC3) */ 341 #define ID_TC4 76 /**< \brief Basic Timer Counter 4 (TC4) */ 342 #define ID_TC5 77 /**< \brief Basic Timer Counter 5 (TC5) */ 343 #define ID_ADC 80 /**< \brief Analog Digital Converter (ADC) */ 344 #define ID_AC 81 /**< \brief Analog Comparators (AC) */ 345 #define ID_DAC 82 /**< \brief Digital Analog Converter (DAC) */ 346 #define ID_PTC 83 /**< \brief Peripheral Touch Controller (PTC) */ 347 #define ID_I2S 84 /**< \brief Inter-IC Sound Interface (I2S) */ 348 349 #define ID_PERIPH_COUNT 85 /**< \brief Max number of peripheral IDs */ 350 /*@}*/ 351 352 /* ************************************************************************** */ 353 /** BASE ADDRESS DEFINITIONS FOR SAMD21E18A */ 354 /* ************************************************************************** */ 355 /** \defgroup SAMD21E18A_base Peripheral Base Address Definitions */ 356 /*@{*/ 357 358 #if defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__) 359 #define AC (0x42004400) /**< \brief (AC) APB Base Address */ 360 #define ADC (0x42004000) /**< \brief (ADC) APB Base Address */ 361 #define DAC (0x42004800) /**< \brief (DAC) APB Base Address */ 362 #define DMAC (0x41004800) /**< \brief (DMAC) APB Base Address */ 363 #define DSU (0x41002000) /**< \brief (DSU) APB Base Address */ 364 #define EIC (0x40001800) /**< \brief (EIC) APB Base Address */ 365 #define EVSYS (0x42000400) /**< \brief (EVSYS) APB Base Address */ 366 #define GCLK (0x40000C00) /**< \brief (GCLK) APB Base Address */ 367 #define SBMATRIX (0x41007000) /**< \brief (SBMATRIX) APB Base Address */ 368 #define I2S (0x42005000) /**< \brief (I2S) APB Base Address */ 369 #define MTB (0x41006000) /**< \brief (MTB) APB Base Address */ 370 #define NVMCTRL (0x41004000) /**< \brief (NVMCTRL) APB Base Address */ 371 #define NVMCTRL_CAL (0x00800000) /**< \brief (NVMCTRL) CAL Base Address */ 372 #define NVMCTRL_LOCKBIT (0x00802000) /**< \brief (NVMCTRL) LOCKBIT Base Address */ 373 #define NVMCTRL_OTP1 (0x00806000) /**< \brief (NVMCTRL) OTP1 Base Address */ 374 #define NVMCTRL_OTP2 (0x00806008) /**< \brief (NVMCTRL) OTP2 Base Address */ 375 #define NVMCTRL_OTP4 (0x00806020) /**< \brief (NVMCTRL) OTP4 Base Address */ 376 #define NVMCTRL_TEMP_LOG (0x00806030) /**< \brief (NVMCTRL) TEMP_LOG Base Address */ 377 #define NVMCTRL_USER (0x00804000) /**< \brief (NVMCTRL) USER Base Address */ 378 #define PAC0 (0x40000000) /**< \brief (PAC0) APB Base Address */ 379 #define PAC1 (0x41000000) /**< \brief (PAC1) APB Base Address */ 380 #define PAC2 (0x42000000) /**< \brief (PAC2) APB Base Address */ 381 #define PM (0x40000400) /**< \brief (PM) APB Base Address */ 382 #define PORT (0x41004400) /**< \brief (PORT) APB Base Address */ 383 #define PORT_IOBUS (0x60000000) /**< \brief (PORT) IOBUS Base Address */ 384 #define PTC (0x42004C00) /**< \brief (PTC) APB Base Address */ 385 #define RTC (0x40001400) /**< \brief (RTC) APB Base Address */ 386 #define SERCOM0 (0x42000800) /**< \brief (SERCOM0) APB Base Address */ 387 #define SERCOM1 (0x42000C00) /**< \brief (SERCOM1) APB Base Address */ 388 #define SERCOM2 (0x42001000) /**< \brief (SERCOM2) APB Base Address */ 389 #define SERCOM3 (0x42001400) /**< \brief (SERCOM3) APB Base Address */ 390 #define SYSCTRL (0x40000800) /**< \brief (SYSCTRL) APB Base Address */ 391 #define TC3 (0x42002C00) /**< \brief (TC3) APB Base Address */ 392 #define TC4 (0x42003000) /**< \brief (TC4) APB Base Address */ 393 #define TC5 (0x42003400) /**< \brief (TC5) APB Base Address */ 394 #define TCC0 (0x42002000) /**< \brief (TCC0) APB Base Address */ 395 #define TCC1 (0x42002400) /**< \brief (TCC1) APB Base Address */ 396 #define TCC2 (0x42002800) /**< \brief (TCC2) APB Base Address */ 397 #define USB (0x41005000) /**< \brief (USB) APB Base Address */ 398 #define WDT (0x40001000) /**< \brief (WDT) APB Base Address */ 399 #else 400 #define AC ((Ac *)0x42004400UL) /**< \brief (AC) APB Base Address */ 401 #define AC_INST_NUM 1 /**< \brief (AC) Number of instances */ 402 #define AC_INSTS { AC } /**< \brief (AC) Instances List */ 403 404 #define ADC ((Adc *)0x42004000UL) /**< \brief (ADC) APB Base Address */ 405 #define ADC_INST_NUM 1 /**< \brief (ADC) Number of instances */ 406 #define ADC_INSTS { ADC } /**< \brief (ADC) Instances List */ 407 408 #define DAC ((Dac *)0x42004800UL) /**< \brief (DAC) APB Base Address */ 409 #define DAC_INST_NUM 1 /**< \brief (DAC) Number of instances */ 410 #define DAC_INSTS { DAC } /**< \brief (DAC) Instances List */ 411 412 #define DMAC ((Dmac *)0x41004800UL) /**< \brief (DMAC) APB Base Address */ 413 #define DMAC_INST_NUM 1 /**< \brief (DMAC) Number of instances */ 414 #define DMAC_INSTS { DMAC } /**< \brief (DMAC) Instances List */ 415 416 #define DSU ((Dsu *)0x41002000UL) /**< \brief (DSU) APB Base Address */ 417 #define DSU_INST_NUM 1 /**< \brief (DSU) Number of instances */ 418 #define DSU_INSTS { DSU } /**< \brief (DSU) Instances List */ 419 420 #define EIC ((Eic *)0x40001800UL) /**< \brief (EIC) APB Base Address */ 421 #define EIC_INST_NUM 1 /**< \brief (EIC) Number of instances */ 422 #define EIC_INSTS { EIC } /**< \brief (EIC) Instances List */ 423 424 #define EVSYS ((Evsys *)0x42000400UL) /**< \brief (EVSYS) APB Base Address */ 425 #define EVSYS_INST_NUM 1 /**< \brief (EVSYS) Number of instances */ 426 #define EVSYS_INSTS { EVSYS } /**< \brief (EVSYS) Instances List */ 427 428 #define GCLK ((Gclk *)0x40000C00UL) /**< \brief (GCLK) APB Base Address */ 429 #define GCLK_INST_NUM 1 /**< \brief (GCLK) Number of instances */ 430 #define GCLK_INSTS { GCLK } /**< \brief (GCLK) Instances List */ 431 432 #define SBMATRIX ((Hmatrixb *)0x41007000UL) /**< \brief (SBMATRIX) APB Base Address */ 433 #define HMATRIXB_INST_NUM 1 /**< \brief (HMATRIXB) Number of instances */ 434 #define HMATRIXB_INSTS { SBMATRIX } /**< \brief (HMATRIXB) Instances List */ 435 436 #define I2S ((I2s *)0x42005000UL) /**< \brief (I2S) APB Base Address */ 437 #define I2S_INST_NUM 1 /**< \brief (I2S) Number of instances */ 438 #define I2S_INSTS { I2S } /**< \brief (I2S) Instances List */ 439 440 #define MTB ((Mtb *)0x41006000UL) /**< \brief (MTB) APB Base Address */ 441 #define MTB_INST_NUM 1 /**< \brief (MTB) Number of instances */ 442 #define MTB_INSTS { MTB } /**< \brief (MTB) Instances List */ 443 444 #define NVMCTRL ((Nvmctrl *)0x41004000UL) /**< \brief (NVMCTRL) APB Base Address */ 445 #define NVMCTRL_CAL (0x00800000UL) /**< \brief (NVMCTRL) CAL Base Address */ 446 #define NVMCTRL_LOCKBIT (0x00802000UL) /**< \brief (NVMCTRL) LOCKBIT Base Address */ 447 #define NVMCTRL_OTP1 (0x00806000UL) /**< \brief (NVMCTRL) OTP1 Base Address */ 448 #define NVMCTRL_OTP2 (0x00806008UL) /**< \brief (NVMCTRL) OTP2 Base Address */ 449 #define NVMCTRL_OTP4 (0x00806020UL) /**< \brief (NVMCTRL) OTP4 Base Address */ 450 #define NVMCTRL_TEMP_LOG (0x00806030UL) /**< \brief (NVMCTRL) TEMP_LOG Base Address */ 451 #define NVMCTRL_USER (0x00804000UL) /**< \brief (NVMCTRL) USER Base Address */ 452 #define NVMCTRL_INST_NUM 1 /**< \brief (NVMCTRL) Number of instances */ 453 #define NVMCTRL_INSTS { NVMCTRL } /**< \brief (NVMCTRL) Instances List */ 454 455 #define PAC0 ((Pac *)0x40000000UL) /**< \brief (PAC0) APB Base Address */ 456 #define PAC1 ((Pac *)0x41000000UL) /**< \brief (PAC1) APB Base Address */ 457 #define PAC2 ((Pac *)0x42000000UL) /**< \brief (PAC2) APB Base Address */ 458 #define PAC_INST_NUM 3 /**< \brief (PAC) Number of instances */ 459 #define PAC_INSTS { PAC0, PAC1, PAC2 } /**< \brief (PAC) Instances List */ 460 461 #define PM ((Pm *)0x40000400UL) /**< \brief (PM) APB Base Address */ 462 #define PM_INST_NUM 1 /**< \brief (PM) Number of instances */ 463 #define PM_INSTS { PM } /**< \brief (PM) Instances List */ 464 465 #define PORT ((Port *)0x41004400UL) /**< \brief (PORT) APB Base Address */ 466 #define PORT_IOBUS ((Port *)0x60000000UL) /**< \brief (PORT) IOBUS Base Address */ 467 #define PORT_INST_NUM 1 /**< \brief (PORT) Number of instances */ 468 #define PORT_INSTS { PORT } /**< \brief (PORT) Instances List */ 469 #define PORT_IOBUS_INST_NUM 1 /**< \brief (PORT) Number of instances */ 470 #define PORT_IOBUS_INSTS { PORT_IOBUS } /**< \brief (PORT) Instances List */ 471 472 #define PTC ((void *)0x42004C00UL) /**< \brief (PTC) APB Base Address */ 473 #define PTC_GCLK_ID 34 474 #define PTC_INST_NUM 1 /**< \brief (PTC) Number of instances */ 475 #define PTC_INSTS { PTC } /**< \brief (PTC) Instances List */ 476 477 #define RTC ((Rtc *)0x40001400UL) /**< \brief (RTC) APB Base Address */ 478 #define RTC_INST_NUM 1 /**< \brief (RTC) Number of instances */ 479 #define RTC_INSTS { RTC } /**< \brief (RTC) Instances List */ 480 481 #define SERCOM0 ((Sercom *)0x42000800UL) /**< \brief (SERCOM0) APB Base Address */ 482 #define SERCOM1 ((Sercom *)0x42000C00UL) /**< \brief (SERCOM1) APB Base Address */ 483 #define SERCOM2 ((Sercom *)0x42001000UL) /**< \brief (SERCOM2) APB Base Address */ 484 #define SERCOM3 ((Sercom *)0x42001400UL) /**< \brief (SERCOM3) APB Base Address */ 485 #define SERCOM_INST_NUM 4 /**< \brief (SERCOM) Number of instances */ 486 #define SERCOM_INSTS { SERCOM0, SERCOM1, SERCOM2, SERCOM3 } /**< \brief (SERCOM) Instances List */ 487 488 #define SYSCTRL ((Sysctrl *)0x40000800UL) /**< \brief (SYSCTRL) APB Base Address */ 489 #define SYSCTRL_INST_NUM 1 /**< \brief (SYSCTRL) Number of instances */ 490 #define SYSCTRL_INSTS { SYSCTRL } /**< \brief (SYSCTRL) Instances List */ 491 492 #define TC3 ((Tc *)0x42002C00UL) /**< \brief (TC3) APB Base Address */ 493 #define TC4 ((Tc *)0x42003000UL) /**< \brief (TC4) APB Base Address */ 494 #define TC5 ((Tc *)0x42003400UL) /**< \brief (TC5) APB Base Address */ 495 #define TC_INST_NUM 3 /**< \brief (TC) Number of instances */ 496 #define TC_INSTS { TC3, TC4, TC5 } /**< \brief (TC) Instances List */ 497 498 #define TCC0 ((Tcc *)0x42002000UL) /**< \brief (TCC0) APB Base Address */ 499 #define TCC1 ((Tcc *)0x42002400UL) /**< \brief (TCC1) APB Base Address */ 500 #define TCC2 ((Tcc *)0x42002800UL) /**< \brief (TCC2) APB Base Address */ 501 #define TCC_INST_NUM 3 /**< \brief (TCC) Number of instances */ 502 #define TCC_INSTS { TCC0, TCC1, TCC2 } /**< \brief (TCC) Instances List */ 503 504 #define USB ((Usb *)0x41005000UL) /**< \brief (USB) APB Base Address */ 505 #define USB_INST_NUM 1 /**< \brief (USB) Number of instances */ 506 #define USB_INSTS { USB } /**< \brief (USB) Instances List */ 507 508 #define WDT ((Wdt *)0x40001000UL) /**< \brief (WDT) APB Base Address */ 509 #define WDT_INST_NUM 1 /**< \brief (WDT) Number of instances */ 510 #define WDT_INSTS { WDT } /**< \brief (WDT) Instances List */ 511 512 #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 513 /*@}*/ 514 515 /* ************************************************************************** */ 516 /** PORT DEFINITIONS FOR SAMD21E18A */ 517 /* ************************************************************************** */ 518 /** \defgroup SAMD21E18A_port PORT Definitions */ 519 /*@{*/ 520 521 #include "pio/samd21e18a.h" 522 /*@}*/ 523 524 /* ************************************************************************** */ 525 /** MEMORY MAPPING DEFINITIONS FOR SAMD21E18A */ 526 /* ************************************************************************** */ 527 528 #define FLASH_SIZE _UL_(0x00040000) /* 256 kB */ 529 #define FLASH_PAGE_SIZE 64 530 #define FLASH_NB_OF_PAGES 4096 531 #define FLASH_USER_PAGE_SIZE 64 532 #define HMCRAMC0_SIZE _UL_(0x00008000) /* 32 kB */ 533 534 #define FLASH_ADDR _UL_(0x00000000) /**< FLASH base address */ 535 #define FLASH_USER_PAGE_ADDR _UL_(0x00800000) /**< FLASH_USER_PAGE base address */ 536 #define HMCRAMC0_ADDR _UL_(0x20000000) /**< HMCRAMC0 base address */ 537 #define HPB0_ADDR _UL_(0x40000000) /**< HPB0 base address */ 538 #define HPB1_ADDR _UL_(0x41000000) /**< HPB1 base address */ 539 #define HPB2_ADDR _UL_(0x42000000) /**< HPB2 base address */ 540 #define PPB_ADDR _UL_(0xE0000000) /**< PPB base address */ 541 542 #define DSU_DID_RESETVALUE _UL_(0x1001030A) 543 #define EIC_EXTINT_NUM 16 544 #define PORT_GROUPS 1 545 546 /* ************************************************************************** */ 547 /** ELECTRICAL DEFINITIONS FOR SAMD21E18A */ 548 /* ************************************************************************** */ 549 550 551 #ifdef __cplusplus 552 } 553 #endif 554 555 /*@}*/ 556 557 #endif /* SAMD21E18A_H */ 558