<?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: k66 cache in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k66-cache/m-p/661099#M40586</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reddy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For K66 cache, need some clarification here. There are two different types of caches on chip. One is the flash cache, referred to as FMC module for flash acceleration so it can provide single cycle access time for instructions read from internal flash. The other is the local cache referred to as LMEM module which provides caching capability for external memories such as SDRAM. Please note on K66, only code cache is available, there is no system cache, so any address range above 0x20000000 is non-cacheable. &amp;nbsp;&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/7988i3922F4E7C5A41E81/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;&lt;/P&gt;&lt;P&gt;Default configuration on K66 is FMC cache is enabled, while LMEM cache is not. So if you try to run code on external SDRAM, you need to use the KSDK code to enable LMEM code cache.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For performance increase, you can try to run Coremark code to see the difference of enabling or disabling cache.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.eembc.org/coremark/download.php" title="http://www.eembc.org/coremark/download.php"&gt;EEMBC - CoreMark - Processor Benchmark&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Oct 2016 06:31:29 GMT</pubDate>
    <dc:creator>cutworth</dc:creator>
    <dc:date>2016-10-26T06:31:29Z</dc:date>
    <item>
      <title>k66 cache</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k66-cache/m-p/661097#M40584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii,&lt;/P&gt;&lt;P&gt;&amp;nbsp;how can i enable the cache and how it is used to increase the speedof the execution of the instructions&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Oct 2016 18:37:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k66-cache/m-p/661097#M40584</guid>
      <dc:creator>maheshwarreddy</dc:creator>
      <dc:date>2016-10-22T18:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: k66 cache</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k66-cache/m-p/661098#M40585</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;I would recommend customer to download&lt;A href="https://kex.nxp.com/en/welcome"&gt; KSDK V2.0 software&lt;/A&gt; for K66 product, which provides the K66 LMEM module driver to control the code cache.&lt;/P&gt;&lt;P&gt;The KSDK V2.0 API reference manual document will detailed introduce each LMEM driver API function.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;BR /&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, 25 Oct 2016 07:41:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k66-cache/m-p/661098#M40585</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2016-10-25T07:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: k66 cache</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k66-cache/m-p/661099#M40586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reddy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For K66 cache, need some clarification here. There are two different types of caches on chip. One is the flash cache, referred to as FMC module for flash acceleration so it can provide single cycle access time for instructions read from internal flash. The other is the local cache referred to as LMEM module which provides caching capability for external memories such as SDRAM. Please note on K66, only code cache is available, there is no system cache, so any address range above 0x20000000 is non-cacheable. &amp;nbsp;&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/7988i3922F4E7C5A41E81/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;&lt;/P&gt;&lt;P&gt;Default configuration on K66 is FMC cache is enabled, while LMEM cache is not. So if you try to run code on external SDRAM, you need to use the KSDK code to enable LMEM code cache.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For performance increase, you can try to run Coremark code to see the difference of enabling or disabling cache.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.eembc.org/coremark/download.php" title="http://www.eembc.org/coremark/download.php"&gt;EEMBC - CoreMark - Processor Benchmark&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2016 06:31:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k66-cache/m-p/661099#M40586</guid>
      <dc:creator>cutworth</dc:creator>
      <dc:date>2016-10-26T06:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: k66 cache</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k66-cache/m-p/661100#M40587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Thank you for the reply , iam using the ksdk2.0 iam unable find that LMEM enable function . iam new to this can you &amp;nbsp;tell the steps to enable the cache &amp;nbsp;for run the code in the SDRAM in k66.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2016 13:59:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k66-cache/m-p/661100#M40587</guid>
      <dc:creator>maheshwarreddy</dc:creator>
      <dc:date>2016-10-26T13:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: k66 cache</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k66-cache/m-p/661101#M40588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reddy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you download the latest KSDK2.0 package for K66? If so, then you could look at the folder&amp;nbsp;devices\MK66F18\drivers and find file&amp;nbsp;fsl_lmem_cache.c and&amp;nbsp;fsl_lmem_cache.h.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you need to do is just call the following function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void LMEM_EnableCodeCache(LMEM_Type *base, bool enable)&lt;BR /&gt;{&lt;BR /&gt; if (enable)&lt;BR /&gt; {&lt;BR /&gt; /* First, invalidate the entire cache. */&lt;BR /&gt; LMEM_CodeCacheInvalidateAll(base);&lt;/P&gt;&lt;P&gt;/* Now enable the cache. */&lt;BR /&gt; base-&amp;gt;PCCCR |= LMEM_PCCCR_ENCACHE_MASK;&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; /* First, push any modified contents. */&lt;BR /&gt; LMEM_CodeCachePushAll(base);&lt;/P&gt;&lt;P&gt;/* Now disable the cache. */&lt;BR /&gt; base-&amp;gt;PCCCR &amp;amp;= ~LMEM_PCCCR_ENCACHE_MASK;&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 02:45:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k66-cache/m-p/661101#M40588</guid>
      <dc:creator>cutworth</dc:creator>
      <dc:date>2016-10-27T02:45:34Z</dc:date>
    </item>
  </channel>
</rss>

