Interrupt Processing
4-54
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
[--SP] = FP ;
[-- SP] = (R7:0, P5:0) ;
/* Body of service routine. Note none of the processor resources
(accumulators, DAGs, loop counters and bounds) have been saved.
It is assumed this interrupt service routine does not use the
processor resources. */
Example Epilog Code for Nested Interrupt Service Routine
Listing 4-4. Epilog Code for Nested ISR
/* Epilog code for nested interrupt service routine.
Restore ASTAT, Data and Pointer registers. Popping RETI from
Supervisor stack ensures that interrupts are suspended between
load of return address and RTI. */
(R7:0, P5:0) = [SP++] ;
FP = [SP++] ;
ASTAT = [SP++] ;
RETI = [SP++] ;
/* Execute RTI, which jumps to return address, re-enables inter-
rupts, and switches to User mode if this is the last nested
interrupt in service. */
RTI;
The
RTI
instruction causes the return from an interrupt. The return
address is popped into the
RETI
register from the stack, an action that sus-
pends interrupts from the time that
RETI
is restored until
RTI
finishes
executing. The suspension of interrupts prevents a subsequent interrupt
from corrupting the
RETI
register.
Next, the
RTI
instruction clears the highest priority bit that is currently set
in
IPEND
. The processor then jumps to the address pointed to by the value
in the
RETI
register and re-enables interrupts by clearing
IPEND[4]
.
Summary of Contents for ADSP-BF53x Blackfin
Page 38: ...Conventions xxxviii ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 134: ...System Reset and Powerup 3 18 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 324: ...Instruction Overview 7 20 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 486: ...Instruction Overview 13 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 512: ...Instruction Overview 14 26 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 604: ...Instruction Overview 15 92 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 688: ...Instruction Overview 18 48 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 742: ...Instruction Overview 19 54 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 752: ...Examples 20 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 790: ...ADSP BF535 Flags A 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 800: ...Performance Monitor Registers B 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 1042: ...Index I 40 ADSP BF53x BF56x Blackfin Processor Programming Reference...