Motorola MSC8101 ADS User's Guide Page 127

  • Download
  • Add to my manuals
  • Print
  • Page
    / 346
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 126
DMA Programming Examples
DMA Channels 6-19
move.l #SIZE1,d0 ;Init transfer size
move.l d0,M_BDSIZE1
move.l #ATTR1,d0 ;Init channel 1 attrib
move.l d0,M_BDATTR1
DMA_START
moveu.l #dchcr0,d0 ;Init channel 0 config
move.l d0,M_DCHCR0
moveu.l #dchcr1,d0 ;Init channel 1 config
move.l d0,M_DCHCR1
CONT
move.l M_DSTR,d5
bmtsts #0xc000,d5.h
jf CONT
6.4.3 Internal Peripheral to External Dual Access, Simple Buffer
Example 6-3 transfers 16-bit data from an internal peripheral to external memory as a
dual transaction with a simple buffer. The data is read from the host via the HDI16
interface to the DMA FIFO. The DMA FIFO writes the data to external SDRAM. Bank 2
and bank 11 of the memory controller are configured to allow the DMA channel to access
external memory through the SDRAM and to the HDI16 through the GPCM, respectively.
The memory buffer to which the BUFF_START equate points must be within the memory
range of bank 2.
1. The HDI16 control registers are initialized in the following manner:
a. The Host Control Register (HCR) is programmed for Host DMA mode by the
value (INIT_HCR).
b. The Host Port Control Register (HPCR) is programmed for 16-bit mode by
the value (INIT_HPCR).
c. After the control registers are programmed, the HDI16 is enabled as a host
interface by setting bit 8 of the HPCR.
2. Channel 0 reads data from the Host Receive Data Register (HORX) as a simple
buffer to the DMA FIFO. The DMA control registers for channel 0 are
programmed in the following manner:
a. The address location of the data, M_HORX, is written to the DMA buffer
address pointer field (BD_ADDR0).
b. The total number of bytes to transfer, PATT_SIZE, is written to the DMA
buffer size field (BD_SIZE0).
The DMA buffer base size (BD_BSIZE0) does not need to be programmed
since this is a simple buffer.
Page view 126
1 2 ... 122 123 124 125 126 127 128 129 130 131 132 ... 345 346

Comments to this Manuals

No comments