F2837xD_upp.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. //###########################################################################
  2. //
  3. // FILE: F2837xD_upp.h
  4. //
  5. // TITLE: UPP 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_UPP_H__
  43. #define __F2837xD_UPP_H__
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47. //---------------------------------------------------------------------------
  48. // UPP Individual Register Bit Definitions:
  49. struct PERCTL_BITS { // bits description
  50. Uint16 FREE:1; // 0 Emulation control.
  51. Uint16 SOFT:1; // 1 Emulation control.
  52. Uint16 RTEMU:1; // 2 Realtime emulation control.
  53. Uint16 PEREN:1; // 3 Peripheral Enable
  54. Uint16 SOFTRST:1; // 4 Software Reset
  55. Uint16 rsvd1:2; // 6:5 Reserved
  56. Uint16 DMAST:1; // 7 DMA Burst transaction status
  57. Uint16 rsvd2:8; // 15:8 Reserved
  58. Uint16 rsvd3:16; // 31:16 Reserved
  59. };
  60. union PERCTL_REG {
  61. Uint32 all;
  62. struct PERCTL_BITS bit;
  63. };
  64. struct CHCTL_BITS { // bits description
  65. Uint16 MODE:2; // 1:0 Operating mode
  66. Uint16 rsvd1:1; // 2 Reserved
  67. Uint16 SDRTXILA:1; // 3 SDR TX Interleve mode
  68. Uint16 DEMUXA:1; // 4 DDR de-multiplexing mode
  69. Uint16 rsvd2:11; // 15:5 Reserved
  70. Uint16 DRA:1; // 16 Data rate
  71. Uint16 rsvd3:14; // 30:17 Reserved
  72. Uint16 rsvd4:1; // 31 Reserved
  73. };
  74. union CHCTL_REG {
  75. Uint32 all;
  76. struct CHCTL_BITS bit;
  77. };
  78. struct IFCFG_BITS { // bits description
  79. Uint16 STARTPOLA:1; // 0 Polarity of START(SELECT) signal
  80. Uint16 ENAPOLA:1; // 1 Polarity of ENABLE(WRITE) signal
  81. Uint16 WAITPOLA:1; // 2 Polarity of WAIT signal.
  82. Uint16 STARTA:1; // 3 Enable Usage of START (SELECT) signal
  83. Uint16 ENAA:1; // 4 Enable Usage of ENABLE (WRITE) signal
  84. Uint16 WAITA:1; // 5 Enable Usage of WAIT signal
  85. Uint16 rsvd1:2; // 7:6 Reserved
  86. Uint16 CLKDIVA:4; // 11:8 Clock divider for tx mode
  87. Uint16 CLKINVA:1; // 12 Clock inversion
  88. Uint16 TRISENA:1; // 13 Pin Tri-state Control
  89. Uint16 rsvd2:2; // 15:14 Reserved
  90. Uint16 rsvd3:6; // 21:16 Reserved
  91. Uint16 rsvd4:2; // 23:22 Reserved
  92. Uint16 rsvd5:6; // 29:24 Reserved
  93. Uint16 rsvd6:2; // 31:30 Reserved
  94. };
  95. union IFCFG_REG {
  96. Uint32 all;
  97. struct IFCFG_BITS bit;
  98. };
  99. struct IFIVAL_BITS { // bits description
  100. Uint16 VALA:9; // 8:0 Idle Value
  101. Uint16 rsvd1:7; // 15:9 Reserved
  102. Uint16 rsvd2:16; // 31:16 Reserved
  103. };
  104. union IFIVAL_REG {
  105. Uint32 all;
  106. struct IFIVAL_BITS bit;
  107. };
  108. struct THCFG_BITS { // bits description
  109. Uint16 RDSIZEI:2; // 1:0 DMA Read Threshold for DMA Channel I
  110. Uint16 rsvd1:6; // 7:2 Reserved
  111. Uint16 RDSIZEQ:2; // 9:8 DMA Read Threshold for DMA Channel Q
  112. Uint16 rsvd2:6; // 15:10 Reserved
  113. Uint16 TXSIZEA:2; // 17:16 I/O Transmit Threshold Value
  114. Uint16 rsvd3:6; // 23:18 Reserved
  115. Uint16 rsvd4:2; // 25:24 Reserved
  116. Uint16 rsvd5:6; // 31:26 Reserved
  117. };
  118. union THCFG_REG {
  119. Uint32 all;
  120. struct THCFG_BITS bit;
  121. };
  122. struct RAWINTST_BITS { // bits description
  123. Uint16 DPEI:1; // 0 Interrupt raw status for DMA programming error
  124. Uint16 UOEI:1; // 1 Interrupt raw status for DMA under-run or over-run
  125. Uint16 rsvd1:1; // 2 Reserved
  126. Uint16 EOWI:1; // 3 Interrupt raw status for end-of window condition
  127. Uint16 EOLI:1; // 4 Interrupt raw status for end-of-line condition
  128. Uint16 rsvd2:3; // 7:5 Reserved
  129. Uint16 DPEQ:1; // 8 Interrupt raw status for DMA programming error
  130. Uint16 UOEQ:1; // 9 Interrupt raw status for DMA under-run or over-run
  131. Uint16 rsvd3:1; // 10 Reserved
  132. Uint16 EOWQ:1; // 11 Interrupt raw status for end-of window condition
  133. Uint16 EOLQ:1; // 12 Interrupt raw status for end-of-line condition
  134. Uint16 rsvd4:3; // 15:13 Reserved
  135. Uint16 rsvd5:16; // 31:16 Reserved
  136. };
  137. union RAWINTST_REG {
  138. Uint32 all;
  139. struct RAWINTST_BITS bit;
  140. };
  141. struct ENINTST_BITS { // bits description
  142. Uint16 DPEI:1; // 0 Interrupt enable status for DMA programming error
  143. Uint16 UOEI:1; // 1 Interrupt enable status for DMA under-run or over-run
  144. Uint16 rsvd1:1; // 2 Reserved
  145. Uint16 EOWI:1; // 3 Interrupt enable status for end-of window condition
  146. Uint16 EOLI:1; // 4 Interrupt enable status for end-of-line condition
  147. Uint16 rsvd2:3; // 7:5 Reserved
  148. Uint16 DPEQ:1; // 8 Interrupt enable status for DMA programming error
  149. Uint16 UOEQ:1; // 9 Interrupt enable status for DMA under-run or over-run
  150. Uint16 rsvd3:1; // 10 Reserved
  151. Uint16 EOWQ:1; // 11 Interrupt enable status for end-of window condition
  152. Uint16 EOLQ:1; // 12 Interrupt enable status for end-of-line condition
  153. Uint16 rsvd4:3; // 15:13 Reserved
  154. Uint16 rsvd5:16; // 31:16 Reserved
  155. };
  156. union ENINTST_REG {
  157. Uint32 all;
  158. struct ENINTST_BITS bit;
  159. };
  160. struct INTENSET_BITS { // bits description
  161. Uint16 DPEI:1; // 0 Interrupt enable for DMA programming error
  162. Uint16 UOEI:1; // 1 Interrupt enable for DMA under-run or over-run
  163. Uint16 rsvd1:1; // 2 Reserved
  164. Uint16 EOWI:1; // 3 Interrupt enable for end-of window condition
  165. Uint16 EOLI:1; // 4 Interrupt enable for end-of-line condition
  166. Uint16 rsvd2:3; // 7:5 Reserved
  167. Uint16 DPEQ:1; // 8 Interrupt enable for DMA programming error
  168. Uint16 UOEQ:1; // 9 Interrupt enable for DMA under-run or over-run
  169. Uint16 rsvd3:1; // 10 Reserved
  170. Uint16 EOWQ:1; // 11 Interrupt enable for end-of window condition
  171. Uint16 EOLQ:1; // 12 Interrupt enable for end-of-line condition
  172. Uint16 rsvd4:3; // 15:13 Reserved
  173. Uint16 rsvd5:16; // 31:16 Reserved
  174. };
  175. union INTENSET_REG {
  176. Uint32 all;
  177. struct INTENSET_BITS bit;
  178. };
  179. struct INTENCLR_BITS { // bits description
  180. Uint16 DPEI:1; // 0 Interrupt clear for DMA programming error
  181. Uint16 UOEI:1; // 1 Interrupt clear for DMA under-run or over-run
  182. Uint16 rsvd1:1; // 2 Reserved
  183. Uint16 EOWI:1; // 3 Interrupt clear for end-of window condition
  184. Uint16 EOLI:1; // 4 Interrupt clear for end-of-line condition
  185. Uint16 rsvd2:3; // 7:5 Reserved
  186. Uint16 DPEQ:1; // 8 Interrupt clear for DMA programming error
  187. Uint16 UOEQ:1; // 9 Interrupt clear for DMA under-run or over-run
  188. Uint16 rsvd3:1; // 10 Reserved
  189. Uint16 EOWQ:1; // 11 Interrupt clear for end-of window condition
  190. Uint16 EOLQ:1; // 12 Interrupt clear for end-of-line condition
  191. Uint16 rsvd4:3; // 15:13 Reserved
  192. Uint16 rsvd5:16; // 31:16 Reserved
  193. };
  194. union INTENCLR_REG {
  195. Uint32 all;
  196. struct INTENCLR_BITS bit;
  197. };
  198. struct CHIDESC1_BITS { // bits description
  199. Uint16 BCNT:16; // 15:0 Number of bytes in a line for DMA Channel I transfer.
  200. Uint16 LCNT:16; // 31:16 Number of lines in a window for DMA Channel I transfer.
  201. };
  202. union CHIDESC1_REG {
  203. Uint32 all;
  204. struct CHIDESC1_BITS bit;
  205. };
  206. struct CHIDESC2_BITS { // bits description
  207. Uint16 LOFFSET:16; // 15:0 Current start address to next start address offset.
  208. Uint16 rsvd1:16; // 31:16 Reserved
  209. };
  210. union CHIDESC2_REG {
  211. Uint32 all;
  212. struct CHIDESC2_BITS bit;
  213. };
  214. struct CHIST1_BITS { // bits description
  215. Uint16 BCNT:16; // 15:0 Current byte number.
  216. Uint16 LCNT:16; // 31:16 Current line number.
  217. };
  218. union CHIST1_REG {
  219. Uint32 all;
  220. struct CHIST1_BITS bit;
  221. };
  222. struct CHIST2_BITS { // bits description
  223. Uint16 ACT:1; // 0 Status of DMA descriptor.
  224. Uint16 PEND:1; // 1 Status of DMA.
  225. Uint16 rsvd1:2; // 3:2 Reserved
  226. Uint16 WM:4; // 7:4 Watermark for FIFO block count for DMA Channel I tranfer.
  227. Uint16 rsvd2:8; // 15:8 Reserved
  228. Uint16 rsvd3:16; // 31:16 Reserved
  229. };
  230. union CHIST2_REG {
  231. Uint32 all;
  232. struct CHIST2_BITS bit;
  233. };
  234. struct CHQDESC1_BITS { // bits description
  235. Uint16 BCNT:16; // 15:0 Number of bytes in a line for DMA Channel Q transfer.
  236. Uint16 LCNT:16; // 31:16 Number of lines in a window for DMA Channel Q transfer.
  237. };
  238. union CHQDESC1_REG {
  239. Uint32 all;
  240. struct CHQDESC1_BITS bit;
  241. };
  242. struct CHQDESC2_BITS { // bits description
  243. Uint16 LOFFSET:16; // 15:0 Current start address to next start address offset.
  244. Uint16 rsvd1:16; // 31:16 Reserved
  245. };
  246. union CHQDESC2_REG {
  247. Uint32 all;
  248. struct CHQDESC2_BITS bit;
  249. };
  250. struct CHQST1_BITS { // bits description
  251. Uint16 BCNT:16; // 15:0 Current byte number.
  252. Uint16 LCNT:16; // 31:16 Current line number.
  253. };
  254. union CHQST1_REG {
  255. Uint32 all;
  256. struct CHQST1_BITS bit;
  257. };
  258. struct CHQST2_BITS { // bits description
  259. Uint16 ACT:1; // 0 Status of DMA descriptor.
  260. Uint16 PEND:1; // 1 Status of DMA.
  261. Uint16 rsvd1:2; // 3:2 Reserved
  262. Uint16 WM:4; // 7:4 Watermark for FIFO block count for DMA Channel Q tranfer.
  263. Uint16 rsvd2:8; // 15:8 Reserved
  264. Uint16 rsvd3:16; // 31:16 Reserved
  265. };
  266. union CHQST2_REG {
  267. Uint32 all;
  268. struct CHQST2_BITS bit;
  269. };
  270. struct GINTEN_BITS { // bits description
  271. Uint16 GINTEN:1; // 0 Global Interrupt Enable
  272. Uint16 rsvd1:15; // 15:1 Reserved
  273. Uint16 rsvd2:16; // 31:16 Reserved
  274. };
  275. union GINTEN_REG {
  276. Uint32 all;
  277. struct GINTEN_BITS bit;
  278. };
  279. struct GINTFLG_BITS { // bits description
  280. Uint16 GINTFLG:1; // 0 Global Interrupt Flag
  281. Uint16 rsvd1:15; // 15:1 Reserved
  282. Uint16 rsvd2:16; // 31:16 Reserved
  283. };
  284. union GINTFLG_REG {
  285. Uint32 all;
  286. struct GINTFLG_BITS bit;
  287. };
  288. struct GINTCLR_BITS { // bits description
  289. Uint16 GINTCLR:1; // 0 Global Interrupt Clear
  290. Uint16 rsvd1:15; // 15:1 Reserved
  291. Uint16 rsvd2:16; // 31:16 Reserved
  292. };
  293. union GINTCLR_REG {
  294. Uint32 all;
  295. struct GINTCLR_BITS bit;
  296. };
  297. struct DLYCTL_BITS { // bits description
  298. Uint16 DLYDIS:1; // 0 IO dealy control disable.
  299. Uint16 DLYCTL:2; // 2:1 IO delay control.
  300. Uint16 rsvd1:13; // 15:3 Reserved
  301. Uint16 rsvd2:16; // 31:16 Reserved
  302. };
  303. union DLYCTL_REG {
  304. Uint32 all;
  305. struct DLYCTL_BITS bit;
  306. };
  307. struct UPP_REGS {
  308. Uint32 PID; // Peripheral ID Register
  309. union PERCTL_REG PERCTL; // Peripheral Control Register
  310. Uint16 rsvd1[4]; // Reserved
  311. union CHCTL_REG CHCTL; // General Control Register
  312. union IFCFG_REG IFCFG; // Interface Configuration Register
  313. union IFIVAL_REG IFIVAL; // Interface Idle Value Register
  314. union THCFG_REG THCFG; // Threshold Configuration Register
  315. union RAWINTST_REG RAWINTST; // Raw Interrupt Status Register
  316. union ENINTST_REG ENINTST; // Enable Interrupt Status Register
  317. union INTENSET_REG INTENSET; // Interrupt Enable Set Register
  318. union INTENCLR_REG INTENCLR; // Interrupt Enable Clear Register
  319. Uint16 rsvd2[8]; // Reserved
  320. Uint32 CHIDESC0; // DMA Channel I Descriptor 0 Register
  321. union CHIDESC1_REG CHIDESC1; // DMA Channel I Descriptor 1 Register
  322. union CHIDESC2_REG CHIDESC2; // DMA Channel I Descriptor 2 Register
  323. Uint16 rsvd3[2]; // Reserved
  324. Uint32 CHIST0; // DMA Channel I Status 0 Register
  325. union CHIST1_REG CHIST1; // DMA Channel I Status 1 Register
  326. union CHIST2_REG CHIST2; // DMA Channel I Status 2 Register
  327. Uint16 rsvd4[2]; // Reserved
  328. Uint32 CHQDESC0; // DMA Channel Q Descriptor 0 Register
  329. union CHQDESC1_REG CHQDESC1; // DMA Channel Q Descriptor 1 Register
  330. union CHQDESC2_REG CHQDESC2; // DMA Channel Q Descriptor 2 Register
  331. Uint16 rsvd5[2]; // Reserved
  332. Uint32 CHQST0; // DMA Channel Q Status 0 Register
  333. union CHQST1_REG CHQST1; // DMA Channel Q Status 1 Register
  334. union CHQST2_REG CHQST2; // DMA Channel Q Status 2 Register
  335. Uint16 rsvd6[2]; // Reserved
  336. union GINTEN_REG GINTEN; // Global Peripheral Interrupt Enable Register
  337. union GINTFLG_REG GINTFLG; // Global Peripheral Interrupt Flag Register
  338. union GINTCLR_REG GINTCLR; // Global Peripheral Interrupt Clear Register
  339. union DLYCTL_REG DLYCTL; // IO clock data skew control Register
  340. };
  341. //---------------------------------------------------------------------------
  342. // UPP External References & Function Declarations:
  343. //
  344. #ifdef CPU1
  345. extern volatile struct UPP_REGS UppRegs;
  346. #endif
  347. #ifdef __cplusplus
  348. }
  349. #endif /* extern "C" */
  350. #endif
  351. //===========================================================================
  352. // End of file.
  353. //===========================================================================