SAF-C164SM Infineon Technologies, SAF-C164SM Datasheet - Page 427

no-image

SAF-C164SM

Manufacturer Part Number
SAF-C164SM
Description
16-Bit CMOS Microcontroller
Manufacturer
Infineon Technologies
Datasheet
The virtual stack addresses are transformed to physical stack addresses by
concatenating the significant bits of the Stack Pointer register SP (see
the complementary most significant bits of the upper limit of the physical stack area
(00’FBFE
The reset values (STKOV = FA00
map the virtual stack area directly to the physical stack area and allow use of the internal
system stack without any changes, provided that the 256 word area is not exceeded.
Figure 22-1 Physical Stack Address Generation
The following example demonstrates the circular stack mechanism which is also an
effect of this virtual stack mapping: First, register R1 is pushed onto the lowest physical
stack location according to the selected maximum stack size. With the following
instruction, register R2 will be pushed onto the highest physical stack location although
the SP is decremented by 2, as for the previous push operation.
MOV
PUSH
PUSH
User’s Manual
FBFE
FBFE
FBFE
FB7E
FB80
FB80
H
H
H
H
H
H
H
After PUSH
1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0
1
1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 0
1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0
1
1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 0
). This transformation is done via hardware (see
SP, #0F802H ;Set SP before last entry …
R1
R2
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
64 words
0
1
0
1
;… of physical stack of 256 words
;(SP)= F802H: Physical stack addr.= FA02H
;(SP)= F800H: Physical stack addr.= FA00H
;(SP)= F7FEH: Physical stack addr.= FBFEH
0
1
0
1
0
1
0
1
H
0
0
, STKUN = FC00
Phys.A.
<SP>
Phys.A.
<SP>
22-6
Stack Size
FBFE
FBFE
FBFE
F7FE
FA00
F800
H
H
H
H
H
H
H
, SP = FC00
After PUSH
1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0
1
1
1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0
1
1
1
1
1
1
Figure
1
1
1
1
1
1
1
1
System Programming
1
1
1
0
0
0
0
1
C164CM/C164SM
22-1).
1
0
1
1
H
256 words
0
0
1
1
, STKSZ = 000
Table
0
0
1
1
0
0
1
1
Derivatives
0
0
1
1
V1.0, 2002-02
0
0
1
1
22-2) with
MCA04408
0
0
1
1
0
0
1
1
0
0
1
1
0
0
0
0
B
)

Related parts for SAF-C164SM