Motorola DSP56305 Manuel d'utilisateur Page 56

  • 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 55
Using the DMA
Servicing a Peripheral
MOTOROLA Optimizing DSP56300/DSP56600 Applications 4-7
In the following example, the DMA receives data from the ESSI and
passes it to a memory buffer. Only after the buffer is filled the DMA
interrupts the core. Each ESSI request triggers a transfer of one
word. After N words are transferred, the DMA is disarmed and
interrupts the core. The core re-arms the DMA at the end of the
interrupt routine.
;================= initialize DMA
movep #M_RX0,x:M_DSR0;address of ESSI receive
;register is transfer source
;address.
movep #DATA_BUF,x:M_DDR0;base address of memory data
;buffer is transfer dest.
movep #BUF_SIZE-1,x:M_DCO0;load number of transfers
;before core is interrupted.
;DMA control word:% 0 1 101 11 0 01010 0 101 100 00 00
; DE 0 channel not armed (yet)
; DIE 1 DMA interrupts enabled
; DTM 101 word transfer triggered by request source
; DE is not disarmed at end of word trans.
; DPR 11 highest channel priority
; DCON 0 continuous mode disabled
; DRS 01010 DMA request source - ESSI0 receive data
; D3D 0 3 dimensional mode disabled
; DAM[5:3]101 destination address post-increment
; DAM[2:0]100 source address no update
; DS[3:2] 00 transfer destination: x memory.
; DS[1:0] 00 transfer source: x memory.
movep #$6e52c0,x:M_DCR0;load control register.
;============== initialize ESSI0
movep #$3f,x:M_PCRC ;enable all ESSI0 pins
movep #$180000,x:M_CRA0;24 bits per word, maximal
;frequency
movep #$011130,x:M_CRB0;transmitter enabled, one bit
;sync (sc2 output) syn mode,
;internal clocks.
;============== initialize the core
bset #13,x:M_IPRP ;give DMA channel 0 interrupt
;priority 1.
ori #$3,mr ;enable interrupts
...
;============== interrupt vector area
org p:I_DMA0
jsr <_ESSI0_RX
...
;============== subroutine area
_ESSI0_RX
jsr <_PROCESS_DATA
movep #DATA_BUF,x:M_DDR0;reset destination register at
;beginning of memory buffer.
bset #23,x:M_DCR0 ;re-arm channel 0
rts
Vue de la page 55
1 2 ... 51 52 53 54 55 56 57 58 59 60 61 ... 111 112

Commentaires sur ces manuels

Pas de commentaire