<?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: flash operations in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2046311#M67299</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RajPadmani_0-1739877157357.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/324507iF86F0F671BC2829E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RajPadmani_0-1739877157357.png" alt="RajPadmani_0-1739877157357.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am using this bootloader in the KM34 microcontroller. In the bootloader code, I only changed the memory addresses to make it compatible with the KM34.&lt;BR /&gt;&lt;BR /&gt;The mem_write function is a wrapper that uses the flash_program&amp;nbsp;function to write to flash. However, it executes faster than the flash_program function, which I used directly in my application.&lt;BR /&gt;&lt;BR /&gt;You can find this function in "bl_context.c"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RajPadmani_1-1739877456440.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/324508i2AF769A994088D16/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RajPadmani_1-1739877456440.png" alt="RajPadmani_1-1739877456440.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;In this file, there is a structure named &lt;STRONG&gt;g_bootloaderContext&lt;/STRONG&gt;, which contains a structure variable called &lt;STRONG&gt;memoryInterface&lt;/STRONG&gt;. The value of &lt;STRONG&gt;g_memoryInterface&lt;/STRONG&gt; is assigned to it, and within &lt;STRONG&gt;g_memoryInterface&lt;/STRONG&gt;, you will find the &lt;STRONG&gt;mem_write&lt;/STRONG&gt; function.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RajPadmani_2-1739877495177.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/324509iB086C1FAE08BCA75/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RajPadmani_2-1739877495177.png" alt="RajPadmani_2-1739877495177.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have attached the bootloader SDK example that I'm using.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2025 11:30:38 GMT</pubDate>
    <dc:creator>RajPadmani</dc:creator>
    <dc:date>2025-02-18T11:30:38Z</dc:date>
    <item>
      <title>flash operations</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2042634#M67286</link>
      <description>&lt;P&gt;Why does the PFlash SDK example take more time to write to flash compared to the bootloader, even though both use the same functions for writing to flash?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 13:30:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2042634#M67286</guid>
      <dc:creator>RajPadmani</dc:creator>
      <dc:date>2025-02-12T13:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: flash operations</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2042987#M67287</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/235409"&gt;@RajPadmani&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for your post.&amp;nbsp;To better support you, could you please provide me with more details? Specifically, I'd like to know the model of the MCU you are using, the IDE you've chosen, the version of the SDK, and the type of the bootloader.&lt;/P&gt;
&lt;P&gt;Have a good day,&lt;/P&gt;
&lt;P&gt;Celeste&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 02:12:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2042987#M67287</guid>
      <dc:creator>Celeste_Liu</dc:creator>
      <dc:date>2025-02-13T02:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: flash operations</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2043091#M67288</link>
      <description>I am using KM34 MCU and use the pflash SDK example and SDK bootloader example. I am using latest SDK and Mcuxpresso ide</description>
      <pubDate>Thu, 13 Feb 2025 05:07:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2043091#M67288</guid>
      <dc:creator>RajPadmani</dc:creator>
      <dc:date>2025-02-13T05:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: flash operations</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2045077#M67295</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/235409"&gt;@RajPadmani&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I couldn't find the bootloader example in the KM34 SDK.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Celeste_Liu_0-1739763611042.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/324172i34CFFB9DEB1D0A7D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Celeste_Liu_0-1739763611042.png" alt="Celeste_Liu_0-1739763611042.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you describe the problem in more detail? Also, how did you conduct the tests? Based on the current information you've provided, we're unable to pinpoint the problem.&lt;/P&gt;
&lt;P&gt;BRs,&lt;/P&gt;
&lt;P&gt;Celeste&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2025 03:41:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2045077#M67295</guid>
      <dc:creator>Celeste_Liu</dc:creator>
      <dc:date>2025-02-17T03:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: flash operations</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2045151#M67296</link>
      <description>&lt;P&gt;There is no SDK example for the MKM34Z256VLQ7 bootloader, so I customized the MKM35 bootloader to run on the MKM34, and it worked perfectly.&lt;/P&gt;&lt;P&gt;In the bootloader, I read the application and write it using the "mem_write" function, which writes one sector significantly faster compared to the "flash_program" function from the "PFlash" SDK example for the MKM34Z256VLQ7.&lt;/P&gt;&lt;P&gt;Even after matching the clock speed with the bootloader code, the "PFlash" SDK example still takes longer for writing and erasing.&lt;/P&gt;&lt;P&gt;What could be the reason for this difference in performance?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2025 06:12:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2045151#M67296</guid>
      <dc:creator>RajPadmani</dc:creator>
      <dc:date>2025-02-17T06:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: flash operations</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2046261#M67298</link>
      <description>&lt;P&gt;To clarify the differences between the "mem_write" function and the "flash_program" function, I need to understand their specific implementation methods. Given that you are using a customized bootloader, I'm not sure how "mem_write" is implemented, and I haven't been able to find relevant content in the API Reference Manual either.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Celeste_Liu_0-1739874198721.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/324500iAFB3B62A02735B38/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Celeste_Liu_0-1739874198721.png" alt="Celeste_Liu_0-1739874198721.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I wonder if you could send me this part of the code. If you have referred to any existing SDK projects or ANs, please let me know as well.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 10:23:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2046261#M67298</guid>
      <dc:creator>Celeste_Liu</dc:creator>
      <dc:date>2025-02-18T10:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: flash operations</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2046311#M67299</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RajPadmani_0-1739877157357.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/324507iF86F0F671BC2829E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RajPadmani_0-1739877157357.png" alt="RajPadmani_0-1739877157357.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am using this bootloader in the KM34 microcontroller. In the bootloader code, I only changed the memory addresses to make it compatible with the KM34.&lt;BR /&gt;&lt;BR /&gt;The mem_write function is a wrapper that uses the flash_program&amp;nbsp;function to write to flash. However, it executes faster than the flash_program function, which I used directly in my application.&lt;BR /&gt;&lt;BR /&gt;You can find this function in "bl_context.c"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RajPadmani_1-1739877456440.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/324508i2AF769A994088D16/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RajPadmani_1-1739877456440.png" alt="RajPadmani_1-1739877456440.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;In this file, there is a structure named &lt;STRONG&gt;g_bootloaderContext&lt;/STRONG&gt;, which contains a structure variable called &lt;STRONG&gt;memoryInterface&lt;/STRONG&gt;. The value of &lt;STRONG&gt;g_memoryInterface&lt;/STRONG&gt; is assigned to it, and within &lt;STRONG&gt;g_memoryInterface&lt;/STRONG&gt;, you will find the &lt;STRONG&gt;mem_write&lt;/STRONG&gt; function.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RajPadmani_2-1739877495177.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/324509iB086C1FAE08BCA75/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RajPadmani_2-1739877495177.png" alt="RajPadmani_2-1739877495177.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have attached the bootloader SDK example that I'm using.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 11:30:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/flash-operations/m-p/2046311#M67299</guid>
      <dc:creator>RajPadmani</dc:creator>
      <dc:date>2025-02-18T11:30:38Z</dc:date>
    </item>
  </channel>
</rss>

