| 数据搜索系统,热门电子元器件搜索 |
|
AN421 数据表(PDF) 6 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN421 数据表(HTML) 6 Page - STMicroelectronics |
|
6 / 11 page ![]() Software description AN421 6/11 Doc ID 2476 Rev 2 3 Software description 3.1 Stack initialization The following example initializes the system stack in groups D and C of the Register File. In the stack management of the ST9, the stack pointer is automatically pre-decremented before the data is stored on the stack. So the expression: SSTACK = (BKE * 16) - 1 defines the first location of the system stack in group D and C within the Register File, while the instruction: ld SSPLR,#SSTACK + 1 initializes the system stack pointer in the system register. The instruction: ldw RR#END_SSTACK,#0AA55h initializes the first two bytes following the bottom of the system stack with the value used to restart the Timer/Watchdog. Initialization Figure 2. System stack initialization ;*************************************************************** ; STACK Declaration and end of stack initialisation ; in RAM space or Register File ;*************************************************************** ; Initialisation in Register FIle SSTACK := (BKE * 16) - 1 ; Sys.stack add.group LG-SSTACK := 32 ; Sys.stack length END_SSTACK := (BKE * 16) - LG_SSTACK ; Last sys.stack byte ld SSPLR,#SSTACK + 1 ; Load sys.stack pointer ldw RR#END_STACK - 2,#0AA55h ; Init end of stack. ; Initialisation in RAM space SSTACK := 2000h ; top of sys.stack END-STACK := 1000h ; Init end of stack essp = rr0 sdm ldw SSPR,#SSTACK ; Select data space ld essp,#END_SSTACK ; Init End of sys.stack ldw -2(essp),#0AA55h |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |