stack underflow and overflow control

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

stack underflow and overflow control

ソリューションへジャンプ
575件の閲覧回数
smt87
Contributor II

Hi,

I want to control stack underflow and overflow. I use S32K116. I know it does not have DWT module. How can i control this safety controls in any way? What can i do for testing stack underflow?

0 件の賞賛
1 解決策
564件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if a stack is placed at beginning/end of SRAM then you can get a hard fault as soon as the stack overflows/underflow.
Or software can write a unique guard value to the SRAM area at the stack limit address. The software checks this address periodically. If guard value is overwritten, a stack overflow/underflow fault is reported by SW.

BR, Petr

元の投稿で解決策を見る

0 件の賞賛
1 返信
565件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if a stack is placed at beginning/end of SRAM then you can get a hard fault as soon as the stack overflows/underflow.
Or software can write a unique guard value to the SRAM area at the stack limit address. The software checks this address periodically. If guard value is overwritten, a stack overflow/underflow fault is reported by SW.

BR, Petr

0 件の賞賛