S32K312 stack overflow detection

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

S32K312 stack overflow detection

1,002件の閲覧回数
rameshnairmetallic
Contributor I

Does this chip detect stack overflow or underflow conditions?

0 件の賞賛
返信
1 返信

976件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Sorry, there is no dedicated HW feature that would monitor the stack.

I recommend you to take a look at the discussion in Failure reaction in case of Stack overflow or underflow - S32K1
Safety manual for S32K1 suggest to use DWT. There are SW examples in the above discussion.
Safety manual for S32K3 does not explicitly talk about stack monitoring but the same method could be used.
Another option is to use MPU(memory protection unit) when you can configure small area bellow the stack as write-protected, so an exception is triggered in case of underflow. The MCU then detects a MemManage Fault exception when the stack overflows.

Also, the application can also monitor the stack pointer by reading it.

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛
返信