samd11d14as.h 27 KB

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