beautypg.com

Stack pointer configuration, Recovery from eit handler – FUJITSU FR family 32-bit microcontroller instruction manuel CM71-00101-5E User Manual

Page 52

background image

28

CHAPTER 3 REGISTER DESCRIPTIONS

Figure 3.3-13 Example of Stack Pointer Operation in Execution of Instruction "ST R13, @-R15"

when "S" Flag = 1

Stack Pointer Configuration

Figure 3.3-14 shows the bit configuration of the stack pointer.

Figure 3.3-14 Bit Configuration of the Stack Pointers

Functions of the System Stack Pointer and User Stack Pointer

Automatic increment/decrement of stack pointer

The stack pointer uses automatic pre-decrement/post-increment counting.

Stack Pointer Initial Value

The "SSP" has the initial value "00000000

H

". The "USP" initial value is undefined.

Recovery from EIT handler

When RETI instruction is used for recovery from an EIT handler, it is necessary to set the "S" flag to "0"

and select the system stack. For further details, see "

Recovery from EIT handler" of "4.2 Basic

Operations in "EIT" Processing".

Memory space

????????

????????

Before execution of ST R13,@-R15

12345678

H

76543210

H

SSP

USP

17263540

H

1

R13

CCR

FFFFFFFF

H

After execution of ST R13,@-R15

12345678

H

7654320C

H

SSP

USP

17263540

H

17263540

H

1

R13

CCR

S

S

00000000

H

Memory space

FFFFFFFF

H

00000000

H

Bit no.

SSP

USP

31

00