M30622MA-XXXFP RENESAS [Renesas Technology Corp], M30622MA-XXXFP Datasheet - Page 513

no-image

M30622MA-XXXFP

Manufacturer Part Number
M30622MA-XXXFP
Description
16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY
Manufacturer
RENESAS [Renesas Technology Corp]
Datasheet
Interrupt
498
Figure 4.3.3. State of stack before and after acceptance of interrupt request
4.3.3 Saving Registers
In the interrupt sequence, only the contents of the flag register (FLG) and that of the program counter
(PC) are saved in the stack area.
First, the processor saves the four higher-order bits of the program counter, and 4 upper-order bits and 8
lower-order bits of the FLG register, 16 bits in total, in the stack area, then saves 16 lower-order bits of the
program counter. Figure 4.3.3 shows the state of the stack as it was before the acceptance of the
interrupt request, and the state the stack after the acceptance of the interrupt request.
Save other necessary registers at the beginning of the interrupt routine using software. Using the
PUSHM instruction alone can save all the registers except the stack pointer (SP).
Address
m – 4
m – 3
m – 2
m – 1
Stack status before interrupt request
is acknowledged
m + 1
m
MSB
Content of previous stack
Content of previous stack
Stack area
LSB
[SP]
Stack pointer
value before
interrupt occurs
Address
m – 4
m – 3
m – 2
m – 1
m
m + 1
Stack status after interrupt request
is acknowledged
MSB
Flag register
Content of previous stack
Content of previous stack
Program counter (PC
Program counter (PC
(FLG
Flag register (FLG
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Stack area
H
)
counter (PC
Program
L
)
L
M
)
)
LSB
H
)
Mitsubishi microcomputers
M16C / 62 Group
[SP]
New stack
pointer value

Related parts for M30622MA-XXXFP