<?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 &amp;amp; EEPROM erase block in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Flash-amp-EEPROM-erase-block/m-p/1179956#M17576</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;The description of the command can be found in the RM. There is no example code.&lt;/P&gt;
&lt;DIV id="tinyMceEditordianabatrlova_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dianabatrlova_2-1604907887639.png" style="width: 508px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129413i699E4F5DB8DC216A/image-dimensions/508x193?v=v2" width="508" height="193" role="button" title="dianabatrlova_2-1604907887639.png" alt="dianabatrlova_2-1604907887639.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;However, it is important to consider that "Erase Flash Block" belongs to the "Mass Erase" operation.&lt;/P&gt;
&lt;P&gt;And during this operation the P-flash cannot be read because this simultaneous operation is not allowed, see the image below. So, the CPU cannot read P-flash and interrupt vectors. The solution could be to move your code into RAM. For example, the &lt;A href="https://www.nxp.com/webapp/Download?colCode=AN12086" target="_self"&gt;AN12086&lt;/A&gt;, &lt;A href="https://www.nxp.com/docs/en/application-note-software/AN12086SW.ZIP" target="_self"&gt;AN12086SW&lt;/A&gt; has the possibility to move the whole bootloader code into the RAM to self-update.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dianabatrlova_0-1604670578595.png" style="width: 520px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129317iBD005E723BC16D91/image-dimensions/520x359?v=v2" width="520" height="359" role="button" title="dianabatrlova_0-1604670578595.png" alt="dianabatrlova_0-1604670578595.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I hope it helps.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Diana&lt;/P&gt;</description>
    <pubDate>Mon, 09 Nov 2020 08:09:21 GMT</pubDate>
    <dc:creator>dianabatrlova</dc:creator>
    <dc:date>2020-11-09T08:09:21Z</dc:date>
    <item>
      <title>Flash &amp; EEPROM erase block</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Flash-amp-EEPROM-erase-block/m-p/1178818#M17572</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using MC9S12ZVCRM micro.&lt;/P&gt;&lt;P&gt;I have a question about the memory erasing.&lt;/P&gt;&lt;P&gt;Currently I reached to erase a P-Flash sector (512Bytes) by using Erase P-Flash Sector command.&lt;/P&gt;&lt;P&gt;But I need to erase all application block (from 0xFD0000 to 0xFF7FFF -&amp;gt; 160&amp;nbsp;Kb), I can do it by calling &amp;nbsp;Erase P-Flash Sector command 320 times… but it is very long and not clean...&lt;/P&gt;&lt;P&gt;There is a command Erase Flash Block, but I do not understand how to use it.&lt;/P&gt;&lt;P&gt;How can&amp;nbsp;use&amp;nbsp;"Erase Flash Block" command to erase P-Flash memory from 0xFD0000 to 0xFF7FFF&amp;nbsp;?&lt;/P&gt;&lt;P&gt;How can&amp;nbsp;use&amp;nbsp;"Erase Flash Block" command to erase&amp;nbsp;the whole EEPROM memory?&lt;/P&gt;&lt;P&gt;Someone can explain or share an example?&lt;/P&gt;&lt;P&gt;Thanks a lot for your help!!!&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 14:32:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Flash-amp-EEPROM-erase-block/m-p/1178818#M17572</guid>
      <dc:creator>michael_90300</dc:creator>
      <dc:date>2020-11-05T14:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Flash &amp; EEPROM erase block</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Flash-amp-EEPROM-erase-block/m-p/1179956#M17576</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;The description of the command can be found in the RM. There is no example code.&lt;/P&gt;
&lt;DIV id="tinyMceEditordianabatrlova_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dianabatrlova_2-1604907887639.png" style="width: 508px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129413i699E4F5DB8DC216A/image-dimensions/508x193?v=v2" width="508" height="193" role="button" title="dianabatrlova_2-1604907887639.png" alt="dianabatrlova_2-1604907887639.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;However, it is important to consider that "Erase Flash Block" belongs to the "Mass Erase" operation.&lt;/P&gt;
&lt;P&gt;And during this operation the P-flash cannot be read because this simultaneous operation is not allowed, see the image below. So, the CPU cannot read P-flash and interrupt vectors. The solution could be to move your code into RAM. For example, the &lt;A href="https://www.nxp.com/webapp/Download?colCode=AN12086" target="_self"&gt;AN12086&lt;/A&gt;, &lt;A href="https://www.nxp.com/docs/en/application-note-software/AN12086SW.ZIP" target="_self"&gt;AN12086SW&lt;/A&gt; has the possibility to move the whole bootloader code into the RAM to self-update.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dianabatrlova_0-1604670578595.png" style="width: 520px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129317iBD005E723BC16D91/image-dimensions/520x359?v=v2" width="520" height="359" role="button" title="dianabatrlova_0-1604670578595.png" alt="dianabatrlova_0-1604670578595.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I hope it helps.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Diana&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 08:09:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Flash-amp-EEPROM-erase-block/m-p/1179956#M17576</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-11-09T08:09:21Z</dc:date>
    </item>
  </channel>
</rss>

