<?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のトピックStandby RAM initialization fails S32K324</title>
    <link>https://community.nxp.com/t5/S32K/Standby-RAM-initialization-fails-S32K324/m-p/2101596#M49050</link>
    <description>&lt;P&gt;My project uses an S32K324 controller.&lt;/P&gt;&lt;P&gt;I'm facing an issue with standalone SW run without debugger.&lt;/P&gt;&lt;P&gt;SW intends to use Standby RAM of the S32K3 MCU.&lt;/P&gt;&lt;P&gt;After hot attaching the debugger, it's found that the cause of SW stuck is &lt;STRONG&gt;MemManageFault&lt;/STRONG&gt; exception.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;MMARVALID bit is SET in MMFSR register&lt;/LI&gt;&lt;LI&gt;MMAR register shows address of the starting address [0x20400900] of Standby RAM defined in linker file&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Per the S32K3xx reference manual:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;first 32K of SRAM can be used as Standby RAM&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;After a chip power-on-reset, RAM must be initialized to a known value using a 64-bit master before any 32-bit read / write operations can be performed&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Our SW build would like to use 1K of Standby RAM from the following address and size:&lt;/P&gt;&lt;P&gt;[standby_ram : ORIGIN = 0x20400900, LENGTH = 0x00000400]&lt;/P&gt;&lt;P&gt;We use the following code to initialize the Standby RAM as quoted in the S32K3 reference manual:&lt;/P&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;RamMemPtr2&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;uint64&lt;/SPAN&gt; &lt;SPAN class=""&gt;*)&lt;/SPAN&gt;&lt;SPAN class=""&gt;0x20400900&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;if&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;ResetReasonB&lt;/SPAN&gt; &lt;SPAN class=""&gt;==&lt;/SPAN&gt; &lt;SPAN class=""&gt;McuConf_McuResetReasonConf_MCU_POWER_ON_RESET&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;for&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;index&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt; &lt;SPAN class=""&gt;;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;index&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;96&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;index&lt;/SPAN&gt;&lt;SPAN class=""&gt;++ )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RamMemPtr2&lt;/SPAN&gt;&lt;SPAN class=""&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;index&lt;/SPAN&gt;&lt;SPAN class=""&gt;]&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;0U&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&amp;nbsp;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;We are unable to use the standby RAM starting from location address 0x20400000 because the Vector FBL package we use require 1KB of space to load the flash driver.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;S32K3 manual does not mention explicitly about starting the Standby RAM initialization from address&amp;nbsp;0x20400000.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;Hence, I'm assuming that it's permissible to use a memory region anywhere within the first 32K as starting address.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;Has anyone faced the above issue with Standby RAM?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;Any thoughts or clue on what's going wrong?&lt;/DIV&gt;</description>
    <pubDate>Wed, 21 May 2025 11:55:52 GMT</pubDate>
    <dc:creator>jeevanthomas</dc:creator>
    <dc:date>2025-05-21T11:55:52Z</dc:date>
    <item>
      <title>Standby RAM initialization fails S32K324</title>
      <link>https://community.nxp.com/t5/S32K/Standby-RAM-initialization-fails-S32K324/m-p/2101596#M49050</link>
      <description>&lt;P&gt;My project uses an S32K324 controller.&lt;/P&gt;&lt;P&gt;I'm facing an issue with standalone SW run without debugger.&lt;/P&gt;&lt;P&gt;SW intends to use Standby RAM of the S32K3 MCU.&lt;/P&gt;&lt;P&gt;After hot attaching the debugger, it's found that the cause of SW stuck is &lt;STRONG&gt;MemManageFault&lt;/STRONG&gt; exception.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;MMARVALID bit is SET in MMFSR register&lt;/LI&gt;&lt;LI&gt;MMAR register shows address of the starting address [0x20400900] of Standby RAM defined in linker file&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Per the S32K3xx reference manual:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;first 32K of SRAM can be used as Standby RAM&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;After a chip power-on-reset, RAM must be initialized to a known value using a 64-bit master before any 32-bit read / write operations can be performed&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Our SW build would like to use 1K of Standby RAM from the following address and size:&lt;/P&gt;&lt;P&gt;[standby_ram : ORIGIN = 0x20400900, LENGTH = 0x00000400]&lt;/P&gt;&lt;P&gt;We use the following code to initialize the Standby RAM as quoted in the S32K3 reference manual:&lt;/P&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;RamMemPtr2&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;uint64&lt;/SPAN&gt; &lt;SPAN class=""&gt;*)&lt;/SPAN&gt;&lt;SPAN class=""&gt;0x20400900&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;if&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;ResetReasonB&lt;/SPAN&gt; &lt;SPAN class=""&gt;==&lt;/SPAN&gt; &lt;SPAN class=""&gt;McuConf_McuResetReasonConf_MCU_POWER_ON_RESET&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;for&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;index&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt; &lt;SPAN class=""&gt;;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;index&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;96&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;index&lt;/SPAN&gt;&lt;SPAN class=""&gt;++ )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RamMemPtr2&lt;/SPAN&gt;&lt;SPAN class=""&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;index&lt;/SPAN&gt;&lt;SPAN class=""&gt;]&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;0U&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&amp;nbsp;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;We are unable to use the standby RAM starting from location address 0x20400000 because the Vector FBL package we use require 1KB of space to load the flash driver.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;S32K3 manual does not mention explicitly about starting the Standby RAM initialization from address&amp;nbsp;0x20400000.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;Hence, I'm assuming that it's permissible to use a memory region anywhere within the first 32K as starting address.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;Has anyone faced the above issue with Standby RAM?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;Any thoughts or clue on what's going wrong?&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 May 2025 11:55:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Standby-RAM-initialization-fails-S32K324/m-p/2101596#M49050</guid>
      <dc:creator>jeevanthomas</dc:creator>
      <dc:date>2025-05-21T11:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Standby RAM initialization fails S32K324</title>
      <link>https://community.nxp.com/t5/S32K/Standby-RAM-initialization-fails-S32K324/m-p/2106494#M49326</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/146623"&gt;@jeevanthomas&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I apologize for the late reply! There was an issue with the community tool tracker, and I was under the impression this post was already answered.&lt;/P&gt;
&lt;P&gt;You are correct, there should be no problem declaring Standby RAM anywhere in between the 32KB. I am not exactly sure what may be wrong within your project, but I've tested the Standby RAM in the origin you've shared (with the same length) and I can declare and add a counter correctly.&lt;/P&gt;
&lt;P&gt;Could you please test the attached project? It is based in S32DS v3.6 and RTD 6.0.0. I've used our internal evaluation board for S32K324, but wake-up is with internal RTC, so pins should not matter, you can simply attach to the running target once programmed and check the variable "&lt;SPAN&gt;RunStandbyCounter0".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;BR /&gt;Julián&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 18:48:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Standby-RAM-initialization-fails-S32K324/m-p/2106494#M49326</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2025-05-28T18:48:43Z</dc:date>
    </item>
  </channel>
</rss>

