<?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>Kinetis MicrocontrollersのトピックRe: Wear leveling on K22FN512</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wear-leveling-on-K22FN512/m-p/609899#M36028</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your hints Mark, I guess I will look at those code sources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having to use normal speed mode is a show-stopper for me. I simply cannot change the BusClk as I'm building a power supply, and the bus clock is driving the PWM-Waveform. &lt;/P&gt;&lt;P&gt;Is there a manner to write in High-Speed mode? What happens if I do it anyhow? I simply cannot change the BusClk or my system will suffer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Feb 2017 14:01:01 GMT</pubDate>
    <dc:creator>michaelheidinge</dc:creator>
    <dc:date>2017-02-09T14:01:01Z</dc:date>
    <item>
      <title>Wear leveling on K22FN512</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wear-leveling-on-K22FN512/m-p/609895#M36024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Support,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've an application that needs to count the operating seconds. I have implemented the time already.&lt;/P&gt;&lt;P&gt;Now on low power warning, I'd like to store the operating seconds. I have implemted the recognition already,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, my question is, that the flash has a limited endurance of 10k cycles. Is there any recommend tool, that allows to do wear leveling? I use the K22FN512 at the moment, later I want to use the KV4x.&lt;/P&gt;&lt;P&gt;(I saw Flex Memory, but those devices dont have it.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any recommendation how to do that?&lt;/P&gt;&lt;P&gt;-Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2017 11:50:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wear-leveling-on-K22FN512/m-p/609895#M36024</guid>
      <dc:creator>michaelheidinge</dc:creator>
      <dc:date>2017-02-07T11:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Wear leveling on K22FN512</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wear-leveling-on-K22FN512/m-p/609896#M36025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In the uTasker project there is a method called "PARAMETER_AREA" which corresponds to your requirements. It will allow the K22 Flash to be modified 10 million times by defining 2 flash sectors for the storage (or 20 million for 4 sectors, etc.). Same for KV parts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do the same very simply for storing a time value as follows:&lt;/P&gt;&lt;P&gt;1. Define 2 sectors of 4k for the operation&lt;BR /&gt;2. Each time you start, search through the area to find the 'last' value, &lt;EM&gt;which is the valid one&lt;/EM&gt;&lt;BR /&gt;3. Each time you write, write just a long word or phrase (depending of Flash type) to the "end" of the list.&lt;BR /&gt;4. During step 2, if the last value is in the second flash sector, delete the first (to make space for its use again)&lt;BR /&gt;5. If in step 3 the second flash sector is full, write the new value at the start of the first sector&lt;BR /&gt;6. During step 2, if the last value is in the first sector and the second sector is &lt;EM&gt;not&lt;/EM&gt; blank, delete the second sector&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I may have missed a detail or two but the principle should be clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new life expectancy is calculated by:&lt;BR /&gt;Number of writes in a 4k sector (assuming phrase writes) is 4k/8 = 512&lt;BR /&gt;Giving effectively 10k x 512 update cycles for the sector = 5'120k writes&lt;BR /&gt;Due to the two sectors (acting as a swap block to retain the newest value while the older ones are deleted) this doubles to 10'240k&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using multiple sectors again increases the effective 'changes' that can be made to the time value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the "PARAMETER_AREA" operation a set of parameters can also be saved, with the lifetime reducing according to the block size that needs to be written each time, but the basic operation is the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2017 13:53:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wear-leveling-on-K22FN512/m-p/609896#M36025</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-02-07T13:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Wear leveling on K22FN512</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wear-leveling-on-K22FN512/m-p/609897#M36026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Mark, thanks for pointing out that solution. This seems very promissing and feasable to me, as 8k of Flash are not terrible much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any prewritten Flash-Programming library, i can easily use? If not which application note can I follow? &lt;BR /&gt;(I use kinetis design studio without sdk)&lt;/P&gt;&lt;P&gt;-Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2017 14:51:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wear-leveling-on-K22FN512/m-p/609897#M36026</guid>
      <dc:creator>michaelheidinge</dc:creator>
      <dc:date>2017-02-07T14:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Wear leveling on K22FN512</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wear-leveling-on-K22FN512/m-p/609898#M36027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use functions for the sdk as base if you need to use NXP code.&lt;BR /&gt;&lt;SPAN&gt;If you need more powerful but free code (including PARAMETER_AREA and simulation) you can get it from the Open Source uTasker project at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fforum%2Findex.php%3Ftopic%3D1721.msg7086%23msg7086" rel="nofollow" target="_blank"&gt;http://www.utasker.com/forum/index.php?topic=1721.msg7086#msg7086&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;For professional work you can also get a fully up-to-date and supported version at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com" rel="nofollow" target="_blank"&gt;http://www.utasker.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beware that you can't use high speed run mode in your present K22 when programming flash (use RUN mode - 80MHz - for your tests).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;P.S. See flash operation in the video &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dc9GRYXFs9LU%26list%3DPLWKlVb_MqDQFZAulrUywU30v869JBYi9Q%26index%3D4" rel="nofollow" target="_blank"&gt;https://www.youtube.com/watch?v=c9GRYXFs9LU&amp;amp;list=PLWKlVb_MqDQFZAulrUywU30v869JBYi9Q&amp;amp;index=4&lt;/A&gt;&lt;BR /&gt;whereby the user interface for general testing is shown at about 6:00&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2017 15:12:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wear-leveling-on-K22FN512/m-p/609898#M36027</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-02-07T15:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Wear leveling on K22FN512</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wear-leveling-on-K22FN512/m-p/609899#M36028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your hints Mark, I guess I will look at those code sources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having to use normal speed mode is a show-stopper for me. I simply cannot change the BusClk as I'm building a power supply, and the bus clock is driving the PWM-Waveform. &lt;/P&gt;&lt;P&gt;Is there a manner to write in High-Speed mode? What happens if I do it anyhow? I simply cannot change the BusClk or my system will suffer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 14:01:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wear-leveling-on-K22FN512/m-p/609899#M36028</guid>
      <dc:creator>michaelheidinge</dc:creator>
      <dc:date>2017-02-09T14:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Wear leveling on K22FN512</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wear-leveling-on-K22FN512/m-p/609900#M36029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In &lt;STRONG&gt;High Speed RUN&lt;/STRONG&gt; mode flash writes will not operate - they will return a failure.&lt;/P&gt;&lt;P&gt;If the chip is run at 120MHz in &lt;EM&gt;RUN&lt;/EM&gt; mode it works, but this is running the chip out of specification.&lt;/P&gt;&lt;P&gt;Therefore you will either need to run at 80MHz or clock the PWMs from a different source that doesn't need to be changed when programming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use a &lt;STRONG&gt;K22FN1M&lt;/STRONG&gt; instead of K22FN512, which doesn't have HSRUN mode and can use RUN mode up to 120MHz there is no restriction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kinetis for professionals: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fservices.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/services.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 15:09:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wear-leveling-on-K22FN512/m-p/609900#M36029</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-02-09T15:09:20Z</dc:date>
    </item>
  </channel>
</rss>

