<?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: SDRAM Read write issue in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/SDRAM-Read-write-issue/m-p/1968481#M32076</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/237333"&gt;@Adithya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is strange becasue '&lt;SPAN&gt;DCACHE_InvalidateByRange&lt;/SPAN&gt;' is only for cache&amp;nbsp;&lt;SPAN&gt;alignment.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Would you please help check with the below patch?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. Set this marco to 0&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;// #define CACHE_MAINTAIN 0x01U
 #define CACHE_MAINTAIN 0&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;2. source/semc_sdram.c, add " SCB_DisableDCache()" before reading or writing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;int main(void)
{
	/* Hardware initialize. */
	BOARD_ConfigMPU();
	BOARD_InitPins();
	BOARD_BootClockRUN();
	BOARD_InitDebugConsole();

	/* Config cacheable attribute for SDRAM memory */
	APP_ConfigMPU();

#if !(defined(CACHE_MAINTAIN) &amp;amp;&amp;amp; CACHE_MAINTAIN)
#if defined(__DCACHE_PRESENT) &amp;amp;&amp;amp; __DCACHE_PRESENT
	if (SCB_CCR_DC_Msk == (SCB_CCR_DC_Msk &amp;amp; SCB-&amp;gt;CCR))
	{
		SCB_DisableDCache();
	}
#endif
#endif

	PRINTF("\r\n SEMC SDRAM Example Start!\r\n");
	if (BOARD_InitSEMC() != kStatus_Success)
	{
		PRINTF("\r\n SEMC SDRAM Init Failed\r\n");
	}

+       SCB_DisableDCache();
	/* 32Bit data read and write. */
        SEMC_SDRAMReadWrite32Bit();
        /* 16Bit data read and write. */
        SEMC_SDRAMReadWrite16Bit();
        /* 8Bit data read and write. */
        SEMC_SDRAMReadWrite8Bit();
...
}&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 08 Oct 2024 05:58:58 GMT</pubDate>
    <dc:creator>Sam_Gao</dc:creator>
    <dc:date>2024-10-08T05:58:58Z</dc:date>
    <item>
      <title>SDRAM Read write issue</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/SDRAM-Read-write-issue/m-p/1965141#M32037</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/60336"&gt;@kerryzhou&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm trying to read and write to SDRAM with SEMC_CM7 example code, everything is working fine with EVAL board. But if i try the same thing with our customized board which is similar to Eval board, for the same SEMC FPAGA is interfaced with addition chip select.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The SDRAM chip we used in our customized board is "W9825G6KH-52344P"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;With our customized board with DATALEN of 0x1000 read and write is working fine with one change in the example code (evkbmimxrt1170_semc_cm7).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1. Disabled/commented "DCACHE_InvaliddateByRange" in our code".&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2. We need to go for Read from SDRAM before going for Write operation&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If we increase DATALEN to 0x2000 in example code, its failing in 32/16/8 bit Read write operation. What could be the reason, Can someone help me on this.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Pls refer attached workspace.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 11:29:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/SDRAM-Read-write-issue/m-p/1965141#M32037</guid>
      <dc:creator>Adithya</dc:creator>
      <dc:date>2024-10-01T11:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: SDRAM Read write issue</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/SDRAM-Read-write-issue/m-p/1965469#M32041</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/237333"&gt;@Adithya&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Thanks so much for your trust! I already don't support the RT in the community now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Please don't worry, our other RT engineer will help you about your issues, please keep patient for the case reply.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;kerry&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 04:59:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/SDRAM-Read-write-issue/m-p/1965469#M32041</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2024-10-02T04:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: SDRAM Read write issue</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/SDRAM-Read-write-issue/m-p/1968481#M32076</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/237333"&gt;@Adithya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is strange becasue '&lt;SPAN&gt;DCACHE_InvalidateByRange&lt;/SPAN&gt;' is only for cache&amp;nbsp;&lt;SPAN&gt;alignment.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Would you please help check with the below patch?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. Set this marco to 0&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;// #define CACHE_MAINTAIN 0x01U
 #define CACHE_MAINTAIN 0&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;2. source/semc_sdram.c, add " SCB_DisableDCache()" before reading or writing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;int main(void)
{
	/* Hardware initialize. */
	BOARD_ConfigMPU();
	BOARD_InitPins();
	BOARD_BootClockRUN();
	BOARD_InitDebugConsole();

	/* Config cacheable attribute for SDRAM memory */
	APP_ConfigMPU();

#if !(defined(CACHE_MAINTAIN) &amp;amp;&amp;amp; CACHE_MAINTAIN)
#if defined(__DCACHE_PRESENT) &amp;amp;&amp;amp; __DCACHE_PRESENT
	if (SCB_CCR_DC_Msk == (SCB_CCR_DC_Msk &amp;amp; SCB-&amp;gt;CCR))
	{
		SCB_DisableDCache();
	}
#endif
#endif

	PRINTF("\r\n SEMC SDRAM Example Start!\r\n");
	if (BOARD_InitSEMC() != kStatus_Success)
	{
		PRINTF("\r\n SEMC SDRAM Init Failed\r\n");
	}

+       SCB_DisableDCache();
	/* 32Bit data read and write. */
        SEMC_SDRAMReadWrite32Bit();
        /* 16Bit data read and write. */
        SEMC_SDRAMReadWrite16Bit();
        /* 8Bit data read and write. */
        SEMC_SDRAMReadWrite8Bit();
...
}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 08 Oct 2024 05:58:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/SDRAM-Read-write-issue/m-p/1968481#M32076</guid>
      <dc:creator>Sam_Gao</dc:creator>
      <dc:date>2024-10-08T05:58:58Z</dc:date>
    </item>
  </channel>
</rss>

