Fujitsu F2MC-16LX Hardware Manual page 111

Mb90470 series 16-bit microcontroller
Hide thumbs Also See for F2MC-16LX:
Table of Contents

Advertisement

I Stack operation during return from interrupt processing
At the end of interrupt processing, if the interrupt return instruction (RETI) is executed, PS, PC,
PCB, DTB, ADB, DPR, and A values are returned from the stack in the reverse order of the
interrupt processing. The dedicated registers are then restored to their previous state (i.e.,
immediately before the interrupt started).
I Stack area
❍ Assigning the stack area
The stack area is used for storage and return of the program counter (PCD) required for
executing interrupt processing, subroutine call instruction (CALL) and vector call instruction
(CALLV), as well as temporary storage and return of registers executed by using the PUSHW
and POPW instructions. The stack area is assigned in RAM in addition to the data area.
Figure 3.9-2 "Stack area" shows the stack area.
Vector table
(Reset/interrupt
vector call instructions)
*1 Built-in ROM capacity differs depending on the product type.
*2 Built-in RAM capacity differs depending on the product type.
Note:
If specifying addresses of the stack pointers (SSP, USP), specify them with even numbers.
Assign the system stack area, user stack area, and data area while avoiding duplication with
one another.
❍ System stack and user stack
Interrupt processing uses the system stack area. Even if the user stack area is being used
when an interrupt occurs, it is forcibly switched to the system stack. Thus, the system that uses
primarily the user stack area must also correctly prepare the system stack area. Use only the
system stack unless the stack space must be separated.
Figure 3.9-2 Stack area
FFFFFF
FFFC00
FF0000
000D00
000380
H
Stack area
000180
H
000100
H
0000D0
000000
H
H
H
ROM area
*1
H
*2
H
Built-in RAM area
General-purpose
register bank area
H
Built-in I/O area
CHAPTER 3 INTERRUPT
95

Advertisement

Table of Contents
loading

Table of Contents