<?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: S32K142 Flash in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K142-Flash/m-p/1479093#M16051</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201814"&gt;@A_Jabb&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I have just tested launching FTFC-&amp;gt;FCCOB[3] = 0xFF and ACCERR is set by this command. Also, Program Phrase (FTFC-&amp;gt;FCCOB[3] = 0x07) with an unligned address (0x30004) does set the ACCERR flag.&lt;/P&gt;
&lt;P&gt;Can you please share the content of all the FCCOB registers?&lt;/P&gt;
&lt;P&gt;Anyway, exceptions are escallated to core lockup if there is no exception handler.&lt;/P&gt;
&lt;P&gt;Do you have &lt;STRONG&gt;void HardFault_Handler(void){}&lt;/STRONG&gt; in the project?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, 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>Thu, 23 Jun 2022 13:20:04 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2022-06-23T13:20:04Z</dc:date>
    <item>
      <title>S32K142 Flash</title>
      <link>https://community.nxp.com/t5/S32K/S32K142-Flash/m-p/1476301#M15984</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to write a robust code for S32K142 flash driver. I tried to make erroneous situations to examine the system response and encountered some problems:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I use Program Phrase Command to program the D-Flash and run the code from P-Flash with no problems. But when an unaligned address or incorrect command code is used (expect to set FSTAT[ACCERR]), a CPU core lock-up happens (like a command is using P-Flash and you try to execute your code from P-Flash). I tried to execute the command and wait for CCIF flag in RAM and it was OK and ACCERR was set. Why a wrong command has conflict with running code from P-Flash?&lt;/LI&gt;&lt;LI&gt;The reference manual states that when FSTAT[ACCERR] is set, no flash command or EEE write is allowed to start. When the flag was set, I tried to write in EEE and it didn't write but when I executed a new flash command, it didn’t run but cleared ACCERR flag itself. The subsequent commands ran with no problem. Isn’t this a contradiction?&lt;/LI&gt;&lt;LI&gt;I tried to program an address in D-Flash with Program Phrase command several times (without an erase in between). Depending on the data, after a few writes, an uncorrectable ECC error happens and reading that address results in a hard fault interrupt. Since MCU does not prevent re-programming an address, should I always verify it is erased before I use program phrase command?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thanks for your attention. I’m looking forward to your reply.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jun 2022 13:15:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K142-Flash/m-p/1476301#M15984</guid>
      <dc:creator>A_Jabb</dc:creator>
      <dc:date>2022-06-19T13:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: S32K142 Flash</title>
      <link>https://community.nxp.com/t5/S32K/S32K142-Flash/m-p/1477295#M16010</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201814"&gt;@A_Jabb&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&lt;/P&gt;
&lt;P&gt;Can you show the content of the FCCOB registers of the command that causes the issue?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.&lt;/P&gt;
&lt;P&gt;How do you write the FSTAT register to clear CCIF.&lt;/P&gt;
&lt;P&gt;Read-modify-write operation on FSTAT with ACCERR set will clear that bit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3.&lt;/P&gt;
&lt;P&gt;Please follow the S32K1xx Safety Manual, Section 5.4.1.2 Runtime checks (rev.7.1)&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;</description>
      <pubDate>Tue, 21 Jun 2022 08:30:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K142-Flash/m-p/1477295#M16010</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2022-06-21T08:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: S32K142 Flash</title>
      <link>https://community.nxp.com/t5/S32K/S32K142-Flash/m-p/1477513#M16019</link>
      <description>&lt;P&gt;1. Any unused command code with FCCOB0[bit6] == 1 (E.g. FCCOB0 = 0xFF) causes the issue (execute FCCOB0 = 0xBF does not cause core lock-up and only sets the ACCERR).&lt;/P&gt;&lt;P&gt;or valid commands like Program Phrase that try to write in an unaligned address of P-Flash (Program Phrase that try to write in an unaligned address of D-Flash does not cause core lock-up and only sets the ACCERR).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;2. FTFx_FSTAT |= FTFx_FSTAT_CCIF_MASK;&lt;/P&gt;&lt;P&gt;note: (FTFx_FSTAT_CCIF_MASK = 0x80)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-06-21_17-44-49.jpg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/184046i51099CCA6A680795/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2022-06-21_17-44-49.jpg" alt="2022-06-21_17-44-49.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It works like you said but the RM (Rev. 14) section 36.4.4.1.2.4 statement is different.&lt;/P&gt;&lt;P&gt;Also RM section 36.5.9.1.2 is like what you said.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 14:16:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K142-Flash/m-p/1477513#M16019</guid>
      <dc:creator>A_Jabb</dc:creator>
      <dc:date>2022-06-21T14:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: S32K142 Flash</title>
      <link>https://community.nxp.com/t5/S32K/S32K142-Flash/m-p/1479093#M16051</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201814"&gt;@A_Jabb&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I have just tested launching FTFC-&amp;gt;FCCOB[3] = 0xFF and ACCERR is set by this command. Also, Program Phrase (FTFC-&amp;gt;FCCOB[3] = 0x07) with an unligned address (0x30004) does set the ACCERR flag.&lt;/P&gt;
&lt;P&gt;Can you please share the content of all the FCCOB registers?&lt;/P&gt;
&lt;P&gt;Anyway, exceptions are escallated to core lockup if there is no exception handler.&lt;/P&gt;
&lt;P&gt;Do you have &lt;STRONG&gt;void HardFault_Handler(void){}&lt;/STRONG&gt; in the project?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, 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>Thu, 23 Jun 2022 13:20:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K142-Flash/m-p/1479093#M16051</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2022-06-23T13:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: S32K142 Flash</title>
      <link>https://community.nxp.com/t5/S32K/S32K142-Flash/m-p/1480108#M16076</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I checked with different FCCOB content and it didn't matter. you can try with all other FCCOBs to be 0.&lt;/P&gt;&lt;P&gt;I have a simple Hardfault handler that works fine with other faults.&lt;/P&gt;&lt;P&gt;The thing is that with everything the same but FTFC-&amp;gt;FCCOB[3] = 0xFF or 0xBF the system reacts differently.&lt;/P&gt;&lt;P&gt;Anyway, I have to move on from the subject. Thanks for your help ♥.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jun 2022 07:40:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K142-Flash/m-p/1480108#M16076</guid>
      <dc:creator>A_Jabb</dc:creator>
      <dc:date>2022-06-26T07:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: S32K142 Flash</title>
      <link>https://community.nxp.com/t5/S32K/S32K142-Flash/m-p/1481289#M16112</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201814"&gt;@A_Jabb&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I really can't reproduce it.&lt;/P&gt;
&lt;P&gt;With command 0xFF and with all the rest of FCCOBx = 0x00, I just see ACCERR = 1.&lt;/P&gt;
&lt;P&gt;Can you share the project?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 14:53:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K142-Flash/m-p/1481289#M16112</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2022-06-28T14:53:38Z</dc:date>
    </item>
  </channel>
</rss>

