<?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: FLash driver implementation for write operation in S32K311 in S32K</title>
    <link>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2204501#M54445</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/256812"&gt;@emb-enockal&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The flash programming code must not reside in the same flash block that is being programmed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need to program the same flash block, ensure the execution code is placed in SRAM.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;In this example, the C40_Ip APIs are located in SRAM:&lt;BR /&gt;For reference, see: &lt;A href="https://community.nxp.com/t5/S32K-Knowledge-Base/S32K312-C40-Ip-SRAM-RTD-500-DS35/ta-p/2074245" target="_blank"&gt;https://community.nxp.com/t5/S32K-Knowledge-Base/S32K312-C40-Ip-SRAM-RTD-500-DS35/ta-p/2074245&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DFlash is located in Block_2, locked by SPELOCK[2] and SSPELOCK[2].&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>Thu, 13 Nov 2025 12:27:57 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2025-11-13T12:27:57Z</dc:date>
    <item>
      <title>FLash driver implementation for write operation in S32K311</title>
      <link>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2203597#M54404</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm facing issue in writing data to PFlash, I have followed as per reference manual, but still I'm not able to write to memory. Kindly help me with this. Since its time critical.&lt;/P&gt;&lt;P&gt;Also I'm attaching my code for your reference.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Wed, 12 Nov 2025 11:55:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2203597#M54404</guid>
      <dc:creator>emb-enockal</dc:creator>
      <dc:date>2025-11-12T11:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: FLash driver implementation for write operation in S32K311</title>
      <link>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2203722#M54412</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/256812"&gt;@emb-enockal&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Can you elaborate on the description of the issues?&lt;/P&gt;
&lt;P&gt;Do you see any error flags?&lt;/P&gt;
&lt;P&gt;I recommend starting with a blocking method for simplicity:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1762959571607.png" style="width: 597px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/365281i8D20FED1D09917B6/image-dimensions/597x768?v=v2" width="597" height="768" role="button" title="danielmartynek_0-1762959571607.png" alt="danielmartynek_0-1762959571607.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_1-1762959967169.png" style="width: 829px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/365282iEE89900BD4367705/image-dimensions/829x511?v=v2" width="829" height="511" role="button" title="danielmartynek_1-1762959967169.png" alt="danielmartynek_1-1762959967169.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The DATA registers must be aligned to the quad-page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You cannot execute code from the block that is being programmed.&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;PRE&gt;Any support, information, and technology (“Materials”) provided by NXP are provided AS IS, without any warranty express or implied, and NXP disclaims all direct and indirect liability and damages in connection with the Material to the maximum extent permitted by the applicable law. &lt;BR /&gt;NXP accepts no liability for any assistance with applications or product design. Materials may only be used in connection with NXP products. Any feedback provided to NXP regarding the Materials may be used by NXP without restriction.&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 12:29:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2203722#M54412</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2025-11-13T12:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: FLash driver implementation for write operation in S32K311</title>
      <link>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2204492#M54442</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m stuck on PFlash/DFlash programming for S32K311 (48-pin). I can now &lt;STRONG&gt;program P-Flash&lt;/STRONG&gt; when I place a breakpoint at the end of the write function, but &lt;STRONG&gt;if I don’t&lt;/STRONG&gt; keep that breakpoint the CPU jumps to disassembly and RWE flag is set to 1.&lt;/P&gt;&lt;P&gt;Also I &lt;STRONG&gt;cannot unlock D-Flash&lt;/STRONG&gt; (all unlock attempts appear to be ignored). Please advise.&lt;/P&gt;&lt;P&gt;what I observed is:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;PFlash write sequence completes only when I keep a breakpoint in the write function. If I remove that breakpoint the CPU goes to disassembly immediately after the write request (looks like an interrupt/fetch fault).&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;D-Flash remains locked despite writing the following unlock sequences:&lt;/P&gt;&lt;P&gt;PFLASH.PFCBLKU_SPELOCK[0].R = 0x00000000U; /* clear UTEST block lock (tried) */&lt;/P&gt;&lt;P&gt;/* clear module locks */&lt;BR /&gt;FLASH.SPELOCK.R = 0x00000000U;&lt;BR /&gt;FLASH.SSPELOCK.R = 0x00000000U;&lt;/P&gt;&lt;P&gt;/* platform-level block unlock */&lt;BR /&gt;PFLASH.PFCBLK_SPELOCK[0].R = 0x00000000U;&lt;BR /&gt;PFLASH.PFCBLK_SSPELOCK[0].R = 0x00000000U;&lt;/P&gt;&lt;P&gt;Also attached code for your reference.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 13 Nov 2025 12:00:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2204492#M54442</guid>
      <dc:creator>emb-enockal</dc:creator>
      <dc:date>2025-11-13T12:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: FLash driver implementation for write operation in S32K311</title>
      <link>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2204501#M54445</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/256812"&gt;@emb-enockal&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The flash programming code must not reside in the same flash block that is being programmed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need to program the same flash block, ensure the execution code is placed in SRAM.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;In this example, the C40_Ip APIs are located in SRAM:&lt;BR /&gt;For reference, see: &lt;A href="https://community.nxp.com/t5/S32K-Knowledge-Base/S32K312-C40-Ip-SRAM-RTD-500-DS35/ta-p/2074245" target="_blank"&gt;https://community.nxp.com/t5/S32K-Knowledge-Base/S32K312-C40-Ip-SRAM-RTD-500-DS35/ta-p/2074245&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DFlash is located in Block_2, locked by SPELOCK[2] and SSPELOCK[2].&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>Thu, 13 Nov 2025 12:27:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2204501#M54445</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2025-11-13T12:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: FLash driver implementation for write operation in S32K311</title>
      <link>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2205209#M54492</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hi Daniel,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thank you for the clarification.&lt;/P&gt;&lt;P&gt;Yes, I realized that I was trying to execute the write function from the same PFlash block that I was programming. After moving the write routine to another block, it started working.&lt;/P&gt;&lt;P&gt;However, I have two follow-up issues:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;PFlash consecutive writes&lt;/STRONG&gt;&lt;BR /&gt;When I write 8 bytes at address &lt;STRONG&gt;0x00480000&lt;/STRONG&gt;, it succeeds.&lt;BR /&gt;But if I try to write the next 8 bytes at &lt;STRONG&gt;0x00480008&lt;/STRONG&gt;, the operation fails.&lt;BR /&gt;The next address where a write is successful is &lt;STRONG&gt;128 bytes later&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;It looks like the controller only allows programming at 128-byte (quad-page) boundaries.&lt;BR /&gt;Is there any way to program smaller chunks (8 bytes) consecutively within the same quad-page, or must all 128 bytes be written at once?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;DFlash unlock issue&lt;/STRONG&gt;&lt;BR /&gt;As recommended, I tried unlocking Block_2 using &lt;STRONG&gt;SPELOCK[2]&lt;/STRONG&gt; and &lt;STRONG&gt;SSPELOCK[2]&lt;/STRONG&gt;, but the block remains locked.&lt;BR /&gt;I also attempted clearing the module-level and platform-level lock registers, but the DFlash region still does not unlock.&lt;/P&gt;&lt;P&gt;Below is the unlock sequence I attempted:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;PFLASH.PFCBLK_SSPELOCK[0].R = 0x00000000U; //PFlash Block0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PFLASH.&lt;/SPAN&gt;&lt;SPAN&gt;PFCBLK_SSPELOCK&lt;/SPAN&gt;&lt;SPAN&gt;[1].&lt;/SPAN&gt;&lt;SPAN&gt;R&lt;/SPAN&gt;&lt;SPAN&gt; = 0x00000000U; &lt;/SPAN&gt;&lt;SPAN&gt;//PFlash Block1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FLASH.SPELOCK.R = 0x00000000U;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FLASH.SSPELOCK.R = 0x00000000U;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FLASH.XSPELOCK.R = 0x00000000u;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FLASH.XSSPELOCK.R = 0x00000000u;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;Could you please help me understand the correct way to unlock DFlash Block_2 and confirm whether consecutive writes inside the same quad-page are supported?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your assistance.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 14 Nov 2025 13:20:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2205209#M54492</guid>
      <dc:creator>emb-enockal</dc:creator>
      <dc:date>2025-11-14T13:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: FLash driver implementation for write operation in S32K311</title>
      <link>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2205250#M54497</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/256812"&gt;@emb-enockal&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;To program 8 bytes starting at&amp;nbsp;0x00480008, you need to write the data in DATA[2-3] registers.&lt;/P&gt;
&lt;P&gt;Regarding the lock, I'm out of office until Tuesday, I cannot test it on HW right now.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would recommend that you use the RTD drivers (C40_Ip) for reference.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1763131926248.png" style="width: 673px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/365730iCF3C7BD6702FEE0D/image-dimensions/673x345?v=v2" width="673" height="345" role="button" title="danielmartynek_0-1763131926248.png" alt="danielmartynek_0-1763131926248.png" /&gt;&lt;/span&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;</description>
      <pubDate>Fri, 14 Nov 2025 14:52:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2205250#M54497</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2025-11-14T14:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: FLash driver implementation for write operation in S32K311</title>
      <link>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2206838#M54588</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I attempted unlocking using all register combinations mentioned in the Reference Manual, including:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PFLASH.PFCBLK_SSPELOCK[0].R = 0x00000000U; //PFlash Block0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PFLASH.PFCBLK_SSPELOCK[1].R = 0x00000000U; //PFlash Block1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FLASH.SPELOCK.R = 0x00000000U;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FLASH.SSPELOCK.R = 0x00000000U;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FLASH.XSPELOCK.R = 0x00000000u;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FLASH.XSSPELOCK.R = 0x00000000u;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PFLASH.PFCBLK_SPELOCK[0].R = 0x00000000U;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PFLASH.PFCBLK_SPELOCK[1].R = 0x00000000U;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PFLASH.PFCBLK_SPELOCK[2].R = 0x00000000U;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PFLASH.PFCBLKU_SPELOCK[0].R = 0x00000000U; // UTEST block lock&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, DFlash always remains locked, and any erase/program attempt sets PES=1 .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please clarify:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The correct register and register index for D-Flash block on S32K311.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whether D-Flash on S32K311 requires a special unlock mechanism (UTEST fuse, FCCU, life-cycle state, etc.).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any reference example showing successful D-Flash unlock + write.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;Unable to unlock last 256 KB of P-Flash:&lt;/P&gt;&lt;P&gt;Anything at or above &lt;STRONG&gt;0x004B0000 – 0x004FFFFF&lt;/STRONG&gt; remains locked even after using all register combinations mentioned above.&lt;/P&gt;&lt;P&gt;Is this region controlled by a different lock block (Block 2?) or shared with D-Flash?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 12:36:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2206838#M54588</guid>
      <dc:creator>emb-enockal</dc:creator>
      <dc:date>2025-11-18T12:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: FLash driver implementation for write operation in S32K311</title>
      <link>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2209613#M54634</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/256812"&gt;@emb-enockal&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;1.&lt;/P&gt;
&lt;P&gt;Unlock just the first sector in DFLASH at&amp;nbsp;0x1000_0000:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;IP_PFLASH-&amp;gt;PFCBLK_SPELOCK[2] &amp;amp;= ~(1U &amp;lt;&amp;lt; 0);&lt;/LI-CODE&gt;
&lt;P&gt;Can you test it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;PRE&gt;Any support, information, and technology (“Materials”) provided by NXP are provided AS IS, without any warranty express or implied, and NXP disclaims all direct and indirect liability and damages in connection with the Material to the maximum extent permitted by the applicable law. &lt;BR /&gt;NXP accepts no liability for any assistance with applications or product design. Materials may only be used in connection with NXP products. Any feedback provided to NXP regarding the Materials may be used by NXP without restriction.&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 12:44:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2209613#M54634</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2025-11-19T12:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: FLash driver implementation for write operation in S32K311</title>
      <link>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2233347#M54718</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;Thank you — D-Flash is now working after using:&lt;/P&gt;&lt;P&gt;IP_PFLASH-&amp;gt;PFCBLK_SPELOCK[2] &amp;amp;= ~(1U &amp;lt;&amp;lt; 0);&lt;/P&gt;&lt;P&gt;However, I still have one remaining issue:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Unable to unlock the last 256 KB of P-Flash (0x004B0000 – 0x004FFFFF)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Everything below 0x004B0000 is working correctly.&lt;BR /&gt;But any write/erase attempt in the region:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0x004B0000 – 0x004FFFFF&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;fails with &lt;STRONG&gt;PES = 1&lt;/STRONG&gt;, exactly like a locked block.&lt;/P&gt;&lt;P&gt;I tried clearing all P-Flash lock registers:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;PFLASH.&lt;/SPAN&gt;&lt;SPAN&gt;PFCBLK_SSPELOCK&lt;/SPAN&gt;&lt;SPAN&gt;[0].&lt;/SPAN&gt;&lt;SPAN&gt;R&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;= ~(1U &amp;lt;&amp;lt;0); &lt;/SPAN&gt;&lt;SPAN&gt;//PFlash Block0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PFLASH.&lt;/SPAN&gt;&lt;SPAN&gt;PFCBLK_SSPELOCK&lt;/SPAN&gt;&lt;SPAN&gt;[1].&lt;/SPAN&gt;&lt;SPAN&gt;R&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;= ~(1U &amp;lt;&amp;lt;0); &lt;/SPAN&gt;&lt;SPAN&gt;//PFlash Block1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FLASH.&lt;/SPAN&gt;&lt;SPAN&gt;SPELOCK&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;R&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;= ~(1U &amp;lt;&amp;lt;0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FLASH.&lt;/SPAN&gt;&lt;SPAN&gt;SSPELOCK&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;R&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;= ~(1U &amp;lt;&amp;lt;0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FLASH.&lt;/SPAN&gt;&lt;SPAN&gt;XSPELOCK&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;R&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;= ~(1U &amp;lt;&amp;lt;0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FLASH.&lt;/SPAN&gt;&lt;SPAN&gt;XSSPELOCK&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;R&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;= ~(1U &amp;lt;&amp;lt;0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PFLASH.&lt;/SPAN&gt;&lt;SPAN&gt;PFCBLK_SPELOCK&lt;/SPAN&gt;&lt;SPAN&gt;[0].&lt;/SPAN&gt;&lt;SPAN&gt;R&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;= ~(1U &amp;lt;&amp;lt;0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PFLASH.&lt;/SPAN&gt;&lt;SPAN&gt;PFCBLK_SPELOCK&lt;/SPAN&gt;&lt;SPAN&gt;[1].&lt;/SPAN&gt;&lt;SPAN&gt;R&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;= ~(1U &amp;lt;&amp;lt;0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PFLASH.&lt;/SPAN&gt;&lt;SPAN&gt;PFCBLK_SPELOCK&lt;/SPAN&gt;&lt;SPAN&gt;[2].&lt;/SPAN&gt;&lt;SPAN&gt;R&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;= ~(1U &amp;lt;&amp;lt;0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PFLASH.&lt;/SPAN&gt;&lt;SPAN&gt;PFCBLKU_SPELOCK&lt;/SPAN&gt;&lt;SPAN&gt;[0].&lt;/SPAN&gt;&lt;SPAN&gt;R&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;= ~(1U &amp;lt;&amp;lt;0); &lt;/SPAN&gt;&lt;SPAN&gt;// UTEST block lock&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But this upper P-Flash area &lt;STRONG&gt;remains locked&lt;/STRONG&gt;, even though D-Flash unlock and write are now working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Any clarification on the correct way to unlock and program the upper 256 KB P-Flash region would be very helpful.&lt;/P&gt;&lt;P&gt;Thanks again for your support.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 21 Nov 2025 12:21:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2233347#M54718</guid>
      <dc:creator>emb-enockal</dc:creator>
      <dc:date>2025-11-21T12:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: FLash driver implementation for write operation in S32K311</title>
      <link>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2234172#M54720</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/256812"&gt;@emb-enockal&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I can unlock the supersector at 0x4B0000&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;IP_PFLASH-&amp;gt;PFCBLK_SSPELOCK[1] &amp;amp;= ~(1U &amp;lt;&amp;lt; 3);&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1763730353027.png" style="width: 648px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/366807i77F715EC3E131446/image-dimensions/648x256?v=v2" width="648" height="256" role="button" title="danielmartynek_0-1763730353027.png" alt="danielmartynek_0-1763730353027.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And reprogram it:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_1-1763730430470.png" style="width: 518px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/366808iFF647A6A1E4CB07A/image-dimensions/518x114?v=v2" width="518" height="114" role="button" title="danielmartynek_1-1763730430470.png" alt="danielmartynek_1-1763730430470.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Refer to these tables in the RM:&lt;/P&gt;
&lt;P&gt;Table 197. Configuration details when the HSE firmware usage feature flag is disabled&lt;/P&gt;
&lt;P&gt;Table 199. Configuration details when the HSE_B firmware usage feature flag is enabled&lt;/P&gt;
&lt;P&gt;Table 200. AB swap configuration&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>Fri, 21 Nov 2025 13:29:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FLash-driver-implementation-for-write-operation-in-S32K311/m-p/2234172#M54720</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2025-11-21T13:29:08Z</dc:date>
    </item>
  </channel>
</rss>

