<?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: Interfacing MPC5566 with External Memory in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Interfacing-MPC5566-with-External-Memory/m-p/649738#M6761</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Default MMU TLB entry setting for EBI space is set with Physical Base Address 0x0000_0000. It is because of possible boot from external bus. This need to changed to 0x2000_0000 by user code (it is also being set by debugger script what can be enough in case RAM target, but not in case internal FLASH target because in this case debugger script executes before execution of BAM code).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/8521i99662ACA7C73F4AA/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It can be changed by following source code for&amp;nbsp; instance:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;static asm void External_SRAM_MMU_init(void)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; nofralloc
&amp;nbsp;&amp;nbsp;&amp;nbsp; lis&amp;nbsp;&amp;nbsp;&amp;nbsp; r3, 0x1002&amp;nbsp;&amp;nbsp; /* Select TLB entry #, define R/W replacment control */
&amp;nbsp;&amp;nbsp;&amp;nbsp; mtMAS0 r3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Load MAS0 with 0x1002 0000 for TLB entry #2 */
&amp;nbsp;&amp;nbsp;&amp;nbsp; tlbre&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Get TLB entry # information */
&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; mfspr&amp;nbsp; r3, MAS3
&amp;nbsp;&amp;nbsp;&amp;nbsp; oris&amp;nbsp; r3, r3, 0x2000&amp;nbsp;&amp;nbsp;&amp;nbsp; /* EBI Physical Base Addr changed to 0x2000_0000 */
&amp;nbsp;&amp;nbsp;&amp;nbsp; ori&amp;nbsp;&amp;nbsp; &amp;nbsp; r3, r3, 0x0000 &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; mtMAS3 r3
&amp;nbsp;&amp;nbsp;&amp;nbsp; msync&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* make sure we finished all memory accesses */
&amp;nbsp;&amp;nbsp;&amp;nbsp; tlbwe&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Write entry defined in MAS0 (entry 1 here) to MMU TLB */
&amp;nbsp;&amp;nbsp;&amp;nbsp; isync&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Wait for tlbwe to complete, then flush instruction buffer */
&amp;nbsp;&amp;nbsp;&amp;nbsp; blr&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Nov 2020 13:55:12 GMT</pubDate>
    <dc:creator>davidtosenovjan</dc:creator>
    <dc:date>2020-11-02T13:55:12Z</dc:date>
    <item>
      <title>Interfacing MPC5566 with External Memory</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Interfacing-MPC5566-with-External-Memory/m-p/649737#M6760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I am trying&amp;nbsp;to interface external memory with MPC5566. The program works fine with the external debugger attached but crashes when attempting to boot from internal flash in release mode. Based on some research, it seems that since the debugger uses some scripts to initialize MMU and other registers while bypassing BAM, the code works fine. There are some posts which suggest that similar initialization needs to be manually done when booting from internal flash. However, I am not able to identify all the changes that need to be made and which files need to be modified for the same. Some code pertaining to&amp;nbsp;MPC5566DEMO_AXM_0321 is not executed (since this board is not used) in the following functions:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;__initEBIChipSelects&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;__initMMUExternalMemory&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I have tried to add some code based on that provided for&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;MPC5566DEMO_AXM_0321 replacing values with those specified in the debug script but with no success.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Any help in this regard would be sincerely appreciated. It would be great if some links or sample code is provided for step-by-step interfacing with external memory.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 08:56:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Interfacing-MPC5566-with-External-Memory/m-p/649737#M6760</guid>
      <dc:creator>shraddhanagle</dc:creator>
      <dc:date>2016-11-11T08:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Interfacing MPC5566 with External Memory</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Interfacing-MPC5566-with-External-Memory/m-p/649738#M6761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Default MMU TLB entry setting for EBI space is set with Physical Base Address 0x0000_0000. It is because of possible boot from external bus. This need to changed to 0x2000_0000 by user code (it is also being set by debugger script what can be enough in case RAM target, but not in case internal FLASH target because in this case debugger script executes before execution of BAM code).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/8521i99662ACA7C73F4AA/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It can be changed by following source code for&amp;nbsp; instance:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;static asm void External_SRAM_MMU_init(void)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; nofralloc
&amp;nbsp;&amp;nbsp;&amp;nbsp; lis&amp;nbsp;&amp;nbsp;&amp;nbsp; r3, 0x1002&amp;nbsp;&amp;nbsp; /* Select TLB entry #, define R/W replacment control */
&amp;nbsp;&amp;nbsp;&amp;nbsp; mtMAS0 r3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Load MAS0 with 0x1002 0000 for TLB entry #2 */
&amp;nbsp;&amp;nbsp;&amp;nbsp; tlbre&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Get TLB entry # information */
&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; mfspr&amp;nbsp; r3, MAS3
&amp;nbsp;&amp;nbsp;&amp;nbsp; oris&amp;nbsp; r3, r3, 0x2000&amp;nbsp;&amp;nbsp;&amp;nbsp; /* EBI Physical Base Addr changed to 0x2000_0000 */
&amp;nbsp;&amp;nbsp;&amp;nbsp; ori&amp;nbsp;&amp;nbsp; &amp;nbsp; r3, r3, 0x0000 &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; mtMAS3 r3
&amp;nbsp;&amp;nbsp;&amp;nbsp; msync&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* make sure we finished all memory accesses */
&amp;nbsp;&amp;nbsp;&amp;nbsp; tlbwe&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Write entry defined in MAS0 (entry 1 here) to MMU TLB */
&amp;nbsp;&amp;nbsp;&amp;nbsp; isync&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Wait for tlbwe to complete, then flush instruction buffer */
&amp;nbsp;&amp;nbsp;&amp;nbsp; blr&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:55:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Interfacing-MPC5566-with-External-Memory/m-p/649738#M6761</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2020-11-02T13:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Interfacing MPC5566 with External Memory</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Interfacing-MPC5566-with-External-Memory/m-p/649739#M6762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your response. I was able to get the code working by adding and invoking the above mentioned function. I have been struggling with this issue for days. Very grateful for the help. Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 11:14:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Interfacing-MPC5566-with-External-Memory/m-p/649739#M6762</guid>
      <dc:creator>shraddhanagle</dc:creator>
      <dc:date>2016-11-11T11:14:20Z</dc:date>
    </item>
  </channel>
</rss>

