F2837xD_dma.h 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. //###########################################################################
  2. //
  3. // FILE: F2837xD_dma.h
  4. //
  5. // TITLE: DMA Register Definitions.
  6. //
  7. //###########################################################################
  8. // $TI Release: F2837xD Support Library v3.05.00.00 $
  9. // $Release Date: Tue Jun 26 03:15:23 CDT 2018 $
  10. // $Copyright:
  11. // Copyright (C) 2013-2018 Texas Instruments Incorporated - http://www.ti.com/
  12. //
  13. // Redistribution and use in source and binary forms, with or without
  14. // modification, are permitted provided that the following conditions
  15. // are met:
  16. //
  17. // Redistributions of source code must retain the above copyright
  18. // notice, this list of conditions and the following disclaimer.
  19. //
  20. // Redistributions in binary form must reproduce the above copyright
  21. // notice, this list of conditions and the following disclaimer in the
  22. // documentation and/or other materials provided with the
  23. // distribution.
  24. //
  25. // Neither the name of Texas Instruments Incorporated nor the names of
  26. // its contributors may be used to endorse or promote products derived
  27. // from this software without specific prior written permission.
  28. //
  29. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  30. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  31. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  32. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  33. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  34. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  35. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  36. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  37. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  38. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  39. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  40. // $
  41. //###########################################################################
  42. #ifndef __F2837xD_DMA_H__
  43. #define __F2837xD_DMA_H__
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47. //---------------------------------------------------------------------------
  48. // DMA Individual Register Bit Definitions:
  49. struct MODE_BITS { // bits description
  50. Uint16 PERINTSEL:5; // 4:0 Peripheral Interrupt and Sync Select
  51. Uint16 rsvd1:2; // 6:5 Reserved
  52. Uint16 OVRINTE:1; // 7 Overflow Interrupt Enable
  53. Uint16 PERINTE:1; // 8 Peripheral Interrupt Enable
  54. Uint16 CHINTMODE:1; // 9 Channel Interrupt Mode
  55. Uint16 ONESHOT:1; // 10 One Shot Mode Bit
  56. Uint16 CONTINUOUS:1; // 11 Continuous Mode Bit
  57. Uint16 rsvd2:2; // 13:12 Reserved
  58. Uint16 DATASIZE:1; // 14 Data Size Mode Bit
  59. Uint16 CHINTE:1; // 15 Channel Interrupt Enable Bit
  60. };
  61. union MODE_REG {
  62. Uint16 all;
  63. struct MODE_BITS bit;
  64. };
  65. struct CONTROL_BITS { // bits description
  66. Uint16 RUN:1; // 0 Run Bit
  67. Uint16 HALT:1; // 1 Halt Bit
  68. Uint16 SOFTRESET:1; // 2 Soft Reset Bit
  69. Uint16 PERINTFRC:1; // 3 Interrupt Force Bit
  70. Uint16 PERINTCLR:1; // 4 Interrupt Clear Bit
  71. Uint16 rsvd2:2; // 6:5 Reserved
  72. Uint16 ERRCLR:1; // 7 Error Clear Bit
  73. Uint16 PERINTFLG:1; // 8 Interrupt Flag Bit
  74. Uint16 SYNCFLG:1; // 9 Sync Flag Bit
  75. Uint16 SYNCERR:1; // 10 Sync Error Flag Bit
  76. Uint16 TRANSFERSTS:1; // 11 Transfer Status Bit
  77. Uint16 BURSTSTS:1; // 12 Burst Status Bit
  78. Uint16 RUNSTS:1; // 13 Run Status Bit
  79. Uint16 OVRFLG:1; // 14 Overflow Flag Bit
  80. Uint16 rsvd1:1; // 15 Reserved
  81. };
  82. union CONTROL_REG {
  83. Uint16 all;
  84. struct CONTROL_BITS bit;
  85. };
  86. struct DMACTRL_BITS { // bits description
  87. Uint16 HARDRESET:1; // 0 Hard Reset Bit
  88. Uint16 PRIORITYRESET:1; // 1 Priority Reset Bit
  89. Uint16 rsvd1:14; // 15:2 Reserved
  90. };
  91. union DMACTRL_REG {
  92. Uint16 all;
  93. struct DMACTRL_BITS bit;
  94. };
  95. struct DEBUGCTRL_BITS { // bits description
  96. Uint16 rsvd1:15; // 14:0 Reserved
  97. Uint16 FREE:1; // 15 Debug Mode Bit
  98. };
  99. union DEBUGCTRL_REG {
  100. Uint16 all;
  101. struct DEBUGCTRL_BITS bit;
  102. };
  103. struct PRIORITYCTRL1_BITS { // bits description
  104. Uint16 CH1PRIORITY:1; // 0 Ch1 Priority Bit
  105. Uint16 rsvd1:15; // 15:1 Reserved
  106. };
  107. union PRIORITYCTRL1_REG {
  108. Uint16 all;
  109. struct PRIORITYCTRL1_BITS bit;
  110. };
  111. struct PRIORITYSTAT_BITS { // bits description
  112. Uint16 ACTIVESTS:3; // 2:0 Active Channel Status Bits
  113. Uint16 rsvd1:1; // 3 Reserved
  114. Uint16 ACTIVESTS_SHADOW:3; // 6:4 Active Channel Status Shadow Bits
  115. Uint16 rsvd2:9; // 15:7 Reserved
  116. };
  117. union PRIORITYSTAT_REG {
  118. Uint16 all;
  119. struct PRIORITYSTAT_BITS bit;
  120. };
  121. struct BURST_SIZE_BITS { // bits description
  122. Uint16 BURSTSIZE:5; // 4:0 Burst Transfer Size
  123. Uint16 rsvd1:11; // 15:5 Reserved
  124. };
  125. union BURST_SIZE_REG {
  126. Uint16 all;
  127. struct BURST_SIZE_BITS bit;
  128. };
  129. struct BURST_COUNT_BITS { // bits description
  130. Uint16 BURSTCOUNT:5; // 4:0 Burst Transfer Count
  131. Uint16 rsvd1:11; // 15:5 Reserved
  132. };
  133. union BURST_COUNT_REG {
  134. Uint16 all;
  135. struct BURST_COUNT_BITS bit;
  136. };
  137. struct CH_REGS {
  138. union MODE_REG MODE; // Mode Register
  139. union CONTROL_REG CONTROL; // Control Register
  140. union BURST_SIZE_REG BURST_SIZE; // Burst Size Register
  141. union BURST_COUNT_REG BURST_COUNT; // Burst Count Register
  142. int16 SRC_BURST_STEP; // Source Burst Step Register
  143. int16 DST_BURST_STEP; // Destination Burst Step Register
  144. Uint16 TRANSFER_SIZE; // Transfer Size Register
  145. Uint16 TRANSFER_COUNT; // Transfer Count Register
  146. int16 SRC_TRANSFER_STEP; // Source Transfer Step Register
  147. int16 DST_TRANSFER_STEP; // Destination Transfer Step Register
  148. Uint16 SRC_WRAP_SIZE; // Source Wrap Size Register
  149. Uint16 SRC_WRAP_COUNT; // Source Wrap Count Register
  150. int16 SRC_WRAP_STEP; // Source Wrap Step Register
  151. Uint16 DST_WRAP_SIZE; // Destination Wrap Size Register
  152. Uint16 DST_WRAP_COUNT; // Destination Wrap Count Register
  153. int16 DST_WRAP_STEP; // Destination Wrap Step Register
  154. Uint32 SRC_BEG_ADDR_SHADOW; // Source Begin Address Shadow Register
  155. Uint32 SRC_ADDR_SHADOW; // Source Address Shadow Register
  156. Uint32 SRC_BEG_ADDR_ACTIVE; // Source Begin Address Active Register
  157. Uint32 SRC_ADDR_ACTIVE; // Source Address Active Register
  158. Uint32 DST_BEG_ADDR_SHADOW; // Destination Begin Address Shadow Register
  159. Uint32 DST_ADDR_SHADOW; // Destination Address Shadow Register
  160. Uint32 DST_BEG_ADDR_ACTIVE; // Destination Begin Address Active Register
  161. Uint32 DST_ADDR_ACTIVE; // Destination Address Active Register
  162. };
  163. struct DMA_REGS {
  164. union DMACTRL_REG DMACTRL; // DMA Control Register
  165. union DEBUGCTRL_REG DEBUGCTRL; // Debug Control Register
  166. Uint16 rsvd0; // Reserved
  167. Uint16 rsvd1; // Reserved
  168. union PRIORITYCTRL1_REG PRIORITYCTRL1; // Priority Control 1 Register
  169. Uint16 rsvd2; // Reserved
  170. union PRIORITYSTAT_REG PRIORITYSTAT; // Priority Status Register
  171. Uint16 rsvd3[25]; // Reserved
  172. struct CH_REGS CH1; // DMA Channel 1 Registers
  173. struct CH_REGS CH2; // DMA Channel 2 Registers
  174. struct CH_REGS CH3; // DMA Channel 3 Registers
  175. struct CH_REGS CH4; // DMA Channel 4 Registers
  176. struct CH_REGS CH5; // DMA Channel 5 Registers
  177. struct CH_REGS CH6; // DMA Channel 6 Registers
  178. };
  179. //---------------------------------------------------------------------------
  180. // DMA External References & Function Declarations:
  181. //
  182. extern volatile struct DMA_REGS DmaRegs;
  183. #ifdef __cplusplus
  184. }
  185. #endif /* extern "C" */
  186. #endif
  187. //===========================================================================
  188. // End of file.
  189. //===========================================================================