<?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 How to check memory flash sector in MCXA cpu in MCX Microcontrollers</title>
    <link>https://community.nxp.com/t5/MCX-Microcontrollers/How-to-check-memory-flash-sector-in-MCXA-cpu/m-p/2169253#M4059</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I'm developing a project based on the&amp;nbsp;MCXA153VLH and I have to read and write a sector of internal flash memory.&lt;/P&gt;&lt;P&gt;I have developed a procedure based on&amp;nbsp;&lt;EM&gt;romapi_flashiap&lt;/EM&gt; example in the SDK but in the SDK example I can't find any procedure to verify if a sector of flash memory is erased or written.&lt;/P&gt;&lt;P&gt;The problem I have is that, on power-on, I need to check if a flash memory sector has never been written. If that's the case, I have to initialize it with default data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you encountred asimilar problem ?&lt;/P&gt;&lt;P&gt;How did you fix it ?&lt;/P&gt;&lt;P&gt;Thank you very much for your help and cooperation&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;</description>
    <pubDate>Sun, 14 Sep 2025 17:39:45 GMT</pubDate>
    <dc:creator>_Ferrari_</dc:creator>
    <dc:date>2025-09-14T17:39:45Z</dc:date>
    <item>
      <title>How to check memory flash sector in MCXA cpu</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/How-to-check-memory-flash-sector-in-MCXA-cpu/m-p/2169253#M4059</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I'm developing a project based on the&amp;nbsp;MCXA153VLH and I have to read and write a sector of internal flash memory.&lt;/P&gt;&lt;P&gt;I have developed a procedure based on&amp;nbsp;&lt;EM&gt;romapi_flashiap&lt;/EM&gt; example in the SDK but in the SDK example I can't find any procedure to verify if a sector of flash memory is erased or written.&lt;/P&gt;&lt;P&gt;The problem I have is that, on power-on, I need to check if a flash memory sector has never been written. If that's the case, I have to initialize it with default data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you encountred asimilar problem ?&lt;/P&gt;&lt;P&gt;How did you fix it ?&lt;/P&gt;&lt;P&gt;Thank you very much for your help and cooperation&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;</description>
      <pubDate>Sun, 14 Sep 2025 17:39:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/How-to-check-memory-flash-sector-in-MCXA-cpu/m-p/2169253#M4059</guid>
      <dc:creator>_Ferrari_</dc:creator>
      <dc:date>2025-09-14T17:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to check memory flash sector in MCXA cpu</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/How-to-check-memory-flash-sector-in-MCXA-cpu/m-p/2169528#M4062</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/202847"&gt;@_Ferrari_&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The MCX153 Flash memory has default values of all 0xFF when erased. Therefore, we can check if the specific Flash memory bits are all ’1‘ to determine whether the Flash sector has been written to. If all the contents in a sector are read as 0xFF, the sector is unused.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Does this answer your question?&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Jun Zhang&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2025 08:27:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/How-to-check-memory-flash-sector-in-MCXA-cpu/m-p/2169528#M4062</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2025-09-15T08:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to check memory flash sector in MCXA cpu</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/How-to-check-memory-flash-sector-in-MCXA-cpu/m-p/2170313#M4071</link>
      <description>&lt;P&gt;I previously used an LPC5526 processor, where the flash memory could have three states:&lt;/P&gt;&lt;P&gt;erased&lt;/P&gt;&lt;P&gt;programmed (or written)&lt;/P&gt;&lt;P&gt;uninitialized&lt;/P&gt;&lt;P&gt;So, before accessing the flash, I had to use the FLASH_VerifyErase function to check if the flash was accessible. It seems to me that, with this type of processor, the problem doesn't exist. Can you confirm?&lt;/P&gt;&lt;P&gt;Thank you very much for your help and cooperation&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;</description>
      <pubDate>Tue, 16 Sep 2025 08:42:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/How-to-check-memory-flash-sector-in-MCXA-cpu/m-p/2170313#M4071</guid>
      <dc:creator>_Ferrari_</dc:creator>
      <dc:date>2025-09-16T08:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to check memory flash sector in MCXA cpu</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/How-to-check-memory-flash-sector-in-MCXA-cpu/m-p/2172461#M4088</link>
      <description>&lt;P&gt;Hi&amp;nbsp;_Ferrari_，&lt;/P&gt;
&lt;P&gt;MCX and LPC55 Flash are different.&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;LPC55Sxx parts are delivered from the factory mass erased with ECC unset. If performing&amp;nbsp;AHB reads of the flash memory contents AFTER a sector erase, we will have the same HardFault issue. We need to program the sector or use Flash controller read command to overcome it. See my article on this topic&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.nxp.com/t5/LPC-Microcontrollers-Knowledge/LPC55xx-How-to-fix-AHB-Read-HardFault-Error/ta-p/1127260" target="_blank"&gt;[LPC55xx] How to fix AHB Read HardFault Error - NXP Community&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;MCX Flash don't have this limit.&amp;nbsp; While Flash verify API function still works for MCX.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this will help you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jun Zhang&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2025 03:59:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/How-to-check-memory-flash-sector-in-MCXA-cpu/m-p/2172461#M4088</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2025-09-19T03:59:50Z</dc:date>
    </item>
  </channel>
</rss>

