Interrupt controller (ITC) RM0016
60/449 Doc ID 14587 Rev 8
6.2.1 Servicing pending interrupts
Several interrupts can be pending at the same time. The interrupt to be taken into account is
determined by the following two-step process:
1. The highest software priority interrupt is serviced.
2. If several interrupts have the same software priority then the interrupt with the highest
hardware priority is serviced first.
When an interrupt request is not serviced immediately, it is latched and then processed
when its software priority combined with the hardware priority becomes the highest one.
Note: 1 The hardware priority is exclusive while the software one is not. This allows the previous
process to succeed with only one interrupt.
2 RESET, TLI and TRAP are considered as having the highest software priority in the decision
process.
See Figure 14 for a description of pending interrupt servicing process.
Figure 14. Priority decision process
6.2.2 Interrupt sources
Two interrupt source types are managed by the STM8 interrupt controller:
● Non-maskable interrupts: RESET, TLI and TRAP
● Maskable interrupts: external interrupts or interrupts issued by internal peripherals
Non-maskable interrupt sources
Non-maskable interrupt sources are processed regardless of the state of bits I1 and I0 of
the CCR register (see Figure 13). PC, X, Y, A and CCR registers are stacked only when a
PENDING
SOFTWARE
Different
INTERRUPTS
Same
HIGHEST HARDWARE
PRIORITY SERVICED
PRIORITY
HIGHEST SOFTWARE
PRIORITY SERVICED