Example Code For An Exception Routine - Analog Devices ADSP-BF53x Blackfin Reference

Table of Contents

Advertisement

Hardware Errors and Exception Handling
/* The jump table EVTABLE holds 16-bit address offsets for each
event. With offsets, this code is position independent and the
table is small.
+--------------+
| addr_event1
+--------------+
| addr_event2
+--------------+
|
. . .
+--------------+
| addr_eventN
+--------------+
*/

Example Code for an Exception Routine

The following code provides an example framework for an interrupt rou-
tine jumped to from an exception handler such as that described above.
Listing 4-6. Interrupt Routine for Handling Exception
[--SP] = RETI ;
/* Put body of routine here.*/
RETI = [SP++] ;
RTI ;
/* Return from interrupt. */
4-70
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
| _EVTABLE
| _EVTABLE + 2
|
| _EVTABLE + 2N
/* Push return address on stack. */
/* To return, pop return address and jump. */

Advertisement

Table of Contents
loading

This manual is also suitable for:

Adsp-bf56x blackfin

Table of Contents