<?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 Is it possible to write to flash during runtime on the MKL16Z64 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Is-it-possible-to-write-to-flash-during-runtime-on-the-MKL16Z64/m-p/1058451#M57029</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;OL style="margin-top: 0cm;"&gt;&lt;LI style="margin-left: 0cm;"&gt;Is it possible to write to flash during runtime on the MKL16Z64?&lt;/LI&gt;&lt;LI style="margin-left: 0cm;"&gt;Are there drivers/HAL for writing to Flash?&lt;/LI&gt;&lt;LI style="margin-left: 0cm;"&gt;Is there example code provided?&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jun 2020 09:51:24 GMT</pubDate>
    <dc:creator>glenire</dc:creator>
    <dc:date>2020-06-04T09:51:24Z</dc:date>
    <item>
      <title>Is it possible to write to flash during runtime on the MKL16Z64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Is-it-possible-to-write-to-flash-during-runtime-on-the-MKL16Z64/m-p/1058451#M57029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;OL style="margin-top: 0cm;"&gt;&lt;LI style="margin-left: 0cm;"&gt;Is it possible to write to flash during runtime on the MKL16Z64?&lt;/LI&gt;&lt;LI style="margin-left: 0cm;"&gt;Are there drivers/HAL for writing to Flash?&lt;/LI&gt;&lt;LI style="margin-left: 0cm;"&gt;Is there example code provided?&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2020 09:51:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Is-it-possible-to-write-to-flash-during-runtime-on-the-MKL16Z64/m-p/1058451#M57029</guid>
      <dc:creator>glenire</dc:creator>
      <dc:date>2020-06-04T09:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to write to flash during runtime on the MKL16Z64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Is-it-possible-to-write-to-flash-during-runtime-on-the-MKL16Z64/m-p/1058452#M57030</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;See&lt;BR /&gt;&lt;A href="https://www.utasker.com/kinetis/FRDM-KL26Z.html" target="test_blank"&gt;https://www.utasker.com/kinetis/FRDM-KL26Z.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use Flash for file system, logging of parameter system and the SDK will certainly have flash drivers for the device.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want a complete solution just use the open source uTasker project since it includes these as standard and allows simulation of the KL26(16), including its flash and other peripherals.&lt;BR /&gt;&lt;A href="https://github.com/uTasker/uTasker-Kinetis" target="test_blank"&gt;https://github.com/uTasker/uTasker-Kinetis&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file system/parameter system and flash API document:&lt;BR /&gt;&lt;A href="https://www.utasker.com/docs/uTasker/uTaskerFileSystem_3.PDF" target="test_blank"&gt;https://www.utasker.com/docs/uTasker/uTaskerFileSystem_3.PDF&lt;/A&gt;&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;BR /&gt;&lt;EM&gt;[uTasker project developer for Kinetis and i.MX RT]&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2020 15:52:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Is-it-possible-to-write-to-flash-during-runtime-on-the-MKL16Z64/m-p/1058452#M57030</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2020-06-04T15:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to write to flash during runtime on the MKL16Z64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Is-it-possible-to-write-to-flash-during-runtime-on-the-MKL16Z64/m-p/1058453#M57031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Glen,&lt;/P&gt;&lt;P&gt;Please read section 27.4.5 and 27.4.6 first. Reading from program flash memory space while a flash command is active is not allowed. When the flash is programming, MCU can't get next code from Flash. This will cause hardfault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is flash demo in KL16 SDK (SDK_2.2.0_MKL16Z64xxx4.zip\boards\frdmkl26z\driver_examples\flash\pflash). You can see that is code is execute in flash too. This is because before it trig flash erase/program command, it will copy a small piece of code to ram. This code will write CCIF register to launch the command and wait till command finish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, please refer to the pflash example and use this code directly. Flash can't program in VLPR mode. And please disable all interrupt before erase/program flash. This is because if interrupt happened during flash operation, MCU will read flash for interrupt vector address and service code. This will cause hardfault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2020 03:28:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Is-it-possible-to-write-to-flash-during-runtime-on-the-MKL16Z64/m-p/1058453#M57031</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2020-06-05T03:28:40Z</dc:date>
    </item>
  </channel>
</rss>

