![](http://datasheet.mmic.net.cn/30000/MC68322FT16_datasheet_2368702/MC68322FT16_67.png)
Interrupt and Exception Handling
5-8
MC68322 USER’S MANUAL
MOTOROLA
During the first step, the core makes an internal copy of the internal status register (SR),
except during the reset exception, which does not make a copy of the internal status
register. Then the core changes to the supervisor mode by setting the S bit and inhibits
tracing of the exception routine by clearing the T bit in the SR. For the reset and interrupt
exceptions, the core also updates the interrupt priority mask in the internal status register.
During the second step, the core determines the vector number for the exception and
internal logic provides the vector number for all exceptions. This vector number is used in
the last step to calculate the address of the exception vector. Please note that throughout
this section, vector numbers are given in decimal notation.
The third step is to save the current core contents for all exceptions other than the reset
exception, which does not stack information. The core creates an exception stack frame on
the active supervisor stack and fills it with information appropriate for the type of exception.
Other information can also be stacked, depending on which exception is being processed
and the state of the core prior to the exception. Figure 5-6 illustrates the general form of the
exception stack frame.
Figure 5-6. General Form of an Exception Stack Frame
The last step initiates execution of the exception routine. The new internal program counter
value is fetched from the exception vector. The core then resumes instruction execution.
The instruction at the address in the exception vector is fetched and normal instruction
decoding and execution is started. The memory map for exception vectors is listed in
Table 5-3. The vector table is 512 words long (1,024 bytes), starting at address 0 (decimal),
and proceeding through address 1,023 (decimal). The vector table provides 255 unique
vectors, some of which are reserved for trap and other system function vectors. Of the 255,
192 are reserved for user interrupt vectors. However, the first 64 entries are not protected,
so user interrupt vectors may overlap at the discretion of the systems designer.
Note: All interrupt exceptions on the MC68322 are autovectored. See Section 5.4.2.2
Interrupt Exceptions for more details.
STATUS REGISTER
PROGRAM COUNTER
15
0
SP
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.