A SERVICE OF

logo

119
Chapter 5 CPU Registers
2.Dedicated Registers
2.6 USP: User Stack Pointer
User Stack Pointer (USP) consists of 32 bits.
Figure 2-10 Bit Structure of User Stack Pointer (USP)
When S flag is “1”, this pointer works as R15.
You can explicitly specify USP.
You can not use it for RETI instruction.
This pointer saves and returns PC and PS values at the position where system stack pointer (SSP) indicates. After
interrupt, it stores PC in address where SSP indicates, and PS in (SSP+4) address.
Figure 2-11 Interrupt Stack
31
[Initial value]
USP 00000000
H
0
[Example]
[Before interrupt] [After interrupt]
SSP SSP
80000000
H
7FFFFFFCH
7FFFFFF8H
80000000H
7FFFFFFCH
7FFFFFF8H
PS
PC
80000000
H
7FFFFFF8H
Memory