| 数据搜索系统,热门电子元器件搜索 |
|
STM8S 数据表(PDF) 32 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
STM8S 数据表(HTML) 32 Page - STMicroelectronics |
|
32 / 467 page ![]() Memory and register map RM0016 32/467 DocID14587 Rev 14 Customized stack model STM8S and STM8AF stack pointer handling allows a customized stack model to be implemented. This permits a flexible stack size without restrictions due to the stack roll-over limit. Implementing the customized stack also benefits portability of the software on products with different memory configurations. Figure 5 shows the customized stack model. Figure 5. Customized stack model 1. The stack roll-over limit is not implemented on all devices. 2. The guard cells are RAM locations that have to be continuously polled by the application program to detect whether a stack overflow has taken place. In this stack model, the initial stack pointer must be placed beyond the stack roll-over limit. Consequently, the growing stack never reaches the stack roll-over limit. It is clear that in this implementation the stack size is not limited by the roll-over mechanism. Nevertheless, the user has to define the stack position and stack size in the link file, and he has to ensure that the stack pointer does not exceed the defined stack area (stack overflow or under-run). The RAM locations above and below the customized stack can be regularly used as RAM to store variables or other information. Guard cells can be implemented at the lower end of the stack to detect if the stack pointer exceeds the defined limit. These cells are standard RAM locations, initialized with fixed values that the stack overwrites if an overflow occurs. The user software can regularly poll these cells, detect the overflow condition, and put the application in a fail safe state. During the software validation phase hardware breakpoints can be set at both limits of the stack to validate that neither a stack overflow nor an under-run happens. ai15056v2 Customized stack model End address Stack roll-over limit (1) Stack pointer initialization value Start address RAM Optional guard cells (2) Flexible stack size |
|
链接网址 |
| 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 |