same54p20a.h 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085
  1. /**
  2. * \file
  3. *
  4. * \brief Header file for SAME54P20A
  5. *
  6. * Copyright (c) 2019 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 _SAME54P20A_
  30. #define _SAME54P20A_
  31. /**
  32. * \ingroup SAME54_definitions
  33. * \addtogroup SAME54P20A_definitions SAME54P20A definitions
  34. * This file defines all structures and symbols for SAME54P20A:
  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 SAME54P20A */
  79. /* ************************************************************************** */
  80. /** \defgroup SAME54P20A_cmsis CMSIS Definitions */
  81. /*@{*/
  82. /** Interrupt Number Definition */
  83. typedef enum IRQn
  84. {
  85. /****** Cortex-M4 Processor Exceptions Numbers *******************/
  86. NonMaskableInt_IRQn = -14,/**< 2 Non Maskable Interrupt */
  87. HardFault_IRQn = -13,/**< 3 Hard Fault Interrupt */
  88. MemoryManagement_IRQn = -12,/**< 4 Memory Management Interrupt */
  89. BusFault_IRQn = -11,/**< 5 Bus Fault Interrupt */
  90. UsageFault_IRQn = -10,/**< 6 Usage Fault Interrupt */
  91. SVCall_IRQn = -5, /**< 11 SV Call Interrupt */
  92. DebugMonitor_IRQn = -4, /**< 12 Debug Monitor Interrupt */
  93. PendSV_IRQn = -2, /**< 14 Pend SV Interrupt */
  94. SysTick_IRQn = -1, /**< 15 System Tick Interrupt */
  95. /****** SAME54P20A-specific Interrupt Numbers *********************/
  96. PM_IRQn = 0, /**< 0 SAME54P20A Power Manager (PM) */
  97. MCLK_IRQn = 1, /**< 1 SAME54P20A Main Clock (MCLK) */
  98. OSCCTRL_0_IRQn = 2, /**< 2 SAME54P20A Oscillators Control (OSCCTRL) IRQ 0 */
  99. OSCCTRL_1_IRQn = 3, /**< 3 SAME54P20A Oscillators Control (OSCCTRL) IRQ 1 */
  100. OSCCTRL_2_IRQn = 4, /**< 4 SAME54P20A Oscillators Control (OSCCTRL) IRQ 2 */
  101. OSCCTRL_3_IRQn = 5, /**< 5 SAME54P20A Oscillators Control (OSCCTRL) IRQ 3 */
  102. OSCCTRL_4_IRQn = 6, /**< 6 SAME54P20A Oscillators Control (OSCCTRL) IRQ 4 */
  103. OSC32KCTRL_IRQn = 7, /**< 7 SAME54P20A 32kHz Oscillators Control (OSC32KCTRL) */
  104. SUPC_0_IRQn = 8, /**< 8 SAME54P20A Supply Controller (SUPC) IRQ 0 */
  105. SUPC_1_IRQn = 9, /**< 9 SAME54P20A Supply Controller (SUPC) IRQ 1 */
  106. WDT_IRQn = 10, /**< 10 SAME54P20A Watchdog Timer (WDT) */
  107. RTC_IRQn = 11, /**< 11 SAME54P20A Real-Time Counter (RTC) */
  108. EIC_0_IRQn = 12, /**< 12 SAME54P20A External Interrupt Controller (EIC) IRQ 0 */
  109. EIC_1_IRQn = 13, /**< 13 SAME54P20A External Interrupt Controller (EIC) IRQ 1 */
  110. EIC_2_IRQn = 14, /**< 14 SAME54P20A External Interrupt Controller (EIC) IRQ 2 */
  111. EIC_3_IRQn = 15, /**< 15 SAME54P20A External Interrupt Controller (EIC) IRQ 3 */
  112. EIC_4_IRQn = 16, /**< 16 SAME54P20A External Interrupt Controller (EIC) IRQ 4 */
  113. EIC_5_IRQn = 17, /**< 17 SAME54P20A External Interrupt Controller (EIC) IRQ 5 */
  114. EIC_6_IRQn = 18, /**< 18 SAME54P20A External Interrupt Controller (EIC) IRQ 6 */
  115. EIC_7_IRQn = 19, /**< 19 SAME54P20A External Interrupt Controller (EIC) IRQ 7 */
  116. EIC_8_IRQn = 20, /**< 20 SAME54P20A External Interrupt Controller (EIC) IRQ 8 */
  117. EIC_9_IRQn = 21, /**< 21 SAME54P20A External Interrupt Controller (EIC) IRQ 9 */
  118. EIC_10_IRQn = 22, /**< 22 SAME54P20A External Interrupt Controller (EIC) IRQ 10 */
  119. EIC_11_IRQn = 23, /**< 23 SAME54P20A External Interrupt Controller (EIC) IRQ 11 */
  120. EIC_12_IRQn = 24, /**< 24 SAME54P20A External Interrupt Controller (EIC) IRQ 12 */
  121. EIC_13_IRQn = 25, /**< 25 SAME54P20A External Interrupt Controller (EIC) IRQ 13 */
  122. EIC_14_IRQn = 26, /**< 26 SAME54P20A External Interrupt Controller (EIC) IRQ 14 */
  123. EIC_15_IRQn = 27, /**< 27 SAME54P20A External Interrupt Controller (EIC) IRQ 15 */
  124. FREQM_IRQn = 28, /**< 28 SAME54P20A Frequency Meter (FREQM) */
  125. NVMCTRL_0_IRQn = 29, /**< 29 SAME54P20A Non-Volatile Memory Controller (NVMCTRL) IRQ 0 */
  126. NVMCTRL_1_IRQn = 30, /**< 30 SAME54P20A Non-Volatile Memory Controller (NVMCTRL) IRQ 1 */
  127. DMAC_0_IRQn = 31, /**< 31 SAME54P20A Direct Memory Access Controller (DMAC) IRQ 0 */
  128. DMAC_1_IRQn = 32, /**< 32 SAME54P20A Direct Memory Access Controller (DMAC) IRQ 1 */
  129. DMAC_2_IRQn = 33, /**< 33 SAME54P20A Direct Memory Access Controller (DMAC) IRQ 2 */
  130. DMAC_3_IRQn = 34, /**< 34 SAME54P20A Direct Memory Access Controller (DMAC) IRQ 3 */
  131. DMAC_4_IRQn = 35, /**< 35 SAME54P20A Direct Memory Access Controller (DMAC) IRQ 4 */
  132. EVSYS_0_IRQn = 36, /**< 36 SAME54P20A Event System Interface (EVSYS) IRQ 0 */
  133. EVSYS_1_IRQn = 37, /**< 37 SAME54P20A Event System Interface (EVSYS) IRQ 1 */
  134. EVSYS_2_IRQn = 38, /**< 38 SAME54P20A Event System Interface (EVSYS) IRQ 2 */
  135. EVSYS_3_IRQn = 39, /**< 39 SAME54P20A Event System Interface (EVSYS) IRQ 3 */
  136. EVSYS_4_IRQn = 40, /**< 40 SAME54P20A Event System Interface (EVSYS) IRQ 4 */
  137. PAC_IRQn = 41, /**< 41 SAME54P20A Peripheral Access Controller (PAC) */
  138. RAMECC_IRQn = 45, /**< 45 SAME54P20A RAM ECC (RAMECC) */
  139. SERCOM0_0_IRQn = 46, /**< 46 SAME54P20A Serial Communication Interface 0 (SERCOM0) IRQ 0 */
  140. SERCOM0_1_IRQn = 47, /**< 47 SAME54P20A Serial Communication Interface 0 (SERCOM0) IRQ 1 */
  141. SERCOM0_2_IRQn = 48, /**< 48 SAME54P20A Serial Communication Interface 0 (SERCOM0) IRQ 2 */
  142. SERCOM0_3_IRQn = 49, /**< 49 SAME54P20A Serial Communication Interface 0 (SERCOM0) IRQ 3 */
  143. SERCOM1_0_IRQn = 50, /**< 50 SAME54P20A Serial Communication Interface 1 (SERCOM1) IRQ 0 */
  144. SERCOM1_1_IRQn = 51, /**< 51 SAME54P20A Serial Communication Interface 1 (SERCOM1) IRQ 1 */
  145. SERCOM1_2_IRQn = 52, /**< 52 SAME54P20A Serial Communication Interface 1 (SERCOM1) IRQ 2 */
  146. SERCOM1_3_IRQn = 53, /**< 53 SAME54P20A Serial Communication Interface 1 (SERCOM1) IRQ 3 */
  147. SERCOM2_0_IRQn = 54, /**< 54 SAME54P20A Serial Communication Interface 2 (SERCOM2) IRQ 0 */
  148. SERCOM2_1_IRQn = 55, /**< 55 SAME54P20A Serial Communication Interface 2 (SERCOM2) IRQ 1 */
  149. SERCOM2_2_IRQn = 56, /**< 56 SAME54P20A Serial Communication Interface 2 (SERCOM2) IRQ 2 */
  150. SERCOM2_3_IRQn = 57, /**< 57 SAME54P20A Serial Communication Interface 2 (SERCOM2) IRQ 3 */
  151. SERCOM3_0_IRQn = 58, /**< 58 SAME54P20A Serial Communication Interface 3 (SERCOM3) IRQ 0 */
  152. SERCOM3_1_IRQn = 59, /**< 59 SAME54P20A Serial Communication Interface 3 (SERCOM3) IRQ 1 */
  153. SERCOM3_2_IRQn = 60, /**< 60 SAME54P20A Serial Communication Interface 3 (SERCOM3) IRQ 2 */
  154. SERCOM3_3_IRQn = 61, /**< 61 SAME54P20A Serial Communication Interface 3 (SERCOM3) IRQ 3 */
  155. SERCOM4_0_IRQn = 62, /**< 62 SAME54P20A Serial Communication Interface 4 (SERCOM4) IRQ 0 */
  156. SERCOM4_1_IRQn = 63, /**< 63 SAME54P20A Serial Communication Interface 4 (SERCOM4) IRQ 1 */
  157. SERCOM4_2_IRQn = 64, /**< 64 SAME54P20A Serial Communication Interface 4 (SERCOM4) IRQ 2 */
  158. SERCOM4_3_IRQn = 65, /**< 65 SAME54P20A Serial Communication Interface 4 (SERCOM4) IRQ 3 */
  159. SERCOM5_0_IRQn = 66, /**< 66 SAME54P20A Serial Communication Interface 5 (SERCOM5) IRQ 0 */
  160. SERCOM5_1_IRQn = 67, /**< 67 SAME54P20A Serial Communication Interface 5 (SERCOM5) IRQ 1 */
  161. SERCOM5_2_IRQn = 68, /**< 68 SAME54P20A Serial Communication Interface 5 (SERCOM5) IRQ 2 */
  162. SERCOM5_3_IRQn = 69, /**< 69 SAME54P20A Serial Communication Interface 5 (SERCOM5) IRQ 3 */
  163. SERCOM6_0_IRQn = 70, /**< 70 SAME54P20A Serial Communication Interface 6 (SERCOM6) IRQ 0 */
  164. SERCOM6_1_IRQn = 71, /**< 71 SAME54P20A Serial Communication Interface 6 (SERCOM6) IRQ 1 */
  165. SERCOM6_2_IRQn = 72, /**< 72 SAME54P20A Serial Communication Interface 6 (SERCOM6) IRQ 2 */
  166. SERCOM6_3_IRQn = 73, /**< 73 SAME54P20A Serial Communication Interface 6 (SERCOM6) IRQ 3 */
  167. SERCOM7_0_IRQn = 74, /**< 74 SAME54P20A Serial Communication Interface 7 (SERCOM7) IRQ 0 */
  168. SERCOM7_1_IRQn = 75, /**< 75 SAME54P20A Serial Communication Interface 7 (SERCOM7) IRQ 1 */
  169. SERCOM7_2_IRQn = 76, /**< 76 SAME54P20A Serial Communication Interface 7 (SERCOM7) IRQ 2 */
  170. SERCOM7_3_IRQn = 77, /**< 77 SAME54P20A Serial Communication Interface 7 (SERCOM7) IRQ 3 */
  171. CAN0_IRQn = 78, /**< 78 SAME54P20A Control Area Network 0 (CAN0) */
  172. CAN1_IRQn = 79, /**< 79 SAME54P20A Control Area Network 1 (CAN1) */
  173. USB_0_IRQn = 80, /**< 80 SAME54P20A Universal Serial Bus (USB) IRQ 0 */
  174. USB_1_IRQn = 81, /**< 81 SAME54P20A Universal Serial Bus (USB) IRQ 1 */
  175. USB_2_IRQn = 82, /**< 82 SAME54P20A Universal Serial Bus (USB) IRQ 2 */
  176. USB_3_IRQn = 83, /**< 83 SAME54P20A Universal Serial Bus (USB) IRQ 3 */
  177. GMAC_IRQn = 84, /**< 84 SAME54P20A Ethernet MAC (GMAC) */
  178. TCC0_0_IRQn = 85, /**< 85 SAME54P20A Timer Counter Control 0 (TCC0) IRQ 0 */
  179. TCC0_1_IRQn = 86, /**< 86 SAME54P20A Timer Counter Control 0 (TCC0) IRQ 1 */
  180. TCC0_2_IRQn = 87, /**< 87 SAME54P20A Timer Counter Control 0 (TCC0) IRQ 2 */
  181. TCC0_3_IRQn = 88, /**< 88 SAME54P20A Timer Counter Control 0 (TCC0) IRQ 3 */
  182. TCC0_4_IRQn = 89, /**< 89 SAME54P20A Timer Counter Control 0 (TCC0) IRQ 4 */
  183. TCC0_5_IRQn = 90, /**< 90 SAME54P20A Timer Counter Control 0 (TCC0) IRQ 5 */
  184. TCC0_6_IRQn = 91, /**< 91 SAME54P20A Timer Counter Control 0 (TCC0) IRQ 6 */
  185. TCC1_0_IRQn = 92, /**< 92 SAME54P20A Timer Counter Control 1 (TCC1) IRQ 0 */
  186. TCC1_1_IRQn = 93, /**< 93 SAME54P20A Timer Counter Control 1 (TCC1) IRQ 1 */
  187. TCC1_2_IRQn = 94, /**< 94 SAME54P20A Timer Counter Control 1 (TCC1) IRQ 2 */
  188. TCC1_3_IRQn = 95, /**< 95 SAME54P20A Timer Counter Control 1 (TCC1) IRQ 3 */
  189. TCC1_4_IRQn = 96, /**< 96 SAME54P20A Timer Counter Control 1 (TCC1) IRQ 4 */
  190. TCC2_0_IRQn = 97, /**< 97 SAME54P20A Timer Counter Control 2 (TCC2) IRQ 0 */
  191. TCC2_1_IRQn = 98, /**< 98 SAME54P20A Timer Counter Control 2 (TCC2) IRQ 1 */
  192. TCC2_2_IRQn = 99, /**< 99 SAME54P20A Timer Counter Control 2 (TCC2) IRQ 2 */
  193. TCC2_3_IRQn = 100, /**< 100 SAME54P20A Timer Counter Control 2 (TCC2) IRQ 3 */
  194. TCC3_0_IRQn = 101, /**< 101 SAME54P20A Timer Counter Control 3 (TCC3) IRQ 0 */
  195. TCC3_1_IRQn = 102, /**< 102 SAME54P20A Timer Counter Control 3 (TCC3) IRQ 1 */
  196. TCC3_2_IRQn = 103, /**< 103 SAME54P20A Timer Counter Control 3 (TCC3) IRQ 2 */
  197. TCC4_0_IRQn = 104, /**< 104 SAME54P20A Timer Counter Control 4 (TCC4) IRQ 0 */
  198. TCC4_1_IRQn = 105, /**< 105 SAME54P20A Timer Counter Control 4 (TCC4) IRQ 1 */
  199. TCC4_2_IRQn = 106, /**< 106 SAME54P20A Timer Counter Control 4 (TCC4) IRQ 2 */
  200. TC0_IRQn = 107, /**< 107 SAME54P20A Basic Timer Counter 0 (TC0) */
  201. TC1_IRQn = 108, /**< 108 SAME54P20A Basic Timer Counter 1 (TC1) */
  202. TC2_IRQn = 109, /**< 109 SAME54P20A Basic Timer Counter 2 (TC2) */
  203. TC3_IRQn = 110, /**< 110 SAME54P20A Basic Timer Counter 3 (TC3) */
  204. TC4_IRQn = 111, /**< 111 SAME54P20A Basic Timer Counter 4 (TC4) */
  205. TC5_IRQn = 112, /**< 112 SAME54P20A Basic Timer Counter 5 (TC5) */
  206. TC6_IRQn = 113, /**< 113 SAME54P20A Basic Timer Counter 6 (TC6) */
  207. TC7_IRQn = 114, /**< 114 SAME54P20A Basic Timer Counter 7 (TC7) */
  208. PDEC_0_IRQn = 115, /**< 115 SAME54P20A Quadrature Decodeur (PDEC) IRQ 0 */
  209. PDEC_1_IRQn = 116, /**< 116 SAME54P20A Quadrature Decodeur (PDEC) IRQ 1 */
  210. PDEC_2_IRQn = 117, /**< 117 SAME54P20A Quadrature Decodeur (PDEC) IRQ 2 */
  211. ADC0_0_IRQn = 118, /**< 118 SAME54P20A Analog Digital Converter 0 (ADC0) IRQ 0 */
  212. ADC0_1_IRQn = 119, /**< 119 SAME54P20A Analog Digital Converter 0 (ADC0) IRQ 1 */
  213. ADC1_0_IRQn = 120, /**< 120 SAME54P20A Analog Digital Converter 1 (ADC1) IRQ 0 */
  214. ADC1_1_IRQn = 121, /**< 121 SAME54P20A Analog Digital Converter 1 (ADC1) IRQ 1 */
  215. AC_IRQn = 122, /**< 122 SAME54P20A Analog Comparators (AC) */
  216. DAC_0_IRQn = 123, /**< 123 SAME54P20A Digital-to-Analog Converter (DAC) IRQ 0 */
  217. DAC_1_IRQn = 124, /**< 124 SAME54P20A Digital-to-Analog Converter (DAC) IRQ 1 */
  218. DAC_2_IRQn = 125, /**< 125 SAME54P20A Digital-to-Analog Converter (DAC) IRQ 2 */
  219. DAC_3_IRQn = 126, /**< 126 SAME54P20A Digital-to-Analog Converter (DAC) IRQ 3 */
  220. DAC_4_IRQn = 127, /**< 127 SAME54P20A Digital-to-Analog Converter (DAC) IRQ 4 */
  221. I2S_IRQn = 128, /**< 128 SAME54P20A Inter-IC Sound Interface (I2S) */
  222. PCC_IRQn = 129, /**< 129 SAME54P20A Parallel Capture Controller (PCC) */
  223. AES_IRQn = 130, /**< 130 SAME54P20A Advanced Encryption Standard (AES) */
  224. TRNG_IRQn = 131, /**< 131 SAME54P20A True Random Generator (TRNG) */
  225. ICM_IRQn = 132, /**< 132 SAME54P20A Integrity Check Monitor (ICM) */
  226. PUKCC_IRQn = 133, /**< 133 SAME54P20A PUblic-Key Cryptography Controller (PUKCC) */
  227. QSPI_IRQn = 134, /**< 134 SAME54P20A Quad SPI interface (QSPI) */
  228. SDHC0_IRQn = 135, /**< 135 SAME54P20A SD/MMC Host Controller 0 (SDHC0) */
  229. SDHC1_IRQn = 136, /**< 136 SAME54P20A SD/MMC Host Controller 1 (SDHC1) */
  230. PERIPH_COUNT_IRQn = 137 /**< Number of peripheral IDs */
  231. } IRQn_Type;
  232. typedef struct _DeviceVectors
  233. {
  234. /* Stack pointer */
  235. void* pvStack;
  236. /* Cortex-M handlers */
  237. void* pfnReset_Handler;
  238. void* pfnNonMaskableInt_Handler;
  239. void* pfnHardFault_Handler;
  240. void* pfnMemManagement_Handler;
  241. void* pfnBusFault_Handler;
  242. void* pfnUsageFault_Handler;
  243. void* pvReservedM9;
  244. void* pvReservedM8;
  245. void* pvReservedM7;
  246. void* pvReservedM6;
  247. void* pfnSVCall_Handler;
  248. void* pfnDebugMonitor_Handler;
  249. void* pvReservedM3;
  250. void* pfnPendSV_Handler;
  251. void* pfnSysTick_Handler;
  252. /* Peripheral handlers */
  253. void* pfnPM_Handler; /* 0 Power Manager */
  254. void* pfnMCLK_Handler; /* 1 Main Clock */
  255. void* pfnOSCCTRL_0_Handler; /* 2 Oscillators Control IRQ 0 */
  256. void* pfnOSCCTRL_1_Handler; /* 3 Oscillators Control IRQ 1 */
  257. void* pfnOSCCTRL_2_Handler; /* 4 Oscillators Control IRQ 2 */
  258. void* pfnOSCCTRL_3_Handler; /* 5 Oscillators Control IRQ 3 */
  259. void* pfnOSCCTRL_4_Handler; /* 6 Oscillators Control IRQ 4 */
  260. void* pfnOSC32KCTRL_Handler; /* 7 32kHz Oscillators Control */
  261. void* pfnSUPC_0_Handler; /* 8 Supply Controller IRQ 0 */
  262. void* pfnSUPC_1_Handler; /* 9 Supply Controller IRQ 1 */
  263. void* pfnWDT_Handler; /* 10 Watchdog Timer */
  264. void* pfnRTC_Handler; /* 11 Real-Time Counter */
  265. void* pfnEIC_0_Handler; /* 12 External Interrupt Controller IRQ 0 */
  266. void* pfnEIC_1_Handler; /* 13 External Interrupt Controller IRQ 1 */
  267. void* pfnEIC_2_Handler; /* 14 External Interrupt Controller IRQ 2 */
  268. void* pfnEIC_3_Handler; /* 15 External Interrupt Controller IRQ 3 */
  269. void* pfnEIC_4_Handler; /* 16 External Interrupt Controller IRQ 4 */
  270. void* pfnEIC_5_Handler; /* 17 External Interrupt Controller IRQ 5 */
  271. void* pfnEIC_6_Handler; /* 18 External Interrupt Controller IRQ 6 */
  272. void* pfnEIC_7_Handler; /* 19 External Interrupt Controller IRQ 7 */
  273. void* pfnEIC_8_Handler; /* 20 External Interrupt Controller IRQ 8 */
  274. void* pfnEIC_9_Handler; /* 21 External Interrupt Controller IRQ 9 */
  275. void* pfnEIC_10_Handler; /* 22 External Interrupt Controller IRQ 10 */
  276. void* pfnEIC_11_Handler; /* 23 External Interrupt Controller IRQ 11 */
  277. void* pfnEIC_12_Handler; /* 24 External Interrupt Controller IRQ 12 */
  278. void* pfnEIC_13_Handler; /* 25 External Interrupt Controller IRQ 13 */
  279. void* pfnEIC_14_Handler; /* 26 External Interrupt Controller IRQ 14 */
  280. void* pfnEIC_15_Handler; /* 27 External Interrupt Controller IRQ 15 */
  281. void* pfnFREQM_Handler; /* 28 Frequency Meter */
  282. void* pfnNVMCTRL_0_Handler; /* 29 Non-Volatile Memory Controller IRQ 0 */
  283. void* pfnNVMCTRL_1_Handler; /* 30 Non-Volatile Memory Controller IRQ 1 */
  284. void* pfnDMAC_0_Handler; /* 31 Direct Memory Access Controller IRQ 0 */
  285. void* pfnDMAC_1_Handler; /* 32 Direct Memory Access Controller IRQ 1 */
  286. void* pfnDMAC_2_Handler; /* 33 Direct Memory Access Controller IRQ 2 */
  287. void* pfnDMAC_3_Handler; /* 34 Direct Memory Access Controller IRQ 3 */
  288. void* pfnDMAC_4_Handler; /* 35 Direct Memory Access Controller IRQ 4 */
  289. void* pfnEVSYS_0_Handler; /* 36 Event System Interface IRQ 0 */
  290. void* pfnEVSYS_1_Handler; /* 37 Event System Interface IRQ 1 */
  291. void* pfnEVSYS_2_Handler; /* 38 Event System Interface IRQ 2 */
  292. void* pfnEVSYS_3_Handler; /* 39 Event System Interface IRQ 3 */
  293. void* pfnEVSYS_4_Handler; /* 40 Event System Interface IRQ 4 */
  294. void* pfnPAC_Handler; /* 41 Peripheral Access Controller */
  295. void* pvReserved42;
  296. void* pvReserved43;
  297. void* pvReserved44;
  298. void* pfnRAMECC_Handler; /* 45 RAM ECC */
  299. void* pfnSERCOM0_0_Handler; /* 46 Serial Communication Interface 0 IRQ 0 */
  300. void* pfnSERCOM0_1_Handler; /* 47 Serial Communication Interface 0 IRQ 1 */
  301. void* pfnSERCOM0_2_Handler; /* 48 Serial Communication Interface 0 IRQ 2 */
  302. void* pfnSERCOM0_3_Handler; /* 49 Serial Communication Interface 0 IRQ 3 */
  303. void* pfnSERCOM1_0_Handler; /* 50 Serial Communication Interface 1 IRQ 0 */
  304. void* pfnSERCOM1_1_Handler; /* 51 Serial Communication Interface 1 IRQ 1 */
  305. void* pfnSERCOM1_2_Handler; /* 52 Serial Communication Interface 1 IRQ 2 */
  306. void* pfnSERCOM1_3_Handler; /* 53 Serial Communication Interface 1 IRQ 3 */
  307. void* pfnSERCOM2_0_Handler; /* 54 Serial Communication Interface 2 IRQ 0 */
  308. void* pfnSERCOM2_1_Handler; /* 55 Serial Communication Interface 2 IRQ 1 */
  309. void* pfnSERCOM2_2_Handler; /* 56 Serial Communication Interface 2 IRQ 2 */
  310. void* pfnSERCOM2_3_Handler; /* 57 Serial Communication Interface 2 IRQ 3 */
  311. void* pfnSERCOM3_0_Handler; /* 58 Serial Communication Interface 3 IRQ 0 */
  312. void* pfnSERCOM3_1_Handler; /* 59 Serial Communication Interface 3 IRQ 1 */
  313. void* pfnSERCOM3_2_Handler; /* 60 Serial Communication Interface 3 IRQ 2 */
  314. void* pfnSERCOM3_3_Handler; /* 61 Serial Communication Interface 3 IRQ 3 */
  315. void* pfnSERCOM4_0_Handler; /* 62 Serial Communication Interface 4 IRQ 0 */
  316. void* pfnSERCOM4_1_Handler; /* 63 Serial Communication Interface 4 IRQ 1 */
  317. void* pfnSERCOM4_2_Handler; /* 64 Serial Communication Interface 4 IRQ 2 */
  318. void* pfnSERCOM4_3_Handler; /* 65 Serial Communication Interface 4 IRQ 3 */
  319. void* pfnSERCOM5_0_Handler; /* 66 Serial Communication Interface 5 IRQ 0 */
  320. void* pfnSERCOM5_1_Handler; /* 67 Serial Communication Interface 5 IRQ 1 */
  321. void* pfnSERCOM5_2_Handler; /* 68 Serial Communication Interface 5 IRQ 2 */
  322. void* pfnSERCOM5_3_Handler; /* 69 Serial Communication Interface 5 IRQ 3 */
  323. void* pfnSERCOM6_0_Handler; /* 70 Serial Communication Interface 6 IRQ 0 */
  324. void* pfnSERCOM6_1_Handler; /* 71 Serial Communication Interface 6 IRQ 1 */
  325. void* pfnSERCOM6_2_Handler; /* 72 Serial Communication Interface 6 IRQ 2 */
  326. void* pfnSERCOM6_3_Handler; /* 73 Serial Communication Interface 6 IRQ 3 */
  327. void* pfnSERCOM7_0_Handler; /* 74 Serial Communication Interface 7 IRQ 0 */
  328. void* pfnSERCOM7_1_Handler; /* 75 Serial Communication Interface 7 IRQ 1 */
  329. void* pfnSERCOM7_2_Handler; /* 76 Serial Communication Interface 7 IRQ 2 */
  330. void* pfnSERCOM7_3_Handler; /* 77 Serial Communication Interface 7 IRQ 3 */
  331. void* pfnCAN0_Handler; /* 78 Control Area Network 0 */
  332. void* pfnCAN1_Handler; /* 79 Control Area Network 1 */
  333. void* pfnUSB_0_Handler; /* 80 Universal Serial Bus IRQ 0 */
  334. void* pfnUSB_1_Handler; /* 81 Universal Serial Bus IRQ 1 */
  335. void* pfnUSB_2_Handler; /* 82 Universal Serial Bus IRQ 2 */
  336. void* pfnUSB_3_Handler; /* 83 Universal Serial Bus IRQ 3 */
  337. void* pfnGMAC_Handler; /* 84 Ethernet MAC */
  338. void* pfnTCC0_0_Handler; /* 85 Timer Counter Control 0 IRQ 0 */
  339. void* pfnTCC0_1_Handler; /* 86 Timer Counter Control 0 IRQ 1 */
  340. void* pfnTCC0_2_Handler; /* 87 Timer Counter Control 0 IRQ 2 */
  341. void* pfnTCC0_3_Handler; /* 88 Timer Counter Control 0 IRQ 3 */
  342. void* pfnTCC0_4_Handler; /* 89 Timer Counter Control 0 IRQ 4 */
  343. void* pfnTCC0_5_Handler; /* 90 Timer Counter Control 0 IRQ 5 */
  344. void* pfnTCC0_6_Handler; /* 91 Timer Counter Control 0 IRQ 6 */
  345. void* pfnTCC1_0_Handler; /* 92 Timer Counter Control 1 IRQ 0 */
  346. void* pfnTCC1_1_Handler; /* 93 Timer Counter Control 1 IRQ 1 */
  347. void* pfnTCC1_2_Handler; /* 94 Timer Counter Control 1 IRQ 2 */
  348. void* pfnTCC1_3_Handler; /* 95 Timer Counter Control 1 IRQ 3 */
  349. void* pfnTCC1_4_Handler; /* 96 Timer Counter Control 1 IRQ 4 */
  350. void* pfnTCC2_0_Handler; /* 97 Timer Counter Control 2 IRQ 0 */
  351. void* pfnTCC2_1_Handler; /* 98 Timer Counter Control 2 IRQ 1 */
  352. void* pfnTCC2_2_Handler; /* 99 Timer Counter Control 2 IRQ 2 */
  353. void* pfnTCC2_3_Handler; /* 100 Timer Counter Control 2 IRQ 3 */
  354. void* pfnTCC3_0_Handler; /* 101 Timer Counter Control 3 IRQ 0 */
  355. void* pfnTCC3_1_Handler; /* 102 Timer Counter Control 3 IRQ 1 */
  356. void* pfnTCC3_2_Handler; /* 103 Timer Counter Control 3 IRQ 2 */
  357. void* pfnTCC4_0_Handler; /* 104 Timer Counter Control 4 IRQ 0 */
  358. void* pfnTCC4_1_Handler; /* 105 Timer Counter Control 4 IRQ 1 */
  359. void* pfnTCC4_2_Handler; /* 106 Timer Counter Control 4 IRQ 2 */
  360. void* pfnTC0_Handler; /* 107 Basic Timer Counter 0 */
  361. void* pfnTC1_Handler; /* 108 Basic Timer Counter 1 */
  362. void* pfnTC2_Handler; /* 109 Basic Timer Counter 2 */
  363. void* pfnTC3_Handler; /* 110 Basic Timer Counter 3 */
  364. void* pfnTC4_Handler; /* 111 Basic Timer Counter 4 */
  365. void* pfnTC5_Handler; /* 112 Basic Timer Counter 5 */
  366. void* pfnTC6_Handler; /* 113 Basic Timer Counter 6 */
  367. void* pfnTC7_Handler; /* 114 Basic Timer Counter 7 */
  368. void* pfnPDEC_0_Handler; /* 115 Quadrature Decodeur IRQ 0 */
  369. void* pfnPDEC_1_Handler; /* 116 Quadrature Decodeur IRQ 1 */
  370. void* pfnPDEC_2_Handler; /* 117 Quadrature Decodeur IRQ 2 */
  371. void* pfnADC0_0_Handler; /* 118 Analog Digital Converter 0 IRQ 0 */
  372. void* pfnADC0_1_Handler; /* 119 Analog Digital Converter 0 IRQ 1 */
  373. void* pfnADC1_0_Handler; /* 120 Analog Digital Converter 1 IRQ 0 */
  374. void* pfnADC1_1_Handler; /* 121 Analog Digital Converter 1 IRQ 1 */
  375. void* pfnAC_Handler; /* 122 Analog Comparators */
  376. void* pfnDAC_0_Handler; /* 123 Digital-to-Analog Converter IRQ 0 */
  377. void* pfnDAC_1_Handler; /* 124 Digital-to-Analog Converter IRQ 1 */
  378. void* pfnDAC_2_Handler; /* 125 Digital-to-Analog Converter IRQ 2 */
  379. void* pfnDAC_3_Handler; /* 126 Digital-to-Analog Converter IRQ 3 */
  380. void* pfnDAC_4_Handler; /* 127 Digital-to-Analog Converter IRQ 4 */
  381. void* pfnI2S_Handler; /* 128 Inter-IC Sound Interface */
  382. void* pfnPCC_Handler; /* 129 Parallel Capture Controller */
  383. void* pfnAES_Handler; /* 130 Advanced Encryption Standard */
  384. void* pfnTRNG_Handler; /* 131 True Random Generator */
  385. void* pfnICM_Handler; /* 132 Integrity Check Monitor */
  386. void* pfnPUKCC_Handler; /* 133 PUblic-Key Cryptography Controller */
  387. void* pfnQSPI_Handler; /* 134 Quad SPI interface */
  388. void* pfnSDHC0_Handler; /* 135 SD/MMC Host Controller 0 */
  389. void* pfnSDHC1_Handler; /* 136 SD/MMC Host Controller 1 */
  390. } DeviceVectors;
  391. /* Cortex-M4 processor handlers */
  392. void Reset_Handler ( void );
  393. void NonMaskableInt_Handler ( void );
  394. void HardFault_Handler ( void );
  395. void MemManagement_Handler ( void );
  396. void BusFault_Handler ( void );
  397. void UsageFault_Handler ( void );
  398. void SVCall_Handler ( void );
  399. void DebugMonitor_Handler ( void );
  400. void PendSV_Handler ( void );
  401. void SysTick_Handler ( void );
  402. /* Peripherals handlers */
  403. void PM_Handler ( void );
  404. void MCLK_Handler ( void );
  405. void OSCCTRL_0_Handler ( void );
  406. void OSCCTRL_1_Handler ( void );
  407. void OSCCTRL_2_Handler ( void );
  408. void OSCCTRL_3_Handler ( void );
  409. void OSCCTRL_4_Handler ( void );
  410. void OSC32KCTRL_Handler ( void );
  411. void SUPC_0_Handler ( void );
  412. void SUPC_1_Handler ( void );
  413. void WDT_Handler ( void );
  414. void RTC_Handler ( void );
  415. void EIC_0_Handler ( void );
  416. void EIC_1_Handler ( void );
  417. void EIC_2_Handler ( void );
  418. void EIC_3_Handler ( void );
  419. void EIC_4_Handler ( void );
  420. void EIC_5_Handler ( void );
  421. void EIC_6_Handler ( void );
  422. void EIC_7_Handler ( void );
  423. void EIC_8_Handler ( void );
  424. void EIC_9_Handler ( void );
  425. void EIC_10_Handler ( void );
  426. void EIC_11_Handler ( void );
  427. void EIC_12_Handler ( void );
  428. void EIC_13_Handler ( void );
  429. void EIC_14_Handler ( void );
  430. void EIC_15_Handler ( void );
  431. void FREQM_Handler ( void );
  432. void NVMCTRL_0_Handler ( void );
  433. void NVMCTRL_1_Handler ( void );
  434. void DMAC_0_Handler ( void );
  435. void DMAC_1_Handler ( void );
  436. void DMAC_2_Handler ( void );
  437. void DMAC_3_Handler ( void );
  438. void DMAC_4_Handler ( void );
  439. void EVSYS_0_Handler ( void );
  440. void EVSYS_1_Handler ( void );
  441. void EVSYS_2_Handler ( void );
  442. void EVSYS_3_Handler ( void );
  443. void EVSYS_4_Handler ( void );
  444. void PAC_Handler ( void );
  445. void RAMECC_Handler ( void );
  446. void SERCOM0_0_Handler ( void );
  447. void SERCOM0_1_Handler ( void );
  448. void SERCOM0_2_Handler ( void );
  449. void SERCOM0_3_Handler ( void );
  450. void SERCOM1_0_Handler ( void );
  451. void SERCOM1_1_Handler ( void );
  452. void SERCOM1_2_Handler ( void );
  453. void SERCOM1_3_Handler ( void );
  454. void SERCOM2_0_Handler ( void );
  455. void SERCOM2_1_Handler ( void );
  456. void SERCOM2_2_Handler ( void );
  457. void SERCOM2_3_Handler ( void );
  458. void SERCOM3_0_Handler ( void );
  459. void SERCOM3_1_Handler ( void );
  460. void SERCOM3_2_Handler ( void );
  461. void SERCOM3_3_Handler ( void );
  462. void SERCOM4_0_Handler ( void );
  463. void SERCOM4_1_Handler ( void );
  464. void SERCOM4_2_Handler ( void );
  465. void SERCOM4_3_Handler ( void );
  466. void SERCOM5_0_Handler ( void );
  467. void SERCOM5_1_Handler ( void );
  468. void SERCOM5_2_Handler ( void );
  469. void SERCOM5_3_Handler ( void );
  470. void SERCOM6_0_Handler ( void );
  471. void SERCOM6_1_Handler ( void );
  472. void SERCOM6_2_Handler ( void );
  473. void SERCOM6_3_Handler ( void );
  474. void SERCOM7_0_Handler ( void );
  475. void SERCOM7_1_Handler ( void );
  476. void SERCOM7_2_Handler ( void );
  477. void SERCOM7_3_Handler ( void );
  478. void CAN0_Handler ( void );
  479. void CAN1_Handler ( void );
  480. void USB_0_Handler ( void );
  481. void USB_1_Handler ( void );
  482. void USB_2_Handler ( void );
  483. void USB_3_Handler ( void );
  484. void GMAC_Handler ( void );
  485. void TCC0_0_Handler ( void );
  486. void TCC0_1_Handler ( void );
  487. void TCC0_2_Handler ( void );
  488. void TCC0_3_Handler ( void );
  489. void TCC0_4_Handler ( void );
  490. void TCC0_5_Handler ( void );
  491. void TCC0_6_Handler ( void );
  492. void TCC1_0_Handler ( void );
  493. void TCC1_1_Handler ( void );
  494. void TCC1_2_Handler ( void );
  495. void TCC1_3_Handler ( void );
  496. void TCC1_4_Handler ( void );
  497. void TCC2_0_Handler ( void );
  498. void TCC2_1_Handler ( void );
  499. void TCC2_2_Handler ( void );
  500. void TCC2_3_Handler ( void );
  501. void TCC3_0_Handler ( void );
  502. void TCC3_1_Handler ( void );
  503. void TCC3_2_Handler ( void );
  504. void TCC4_0_Handler ( void );
  505. void TCC4_1_Handler ( void );
  506. void TCC4_2_Handler ( void );
  507. void TC0_Handler ( void );
  508. void TC1_Handler ( void );
  509. void TC2_Handler ( void );
  510. void TC3_Handler ( void );
  511. void TC4_Handler ( void );
  512. void TC5_Handler ( void );
  513. void TC6_Handler ( void );
  514. void TC7_Handler ( void );
  515. void PDEC_0_Handler ( void );
  516. void PDEC_1_Handler ( void );
  517. void PDEC_2_Handler ( void );
  518. void ADC0_0_Handler ( void );
  519. void ADC0_1_Handler ( void );
  520. void ADC1_0_Handler ( void );
  521. void ADC1_1_Handler ( void );
  522. void AC_Handler ( void );
  523. void DAC_0_Handler ( void );
  524. void DAC_1_Handler ( void );
  525. void DAC_2_Handler ( void );
  526. void DAC_3_Handler ( void );
  527. void DAC_4_Handler ( void );
  528. void I2S_Handler ( void );
  529. void PCC_Handler ( void );
  530. void AES_Handler ( void );
  531. void TRNG_Handler ( void );
  532. void ICM_Handler ( void );
  533. void PUKCC_Handler ( void );
  534. void QSPI_Handler ( void );
  535. void SDHC0_Handler ( void );
  536. void SDHC1_Handler ( void );
  537. /*
  538. * \brief Configuration of the Cortex-M4 Processor and Core Peripherals
  539. */
  540. #define __CM4_REV 1 /*!< Core revision r0p1 */
  541. #define __DEBUG_LVL 3 /*!< Full debug plus DWT data matching */
  542. #define __FPU_PRESENT 1 /*!< FPU present or not */
  543. #define __MPU_PRESENT 1 /*!< MPU present or not */
  544. #define __NVIC_PRIO_BITS 3 /*!< Number of bits used for Priority Levels */
  545. #define __TRACE_LVL 2 /*!< Full trace: ITM, DWT triggers and counters, ETM */
  546. #define __VTOR_PRESENT 1 /*!< VTOR present or not */
  547. #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
  548. /**
  549. * \brief CMSIS includes
  550. */
  551. #include <core_cm4.h>
  552. #if !defined DONT_USE_CMSIS_INIT
  553. #include "system_same54.h"
  554. #endif /* DONT_USE_CMSIS_INIT */
  555. /*@}*/
  556. /* ************************************************************************** */
  557. /** SOFTWARE PERIPHERAL API DEFINITION FOR SAME54P20A */
  558. /* ************************************************************************** */
  559. /** \defgroup SAME54P20A_api Peripheral Software API */
  560. /*@{*/
  561. #include "component/ac.h"
  562. #include "component/adc.h"
  563. #include "component/aes.h"
  564. #include "component/can.h"
  565. #include "component/ccl.h"
  566. #include "component/cmcc.h"
  567. #include "component/dac.h"
  568. #include "component/dmac.h"
  569. #include "component/dsu.h"
  570. #include "component/eic.h"
  571. #include "component/evsys.h"
  572. #include "component/freqm.h"
  573. #include "component/gclk.h"
  574. #include "component/gmac.h"
  575. #include "component/hmatrixb.h"
  576. #include "component/icm.h"
  577. #include "component/i2s.h"
  578. #include "component/mclk.h"
  579. #include "component/nvmctrl.h"
  580. #include "component/oscctrl.h"
  581. #include "component/osc32kctrl.h"
  582. #include "component/pac.h"
  583. #include "component/pcc.h"
  584. #include "component/pdec.h"
  585. #include "component/pm.h"
  586. #include "component/port.h"
  587. #include "component/qspi.h"
  588. #include "component/ramecc.h"
  589. #include "component/rstc.h"
  590. #include "component/rtc.h"
  591. #include "component/sdhc.h"
  592. #include "component/sercom.h"
  593. #include "component/supc.h"
  594. #include "component/tc.h"
  595. #include "component/tcc.h"
  596. #include "component/trng.h"
  597. #include "component/usb.h"
  598. #include "component/wdt.h"
  599. /*@}*/
  600. /* ************************************************************************** */
  601. /** REGISTERS ACCESS DEFINITIONS FOR SAME54P20A */
  602. /* ************************************************************************** */
  603. /** \defgroup SAME54P20A_reg Registers Access Definitions */
  604. /*@{*/
  605. #include "instance/ac.h"
  606. #include "instance/adc0.h"
  607. #include "instance/adc1.h"
  608. #include "instance/aes.h"
  609. #include "instance/can0.h"
  610. #include "instance/can1.h"
  611. #include "instance/ccl.h"
  612. #include "instance/cmcc.h"
  613. #include "instance/dac.h"
  614. #include "instance/dmac.h"
  615. #include "instance/dsu.h"
  616. #include "instance/eic.h"
  617. #include "instance/evsys.h"
  618. #include "instance/freqm.h"
  619. #include "instance/gclk.h"
  620. #include "instance/gmac.h"
  621. #include "instance/hmatrix.h"
  622. #include "instance/icm.h"
  623. #include "instance/i2s.h"
  624. #include "instance/mclk.h"
  625. #include "instance/nvmctrl.h"
  626. #include "instance/oscctrl.h"
  627. #include "instance/osc32kctrl.h"
  628. #include "instance/pac.h"
  629. #include "instance/pcc.h"
  630. #include "instance/pdec.h"
  631. #include "instance/pm.h"
  632. #include "instance/port.h"
  633. #include "instance/pukcc.h"
  634. #include "instance/qspi.h"
  635. #include "instance/ramecc.h"
  636. #include "instance/rstc.h"
  637. #include "instance/rtc.h"
  638. #include "instance/sdhc0.h"
  639. #include "instance/sdhc1.h"
  640. #include "instance/sercom0.h"
  641. #include "instance/sercom1.h"
  642. #include "instance/sercom2.h"
  643. #include "instance/sercom3.h"
  644. #include "instance/sercom4.h"
  645. #include "instance/sercom5.h"
  646. #include "instance/sercom6.h"
  647. #include "instance/sercom7.h"
  648. #include "instance/supc.h"
  649. #include "instance/tc0.h"
  650. #include "instance/tc1.h"
  651. #include "instance/tc2.h"
  652. #include "instance/tc3.h"
  653. #include "instance/tc4.h"
  654. #include "instance/tc5.h"
  655. #include "instance/tc6.h"
  656. #include "instance/tc7.h"
  657. #include "instance/tcc0.h"
  658. #include "instance/tcc1.h"
  659. #include "instance/tcc2.h"
  660. #include "instance/tcc3.h"
  661. #include "instance/tcc4.h"
  662. #include "instance/trng.h"
  663. #include "instance/usb.h"
  664. #include "instance/wdt.h"
  665. /*@}*/
  666. /* ************************************************************************** */
  667. /** PERIPHERAL ID DEFINITIONS FOR SAME54P20A */
  668. /* ************************************************************************** */
  669. /** \defgroup SAME54P20A_id Peripheral Ids Definitions */
  670. /*@{*/
  671. // Peripheral instances on HPB0 bridge
  672. #define ID_PAC 0 /**< \brief Peripheral Access Controller (PAC) */
  673. #define ID_PM 1 /**< \brief Power Manager (PM) */
  674. #define ID_MCLK 2 /**< \brief Main Clock (MCLK) */
  675. #define ID_RSTC 3 /**< \brief Reset Controller (RSTC) */
  676. #define ID_OSCCTRL 4 /**< \brief Oscillators Control (OSCCTRL) */
  677. #define ID_OSC32KCTRL 5 /**< \brief 32kHz Oscillators Control (OSC32KCTRL) */
  678. #define ID_SUPC 6 /**< \brief Supply Controller (SUPC) */
  679. #define ID_GCLK 7 /**< \brief Generic Clock Generator (GCLK) */
  680. #define ID_WDT 8 /**< \brief Watchdog Timer (WDT) */
  681. #define ID_RTC 9 /**< \brief Real-Time Counter (RTC) */
  682. #define ID_EIC 10 /**< \brief External Interrupt Controller (EIC) */
  683. #define ID_FREQM 11 /**< \brief Frequency Meter (FREQM) */
  684. #define ID_SERCOM0 12 /**< \brief Serial Communication Interface 0 (SERCOM0) */
  685. #define ID_SERCOM1 13 /**< \brief Serial Communication Interface 1 (SERCOM1) */
  686. #define ID_TC0 14 /**< \brief Basic Timer Counter 0 (TC0) */
  687. #define ID_TC1 15 /**< \brief Basic Timer Counter 1 (TC1) */
  688. // Peripheral instances on HPB1 bridge
  689. #define ID_USB 32 /**< \brief Universal Serial Bus (USB) */
  690. #define ID_DSU 33 /**< \brief Device Service Unit (DSU) */
  691. #define ID_NVMCTRL 34 /**< \brief Non-Volatile Memory Controller (NVMCTRL) */
  692. #define ID_CMCC 35 /**< \brief Cortex M Cache Controller (CMCC) */
  693. #define ID_PORT 36 /**< \brief Port Module (PORT) */
  694. #define ID_DMAC 37 /**< \brief Direct Memory Access Controller (DMAC) */
  695. #define ID_HMATRIX 38 /**< \brief HSB Matrix (HMATRIX) */
  696. #define ID_EVSYS 39 /**< \brief Event System Interface (EVSYS) */
  697. #define ID_SERCOM2 41 /**< \brief Serial Communication Interface 2 (SERCOM2) */
  698. #define ID_SERCOM3 42 /**< \brief Serial Communication Interface 3 (SERCOM3) */
  699. #define ID_TCC0 43 /**< \brief Timer Counter Control 0 (TCC0) */
  700. #define ID_TCC1 44 /**< \brief Timer Counter Control 1 (TCC1) */
  701. #define ID_TC2 45 /**< \brief Basic Timer Counter 2 (TC2) */
  702. #define ID_TC3 46 /**< \brief Basic Timer Counter 3 (TC3) */
  703. #define ID_RAMECC 48 /**< \brief RAM ECC (RAMECC) */
  704. // Peripheral instances on HPB2 bridge
  705. #define ID_CAN0 64 /**< \brief Control Area Network 0 (CAN0) */
  706. #define ID_CAN1 65 /**< \brief Control Area Network 1 (CAN1) */
  707. #define ID_GMAC 66 /**< \brief Ethernet MAC (GMAC) */
  708. #define ID_TCC2 67 /**< \brief Timer Counter Control 2 (TCC2) */
  709. #define ID_TCC3 68 /**< \brief Timer Counter Control 3 (TCC3) */
  710. #define ID_TC4 69 /**< \brief Basic Timer Counter 4 (TC4) */
  711. #define ID_TC5 70 /**< \brief Basic Timer Counter 5 (TC5) */
  712. #define ID_PDEC 71 /**< \brief Quadrature Decodeur (PDEC) */
  713. #define ID_AC 72 /**< \brief Analog Comparators (AC) */
  714. #define ID_AES 73 /**< \brief Advanced Encryption Standard (AES) */
  715. #define ID_TRNG 74 /**< \brief True Random Generator (TRNG) */
  716. #define ID_ICM 75 /**< \brief Integrity Check Monitor (ICM) */
  717. #define ID_PUKCC 76 /**< \brief PUblic-Key Cryptography Controller (PUKCC) */
  718. #define ID_QSPI 77 /**< \brief Quad SPI interface (QSPI) */
  719. #define ID_CCL 78 /**< \brief Configurable Custom Logic (CCL) */
  720. // Peripheral instances on HPB3 bridge
  721. #define ID_SERCOM4 96 /**< \brief Serial Communication Interface 4 (SERCOM4) */
  722. #define ID_SERCOM5 97 /**< \brief Serial Communication Interface 5 (SERCOM5) */
  723. #define ID_SERCOM6 98 /**< \brief Serial Communication Interface 6 (SERCOM6) */
  724. #define ID_SERCOM7 99 /**< \brief Serial Communication Interface 7 (SERCOM7) */
  725. #define ID_TCC4 100 /**< \brief Timer Counter Control 4 (TCC4) */
  726. #define ID_TC6 101 /**< \brief Basic Timer Counter 6 (TC6) */
  727. #define ID_TC7 102 /**< \brief Basic Timer Counter 7 (TC7) */
  728. #define ID_ADC0 103 /**< \brief Analog Digital Converter 0 (ADC0) */
  729. #define ID_ADC1 104 /**< \brief Analog Digital Converter 1 (ADC1) */
  730. #define ID_DAC 105 /**< \brief Digital-to-Analog Converter (DAC) */
  731. #define ID_I2S 106 /**< \brief Inter-IC Sound Interface (I2S) */
  732. #define ID_PCC 107 /**< \brief Parallel Capture Controller (PCC) */
  733. // Peripheral instances on AHB (as if on bridge 4)
  734. #define ID_SDHC0 128 /**< \brief SD/MMC Host Controller (SDHC0) */
  735. #define ID_SDHC1 129 /**< \brief SD/MMC Host Controller (SDHC1) */
  736. #define ID_PERIPH_COUNT 130 /**< \brief Max number of peripheral IDs */
  737. /*@}*/
  738. /* ************************************************************************** */
  739. /** BASE ADDRESS DEFINITIONS FOR SAME54P20A */
  740. /* ************************************************************************** */
  741. /** \defgroup SAME54P20A_base Peripheral Base Address Definitions */
  742. /*@{*/
  743. #if defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)
  744. #define AC (0x42002000) /**< \brief (AC) APB Base Address */
  745. #define ADC0 (0x43001C00) /**< \brief (ADC0) APB Base Address */
  746. #define ADC1 (0x43002000) /**< \brief (ADC1) APB Base Address */
  747. #define AES (0x42002400) /**< \brief (AES) APB Base Address */
  748. #define CAN0 (0x42000000) /**< \brief (CAN0) APB Base Address */
  749. #define CAN1 (0x42000400) /**< \brief (CAN1) APB Base Address */
  750. #define CCL (0x42003800) /**< \brief (CCL) APB Base Address */
  751. #define CMCC (0x41006000) /**< \brief (CMCC) APB Base Address */
  752. #define CMCC_AHB (0x03000000) /**< \brief (CMCC) AHB Base Address */
  753. #define DAC (0x43002400) /**< \brief (DAC) APB Base Address */
  754. #define DMAC (0x4100A000) /**< \brief (DMAC) APB Base Address */
  755. #define DSU (0x41002000) /**< \brief (DSU) APB Base Address */
  756. #define EIC (0x40002800) /**< \brief (EIC) APB Base Address */
  757. #define EVSYS (0x4100E000) /**< \brief (EVSYS) APB Base Address */
  758. #define FREQM (0x40002C00) /**< \brief (FREQM) APB Base Address */
  759. #define GCLK (0x40001C00) /**< \brief (GCLK) APB Base Address */
  760. #define GMAC (0x42000800) /**< \brief (GMAC) APB Base Address */
  761. #define HMATRIX (0x4100C000) /**< \brief (HMATRIX) APB Base Address */
  762. #define ICM (0x42002C00) /**< \brief (ICM) APB Base Address */
  763. #define I2S (0x43002800) /**< \brief (I2S) APB Base Address */
  764. #define MCLK (0x40000800) /**< \brief (MCLK) APB Base Address */
  765. #define NVMCTRL (0x41004000) /**< \brief (NVMCTRL) APB Base Address */
  766. #define NVMCTRL_SW0 (0x00800080) /**< \brief (NVMCTRL) SW0 Base Address */
  767. #define NVMCTRL_TEMP_LOG (0x00800100) /**< \brief (NVMCTRL) TEMP_LOG Base Address */
  768. #define NVMCTRL_USER (0x00804000) /**< \brief (NVMCTRL) USER Base Address */
  769. #define OSCCTRL (0x40001000) /**< \brief (OSCCTRL) APB Base Address */
  770. #define OSC32KCTRL (0x40001400) /**< \brief (OSC32KCTRL) APB Base Address */
  771. #define PAC (0x40000000) /**< \brief (PAC) APB Base Address */
  772. #define PCC (0x43002C00) /**< \brief (PCC) APB Base Address */
  773. #define PDEC (0x42001C00) /**< \brief (PDEC) APB Base Address */
  774. #define PM (0x40000400) /**< \brief (PM) APB Base Address */
  775. #define PORT (0x41008000) /**< \brief (PORT) APB Base Address */
  776. #define PUKCC (0x42003000) /**< \brief (PUKCC) APB Base Address */
  777. #define PUKCC_AHB (0x02000000) /**< \brief (PUKCC) AHB Base Address */
  778. #define QSPI (0x42003400) /**< \brief (QSPI) APB Base Address */
  779. #define QSPI_AHB (0x04000000) /**< \brief (QSPI) AHB Base Address */
  780. #define RAMECC (0x41020000) /**< \brief (RAMECC) APB Base Address */
  781. #define RSTC (0x40000C00) /**< \brief (RSTC) APB Base Address */
  782. #define RTC (0x40002400) /**< \brief (RTC) APB Base Address */
  783. #define SDHC0 (0x45000000) /**< \brief (SDHC0) AHB Base Address */
  784. #define SDHC1 (0x46000000) /**< \brief (SDHC1) AHB Base Address */
  785. #define SERCOM0 (0x40003000) /**< \brief (SERCOM0) APB Base Address */
  786. #define SERCOM1 (0x40003400) /**< \brief (SERCOM1) APB Base Address */
  787. #define SERCOM2 (0x41012000) /**< \brief (SERCOM2) APB Base Address */
  788. #define SERCOM3 (0x41014000) /**< \brief (SERCOM3) APB Base Address */
  789. #define SERCOM4 (0x43000000) /**< \brief (SERCOM4) APB Base Address */
  790. #define SERCOM5 (0x43000400) /**< \brief (SERCOM5) APB Base Address */
  791. #define SERCOM6 (0x43000800) /**< \brief (SERCOM6) APB Base Address */
  792. #define SERCOM7 (0x43000C00) /**< \brief (SERCOM7) APB Base Address */
  793. #define SUPC (0x40001800) /**< \brief (SUPC) APB Base Address */
  794. #define TC0 (0x40003800) /**< \brief (TC0) APB Base Address */
  795. #define TC1 (0x40003C00) /**< \brief (TC1) APB Base Address */
  796. #define TC2 (0x4101A000) /**< \brief (TC2) APB Base Address */
  797. #define TC3 (0x4101C000) /**< \brief (TC3) APB Base Address */
  798. #define TC4 (0x42001400) /**< \brief (TC4) APB Base Address */
  799. #define TC5 (0x42001800) /**< \brief (TC5) APB Base Address */
  800. #define TC6 (0x43001400) /**< \brief (TC6) APB Base Address */
  801. #define TC7 (0x43001800) /**< \brief (TC7) APB Base Address */
  802. #define TCC0 (0x41016000) /**< \brief (TCC0) APB Base Address */
  803. #define TCC1 (0x41018000) /**< \brief (TCC1) APB Base Address */
  804. #define TCC2 (0x42000C00) /**< \brief (TCC2) APB Base Address */
  805. #define TCC3 (0x42001000) /**< \brief (TCC3) APB Base Address */
  806. #define TCC4 (0x43001000) /**< \brief (TCC4) APB Base Address */
  807. #define TRNG (0x42002800) /**< \brief (TRNG) APB Base Address */
  808. #define USB (0x41000000) /**< \brief (USB) APB Base Address */
  809. #define WDT (0x40002000) /**< \brief (WDT) APB Base Address */
  810. #else
  811. #define AC ((Ac *)0x42002000UL) /**< \brief (AC) APB Base Address */
  812. #define AC_INST_NUM 1 /**< \brief (AC) Number of instances */
  813. #define AC_INSTS { AC } /**< \brief (AC) Instances List */
  814. #define ADC0 ((Adc *)0x43001C00UL) /**< \brief (ADC0) APB Base Address */
  815. #define ADC1 ((Adc *)0x43002000UL) /**< \brief (ADC1) APB Base Address */
  816. #define ADC_INST_NUM 2 /**< \brief (ADC) Number of instances */
  817. #define ADC_INSTS { ADC0, ADC1 } /**< \brief (ADC) Instances List */
  818. #define AES ((Aes *)0x42002400UL) /**< \brief (AES) APB Base Address */
  819. #define AES_INST_NUM 1 /**< \brief (AES) Number of instances */
  820. #define AES_INSTS { AES } /**< \brief (AES) Instances List */
  821. #define CAN0 ((Can *)0x42000000UL) /**< \brief (CAN0) APB Base Address */
  822. #define CAN1 ((Can *)0x42000400UL) /**< \brief (CAN1) APB Base Address */
  823. #define CAN_INST_NUM 2 /**< \brief (CAN) Number of instances */
  824. #define CAN_INSTS { CAN0, CAN1 } /**< \brief (CAN) Instances List */
  825. #define CCL ((Ccl *)0x42003800UL) /**< \brief (CCL) APB Base Address */
  826. #define CCL_INST_NUM 1 /**< \brief (CCL) Number of instances */
  827. #define CCL_INSTS { CCL } /**< \brief (CCL) Instances List */
  828. #define CMCC ((Cmcc *)0x41006000UL) /**< \brief (CMCC) APB Base Address */
  829. #define CMCC_AHB (0x03000000UL) /**< \brief (CMCC) AHB Base Address */
  830. #define CMCC_INST_NUM 1 /**< \brief (CMCC) Number of instances */
  831. #define CMCC_INSTS { CMCC } /**< \brief (CMCC) Instances List */
  832. #define DAC ((Dac *)0x43002400UL) /**< \brief (DAC) APB Base Address */
  833. #define DAC_INST_NUM 1 /**< \brief (DAC) Number of instances */
  834. #define DAC_INSTS { DAC } /**< \brief (DAC) Instances List */
  835. #define DMAC ((Dmac *)0x4100A000UL) /**< \brief (DMAC) APB Base Address */
  836. #define DMAC_INST_NUM 1 /**< \brief (DMAC) Number of instances */
  837. #define DMAC_INSTS { DMAC } /**< \brief (DMAC) Instances List */
  838. #define DSU ((Dsu *)0x41002000UL) /**< \brief (DSU) APB Base Address */
  839. #define DSU_INST_NUM 1 /**< \brief (DSU) Number of instances */
  840. #define DSU_INSTS { DSU } /**< \brief (DSU) Instances List */
  841. #define EIC ((Eic *)0x40002800UL) /**< \brief (EIC) APB Base Address */
  842. #define EIC_INST_NUM 1 /**< \brief (EIC) Number of instances */
  843. #define EIC_INSTS { EIC } /**< \brief (EIC) Instances List */
  844. #define EVSYS ((Evsys *)0x4100E000UL) /**< \brief (EVSYS) APB Base Address */
  845. #define EVSYS_INST_NUM 1 /**< \brief (EVSYS) Number of instances */
  846. #define EVSYS_INSTS { EVSYS } /**< \brief (EVSYS) Instances List */
  847. #define FREQM ((Freqm *)0x40002C00UL) /**< \brief (FREQM) APB Base Address */
  848. #define FREQM_INST_NUM 1 /**< \brief (FREQM) Number of instances */
  849. #define FREQM_INSTS { FREQM } /**< \brief (FREQM) Instances List */
  850. #define GCLK ((Gclk *)0x40001C00UL) /**< \brief (GCLK) APB Base Address */
  851. #define GCLK_INST_NUM 1 /**< \brief (GCLK) Number of instances */
  852. #define GCLK_INSTS { GCLK } /**< \brief (GCLK) Instances List */
  853. #define GMAC ((Gmac *)0x42000800UL) /**< \brief (GMAC) APB Base Address */
  854. #define GMAC_INST_NUM 1 /**< \brief (GMAC) Number of instances */
  855. #define GMAC_INSTS { GMAC } /**< \brief (GMAC) Instances List */
  856. #define HMATRIX ((Hmatrixb *)0x4100C000UL) /**< \brief (HMATRIX) APB Base Address */
  857. #define HMATRIXB_INST_NUM 1 /**< \brief (HMATRIXB) Number of instances */
  858. #define HMATRIXB_INSTS { HMATRIX } /**< \brief (HMATRIXB) Instances List */
  859. #define ICM ((Icm *)0x42002C00UL) /**< \brief (ICM) APB Base Address */
  860. #define ICM_INST_NUM 1 /**< \brief (ICM) Number of instances */
  861. #define ICM_INSTS { ICM } /**< \brief (ICM) Instances List */
  862. #define I2S ((I2s *)0x43002800UL) /**< \brief (I2S) APB Base Address */
  863. #define I2S_INST_NUM 1 /**< \brief (I2S) Number of instances */
  864. #define I2S_INSTS { I2S } /**< \brief (I2S) Instances List */
  865. #define MCLK ((Mclk *)0x40000800UL) /**< \brief (MCLK) APB Base Address */
  866. #define MCLK_INST_NUM 1 /**< \brief (MCLK) Number of instances */
  867. #define MCLK_INSTS { MCLK } /**< \brief (MCLK) Instances List */
  868. #define NVMCTRL ((Nvmctrl *)0x41004000UL) /**< \brief (NVMCTRL) APB Base Address */
  869. #define NVMCTRL_SW0 (0x00800080UL) /**< \brief (NVMCTRL) SW0 Base Address */
  870. #define NVMCTRL_TEMP_LOG (0x00800100UL) /**< \brief (NVMCTRL) TEMP_LOG Base Address */
  871. #define NVMCTRL_USER (0x00804000UL) /**< \brief (NVMCTRL) USER Base Address */
  872. #define NVMCTRL_INST_NUM 1 /**< \brief (NVMCTRL) Number of instances */
  873. #define NVMCTRL_INSTS { NVMCTRL } /**< \brief (NVMCTRL) Instances List */
  874. #define OSCCTRL ((Oscctrl *)0x40001000UL) /**< \brief (OSCCTRL) APB Base Address */
  875. #define OSCCTRL_INST_NUM 1 /**< \brief (OSCCTRL) Number of instances */
  876. #define OSCCTRL_INSTS { OSCCTRL } /**< \brief (OSCCTRL) Instances List */
  877. #define OSC32KCTRL ((Osc32kctrl *)0x40001400UL) /**< \brief (OSC32KCTRL) APB Base Address */
  878. #define OSC32KCTRL_INST_NUM 1 /**< \brief (OSC32KCTRL) Number of instances */
  879. #define OSC32KCTRL_INSTS { OSC32KCTRL } /**< \brief (OSC32KCTRL) Instances List */
  880. #define PAC ((Pac *)0x40000000UL) /**< \brief (PAC) APB Base Address */
  881. #define PAC_INST_NUM 1 /**< \brief (PAC) Number of instances */
  882. #define PAC_INSTS { PAC } /**< \brief (PAC) Instances List */
  883. #define PCC ((Pcc *)0x43002C00UL) /**< \brief (PCC) APB Base Address */
  884. #define PCC_INST_NUM 1 /**< \brief (PCC) Number of instances */
  885. #define PCC_INSTS { PCC } /**< \brief (PCC) Instances List */
  886. #define PDEC ((Pdec *)0x42001C00UL) /**< \brief (PDEC) APB Base Address */
  887. #define PDEC_INST_NUM 1 /**< \brief (PDEC) Number of instances */
  888. #define PDEC_INSTS { PDEC } /**< \brief (PDEC) Instances List */
  889. #define PM ((Pm *)0x40000400UL) /**< \brief (PM) APB Base Address */
  890. #define PM_INST_NUM 1 /**< \brief (PM) Number of instances */
  891. #define PM_INSTS { PM } /**< \brief (PM) Instances List */
  892. #define PORT ((Port *)0x41008000UL) /**< \brief (PORT) APB Base Address */
  893. #define PORT_INST_NUM 1 /**< \brief (PORT) Number of instances */
  894. #define PORT_INSTS { PORT } /**< \brief (PORT) Instances List */
  895. #define PUKCC ((void *)0x42003000UL) /**< \brief (PUKCC) APB Base Address */
  896. #define PUKCC_AHB ((void *)0x02000000UL) /**< \brief (PUKCC) AHB Base Address */
  897. #define PUKCC_INST_NUM 1 /**< \brief (PUKCC) Number of instances */
  898. #define PUKCC_INSTS { PUKCC } /**< \brief (PUKCC) Instances List */
  899. #define QSPI ((Qspi *)0x42003400UL) /**< \brief (QSPI) APB Base Address */
  900. #define QSPI_AHB (0x04000000UL) /**< \brief (QSPI) AHB Base Address */
  901. #define QSPI_INST_NUM 1 /**< \brief (QSPI) Number of instances */
  902. #define QSPI_INSTS { QSPI } /**< \brief (QSPI) Instances List */
  903. #define RAMECC ((Ramecc *)0x41020000UL) /**< \brief (RAMECC) APB Base Address */
  904. #define RAMECC_INST_NUM 1 /**< \brief (RAMECC) Number of instances */
  905. #define RAMECC_INSTS { RAMECC } /**< \brief (RAMECC) Instances List */
  906. #define RSTC ((Rstc *)0x40000C00UL) /**< \brief (RSTC) APB Base Address */
  907. #define RSTC_INST_NUM 1 /**< \brief (RSTC) Number of instances */
  908. #define RSTC_INSTS { RSTC } /**< \brief (RSTC) Instances List */
  909. #define RTC ((Rtc *)0x40002400UL) /**< \brief (RTC) APB Base Address */
  910. #define RTC_INST_NUM 1 /**< \brief (RTC) Number of instances */
  911. #define RTC_INSTS { RTC } /**< \brief (RTC) Instances List */
  912. #define SDHC0 ((Sdhc *)0x45000000UL) /**< \brief (SDHC0) AHB Base Address */
  913. #define SDHC1 ((Sdhc *)0x46000000UL) /**< \brief (SDHC1) AHB Base Address */
  914. #define SDHC_INST_NUM 2 /**< \brief (SDHC) Number of instances */
  915. #define SDHC_INSTS { SDHC0, SDHC1 } /**< \brief (SDHC) Instances List */
  916. #define SERCOM0 ((Sercom *)0x40003000UL) /**< \brief (SERCOM0) APB Base Address */
  917. #define SERCOM1 ((Sercom *)0x40003400UL) /**< \brief (SERCOM1) APB Base Address */
  918. #define SERCOM2 ((Sercom *)0x41012000UL) /**< \brief (SERCOM2) APB Base Address */
  919. #define SERCOM3 ((Sercom *)0x41014000UL) /**< \brief (SERCOM3) APB Base Address */
  920. #define SERCOM4 ((Sercom *)0x43000000UL) /**< \brief (SERCOM4) APB Base Address */
  921. #define SERCOM5 ((Sercom *)0x43000400UL) /**< \brief (SERCOM5) APB Base Address */
  922. #define SERCOM6 ((Sercom *)0x43000800UL) /**< \brief (SERCOM6) APB Base Address */
  923. #define SERCOM7 ((Sercom *)0x43000C00UL) /**< \brief (SERCOM7) APB Base Address */
  924. #define SERCOM_INST_NUM 8 /**< \brief (SERCOM) Number of instances */
  925. #define SERCOM_INSTS { SERCOM0, SERCOM1, SERCOM2, SERCOM3, SERCOM4, SERCOM5, SERCOM6, SERCOM7 } /**< \brief (SERCOM) Instances List */
  926. #define SUPC ((Supc *)0x40001800UL) /**< \brief (SUPC) APB Base Address */
  927. #define SUPC_INST_NUM 1 /**< \brief (SUPC) Number of instances */
  928. #define SUPC_INSTS { SUPC } /**< \brief (SUPC) Instances List */
  929. #define TC0 ((Tc *)0x40003800UL) /**< \brief (TC0) APB Base Address */
  930. #define TC1 ((Tc *)0x40003C00UL) /**< \brief (TC1) APB Base Address */
  931. #define TC2 ((Tc *)0x4101A000UL) /**< \brief (TC2) APB Base Address */
  932. #define TC3 ((Tc *)0x4101C000UL) /**< \brief (TC3) APB Base Address */
  933. #define TC4 ((Tc *)0x42001400UL) /**< \brief (TC4) APB Base Address */
  934. #define TC5 ((Tc *)0x42001800UL) /**< \brief (TC5) APB Base Address */
  935. #define TC6 ((Tc *)0x43001400UL) /**< \brief (TC6) APB Base Address */
  936. #define TC7 ((Tc *)0x43001800UL) /**< \brief (TC7) APB Base Address */
  937. #define TC_INST_NUM 8 /**< \brief (TC) Number of instances */
  938. #define TC_INSTS { TC0, TC1, TC2, TC3, TC4, TC5, TC6, TC7 } /**< \brief (TC) Instances List */
  939. #define TCC0 ((Tcc *)0x41016000UL) /**< \brief (TCC0) APB Base Address */
  940. #define TCC1 ((Tcc *)0x41018000UL) /**< \brief (TCC1) APB Base Address */
  941. #define TCC2 ((Tcc *)0x42000C00UL) /**< \brief (TCC2) APB Base Address */
  942. #define TCC3 ((Tcc *)0x42001000UL) /**< \brief (TCC3) APB Base Address */
  943. #define TCC4 ((Tcc *)0x43001000UL) /**< \brief (TCC4) APB Base Address */
  944. #define TCC_INST_NUM 5 /**< \brief (TCC) Number of instances */
  945. #define TCC_INSTS { TCC0, TCC1, TCC2, TCC3, TCC4 } /**< \brief (TCC) Instances List */
  946. #define TRNG ((Trng *)0x42002800UL) /**< \brief (TRNG) APB Base Address */
  947. #define TRNG_INST_NUM 1 /**< \brief (TRNG) Number of instances */
  948. #define TRNG_INSTS { TRNG } /**< \brief (TRNG) Instances List */
  949. #define USB ((Usb *)0x41000000UL) /**< \brief (USB) APB Base Address */
  950. #define USB_INST_NUM 1 /**< \brief (USB) Number of instances */
  951. #define USB_INSTS { USB } /**< \brief (USB) Instances List */
  952. #define WDT ((Wdt *)0x40002000UL) /**< \brief (WDT) APB Base Address */
  953. #define WDT_INST_NUM 1 /**< \brief (WDT) Number of instances */
  954. #define WDT_INSTS { WDT } /**< \brief (WDT) Instances List */
  955. #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  956. /*@}*/
  957. /* ************************************************************************** */
  958. /** PORT DEFINITIONS FOR SAME54P20A */
  959. /* ************************************************************************** */
  960. /** \defgroup SAME54P20A_port PORT Definitions */
  961. /*@{*/
  962. #include "pio/same54p20a.h"
  963. /*@}*/
  964. /* ************************************************************************** */
  965. /** MEMORY MAPPING DEFINITIONS FOR SAME54P20A */
  966. /* ************************************************************************** */
  967. #define HSRAM_SIZE _UL_(0x00040000) /* 256 kB */
  968. #define FLASH_SIZE _UL_(0x00100000) /* 1024 kB */
  969. #define FLASH_PAGE_SIZE 512
  970. #define FLASH_NB_OF_PAGES 2048
  971. #define FLASH_USER_PAGE_SIZE 512
  972. #define BKUPRAM_SIZE _UL_(0x00002000) /* 8 kB */
  973. #define QSPI_SIZE _UL_(0x01000000) /* 16384 kB */
  974. #define FLASH_ADDR _UL_(0x00000000) /**< FLASH base address */
  975. #define CMCC_DATARAM_ADDR _UL_(0x03000000) /**< CMCC_DATARAM base address */
  976. #define CMCC_DATARAM_SIZE _UL_(0x00001000) /**< CMCC_DATARAM size */
  977. #define CMCC_TAGRAM_ADDR _UL_(0x03001000) /**< CMCC_TAGRAM base address */
  978. #define CMCC_TAGRAM_SIZE _UL_(0x00000400) /**< CMCC_TAGRAM size */
  979. #define CMCC_VALIDRAM_ADDR _UL_(0x03002000) /**< CMCC_VALIDRAM base address */
  980. #define CMCC_VALIDRAM_SIZE _UL_(0x00000040) /**< CMCC_VALIDRAM size */
  981. #define HSRAM_ADDR _UL_(0x20000000) /**< HSRAM base address */
  982. #define HSRAM_ETB_ADDR _UL_(0x20000000) /**< HSRAM_ETB base address */
  983. #define HSRAM_ETB_SIZE _UL_(0x00008000) /**< HSRAM_ETB size */
  984. #define HSRAM_RET1_ADDR _UL_(0x20000000) /**< HSRAM_RET1 base address */
  985. #define HSRAM_RET1_SIZE _UL_(0x00008000) /**< HSRAM_RET1 size */
  986. #define HPB0_ADDR _UL_(0x40000000) /**< HPB0 base address */
  987. #define HPB1_ADDR _UL_(0x41000000) /**< HPB1 base address */
  988. #define HPB2_ADDR _UL_(0x42000000) /**< HPB2 base address */
  989. #define HPB3_ADDR _UL_(0x43000000) /**< HPB3 base address */
  990. #define SEEPROM_ADDR _UL_(0x44000000) /**< SEEPROM base address */
  991. #define BKUPRAM_ADDR _UL_(0x47000000) /**< BKUPRAM base address */
  992. #define PPB_ADDR _UL_(0xE0000000) /**< PPB base address */
  993. #define DSU_DID_RESETVALUE _UL_(0x61840300)
  994. #define ADC0_TOUCH_LINES_NUM 32
  995. #define PORT_GROUPS 4
  996. /* ************************************************************************** */
  997. /** ELECTRICAL DEFINITIONS FOR SAME54P20A */
  998. /* ************************************************************************** */
  999. #ifdef __cplusplus
  1000. }
  1001. #endif
  1002. /*@}*/
  1003. #endif /* SAME54P20A_H */