Topic : Stack in the ride windows

Forum : ST7/STM8

Original Post
Post Information Post
March 2, 2007 - 3:08pm
Guest

Hi,under ride >View>stack during a debug session,I see an address,
like {Sp:1FFh} call pippo1.

I want to know what this mean.My micro is an st72f324j4 (16k flash 512ram)
How Can I check if there is an overflow sometime ?

thanks

E.P.

Replies
Post Information Post
+1
0
-1
March 5, 2007 - 3:20pm
Guest

01FFH matches with the reset value of the stack pointer. When the stack view contains only this value, it means that you are still in the "main" function that is reached by a JP instruction from the startup (I assume that you are writing a C program).
An overflow would occur when SP reaches the bottom of the stack space. With the simulator, you can set a "write breakpoint" at this address to detect a stack overflow.

Francis