22. Development tools
A96G150 User's manual
312
22.2.4
Extended Stack Pointer of 94/96/97 Series core
M8051 uses IRAM area for Stack Pointer. However, 94-series and 97-series microcontrollers use not
only IRAM area but also XRAM area for Stack Pointer by configuring additional registers.
The setting procedure is as follows:
1.
Using the XSP/XSPCR register, you can use XRAM area for Stack Pointer.
2.
The XSPCR decides whether to use XRAM for Stack Pointer.
━
If XSPCR=
’
0
’
, IRAM is available for Stack Pointer.
━
If XSPCR=
’
1
’
, XRAM is available for Stack Pointer.
3.
The XSP decides a position of XRAM Stack Pointer.
━
This is valid only if XSPCR=
’
1
’
.
Figure 140. 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
Содержание A96G150
Страница 126: ...12 Timer 0 1 2 3 4 5 A96G150 User s manual 126 Figure 43 16 bit Timer Counter Mode Operation Example...
Страница 136: ...12 Timer 0 1 2 3 4 5 A96G150 User s manual 136 Figure 51 16 bit Timer Counter Mode Operation Example...
Страница 147: ...A96G150 User s manual 12 Timer 0 1 2 3 4 5 147 Figure 59 16 bit Timer Counter Mode Operation Example...
Страница 157: ...A96G150 User s manual 12 Timer 0 1 2 3 4 5 157 Figure 67 16 bit Timer Counter Mode Operation Example...
Страница 171: ...A96G150 User s manual 14 12 bit ADC 171 Figure 79 ADC Operation Flow Sequence...
Страница 333: ...A96G150 User s manual Revision history 333 Revision history Revision Date Notes 1 00 2022 06 22 First creation...