<?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 Re: HOW TO DEBUG A HARDFAULT FOR S32K144-EVQ IN S32DS IDE in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/HOW-TO-DEBUG-A-HARDFAULT-FOR-S32K144-EVQ-IN-S32DS-IDE/m-p/1881391#M12380</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am also facing same&amp;nbsp;&lt;SPAN&gt;Hardfault with CAN MCAL example in S32K144W code? Example code used flexcan0, but for that clocks are configured correctly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What could cause this fault with example code?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jun 2024 08:52:55 GMT</pubDate>
    <dc:creator>nirmal_masilamani</dc:creator>
    <dc:date>2024-06-05T08:52:55Z</dc:date>
    <item>
      <title>HOW TO DEBUG A HARDFAULT FOR S32K144-EVQ IN S32DS IDE</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/HOW-TO-DEBUG-A-HARDFAULT-FOR-S32K144-EVQ-IN-S32DS-IDE/m-p/1401368#M8151</link>
      <description>&lt;P&gt;Hi everyone!&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I know what code triggered the following Hardfault?&lt;/P&gt;&lt;P&gt;I have this hardfault:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="imagen3.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/168100i6FCF00161BAD2DE6/image-size/large?v=v2&amp;amp;px=999" role="button" title="imagen3.jpg" alt="imagen3.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as I know when&amp;nbsp;when you're in a hardfault some core registers are stored in memory stack&lt;/P&gt;&lt;P&gt;I've checked the following registers:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="imagen 4.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/168106i34A5011D7C5DEF79/image-size/large?v=v2&amp;amp;px=999" role="button" title="imagen 4.jpg" alt="imagen 4.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then it tells me this is a bus fault and BFAR register holds the address of the fault but I don´t now exactly if this address I should to put in memory browser or dissasembly window and this gives me the offending code or what other thing I should do to get the offending code that triggered hardfault.&lt;/P&gt;&lt;P&gt;What I have to do next?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 05:10:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/HOW-TO-DEBUG-A-HARDFAULT-FOR-S32K144-EVQ-IN-S32DS-IDE/m-p/1401368#M8151</guid>
      <dc:creator>R2_D2</dc:creator>
      <dc:date>2022-01-19T05:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO DEBUG A HARDFAULT FOR S32K144-EVQ IN S32DS IDE</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/HOW-TO-DEBUG-A-HARDFAULT-FOR-S32K144-EVQ-IN-S32DS-IDE/m-p/1401683#M8153</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/194882"&gt;@R2_D2&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;It is all explained here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32K-Knowledge-Base/Fault-handling-on-S32K14x/ta-p/1114447" target="_blank"&gt;https://community.nxp.com/t5/S32K-Knowledge-Base/Fault-handling-on-S32K14x/ta-p/1114447&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any specific questions, please let me know,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 11:27:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/HOW-TO-DEBUG-A-HARDFAULT-FOR-S32K144-EVQ-IN-S32DS-IDE/m-p/1401683#M8153</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2022-01-19T11:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO DEBUG A HARDFAULT FOR S32K144-EVQ IN S32DS IDE</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/HOW-TO-DEBUG-A-HARDFAULT-FOR-S32K144-EVQ-IN-S32DS-IDE/m-p/1403443#M8155</link>
      <description>&lt;P&gt;Thank you so much daniel for your support I read the post you suggested me&lt;/P&gt;&lt;P&gt;but I cannot identify what is the offending code I just find this value in BFARVALID register:0x40024000 then I put this value into dissasembly window and only shows me the following instruction:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="R2_D2_1-1642794778526.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/168520iE6BF0EF0213D0890/image-size/medium?v=v2&amp;amp;px=400" role="button" title="R2_D2_1-1642794778526.png" alt="R2_D2_1-1642794778526.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I almost forget to mention this project I am using Freertos and when I exit from one task to another I had noticed this busfault happens&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="R2_D2_0-1642794144453.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/168516iAC7884B39CC22125/image-size/medium?v=v2&amp;amp;px=400" role="button" title="R2_D2_0-1642794144453.png" alt="R2_D2_0-1642794144453.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I almost forget to mention I am using Freertos I´ve noticed when I exit from one task to enter to another one this busfault happens. This is the first task running as you can see I update a global variable&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="R2_D2_0-1642796684082.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/168521i8DD48BE0F87E7843/image-size/large?v=v2&amp;amp;px=999" role="button" title="R2_D2_0-1642796684082.png" alt="R2_D2_0-1642796684082.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;what else can I do to find the cause?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 20:26:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/HOW-TO-DEBUG-A-HARDFAULT-FOR-S32K144-EVQ-IN-S32DS-IDE/m-p/1403443#M8155</guid>
      <dc:creator>R2_D2</dc:creator>
      <dc:date>2022-01-21T20:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO DEBUG A HARDFAULT FOR S32K144-EVQ IN S32DS IDE</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/HOW-TO-DEBUG-A-HARDFAULT-FOR-S32K144-EVQ-IN-S32DS-IDE/m-p/1404578#M8158</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/194882"&gt;@R2_D2&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The BFAR address simply tells you where the bus fault is detected on the bus, this is not the PC address of the instruction that triggers the exception.&lt;/P&gt;
&lt;P&gt;You can get the PC address from the stack as expalained in the document and shown in the example.&lt;/P&gt;
&lt;P&gt;0x40024000 is an address of the FlexCAN0 module, register MCR&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1643116329787.png" style="width: 674px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/168783iCCE4F860909CFE51/image-dimensions/674x241?v=v2" width="674" height="241" role="button" title="danielmartynek_0-1643116329787.png" alt="danielmartynek_0-1643116329787.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Probably because the bus clock for FLexCAN0 module is not enabled.&lt;/P&gt;
&lt;P&gt;Please try enabling the PCC_FlexCAN0[CGC] clock:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_1-1643116448377.png" style="width: 664px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/168784iDE90A9AEC4ACFF9A/image-dimensions/664x193?v=v2" width="664" height="193" role="button" title="danielmartynek_1-1643116448377.png" alt="danielmartynek_1-1643116448377.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you use FlexCAN0 in your application?&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 13:14:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/HOW-TO-DEBUG-A-HARDFAULT-FOR-S32K144-EVQ-IN-S32DS-IDE/m-p/1404578#M8158</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2022-01-25T13:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO DEBUG A HARDFAULT FOR S32K144-EVQ IN S32DS IDE</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/HOW-TO-DEBUG-A-HARDFAULT-FOR-S32K144-EVQ-IN-S32DS-IDE/m-p/1881391#M12380</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am also facing same&amp;nbsp;&lt;SPAN&gt;Hardfault with CAN MCAL example in S32K144W code? Example code used flexcan0, but for that clocks are configured correctly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What could cause this fault with example code?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 08:52:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/HOW-TO-DEBUG-A-HARDFAULT-FOR-S32K144-EVQ-IN-S32DS-IDE/m-p/1881391#M12380</guid>
      <dc:creator>nirmal_masilamani</dc:creator>
      <dc:date>2024-06-05T08:52:55Z</dc:date>
    </item>
  </channel>
</rss>

