<?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: Can´t read/write to/from flash</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Can-t-read-write-to-from-flash/m-p/1250076#M59965</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Oliveira,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; Your mentioned SDK1.3.0 and the KDS is really very old now, if you are using the K64 SDK, I highly suggest you use our newest SDK which can be downloaded from this link:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://mcuxpresso.nxp.com/" target="_blank"&gt;https://mcuxpresso.nxp.com/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;About the IDE, KDS is not updated now, and we are using MCUXpresso IDE to replace it, and the SDK is mainly based on the MCUXpresso IDE, IAR, MDK, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;You can download the MCUXpressso IDE from this link:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE" target="_blank"&gt;https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;So, please use the newest SDK, and the K64 SDK already have the flash project, you can test it directly, please don't use the old SDK 1.3.0 and the KDS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; About the PE, you also can use the MCUXPresso CFG tool to replace it, PE is also not updated anymore.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Now answer your other questions:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is there any difference between MK64FN1M0 and MK64FX512 other than flash size? I mean, I read somewhere else that MK64FX512 does not have EEPROM and MK64FN1M0 has (or otherwise, I could misunderstood it)... Does that have anything to do with this read/write problem or there is something left to tweek into KDS/PE/code?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Answer: K64FX has the flexNVM, flexRAM, which can be used as EEPROM, but K64FN, don't have flexNVM, can't use the EEPROM. Please use the newest SDK code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SDK_2.9.0_FRDM-K64F\boards\frdmk64f\driver_examples\flash\pflash&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you use MK64FX512, you also can download that SDK, then you can find the related driver in this SDK folder:SDK_2.9.0_FRDM-K64F\devices&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Wish it helps you!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you still have questions about it, please kindly let me know.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Kerry&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Mar 2021 04:51:15 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2021-03-23T04:51:15Z</dc:date>
    <item>
      <title>Can´t read/write to/from flash</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Can-t-read-write-to-from-flash/m-p/1249701#M59948</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am testing two MCUs on the same board, MK64FN1M0VLL12 and MK64FX512VLL12&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KSDK1.3 and KDS and PE here (older project, can´t help to update) SW has this simple routine (from KSDK examples folder) to write and check some bytes in flash for sensor update: Can´t read/write to/from flash with MK64FX512 only works with MK64FN1M0:&lt;/P&gt;&lt;P&gt;void memoriaFlashLer(void) {&lt;BR /&gt;result = FlashInit(&amp;amp;flashSSDConfig);&lt;BR /&gt;g_FlashLaunchCommand = (pFLASHCOMMANDSEQUENCE)RelocateFunction((uint32_t)ramFunc , LAUNCH_CMD_SIZE ,(uint32_t)FlashCommandSequence);&lt;BR /&gt;destAdrss = flashSSDConfig.PFlashBase + (flashSSDConfig.PFlashSize - 6*FTFx_PSECTOR_SIZE);&lt;BR /&gt;//result = FlashEraseSector(&amp;amp;flashSSDConfig, destAdrss, FTFx_PSECTOR_SIZE, g_FlashLaunchCommand);&lt;BR /&gt;number = FTFx_PSECTOR_SIZE/FSL_FEATURE_FLASH_PFLASH_SECTION_CMD_ADDRESS_ALIGMENT;&lt;BR /&gt;for(marginReadLevel = 0; marginReadLevel &amp;lt;=0x2; marginReadLevel++)&lt;BR /&gt;{&lt;BR /&gt;result = FlashVerifySection(&amp;amp;flashSSDConfig, destAdrss, number, marginReadLevel, g_FlashLaunchCommand);&lt;BR /&gt;}&lt;BR /&gt;destAdrss = flashSSDConfig.PFlashBase + (flashSSDConfig.PFlashSize - 6*FTFx_PSECTOR_SIZE);&lt;BR /&gt;bufferFreqInv2[0] = *((uint8_t *)destAdrss);&lt;BR /&gt;}&lt;BR /&gt;//&lt;BR /&gt;void memoriaFlashEscrever(uint8_t valor) {&lt;BR /&gt;result = FlashInit(&amp;amp;flashSSDConfig);&lt;BR /&gt;g_FlashLaunchCommand = (pFLASHCOMMANDSEQUENCE)RelocateFunction((uint32_t)ramFunc , LAUNCH_CMD_SIZE ,(uint32_t)FlashCommandSequence);&lt;BR /&gt;destAdrss = flashSSDConfig.PFlashBase + (flashSSDConfig.PFlashSize - 6*FTFx_PSECTOR_SIZE);&lt;BR /&gt;result = FlashEraseSector(&amp;amp;flashSSDConfig, destAdrss, FTFx_PSECTOR_SIZE, g_FlashLaunchCommand);&lt;BR /&gt;number = FTFx_PSECTOR_SIZE/FSL_FEATURE_FLASH_PFLASH_SECTION_CMD_ADDRESS_ALIGMENT;&lt;BR /&gt;for(marginReadLevel = 0; marginReadLevel &amp;lt;=0x2; marginReadLevel++)&lt;BR /&gt;{&lt;BR /&gt;result = FlashVerifySection(&amp;amp;flashSSDConfig, destAdrss, number, marginReadLevel, g_FlashLaunchCommand);&lt;BR /&gt;}&lt;BR /&gt;bufferFreqInv2[0] = valor;&lt;BR /&gt;destAdrss = flashSSDConfig.PFlashBase + (flashSSDConfig.PFlashSize - 6*FTFx_PSECTOR_SIZE);&lt;BR /&gt;result = FlashProgram(&amp;amp;flashSSDConfig, destAdrss, BUFFER_SIZE_FREQ_INV2, bufferFreqInv2, g_FlashLaunchCommand);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created for both MCUs independent projects with PE so headers must be correct, right?&lt;/P&gt;&lt;P&gt;Is there any difference between MK64FN1M0 and MK64FX512 other than flash size? I mean, I read somewhere else that MK64FX512 does not have EEPROM and MK64FN1M0 has (or otherwise, I could misunderstood it)... Does that have anything to do with this read/write problem or there is something left to tweek into KDS/PE/code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 13:17:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Can-t-read-write-to-from-flash/m-p/1249701#M59948</guid>
      <dc:creator>Oliveira</dc:creator>
      <dc:date>2021-03-22T13:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can´t read/write to/from flash</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Can-t-read-write-to-from-flash/m-p/1250076#M59965</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Oliveira,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; Your mentioned SDK1.3.0 and the KDS is really very old now, if you are using the K64 SDK, I highly suggest you use our newest SDK which can be downloaded from this link:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://mcuxpresso.nxp.com/" target="_blank"&gt;https://mcuxpresso.nxp.com/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;About the IDE, KDS is not updated now, and we are using MCUXpresso IDE to replace it, and the SDK is mainly based on the MCUXpresso IDE, IAR, MDK, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;You can download the MCUXpressso IDE from this link:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE" target="_blank"&gt;https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;So, please use the newest SDK, and the K64 SDK already have the flash project, you can test it directly, please don't use the old SDK 1.3.0 and the KDS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; About the PE, you also can use the MCUXPresso CFG tool to replace it, PE is also not updated anymore.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Now answer your other questions:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is there any difference between MK64FN1M0 and MK64FX512 other than flash size? I mean, I read somewhere else that MK64FX512 does not have EEPROM and MK64FN1M0 has (or otherwise, I could misunderstood it)... Does that have anything to do with this read/write problem or there is something left to tweek into KDS/PE/code?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Answer: K64FX has the flexNVM, flexRAM, which can be used as EEPROM, but K64FN, don't have flexNVM, can't use the EEPROM. Please use the newest SDK code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SDK_2.9.0_FRDM-K64F\boards\frdmk64f\driver_examples\flash\pflash&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you use MK64FX512, you also can download that SDK, then you can find the related driver in this SDK folder:SDK_2.9.0_FRDM-K64F\devices&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Wish it helps you!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you still have questions about it, please kindly let me know.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Kerry&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 04:51:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Can-t-read-write-to-from-flash/m-p/1250076#M59965</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2021-03-23T04:51:15Z</dc:date>
    </item>
  </channel>
</rss>

