Motorola DSP56303 User Manual page 108

24-bit digital signal processor
Table of Contents

Advertisement

Data Transfer Methods
interrupt address. If it is a short interrupt (that is, the service routine is two opcodes long), the
code automatically returns to the original program flow after executing two opcodes with no
impact to the pipeline. Otherwise, if a longer service routine is required the programmer can
place a jump-to-subroutine (JSR) instruction at the interrupt service address. In this case, the
program executes that service routine and continues until a return-from-interrupt (RTI)
instruction executes. The execution flow then resumes from the position the program counter
was in before the interrupt was triggered.
Configuring interrupts requires two steps:
1.
Setting up the interrupt routine
a.
The interrupt handler is located at the interrupt starting address.
b.
The interrupt routines can be short (only two opcodes long) or long (more than two
opcodes and requiring a JSR instruction).
2.
Enabling the interrupts
a.
Set the corresponding bits in the applicable peripheral control register.
b.
Enable peripheral interrupts in the Interrupt Priority Register (IPRP).
c.
Enable global interrupts in the Mode Register (MR) portion of the Status Register
(SR).
Events that change bits in the peripheral control registers can then trigger the interrupt.
Depending on the peripheral, from two to six peripheral interrupt sources are available to the
programmer.
Example 5-2 shows a short interrupt programmed for the HI08. The main program enables
the Host Receive Interrupt in the Host Control Register (HCR). When the interrupt is
triggered during code execution, the core processing jumps to the Host Receive Interrupt
routine location at p:$60 and executes the code there. Since this is a short interrupt, the core
returns to normal code execution after executing the two move instructions, and an RTI
instruction is not necessary.
5-4
DSP56303 User's Manual

Advertisement

Table of Contents
loading

Table of Contents