<?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: When to write to NVM</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/When-to-write-to-NVM/m-p/685616#M42201</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;you need to write long words (rather than individual bytes) but the technique is correct as you describe it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the uTasker project this is one of the strategies integrated into the frame work (the one called USE_PARAMETER_AREA in the parameter configuration options below)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 13px;"&gt;#define USE_PARAMETER_BLOCK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // enable a parameter block for storing and retrieving non-volatile information&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define USE_PAR_SWAP_BLOCK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // we support a backup block which can be restored if desired (it is recommended to use this together with USE_PARAMETER_BLOCK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 13px;"&gt;&amp;nbsp; //#define PARAMETER_NO_ALIGNMENT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // the driver doesn't need to respect byte write restrictions since the application does - this can improve memory utilisation when bytes writes are not supported by the hardware&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 13px;"&gt;//&lt;SPAN style="color: #ff0000;"&gt;#define USE_PARAMETER_AREA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // simple parameter area rather than parameter block&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When &lt;STRONG&gt;USE_PARAMETER_AREA&lt;/STRONG&gt; is enabled, the following API calls are available which manage it this way and is compatible for any Kinetis part (the user defines the Flash sectors making up the area):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Called to retrieve the valid block of parameters from the parameter area&lt;BR /&gt;//&lt;BR /&gt;extern int fnGetPar(unsigned short usParameterReference, unsigned char *ucValue, unsigned short usLength);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Called to set a byte or block of bytes to a parameter block&lt;BR /&gt;//&lt;BR /&gt;extern int fnSetPar(unsigned short usParameterReference, unsigned char *ucValue, unsigned short usLength);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Called to delete a block in the parameter block or to manipulate parameter block itself&lt;BR /&gt;//&lt;BR /&gt;extern int fnDelPar(unsigned char ucDeleteType);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&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;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTRK-KEA64.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TRK-KEA64.html&lt;/A&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FFRDM-KEAZ64Q64.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/FRDM-KEAZ64Q64.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Jul 2017 19:44:20 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2017-07-27T19:44:20Z</dc:date>
    <item>
      <title>When to write to NVM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/When-to-write-to-NVM/m-p/685615#M42200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll get straight to the question: Is there anything wrong with writing to unwritten flash at any time? That is to say, we have a sector that has been erased, I want to write to a "virgin" portion of this sector at any time even after a reset/power-up. Basically, write to any flash bytes that are still set to 0xFF in a predefined sector?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working with a KEA64 MCU. I need to write a small amount of data to flash frequently. I've got plenty of flash space to spare. I could use one or more sectors, and write to them sequentially. Once a sector is filled, it gets erased and put to the end of the write queue. The theory is that writing 8 bytes sequentially get me 64 writes per deteriorating erase/write cycle, thus extending my usable "write" cycles from a minimum of 10k to 640k.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any reason this would not work, or is not favorable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 15:34:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/When-to-write-to-NVM/m-p/685615#M42200</guid>
      <dc:creator>rmaier</dc:creator>
      <dc:date>2017-07-27T15:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: When to write to NVM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/When-to-write-to-NVM/m-p/685616#M42201</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;you need to write long words (rather than individual bytes) but the technique is correct as you describe it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the uTasker project this is one of the strategies integrated into the frame work (the one called USE_PARAMETER_AREA in the parameter configuration options below)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 13px;"&gt;#define USE_PARAMETER_BLOCK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // enable a parameter block for storing and retrieving non-volatile information&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define USE_PAR_SWAP_BLOCK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // we support a backup block which can be restored if desired (it is recommended to use this together with USE_PARAMETER_BLOCK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 13px;"&gt;&amp;nbsp; //#define PARAMETER_NO_ALIGNMENT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // the driver doesn't need to respect byte write restrictions since the application does - this can improve memory utilisation when bytes writes are not supported by the hardware&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 13px;"&gt;//&lt;SPAN style="color: #ff0000;"&gt;#define USE_PARAMETER_AREA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // simple parameter area rather than parameter block&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When &lt;STRONG&gt;USE_PARAMETER_AREA&lt;/STRONG&gt; is enabled, the following API calls are available which manage it this way and is compatible for any Kinetis part (the user defines the Flash sectors making up the area):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Called to retrieve the valid block of parameters from the parameter area&lt;BR /&gt;//&lt;BR /&gt;extern int fnGetPar(unsigned short usParameterReference, unsigned char *ucValue, unsigned short usLength);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Called to set a byte or block of bytes to a parameter block&lt;BR /&gt;//&lt;BR /&gt;extern int fnSetPar(unsigned short usParameterReference, unsigned char *ucValue, unsigned short usLength);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Called to delete a block in the parameter block or to manipulate parameter block itself&lt;BR /&gt;//&lt;BR /&gt;extern int fnDelPar(unsigned char ucDeleteType);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&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;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTRK-KEA64.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TRK-KEA64.html&lt;/A&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FFRDM-KEAZ64Q64.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/FRDM-KEAZ64Q64.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 19:44:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/When-to-write-to-NVM/m-p/685616#M42201</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-07-27T19:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: When to write to NVM</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/When-to-write-to-NVM/m-p/685617#M42202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great. Thanks for the advice, Mark.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 20:15:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/When-to-write-to-NVM/m-p/685617#M42202</guid>
      <dc:creator>rmaier</dc:creator>
      <dc:date>2017-07-27T20:15:14Z</dc:date>
    </item>
  </channel>
</rss>

