<?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>S32KのトピックRe: hardfault in bootloader s32k344.</title>
    <link>https://community.nxp.com/t5/S32K/hardfault-in-bootloader-s32k344/m-p/1920605#M38512</link>
    <description>&lt;P&gt;using this code:&lt;/P&gt;&lt;P&gt;Boot_JumpToApp(resetHandlerAddr);&lt;BR /&gt;Reset_Handler();&lt;/P&gt;&lt;P&gt;caused "HardFault_Handler".&lt;/P&gt;&lt;P&gt;debugger message at this point:&lt;/P&gt;&lt;P&gt;"UsageFault: An instruction executed with an invalid EPSR.T or EPSR.IT field.&lt;BR /&gt;HardFault: A fault has been escalated to a hard fault."&lt;/P&gt;&lt;P&gt;that is the reason, why I check "thumb" mode and force switch to it.&lt;/P&gt;&lt;P&gt;removing :&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;DIV&gt;// force_thumb_mode();&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; __asm volatile&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "BX PC \n"&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Branch to the next instruction, ensuring Thumb mode&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "NOP \n"&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// No operation (acts as a placeholder)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; );&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;does not change hard fault.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jul 2024 14:41:01 GMT</pubDate>
    <dc:creator>paulffffff</dc:creator>
    <dc:date>2024-07-30T14:41:01Z</dc:date>
    <item>
      <title>hardfault in bootloader s32k344.</title>
      <link>https://community.nxp.com/t5/S32K/hardfault-in-bootloader-s32k344/m-p/1917638#M38255</link>
      <description>&lt;P&gt;trying to run bootloader example I got&amp;nbsp;hardfault during jump to application.&lt;/P&gt;&lt;P&gt;I crated simple application to load to 0x00600000 address. this application count from 1 to 65535 and then to 0 and then jump to _start of itself (or Reset_Handler). but this application caused same hardfaut. may you take a look to project to advice solution.&lt;/P&gt;&lt;P&gt;I use S32 Design Studio v 3.5&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Pavel&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 00:17:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/hardfault-in-bootloader-s32k344/m-p/1917638#M38255</guid>
      <dc:creator>paulffffff</dc:creator>
      <dc:date>2024-07-26T00:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: hardfault in bootloader s32k344.</title>
      <link>https://community.nxp.com/t5/S32K/hardfault-in-bootloader-s32k344/m-p/1917929#M38274</link>
      <description>&lt;P&gt;&lt;A href="mailto:Hi@paulffffff" target="_blank"&gt;Hi@paulffffff&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I don't understand why you use the "BX" instruction here when you have already ported the "Boot_JumpToApp" function to your project.&lt;/P&gt;
&lt;P&gt;The reason for the hardfault comes from here.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_0-1721980809263.png" style="width: 686px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/290519iA586C51676E7EB4D/image-dimensions/686x429?v=v2" width="686" height="429" role="button" title="Senlent_0-1721980809263.png" alt="Senlent_0-1721980809263.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For the specific reason, please refer to this answer.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/75965946/gcc-arm-inline-assembly-bx-produce-unexpected-results-trying-to-jump-over-a-g" target="_blank"&gt;https://stackoverflow.com/questions/75965946/gcc-arm-inline-assembly-bx-produce-unexpected-results-trying-to-jump-over-a-g&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 08:03:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/hardfault-in-bootloader-s32k344/m-p/1917929#M38274</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2024-07-26T08:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: hardfault in bootloader s32k344.</title>
      <link>https://community.nxp.com/t5/S32K/hardfault-in-bootloader-s32k344/m-p/1920605#M38512</link>
      <description>&lt;P&gt;using this code:&lt;/P&gt;&lt;P&gt;Boot_JumpToApp(resetHandlerAddr);&lt;BR /&gt;Reset_Handler();&lt;/P&gt;&lt;P&gt;caused "HardFault_Handler".&lt;/P&gt;&lt;P&gt;debugger message at this point:&lt;/P&gt;&lt;P&gt;"UsageFault: An instruction executed with an invalid EPSR.T or EPSR.IT field.&lt;BR /&gt;HardFault: A fault has been escalated to a hard fault."&lt;/P&gt;&lt;P&gt;that is the reason, why I check "thumb" mode and force switch to it.&lt;/P&gt;&lt;P&gt;removing :&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;DIV&gt;// force_thumb_mode();&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; __asm volatile&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "BX PC \n"&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Branch to the next instruction, ensuring Thumb mode&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "NOP \n"&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// No operation (acts as a placeholder)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; );&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;does not change hard fault.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2024 14:41:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/hardfault-in-bootloader-s32k344/m-p/1920605#M38512</guid>
      <dc:creator>paulffffff</dc:creator>
      <dc:date>2024-07-30T14:41:01Z</dc:date>
    </item>
  </channel>
</rss>

