3 Program Sequencing
3.6.8
Clearing The Current Interrupt For Reuse
Normally the ADSP-2106x ignores and does not latch an interrupt that
reoccurs while its service routine is already executing. When the
interrupt initially occurs, the corresponding bit in IRPTL is set. During
execution of the service routine, this bit is kept cleared—the
ADSP-2106x clears the bit during every cycle, preventing the same
interrupt from being latched while its service routine is already
executing.
The clear interrupt (CI) modifier of the JUMP instruction, however,
allows the reuse of an interrupt while it is being serviced. This can be
useful in systems that require fast interrupt response and low interrupt
latency. The JUMP (CI) instruction should be located within the
interrupt service routine. JUMP (CI) clears the status of the current
interrupt without leaving the interrupt service routine, reducing the
interrupt routine to a normal subroutine—this allows the interrupt to
occur again, as a result of a different event or task in the ADSP-2106x
system.
The JUMP (CI) instruction reduces an interrupt service routine to a
normal subroutine by clearing the appropriate bit in the interrupt latch
register (IRPTL) and interrupt mask pointer (IMASKP) and popping
the status stack. The ADSP-2106x then stops automatically clearing the
interrupt's latch bit (in IRPTL) in every cycle, allowing the interrupt to
occur again.
When returning from a subroutine which has been reduced from an
interrupt service routine with a JUMP (CI) instruction, the (LR)
modifier of the RTS instruction must be used (in case the interrupt
occurred during the last two instructions of a loop). Refer to "General
Restrictions" in Section 3.5, "Loops", for a description of the RTS (LR)
instruction.
The following example shows an interrupt service routine that is
reduced to a subroutine with the (CI) modifier:
instr1;
JUMP(PC,3) (DB,CI);
instr3;
instr4;
instr5;
RTS (LR);
3 – 30
www.BDTIC.com/ADI
{interrupt entry from main program}
{clear interrupt status}
{use LR modifier with return from subroutine}
Need help?
Do you have a question about the ADSP-2106x SHARC and is the answer not in the manual?
Questions and answers