dmac.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /**
  2. * \file
  3. *
  4. * \brief Instance description for DMAC
  5. *
  6. * Copyright (c) 2018 Microchip Technology Inc.
  7. *
  8. * \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");
  15. * you may not use this file except in compliance with the License.
  16. * You may obtain a copy of the License 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,
  22. * WITHOUT 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. * \license_stop
  27. *
  28. */
  29. /* file generated from device description version 2018-05-30T11:07:17Z */
  30. #ifndef _SAML11_DMAC_INSTANCE_H_
  31. #define _SAML11_DMAC_INSTANCE_H_
  32. /* ========== Register definition for DMAC peripheral ========== */
  33. #if (defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  34. #define REG_DMAC_CTRL (0x41006000) /**< (DMAC) Control */
  35. #define REG_DMAC_CRCCTRL (0x41006002) /**< (DMAC) CRC Control */
  36. #define REG_DMAC_CRCDATAIN (0x41006004) /**< (DMAC) CRC Data Input */
  37. #define REG_DMAC_CRCCHKSUM (0x41006008) /**< (DMAC) CRC Checksum */
  38. #define REG_DMAC_CRCSTATUS (0x4100600C) /**< (DMAC) CRC Status */
  39. #define REG_DMAC_DBGCTRL (0x4100600D) /**< (DMAC) Debug Control */
  40. #define REG_DMAC_QOSCTRL (0x4100600E) /**< (DMAC) QOS Control */
  41. #define REG_DMAC_SWTRIGCTRL (0x41006010) /**< (DMAC) Software Trigger Control */
  42. #define REG_DMAC_PRICTRL0 (0x41006014) /**< (DMAC) Priority Control 0 */
  43. #define REG_DMAC_INTPEND (0x41006020) /**< (DMAC) Interrupt Pending */
  44. #define REG_DMAC_INTSTATUS (0x41006024) /**< (DMAC) Interrupt Status */
  45. #define REG_DMAC_BUSYCH (0x41006028) /**< (DMAC) Busy Channels */
  46. #define REG_DMAC_PENDCH (0x4100602C) /**< (DMAC) Pending Channels */
  47. #define REG_DMAC_ACTIVE (0x41006030) /**< (DMAC) Active Channel and Levels */
  48. #define REG_DMAC_BASEADDR (0x41006034) /**< (DMAC) Descriptor Memory Section Base Address */
  49. #define REG_DMAC_WRBADDR (0x41006038) /**< (DMAC) Write-Back Memory Section Base Address */
  50. #define REG_DMAC_CHID (0x4100603F) /**< (DMAC) Channel ID */
  51. #define REG_DMAC_CHCTRLA (0x41006040) /**< (DMAC) Channel Control A */
  52. #define REG_DMAC_CHCTRLB (0x41006044) /**< (DMAC) Channel Control B */
  53. #define REG_DMAC_CHINTENCLR (0x4100604C) /**< (DMAC) Channel Interrupt Enable Clear */
  54. #define REG_DMAC_CHINTENSET (0x4100604D) /**< (DMAC) Channel Interrupt Enable Set */
  55. #define REG_DMAC_CHINTFLAG (0x4100604E) /**< (DMAC) Channel Interrupt Flag Status and Clear */
  56. #define REG_DMAC_CHSTATUS (0x4100604F) /**< (DMAC) Channel Status */
  57. #else
  58. #define REG_DMAC_CTRL (*(__IO uint16_t*)0x41006000U) /**< (DMAC) Control */
  59. #define REG_DMAC_CRCCTRL (*(__IO uint16_t*)0x41006002U) /**< (DMAC) CRC Control */
  60. #define REG_DMAC_CRCDATAIN (*(__IO uint32_t*)0x41006004U) /**< (DMAC) CRC Data Input */
  61. #define REG_DMAC_CRCCHKSUM (*(__IO uint32_t*)0x41006008U) /**< (DMAC) CRC Checksum */
  62. #define REG_DMAC_CRCSTATUS (*(__IO uint8_t*)0x4100600CU) /**< (DMAC) CRC Status */
  63. #define REG_DMAC_DBGCTRL (*(__IO uint8_t*)0x4100600DU) /**< (DMAC) Debug Control */
  64. #define REG_DMAC_QOSCTRL (*(__IO uint8_t*)0x4100600EU) /**< (DMAC) QOS Control */
  65. #define REG_DMAC_SWTRIGCTRL (*(__IO uint32_t*)0x41006010U) /**< (DMAC) Software Trigger Control */
  66. #define REG_DMAC_PRICTRL0 (*(__IO uint32_t*)0x41006014U) /**< (DMAC) Priority Control 0 */
  67. #define REG_DMAC_INTPEND (*(__IO uint16_t*)0x41006020U) /**< (DMAC) Interrupt Pending */
  68. #define REG_DMAC_INTSTATUS (*(__I uint32_t*)0x41006024U) /**< (DMAC) Interrupt Status */
  69. #define REG_DMAC_BUSYCH (*(__I uint32_t*)0x41006028U) /**< (DMAC) Busy Channels */
  70. #define REG_DMAC_PENDCH (*(__I uint32_t*)0x4100602CU) /**< (DMAC) Pending Channels */
  71. #define REG_DMAC_ACTIVE (*(__I uint32_t*)0x41006030U) /**< (DMAC) Active Channel and Levels */
  72. #define REG_DMAC_BASEADDR (*(__IO uint32_t*)0x41006034U) /**< (DMAC) Descriptor Memory Section Base Address */
  73. #define REG_DMAC_WRBADDR (*(__IO uint32_t*)0x41006038U) /**< (DMAC) Write-Back Memory Section Base Address */
  74. #define REG_DMAC_CHID (*(__IO uint8_t*)0x4100603FU) /**< (DMAC) Channel ID */
  75. #define REG_DMAC_CHCTRLA (*(__IO uint8_t*)0x41006040U) /**< (DMAC) Channel Control A */
  76. #define REG_DMAC_CHCTRLB (*(__IO uint32_t*)0x41006044U) /**< (DMAC) Channel Control B */
  77. #define REG_DMAC_CHINTENCLR (*(__IO uint8_t*)0x4100604CU) /**< (DMAC) Channel Interrupt Enable Clear */
  78. #define REG_DMAC_CHINTENSET (*(__IO uint8_t*)0x4100604DU) /**< (DMAC) Channel Interrupt Enable Set */
  79. #define REG_DMAC_CHINTFLAG (*(__IO uint8_t*)0x4100604EU) /**< (DMAC) Channel Interrupt Flag Status and Clear */
  80. #define REG_DMAC_CHSTATUS (*(__I uint8_t*)0x4100604FU) /**< (DMAC) Channel Status */
  81. #endif /* (defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  82. /* ========== Instance Parameter definitions for DMAC peripheral ========== */
  83. #define DMAC_CH_BITS 3 /* Number of bits to select channel */
  84. #define DMAC_CH_NUM 8 /* Number of channels */
  85. #define DMAC_EVIN_NUM 4 /* Number of input events */
  86. #define DMAC_EVOUT_NUM 4 /* Number of output events */
  87. #define DMAC_LVL_BITS 2 /* Number of bit to select level priority */
  88. #define DMAC_LVL_NUM 4 /* Enable priority level number */
  89. #define DMAC_QOSCTRL_D_RESETVALUE 2 /* QOS dmac ahb interface reset value */
  90. #define DMAC_QOSCTRL_F_RESETVALUE 2 /* QOS dmac fetch interface reset value */
  91. #define DMAC_QOSCTRL_WRB_RESETVALUE 2 /* QOS dmac write back interface reset value */
  92. #define DMAC_TRIG_BITS 5 /* Number of bits to select trigger source */
  93. #define DMAC_TRIG_NUM 24 /* Number of peripheral triggers */
  94. #define DMAC_INSTANCE_ID 35
  95. #endif /* _SAML11_DMAC_INSTANCE_ */