<?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: init_flash_memory() - takes too long in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/init-flash-memory-takes-too-long/m-p/601682#M6147</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kerry Zhou,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry about this mistake. The procedure&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;init_flash_memory() is indeed something I have created. This encapsulates much of what is in the initialization in the example&amp;nbsp;SDK_2.0_FRDM-KL03Z\boards\frdmkl03z\driver_examples\flash\pflash.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Below is my function. Could you please suggest what is the not-important code that can be removed?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;i&lt;span class="lia-inline-image-display-wrapper" image-alt="flash.JPG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/9315iF5600E9DAE3542D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="flash.JPG" alt="flash.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Good day to you too!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Gaurav.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jan 2017 11:16:58 GMT</pubDate>
    <dc:creator>gauravbanyal</dc:creator>
    <dc:date>2017-01-10T11:16:58Z</dc:date>
    <item>
      <title>init_flash_memory() - takes too long</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/init-flash-memory-takes-too-long/m-p/601680#M6145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I took the function&amp;nbsp;init_flash_memory() from one of the SDK2.0 examples for the FRDM-KL03 kit.&lt;/P&gt;&lt;P&gt;I have this function called in the initialization. In my design, the MCU sleeps in VLLS3 and wakes up and reads a line, does something based on that and sleeps again in VLLS3.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to pofile the code. I noticed that init_flash_memory() takes 127ms to execute and in that time, I miss the signal on the line that I want to capture.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea on why it takes so long and how I can avoid it?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 15:26:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/init-flash-memory-takes-too-long/m-p/601680#M6145</guid>
      <dc:creator>gauravbanyal</dc:creator>
      <dc:date>2017-01-09T15:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: init_flash_memory() - takes too long</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/init-flash-memory-takes-too-long/m-p/601681#M6146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gaurav Banyal,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please give me a picture about init_flash_memory() function in the SDK2.0_FRDM-KL03.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I check SDK2.0_FRDM-KL03, just find the status_t FLASH_Init(flash_config_t *config) function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Please check your init_flash_memory() function , what the code in this function. You can delete the not important code to cut down the execute time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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>Tue, 10 Jan 2017 04:24:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/init-flash-memory-takes-too-long/m-p/601681#M6146</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-01-10T04:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: init_flash_memory() - takes too long</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/init-flash-memory-takes-too-long/m-p/601682#M6147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kerry Zhou,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry about this mistake. The procedure&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;init_flash_memory() is indeed something I have created. This encapsulates much of what is in the initialization in the example&amp;nbsp;SDK_2.0_FRDM-KL03Z\boards\frdmkl03z\driver_examples\flash\pflash.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Below is my function. Could you please suggest what is the not-important code that can be removed?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;i&lt;span class="lia-inline-image-display-wrapper" image-alt="flash.JPG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/9315iF5600E9DAE3542D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="flash.JPG" alt="flash.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Good day to you too!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Gaurav.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 11:16:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/init-flash-memory-takes-too-long/m-p/601682#M6147</guid>
      <dc:creator>gauravbanyal</dc:creator>
      <dc:date>2017-01-10T11:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: init_flash_memory() - takes too long</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/init-flash-memory-takes-too-long/m-p/601683#M6148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gaurav Banyal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please comment all the code in the red rectangle:&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/10641i7469449480953186/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;Then try again, in your code, PRINTF will caused a lot of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&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, 11 Jan 2017 01:25:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/init-flash-memory-takes-too-long/m-p/601683#M6148</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-01-11T01:25:29Z</dc:date>
    </item>
  </channel>
</rss>

