<?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 Erase operation taking too long to complete in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Erase-operation-taking-too-long-to-complete/m-p/605508#M13111</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are using a Freescale microcontroller for a project and have a few queries about the time required to erase the flash memory. We are currently using the Freescale &lt;STRONG&gt;MC9S12ZVC-64 Pin (ECC: 192 Kbyte) &lt;/STRONG&gt;package option, Compiler as Freescale &lt;STRONG&gt;CodeWarrior v10.6.4&lt;/STRONG&gt; .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have created a Flash library, which is executing from the RAM for the erase and program functionalities. Please find the attachment of the code for Erase functionality. This function updates the necessary registers such as the FCLKDIV,FSTAT and the FCCOB register. And monitor the FSTAT register to ensure that the erase is complete.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Similarly the same is done for the Program function. We have observed that both the Erase and Program operations work as expected to. But the Erase operation takes a very long time to erase the Flash area.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are the timings observed during our internal testing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE style="margin-left: 116.6pt;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; background: #BFBFBF; padding: 0in 5.4pt 0in 5.4pt;" width="156"&gt;&lt;P&gt;Size ( in bytes)&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid windowtext 1.0pt; border-left: none; background: #BFBFBF; padding: 0in 5.4pt 0in 5.4pt;" width="174"&gt;&lt;P&gt;Time ( in Seconds)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0in 5.4pt 0in 5.4pt;" width="156"&gt;&lt;P&gt;10&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt;" width="174"&gt;&lt;P&gt;0.05&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0in 5.4pt 0in 5.4pt;" width="156"&gt;&lt;P&gt;10Kb&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt;" width="174"&gt;&lt;P&gt;26&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0in 5.4pt 0in 5.4pt;" width="156"&gt;&lt;P&gt;120Kb&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt;" width="174"&gt;&lt;P&gt;320&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help us analyze why the microcontroller is taking so much time to erase the Flash Memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: &amp;nbsp;Added the attachment&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Apr 2017 07:11:28 GMT</pubDate>
    <dc:creator>satyapraneethvu</dc:creator>
    <dc:date>2017-04-13T07:11:28Z</dc:date>
    <item>
      <title>Erase operation taking too long to complete</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Erase-operation-taking-too-long-to-complete/m-p/605508#M13111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are using a Freescale microcontroller for a project and have a few queries about the time required to erase the flash memory. We are currently using the Freescale &lt;STRONG&gt;MC9S12ZVC-64 Pin (ECC: 192 Kbyte) &lt;/STRONG&gt;package option, Compiler as Freescale &lt;STRONG&gt;CodeWarrior v10.6.4&lt;/STRONG&gt; .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have created a Flash library, which is executing from the RAM for the erase and program functionalities. Please find the attachment of the code for Erase functionality. This function updates the necessary registers such as the FCLKDIV,FSTAT and the FCCOB register. And monitor the FSTAT register to ensure that the erase is complete.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Similarly the same is done for the Program function. We have observed that both the Erase and Program operations work as expected to. But the Erase operation takes a very long time to erase the Flash area.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are the timings observed during our internal testing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE style="margin-left: 116.6pt;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; background: #BFBFBF; padding: 0in 5.4pt 0in 5.4pt;" width="156"&gt;&lt;P&gt;Size ( in bytes)&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid windowtext 1.0pt; border-left: none; background: #BFBFBF; padding: 0in 5.4pt 0in 5.4pt;" width="174"&gt;&lt;P&gt;Time ( in Seconds)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0in 5.4pt 0in 5.4pt;" width="156"&gt;&lt;P&gt;10&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt;" width="174"&gt;&lt;P&gt;0.05&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0in 5.4pt 0in 5.4pt;" width="156"&gt;&lt;P&gt;10Kb&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt;" width="174"&gt;&lt;P&gt;26&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0in 5.4pt 0in 5.4pt;" width="156"&gt;&lt;P&gt;120Kb&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt;" width="174"&gt;&lt;P&gt;320&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help us analyze why the microcontroller is taking so much time to erase the Flash Memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: &amp;nbsp;Added the attachment&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2017 07:11:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Erase-operation-taking-too-long-to-complete/m-p/605508#M13111</guid>
      <dc:creator>satyapraneethvu</dc:creator>
      <dc:date>2017-04-13T07:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Erase operation taking too long to complete</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Erase-operation-taking-too-long-to-complete/m-p/605509#M13112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you erase the flash by sectors?&lt;/P&gt;&lt;P&gt;I do not see the attachment. Could you please attach the erase function?&lt;/P&gt;&lt;P&gt;You can refer to the attached example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2017 08:42:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Erase-operation-taking-too-long-to-complete/m-p/605509#M13112</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2017-04-13T08:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Erase operation taking too long to complete</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Erase-operation-taking-too-long-to-complete/m-p/605510#M13113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code you attached is full of macros and functions without definition. I’m not able to understand what it does.&lt;/P&gt;&lt;P&gt;Is the whole function in ram? The only code that needs to be in ram is&lt;/P&gt;&lt;P&gt;FSTAT_CCIF = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; // launch command&lt;/P&gt;&lt;P&gt;while(FSTAT_CCIF == 0); // wait for done&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try the example.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2017 11:55:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Erase-operation-taking-too-long-to-complete/m-p/605510#M13113</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2017-04-13T11:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Erase operation taking too long to complete</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Erase-operation-taking-too-long-to-complete/m-p/605511#M13114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the Delayed response Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We placed only the launch and wait command in RAM. This works fine.. Thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 15:40:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Erase-operation-taking-too-long-to-complete/m-p/605511#M13114</guid>
      <dc:creator>satyapraneethvu</dc:creator>
      <dc:date>2017-05-12T15:40:41Z</dc:date>
    </item>
  </channel>
</rss>

