
5- 70
MC68330 USER'S MANUAL
MOTOROLA
An NMI is generated each time the interrupt request level changes to level seven
(regardless of priority mask value), and each time the priority mask changes from seven to
a lower number while the request level remains at seven.
Many M68000 peripherals provide for programmable interrupt vector numbers to be used
in the system interrupt request/acknowledge mechanism. If the vector number is not
initialized after reset and if the peripheral must acknowledge an interrupt request, the
peripheral should return the uninitialized interrupt vector number (15).
See Section 4 System Integration Module for detailed information on interrupt
acknowledge cycles.
5.6.2.12 RETURN FROM EXCEPTION. When exception stacking operations for all
pending exceptions are complete, the processor begins execution of the handler for the
last exception processed. After the exception handler has executed, the processor must
restore the system context in existence prior to the exception. The RTE instruction is
designed to accomplish this task.
When RTE is executed, the processor examines the stack frame on top of the supervisor
stack to determine if it is valid and determines what type of context restoration must be
performed. See 5.6.4 CPU32 Stack Frames for a description of stack frames.
For a normal four-word frame, the processor updates the SR and PC with data pulled from
the stack, increments the SSP by eight, and resumes normal instruction execution. For a
six-word frame, the SR and PC are updated from the stack, the active SSP is incremented
by 12, and normal instruction execution resumes.
For a bus fault frame, the format value on the stack is first checked for validity. In addition,
the version number on the stack must match the version number of the processor that is
attempting to read the stack frame. The version number is located in the most significant
byte (bits [15:8]) of the internal register word at location SP
+ $14 in the stack frame. The
validity check ensures that stack frame data will be properly interpreted in multiprocessor
systems.
If a frame is invalid, a format error exception is taken. If it is inaccessible, a bus error
exception is taken. Otherwise, the processor reads the entire frame into the proper internal
registers, de-allocates the stack (12 words), and resumes normal processing. Bus error
frames for faults during exception processing require the RTE instruction to rewrite the
faulted stack frame. If an error occurs during any of the bus cycles required by rewrite, the
processor halts.
If a format error occurs during RTE execution, the processor creates a normal four-word
fault stack frame below the frame that it was attempting to use. If a bus error occurs, a
bus-error stack frame will be created. The faulty stack frame remains intact, so that it may
be examined and repaired by an exception handler or used by a different type of
processor (e.g., an MC68010, MC68020, or a future M68000 processor) in a
multiprocessor system.
5.6.3 Fault Recovery
There are four phases of recovery from a fault: recognizing the fault, saving the processor
state, repairing the fault (if possible), and restoring the processor state. Saving and
restoring the processor state are described in the following paragraphs.