S3F84B8_UM_REV 1.00
5 INTERRUPT STRUCTURE
5-14
5.1.14 INTERRUPT SOURCE POLLING SEQUENCE
The interrupt request polling and servicing sequence is as follows:
1. A source generates an interrupt request by setting the interrupt request bit to “1”.
2. The CPU polling procedure identifies a pending condition for that source.
3. The CPU checks the source’s interrupt level.
4. The CPU generates an interrupt acknowledge signal.
5. Interrupt logic determines the interrupt’s vector address.
6. The service routine starts and the source’s pending bit is cleared to “0” (by the hardware or software).
7. The CPU continues polling for interrupt requests.
5.1.15 INTERRUPT SERVICE ROUTINES
Before an interrupt request is serviced, the following conditions must be met:
Interrupt processing must be enabled globally (EI, SYM.0 = “1”).
The interrupt level must be enabled (IMR register).
The interrupt level must have the highest priority if more than one level is currently requesting service.
The interrupt must be enabled at the interrupt’s source (peripheral control register).
When all the above conditions are met, the interrupt request is acknowledged at the end of instruction cycle. The
CPU then initiates an interrupt machine cycle that completes the following processing sequence:
1. Reset (clear to “0”) the interrupt enable bit in the SYM register (SYM.0) to disable all subsequent interrupts.
2. Save the program counter (PC) and status flags to the system stack.
3. Branch to the interrupt vector to fetch the address of service routine.
4. Pass control to the interrupt service routine.
When the interrupt service routine is completed, the CPU issues an Interrupt Return (IRET). The IRET restores
the PC and status flags and sets SYM.0 to “1”. It allows the CPU to process the next interrupt request.