* High byte (H) of index register is not automatically stacked.
STACKING
ORDER
7
5
5
4
4
3
3
*
1
1
2
2
0
UNSTACKING
ORDER
PROGRAM COUNTER LOW
CONDITION CODE REGISTER
ACCUMULATOR
INDEX REGISTER (LOW BYTE X)
PROGRAM COUNTER HIGH
TOWARD LOWER ADDRESSES
TOWARD HIGHER ADDRESSES
SP BEFORE
SP AFTER
INTERRUPT STACKING
THE INTERRUPT
Figure 5-1. Interrupt stack frame
When an RTI instruction executes, these values are recovered from the stack in reverse
order. As part of the RTI sequence, the CPU fills the instruction pipeline by reading three
bytes of program information, starting from the PC address recovered from the stack.
The status flag causing the interrupt must be acknowledged (cleared) before returning
from the ISR. Typically, the flag must be cleared at the beginning of the ISR because if
another interrupt is generated by this source it will be registered so that it can be serviced
after completion of the current ISR.
5.1.2 Interrupt vectors, sources, and local masks
The following table provides a summary of all interrupt sources. High-priority sources
are located toward the bottom of the table. The high-order byte of the address for the
interrupt service routine is located at the first address in the vector address column, and
the low-order byte of the address for the interrupt service routine is located at the next
higher address.
When an interrupt condition occurs, an associated flag bit is set. If the associated local
interrupt enable is 1, an interrupt request is sent to the CPU. If the global interrupt mask
(I bit in the CCR) is 0, the CPU finishes the current instruction, stacks the PCL, PCH, X,
A, and CCR CPU registers, sets the I bit, and then fetches the interrupt vector for the
highest priority pending interrupt. Processing then continues in the interrupt service
routine.
Chapter 5 Interrupt
MC9S08PT60 Reference Manual, Rev. 4, 08/2014
Freescale Semiconductor, Inc.
123
Содержание MC9S08PT60
Страница 2: ...MC9S08PT60 Reference Manual Rev 4 08 2014 2 Freescale Semiconductor Inc...
Страница 34: ...MC9S08PT60 Reference Manual Rev 4 08 2014 34 Freescale Semiconductor Inc...
Страница 40: ...System clock distribution MC9S08PT60 Reference Manual Rev 4 08 2014 40 Freescale Semiconductor Inc...
Страница 120: ...Flash and EEPROM registers descriptions MC9S08PT60 Reference Manual Rev 4 08 2014 120 Freescale Semiconductor Inc...
Страница 200: ...Port data registers MC9S08PT60 Reference Manual Rev 4 08 2014 200 Freescale Semiconductor Inc...
Страница 228: ...System clock gating control registers MC9S08PT60 Reference Manual Rev 4 08 2014 228 Freescale Semiconductor Inc...
Страница 262: ...Human machine interfaces HMI MC9S08PT60 Reference Manual Rev 4 08 2014 262 Freescale Semiconductor Inc...
Страница 298: ...Functional Description MC9S08PT60 Reference Manual Rev 4 08 2014 298 Freescale Semiconductor Inc...
Страница 396: ...FTM Interrupts MC9S08PT60 Reference Manual Rev 4 08 2014 396 Freescale Semiconductor Inc...
Страница 440: ...Functional description MC9S08PT60 Reference Manual Rev 4 08 2014 440 Freescale Semiconductor Inc...
Страница 468: ...Initialization Application Information MC9S08PT60 Reference Manual Rev 4 08 2014 468 Freescale Semiconductor Inc...
Страница 570: ...Application information MC9S08PT60 Reference Manual Rev 4 08 2014 570 Freescale Semiconductor Inc...
Страница 648: ...Memory map and register description MC9S08PT60 Reference Manual Rev 4 08 2014 648 Freescale Semiconductor Inc...
Страница 676: ...Resets MC9S08PT60 Reference Manual Rev 4 08 2014 676 Freescale Semiconductor Inc...