Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.
Dependents: 1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB
Fork of mbed by
TARGET_SAMD21G18A/samd21g17au.h@121:672067c3ada4, 2016-04-14 (annotated)
- Committer:
- elijahorr
- Date:
- Thu Apr 14 07:28:54 2016 +0000
- Revision:
- 121:672067c3ada4
- Parent:
- 111:4336505e4b1c
.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 111:4336505e4b1c | 1 | /** |
Kojto | 111:4336505e4b1c | 2 | * \file |
Kojto | 111:4336505e4b1c | 3 | * |
Kojto | 111:4336505e4b1c | 4 | * \brief Header file for SAMD21G17AU |
Kojto | 111:4336505e4b1c | 5 | * |
Kojto | 111:4336505e4b1c | 6 | * Copyright (c) 2015 Atmel Corporation. All rights reserved. |
Kojto | 111:4336505e4b1c | 7 | * |
Kojto | 111:4336505e4b1c | 8 | * \asf_license_start |
Kojto | 111:4336505e4b1c | 9 | * |
Kojto | 111:4336505e4b1c | 10 | * \page License |
Kojto | 111:4336505e4b1c | 11 | * |
Kojto | 111:4336505e4b1c | 12 | * Redistribution and use in source and binary forms, with or without |
Kojto | 111:4336505e4b1c | 13 | * modification, are permitted provided that the following conditions are met: |
Kojto | 111:4336505e4b1c | 14 | * |
Kojto | 111:4336505e4b1c | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 111:4336505e4b1c | 16 | * this list of conditions and the following disclaimer. |
Kojto | 111:4336505e4b1c | 17 | * |
Kojto | 111:4336505e4b1c | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 111:4336505e4b1c | 19 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 111:4336505e4b1c | 20 | * and/or other materials provided with the distribution. |
Kojto | 111:4336505e4b1c | 21 | * |
Kojto | 111:4336505e4b1c | 22 | * 3. The name of Atmel may not be used to endorse or promote products derived |
Kojto | 111:4336505e4b1c | 23 | * from this software without specific prior written permission. |
Kojto | 111:4336505e4b1c | 24 | * |
Kojto | 111:4336505e4b1c | 25 | * 4. This software may only be redistributed and used in connection with an |
Kojto | 111:4336505e4b1c | 26 | * Atmel microcontroller product. |
Kojto | 111:4336505e4b1c | 27 | * |
Kojto | 111:4336505e4b1c | 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED |
Kojto | 111:4336505e4b1c | 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
Kojto | 111:4336505e4b1c | 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE |
Kojto | 111:4336505e4b1c | 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR |
Kojto | 111:4336505e4b1c | 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 111:4336505e4b1c | 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
Kojto | 111:4336505e4b1c | 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
Kojto | 111:4336505e4b1c | 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
Kojto | 111:4336505e4b1c | 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
Kojto | 111:4336505e4b1c | 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
Kojto | 111:4336505e4b1c | 38 | * POSSIBILITY OF SUCH DAMAGE. |
Kojto | 111:4336505e4b1c | 39 | * |
Kojto | 111:4336505e4b1c | 40 | * \asf_license_stop |
Kojto | 111:4336505e4b1c | 41 | * |
Kojto | 111:4336505e4b1c | 42 | */ |
Kojto | 111:4336505e4b1c | 43 | /* |
Kojto | 111:4336505e4b1c | 44 | * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> |
Kojto | 111:4336505e4b1c | 45 | */ |
Kojto | 111:4336505e4b1c | 46 | |
Kojto | 111:4336505e4b1c | 47 | #ifndef _SAMD21G17AU_ |
Kojto | 111:4336505e4b1c | 48 | #define _SAMD21G17AU_ |
Kojto | 111:4336505e4b1c | 49 | |
Kojto | 111:4336505e4b1c | 50 | /** |
Kojto | 111:4336505e4b1c | 51 | * \ingroup SAMD21_definitions |
Kojto | 111:4336505e4b1c | 52 | * \addtogroup SAMD21G17AU_definitions SAMD21G17AU definitions |
Kojto | 111:4336505e4b1c | 53 | * This file defines all structures and symbols for SAMD21G17AU: |
Kojto | 111:4336505e4b1c | 54 | * - registers and bitfields |
Kojto | 111:4336505e4b1c | 55 | * - peripheral base address |
Kojto | 111:4336505e4b1c | 56 | * - peripheral ID |
Kojto | 111:4336505e4b1c | 57 | * - PIO definitions |
Kojto | 111:4336505e4b1c | 58 | */ |
Kojto | 111:4336505e4b1c | 59 | /*@{*/ |
Kojto | 111:4336505e4b1c | 60 | |
Kojto | 111:4336505e4b1c | 61 | #ifdef __cplusplus |
Kojto | 111:4336505e4b1c | 62 | extern "C" { |
Kojto | 111:4336505e4b1c | 63 | #endif |
Kojto | 111:4336505e4b1c | 64 | |
Kojto | 111:4336505e4b1c | 65 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 66 | #include <stdint.h> |
Kojto | 111:4336505e4b1c | 67 | #ifndef __cplusplus |
Kojto | 111:4336505e4b1c | 68 | typedef volatile const uint32_t RoReg; /**< Read only 32-bit register (volatile const unsigned int) */ |
Kojto | 111:4336505e4b1c | 69 | typedef volatile const uint16_t RoReg16; /**< Read only 16-bit register (volatile const unsigned int) */ |
Kojto | 111:4336505e4b1c | 70 | typedef volatile const uint8_t RoReg8; /**< Read only 8-bit register (volatile const unsigned int) */ |
Kojto | 111:4336505e4b1c | 71 | #else |
Kojto | 111:4336505e4b1c | 72 | typedef volatile uint32_t RoReg; /**< Read only 32-bit register (volatile const unsigned int) */ |
Kojto | 111:4336505e4b1c | 73 | typedef volatile uint16_t RoReg16; /**< Read only 16-bit register (volatile const unsigned int) */ |
Kojto | 111:4336505e4b1c | 74 | typedef volatile uint8_t RoReg8; /**< Read only 8-bit register (volatile const unsigned int) */ |
Kojto | 111:4336505e4b1c | 75 | #endif |
Kojto | 111:4336505e4b1c | 76 | typedef volatile uint32_t WoReg; /**< Write only 32-bit register (volatile unsigned int) */ |
Kojto | 111:4336505e4b1c | 77 | typedef volatile uint16_t WoReg16; /**< Write only 16-bit register (volatile unsigned int) */ |
Kojto | 111:4336505e4b1c | 78 | typedef volatile uint32_t WoReg8; /**< Write only 8-bit register (volatile unsigned int) */ |
Kojto | 111:4336505e4b1c | 79 | typedef volatile uint32_t RwReg; /**< Read-Write 32-bit register (volatile unsigned int) */ |
Kojto | 111:4336505e4b1c | 80 | typedef volatile uint16_t RwReg16; /**< Read-Write 16-bit register (volatile unsigned int) */ |
Kojto | 111:4336505e4b1c | 81 | typedef volatile uint8_t RwReg8; /**< Read-Write 8-bit register (volatile unsigned int) */ |
Kojto | 111:4336505e4b1c | 82 | #define CAST(type, value) ((type *)(value)) |
Kojto | 111:4336505e4b1c | 83 | #define REG_ACCESS(type, address) (*(type*)(address)) /**< C code: Register value */ |
Kojto | 111:4336505e4b1c | 84 | #else |
Kojto | 111:4336505e4b1c | 85 | #define CAST(type, value) (value) |
Kojto | 111:4336505e4b1c | 86 | #define REG_ACCESS(type, address) (address) /**< Assembly code: Register address */ |
Kojto | 111:4336505e4b1c | 87 | #endif |
Kojto | 111:4336505e4b1c | 88 | |
Kojto | 111:4336505e4b1c | 89 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 90 | /** CMSIS DEFINITIONS FOR SAMD21G17AU */ |
Kojto | 111:4336505e4b1c | 91 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 92 | /** \defgroup SAMD21G17AU_cmsis CMSIS Definitions */ |
Kojto | 111:4336505e4b1c | 93 | /*@{*/ |
Kojto | 111:4336505e4b1c | 94 | |
Kojto | 111:4336505e4b1c | 95 | /** Interrupt Number Definition */ |
Kojto | 111:4336505e4b1c | 96 | typedef enum IRQn { |
Kojto | 111:4336505e4b1c | 97 | /****** Cortex-M0+ Processor Exceptions Numbers ******************************/ |
Kojto | 111:4336505e4b1c | 98 | NonMaskableInt_IRQn = -14,/**< 2 Non Maskable Interrupt */ |
Kojto | 111:4336505e4b1c | 99 | HardFault_IRQn = -13,/**< 3 Cortex-M0+ Hard Fault Interrupt */ |
Kojto | 111:4336505e4b1c | 100 | SVCall_IRQn = -5, /**< 11 Cortex-M0+ SV Call Interrupt */ |
Kojto | 111:4336505e4b1c | 101 | PendSV_IRQn = -2, /**< 14 Cortex-M0+ Pend SV Interrupt */ |
Kojto | 111:4336505e4b1c | 102 | SysTick_IRQn = -1, /**< 15 Cortex-M0+ System Tick Interrupt */ |
Kojto | 111:4336505e4b1c | 103 | /****** SAMD21G17AU-specific Interrupt Numbers ***********************/ |
Kojto | 111:4336505e4b1c | 104 | PM_IRQn = 0, /**< 0 SAMD21G17AU Power Manager (PM) */ |
Kojto | 111:4336505e4b1c | 105 | SYSCTRL_IRQn = 1, /**< 1 SAMD21G17AU System Control (SYSCTRL) */ |
Kojto | 111:4336505e4b1c | 106 | WDT_IRQn = 2, /**< 2 SAMD21G17AU Watchdog Timer (WDT) */ |
Kojto | 111:4336505e4b1c | 107 | RTC_IRQn = 3, /**< 3 SAMD21G17AU Real-Time Counter (RTC) */ |
Kojto | 111:4336505e4b1c | 108 | EIC_IRQn = 4, /**< 4 SAMD21G17AU External Interrupt Controller (EIC) */ |
Kojto | 111:4336505e4b1c | 109 | NVMCTRL_IRQn = 5, /**< 5 SAMD21G17AU Non-Volatile Memory Controller (NVMCTRL) */ |
Kojto | 111:4336505e4b1c | 110 | DMAC_IRQn = 6, /**< 6 SAMD21G17AU Direct Memory Access Controller (DMAC) */ |
Kojto | 111:4336505e4b1c | 111 | USB_IRQn = 7, /**< 7 SAMD21G17AU Universal Serial Bus (USB) */ |
Kojto | 111:4336505e4b1c | 112 | EVSYS_IRQn = 8, /**< 8 SAMD21G17AU Event System Interface (EVSYS) */ |
Kojto | 111:4336505e4b1c | 113 | SERCOM0_IRQn = 9, /**< 9 SAMD21G17AU Serial Communication Interface 0 (SERCOM0) */ |
Kojto | 111:4336505e4b1c | 114 | SERCOM1_IRQn = 10, /**< 10 SAMD21G17AU Serial Communication Interface 1 (SERCOM1) */ |
Kojto | 111:4336505e4b1c | 115 | SERCOM2_IRQn = 11, /**< 11 SAMD21G17AU Serial Communication Interface 2 (SERCOM2) */ |
Kojto | 111:4336505e4b1c | 116 | SERCOM3_IRQn = 12, /**< 12 SAMD21G17AU Serial Communication Interface 3 (SERCOM3) */ |
Kojto | 111:4336505e4b1c | 117 | SERCOM4_IRQn = 13, /**< 13 SAMD21G17AU Serial Communication Interface 4 (SERCOM4) */ |
Kojto | 111:4336505e4b1c | 118 | SERCOM5_IRQn = 14, /**< 14 SAMD21G17AU Serial Communication Interface 5 (SERCOM5) */ |
Kojto | 111:4336505e4b1c | 119 | TCC0_IRQn = 15, /**< 15 SAMD21G17AU Timer Counter Control 0 (TCC0) */ |
Kojto | 111:4336505e4b1c | 120 | TCC1_IRQn = 16, /**< 16 SAMD21G17AU Timer Counter Control 1 (TCC1) */ |
Kojto | 111:4336505e4b1c | 121 | TCC2_IRQn = 17, /**< 17 SAMD21G17AU Timer Counter Control 2 (TCC2) */ |
Kojto | 111:4336505e4b1c | 122 | TC3_IRQn = 18, /**< 18 SAMD21G17AU Basic Timer Counter 3 (TC3) */ |
Kojto | 111:4336505e4b1c | 123 | TC4_IRQn = 19, /**< 19 SAMD21G17AU Basic Timer Counter 4 (TC4) */ |
Kojto | 111:4336505e4b1c | 124 | TC5_IRQn = 20, /**< 20 SAMD21G17AU Basic Timer Counter 5 (TC5) */ |
Kojto | 111:4336505e4b1c | 125 | TC6_IRQn = 21, /**< 21 SAMD21G17AU Basic Timer Counter 6 (TC6) */ |
Kojto | 111:4336505e4b1c | 126 | TC7_IRQn = 22, /**< 22 SAMD21G17AU Basic Timer Counter 7 (TC7) */ |
Kojto | 111:4336505e4b1c | 127 | ADC_IRQn = 23, /**< 23 SAMD21G17AU Analog Digital Converter (ADC) */ |
Kojto | 111:4336505e4b1c | 128 | AC_IRQn = 24, /**< 24 SAMD21G17AU Analog Comparators (AC) */ |
Kojto | 111:4336505e4b1c | 129 | DAC_IRQn = 25, /**< 25 SAMD21G17AU Digital Analog Converter (DAC) */ |
Kojto | 111:4336505e4b1c | 130 | PTC_IRQn = 26, /**< 26 SAMD21G17AU Peripheral Touch Controller (PTC) */ |
Kojto | 111:4336505e4b1c | 131 | I2S_IRQn = 27, /**< 27 SAMD21G17AU Inter-IC Sound Interface (I2S) */ |
Kojto | 111:4336505e4b1c | 132 | |
Kojto | 111:4336505e4b1c | 133 | PERIPH_COUNT_IRQn = 28 /**< Number of peripheral IDs */ |
Kojto | 111:4336505e4b1c | 134 | } IRQn_Type; |
Kojto | 111:4336505e4b1c | 135 | |
Kojto | 111:4336505e4b1c | 136 | typedef struct _DeviceVectors { |
Kojto | 111:4336505e4b1c | 137 | /* Stack pointer */ |
Kojto | 111:4336505e4b1c | 138 | void* pvStack; |
Kojto | 111:4336505e4b1c | 139 | |
Kojto | 111:4336505e4b1c | 140 | /* Cortex-M handlers */ |
Kojto | 111:4336505e4b1c | 141 | void* pfnReset_Handler; |
Kojto | 111:4336505e4b1c | 142 | void* pfnNMI_Handler; |
Kojto | 111:4336505e4b1c | 143 | void* pfnHardFault_Handler; |
Kojto | 111:4336505e4b1c | 144 | void* pfnReservedM12; |
Kojto | 111:4336505e4b1c | 145 | void* pfnReservedM11; |
Kojto | 111:4336505e4b1c | 146 | void* pfnReservedM10; |
Kojto | 111:4336505e4b1c | 147 | void* pfnReservedM9; |
Kojto | 111:4336505e4b1c | 148 | void* pfnReservedM8; |
Kojto | 111:4336505e4b1c | 149 | void* pfnReservedM7; |
Kojto | 111:4336505e4b1c | 150 | void* pfnReservedM6; |
Kojto | 111:4336505e4b1c | 151 | void* pfnSVC_Handler; |
Kojto | 111:4336505e4b1c | 152 | void* pfnReservedM4; |
Kojto | 111:4336505e4b1c | 153 | void* pfnReservedM3; |
Kojto | 111:4336505e4b1c | 154 | void* pfnPendSV_Handler; |
Kojto | 111:4336505e4b1c | 155 | void* pfnSysTick_Handler; |
Kojto | 111:4336505e4b1c | 156 | |
Kojto | 111:4336505e4b1c | 157 | /* Peripheral handlers */ |
Kojto | 111:4336505e4b1c | 158 | void* pfnPM_Handler; /* 0 Power Manager */ |
Kojto | 111:4336505e4b1c | 159 | void* pfnSYSCTRL_Handler; /* 1 System Control */ |
Kojto | 111:4336505e4b1c | 160 | void* pfnWDT_Handler; /* 2 Watchdog Timer */ |
Kojto | 111:4336505e4b1c | 161 | void* pfnRTC_Handler; /* 3 Real-Time Counter */ |
Kojto | 111:4336505e4b1c | 162 | void* pfnEIC_Handler; /* 4 External Interrupt Controller */ |
Kojto | 111:4336505e4b1c | 163 | void* pfnNVMCTRL_Handler; /* 5 Non-Volatile Memory Controller */ |
Kojto | 111:4336505e4b1c | 164 | void* pfnDMAC_Handler; /* 6 Direct Memory Access Controller */ |
Kojto | 111:4336505e4b1c | 165 | void* pfnUSB_Handler; /* 7 Universal Serial Bus */ |
Kojto | 111:4336505e4b1c | 166 | void* pfnEVSYS_Handler; /* 8 Event System Interface */ |
Kojto | 111:4336505e4b1c | 167 | void* pfnSERCOM0_Handler; /* 9 Serial Communication Interface 0 */ |
Kojto | 111:4336505e4b1c | 168 | void* pfnSERCOM1_Handler; /* 10 Serial Communication Interface 1 */ |
Kojto | 111:4336505e4b1c | 169 | void* pfnSERCOM2_Handler; /* 11 Serial Communication Interface 2 */ |
Kojto | 111:4336505e4b1c | 170 | void* pfnSERCOM3_Handler; /* 12 Serial Communication Interface 3 */ |
Kojto | 111:4336505e4b1c | 171 | void* pfnSERCOM4_Handler; /* 13 Serial Communication Interface 4 */ |
Kojto | 111:4336505e4b1c | 172 | void* pfnSERCOM5_Handler; /* 14 Serial Communication Interface 5 */ |
Kojto | 111:4336505e4b1c | 173 | void* pfnTCC0_Handler; /* 15 Timer Counter Control 0 */ |
Kojto | 111:4336505e4b1c | 174 | void* pfnTCC1_Handler; /* 16 Timer Counter Control 1 */ |
Kojto | 111:4336505e4b1c | 175 | void* pfnTCC2_Handler; /* 17 Timer Counter Control 2 */ |
Kojto | 111:4336505e4b1c | 176 | void* pfnTC3_Handler; /* 18 Basic Timer Counter 3 */ |
Kojto | 111:4336505e4b1c | 177 | void* pfnTC4_Handler; /* 19 Basic Timer Counter 4 */ |
Kojto | 111:4336505e4b1c | 178 | void* pfnTC5_Handler; /* 20 Basic Timer Counter 5 */ |
Kojto | 111:4336505e4b1c | 179 | void* pfnTC6_Handler; /* 21 Basic Timer Counter 6 */ |
Kojto | 111:4336505e4b1c | 180 | void* pfnTC7_Handler; /* 22 Basic Timer Counter 7 */ |
Kojto | 111:4336505e4b1c | 181 | void* pfnADC_Handler; /* 23 Analog Digital Converter */ |
Kojto | 111:4336505e4b1c | 182 | void* pfnAC_Handler; /* 24 Analog Comparators */ |
Kojto | 111:4336505e4b1c | 183 | void* pfnDAC_Handler; /* 25 Digital Analog Converter */ |
Kojto | 111:4336505e4b1c | 184 | void* pfnPTC_Handler; /* 26 Peripheral Touch Controller */ |
Kojto | 111:4336505e4b1c | 185 | void* pfnI2S_Handler; /* 27 Inter-IC Sound Interface */ |
Kojto | 111:4336505e4b1c | 186 | void* pfnReserved28; |
Kojto | 111:4336505e4b1c | 187 | } DeviceVectors; |
Kojto | 111:4336505e4b1c | 188 | |
Kojto | 111:4336505e4b1c | 189 | /* Cortex-M0+ processor handlers */ |
Kojto | 111:4336505e4b1c | 190 | void Reset_Handler ( void ); |
Kojto | 111:4336505e4b1c | 191 | void NMI_Handler ( void ); |
Kojto | 111:4336505e4b1c | 192 | void HardFault_Handler ( void ); |
Kojto | 111:4336505e4b1c | 193 | void SVC_Handler ( void ); |
Kojto | 111:4336505e4b1c | 194 | void PendSV_Handler ( void ); |
Kojto | 111:4336505e4b1c | 195 | void SysTick_Handler ( void ); |
Kojto | 111:4336505e4b1c | 196 | |
Kojto | 111:4336505e4b1c | 197 | /* Peripherals handlers */ |
Kojto | 111:4336505e4b1c | 198 | void PM_Handler ( void ); |
Kojto | 111:4336505e4b1c | 199 | void SYSCTRL_Handler ( void ); |
Kojto | 111:4336505e4b1c | 200 | void WDT_Handler ( void ); |
Kojto | 111:4336505e4b1c | 201 | void RTC_Handler ( void ); |
Kojto | 111:4336505e4b1c | 202 | void EIC_Handler ( void ); |
Kojto | 111:4336505e4b1c | 203 | void NVMCTRL_Handler ( void ); |
Kojto | 111:4336505e4b1c | 204 | void DMAC_Handler ( void ); |
Kojto | 111:4336505e4b1c | 205 | void USB_Handler ( void ); |
Kojto | 111:4336505e4b1c | 206 | void EVSYS_Handler ( void ); |
Kojto | 111:4336505e4b1c | 207 | void SERCOM0_Handler ( void ); |
Kojto | 111:4336505e4b1c | 208 | void SERCOM1_Handler ( void ); |
Kojto | 111:4336505e4b1c | 209 | void SERCOM2_Handler ( void ); |
Kojto | 111:4336505e4b1c | 210 | void SERCOM3_Handler ( void ); |
Kojto | 111:4336505e4b1c | 211 | void SERCOM4_Handler ( void ); |
Kojto | 111:4336505e4b1c | 212 | void SERCOM5_Handler ( void ); |
Kojto | 111:4336505e4b1c | 213 | void TCC0_Handler ( void ); |
Kojto | 111:4336505e4b1c | 214 | void TCC1_Handler ( void ); |
Kojto | 111:4336505e4b1c | 215 | void TCC2_Handler ( void ); |
Kojto | 111:4336505e4b1c | 216 | void TC3_Handler ( void ); |
Kojto | 111:4336505e4b1c | 217 | void TC4_Handler ( void ); |
Kojto | 111:4336505e4b1c | 218 | void TC5_Handler ( void ); |
Kojto | 111:4336505e4b1c | 219 | void TC6_Handler ( void ); |
Kojto | 111:4336505e4b1c | 220 | void TC7_Handler ( void ); |
Kojto | 111:4336505e4b1c | 221 | void ADC_Handler ( void ); |
Kojto | 111:4336505e4b1c | 222 | void AC_Handler ( void ); |
Kojto | 111:4336505e4b1c | 223 | void DAC_Handler ( void ); |
Kojto | 111:4336505e4b1c | 224 | void PTC_Handler ( void ); |
Kojto | 111:4336505e4b1c | 225 | void I2S_Handler ( void ); |
Kojto | 111:4336505e4b1c | 226 | |
Kojto | 111:4336505e4b1c | 227 | /* |
Kojto | 111:4336505e4b1c | 228 | * \brief Configuration of the Cortex-M0+ Processor and Core Peripherals |
Kojto | 111:4336505e4b1c | 229 | */ |
Kojto | 111:4336505e4b1c | 230 | |
Kojto | 111:4336505e4b1c | 231 | #define LITTLE_ENDIAN 1 |
Kojto | 111:4336505e4b1c | 232 | #define __CM0PLUS_REV 1 /*!< Core revision r0p1 */ |
Kojto | 111:4336505e4b1c | 233 | #define __MPU_PRESENT 0 /*!< MPU present or not */ |
Kojto | 111:4336505e4b1c | 234 | #define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */ |
Kojto | 111:4336505e4b1c | 235 | #define __VTOR_PRESENT 1 /*!< VTOR present or not */ |
Kojto | 111:4336505e4b1c | 236 | #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */ |
Kojto | 111:4336505e4b1c | 237 | |
Kojto | 111:4336505e4b1c | 238 | /** |
Kojto | 111:4336505e4b1c | 239 | * \brief CMSIS includes |
Kojto | 111:4336505e4b1c | 240 | */ |
Kojto | 111:4336505e4b1c | 241 | |
Kojto | 111:4336505e4b1c | 242 | #include <core_cm0plus.h> |
Kojto | 111:4336505e4b1c | 243 | #if !defined DONT_USE_CMSIS_INIT |
Kojto | 111:4336505e4b1c | 244 | #include "system_samd21.h" |
Kojto | 111:4336505e4b1c | 245 | #endif /* DONT_USE_CMSIS_INIT */ |
Kojto | 111:4336505e4b1c | 246 | |
Kojto | 111:4336505e4b1c | 247 | /*@}*/ |
Kojto | 111:4336505e4b1c | 248 | |
Kojto | 111:4336505e4b1c | 249 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 250 | /** SOFTWARE PERIPHERAL API DEFINITION FOR SAMD21G17AU */ |
Kojto | 111:4336505e4b1c | 251 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 252 | /** \defgroup SAMD21G17AU_api Peripheral Software API */ |
Kojto | 111:4336505e4b1c | 253 | /*@{*/ |
Kojto | 111:4336505e4b1c | 254 | |
Kojto | 111:4336505e4b1c | 255 | #include "comp_ac.h" |
Kojto | 111:4336505e4b1c | 256 | #include "comp_adc.h" |
Kojto | 111:4336505e4b1c | 257 | #include "comp_dac.h" |
Kojto | 111:4336505e4b1c | 258 | #include "comp_dmac.h" |
Kojto | 111:4336505e4b1c | 259 | #include "comp_dsu.h" |
Kojto | 111:4336505e4b1c | 260 | #include "comp_eic.h" |
Kojto | 111:4336505e4b1c | 261 | #include "comp_evsys.h" |
Kojto | 111:4336505e4b1c | 262 | #include "comp_gclk.h" |
Kojto | 111:4336505e4b1c | 263 | #include "comp_hmatrixb.h" |
Kojto | 111:4336505e4b1c | 264 | #include "comp_i2s.h" |
Kojto | 111:4336505e4b1c | 265 | #include "comp_mtb.h" |
Kojto | 111:4336505e4b1c | 266 | #include "comp_nvmctrl.h" |
Kojto | 111:4336505e4b1c | 267 | #include "comp_pac.h" |
Kojto | 111:4336505e4b1c | 268 | #include "comp_pm.h" |
Kojto | 111:4336505e4b1c | 269 | #include "comp_port.h" |
Kojto | 111:4336505e4b1c | 270 | #include "comp_rtc.h" |
Kojto | 111:4336505e4b1c | 271 | #include "comp_sercom.h" |
Kojto | 111:4336505e4b1c | 272 | #include "comp_sysctrl.h" |
Kojto | 111:4336505e4b1c | 273 | #include "comp_tc.h" |
Kojto | 111:4336505e4b1c | 274 | #include "comp_tcc.h" |
Kojto | 111:4336505e4b1c | 275 | #include "comp_usb.h" |
Kojto | 111:4336505e4b1c | 276 | #include "comp_wdt.h" |
Kojto | 111:4336505e4b1c | 277 | /*@}*/ |
Kojto | 111:4336505e4b1c | 278 | |
Kojto | 111:4336505e4b1c | 279 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 280 | /** REGISTERS ACCESS DEFINITIONS FOR SAMD21G17AU */ |
Kojto | 111:4336505e4b1c | 281 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 282 | /** \defgroup SAMD21G17AU_reg Registers Access Definitions */ |
Kojto | 111:4336505e4b1c | 283 | /*@{*/ |
Kojto | 111:4336505e4b1c | 284 | |
Kojto | 111:4336505e4b1c | 285 | #include "ins_ac.h" |
Kojto | 111:4336505e4b1c | 286 | #include "ins_adc.h" |
Kojto | 111:4336505e4b1c | 287 | #include "ins_dac.h" |
Kojto | 111:4336505e4b1c | 288 | #include "ins_dmac.h" |
Kojto | 111:4336505e4b1c | 289 | #include "ins_dsu.h" |
Kojto | 111:4336505e4b1c | 290 | #include "ins_eic.h" |
Kojto | 111:4336505e4b1c | 291 | #include "ins_evsys.h" |
Kojto | 111:4336505e4b1c | 292 | #include "ins_gclk.h" |
Kojto | 111:4336505e4b1c | 293 | #include "ins_sbmatrix.h" |
Kojto | 111:4336505e4b1c | 294 | #include "ins_i2s.h" |
Kojto | 111:4336505e4b1c | 295 | #include "ins_mtb.h" |
Kojto | 111:4336505e4b1c | 296 | #include "ins_nvmctrl.h" |
Kojto | 111:4336505e4b1c | 297 | #include "ins_pac0.h" |
Kojto | 111:4336505e4b1c | 298 | #include "ins_pac1.h" |
Kojto | 111:4336505e4b1c | 299 | #include "ins_pac2.h" |
Kojto | 111:4336505e4b1c | 300 | #include "ins_pm.h" |
Kojto | 111:4336505e4b1c | 301 | #include "ins_port.h" |
Kojto | 111:4336505e4b1c | 302 | #include "ins_rtc.h" |
Kojto | 111:4336505e4b1c | 303 | #include "ins_sercom0.h" |
Kojto | 111:4336505e4b1c | 304 | #include "ins_sercom1.h" |
Kojto | 111:4336505e4b1c | 305 | #include "ins_sercom2.h" |
Kojto | 111:4336505e4b1c | 306 | #include "ins_sercom3.h" |
Kojto | 111:4336505e4b1c | 307 | #include "ins_sercom4.h" |
Kojto | 111:4336505e4b1c | 308 | #include "ins_sercom5.h" |
Kojto | 111:4336505e4b1c | 309 | #include "ins_sysctrl.h" |
Kojto | 111:4336505e4b1c | 310 | #include "ins_tc3.h" |
Kojto | 111:4336505e4b1c | 311 | #include "ins_tc4.h" |
Kojto | 111:4336505e4b1c | 312 | #include "ins_tc5.h" |
Kojto | 111:4336505e4b1c | 313 | #include "ins_tc6.h" |
Kojto | 111:4336505e4b1c | 314 | #include "ins_tc7.h" |
Kojto | 111:4336505e4b1c | 315 | #include "ins_tcc0.h" |
Kojto | 111:4336505e4b1c | 316 | #include "ins_tcc1.h" |
Kojto | 111:4336505e4b1c | 317 | #include "ins_tcc2.h" |
Kojto | 111:4336505e4b1c | 318 | #include "ins_usb.h" |
Kojto | 111:4336505e4b1c | 319 | #include "ins_wdt.h" |
Kojto | 111:4336505e4b1c | 320 | /*@}*/ |
Kojto | 111:4336505e4b1c | 321 | |
Kojto | 111:4336505e4b1c | 322 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 323 | /** PERIPHERAL ID DEFINITIONS FOR SAMD21G17AU */ |
Kojto | 111:4336505e4b1c | 324 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 325 | /** \defgroup SAMD21G17AU_id Peripheral Ids Definitions */ |
Kojto | 111:4336505e4b1c | 326 | /*@{*/ |
Kojto | 111:4336505e4b1c | 327 | |
Kojto | 111:4336505e4b1c | 328 | // Peripheral instances on HPB0 bridge |
Kojto | 111:4336505e4b1c | 329 | #define ID_PAC0 0 /**< \brief Peripheral Access Controller 0 (PAC0) */ |
Kojto | 111:4336505e4b1c | 330 | #define ID_PM 1 /**< \brief Power Manager (PM) */ |
Kojto | 111:4336505e4b1c | 331 | #define ID_SYSCTRL 2 /**< \brief System Control (SYSCTRL) */ |
Kojto | 111:4336505e4b1c | 332 | #define ID_GCLK 3 /**< \brief Generic Clock Generator (GCLK) */ |
Kojto | 111:4336505e4b1c | 333 | #define ID_WDT 4 /**< \brief Watchdog Timer (WDT) */ |
Kojto | 111:4336505e4b1c | 334 | #define ID_RTC 5 /**< \brief Real-Time Counter (RTC) */ |
Kojto | 111:4336505e4b1c | 335 | #define ID_EIC 6 /**< \brief External Interrupt Controller (EIC) */ |
Kojto | 111:4336505e4b1c | 336 | |
Kojto | 111:4336505e4b1c | 337 | // Peripheral instances on HPB1 bridge |
Kojto | 111:4336505e4b1c | 338 | #define ID_PAC1 32 /**< \brief Peripheral Access Controller 1 (PAC1) */ |
Kojto | 111:4336505e4b1c | 339 | #define ID_DSU 33 /**< \brief Device Service Unit (DSU) */ |
Kojto | 111:4336505e4b1c | 340 | #define ID_NVMCTRL 34 /**< \brief Non-Volatile Memory Controller (NVMCTRL) */ |
Kojto | 111:4336505e4b1c | 341 | #define ID_PORT 35 /**< \brief Port Module (PORT) */ |
Kojto | 111:4336505e4b1c | 342 | #define ID_DMAC 36 /**< \brief Direct Memory Access Controller (DMAC) */ |
Kojto | 111:4336505e4b1c | 343 | #define ID_USB 37 /**< \brief Universal Serial Bus (USB) */ |
Kojto | 111:4336505e4b1c | 344 | #define ID_MTB 38 /**< \brief Cortex-M0+ Micro-Trace Buffer (MTB) */ |
Kojto | 111:4336505e4b1c | 345 | #define ID_SBMATRIX 39 /**< \brief HSB Matrix (SBMATRIX) */ |
Kojto | 111:4336505e4b1c | 346 | |
Kojto | 111:4336505e4b1c | 347 | // Peripheral instances on HPB2 bridge |
Kojto | 111:4336505e4b1c | 348 | #define ID_PAC2 64 /**< \brief Peripheral Access Controller 2 (PAC2) */ |
Kojto | 111:4336505e4b1c | 349 | #define ID_EVSYS 65 /**< \brief Event System Interface (EVSYS) */ |
Kojto | 111:4336505e4b1c | 350 | #define ID_SERCOM0 66 /**< \brief Serial Communication Interface 0 (SERCOM0) */ |
Kojto | 111:4336505e4b1c | 351 | #define ID_SERCOM1 67 /**< \brief Serial Communication Interface 1 (SERCOM1) */ |
Kojto | 111:4336505e4b1c | 352 | #define ID_SERCOM2 68 /**< \brief Serial Communication Interface 2 (SERCOM2) */ |
Kojto | 111:4336505e4b1c | 353 | #define ID_SERCOM3 69 /**< \brief Serial Communication Interface 3 (SERCOM3) */ |
Kojto | 111:4336505e4b1c | 354 | #define ID_SERCOM4 70 /**< \brief Serial Communication Interface 4 (SERCOM4) */ |
Kojto | 111:4336505e4b1c | 355 | #define ID_SERCOM5 71 /**< \brief Serial Communication Interface 5 (SERCOM5) */ |
Kojto | 111:4336505e4b1c | 356 | #define ID_TCC0 72 /**< \brief Timer Counter Control 0 (TCC0) */ |
Kojto | 111:4336505e4b1c | 357 | #define ID_TCC1 73 /**< \brief Timer Counter Control 1 (TCC1) */ |
Kojto | 111:4336505e4b1c | 358 | #define ID_TCC2 74 /**< \brief Timer Counter Control 2 (TCC2) */ |
Kojto | 111:4336505e4b1c | 359 | #define ID_TC3 75 /**< \brief Basic Timer Counter 3 (TC3) */ |
Kojto | 111:4336505e4b1c | 360 | #define ID_TC4 76 /**< \brief Basic Timer Counter 4 (TC4) */ |
Kojto | 111:4336505e4b1c | 361 | #define ID_TC5 77 /**< \brief Basic Timer Counter 5 (TC5) */ |
Kojto | 111:4336505e4b1c | 362 | #define ID_TC6 78 /**< \brief Basic Timer Counter 6 (TC6) */ |
Kojto | 111:4336505e4b1c | 363 | #define ID_TC7 79 /**< \brief Basic Timer Counter 7 (TC7) */ |
Kojto | 111:4336505e4b1c | 364 | #define ID_ADC 80 /**< \brief Analog Digital Converter (ADC) */ |
Kojto | 111:4336505e4b1c | 365 | #define ID_AC 81 /**< \brief Analog Comparators (AC) */ |
Kojto | 111:4336505e4b1c | 366 | #define ID_DAC 82 /**< \brief Digital Analog Converter (DAC) */ |
Kojto | 111:4336505e4b1c | 367 | #define ID_PTC 83 /**< \brief Peripheral Touch Controller (PTC) */ |
Kojto | 111:4336505e4b1c | 368 | #define ID_I2S 84 /**< \brief Inter-IC Sound Interface (I2S) */ |
Kojto | 111:4336505e4b1c | 369 | |
Kojto | 111:4336505e4b1c | 370 | #define ID_PERIPH_COUNT 85 /**< \brief Number of peripheral IDs */ |
Kojto | 111:4336505e4b1c | 371 | /*@}*/ |
Kojto | 111:4336505e4b1c | 372 | |
Kojto | 111:4336505e4b1c | 373 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 374 | /** BASE ADDRESS DEFINITIONS FOR SAMD21G17AU */ |
Kojto | 111:4336505e4b1c | 375 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 376 | /** \defgroup SAMD21G17AU_base Peripheral Base Address Definitions */ |
Kojto | 111:4336505e4b1c | 377 | /*@{*/ |
Kojto | 111:4336505e4b1c | 378 | |
Kojto | 111:4336505e4b1c | 379 | #if defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__) |
Kojto | 111:4336505e4b1c | 380 | #define AC (0x42004400UL) /**< \brief (AC) APB Base Address */ |
Kojto | 111:4336505e4b1c | 381 | #define ADC (0x42004000UL) /**< \brief (ADC) APB Base Address */ |
Kojto | 111:4336505e4b1c | 382 | #define DAC (0x42004800UL) /**< \brief (DAC) APB Base Address */ |
Kojto | 111:4336505e4b1c | 383 | #define DMAC (0x41004800UL) /**< \brief (DMAC) APB Base Address */ |
Kojto | 111:4336505e4b1c | 384 | #define DSU (0x41002000UL) /**< \brief (DSU) APB Base Address */ |
Kojto | 111:4336505e4b1c | 385 | #define EIC (0x40001800UL) /**< \brief (EIC) APB Base Address */ |
Kojto | 111:4336505e4b1c | 386 | #define EVSYS (0x42000400UL) /**< \brief (EVSYS) APB Base Address */ |
Kojto | 111:4336505e4b1c | 387 | #define GCLK (0x40000C00UL) /**< \brief (GCLK) APB Base Address */ |
Kojto | 111:4336505e4b1c | 388 | #define SBMATRIX (0x41007000UL) /**< \brief (SBMATRIX) APB Base Address */ |
Kojto | 111:4336505e4b1c | 389 | #define I2S (0x42005000UL) /**< \brief (I2S) APB Base Address */ |
Kojto | 111:4336505e4b1c | 390 | #define MTB (0x41006000UL) /**< \brief (MTB) APB Base Address */ |
Kojto | 111:4336505e4b1c | 391 | #define NVMCTRL (0x41004000UL) /**< \brief (NVMCTRL) APB Base Address */ |
Kojto | 111:4336505e4b1c | 392 | #define NVMCTRL_CAL (0x00800000UL) /**< \brief (NVMCTRL) CAL Base Address */ |
Kojto | 111:4336505e4b1c | 393 | #define NVMCTRL_LOCKBIT (0x00802000UL) /**< \brief (NVMCTRL) LOCKBIT Base Address */ |
Kojto | 111:4336505e4b1c | 394 | #define NVMCTRL_OTP1 (0x00806000UL) /**< \brief (NVMCTRL) OTP1 Base Address */ |
Kojto | 111:4336505e4b1c | 395 | #define NVMCTRL_OTP2 (0x00806008UL) /**< \brief (NVMCTRL) OTP2 Base Address */ |
Kojto | 111:4336505e4b1c | 396 | #define NVMCTRL_OTP4 (0x00806020UL) /**< \brief (NVMCTRL) OTP4 Base Address */ |
Kojto | 111:4336505e4b1c | 397 | #define NVMCTRL_TEMP_LOG (0x00806030UL) /**< \brief (NVMCTRL) TEMP_LOG Base Address */ |
Kojto | 111:4336505e4b1c | 398 | #define NVMCTRL_USER (0x00804000UL) /**< \brief (NVMCTRL) USER Base Address */ |
Kojto | 111:4336505e4b1c | 399 | #define PAC0 (0x40000000UL) /**< \brief (PAC0) APB Base Address */ |
Kojto | 111:4336505e4b1c | 400 | #define PAC1 (0x41000000UL) /**< \brief (PAC1) APB Base Address */ |
Kojto | 111:4336505e4b1c | 401 | #define PAC2 (0x42000000UL) /**< \brief (PAC2) APB Base Address */ |
Kojto | 111:4336505e4b1c | 402 | #define PM (0x40000400UL) /**< \brief (PM) APB Base Address */ |
Kojto | 111:4336505e4b1c | 403 | #define PORT (0x41004400UL) /**< \brief (PORT) APB Base Address */ |
Kojto | 111:4336505e4b1c | 404 | #define PORT_IOBUS (0x60000000UL) /**< \brief (PORT) IOBUS Base Address */ |
Kojto | 111:4336505e4b1c | 405 | #define RTC (0x40001400UL) /**< \brief (RTC) APB Base Address */ |
Kojto | 111:4336505e4b1c | 406 | #define SERCOM0 (0x42000800UL) /**< \brief (SERCOM0) APB Base Address */ |
Kojto | 111:4336505e4b1c | 407 | #define SERCOM1 (0x42000C00UL) /**< \brief (SERCOM1) APB Base Address */ |
Kojto | 111:4336505e4b1c | 408 | #define SERCOM2 (0x42001000UL) /**< \brief (SERCOM2) APB Base Address */ |
Kojto | 111:4336505e4b1c | 409 | #define SERCOM3 (0x42001400UL) /**< \brief (SERCOM3) APB Base Address */ |
Kojto | 111:4336505e4b1c | 410 | #define SERCOM4 (0x42001800UL) /**< \brief (SERCOM4) APB Base Address */ |
Kojto | 111:4336505e4b1c | 411 | #define SERCOM5 (0x42001C00UL) /**< \brief (SERCOM5) APB Base Address */ |
Kojto | 111:4336505e4b1c | 412 | #define SYSCTRL (0x40000800UL) /**< \brief (SYSCTRL) APB Base Address */ |
Kojto | 111:4336505e4b1c | 413 | #define TC3 (0x42002C00UL) /**< \brief (TC3) APB Base Address */ |
Kojto | 111:4336505e4b1c | 414 | #define TC4 (0x42003000UL) /**< \brief (TC4) APB Base Address */ |
Kojto | 111:4336505e4b1c | 415 | #define TC5 (0x42003400UL) /**< \brief (TC5) APB Base Address */ |
Kojto | 111:4336505e4b1c | 416 | #define TC6 (0x42003800UL) /**< \brief (TC6) APB Base Address */ |
Kojto | 111:4336505e4b1c | 417 | #define TC7 (0x42003C00UL) /**< \brief (TC7) APB Base Address */ |
Kojto | 111:4336505e4b1c | 418 | #define TCC0 (0x42002000UL) /**< \brief (TCC0) APB Base Address */ |
Kojto | 111:4336505e4b1c | 419 | #define TCC1 (0x42002400UL) /**< \brief (TCC1) APB Base Address */ |
Kojto | 111:4336505e4b1c | 420 | #define TCC2 (0x42002800UL) /**< \brief (TCC2) APB Base Address */ |
Kojto | 111:4336505e4b1c | 421 | #define USB (0x41005000UL) /**< \brief (USB) APB Base Address */ |
Kojto | 111:4336505e4b1c | 422 | #define WDT (0x40001000UL) /**< \brief (WDT) APB Base Address */ |
Kojto | 111:4336505e4b1c | 423 | #else |
Kojto | 111:4336505e4b1c | 424 | #define AC ((Ac *)0x42004400UL) /**< \brief (AC) APB Base Address */ |
Kojto | 111:4336505e4b1c | 425 | #define AC_INST_NUM 1 /**< \brief (AC) Number of instances */ |
Kojto | 111:4336505e4b1c | 426 | #define AC_INSTS { AC } /**< \brief (AC) Instances List */ |
Kojto | 111:4336505e4b1c | 427 | |
Kojto | 111:4336505e4b1c | 428 | #define ADC ((Adc *)0x42004000UL) /**< \brief (ADC) APB Base Address */ |
Kojto | 111:4336505e4b1c | 429 | #define ADC_INST_NUM 1 /**< \brief (ADC) Number of instances */ |
Kojto | 111:4336505e4b1c | 430 | #define ADC_INSTS { ADC } /**< \brief (ADC) Instances List */ |
Kojto | 111:4336505e4b1c | 431 | |
Kojto | 111:4336505e4b1c | 432 | #define DAC ((Dac *)0x42004800UL) /**< \brief (DAC) APB Base Address */ |
Kojto | 111:4336505e4b1c | 433 | #define DAC_INST_NUM 1 /**< \brief (DAC) Number of instances */ |
Kojto | 111:4336505e4b1c | 434 | #define DAC_INSTS { DAC } /**< \brief (DAC) Instances List */ |
Kojto | 111:4336505e4b1c | 435 | |
Kojto | 111:4336505e4b1c | 436 | #define DMAC ((Dmac *)0x41004800UL) /**< \brief (DMAC) APB Base Address */ |
Kojto | 111:4336505e4b1c | 437 | #define DMAC_INST_NUM 1 /**< \brief (DMAC) Number of instances */ |
Kojto | 111:4336505e4b1c | 438 | #define DMAC_INSTS { DMAC } /**< \brief (DMAC) Instances List */ |
Kojto | 111:4336505e4b1c | 439 | |
Kojto | 111:4336505e4b1c | 440 | #define DSU ((Dsu *)0x41002000UL) /**< \brief (DSU) APB Base Address */ |
Kojto | 111:4336505e4b1c | 441 | #define DSU_INST_NUM 1 /**< \brief (DSU) Number of instances */ |
Kojto | 111:4336505e4b1c | 442 | #define DSU_INSTS { DSU } /**< \brief (DSU) Instances List */ |
Kojto | 111:4336505e4b1c | 443 | |
Kojto | 111:4336505e4b1c | 444 | #define EIC ((Eic *)0x40001800UL) /**< \brief (EIC) APB Base Address */ |
Kojto | 111:4336505e4b1c | 445 | #define EIC_INST_NUM 1 /**< \brief (EIC) Number of instances */ |
Kojto | 111:4336505e4b1c | 446 | #define EIC_INSTS { EIC } /**< \brief (EIC) Instances List */ |
Kojto | 111:4336505e4b1c | 447 | |
Kojto | 111:4336505e4b1c | 448 | #define EVSYS ((Evsys *)0x42000400UL) /**< \brief (EVSYS) APB Base Address */ |
Kojto | 111:4336505e4b1c | 449 | #define EVSYS_INST_NUM 1 /**< \brief (EVSYS) Number of instances */ |
Kojto | 111:4336505e4b1c | 450 | #define EVSYS_INSTS { EVSYS } /**< \brief (EVSYS) Instances List */ |
Kojto | 111:4336505e4b1c | 451 | |
Kojto | 111:4336505e4b1c | 452 | #define GCLK ((Gclk *)0x40000C00UL) /**< \brief (GCLK) APB Base Address */ |
Kojto | 111:4336505e4b1c | 453 | #define GCLK_INST_NUM 1 /**< \brief (GCLK) Number of instances */ |
Kojto | 111:4336505e4b1c | 454 | #define GCLK_INSTS { GCLK } /**< \brief (GCLK) Instances List */ |
Kojto | 111:4336505e4b1c | 455 | |
Kojto | 111:4336505e4b1c | 456 | #define SBMATRIX ((Hmatrixb *)0x41007000UL) /**< \brief (SBMATRIX) APB Base Address */ |
Kojto | 111:4336505e4b1c | 457 | #define HMATRIXB_INST_NUM 1 /**< \brief (HMATRIXB) Number of instances */ |
Kojto | 111:4336505e4b1c | 458 | #define HMATRIXB_INSTS { SBMATRIX } /**< \brief (HMATRIXB) Instances List */ |
Kojto | 111:4336505e4b1c | 459 | |
Kojto | 111:4336505e4b1c | 460 | #define I2S ((I2s *)0x42005000UL) /**< \brief (I2S) APB Base Address */ |
Kojto | 111:4336505e4b1c | 461 | #define I2S_INST_NUM 1 /**< \brief (I2S) Number of instances */ |
Kojto | 111:4336505e4b1c | 462 | #define I2S_INSTS { I2S } /**< \brief (I2S) Instances List */ |
Kojto | 111:4336505e4b1c | 463 | |
Kojto | 111:4336505e4b1c | 464 | #define MTB ((Mtb *)0x41006000UL) /**< \brief (MTB) APB Base Address */ |
Kojto | 111:4336505e4b1c | 465 | #define MTB_INST_NUM 1 /**< \brief (MTB) Number of instances */ |
Kojto | 111:4336505e4b1c | 466 | #define MTB_INSTS { MTB } /**< \brief (MTB) Instances List */ |
Kojto | 111:4336505e4b1c | 467 | |
Kojto | 111:4336505e4b1c | 468 | #define NVMCTRL ((Nvmctrl *)0x41004000UL) /**< \brief (NVMCTRL) APB Base Address */ |
Kojto | 111:4336505e4b1c | 469 | #define NVMCTRL_CAL (0x00800000UL) /**< \brief (NVMCTRL) CAL Base Address */ |
Kojto | 111:4336505e4b1c | 470 | #define NVMCTRL_LOCKBIT (0x00802000UL) /**< \brief (NVMCTRL) LOCKBIT Base Address */ |
Kojto | 111:4336505e4b1c | 471 | #define NVMCTRL_OTP1 (0x00806000UL) /**< \brief (NVMCTRL) OTP1 Base Address */ |
Kojto | 111:4336505e4b1c | 472 | #define NVMCTRL_OTP2 (0x00806008UL) /**< \brief (NVMCTRL) OTP2 Base Address */ |
Kojto | 111:4336505e4b1c | 473 | #define NVMCTRL_OTP4 (0x00806020UL) /**< \brief (NVMCTRL) OTP4 Base Address */ |
Kojto | 111:4336505e4b1c | 474 | #define NVMCTRL_TEMP_LOG (0x00806030UL) /**< \brief (NVMCTRL) TEMP_LOG Base Address */ |
Kojto | 111:4336505e4b1c | 475 | #define NVMCTRL_USER (0x00804000UL) /**< \brief (NVMCTRL) USER Base Address */ |
Kojto | 111:4336505e4b1c | 476 | #define NVMCTRL_INST_NUM 1 /**< \brief (NVMCTRL) Number of instances */ |
Kojto | 111:4336505e4b1c | 477 | #define NVMCTRL_INSTS { NVMCTRL } /**< \brief (NVMCTRL) Instances List */ |
Kojto | 111:4336505e4b1c | 478 | |
Kojto | 111:4336505e4b1c | 479 | #define PAC0 ((Pac *)0x40000000UL) /**< \brief (PAC0) APB Base Address */ |
Kojto | 111:4336505e4b1c | 480 | #define PAC1 ((Pac *)0x41000000UL) /**< \brief (PAC1) APB Base Address */ |
Kojto | 111:4336505e4b1c | 481 | #define PAC2 ((Pac *)0x42000000UL) /**< \brief (PAC2) APB Base Address */ |
Kojto | 111:4336505e4b1c | 482 | #define PAC_INST_NUM 3 /**< \brief (PAC) Number of instances */ |
Kojto | 111:4336505e4b1c | 483 | #define PAC_INSTS { PAC0, PAC1, PAC2 } /**< \brief (PAC) Instances List */ |
Kojto | 111:4336505e4b1c | 484 | |
Kojto | 111:4336505e4b1c | 485 | #define PM ((Pm *)0x40000400UL) /**< \brief (PM) APB Base Address */ |
Kojto | 111:4336505e4b1c | 486 | #define PM_INST_NUM 1 /**< \brief (PM) Number of instances */ |
Kojto | 111:4336505e4b1c | 487 | #define PM_INSTS { PM } /**< \brief (PM) Instances List */ |
Kojto | 111:4336505e4b1c | 488 | |
Kojto | 111:4336505e4b1c | 489 | #define PORT ((Port *)0x41004400UL) /**< \brief (PORT) APB Base Address */ |
Kojto | 111:4336505e4b1c | 490 | #define PORT_IOBUS ((Port *)0x60000000UL) /**< \brief (PORT) IOBUS Base Address */ |
Kojto | 111:4336505e4b1c | 491 | #define PORT_INST_NUM 1 /**< \brief (PORT) Number of instances */ |
Kojto | 111:4336505e4b1c | 492 | #define PORT_INSTS { PORT } /**< \brief (PORT) Instances List */ |
Kojto | 111:4336505e4b1c | 493 | |
Kojto | 111:4336505e4b1c | 494 | #define PTC_GCLK_ID 34 |
Kojto | 111:4336505e4b1c | 495 | #define PTC_INST_NUM 1 /**< \brief (PTC) Number of instances */ |
Kojto | 111:4336505e4b1c | 496 | #define PTC_INSTS { PTC } /**< \brief (PTC) Instances List */ |
Kojto | 111:4336505e4b1c | 497 | |
Kojto | 111:4336505e4b1c | 498 | #define RTC ((Rtc *)0x40001400UL) /**< \brief (RTC) APB Base Address */ |
Kojto | 111:4336505e4b1c | 499 | #define RTC_INST_NUM 1 /**< \brief (RTC) Number of instances */ |
Kojto | 111:4336505e4b1c | 500 | #define RTC_INSTS { RTC } /**< \brief (RTC) Instances List */ |
Kojto | 111:4336505e4b1c | 501 | |
Kojto | 111:4336505e4b1c | 502 | #define SERCOM0 ((Sercom *)0x42000800UL) /**< \brief (SERCOM0) APB Base Address */ |
Kojto | 111:4336505e4b1c | 503 | #define SERCOM1 ((Sercom *)0x42000C00UL) /**< \brief (SERCOM1) APB Base Address */ |
Kojto | 111:4336505e4b1c | 504 | #define SERCOM2 ((Sercom *)0x42001000UL) /**< \brief (SERCOM2) APB Base Address */ |
Kojto | 111:4336505e4b1c | 505 | #define SERCOM3 ((Sercom *)0x42001400UL) /**< \brief (SERCOM3) APB Base Address */ |
Kojto | 111:4336505e4b1c | 506 | #define SERCOM4 ((Sercom *)0x42001800UL) /**< \brief (SERCOM4) APB Base Address */ |
Kojto | 111:4336505e4b1c | 507 | #define SERCOM5 ((Sercom *)0x42001C00UL) /**< \brief (SERCOM5) APB Base Address */ |
Kojto | 111:4336505e4b1c | 508 | #define SERCOM_INST_NUM 6 /**< \brief (SERCOM) Number of instances */ |
Kojto | 111:4336505e4b1c | 509 | #define SERCOM_INSTS { SERCOM0, SERCOM1, SERCOM2, SERCOM3, SERCOM4, SERCOM5 } /**< \brief (SERCOM) Instances List */ |
Kojto | 111:4336505e4b1c | 510 | |
Kojto | 111:4336505e4b1c | 511 | #define SYSCTRL ((Sysctrl *)0x40000800UL) /**< \brief (SYSCTRL) APB Base Address */ |
Kojto | 111:4336505e4b1c | 512 | #define SYSCTRL_INST_NUM 1 /**< \brief (SYSCTRL) Number of instances */ |
Kojto | 111:4336505e4b1c | 513 | #define SYSCTRL_INSTS { SYSCTRL } /**< \brief (SYSCTRL) Instances List */ |
Kojto | 111:4336505e4b1c | 514 | |
Kojto | 111:4336505e4b1c | 515 | #define TC3 ((Tc *)0x42002C00UL) /**< \brief (TC3) APB Base Address */ |
Kojto | 111:4336505e4b1c | 516 | #define TC4 ((Tc *)0x42003000UL) /**< \brief (TC4) APB Base Address */ |
Kojto | 111:4336505e4b1c | 517 | #define TC5 ((Tc *)0x42003400UL) /**< \brief (TC5) APB Base Address */ |
Kojto | 111:4336505e4b1c | 518 | #define TC6 ((Tc *)0x42003800UL) /**< \brief (TC6) APB Base Address */ |
Kojto | 111:4336505e4b1c | 519 | #define TC7 ((Tc *)0x42003C00UL) /**< \brief (TC7) APB Base Address */ |
Kojto | 111:4336505e4b1c | 520 | #define TC_INST_NUM 5 /**< \brief (TC) Number of instances */ |
Kojto | 111:4336505e4b1c | 521 | #define TC_INSTS { TC3, TC4, TC5, TC6, TC7 } /**< \brief (TC) Instances List */ |
Kojto | 111:4336505e4b1c | 522 | |
Kojto | 111:4336505e4b1c | 523 | #define TCC0 ((Tcc *)0x42002000UL) /**< \brief (TCC0) APB Base Address */ |
Kojto | 111:4336505e4b1c | 524 | #define TCC1 ((Tcc *)0x42002400UL) /**< \brief (TCC1) APB Base Address */ |
Kojto | 111:4336505e4b1c | 525 | #define TCC2 ((Tcc *)0x42002800UL) /**< \brief (TCC2) APB Base Address */ |
Kojto | 111:4336505e4b1c | 526 | #define TCC_INST_NUM 3 /**< \brief (TCC) Number of instances */ |
Kojto | 111:4336505e4b1c | 527 | #define TCC_INSTS { TCC0, TCC1, TCC2 } /**< \brief (TCC) Instances List */ |
Kojto | 111:4336505e4b1c | 528 | |
Kojto | 111:4336505e4b1c | 529 | #define USB ((Usb *)0x41005000UL) /**< \brief (USB) APB Base Address */ |
Kojto | 111:4336505e4b1c | 530 | #define USB_INST_NUM 1 /**< \brief (USB) Number of instances */ |
Kojto | 111:4336505e4b1c | 531 | #define USB_INSTS { USB } /**< \brief (USB) Instances List */ |
Kojto | 111:4336505e4b1c | 532 | |
Kojto | 111:4336505e4b1c | 533 | #define WDT ((Wdt *)0x40001000UL) /**< \brief (WDT) APB Base Address */ |
Kojto | 111:4336505e4b1c | 534 | #define WDT_INST_NUM 1 /**< \brief (WDT) Number of instances */ |
Kojto | 111:4336505e4b1c | 535 | #define WDT_INSTS { WDT } /**< \brief (WDT) Instances List */ |
Kojto | 111:4336505e4b1c | 536 | |
Kojto | 111:4336505e4b1c | 537 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 538 | /*@}*/ |
Kojto | 111:4336505e4b1c | 539 | |
Kojto | 111:4336505e4b1c | 540 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 541 | /** PORT DEFINITIONS FOR SAMD21G17AU */ |
Kojto | 111:4336505e4b1c | 542 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 543 | /** \defgroup SAMD21G17AU_port PORT Definitions */ |
Kojto | 111:4336505e4b1c | 544 | /*@{*/ |
Kojto | 111:4336505e4b1c | 545 | |
Kojto | 111:4336505e4b1c | 546 | #include "pio_samd21g17au.h" |
Kojto | 111:4336505e4b1c | 547 | /*@}*/ |
Kojto | 111:4336505e4b1c | 548 | |
Kojto | 111:4336505e4b1c | 549 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 550 | /** MEMORY MAPPING DEFINITIONS FOR SAMD21G17AU */ |
Kojto | 111:4336505e4b1c | 551 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 552 | |
Kojto | 111:4336505e4b1c | 553 | #define FLASH_SIZE 0x20000UL /* 128 kB */ |
Kojto | 111:4336505e4b1c | 554 | #define FLASH_PAGE_SIZE 64 |
Kojto | 111:4336505e4b1c | 555 | #define FLASH_NB_OF_PAGES 2048 |
Kojto | 111:4336505e4b1c | 556 | #define FLASH_USER_PAGE_SIZE 64 |
Kojto | 111:4336505e4b1c | 557 | #define HMCRAMC0_SIZE 0x4000UL /* 16 kB */ |
Kojto | 111:4336505e4b1c | 558 | #define FLASH_ADDR (0x00000000UL) /**< FLASH base address */ |
Kojto | 111:4336505e4b1c | 559 | #define FLASH_USER_PAGE_ADDR (0x00800000UL) /**< FLASH_USER_PAGE base address */ |
Kojto | 111:4336505e4b1c | 560 | #define HMCRAMC0_ADDR (0x20000000UL) /**< HMCRAMC0 base address */ |
Kojto | 111:4336505e4b1c | 561 | |
Kojto | 111:4336505e4b1c | 562 | #define DSU_DID_RESETVALUE 0x10010010UL |
Kojto | 111:4336505e4b1c | 563 | #define EIC_EXTINT_NUM 16 |
Kojto | 111:4336505e4b1c | 564 | #define PORT_GROUPS 2 |
Kojto | 111:4336505e4b1c | 565 | |
Kojto | 111:4336505e4b1c | 566 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 567 | /** ELECTRICAL DEFINITIONS FOR SAMD21G17AU */ |
Kojto | 111:4336505e4b1c | 568 | /* ************************************************************************** */ |
Kojto | 111:4336505e4b1c | 569 | |
Kojto | 111:4336505e4b1c | 570 | |
Kojto | 111:4336505e4b1c | 571 | #ifdef __cplusplus |
Kojto | 111:4336505e4b1c | 572 | } |
Kojto | 111:4336505e4b1c | 573 | #endif |
Kojto | 111:4336505e4b1c | 574 | |
Kojto | 111:4336505e4b1c | 575 | /*@}*/ |
Kojto | 111:4336505e4b1c | 576 | |
Kojto | 111:4336505e4b1c | 577 | #endif /* SAMD21G17AU_H */ |