<?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 S32K312EVB-Q172 HardFault_Handler occurs before debugging starts in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K312EVB-Q172-HardFault-Handler-occurs-before-debugging-starts/m-p/1780050#M29944</link>
    <description>&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Burn the Debug code with PE, click the debug button, and the code is the starting stop position as shown in the figure. This version of the demo code has been successfully run, and hit the breakpoint debugging. The code has not changed. Re-burn the code to debug. Before debugging begins, there is b.n 0x407940 &amp;lt;HardFault_Handler&amp;gt; as shown in the figure.Who knows what the error is and how to fix it?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="企业微信截图_17035860311991.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/255913iFC192D938FF0699F/image-size/large?v=v2&amp;amp;px=999" role="button" title="企业微信截图_17035860311991.png" alt="企业微信截图_17035860311991.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Looking forward to answering. Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 26 Dec 2023 10:56:25 GMT</pubDate>
    <dc:creator>Sara_X</dc:creator>
    <dc:date>2023-12-26T10:56:25Z</dc:date>
    <item>
      <title>S32K312EVB-Q172 HardFault_Handler occurs before debugging starts</title>
      <link>https://community.nxp.com/t5/S32K/S32K312EVB-Q172-HardFault-Handler-occurs-before-debugging-starts/m-p/1780050#M29944</link>
      <description>&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Burn the Debug code with PE, click the debug button, and the code is the starting stop position as shown in the figure. This version of the demo code has been successfully run, and hit the breakpoint debugging. The code has not changed. Re-burn the code to debug. Before debugging begins, there is b.n 0x407940 &amp;lt;HardFault_Handler&amp;gt; as shown in the figure.Who knows what the error is and how to fix it?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="企业微信截图_17035860311991.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/255913iFC192D938FF0699F/image-size/large?v=v2&amp;amp;px=999" role="button" title="企业微信截图_17035860311991.png" alt="企业微信截图_17035860311991.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Looking forward to answering. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2023 10:56:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312EVB-Q172-HardFault-Handler-occurs-before-debugging-starts/m-p/1780050#M29944</guid>
      <dc:creator>Sara_X</dc:creator>
      <dc:date>2023-12-26T10:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: S32K312EVB-Q172 HardFault_Handler occurs before debugging starts</title>
      <link>https://community.nxp.com/t5/S32K/S32K312EVB-Q172-HardFault-Handler-occurs-before-debugging-starts/m-p/1781228#M30070</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/227487"&gt;@Sara_X&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Can you disable the &lt;U&gt;Run on reset&lt;/U&gt; option and step through the code from the reset vector?&lt;/P&gt;
&lt;P&gt;Which instruction is causing the fault?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1703861257591.png" style="width: 610px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256245i134D4DD491847EE9/image-dimensions/610x404?v=v2" width="610" height="404" role="button" title="danielmartynek_0-1703861257591.png" alt="danielmartynek_0-1703861257591.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2023 14:48:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312EVB-Q172-HardFault-Handler-occurs-before-debugging-starts/m-p/1781228#M30070</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2023-12-29T14:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: S32K312EVB-Q172 HardFault_Handler occurs before debugging starts</title>
      <link>https://community.nxp.com/t5/S32K/S32K312EVB-Q172-HardFault-Handler-occurs-before-debugging-starts/m-p/1794272#M31015</link>
      <description>&lt;P&gt;Hi.&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160001"&gt;@danielmartynek&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I disable the Run on reset option and step through the code from the reset vector.Also, I discovered that the code doesn't always enter the "hard fualt" function -- "HardFault_Handler()". Some days, the "hard fualt" is entered when executing the command "_INIT_DATA_BSS:bl init_data_bss" to erase the ".bss Section". On some days it is possible to enter "hard fualt" when executing "__SYSTEM_INIT:bl SystemInit", and on some days it is possible to execute:&lt;BR /&gt;"_MAIN:&lt;BR /&gt;cpsie i&lt;BR /&gt;bl startup_go_to_user_mode&lt;BR /&gt;bl main "and do not enter" hard fualt ".&lt;/P&gt;&lt;P&gt;The following two diagrams show where to enter the "hard fualt" function - "HardFault_Handler()" after entering the init_data_bss function and the SystemInit function.I haven't figured out why all three of these things happen.Can you help with the analysis?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sara_X_0-1706065754508.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/259755i145B5895A8000A5B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sara_X_0-1706065754508.png" alt="Sara_X_0-1706065754508.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sara_X_1-1706065777452.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/259756i9069CFE30DCB1D86/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sara_X_1-1706065777452.png" alt="Sara_X_1-1706065777452.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 03:12:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312EVB-Q172-HardFault-Handler-occurs-before-debugging-starts/m-p/1794272#M31015</guid>
      <dc:creator>Sara_X</dc:creator>
      <dc:date>2024-01-24T03:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: S32K312EVB-Q172 HardFault_Handler occurs before debugging starts</title>
      <link>https://community.nxp.com/t5/S32K/S32K312EVB-Q172-HardFault-Handler-occurs-before-debugging-starts/m-p/1794286#M31016</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi.&lt;/SPAN&gt;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160001" target="_blank"&gt;@danielmartynek&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After I replied to your email, I reset the software again, and it can run to line 629 again and then smoothly enter the main function without entering the hard fault function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sara_X_0-1706066882167.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/259760i1264679CEA518063/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sara_X_0-1706066882167.png" alt="Sara_X_0-1706066882167.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 03:29:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312EVB-Q172-HardFault-Handler-occurs-before-debugging-starts/m-p/1794286#M31016</guid>
      <dc:creator>Sara_X</dc:creator>
      <dc:date>2024-01-24T03:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: S32K312EVB-Q172 HardFault_Handler occurs before debugging starts</title>
      <link>https://community.nxp.com/t5/S32K/S32K312EVB-Q172-HardFault-Handler-occurs-before-debugging-starts/m-p/1794657#M31038</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/227487"&gt;@Sara_X&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;What kind of fault exception is it?&lt;/P&gt;
&lt;P&gt;Can you read the Fault Status Register (CSFR)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 12:36:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312EVB-Q172-HardFault-Handler-occurs-before-debugging-starts/m-p/1794657#M31038</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2024-01-24T12:36:44Z</dc:date>
    </item>
  </channel>
</rss>

