<?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>i.MX ProcessorsのトピックRe: iMX8QXP Bare metal Cortex m4 cache initialization</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/iMX8QXP-Bare-metal-Cortex-m4-cache-initialization/m-p/1801603#M219630</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Will IMx8QxP support the Baremetal application? If it supports please share the document of the IMX8QxP Baremetal user guide or any other reference document.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards &amp;amp; Thank You,&lt;/P&gt;&lt;P&gt;Saravanan Shanmugam&lt;/P&gt;</description>
    <pubDate>Mon, 05 Feb 2024 04:55:34 GMT</pubDate>
    <dc:creator>Saravanans1</dc:creator>
    <dc:date>2024-02-05T04:55:34Z</dc:date>
    <item>
      <title>iMX8QXP Bare metal Cortex m4 cache initialization</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8QXP-Bare-metal-Cortex-m4-cache-initialization/m-p/1053281#M154951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm currently working on a baremetal application on the M4 inside the i.MX8QXP and I'm having issues activating the cache. I would like to make sure I'm not missing any steps. I based my&amp;nbsp;configuration of the MPU and cache on the&amp;nbsp; configuration found in&amp;nbsp;&lt;EM&gt;FreeRTOS_BSP_1.0.1_IMX7D.&lt;/EM&gt;&amp;nbsp;The application code and data are in DDR at 0x8000_0000. Here are the configuration steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Configure MPU:&lt;OL&gt;&lt;LI&gt;Disable MPU in MPU CTRL (bit enable)&lt;/LI&gt;&lt;LI&gt;Select region 0 with RNR&lt;/LI&gt;&lt;LI&gt;Configure base address 0x8000_0000 in RBAR&lt;/LI&gt;&lt;LI&gt;Apply the following configuration in RASR (0x030B003D):&lt;OL&gt;&lt;LI&gt;Enable Instruction Access;&lt;/LI&gt;&lt;LI&gt;Full Data Access Permission;&lt;/LI&gt;&lt;LI&gt;Write Back, Write Allocate;&lt;/LI&gt;&lt;LI&gt;Region Not Shared;&lt;/LI&gt;&lt;LI&gt;All Sub-Region Enable;&lt;/LI&gt;&lt;LI&gt;MPU Protection Region size = 2GB;&lt;/LI&gt;&lt;LI&gt;Enable Region 0.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Enable MPU in MPU CTRL&amp;nbsp;&lt;SPAN&gt;(bit&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;enable&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;dsb/isb&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Enable cache in CCR&lt;OL&gt;&lt;LI&gt;Write 0x8500_0003 to CCR based on section&amp;nbsp;&lt;EM&gt;12.2.5.3.6.1 Cache set commands&lt;/EM&gt; of IMX8DQXP reference manual. I noticed that this step was not in FreeRTOS for the iMX7. Is it normal ?&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;Configure PSCCR&lt;OL&gt;&lt;LI&gt;Set invw1 and invw0 in PSCCR register&lt;/LI&gt;&lt;LI&gt;Set go in&amp;nbsp;&lt;SPAN&gt;PSCCR&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;I noticed that the bit go is never set back to 0 as expected in FreeRTOS code.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Set ENWRBUF and enable in PSCCR&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Configure PCCCR&lt;OL&gt;&lt;LI&gt;Set invw1 and invw0 in PCCCR register&lt;/LI&gt;&lt;LI&gt;Set go in&amp;nbsp;&lt;SPAN&gt;PCCCR&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;I noticed that the bit go is never set back to 0 as expected in FreeRTOS code.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Set ENWRBUF and enable in PCCCR&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Is there any steps that I'm missing to enable the cache properly ? If you need any more information please feel free to ask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2020 20:07:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8QXP-Bare-metal-Cortex-m4-cache-initialization/m-p/1053281#M154951</guid>
      <dc:creator>david_binet</dc:creator>
      <dc:date>2020-05-20T20:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8QXP Bare metal Cortex m4 cache initialization</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8QXP-Bare-metal-Cortex-m4-cache-initialization/m-p/1053282#M154952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Use the SDK as code examples.&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;&lt;A class="link-titled" href="https://mcuxpresso.nxp.com/en/select" title="https://mcuxpresso.nxp.com/en/select"&gt;https://mcuxpresso.nxp.com/en/select&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yuri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2020 05:46:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8QXP-Bare-metal-Cortex-m4-cache-initialization/m-p/1053282#M154952</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2020-05-21T05:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8QXP Bare metal Cortex m4 cache initialization</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8QXP-Bare-metal-Cortex-m4-cache-initialization/m-p/1053283#M154953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yuri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick response. I had an issue in the initialisation of the LMEM controller. I still have a few questions about the overall operation of the M4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I don't see a write to the CCR like mentionned in the IMX8DQXP reference manual. Is that step still necessary for proper operation ?&lt;/LI&gt;&lt;LI&gt;I'm not sure I understand how the Code cache and the System Cache operate. If I execute code in the DDR (0x8000_0000) will the code cache be used ? Or is the code cache only used when an access is made through the Processor code bus (0x0000_0000 to 0x1FFF_FFFF) ? Is it the same behaviour for the system cache ?&lt;/LI&gt;&lt;LI&gt;Is the system cache an instruction and data cache ?&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/107560iDC215F8BA92299C1/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;From the reference manual it is explicitly mentioned that the code cache is both an instruction and data cache.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support, I really appreciate it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2020 18:37:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8QXP-Bare-metal-Cortex-m4-cache-initialization/m-p/1053283#M154953</guid>
      <dc:creator>david_binet</dc:creator>
      <dc:date>2020-05-25T18:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8QXP Bare metal Cortex m4 cache initialization</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8QXP-Bare-metal-Cortex-m4-cache-initialization/m-p/1053284#M154954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Please look at my comments below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Based on i.MX8X RM (IMX8DQXPRM, Rev. 0, 05/2020): &lt;BR /&gt;Low-order addresses (0x0000_0000 - 0x1FFF_FFFF) use the Processor Code (PC) bus,&lt;BR /&gt;and high-order addresses (0x2000_0000 - 0xFFFF_FFFF) use the Processor System (PS) bus. &lt;BR /&gt;Normal operation has code accesses on the PC bus and data accesses on the PS bus.&lt;BR /&gt;&amp;nbsp; Chapter 2 (Memory Map) of the RM provides information, what devices / addresses &lt;BR /&gt;can be accessed via PC and PS buses. All accesses, that are not mapped to corresponding&lt;BR /&gt;TCM are intended for the cache controllers: &amp;nbsp;&lt;BR /&gt;&amp;nbsp; Processor Code accesses are routed to the SRAM_L if they are mapped to that space. &lt;BR /&gt;All other PC accesses are routed to the Code Cache Memory Controller. This controller &lt;BR /&gt;then processes the cacheable accesses as needed, while bypassing the non-cacheable, cache&lt;BR /&gt;write-through, cache miss ... &lt;BR /&gt;&amp;nbsp;Processor Space accesses are routed to the SRAM_U if they are mapped to that space. &lt;BR /&gt;All other PS accesses are routed to the PS Cache Memory Controller. This controller then&lt;BR /&gt;processes the cacheable accesses as needed, while bypassing the non-cacheable, cache&lt;BR /&gt;write-through, cache miss ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; To enable / disable the caches LMEM_PCCCR[ENCACHE] and / or&amp;nbsp; LMEM_PSCCR[ENCACHE] &lt;BR /&gt;should be set / cleared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yuri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2020 13:42:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8QXP-Bare-metal-Cortex-m4-cache-initialization/m-p/1053284#M154954</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2020-06-15T13:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8QXP Bare metal Cortex m4 cache initialization</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8QXP-Bare-metal-Cortex-m4-cache-initialization/m-p/1053285#M154955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yuri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the detailed answer. I ran some tests and the results matched exactly what you explained. Thanks a lot for your support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2020 20:33:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8QXP-Bare-metal-Cortex-m4-cache-initialization/m-p/1053285#M154955</guid>
      <dc:creator>david_binet</dc:creator>
      <dc:date>2020-06-17T20:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8QXP Bare metal Cortex m4 cache initialization</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8QXP-Bare-metal-Cortex-m4-cache-initialization/m-p/1801603#M219630</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Will IMx8QxP support the Baremetal application? If it supports please share the document of the IMX8QxP Baremetal user guide or any other reference document.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards &amp;amp; Thank You,&lt;/P&gt;&lt;P&gt;Saravanan Shanmugam&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 04:55:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8QXP-Bare-metal-Cortex-m4-cache-initialization/m-p/1801603#M219630</guid>
      <dc:creator>Saravanans1</dc:creator>
      <dc:date>2024-02-05T04:55:34Z</dc:date>
    </item>
  </channel>
</rss>

