Motorola DSP56305 User Manual Page 59

  • Download
  • Add to my manuals
  • Print
  • Page
    / 112
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 58
4-10 Optimizing DSP56300/DSP56600 Applications MOTOROLA
Using the DMA
Servicing a Peripheral
The following assembler code is needed for this configuration.
;================= initialize DMA channel 0
TX_BUF equ $200 ;base address of buffer with data to
;transmit
BUF_SIZEequ 16 ;number of words in TX_BUF
COUNT0 equ ((BUF_SIZE-1)<<12)+(2<<6)+0
;set the counter value for 3D mode:
;BUFF_SIZE-1 in DCOH (bits 23:12),
;(3-1=2) in DCOM (bits 11:6),
;0 in DCOL (bits 5:0).
movep #M_STXL,x:M_DDR0;destination base address:
;SCI Transmit Low register.
movep #TX_BUF,x:M_DSR0;source base address:
;address of memory transmit
;data area.
movep #COUNT0,x:M_DCO0;load number of transfers
before core is interrupted.
movep #0,x:M_DOR0 ;offset register 0,
;added every word
;(DCOL) to source address.
movep #1,x:M_DOR1 ;offset register 1,
;added every 3 words
;(DCOM) to source address.
Figure 4-1 DMA Addressing Modes for SCI Transmitters
SRXL
SRXM
SRXH
TX_BUF
TX_BUF + 1
TX_BUF + 2
.
.
.
TX_BUF + SIZE – 1
Destination Source
X I/O Space Y Space
AA0834
Page view 58
1 2 ... 54 55 56 57 58 59 60 61 62 63 64 ... 111 112

Comments to this Manuals

No comments