<?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: S32K146 IC Memory Protection Unit in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K146-IC-Memory-Protection-Unit/m-p/2035479#M45503</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/246095"&gt;@shlee2872&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;1.&lt;/P&gt;
&lt;P&gt;The ARM Cortex M4 core MPU is not implemented on the S32K14x series.&lt;/P&gt;
&lt;P&gt;There is NXP MPU implemented on the bus instead.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1738140078189.png" style="width: 618px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/321774i3CFF08222B16BEBD/image-dimensions/618x354?v=v2" width="618" height="354" role="button" title="danielmartynek_0-1738140078189.png" alt="danielmartynek_0-1738140078189.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You need to configure the NXP MPU first.&lt;/P&gt;
&lt;P&gt;Any violation of the NXP MPU results in a bus fault that is routed to the ARM BusFault exception.&lt;/P&gt;
&lt;P&gt;This fault is excalated to HardFault if the BusFault exception is disabled.&lt;/P&gt;
&lt;P&gt;2.&lt;/P&gt;
&lt;P&gt;Regardless of the MPU, there is always a bus fault detected if not-implemented memory is accessed though.&lt;/P&gt;
&lt;P&gt;Refer to this example:&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;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;
&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;</description>
    <pubDate>Wed, 29 Jan 2025 08:42:30 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2025-01-29T08:42:30Z</dc:date>
    <item>
      <title>S32K146 IC Memory Protection Unit</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-IC-Memory-Protection-Unit/m-p/2035155#M45492</link>
      <description>&lt;P&gt;I accessed unallowed memory range (0x1FFEF654, which is out of memory range)&lt;/P&gt;&lt;P&gt;But I couldnt' the MPU Error Information in S32K146 MCU by checking Trace32 Debugger.&lt;/P&gt;&lt;P&gt;So I checked Arm CM4 Registers and then the checked Information is like below these informations.&lt;/P&gt;&lt;P&gt;// S32K146 MCU's MPU&lt;/P&gt;&lt;P&gt;All of SPER# is 0 (No Error Occurred)&lt;/P&gt;&lt;P&gt;EADDR is 0&lt;/P&gt;&lt;P&gt;But the MPU in MCU is enabled.&lt;/P&gt;&lt;P&gt;/// ARM CM4 Reg Value //&lt;/P&gt;&lt;P&gt;Memory Protection Unit&lt;/P&gt;&lt;P&gt;MPU_TYPE : 00000000 /IREGION: 0 /DREGION:0 /SEPERATE: Not Supported&lt;/P&gt;&lt;P&gt;MPU_CTRL: 00000000 /PRIVDEFENA: Disabled HFMINEA: MPU Disabled /ENABLE: Disabled&lt;/P&gt;&lt;P&gt;MPU_RNR: 00000000 /REGION:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=&amp;gt; So I checked MPU in Arm core is disabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the other register values are below things.&lt;/P&gt;&lt;P&gt;MMFAR : 1FFEF654 (out of memory range in S32K146)&lt;/P&gt;&lt;P&gt;MMFSR is Initialized Values (Not Valid, Not Active, Not Occurred)&lt;/P&gt;&lt;P&gt;BFSR&amp;nbsp;&lt;/P&gt;&lt;P&gt;- BFARVALID: Valid / PRECISERR: Occurred&lt;/P&gt;&lt;P&gt;BFAR : 1FFEF654 (out of memory range in S32K146)&lt;/P&gt;&lt;P&gt;HFSR&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Forced : Occurred / DEBEUGEV, VECTTBL : Not Occurred&lt;/P&gt;&lt;P&gt;=&amp;gt; So I think Bus Fault Handler makes MemManageFault Escalate to Hard Fault.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I can't understand how MPU in Arm Core is not activated makes MemManage Fault?&lt;/P&gt;&lt;P&gt;If XN Region accessed makes this situation, I think&amp;nbsp; IACCVIOL in MMFSR Should be Occurred&amp;nbsp;&lt;/P&gt;&lt;P&gt;because It is not clear by another exception handler like MMARVALID in MMFSR.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you explain this situations and would you offer the algorithm of how accessing to&lt;/P&gt;&lt;P&gt;out of memory range leads to hard fault handler?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 14:31:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-IC-Memory-Protection-Unit/m-p/2035155#M45492</guid>
      <dc:creator>shlee2872</dc:creator>
      <dc:date>2025-01-28T14:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 IC Memory Protection Unit</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-IC-Memory-Protection-Unit/m-p/2035479#M45503</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/246095"&gt;@shlee2872&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;1.&lt;/P&gt;
&lt;P&gt;The ARM Cortex M4 core MPU is not implemented on the S32K14x series.&lt;/P&gt;
&lt;P&gt;There is NXP MPU implemented on the bus instead.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1738140078189.png" style="width: 618px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/321774i3CFF08222B16BEBD/image-dimensions/618x354?v=v2" width="618" height="354" role="button" title="danielmartynek_0-1738140078189.png" alt="danielmartynek_0-1738140078189.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You need to configure the NXP MPU first.&lt;/P&gt;
&lt;P&gt;Any violation of the NXP MPU results in a bus fault that is routed to the ARM BusFault exception.&lt;/P&gt;
&lt;P&gt;This fault is excalated to HardFault if the BusFault exception is disabled.&lt;/P&gt;
&lt;P&gt;2.&lt;/P&gt;
&lt;P&gt;Regardless of the MPU, there is always a bus fault detected if not-implemented memory is accessed though.&lt;/P&gt;
&lt;P&gt;Refer to this example:&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;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;
&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;</description>
      <pubDate>Wed, 29 Jan 2025 08:42:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-IC-Memory-Protection-Unit/m-p/2035479#M45503</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2025-01-29T08:42:30Z</dc:date>
    </item>
  </channel>
</rss>

