Interrupts and Sequencing
3-60
ADSP-2126x SHARC Processor Hardware Reference
Reusing Interrupts
When an interrupt occurs, the sequencer sets the corresponding bit in the
IRPTL
register. During execution of the service routine, the sequencer
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, (
JUMP (CI)
) in
the interrupt service routine clears the interrupt, allowing its reuse while
the service routine is executing.
The
JUMP (CI)
instruction reduces an interrupt service routine to a nor-
mal subroutine, clearing the appropriate bit in the interrupt latch and
interrupt mask pointer and popping the status stack. After the
JUMP (CI)
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
JUMP (CI)
instruction, a
program must use a return loop reentry instruction
RTS
(LR)
, instead of an
RTI
instruction.
For more information, see “Restrictions on Ending
The following example shows an interrupt service
routine that is reduced to a subroutine with the
(CI)
modifier.
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)
instruction only continues linear execution flow
by jumping to the location
PC + 3 (instr5)
. The two intervening instruc-
tions
(instr3, instr4)
are executed because of the delayed branch
(DB)
.
This
JUMP
instruction is only an example—a
JUMP (CI)
can perform a
JUMP
to any location.
Summary of Contents for ADSP-21261 SHARC
Page 30: ...Contents xxx ADSP 2126x SHARC Processor Hardware Reference ...
Page 40: ...Register Diagram Conventions xl ADSP 2126x SHARC Processor Hardware Reference ...
Page 58: ...Differences From Previous SHARCs 1 18 ADSP 2126x SHARC Processor Hardware Reference ...
Page 112: ...Secondary Processing Element PEy 2 54 ADSP 2126x SHARC Processor Hardware Reference ...
Page 178: ...Summary 3 66 ADSP 2126x SHARC Processor Hardware Reference ...
Page 204: ...DAG Instruction Summary 4 26 ADSP 2126x SHARC Processor Hardware Reference ...
Page 322: ...Setting Up DMA 7 32 ADSP 2126x SHARC Processor Hardware Reference ...
Page 436: ...SPORT Programming Examples 9 86 ADSP 2126x SHARC Processor Hardware Reference ...
Page 521: ...ADSP 2126x SHARC Processor Hardware Reference 11 31 Input Data Port rts IDP_ISR end ...
Page 522: ...Input Data Port Programming Example 11 32 ADSP 2126x SHARC Processor Hardware Reference ...
Page 590: ...Timer Programming Examples 14 20 ADSP 2126x SHARC Processor Hardware Reference ...
Page 796: ...I O Processor Registers A 174 ADSP 2126x SHARC Processor Hardware Reference ...
Page 800: ...B 4 ADSP 2126x SHARC Processor Core Manual ...
Page 846: ...Index I 36 ADSP 2126x SHARC Processor Hardware Reference ...