<?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: SDRAM gets currupted</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2064061#M235228</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189915"&gt;@petrama&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I highly recommend se the SDK (version 24.12) example called "semc" in order to see how configured the SDRAM inside the RT1024-EVK.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Are there any requirements to size and address of blocks inside the SDRAM?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It depends on your SDRAM and the features of the SEMC, where you can find more information about this peripheral in the chapter 24.2 in the RM.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR&lt;BR /&gt;Habib&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Mar 2025 21:16:47 GMT</pubDate>
    <dc:creator>Habib_MS</dc:creator>
    <dc:date>2025-03-18T21:16:47Z</dc:date>
    <item>
      <title>SDRAM gets currupted</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2060584#M235004</link>
      <description>&lt;P&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;Initializing a struct in SDRAM and then reading the values when the application runs, does not return the same values as initially set.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4" color="#0000FF"&gt;&lt;EM&gt;The struct is defined as:&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;typedef struct _cf_full_t {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;uint8_t cf_bnb[160+40+50];&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;uint16_t cf_word[10]; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;uint32_t cf_dword[10]; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;} cf_full_t&lt;/FONT&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;The&amp;nbsp; global variable of this struct type is initialized as:&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;__DATA(RAM5) const cf_full_t cf_default =&amp;nbsp; // &lt;FONT size="2"&gt;have tried with and w/o const&lt;/FONT&gt;&lt;BR /&gt;{&lt;BR /&gt;0, 1, 1, 0, 0, 0, 0, 0, 0, 0, // 0 - 9&lt;BR /&gt;1, 1, 1, 1, 1, 1, 1, 1, 0, 1, // 10 - 19&lt;BR /&gt;..&lt;BR /&gt;3, 0, 0, 0, 4, 0, 0, 0, 0, 0, // 190 - 199&lt;BR /&gt;3, 1, 25, 8, 40, 0, 65, 4, 65, 25, // 200 - 209&lt;BR /&gt;5, 5, 2, 1, 75, 1, 40, 20, 40, 50, // 210 - 219&lt;BR /&gt;..&lt;BR /&gt;2, 5, 50, 6, 4, 30, 30, 14, 30, 25, // 240 - 249&lt;BR /&gt;1571,2050,12200,0, 0,300, 10, 4, 40, 0, // 250 - 259&lt;BR /&gt;0, 0, 4, 140, 0, 0, 0, 0, 0, 0 // 260 - 269&lt;BR /&gt;};&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Memory definition for i.MX RT1024&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Skærmbillede 2025-03-12 160402.png" style="width: 500px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/327758i8532B80B762834AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Skærmbillede 2025-03-12 160402.png" alt="Skærmbillede 2025-03-12 160402.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;Does SDRAM need to specified in linker script as well?&lt;/FONT&gt; (&lt;FONT size="2"&gt;tried it but it didn't help)&lt;/FONT&gt;. &lt;FONT color="#0000FF"&gt;SRAM blocks are additionally specified in&amp;nbsp;&lt;SPAN&gt;ResetISR.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Skærmbillede 2025-03-12 160843.png" style="width: 500px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/327759i2D5068889DF60CE5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Skærmbillede 2025-03-12 160843.png" alt="Skærmbillede 2025-03-12 160843.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;When reading the struct variable the first 200 bytes are rubbish, but from then on everything is correct.! (i.e. the last 50 bytes in &lt;FONT color="#000000"&gt;cf_bnb&lt;/FONT&gt; as well as &lt;FONT color="#000000"&gt;cf_word&lt;/FONT&gt; and &lt;FONT color="#000000"&gt;cf_dword&lt;/FONT&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Any explanation or just a guide to using SDRAM will be highly appreciated. I have read the User Guide at found the __DATA, __BBS, __NOINIT keywords. Is that all there is to it?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 15:47:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2060584#M235004</guid>
      <dc:creator>petrama</dc:creator>
      <dc:date>2025-03-12T15:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: SDRAM gets currupted</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2062326#M235116</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189915"&gt;@petrama&lt;/a&gt;,&lt;BR /&gt;In order to support you better, can you provide me the next information?&lt;/P&gt;
&lt;P&gt;-Will you be running your application from SDRAM?&lt;BR /&gt;- Which SDRAM are you&amp;nbsp;currently using?&lt;/P&gt;
&lt;P&gt;In the other hand, I&amp;nbsp;highly recommend check the "&lt;A href="https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-secure-provisioning-tool:MCUXPRESSO-SECURE-PROVISIONING?tid=vanMCUXPRESSO-SECURE-PROVISIONING#documentation" target="_self"&gt;MCUXpresso Secure Provisioning Tool User Guide v.10&lt;/A&gt;", in order to obtain updated information. Inside you can find the chapter 6.2.1.3 called "Image running from external SDRAM", where shows the steps to getting a bootable image from SDRAM using MCUxpresso IDE.&lt;BR /&gt;BR&lt;BR /&gt;Habib&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 20:21:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2062326#M235116</guid>
      <dc:creator>Habib_MS</dc:creator>
      <dc:date>2025-03-14T20:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: SDRAM gets currupted</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2063138#M235176</link>
      <description>&lt;P&gt;Hi Habib&lt;/P&gt;&lt;P&gt;No, the application does not run from SDRAM.&lt;/P&gt;&lt;P&gt;The SDRAM is Alliance AS4C4M16SAA-6TIN.&lt;/P&gt;&lt;P&gt;Are there any requirements to size and address of blocks inside the SDRAM?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 15:06:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2063138#M235176</guid>
      <dc:creator>petrama</dc:creator>
      <dc:date>2025-03-17T15:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: SDRAM gets currupted</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2064061#M235228</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189915"&gt;@petrama&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I highly recommend se the SDK (version 24.12) example called "semc" in order to see how configured the SDRAM inside the RT1024-EVK.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Are there any requirements to size and address of blocks inside the SDRAM?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It depends on your SDRAM and the features of the SEMC, where you can find more information about this peripheral in the chapter 24.2 in the RM.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR&lt;BR /&gt;Habib&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 21:16:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2064061#M235228</guid>
      <dc:creator>Habib_MS</dc:creator>
      <dc:date>2025-03-18T21:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: SDRAM gets currupted</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2065557#M235329</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I ran the semc demo as is and the output told me that 16 and 32 bit read/write-compare failed but 8 bit was OK.&lt;/P&gt;&lt;P&gt;I discovered the call to&amp;nbsp;&lt;SPAN&gt; BOARD_InitSEMC(void), which does a lot of configuration, that I previously didn't know was needed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Do you happen to know, what I should change in order to properly use&amp;nbsp;Alliance AS4C4M16SAA-6TIN?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;rgds&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 12:25:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2065557#M235329</guid>
      <dc:creator>petrama</dc:creator>
      <dc:date>2025-03-20T12:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: SDRAM gets currupted</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2065846#M235347</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189915"&gt;@petrama&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;We do not provide instructions for configuring a different SDRAM, and the configuration depends on the features supported by your SDRAM.&lt;/P&gt;
&lt;P&gt;However, you can refer to the connections in our RT1024-EVK and the example I provided.&lt;BR /&gt;On the other hand, if the SEMC_SDRAMReadWrite8Bit function is the only one that works correctly, the issue could be due to the SDRAM configuration, or the pins used in 16 and 32-bit writing/reading.&lt;/P&gt;
&lt;P&gt;BR&lt;BR /&gt;Habib.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 21:03:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2065846#M235347</guid>
      <dc:creator>Habib_MS</dc:creator>
      <dc:date>2025-03-20T21:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: SDRAM gets currupted</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2066311#M235387</link>
      <description>&lt;P&gt;I am confused about the read/write function used in the semc-demo. They work with address and data size specification just as when accessing data on an EEPROM. But if I place a global variable in a SDRAM memory section with the&amp;nbsp;&lt;SPAN&gt;__DATA(RAM5) directive, can't I access this variable as any other variable? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Do I need to setup anything regarding SDRAM in linker scripts?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried in my own application to execute the&amp;nbsp;BOARD_InitSEMC copied from the demo. Now all bytes in the arrays are 0 (zero) when read.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The supplier of my custom board says, that the specifications of the Alliance AS4C4M16SAA-6TIN SDRAm are the same as those for the SDRAM on the EVK-Board.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;rgds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 12:04:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2066311#M235387</guid>
      <dc:creator>petrama</dc:creator>
      <dc:date>2025-03-21T12:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: SDRAM gets currupted</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2066567#M235401</link>
      <description>&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#000000"&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189915"&gt;@petrama&lt;/a&gt;,&lt;/FONT&gt;&lt;BR /&gt;I am confused about the read/write function used in the semc-demo. They work with address and data size specification just as when accessing data on an EEPROM. But if I place a global variable in a SDRAM memory section with the __DATA(RAM5) directive, can't I access this variable as any other variable?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Yes, you can use&amp;nbsp;__DATA(RAM5) directive to save variables in SDRAM, but please take in mind the SDRAM needs to be initialized. Or you can use the method of the example.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;Do I need to setup anything regarding SDRAM in linker scripts?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Only add the SDRAM section in the memory map, as you made in the next image:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Habib_MS_0-1742594398888.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/329326iD8BAA025E914AF7D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Habib_MS_0-1742594398888.png" alt="Habib_MS_0-1742594398888.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;I tried in my own application to execute the BOARD_InitSEMC copied from the demo. Now all bytes in the arrays are 0 (zero) when read.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Please make sure you have the pins configured correctly.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;The supplier of my custom board says, that the specifications of the Alliance AS4C4M16SAA-6TIN SDRAm are the same as those for the SDRAM on the EVK-Board.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Although the&amp;nbsp;AS4C4M16SAA-6TIN SDRAM has the same features of our SDRAM, the configuration flow depends on each SDRAM.&lt;BR /&gt;&lt;BR /&gt;In the other hand, could you please try to save another array or variable in SDRAM and use this variable in your code, this with the propose to avoid compiler optimizations?&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;SPAN&gt;Declaration:&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;__DATA(RAM2)&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;char&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;data_buffer3[1024];&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Main:&lt;BR /&gt;data_buffer3[0]=12;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;BR&lt;BR /&gt;Habib&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 22:10:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2066567#M235401</guid>
      <dc:creator>Habib_MS</dc:creator>
      <dc:date>2025-03-21T22:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: SDRAM gets currupted</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2069363#M235562</link>
      <description>&lt;P&gt;Hi Habib&lt;/P&gt;&lt;P&gt;If I place the array in standard SRAM_DTC either automatically or via the&amp;nbsp;&lt;SPAN&gt;__DATA(RAM) prefix, then everything works fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The supplier informs that the SDRAM needs to work with a 166Mhz or 143Mhz clock speed. How do I adjust the parameters in the demos BOARD_InitHardware function to commodate this?&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;void BOARD_InitHardware(void)
{
 BOARD_ConfigMPU();
 BOARD_InitBootPins();
 BOARD_InitBootClocks();

 CLOCK_InitSysPfd(kCLOCK_Pfd2, 24);
// Set semc clock to 132 MHz ( most be change to 166Mhz or 143 Mhz !)
 CLOCK_SetMux(kCLOCK_SemcMux, 1);
 CLOCK_SetDiv(kCLOCK_SemcDiv, 2);

 BOARD_InitDebugConsole();
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2025 09:08:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2069363#M235562</guid>
      <dc:creator>petrama</dc:creator>
      <dc:date>2025-03-27T09:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: SDRAM gets currupted</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2070546#M235629</link>
      <description>&lt;P&gt;Hello again &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189915"&gt;@petrama&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;In order to change the semc clock source you can use config tools, where you can find the user's guide in this &lt;A href="https://www.nxp.com/design/design-center/development-boards-and-designs/i-mx-evaluation-and-development-boards/config-tools-for-i-mx-applications-processors:CONFIG-TOOLS-IMX#documentation" target="_self"&gt;page&lt;/A&gt;.&lt;BR /&gt;Also, if you experience any issue, do not hesitate to let me know.&lt;BR /&gt;BR &lt;BR /&gt;Habib&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2025 21:58:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDRAM-gets-currupted/m-p/2070546#M235629</guid>
      <dc:creator>Habib_MS</dc:creator>
      <dc:date>2025-03-28T21:58:05Z</dc:date>
    </item>
  </channel>
</rss>

