<?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: FTFE driver on K26 excecuting from RAM in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FTFE-driver-on-K26-excecuting-from-RAM/m-p/920605#M53747</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Nagabhushan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thank you in advance for your patience. I am currently confirming the information. I will let you know as soon as I have an answer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Sabina&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Sep 2019 17:33:49 GMT</pubDate>
    <dc:creator>Sabina_Bruce</dc:creator>
    <dc:date>2019-09-16T17:33:49Z</dc:date>
    <item>
      <title>FTFE driver on K26 excecuting from RAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FTFE-driver-on-K26-excecuting-from-RAM/m-p/920604#M53746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. There is a requirement to store some information across power cycles and since there is no FlexNVM on K26(at least the p/n we have), we decided to store that information in program flash itself.&lt;/P&gt;&lt;P&gt;I have implemented the FTFE program flash driver to execute from RAM during power up to erase/write to the program flash.&lt;/P&gt;&lt;P&gt;My question - Is it necessary to execute the flash driver&amp;nbsp;from RAM, I did not find any documentation recommending against executing the code from flash while the Flash erase/write operations are performed. Any suggestions/recommendations? Is it not safe to execute flash driver and perform operation on itself?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The manual mentions :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;EM&gt;A flash memory location must be in the erased state before&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;being programmed. Cumulative programming of bits (back-to back&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;program operations without an intervening erase) within a&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;flash memory location is not allowed. Re-programming of&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;existing 0s to 0 is not allowed as this over stresses the device.&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;From a performance point of view I would rather not erase every power-up but I am doing so because of this directive&lt;/P&gt;&lt;P&gt;My question&amp;nbsp; - Is erasing flash better than over writing 0s to 0. In my case as I am erasing a block of memory on every power cycle, will there be memory degradation. What would over stress the device more in this case writing 0s to 0s or erasing same block of memory over and over?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nagabhushan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2019 17:48:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FTFE-driver-on-K26-excecuting-from-RAM/m-p/920604#M53746</guid>
      <dc:creator>nagabhushan_v</dc:creator>
      <dc:date>2019-09-12T17:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: FTFE driver on K26 excecuting from RAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FTFE-driver-on-K26-excecuting-from-RAM/m-p/920605#M53747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Nagabhushan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thank you in advance for your patience. I am currently confirming the information. I will let you know as soon as I have an answer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Sabina&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2019 17:33:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FTFE-driver-on-K26-excecuting-from-RAM/m-p/920605#M53747</guid>
      <dc:creator>Sabina_Bruce</dc:creator>
      <dc:date>2019-09-16T17:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: FTFE driver on K26 excecuting from RAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FTFE-driver-on-K26-excecuting-from-RAM/m-p/920606#M53748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: #000000;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Hello&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;Nagabhushan,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; border: 0px; font-size: 15px;"&gt;Here are the answers to your questions above:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; border: 0px; font-size: 15px;"&gt;1. It is not necessary to execute the flash driver from RAM. You may do this from flash itself. However, it is necessary that you use different blocks.As long as you execute on a different block than the one you are programming this will be safe operation. Keep in mind, that the flash memory on this device should not be programmed or erased while operating in High Speed Run or VLPR power modes. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; border: 0px; font-size: 15px;"&gt;2.&amp;nbsp;The programming operation is unidirectional it can only move bits from the '1' state (erased) to the '0' state(programmed). Only the erase operations restores the bits from '0' to '1'. In addition you cannot program the bits from '0' to '1'. You can find more information on this in &lt;A href="https://www.nxp.com/docs/en/reference-manual/K26P169M180SF5RM.pdf"&gt;Chapter 32&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; border: 0px; font-size: 15px;"&gt;Please let me know if you have any further questions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; border: 0px; font-size: 15px;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; border: 0px; font-size: 15px;"&gt;Sabina&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2019 17:26:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FTFE-driver-on-K26-excecuting-from-RAM/m-p/920606#M53748</guid>
      <dc:creator>Sabina_Bruce</dc:creator>
      <dc:date>2019-09-17T17:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: FTFE driver on K26 excecuting from RAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FTFE-driver-on-K26-excecuting-from-RAM/m-p/920607#M53749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sabina,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the answers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. So that would be 1MB block ranges as per the table in &lt;SPAN style="text-decoration: underline;"&gt;Section 4.2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;either 0x0000_0000 -&amp;nbsp;0x000F_FFFF or&amp;nbsp;0x0010_0000 -&amp;nbsp;0x001F_FFFF. Is that correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. About question 2, maybe i didn't phrase the question properly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am aware that '0' cannot be programmed to '1' but is it safe to program '0' to '0'. The reason to do this is avoiding erase operation.&lt;/P&gt;&lt;P&gt;For example say I have Data 0xDEADBEEF = &amp;gt;&amp;nbsp;‭1101 1110 1010 1101 1011 1110 1110 1111‬. Is it ok to program this to 0x00000000 by using the Program command where in I would be trying to program '1' to '0' and '0' to '0' (which would have no effect?)&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have done this in some external flash devices before but since the manual specifically talks about it (refer my OP), wanted to understand if performing the above operation would stress the device over say erasing &lt;STRONG&gt;every power-up&lt;/STRONG&gt;. So it would be&amp;nbsp;&lt;/P&gt;&lt;P&gt;0xDEADBEEF -----erase -------&amp;gt; 0xFFFFFFFF -----program ----&amp;gt; 0x00000000&amp;nbsp;&lt;/P&gt;&lt;P&gt;vs&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0xDEADBEEF ---- program---&amp;gt;0x0000000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nagabhushan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2019 02:46:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FTFE-driver-on-K26-excecuting-from-RAM/m-p/920607#M53749</guid>
      <dc:creator>nagabhushan_v</dc:creator>
      <dc:date>2019-09-18T02:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: FTFE driver on K26 excecuting from RAM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FTFE-driver-on-K26-excecuting-from-RAM/m-p/920608#M53750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Nagabhushan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;1. Yes these are the correct block ranges for Block0/1 and Block2/3.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;2. Overwriting 0s to 0 is not allowed, it will harm the microcontroller and will cause problems later on. In this case the process is &lt;STRONG&gt;"0xDEADBEEF -----erase -------&amp;gt; 0xFFFFFFFF -----program ----&amp;gt; 0x00000000&amp;nbsp;"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Sabina&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2019 19:40:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FTFE-driver-on-K26-excecuting-from-RAM/m-p/920608#M53750</guid>
      <dc:creator>Sabina_Bruce</dc:creator>
      <dc:date>2019-09-18T19:40:09Z</dc:date>
    </item>
  </channel>
</rss>

