数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

AN421 数据表(PDF) 4 Page - STMicroelectronics

部件名 AN421
功能描述  In real time applications
PDF  11 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN421 数据表(HTML) 4 Page - STMicroelectronics

  AN421 Datasheet HTML 1Page - STMicroelectronics AN421 Datasheet HTML 2Page - STMicroelectronics AN421 Datasheet HTML 3Page - STMicroelectronics AN421 Datasheet HTML 4Page - STMicroelectronics AN421 Datasheet HTML 5Page - STMicroelectronics AN421 Datasheet HTML 6Page - STMicroelectronics AN421 Datasheet HTML 7Page - STMicroelectronics AN421 Datasheet HTML 8Page - STMicroelectronics AN421 Datasheet HTML 9Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 4 / 11 page
background image
Stack overflow detection principle
AN421
4/11
Doc ID 2476 Rev 2
2
Stack overflow detection principle
2.1
Summary of timer/watchdog features
The ST9 core includes a 16-bit down counter with an 8-bit prescaler capable of operating in
watchdog mode. This timer, driven by a clock at a frequency of INTCLK divided by 4, is able
to provide time periods within the range of 333 ns to 5.59 s (using a 12 MHz internal clock).
In watchdog mode, the Timer/Watchdog generates a fixed time base depending on the
Timer/Watchdog registers and prescaler, and to INTCLK. This time base can be modified on
the fly by changing the prescaler value. The new value will be taken into account only after
an End Of Count event. In watchdog mode, the End Of Count occurrence generates a
system reset.
In order to prevent the reset, the byte sequence AAh, 55h should be written into the Timer
Watchdog register Low. Once the write of 55h has been performed, the timer reloads the
prescaler register and the counting restarts from this value (the prescaler register value may
be modified between two End Of Count events).
Note:
1
For a better understanding of this application note; please refer to the ST9 Technical Manual
chapter on the 16-bit programmable Timer/Watchdog.
2
INTCLK: Internal Clock. This clock issued from the oscillator circuitry, divided or not by 2, is
the ST9 Internal Clock driving the peripherals. The maximum frequency allowed for INTCLK
is 12MHz.
2.2
Stack overflow detection
In many software applications, for example when running on ST9 ROMLESS versions or
without external memory space, the size of the stack is limited.
On ST9 devices, the system stack may be located in the Register File or in data memory
space. The ST9 stack pointer moves from the top to the bottom of the stack area.
A solution to detect stack overflow is to reserve the first two bytes after the bottom of the
stack and to store in these locations the Timer Watchdog restart value, AAh, 55h.
In the case of stack overflow, the data will be overwritten and thus destroyed and a system
reset will be generated on the next Timer Watchdog End Of Count.



Html Pages

1 2 3 4 5 6 7 8 9 10 11


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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