ST72361xx-Auto
Table 12. Interrupt software priority levels
Interrupt software priority
Level
Level 0 (main)
Level 1
Level 2
Level 3 (= interrupt disable)
Low
High
I1
1
0
1
Interrupts
I0
0
1
0
1
Figure 17. Interrupt processing flowchart
RESET
RESTORE PC, X, A, CC
FROM STACK
PENDING
Y
INTERRUPT
N
TLI
Y
Interrupt has the same or a
lower software priority
than current one
N
I1:0
FETCH NEXT
INSTRUCTION
THE INTERRUPT
STAYS PENDING
Y
“IRET”
N
EXECUTE
INSTRUCTION
STACK PC, X, A, CC
LOAD I1:0 FROM INTERRUPT SW REG.
LOAD PC FROM INTERRUPT VECTOR
Servicing pending interrupts
As several interrupts can be pending at the same time, the interrupt to be taken into account
is determined by the following two-step process:
● the highest software priority interrupt is serviced,
● if several interrupts have the same software priority then the interrupt with the highest
hardware priority is serviced first.
Figure 18 describes this decision process.
Figure 18. Priority decision process
PENDING
INTERRUPTS
Same
SOFTWARE
PRIORITY
Different
HIGHEST HARDWARE
PRIORITY SERVICED
HIGHEST SOFTWARE
PRIORITY SERVICED
Doc ID 12468 Rev 3
49/279