Interrupt Processing Stack Area - Fujitsu 8FX Hardware Manual

8-bit microcontroller new 8fx family
Table of Contents

Advertisement

CHAPTER 5 INTERRUPTS
5.1 Interrupts
5.1.6

Interrupt Processing Stack Area

The stack area in RAM is used for interrupt processing. The stack pointer (SP)
contains the start address of the stack area.
■ Interrupt Processing Stack Area
The stack area is also used for saving and restoring the program counter (PC) when the
subroutine call instruction (CALL) or the vector call instruction (CALLV) is executed, and for
saving temporarily and restoring register contents by the PUSHW and POPW instructions.
• The stack area is secured on the RAM together with the data area.
• Initialize the stack pointer (SP) so that it indicates the biggest RAM address and make the
data area start from the smallest RAM address.
Figure 5.1-5 shows an example of setting the interrupt processing stack area.
Figure 5.1-5 Example of Setting Interrupt Processing Stack Area
Data area
Stack area
Note:
The stack area is utilized by interrupts, sub-routine calls, the PUSHW instruction, etc. in
descending order of addresses. It is released by return instructions (RETI, RET), the
POPW instruction, etc. in ascending order of addresses. If the address value of the stack
area used decreases due to nested interrupts or subroutine calls, do not let the stack
area overlap the data area and the general-purpose register area, both of which retain
other data.
80
0x0000
I/O
0x0080
RAM
0x0100
General-
purpose
register
0x0200
0x0280
Access
prohibited
Flash
memory
0xFFFF
FUJITSU SEMICONDUCTOR LIMITED
MB95630H Series
Recommended SP value
(when the biggest RAM address is 0x0280)
Addresses vary among products. For details,
refer to the device data sheet.
MN702-00009-2v0-E

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb95630h series

Table of Contents