Interrupts and Sequencing
Reusing Interrupts
When an interrupt occurs, the sequencer sets the corresponding bit in the
register. During execution of the service routine, the sequencer
IRPTL
keeps this bit cleared—the DSP clears the bit during every cycle, prevent-
ing the same interrupt from being latched while its service routine is
already executing. If necessary, programs may reuse an interrupt while it is
being serviced. Using a jump clear interrupt instruction, (
the interrupt service routine clears the interrupt, allowing its reuse while
the service routine is executing.
The
JUMP (CI)
mal subroutine, clearing the appropriate bit in the interrupt latch and
interrupt mask pointer and popping the status stack. After the
instruction, the DSP stops automatically clearing the interrupt's latch bit,
allowing the interrupt to latch again.
When returning from a subroutine entered with a
program must use a return loop reentry instruction
instruction.
RTI
Loops" on page 3-27.
routine that is reduced to a subroutine with the
instr1; /*Interrupt entry from main program*/
JUMP(PC,3) (DB,CI); /*Clear interrupt status*/
instr3;
instr4;
instr5;
RTS (LR); /*Use LR modifier with return from subroutine*/
The
JUMP (PC,3)(DB,CI)
by jumping to the location
tions
(instr3, instr4)
This
instruction is only an example—a
JUMP
to any location.
3-60
instruction reduces an interrupt service routine to a nor-
For more information, see "Restrictions on Ending
The following example shows an interrupt service
instruction only continues linear execution flow
PC + 3 (instr5)
are executed because of the delayed branch
ADSP-2126x SHARC Processor Hardware Reference
JUMP (CI)
instruction, a
JUMP (CI)
, instead of an
RTS (LR)
modifier.
(CI)
. The two intervening instruc-
can perform a
JUMP (CI)
) in
JUMP (CI)
.
(DB)
JUMP
Need help?
Do you have a question about the ADSP-21261 SHARC and is the answer not in the manual?
Questions and answers