<?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: In-software flash programming MKL17Z64 fsl_flash driver in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/In-software-flash-programming-MKL17Z64-fsl-flash-driver/m-p/729214#M7666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi dave sturgess&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recommend you to check the example provided in the SDK 2.x software package, you can download the latest package in the link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuxpresso.nxp.com/en/welcome" title="https://mcuxpresso.nxp.com/en/welcome"&gt;Welcome | MCUXpresso SDK Builder&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the path SDK_2.x_KL17_path\boards\frdmkl27z\driver_examples\flash\pflash\&lt;/P&gt;&lt;P&gt;you can find an example using those API with Flash controller.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 May 2018 19:01:43 GMT</pubDate>
    <dc:creator>jorge_a_vazquez</dc:creator>
    <dc:date>2018-05-13T19:01:43Z</dc:date>
    <item>
      <title>In-software flash programming MKL17Z64 fsl_flash driver</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/In-software-flash-programming-MKL17Z64-fsl-flash-driver/m-p/729213#M7665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to in-software program the flash on a MKL17Z64... with the fsl_flash driver, I can find no examples of how to do this.&lt;/P&gt;&lt;P&gt;I have in the past successfully carried out the same on the MKL17Z128 but this has two flash blocks so I programmed block 1 while executing from block zero, this is not possible on the 64K part as there is only 1 block.&lt;/P&gt;&lt;P&gt;I believe that a sequence is loaded into RAM which carries out the programming or erase to circumvent this limitation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the following (with breakpoint at each function) to step through the process:-&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;status_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; status;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;flash_config_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; f_config;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;status = FLASH_Init(&amp;amp;f_config);&lt;/P&gt;&lt;P&gt;status = FLASH_Erase(&amp;amp;f_config, 0xf000, 1024, 0);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;status = FLASH_Program(&amp;amp;f_config, 0xf000, (&lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;)0x3000, 32);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;status = FLASH_Erase(&amp;amp;f_config, 0xf000, 1024, 0);&lt;/P&gt;&lt;P&gt;delay_sec(1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get a hard fault on:-&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;(&lt;/SPAN&gt;&lt;EM style="color: #0000c0; font-size: small;"&gt;kFLASH_ExecuteInRamFunctionTotalNum&lt;/EM&gt;&lt;SPAN style="font-size: small;"&gt; == flashExecuteInRamFunctionInfo-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;activeFunctionCount&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;in function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;static&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;status_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;(&lt;/SPAN&gt;&lt;EM style="color: #0000c0; font-size: small;"&gt;kFLASH_ExecuteInRamFunctionTotalNum&lt;/EM&gt;&lt;SPAN style="font-size: small;"&gt; == flashExecuteInRamFunctionInfo-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;activeFunctionCount&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;called from FLASH_init.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;Grateful&amp;nbsp;for any help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;Dave&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 11:35:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/In-software-flash-programming-MKL17Z64-fsl-flash-driver/m-p/729213#M7665</guid>
      <dc:creator>davesturgess</dc:creator>
      <dc:date>2018-05-07T11:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: In-software flash programming MKL17Z64 fsl_flash driver</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/In-software-flash-programming-MKL17Z64-fsl-flash-driver/m-p/729214#M7666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi dave sturgess&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recommend you to check the example provided in the SDK 2.x software package, you can download the latest package in the link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuxpresso.nxp.com/en/welcome" title="https://mcuxpresso.nxp.com/en/welcome"&gt;Welcome | MCUXpresso SDK Builder&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the path SDK_2.x_KL17_path\boards\frdmkl27z\driver_examples\flash\pflash\&lt;/P&gt;&lt;P&gt;you can find an example using those API with Flash controller.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 May 2018 19:01:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/In-software-flash-programming-MKL17Z64-fsl-flash-driver/m-p/729214#M7666</guid>
      <dc:creator>jorge_a_vazquez</dc:creator>
      <dc:date>2018-05-13T19:01:43Z</dc:date>
    </item>
  </channel>
</rss>

