Motorola DSP56305 Manuel d'utilisateur Page 54

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 112
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 53
Using the DMA
Using Slow, Low-Cost Memories
MOTOROLA Optimizing DSP56300/DSP56600 Applications 4-5
memory locations. In a read access, the 3 bytes are concatenated to
one 24-bit word that is written to the destination by the DMA. In a
write access, the 24-bit word is unpacked to 3 single-byte write
accesses. After initialization, all this activity is done automatically
without software overhead.
In the following example, the DMA is programmed to read data
from an 8-bit wide external memory and store it as 24-bit words in
the internal memory, using the Packing mode. After reading a
predefined number of 24-bits words, the core is interrupted. The
external 8-bit data module is mapped to 65 K addresses in the Y
data space in addresses: $80XXXX and the data is transferred to
internal Y memory space.
;================= general definitions
MSP_8_BITequ $80 ;MSP of address of
;the 8-bit memory (8 bits)
INT_ADDRequ $200 ;internal address of transfer
;destination
NUM_24_Wequ $512 ;number of 24-bit words to read.
;================= initialize BIU
AAR_WORDequ (MSP_8_BIT<<16)+$8a1
;AAR0 value (only relevant non-zero values
;listed)
;BAC MSP_8_BIT 8 bits for address compare bits
;BNC 1000 number of address bits to compare (8)
;BPAC 1 packing mode enabled
;BYEN 1 Y data space enabled
;BAT 01 external access type - Synchronous RAM
movep #AAR_WORD,x:M_AAR0
movep #5,x:M_BCR ;program aar0 accesses
;for 5 wait states.
;================= initialize DMA
movep #(MSP_8_BIT<<16),x:M_DSR0;first address of
;8-bit data as
;source address
movep #INT_ADDR,x:M_DDR0 ;base address of
;memory data buffer
;is tran. destination.
movep #((NUM_24_W-1)<<12),x:M_DCO0;number of transfers
;before core is
;interrupted
;(2D counter)
movep #3,x:M_DOR0 ;offset of 3 added
;after every 24-bit
;word access.
;DMA control word: % 0 1 011 00 0 00000 0 101 000 01 01
;DE 0 channel not armed (yet)
;DIE 1 DMA interrupts enabled
;DTM 011 word transfer triggered by SW.
;DPR 00 lowest channel priority
;DCON 0 continuous mode disabled
;DRS 00000 DMA request source - don't care (SW trig)
;D3D 0 3 dimensional mode disabled
Vue de la page 53
1 2 ... 49 50 51 52 53 54 55 56 57 58 59 ... 111 112

Commentaires sur ces manuels

Pas de commentaire