<?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: MPC5646C RAM read using BAM in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5646C-RAM-read-using-BAM/m-p/1891089#M25634</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/221860"&gt;@BorisB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RAM memory contains random data after power on. It must be initialized:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1718861515281.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/284989iAEB07A86D06262E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1718861515281.png" alt="lukaszadrapa_0-1718861515281.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_1-1718861520748.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/284990iDE0A9945779B87A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_1-1718861520748.png" alt="lukaszadrapa_1-1718861520748.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;It's done in startup code like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_2-1718861539171.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/284992i78F33A39FA7B5DB4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_2-1718861539171.png" alt="lukaszadrapa_2-1718861539171.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;stmw instruction is used - it writes all GPR core registers to RAM in a loop. That's the reason why you can see such pattern in the RAM.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jun 2024 05:33:15 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2024-06-20T05:33:15Z</dc:date>
    <item>
      <title>MPC5646C RAM read using BAM</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5646C-RAM-read-using-BAM/m-p/1889286#M25623</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to read the internal RAM using the BAM module, via the UART&lt;/P&gt;&lt;P&gt;The problem is that there is a repeating pattern in the received file, that doesn't look correct.&lt;/P&gt;&lt;P&gt;This is the code i am using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define RAM_BASE    0x40000000
#define RAM_SIZE    256*1024
#define RAM_END     RAM_BASE + RAM_SIZE    

int main(void) {

  int32_t  i = 0, r = 0;
  uint32_t word = 0x00;

			      				      			      
  InitHW();    
  InitializeUART(kBaud500000);	

        
  /* Start the other core */   
  SSCM.DPMBOOT.R = (unsigned long)__start_p1;
  SSCM.DPMKEY.R  = (unsigned long)0x00005AF0;
  SSCM.DPMKEY.R  = (unsigned long)0x0000A50F;

  for (;;)
  {   
  	for (i = RAM_BASE; i &amp;lt;  RAM_END; i+= 4)
  	{
  		word = *(uint32_t*) i;
  		uart_print_int(word);
  	}

  	delay_100ms(1);
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the pattern i am getting is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;00 00 20 7E 04 00 00 00 20 4E 04 00 00 00 10 0E 
00 00 00 00 00 00 04 00 00 03 30 00 04 00 00 09 
F0 DC 0F F0 F5 00 00 00 04 00 00 00 50 F0 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 04 00 00 02 60 00 00 00 00 00 70 CA 04 00 
00 09 F0 D0 04 00 00 00 10 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 
00 00 20 7E 04 00 00 00 20 4E 04 00 00 00 10 0E 
00 00 00 00 00 00 04 00 00 03 30 00 04 00 00 09 
F0 DC 0F F0 F5 00 00 00 04 00 00 00 50 F0 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 04 00 00 02 60 80 00 00 00 00 70 CA 04 00 
00 09 F0 D0 04 00 00 00 10 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 
00 00 20 7E 04 00 00 00 20 4E 04 00 00 00 10 0E 
00 00 00 00 00 00 04 00 00 03 30 00 04 00 00 09 
F0 DC 0F F0 F5 00 00 00 04 00 00 00 50 F0 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 04 00 00 02 70 00 00 00 00 00 70 CA 04 00 
00 09 F0 D0 04 00 00 00 10 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 
00 00 20 7E 04 00 00 00 20 4E 04 00 00 00 10 0E 
00 00 00 00 00 00 04 00 00 03 30 00 04 00 00 09 
F0 DC 0F F0 F5 00 00 00 04 00 00 00 50 F0 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 04 00 00 02 70 80 00 00 00 00 70 CA 04 00 
00 09 F0 D0 04 00 00 00 10 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 
00 00 20 7E 04 00 00 00 20 4E 04 00 00 00 10 0E 
00 00 00 00 00 00 04 00 00 03 30 00 04 00 00 09 
F0 DC 0F F0 F5 00 00 00 04 00 00 00 50 F0 00 00 &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this supposed to be normal, or i am getting something wrong. Its a new processor, an empty one, isn't it supposed to be empty.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 08:17:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5646C-RAM-read-using-BAM/m-p/1889286#M25623</guid>
      <dc:creator>BorisB</dc:creator>
      <dc:date>2024-06-18T08:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5646C RAM read using BAM</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5646C-RAM-read-using-BAM/m-p/1891089#M25634</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/221860"&gt;@BorisB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RAM memory contains random data after power on. It must be initialized:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1718861515281.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/284989iAEB07A86D06262E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1718861515281.png" alt="lukaszadrapa_0-1718861515281.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_1-1718861520748.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/284990iDE0A9945779B87A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_1-1718861520748.png" alt="lukaszadrapa_1-1718861520748.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;It's done in startup code like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_2-1718861539171.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/284992i78F33A39FA7B5DB4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_2-1718861539171.png" alt="lukaszadrapa_2-1718861539171.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;stmw instruction is used - it writes all GPR core registers to RAM in a loop. That's the reason why you can see such pattern in the RAM.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 05:33:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5646C-RAM-read-using-BAM/m-p/1891089#M25634</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2024-06-20T05:33:15Z</dc:date>
    </item>
  </channel>
</rss>

