<?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: K65 EEPROM Clarification and API for using it in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-EEPROM-Clarification-and-API-for-using-it/m-p/838727#M50652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi unknowncoder,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Thank you for your interest in NXP kinetis product, I would like to provide service for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Answer your several questions:&lt;/P&gt;&lt;P&gt;1. &lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;What is the maximum storage capacity of the EEPROM subsystem? As far as I understand it's the size of the FlexNVM which is 256KB.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The maximum storage capacity of the eeprom is just the flexRAM size, it is 4KB, FlexNVM is just the eeprom backup memory, you don't need to care about it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Actually, the reference manual also mentioned it:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/69173i2B7FEFD6B32C69DF/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. &lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Is there an easy access API to using the EEPROM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;At first, you need to do the eeprom partition, then you can do the eeprom write and read operation, If you want to write the eeprom, you just need to use the &lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;FLEXNVM_EepromWrite()&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;About the EEPROM read, that's very easy, the eeprom address it he flexRAM address, you just need to read that address data is OK.&lt;/P&gt;&lt;P&gt;Take an example:&lt;/P&gt;&lt;P&gt;#define LONGWORD_COUNTER_ADDR 0x14000040&lt;BR /&gt;#define WORD_COUNTER_ADDR 0x14000044&lt;BR /&gt;#define BYTE_COUNTER_ADDR 0x14000046&lt;/P&gt;&lt;P&gt;&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; printf("\nlongword counter = 0x%08X", *(uint32 *)(LONGWORD_COUNTER_ADDR));&lt;BR /&gt;&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; printf("\nword counter = 0x%04X", *(uint16 *)(WORD_COUNTER_ADDR));&lt;BR /&gt;&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; printf("\nbyte counter = 0x%02X", *(uint8 *)(BYTE_COUNTER_ADDR));&lt;/P&gt;&lt;P&gt;About the write, I also have the k series EEPROM register control code, please check the attached .c file.&lt;/P&gt;&lt;P&gt;3. When you write, you also need to give the flexRAM address which already simulated to the EEPROM function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;If you still have question about it, please kindly let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Sep 2018 09:54:19 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2018-09-19T09:54:19Z</dc:date>
    <item>
      <title>K65 EEPROM Clarification and API for using it</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-EEPROM-Clarification-and-API-for-using-it/m-p/838726#M50651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Hello,&lt;SPAN&gt;&amp;nbsp;&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; font-size: small;"&gt;I have read through the user guide for the MK65FX1M0VMI18 and I having a hard time understanding the EEPROM subsystem. I see the EEPROM uses both the FlexRAM(4KB max) and FlexNVM (256KB max).&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR style="color: #000000; background-color: #ffffff; font-size: small;" /&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;What is the maximum storage capacity of the EEPROM subsystem? As far as I understand it's the size of the FlexNVM which is 256KB.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Is there an easy access API to using the EEPROM, I downloaded the SDK for the K65 but I see no API for using the EEPROM. The only method I see is `FLEXNVM_EepromWrite()`. How do I read data from the EEPROM?&amp;nbsp;Can you provide a thorough example for read/writing from/to the EEPROM, including all the setup code?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: small;"&gt;Does the built in EEPROM&amp;nbsp;subsystem within the MCU provide wear leavering? The method `&lt;SPAN&gt;FLEXNVM_EepromWrite()` required the caller to pass in a flash address to write to. I&amp;nbsp;am guessing this is the address of FlexNVM that I want to write to. Does it constantly write to that address or does the EEPROM automatically figure out it should write to another address to provide wear leavering?&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: small;"&gt;&lt;SPAN&gt;Thus the address isn't the real address, isn't a virtual address.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: small;"&gt;&lt;SPAN&gt;Can you confirm this please?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: small;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: small;"&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2018 15:11:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-EEPROM-Clarification-and-API-for-using-it/m-p/838726#M50651</guid>
      <dc:creator>unknowncoder</dc:creator>
      <dc:date>2018-09-18T15:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: K65 EEPROM Clarification and API for using it</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-EEPROM-Clarification-and-API-for-using-it/m-p/838727#M50652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi unknowncoder,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Thank you for your interest in NXP kinetis product, I would like to provide service for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Answer your several questions:&lt;/P&gt;&lt;P&gt;1. &lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;What is the maximum storage capacity of the EEPROM subsystem? As far as I understand it's the size of the FlexNVM which is 256KB.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The maximum storage capacity of the eeprom is just the flexRAM size, it is 4KB, FlexNVM is just the eeprom backup memory, you don't need to care about it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Actually, the reference manual also mentioned it:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/69173i2B7FEFD6B32C69DF/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. &lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Is there an easy access API to using the EEPROM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;At first, you need to do the eeprom partition, then you can do the eeprom write and read operation, If you want to write the eeprom, you just need to use the &lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;FLEXNVM_EepromWrite()&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;About the EEPROM read, that's very easy, the eeprom address it he flexRAM address, you just need to read that address data is OK.&lt;/P&gt;&lt;P&gt;Take an example:&lt;/P&gt;&lt;P&gt;#define LONGWORD_COUNTER_ADDR 0x14000040&lt;BR /&gt;#define WORD_COUNTER_ADDR 0x14000044&lt;BR /&gt;#define BYTE_COUNTER_ADDR 0x14000046&lt;/P&gt;&lt;P&gt;&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; printf("\nlongword counter = 0x%08X", *(uint32 *)(LONGWORD_COUNTER_ADDR));&lt;BR /&gt;&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; printf("\nword counter = 0x%04X", *(uint16 *)(WORD_COUNTER_ADDR));&lt;BR /&gt;&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; printf("\nbyte counter = 0x%02X", *(uint8 *)(BYTE_COUNTER_ADDR));&lt;/P&gt;&lt;P&gt;About the write, I also have the k series EEPROM register control code, please check the attached .c file.&lt;/P&gt;&lt;P&gt;3. When you write, you also need to give the flexRAM address which already simulated to the EEPROM function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;If you still have question about it, please kindly let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2018 09:54:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-EEPROM-Clarification-and-API-for-using-it/m-p/838727#M50652</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2018-09-19T09:54:19Z</dc:date>
    </item>
  </channel>
</rss>

