<?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: UsageFault: The processor has attempted to execute an undefined instruction. in S32K</title>
    <link>https://community.nxp.com/t5/S32K/UsageFault-The-processor-has-attempted-to-execute-an-undefined/m-p/1770933#M29422</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&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;Thank you for your reply, I made small change to your code snippet and it started working.&lt;/P&gt;&lt;P&gt;Here is the updated code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ADDR_APP = 0x00500000&lt;/P&gt;&lt;P&gt;func = *(UINT32 volatile *)(ADDR_APP + 0xC);&lt;BR /&gt;func = *(UINT32 volatile *)(((UINT32)func) + 0x4);&lt;BR /&gt;func = ((((uint32_t)func) &amp;amp; 0xFFFFFFFEU) | 1u);&lt;BR /&gt;(* (void (*) (void)) func)();&lt;/P&gt;</description>
    <pubDate>Thu, 07 Dec 2023 16:53:21 GMT</pubDate>
    <dc:creator>aadyaa</dc:creator>
    <dc:date>2023-12-07T16:53:21Z</dc:date>
    <item>
      <title>UsageFault: The processor has attempted to execute an undefined instruction.</title>
      <link>https://community.nxp.com/t5/S32K/UsageFault-The-processor-has-attempted-to-execute-an-undefined/m-p/1769804#M29375</link>
      <description>&lt;P&gt;I am reaching out to seek assistance with a usage fault issue that I am facing while attempting to jump from a custom bootloader to an application on an NXP platform.&lt;/P&gt;&lt;P&gt;Error message:&amp;nbsp;&lt;/P&gt;&lt;P&gt;UsageFault: The processor has attempted to execute an undefined instruction.&lt;BR /&gt;HardFault: A fault has been escalated to a hard fault.&lt;/P&gt;&lt;P&gt;Here are some key details regarding my setup:&lt;/P&gt;&lt;P&gt;Bootloader located at address: 0x00400000&lt;BR /&gt;Application located at address: 0x00500000&lt;BR /&gt;Function pointer address used for jumping to the application: ((0x00500800)+1) (VTABLE address) but faced usage fault which is leading to hardfault.&lt;/P&gt;&lt;P&gt;I have also tried jumping directly to the reset handler address [Reset handler address attempted: 0x00500c20], but the issue persists.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would greatly appreciate any guidance or insights from the community on potential pitfalls or areas where I might be overlooking crucial details. If anyone has experience with a similar scenario or can provide troubleshooting advice, it would be immensely helpful.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 00:13:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/UsageFault-The-processor-has-attempted-to-execute-an-undefined/m-p/1769804#M29375</guid>
      <dc:creator>aadyaa</dc:creator>
      <dc:date>2023-12-07T00:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: UsageFault: The processor has attempted to execute an undefined instruction.</title>
      <link>https://community.nxp.com/t5/S32K/UsageFault-The-processor-has-attempted-to-execute-an-undefined/m-p/1770564#M29408</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/215692"&gt;@aadyaa&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Can you try with this code?&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;ADDR_APP = 0x00500000

func = *(UINT32 volatile *)(ADDR_APP + 0xC);
func = *(UINT32 volatile *)(((UINT32)func) + 0x4);
func = (((UINT32)func) &amp;amp; 0xFFFFFFFEU);
(* (void (*) (void)) func)();&lt;/LI-CODE&gt;
&lt;P&gt;Please read the memory first.&lt;/P&gt;
&lt;P&gt;At ADDR_APP there should be 0x5AA55AA5&lt;BR /&gt;At ADDR_APP + offset 0xC, there is the Cortex-M7_0 core start address.&lt;BR /&gt;(RM rev7, Table 189. Image vector table).&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>Thu, 07 Dec 2023 08:39:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/UsageFault-The-processor-has-attempted-to-execute-an-undefined/m-p/1770564#M29408</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2023-12-07T08:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: UsageFault: The processor has attempted to execute an undefined instruction.</title>
      <link>https://community.nxp.com/t5/S32K/UsageFault-The-processor-has-attempted-to-execute-an-undefined/m-p/1770933#M29422</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&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;Thank you for your reply, I made small change to your code snippet and it started working.&lt;/P&gt;&lt;P&gt;Here is the updated code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ADDR_APP = 0x00500000&lt;/P&gt;&lt;P&gt;func = *(UINT32 volatile *)(ADDR_APP + 0xC);&lt;BR /&gt;func = *(UINT32 volatile *)(((UINT32)func) + 0x4);&lt;BR /&gt;func = ((((uint32_t)func) &amp;amp; 0xFFFFFFFEU) | 1u);&lt;BR /&gt;(* (void (*) (void)) func)();&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 16:53:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/UsageFault-The-processor-has-attempted-to-execute-an-undefined/m-p/1770933#M29422</guid>
      <dc:creator>aadyaa</dc:creator>
      <dc:date>2023-12-07T16:53:21Z</dc:date>
    </item>
  </channel>
</rss>

