hw_udma.h 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  1. /******************************************************************************
  2. * Filename: hw_udma.h
  3. * Revised: $Date: 2013-04-30 17:13:44 +0200 (Tue, 30 Apr 2013) $
  4. * Revision: $Revision: 9943 $
  5. *
  6. * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
  7. *
  8. *
  9. * Redistribution and use in source and binary forms, with or without
  10. * modification, are permitted provided that the following conditions
  11. * are met:
  12. *
  13. * Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions and the following disclaimer.
  15. *
  16. * Redistributions in binary form must reproduce the above copyright
  17. * notice, this list of conditions and the following disclaimer in the
  18. * documentation and/or other materials provided with the distribution.
  19. *
  20. * Neither the name of Texas Instruments Incorporated nor the names of
  21. * its contributors may be used to endorse or promote products derived
  22. * from this software without specific prior written permission.
  23. *
  24. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  25. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  26. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  27. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  28. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  29. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  30. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  31. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  32. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  33. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  34. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. *
  36. ******************************************************************************/
  37. #ifndef __HW_UDMA_H__
  38. #define __HW_UDMA_H__
  39. //*****************************************************************************
  40. //
  41. // The following are defines for the UDMA register offsets.
  42. //
  43. //*****************************************************************************
  44. #define UDMA_STAT 0x400FF000 // DMA status The STAT register
  45. // returns the status of the uDMA
  46. // controller. This register cannot
  47. // be read when the uDMA controller
  48. // is in the reset state.
  49. #define UDMA_CFG 0x400FF004 // DMA configuration The CFG
  50. // register controls the
  51. // configuration of the uDMA
  52. // controller.
  53. #define UDMA_CTLBASE 0x400FF008 // DMA channel control base
  54. // pointer The CTLBASE register
  55. // must be configured so that the
  56. // base pointer points to a
  57. // location in system memory. The
  58. // amount of system memory that
  59. // must be assigned to the uDMA
  60. // controller depends on the number
  61. // of uDMA channels used and
  62. // whether the alternate channel
  63. // control data structure is used.
  64. // See Section 10.2.5 for details
  65. // about the Channel Control Table.
  66. // The base address must be aligned
  67. // on a 1024-byte boundary. This
  68. // register cannot be read when the
  69. // uDMA controller is in the reset
  70. // state.
  71. #define UDMA_ALTBASE 0x400FF00C // DMA alternate channel control
  72. // base pointer The ALTBASE
  73. // register returns the base
  74. // address of the alternate channel
  75. // control data. This register
  76. // removes the necessity for
  77. // application software to
  78. // calculate the base address of
  79. // the alternate channel control
  80. // structures. This register cannot
  81. // be read when the uDMA controller
  82. // is in the reset state.
  83. #define UDMA_WAITSTAT 0x400FF010 // DMA channel wait-on-request
  84. // status This read-only register
  85. // indicates that the uDMA channel
  86. // is waiting on a request. A
  87. // peripheral can hold off the uDMA
  88. // from performing a single request
  89. // until the peripheral is ready
  90. // for a burst request to enhance
  91. // the uDMA performance. The use of
  92. // this feature is dependent on the
  93. // design of the peripheral and is
  94. // not controllable by software in
  95. // any way. This register cannot be
  96. // read when the uDMA controller is
  97. // in the reset state.
  98. #define UDMA_SWREQ 0x400FF014 // DMA channel software request
  99. // Each bit of the SWREQ register
  100. // represents the corresponding
  101. // uDMA channel. Setting a bit
  102. // generates a request for the
  103. // specified uDMA channel.
  104. #define UDMA_USEBURSTSET 0x400FF018 // DMA channel useburst set Each
  105. // bit of the USEBURSTSET register
  106. // represents the corresponding
  107. // uDMA channel. Setting a bit
  108. // disables the channel single
  109. // request input from generating
  110. // requests, configuring the
  111. // channel to only accept burst
  112. // requests. Reading the register
  113. // returns the status of USEBURST.
  114. // If the amount of data to
  115. // transfer is a multiple of the
  116. // arbitration (burst) size, the
  117. // corresponding SET[n] bit is
  118. // cleared after completing the
  119. // final transfer. If there are
  120. // fewer items remaining to
  121. // transfer than the arbitration
  122. // (burst) size, the uDMA
  123. // controller automatically clears
  124. // the corresponding SET[n] bit,
  125. // allowing the remaining items to
  126. // transfer using single requests.
  127. // To resume transfers using burst
  128. // requests, the corresponding bit
  129. // must be set again. A bit must
  130. // not be set if the corresponding
  131. // peripheral does not support the
  132. // burst request model.
  133. #define UDMA_USEBURSTCLR 0x400FF01C // DMA channel useburst clear Each
  134. // bit of the USEBURSTCLR register
  135. // represents the corresponding
  136. // uDMA channel. Setting a bit
  137. // clears the corresponding SET[n]
  138. // bit in the USEBURSTSET register.
  139. #define UDMA_REQMASKSET 0x400FF020 // DMA channel request mask set
  140. // Each bit of the REQMASKSET
  141. // register represents the
  142. // corresponding uDMA channel.
  143. // Setting a bit disables uDMA
  144. // requests for the channel.
  145. // Reading the register returns the
  146. // request mask status. When a uDMA
  147. // channel request is masked, that
  148. // means the peripheral can no
  149. // longer request uDMA transfers.
  150. // The channel can then be used for
  151. // software-initiated transfers.
  152. #define UDMA_REQMASKCLR 0x400FF024 // DMA channel request mask clear
  153. // Each bit of the REQMASKCLR
  154. // register represents the
  155. // corresponding uDMA channel.
  156. // Setting a bit clears the
  157. // corresponding SET[n] bit in the
  158. // REQMASKSET register.
  159. #define UDMA_ENASET 0x400FF028 // DMA channel enable set Each bit
  160. // of the ENASET register
  161. // represents the corresponding
  162. // uDMA channel. Setting a bit
  163. // enables the corresponding uDMA
  164. // channel. Reading the register
  165. // returns the enable status of the
  166. // channels. If a channel is
  167. // enabled but the request mask is
  168. // set (REQMASKSET), then the
  169. // channel can be used for
  170. // software-initiated transfers.
  171. #define UDMA_ENACLR 0x400FF02C // DMA channel enable clear Each
  172. // bit of the ENACLR register
  173. // represents the corresponding
  174. // uDMA channel. Setting a bit
  175. // clears the corresponding SET[n]
  176. // bit in the ENASET register.
  177. #define UDMA_ALTSET 0x400FF030 // DMA channel primary alternate
  178. // set Each bit of the ALTSET
  179. // register represents the
  180. // corresponding uDMA channel.
  181. // Setting a bit configures the
  182. // uDMA channel to use the
  183. // alternate control data
  184. // structure. Reading the register
  185. // returns the status of which
  186. // control data structure is in use
  187. // for the corresponding uDMA
  188. // channel.
  189. #define UDMA_ALTCLR 0x400FF034 // DMA channel primary alternate
  190. // clear Each bit of the ALTCLR
  191. // register represents the
  192. // corresponding uDMA channel.
  193. // Setting a bit clears the
  194. // corresponding SET[n] bit in the
  195. // ALTSET register.
  196. #define UDMA_PRIOSET 0x400FF038 // DMA channel priority set Each
  197. // bit of the PRIOSET register
  198. // represents the corresponding
  199. // uDMA channel. Setting a bit
  200. // configures the uDMA channel to
  201. // have a high priority level.
  202. // Reading the register returns the
  203. // status of the channel priority
  204. // mask.
  205. #define UDMA_PRIOCLR 0x400FF03C // DMA channel priority clear Each
  206. // bit of the DMAPRIOCLR register
  207. // represents the corresponding
  208. // uDMA channel. Setting a bit
  209. // clears the corresponding SET[n]
  210. // bit in the PRIOSET register.
  211. #define UDMA_ERRCLR 0x400FF04C // DMA bus error clear The ERRCLR
  212. // register is used to read and
  213. // clear the uDMA bus error status.
  214. // The error status is set if the
  215. // uDMA controller encountered a
  216. // bus error while performing a
  217. // transfer. If a bus error occurs
  218. // on a channel, that channel is
  219. // automatically disabled by the
  220. // uDMA controller. The other
  221. // channels are unaffected.
  222. #define UDMA_CHASGN 0x400FF500 // DMA channel assignment Each bit
  223. // of the CHASGN register
  224. // represents the corresponding
  225. // uDMA channel. Setting a bit
  226. // selects the secondary channel
  227. // assignment as specified in the
  228. // section "Channel Assignments"
  229. #define UDMA_CHIS 0x400FF504 // DMA channel interrupt status
  230. // Each bit of the CHIS register
  231. // represents the corresponding
  232. // uDMA channel. A bit is set when
  233. // that uDMA channel causes a
  234. // completion interrupt. The bits
  235. // are cleared by writing 1.
  236. #define UDMA_CHMAP0 0x400FF510 // DMA channel map select 0 Each
  237. // 4-bit field of the CHMAP0
  238. // register configures the uDMA
  239. // channel assignment as specified
  240. // in the uDMA channel assignment
  241. // table in the "Channel
  242. // Assignments" section.
  243. #define UDMA_CHMAP1 0x400FF514 // DMA channel map select 1 Each
  244. // 4-bit field of the CHMAP1
  245. // register configures the uDMA
  246. // channel assignment as specified
  247. // in the uDMA channel assignment
  248. // table in the "Channel
  249. // Assignments" section.
  250. #define UDMA_CHMAP2 0x400FF518 // DMA channel map select 2 Each
  251. // 4-bit field of the CHMAP2
  252. // register configures the uDMA
  253. // channel assignment as specified
  254. // in the uDMA channel assignment
  255. // table in the "Channel
  256. // Assignments" section.
  257. #define UDMA_CHMAP3 0x400FF51C // DMA channel map select 3 Each
  258. // 4-bit field of the CHMAP3
  259. // register configures the uDMA
  260. // channel assignment as specified
  261. // in the uDMA channel assignment
  262. // table in the "Channel
  263. // Assignments" section.
  264. //*****************************************************************************
  265. //
  266. // The following are defines for the bit fields in the UDMA_STAT register.
  267. //
  268. //*****************************************************************************
  269. #define UDMA_STAT_DMACHANS_M 0x001F0000 // Available uDMA channels minus 1
  270. // This field contains a value
  271. // equal to the number of uDMA
  272. // channels the uDMA controller is
  273. // configured to use, minus one.
  274. // The value of 0x1F corresponds to
  275. // 32 uDMA channels.
  276. #define UDMA_STAT_DMACHANS_S 16
  277. #define UDMA_STAT_STATE_M 0x000000F0 // Control state machine status
  278. // This field shows the current
  279. // status of the control
  280. // state-machine. Status can be one
  281. // of the following: 0x0: Idle 0x1:
  282. // Reading channel controller data
  283. // 0x2: Reading source end pointer
  284. // 0x3: Reading destination end
  285. // pointer 0x4: Reading source data
  286. // 0x5: Writing destination data
  287. // 0x6: Waiting for uDMA request to
  288. // clear 0x7: Writing channel
  289. // controller data 0x8: Stalled
  290. // 0x9: Done 0xA-0xF: Undefined
  291. #define UDMA_STAT_STATE_S 4
  292. #define UDMA_STAT_MASTEN 0x00000001 // Master enable status 0: The
  293. // uDMA controller is disabled. 1:
  294. // The uDMA controller is enabled.
  295. #define UDMA_STAT_MASTEN_M 0x00000001
  296. #define UDMA_STAT_MASTEN_S 0
  297. //*****************************************************************************
  298. //
  299. // The following are defines for the bit fields in the UDMA_CFG register.
  300. //
  301. //*****************************************************************************
  302. #define UDMA_CFG_MASTEN 0x00000001 // Controller master enable 0:
  303. // Disables the uDMA controller. 1:
  304. // Enables the uDMA controller.
  305. #define UDMA_CFG_MASTEN_M 0x00000001
  306. #define UDMA_CFG_MASTEN_S 0
  307. //*****************************************************************************
  308. //
  309. // The following are defines for the bit fields in the UDMA_CTLBASE register.
  310. //
  311. //*****************************************************************************
  312. #define UDMA_CTLBASE_ADDR_M 0xFFFFFC00 // Channel control base address
  313. // This field contains the pointer
  314. // to the base address of the
  315. // channel control table. The base
  316. // address must be 1024-byte
  317. // alligned.
  318. #define UDMA_CTLBASE_ADDR_S 10
  319. //*****************************************************************************
  320. //
  321. // The following are defines for the bit fields in the UDMA_ALTBASE register.
  322. //
  323. //*****************************************************************************
  324. #define UDMA_ALTBASE_ADDR_M 0xFFFFFFFF // Alternate channel address
  325. // pointer This field provides the
  326. // base address of the alternate
  327. // channel control structures.
  328. #define UDMA_ALTBASE_ADDR_S 0
  329. //*****************************************************************************
  330. //
  331. // The following are defines for the bit fields in the
  332. // UDMA_WAITSTAT register.
  333. //
  334. //*****************************************************************************
  335. #define UDMA_WAITSTAT_WAITREQ_M 0xFFFFFFFF // Channel [n] wait status These
  336. // bits provide the tchannel
  337. // wait-on-request status. Bit 0
  338. // corresponds to channel 0. 1: The
  339. // corresponding channel is waiting
  340. // on a request. 0: The
  341. // corresponding channel is not
  342. // waiting on a request.
  343. #define UDMA_WAITSTAT_WAITREQ_S 0
  344. //*****************************************************************************
  345. //
  346. // The following are defines for the bit fields in the UDMA_SWREQ register.
  347. //
  348. //*****************************************************************************
  349. #define UDMA_SWREQ_SWREQ_M 0xFFFFFFFF // Channel [n] software request
  350. // These bits generate software
  351. // requests. Bit 0 corresponds to
  352. // channel 0. 1: Generate a
  353. // software request for the
  354. // corresponding channel 0: No
  355. // request generated These bits are
  356. // automatically cleared when the
  357. // software request has been
  358. // completed.
  359. #define UDMA_SWREQ_SWREQ_S 0
  360. //*****************************************************************************
  361. //
  362. // The following are defines for the bit fields in the
  363. // UDMA_USEBURSTSET register.
  364. //
  365. //*****************************************************************************
  366. #define UDMA_USEBURSTSET_SET_M 0xFFFFFFFF // Channel [n] useburst set 0:
  367. // uDMA channel [n] responds to
  368. // single or burst requests. 1:
  369. // uDMA channel [n] responds only
  370. // to burst requests. Bit 0
  371. // corresponds to channel 0. This
  372. // bit is automatically cleared as
  373. // described above. A bit can also
  374. // be manually cleared by setting
  375. // the corresponding CLR[n] bit in
  376. // the DMAUSEBURSTCLR register.
  377. #define UDMA_USEBURSTSET_SET_S 0
  378. //*****************************************************************************
  379. //
  380. // The following are defines for the bit fields in the
  381. // UDMA_USEBURSTCLR register.
  382. //
  383. //*****************************************************************************
  384. #define UDMA_USEBURSTCLR_CLR_M 0xFFFFFFFF // Channel [n] useburst clear 0:
  385. // No effect 1: Setting a bit
  386. // clears the corresponding SET[n]
  387. // bit in the DMAUSEBURSTSET
  388. // register meaning that uDMA
  389. // channel [n] responds to single
  390. // and burst requests.
  391. #define UDMA_USEBURSTCLR_CLR_S 0
  392. //*****************************************************************************
  393. //
  394. // The following are defines for the bit fields in the
  395. // UDMA_REQMASKSET register.
  396. //
  397. //*****************************************************************************
  398. #define UDMA_REQMASKSET_SET_M 0xFFFFFFFF // Channel [n] request mask set 0:
  399. // The peripheral associated with
  400. // channel [n] is enabled to
  401. // request uDMA transfers 1: The
  402. // peripheral associated with
  403. // channel [n] is not able to
  404. // request uDMA transfers. Channel
  405. // [n] may be used for
  406. // software-initiated transfers.
  407. // Bit 0 corresponds to channel 0.
  408. // A bit can only be cleared by
  409. // setting the corresponding CLR[n]
  410. // bit in the DMAREQMASKCLR
  411. // register.
  412. #define UDMA_REQMASKSET_SET_S 0
  413. //*****************************************************************************
  414. //
  415. // The following are defines for the bit fields in the
  416. // UDMA_REQMASKCLR register.
  417. //
  418. //*****************************************************************************
  419. #define UDMA_REQMASKCLR_CLR_M 0xFFFFFFFF // Channel [n] request mask clear
  420. // 0: No effect 1: Setting a bit
  421. // clears the corresponding SET[n]
  422. // bit in the DMAREQMASKSET
  423. // register meaning that the
  424. // peripheral associated with
  425. // channel [n] is enabled to
  426. // request uDMA transfers.
  427. #define UDMA_REQMASKCLR_CLR_S 0
  428. //*****************************************************************************
  429. //
  430. // The following are defines for the bit fields in the UDMA_ENASET register.
  431. //
  432. //*****************************************************************************
  433. #define UDMA_ENASET_SET_M 0xFFFFFFFF // Channel [n] enable set 0: uDMA
  434. // channel [n] is disabled 1: uDMA
  435. // channel [n] is enabled Bit 0
  436. // corresponds to channel 0. A bit
  437. // can only be cleared by setting
  438. // the corresponding CLR[n] bit in
  439. // the DMAENACLR register.
  440. #define UDMA_ENASET_SET_S 0
  441. //*****************************************************************************
  442. //
  443. // The following are defines for the bit fields in the UDMA_ENACLR register.
  444. //
  445. //*****************************************************************************
  446. #define UDMA_ENACLR_CLR_M 0xFFFFFFFF // Channel [n] enable clear 0: No
  447. // effect 1: Setting a bit clears
  448. // the corresponding SET[n] bit in
  449. // the DMAENASET register meaning
  450. // that channel [n] is disabled for
  451. // uDMA transfers. Note: The
  452. // controller disables a channel
  453. // when it completes the uDMA
  454. // cycle.
  455. #define UDMA_ENACLR_CLR_S 0
  456. //*****************************************************************************
  457. //
  458. // The following are defines for the bit fields in the UDMA_ALTSET register.
  459. //
  460. //*****************************************************************************
  461. #define UDMA_ALTSET_SET_M 0xFFFFFFFF // Channel [n] alternate set 0:
  462. // uDMA channel [n] is using the
  463. // primary control structure 1:
  464. // uDMA channel [n] is using the
  465. // alternate control structure Bit
  466. // 0 corresponds to channel 0. A
  467. // bit can only be cleared by
  468. // setting the corresponding CLR[n]
  469. // bit in the DMAALTCLR register.
  470. // Note: For Ping-Pong and
  471. // Scatter-Gather cycle types, the
  472. // uDMA controller automatically
  473. // sets these bits to select the
  474. // alternate channel control data
  475. // structure.
  476. #define UDMA_ALTSET_SET_S 0
  477. //*****************************************************************************
  478. //
  479. // The following are defines for the bit fields in the UDMA_ALTCLR register.
  480. //
  481. //*****************************************************************************
  482. #define UDMA_ALTCLR_CLR_M 0xFFFFFFFF // Channel [n] alternate clear 0:
  483. // No effect 1: Setting a bit
  484. // clears the corresponding SET[n]
  485. // bit in the DMAALTSET register
  486. // meaning that channel [n] is
  487. // using the primary control
  488. // structure. Note: For Ping-Pong
  489. // and Scatter-Gather cycle types,
  490. // the uDMA controller
  491. // automatically sets these bits to
  492. // select the alternate channel
  493. // control data structure.
  494. #define UDMA_ALTCLR_CLR_S 0
  495. //*****************************************************************************
  496. //
  497. // The following are defines for the bit fields in the UDMA_PRIOSET register.
  498. //
  499. //*****************************************************************************
  500. #define UDMA_PRIOSET_SET_M 0xFFFFFFFF // Channel [n] priority set 0:
  501. // uDMA channel [n] is using the
  502. // default priority level 1: uDMA
  503. // channel [n] is using a high
  504. // priority level Bit 0 corresponds
  505. // to channel 0. A bit can only be
  506. // cleared by setting the
  507. // corresponding CLR[n] bit in the
  508. // DMAPRIOCLR register.
  509. #define UDMA_PRIOSET_SET_S 0
  510. //*****************************************************************************
  511. //
  512. // The following are defines for the bit fields in the UDMA_PRIOCLR register.
  513. //
  514. //*****************************************************************************
  515. #define UDMA_PRIOCLR_CLR_M 0xFFFFFFFF // Channel [n] priority clear 0:
  516. // No effect 1: Setting a bit
  517. // clears the corresponding SET[n]
  518. // bit in the DMAPRIOSET register
  519. // meaning that channel [n] is
  520. // using the default priority
  521. // level.
  522. #define UDMA_PRIOCLR_CLR_S 0
  523. //*****************************************************************************
  524. //
  525. // The following are defines for the bit fields in the UDMA_ERRCLR register.
  526. //
  527. //*****************************************************************************
  528. #define UDMA_ERRCLR_ERRCLR 0x00000001 // uDMA bus error status 0: No bus
  529. // error is pending 1: A bus error
  530. // is pending This bit is cleared
  531. // by writing 1 to it.
  532. #define UDMA_ERRCLR_ERRCLR_M 0x00000001
  533. #define UDMA_ERRCLR_ERRCLR_S 0
  534. //*****************************************************************************
  535. //
  536. // The following are defines for the bit fields in the UDMA_CHASGN register.
  537. //
  538. //*****************************************************************************
  539. #define UDMA_CHASGN_CHASGN_M 0xFFFFFFFF // Channel [n] assignment select
  540. // 0: Use the primary channel
  541. // assignment 1: Use the secondary
  542. // channel assignment
  543. #define UDMA_CHASGN_CHASGN_S 0
  544. //*****************************************************************************
  545. //
  546. // The following are defines for the bit fields in the UDMA_CHIS register.
  547. //
  548. //*****************************************************************************
  549. #define UDMA_CHIS_CHIS_M 0xFFFFFFFF // Channel [n] interrupt status 0:
  550. // The corresponding uDMA channel
  551. // has not caused an interrupt. 1:
  552. // The corresponding uDMA channel
  553. // has caused an interrupt. This
  554. // bit is cleared by writing 1 to
  555. // it.
  556. #define UDMA_CHIS_CHIS_S 0
  557. //*****************************************************************************
  558. //
  559. // The following are defines for the bit fields in the UDMA_CHMAP0 register.
  560. //
  561. //*****************************************************************************
  562. #define UDMA_CHMAP0_CH7SEL_M 0xF0000000 // uDMA channel 7 source select
  563. // See section titled "Channel
  564. // Assignments" in Micro Direct
  565. // Memory Access chapter.
  566. #define UDMA_CHMAP0_CH7SEL_S 28
  567. #define UDMA_CHMAP0_CH6SEL_M 0x0F000000 // uDMA channel 6 source select
  568. // See section titled "Channel
  569. // Assignments" in Micro Direct
  570. // Memory Access chapter.
  571. #define UDMA_CHMAP0_CH6SEL_S 24
  572. #define UDMA_CHMAP0_CH5SEL_M 0x00F00000 // uDMA channel 5 source select
  573. // See section titled "Channel
  574. // Assignments" in Micro Direct
  575. // Memory Access chapter.
  576. #define UDMA_CHMAP0_CH5SEL_S 20
  577. #define UDMA_CHMAP0_CH4SEL_M 0x000F0000 // uDMA channel 4 source select
  578. // See section titled "Channel
  579. // Assignments" in Micro Direct
  580. // Memory Access chapter.
  581. #define UDMA_CHMAP0_CH4SEL_S 16
  582. #define UDMA_CHMAP0_CH3SEL_M 0x0000F000 // uDMA channel 3 source select
  583. // See section titled "Channel
  584. // Assignments" in Micro Direct
  585. // Memory Access chapter.
  586. #define UDMA_CHMAP0_CH3SEL_S 12
  587. #define UDMA_CHMAP0_CH2SEL_M 0x00000F00 // uDMA channel 2 source select
  588. // See section titled "Channel
  589. // Assignments" in Micro Direct
  590. // Memory Access chapter.
  591. #define UDMA_CHMAP0_CH2SEL_S 8
  592. #define UDMA_CHMAP0_CH1SEL_M 0x000000F0 // uDMA channel 1 source select
  593. // See section titled "Channel
  594. // Assignments" in Micro Direct
  595. // Memory Access chapter.
  596. #define UDMA_CHMAP0_CH1SEL_S 4
  597. #define UDMA_CHMAP0_CH0SEL_M 0x0000000F // uDMA channel 0 source select
  598. // See section titled "Channel
  599. // Assignments" in Micro Direct
  600. // Memory Access chapter.
  601. #define UDMA_CHMAP0_CH0SEL_S 0
  602. //*****************************************************************************
  603. //
  604. // The following are defines for the bit fields in the UDMA_CHMAP1 register.
  605. //
  606. //*****************************************************************************
  607. #define UDMA_CHMAP1_CH15SEL_M 0xF0000000 // uDMA channel 15 source select
  608. // See section titled "Channel
  609. // Assignments" in Micro Direct
  610. // Memory Access chapter.
  611. #define UDMA_CHMAP1_CH15SEL_S 28
  612. #define UDMA_CHMAP1_CH14SEL_M 0x0F000000 // uDMA channel 14 source select
  613. // See section titled "Channel
  614. // Assignments" in Micro Direct
  615. // Memory Access chapter.
  616. #define UDMA_CHMAP1_CH14SEL_S 24
  617. #define UDMA_CHMAP1_CH13SEL_M 0x00F00000 // uDMA channel 13 source select
  618. // See section titled "Channel
  619. // Assignments" in Micro Direct
  620. // Memory Access chapter.
  621. #define UDMA_CHMAP1_CH13SEL_S 20
  622. #define UDMA_CHMAP1_CH12SEL_M 0x000F0000 // uDMA channel 12 source select
  623. // See section titled "Channel
  624. // Assignments" in Micro Direct
  625. // Memory Access chapter.
  626. #define UDMA_CHMAP1_CH12SEL_S 16
  627. #define UDMA_CHMAP1_CH11SEL_M 0x0000F000 // uDMA channel 11 source select
  628. // See section titled "Channel
  629. // Assignments" in Micro Direct
  630. // Memory Access chapter.
  631. #define UDMA_CHMAP1_CH11SEL_S 12
  632. #define UDMA_CHMAP1_CH10SEL_M 0x00000F00 // uDMA channel 10 source select
  633. // See section titled "Channel
  634. // Assignments" in Micro Direct
  635. // Memory Access chapter.
  636. #define UDMA_CHMAP1_CH10SEL_S 8
  637. #define UDMA_CHMAP1_CH9SEL_M 0x000000F0 // uDMA channel 9 source select
  638. // See section titled "Channel
  639. // Assignments" in Micro Direct
  640. // Memory Access chapter.
  641. #define UDMA_CHMAP1_CH9SEL_S 4
  642. #define UDMA_CHMAP1_CH8SEL_M 0x0000000F // uDMA channel 8 source select
  643. // See section titled "Channel
  644. // Assignments" in Micro Direct
  645. // Memory Access chapter.
  646. #define UDMA_CHMAP1_CH8SEL_S 0
  647. //*****************************************************************************
  648. //
  649. // The following are defines for the bit fields in the UDMA_CHMAP2 register.
  650. //
  651. //*****************************************************************************
  652. #define UDMA_CHMAP2_CH23SEL_M 0xF0000000 // uDMA channel 23 source select
  653. // See section titled "Channel
  654. // Assignments" in Micro Direct
  655. // Memory Access chapter.
  656. #define UDMA_CHMAP2_CH23SEL_S 28
  657. #define UDMA_CHMAP2_CH22SEL_M 0x0F000000 // uDMA channel 22 source select
  658. // See section titled "Channel
  659. // Assignments" in Micro Direct
  660. // Memory Access chapter.
  661. #define UDMA_CHMAP2_CH22SEL_S 24
  662. #define UDMA_CHMAP2_CH21SEL_M 0x00F00000 // uDMA channel 21 source select
  663. // See section titled "Channel
  664. // Assignments" in Micro Direct
  665. // Memory Access chapter.
  666. #define UDMA_CHMAP2_CH21SEL_S 20
  667. #define UDMA_CHMAP2_CH20SEL_M 0x000F0000 // uDMA channel 20 source select
  668. // See section titled "Channel
  669. // Assignments" in Micro Direct
  670. // Memory Access chapter.
  671. #define UDMA_CHMAP2_CH20SEL_S 16
  672. #define UDMA_CHMAP2_CH19SEL_M 0x0000F000 // uDMA channel 19 source select
  673. // See section titled "Channel
  674. // Assignments" in Micro Direct
  675. // Memory Access chapter.
  676. #define UDMA_CHMAP2_CH19SEL_S 12
  677. #define UDMA_CHMAP2_CH18SEL_M 0x00000F00 // uDMA channel 18 source select
  678. // See section titled "Channel
  679. // Assignments" in Micro Direct
  680. // Memory Access chapter.
  681. #define UDMA_CHMAP2_CH18SEL_S 8
  682. #define UDMA_CHMAP2_CH17SEL_M 0x000000F0 // uDMA channel 17 source select
  683. // See section titled "Channel
  684. // Assignments" in Micro Direct
  685. // Memory Access chapter.
  686. #define UDMA_CHMAP2_CH17SEL_S 4
  687. #define UDMA_CHMAP2_CH16SEL_M 0x0000000F // uDMA channel 16 source select
  688. // See section titled "Channel
  689. // Assignments" in Micro Direct
  690. // Memory Access chapter.
  691. #define UDMA_CHMAP2_CH16SEL_S 0
  692. //*****************************************************************************
  693. //
  694. // The following are defines for the bit fields in the UDMA_CHMAP3 register.
  695. //
  696. //*****************************************************************************
  697. #define UDMA_CHMAP3_CH31SEL_M 0xF0000000 // uDMA channel 31 source select
  698. // See section titled "Channel
  699. // Assignments" in Micro Direct
  700. // Memory Access chapter.
  701. #define UDMA_CHMAP3_CH31SEL_S 28
  702. #define UDMA_CHMAP3_CH30SEL_M 0x0F000000 // uDMA channel 30 source select
  703. // See section titled "Channel
  704. // Assignments" in Micro Direct
  705. // Memory Access chapter.
  706. #define UDMA_CHMAP3_CH30SEL_S 24
  707. #define UDMA_CHMAP3_CH29SEL_M 0x00F00000 // uDMA channel 29 source select
  708. // See section titled "Channel
  709. // Assignments" in Micro Direct
  710. // Memory Access chapter.
  711. #define UDMA_CHMAP3_CH29SEL_S 20
  712. #define UDMA_CHMAP3_CH28SEL_M 0x000F0000 // uDMA channel 28 source select
  713. // See section titled "Channel
  714. // Assignments" in Micro Direct
  715. // Memory Access chapter.
  716. #define UDMA_CHMAP3_CH28SEL_S 16
  717. #define UDMA_CHMAP3_CH27SEL_M 0x0000F000 // uDMA channel 27 source select
  718. // See section titled "Channel
  719. // Assignments" in Micro Direct
  720. // Memory Access chapter.
  721. #define UDMA_CHMAP3_CH27SEL_S 12
  722. #define UDMA_CHMAP3_CH26SEL_M 0x00000F00 // uDMA channel 26 source select
  723. // See section titled "Channel
  724. // Assignments" in Micro Direct
  725. // Memory Access chapter.
  726. #define UDMA_CHMAP3_CH26SEL_S 8
  727. #define UDMA_CHMAP3_CH25SEL_M 0x000000F0 // uDMA channel 25 source select
  728. // See section titled "Channel
  729. // Assignments" in Micro Direct
  730. // Memory Access chapter.
  731. #define UDMA_CHMAP3_CH25SEL_S 4
  732. #define UDMA_CHMAP3_CH24SEL_M 0x0000000F // uDMA channel 24 source select
  733. // See section titled "Channel
  734. // Assignments" in Micro Direct
  735. // Memory Access chapter.
  736. #define UDMA_CHMAP3_CH24SEL_S 0
  737. #endif // __HW_UDMA_H__