<?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>LPC MicrocontrollersのトピックBus Fault stack frame content</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Bus-Fault-stack-frame-content/m-p/1702312#M53810</link>
    <description>&lt;P&gt;This question follows my note in regard to the &lt;A href="https://community.nxp.com/t5/Kinetis-Microcontrollers/Bus-Fault-Exception-on-accessing-internal-flash/td-p/339315" target="_blank"&gt;failing flash memory access&lt;/A&gt; under the certain conditions. The question is the following. Why does the fault's stack frame does not match the expectations?&lt;/P&gt;&lt;P&gt;The exception occurs at the following instruction:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GlebPlekhotko_1-1691608366154.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235826iFABA23C656AEBACB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GlebPlekhotko_1-1691608366154.png" alt="GlebPlekhotko_1-1691608366154.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Upon the &lt;EM&gt;Bus Fault&lt;/EM&gt; handler arrival I'm expecting to find a valid PC value in the stack frame, but instead I'm having the following content:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GlebPlekhotko_2-1691608658942.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235828i8C6DBF54F0002220/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GlebPlekhotko_2-1691608658942.png" alt="GlebPlekhotko_2-1691608658942.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The stack frame pointed by the &lt;EM&gt;SP&lt;/EM&gt; register has nothing in common with the core's state right before the exception. Moreover, the position which should be occupied by the PC value is pointing to the location beyond the RAM, which in the LPC5528 occupies the range 0x20000000 to 0x0x2002FFFF.&lt;/P&gt;&lt;P&gt;What is the reason?&lt;/P&gt;</description>
    <pubDate>Wed, 09 Aug 2023 19:23:05 GMT</pubDate>
    <dc:creator>GlebPlekhotko</dc:creator>
    <dc:date>2023-08-09T19:23:05Z</dc:date>
    <item>
      <title>Bus Fault stack frame content</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Bus-Fault-stack-frame-content/m-p/1702312#M53810</link>
      <description>&lt;P&gt;This question follows my note in regard to the &lt;A href="https://community.nxp.com/t5/Kinetis-Microcontrollers/Bus-Fault-Exception-on-accessing-internal-flash/td-p/339315" target="_blank"&gt;failing flash memory access&lt;/A&gt; under the certain conditions. The question is the following. Why does the fault's stack frame does not match the expectations?&lt;/P&gt;&lt;P&gt;The exception occurs at the following instruction:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GlebPlekhotko_1-1691608366154.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235826iFABA23C656AEBACB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GlebPlekhotko_1-1691608366154.png" alt="GlebPlekhotko_1-1691608366154.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Upon the &lt;EM&gt;Bus Fault&lt;/EM&gt; handler arrival I'm expecting to find a valid PC value in the stack frame, but instead I'm having the following content:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GlebPlekhotko_2-1691608658942.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235828i8C6DBF54F0002220/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GlebPlekhotko_2-1691608658942.png" alt="GlebPlekhotko_2-1691608658942.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The stack frame pointed by the &lt;EM&gt;SP&lt;/EM&gt; register has nothing in common with the core's state right before the exception. Moreover, the position which should be occupied by the PC value is pointing to the location beyond the RAM, which in the LPC5528 occupies the range 0x20000000 to 0x0x2002FFFF.&lt;/P&gt;&lt;P&gt;What is the reason?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 19:23:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Bus-Fault-stack-frame-content/m-p/1702312#M53810</guid>
      <dc:creator>GlebPlekhotko</dc:creator>
      <dc:date>2023-08-09T19:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Bus Fault stack frame content</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Bus-Fault-stack-frame-content/m-p/1702359#M53811</link>
      <description>&lt;P&gt;Oops, my bad!&lt;/P&gt;&lt;P&gt;I didn't pay attention to the LR register. Its value in the exception handler is 0xFFFFFFBC, which according to the &lt;A href="https://developer.arm.com/documentation/100235/0002/the-cortex-m33-processor/exception-model/exception-entry-and-return" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;&amp;nbsp;says, that stack frame is located in the process stack, not in the main one. And I've been looking exactly at the latter in the previous message.&lt;/P&gt;&lt;P&gt;Here is how it looks like in fact:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GlebPlekhotko_0-1691612144459.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235847iF351F0CF741FBD3A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GlebPlekhotko_0-1691612144459.png" alt="GlebPlekhotko_0-1691612144459.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The SP value right before fault is &lt;EM&gt;0x200090E0&lt;/EM&gt;. So the exception stack frame is right below the address. And there one may find the address of the instruction which has caused the fault. It is &lt;EM&gt;0x0002C09C&lt;/EM&gt;, like expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 20:19:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Bus-Fault-stack-frame-content/m-p/1702359#M53811</guid>
      <dc:creator>GlebPlekhotko</dc:creator>
      <dc:date>2023-08-09T20:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Bus Fault stack frame content</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Bus-Fault-stack-frame-content/m-p/1703973#M53841</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/221417"&gt;@GlebPlekhotko&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your sharing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 03:03:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Bus-Fault-stack-frame-content/m-p/1703973#M53841</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2023-08-14T03:03:02Z</dc:date>
    </item>
  </channel>
</rss>

