Dma Data Transfer; Figure 4-34 Main Program: Transmit 24-Bit Data To Host - Motorola DSP56012 User Manual

24-bit digital signal processor
Table of Contents

Advertisement

The code shown in Figure 4-34 is essentially the same as the MAIN PROGRAM in
Figure 4-29 on page 4-53 except that, since this code will transmit instead of receive
data, the HTIE bit in the HCR is set instead of the HRIE bit.
The transmit routine used by the code in Figure 4-34 is illustrated in Figure 4-36
on page 4-61. The interrupt vector contains a JSR, which makes it a long interrupt.
The code sends a fixed test pattern ($123456) and then resets the HI for the next
interrupt.
4.4.8.3

DMA Data Transfer

The DMA mode allows the transfer of 8-, 16- or 24-bit data through the DSP HI under
the control of an external DMA controller. The HI provides the pipeline data registers
and the synchronization logic between the two asynchronous processor systems. The
DSP host interrupts provide cycle-stealing data transfers with the DSP internal or
external memory. This technique allows the DSP memory address to be generated
using any of the DSP addressing modes and modifiers. Queues and circular sample
buffers are easily created for DMA transfer regions. The host interrupts can be
programmed as high priority fast or long interrupt service routines. The external
DMA controller provides the transfers between the DSP HI registers and the external
DMA memory. The external DMA controller must provide the address to the
external DMA memory; however, the address of the selected HI register is provided
by a DMA address counter in the HI.
**********************************************
; MAIN PROGRAM... transmit 24-bit data to host
;****************************************
ORG
P:$80
MOVEP
#1,X:PBC
MOVEP
#$0C00,X:IPR
MOVEP
#0,X:HCR
MOVE
#0,SR
JCLR
#3,X:HSR,*
AND
X0,A
JEQ
LOOP
MOVEP
#$2,X:HCR
*
JMP

Figure 4-34 Main Program: Transmit 24-bit Data to Host

DMA transfers can only be in one direction at a time; however, the host processor can
access any of the registers not in use during the DMA transfer by deasserting HACK
and using HEN and HOA0–HOA2 to transfer data. The host can therefore transfer
data in the other direction during the DMA operation using polling techniques.
MOTOROLA
;Turn on HI Port
;Turn on host interrupt
;Turn off XMT and RCV interrupts
;Unmask interrupts
;Wait for HF0 (from host) set
;Enable host transmit interrupt
;Now wait for interrupt
DSP56012 User's Manual
Parallel Host Interface
Host Interface (HI)
4-59

Advertisement

Table of Contents
loading

Table of Contents