EasyManua.ls Logo

Abov A96G174 - Extended Stack Pointer of 94;96;97 Series Core; Figure 100. Configuration of the Extended Stack Pointer

Abov A96G174
211 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Development tools A96G174/A96S174 User’s manual
190
18.2.4 Extended stack pointer of 94/96/97 series core
The M8051 uses IRAM area for Stack Pointer. However, 94-series and 97-series microcontrollers use
both IRAM area and XRAM area for the Stack Pointer by configuring additional registers.
The XSP and XSPCR registers are involved in this functionality as described below:
By configuring the XSP/XSPCR register, you can use the XRAM area for the Stack Pointer.
The XSPCR decides whether to use XRAM for the Stack Pointer.
If XSPCR = 0, the IRAM is available for the Stack Pointer.
If XSPCR = 1, the XRAM is available for the Stack Pointer.
The XSP decides a position of XRAM Stack Pointer.
This is valid only if XSPCR=1.
Figure 100. Configuration of the Extended Stack Pointer
STACK_POINTER = {XSP[7:0],SP[7:0]} = XRAM_TOP STACK_SIZE
Ex) If only 256bytes of XRAM will be used for stack,
XRAM_TOP = 4K(0x0FFF)
STACK_SIZE = 256byte(0x0100)
XSPCR= 1, XSP= 0x0E
SP=0xFF setting
Stack Pointer Position = 0x0FFF - 0x0100= 0x0EFF
XSPCR= 0
0x00
0xFF
0x0000
XRAM_TOP
XSPCR= 1
XRAM
stack
Area
IRAM use
XRAM use
0x0EFF

Table of Contents

Related product manuals