2 host to dsp–command vector, Host to dsp–command vector -51 – Motorola DSP56012 User Manual

Page 131

Advertising
background image

Parallel Host Interface

Host Interface (HI)

MOTOROLA

DSP56012 User’s Manual

4-51

The MAIN PROGRAM initializes the Host and then hangs in a wait loop while it
allows interrupts to transfer data from the host processor to the DSP. The first three
MOVEP instructions enable the Host and configure the interrupts. The following
MOVE enables the interrupts (this should always be done after the interrupt
programs and hardware are completely initialized) and prepares the DSP CPU to
look for the host flag, HF0 = 1. The JCLR instruction is a polling loop that looks for
HF0 = 1, which indicates that the host processor is ready. When the host processor is
ready to transfer data to the DSP, the DSP enables HRIE in the HCR, which allows
the interrupt routine to receive data from the host processor. The jump-to-self
instruction that follows is for test purposes only; it can be replaced by any other code
in normal operation.

The receive routine in

Figure 4-28

on page 4-53 was implemented as a long interrupt

(the instruction at the interrupt vector location, which is not shown, is a JSR). Since
there is only one instruction, this could have been implemented as a fast interrupt.
The MOVEP instruction moves data from the Host to a buffer area in memory and
increments the buffer pointer so that the next word received will be put in the next
sequential location.

4.4.8.2.2

Host to DSP–Command Vector

The host processor can cause three types of interrupts in the DSP (see

Figure 4-28

).

These are host receive data (P:$0030), host transmit data (P:$0032), and host
command (P:$0034–P:$007E). The Host Command (HC) can be used to control the
DSP by forcing it to execute any interrupt routine, which can be used to run tests,
transfer data, process data, etc.

Note:

To prevent possible interrupt conflicts when using the SAI and DAX
peripherals, do not allow the Host Command to use the vector address in the
range P:$0040–$004A, which are reserved for SAI interrupts, or addresses
$P:$0050, $0052, and $0056, which are reserved for DAX interrupts. In other
words, when using these peripherals, restrict the HC to the following
interrupt vector addresses: P:$0034–$003C, $004C–$004E, $0054, and
$0058–007E.

Advertising