<?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のトピックFee interation with raw flash writes for internal Flash</title>
    <link>https://community.nxp.com/t5/S32K/Fee-interation-with-raw-flash-writes-for-internal-Flash/m-p/2087475#M48180</link>
    <description>&lt;P&gt;We are using&amp;nbsp; s32K324 and RTD S32K3_RTD_2_0_0_D2203_ASR_REL_4_4_REV_0000_20220331&lt;/P&gt;&lt;P&gt;I have an Flash update routine that uses &lt;STRONG&gt;C40_Ip_MainInterfaceSectorErase&lt;/STRONG&gt; and &lt;STRONG&gt;C40_Ip_MainInterfaceWrite&lt;/STRONG&gt; to put data at an explicit location in memory (linker is set for a/b boot swap), and a &lt;STRONG&gt;Fee interface&lt;/STRONG&gt; (eeprom emulation) to store persistent data.&lt;/P&gt;&lt;P&gt;I have a If no writes are done to the Fee interface (only reads), The Flash update routine&amp;nbsp; works fine. If a Fee write is done (complete), and then the Flash update is done a the flash fails to write.&lt;/P&gt;&lt;P&gt;1) C40_Ip_pFlashBaseAddress-&amp;gt;MCRS volatile uint32_t&amp;nbsp; is 0xc100 (Hex) after Fee write before update is started.&lt;/P&gt;&lt;P&gt;2)&amp;nbsp; &lt;STRONG&gt;C40_Ip_MainInterfaceSectorErase&lt;/STRONG&gt; is called Flash is erased and C40_Ip_pFlashBaseAddress-&amp;gt;MCRS volatile uint32_t 0x8100 (Hex). The data appears to have been erased. MCR is 0.&lt;/P&gt;&lt;P&gt;3) &lt;STRONG&gt;C40_Ip_MainInterfaceWrite&lt;/STRONG&gt; is called for writing the update and it fails on the first access. C40_Ip_pFlashBaseAddress-&amp;gt;MCRS volatile uint32_t is still 0x8100, and it fails in &lt;STRONG&gt;C40_Ip_MainInterfaceHVJobStatus&amp;nbsp;&lt;/STRONG&gt;FLASH_MCRS_PEG_MASK != ErrorFlags.&lt;/P&gt;&lt;P&gt;So, the erase was "done" and competed for the range, confirmed with flash dump. It appears to be successful though the MCRS is 0x8100 instead of 0xC100. That state remains through the write sequence (unlock passes) and fails on step 3 above.&lt;/P&gt;&lt;P&gt;What am I missing to check/clear after the flash erase?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Apr 2025 20:11:06 GMT</pubDate>
    <dc:creator>dtyree</dc:creator>
    <dc:date>2025-04-25T20:11:06Z</dc:date>
    <item>
      <title>Fee interation with raw flash writes for internal Flash</title>
      <link>https://community.nxp.com/t5/S32K/Fee-interation-with-raw-flash-writes-for-internal-Flash/m-p/2087475#M48180</link>
      <description>&lt;P&gt;We are using&amp;nbsp; s32K324 and RTD S32K3_RTD_2_0_0_D2203_ASR_REL_4_4_REV_0000_20220331&lt;/P&gt;&lt;P&gt;I have an Flash update routine that uses &lt;STRONG&gt;C40_Ip_MainInterfaceSectorErase&lt;/STRONG&gt; and &lt;STRONG&gt;C40_Ip_MainInterfaceWrite&lt;/STRONG&gt; to put data at an explicit location in memory (linker is set for a/b boot swap), and a &lt;STRONG&gt;Fee interface&lt;/STRONG&gt; (eeprom emulation) to store persistent data.&lt;/P&gt;&lt;P&gt;I have a If no writes are done to the Fee interface (only reads), The Flash update routine&amp;nbsp; works fine. If a Fee write is done (complete), and then the Flash update is done a the flash fails to write.&lt;/P&gt;&lt;P&gt;1) C40_Ip_pFlashBaseAddress-&amp;gt;MCRS volatile uint32_t&amp;nbsp; is 0xc100 (Hex) after Fee write before update is started.&lt;/P&gt;&lt;P&gt;2)&amp;nbsp; &lt;STRONG&gt;C40_Ip_MainInterfaceSectorErase&lt;/STRONG&gt; is called Flash is erased and C40_Ip_pFlashBaseAddress-&amp;gt;MCRS volatile uint32_t 0x8100 (Hex). The data appears to have been erased. MCR is 0.&lt;/P&gt;&lt;P&gt;3) &lt;STRONG&gt;C40_Ip_MainInterfaceWrite&lt;/STRONG&gt; is called for writing the update and it fails on the first access. C40_Ip_pFlashBaseAddress-&amp;gt;MCRS volatile uint32_t is still 0x8100, and it fails in &lt;STRONG&gt;C40_Ip_MainInterfaceHVJobStatus&amp;nbsp;&lt;/STRONG&gt;FLASH_MCRS_PEG_MASK != ErrorFlags.&lt;/P&gt;&lt;P&gt;So, the erase was "done" and competed for the range, confirmed with flash dump. It appears to be successful though the MCRS is 0x8100 instead of 0xC100. That state remains through the write sequence (unlock passes) and fails on step 3 above.&lt;/P&gt;&lt;P&gt;What am I missing to check/clear after the flash erase?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 20:11:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Fee-interation-with-raw-flash-writes-for-internal-Flash/m-p/2087475#M48180</guid>
      <dc:creator>dtyree</dc:creator>
      <dc:date>2025-04-25T20:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Fee interation with raw flash writes for internal Flash</title>
      <link>https://community.nxp.com/t5/S32K/Fee-interation-with-raw-flash-writes-for-internal-Flash/m-p/2090218#M48358</link>
      <description>&lt;P&gt;HI &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/230490"&gt;@dtyree&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The RTD you use is 3 year old. Can you use the up-to-date revision?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The FEE driver requires the FLS driver, because FEE sectors are configured by FLS.&lt;/P&gt;
&lt;P&gt;If there is FLS driver in the project, why you use C40_Ip instead?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have HSE_FW installed?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is the system clock set precisely to one of the clock options, e.g. 24.7.2.4 Option A - High Performance mode (CM7_CORE_CLK @ 160 MHz)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you share the project so that I can test it?&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>Wed, 30 Apr 2025 12:20:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Fee-interation-with-raw-flash-writes-for-internal-Flash/m-p/2090218#M48358</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2025-04-30T12:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Fee interation with raw flash writes for internal Flash</title>
      <link>https://community.nxp.com/t5/S32K/Fee-interation-with-raw-flash-writes-for-internal-Flash/m-p/2094821#M48617</link>
      <description>&lt;P&gt;We cannot update to 3.0 at this time. First attempt at moving to 3.0 broke all the tools, the build, and would not result in a clean migration. I have unkind thoughts of the s32 designer build tools/methodology.&lt;/P&gt;&lt;P&gt;We are using the HSE (Firmware installed), but only to manage the a/b switch at this time.&amp;nbsp; I'd guess this could cause an interaction as well when we start to use more HSE features.&lt;/P&gt;&lt;P&gt;I'm not using C40_Ip purely out of ignorance. I was working off the a/b update examples and rolled with it. This is the only function that directly writes to blocks of internal flash. If C40_Ip was better documented, I'd probably move to it.&lt;/P&gt;&lt;P&gt;I'll check the clock, last I recall that was how it was set.&lt;/P&gt;&lt;P&gt;This is reproducible if you follow the HSE install and use the A/B swap example (it does not use&amp;nbsp;C40_Ip ) with an additional FEE write.&lt;/P&gt;&lt;P&gt;We have it working now with those calls I mentioned. Additionally, we are now locking against preemption during the write of a block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 19:10:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Fee-interation-with-raw-flash-writes-for-internal-Flash/m-p/2094821#M48617</guid>
      <dc:creator>dtyree</dc:creator>
      <dc:date>2025-05-09T19:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Fee interation with raw flash writes for internal Flash</title>
      <link>https://community.nxp.com/t5/S32K/Fee-interation-with-raw-flash-writes-for-internal-Flash/m-p/2096250#M48704</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/230490"&gt;@dtyree&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The current RTD is 6.0.0 already.&lt;/P&gt;
&lt;P&gt;I would recommend that you have a separate S32DS IDE installation for each RTD version and its compatible extensions, in that case, there will be no problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Every RTD release notes specifies compatible HSE_FW revision. Even though it might not cause any issues with other revisions, we cannot guarantee that.&lt;/P&gt;
&lt;P&gt;RTD 2.0.0 release notes:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1747123363676.png" style="width: 655px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/337486i7E145C55AA3BD6B1/image-dimensions/655x425?v=v2" width="655" height="425" role="button" title="danielmartynek_0-1747123363676.png" alt="danielmartynek_0-1747123363676.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you maybe share the project so that we can test it?&lt;/P&gt;
&lt;P&gt;You can share it publicly via a support ticket.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You use S32K324 that has two decoupled cores.&lt;/P&gt;
&lt;P&gt;What is the secondary core doing while the failure occurs?&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;</description>
      <pubDate>Tue, 13 May 2025 08:06:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Fee-interation-with-raw-flash-writes-for-internal-Flash/m-p/2096250#M48704</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2025-05-13T08:06:34Z</dc:date>
    </item>
  </channel>
</rss>

