<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic S32K312 stack overflow detection in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K312-stack-overflow-detection/m-p/2058883#M46639</link>
    <description>&lt;P&gt;Does this chip detect stack overflow or underflow conditions?&lt;/P&gt;</description>
    <pubDate>Mon, 10 Mar 2025 16:13:00 GMT</pubDate>
    <dc:creator>rameshnairmetallic</dc:creator>
    <dc:date>2025-03-10T16:13:00Z</dc:date>
    <item>
      <title>S32K312 stack overflow detection</title>
      <link>https://community.nxp.com/t5/S32K/S32K312-stack-overflow-detection/m-p/2058883#M46639</link>
      <description>&lt;P&gt;Does this chip detect stack overflow or underflow conditions?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 16:13:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312-stack-overflow-detection/m-p/2058883#M46639</guid>
      <dc:creator>rameshnairmetallic</dc:creator>
      <dc:date>2025-03-10T16:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: S32K312 stack overflow detection</title>
      <link>https://community.nxp.com/t5/S32K/S32K312-stack-overflow-detection/m-p/2059252#M46650</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Sorry, there is no dedicated HW feature that would monitor the stack.&lt;/P&gt;
&lt;P&gt;I recommend you to take a look at the discussion in&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K/Failure-reaction-in-case-of-Stack-overflow-or-underflow-S32K1/m-p/838550/highlight/true" target="_self"&gt;Failure reaction in case of Stack overflow or underflow - S32K1&lt;/A&gt;&lt;BR /&gt;Safety manual for S32K1 suggest to use DWT. There are SW examples in the above discussion.&lt;BR /&gt;Safety manual for S32K3 does not explicitly talk about stack monitoring but the same method could be used.&lt;BR /&gt;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.&amp;nbsp;The MCU then detects a MemManage Fault exception when the stack overflows.&lt;/P&gt;
&lt;P&gt;Also, the application can also monitor the stack pointer by reading it.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Robin&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 06:47:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312-stack-overflow-detection/m-p/2059252#M46650</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2025-03-11T06:47:30Z</dc:date>
    </item>
  </channel>
</rss>

