<?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>LPC Microcontrollers中的主题 Re: lpc54607 Running Application on external ram</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc54607-Running-Application-on-external-ram/m-p/1400295#M47660</link>
    <description>&lt;P&gt;Hi again, soory late return. coz i moved my office.&lt;/P&gt;&lt;P&gt;and happy endings..&lt;/P&gt;&lt;P&gt;SPIFI flash dma started&lt;BR /&gt;Usart functional API interrupt example&lt;BR /&gt;Board receives characters then sends them out&lt;BR /&gt;Now please input:&lt;BR /&gt;EEPROM init is OK.&lt;BR /&gt;File size is 16872.&lt;BR /&gt;BOOTLOADER file is OK.&lt;BR /&gt;Function Starts...&lt;BR /&gt;Function Starts... vector_table:a0000000&lt;BR /&gt;Function Starts... sp_base:20018000&lt;BR /&gt;Function Starts... pc_func:a0000415&lt;BR /&gt;Main Bootloader Data:.&lt;BR /&gt;&lt;STRONG&gt;MAIN CODE WORKS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;thanks. for yor help.&lt;/P&gt;&lt;P&gt;what i done;&lt;/P&gt;&lt;P&gt;MPU-&amp;gt;RNR = 0; //Region number 0&lt;BR /&gt;MPU-&amp;gt;RBAR = 0xA0000000;//Region base address&lt;BR /&gt;/* Full Access | TEX: 000 | S: 0 | C: 0 | B:0 (No cacheable, no shareable)| 1M SIZE | ENABLE */&lt;BR /&gt;MPU-&amp;gt;RASR = (0 &amp;lt;&amp;lt; 28) | (0x3 &amp;lt;&amp;lt; 24) | (0x0 &amp;lt;&amp;lt; 19) | (0 &amp;lt;&amp;lt; 18) | (0 &amp;lt;&amp;lt; 17) | (0 &amp;lt;&amp;lt; 16) | (0xFF &amp;lt; &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt; | (0x13 &amp;lt;&amp;lt; 1) | (1 &amp;lt;&amp;lt; 0); //Region&lt;BR /&gt;//size and enable&lt;BR /&gt;MPU-&amp;gt;CTRL = MPU_CTRL_ENABLE_Msk | MPU_CTRL_PRIVDEFENA_Msk;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i added this lines as you said to my code before start main code into bootloader.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my bootloader sct file is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define m_interrupts_start             0x00000000
#define m_interrupts_size              0x00000400

#define m_text_start                   0x00000400
#define m_text_size                    0x0001A000

#define m_data_start                   0x20000000
#define m_data_size                    0x00018000

#define m_usb_sram_start               0x40100000
#define m_usb_sram_size                0x00002000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and my main code sct file is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define m_interrupts_start             0xA0000000
#define m_interrupts_size              0x00000400 

#define m_text_start                   0xA0000400
#define m_text_size                    0x0007FC00

#define m_data_start                   0x20000000
#define m_data_size                    0x00018000

#define m_usb_sram_start               0x40100000
#define m_usb_sram_size                0x00002000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jan 2022 12:42:22 GMT</pubDate>
    <dc:creator>omeraygor</dc:creator>
    <dc:date>2022-01-17T12:42:22Z</dc:date>
    <item>
      <title>lpc54607 Running Application on external ram</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc54607-Running-Application-on-external-ram/m-p/1394633#M47531</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i ama tring to run application on external ram. wrote a bootloader application that copies bin file from flash to externam sdram. then calling this function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* execute the firmware exists in sramx. */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;typedef void(*func_0_t)(void);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;void app_execute_ram_firmware(void * addr)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;PRINTF("Function Starts...\n"); &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;uint32_t * vector_table = (uint32_t *)addr;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;uint32_t sp_base = vector_table[0];&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;func_0_t pc_func = (func_0_t)(vector_table[1]);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;// func_0_t pc_func = (func_0_t)(addr + 4);&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;PRINTF("Function Starts... vector_table:%x\n",vector_table); &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;PRINTF("Function Starts... sp_base:%x\n",sp_base); &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;PRINTF("Function Starts... pc_func:%x\n",pc_func); &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;/* set new msp and psp. */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;__set_MSP(sp_base);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;__set_PSP(sp_base);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#if __VTOR_PRESENT == 1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SCB-&amp;gt;VTOR = addr;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#endif&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;/* jump to application. */&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;pc_func();&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;/* the code should never reach here. */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;while (1)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;my program output like this:&lt;/P&gt;&lt;P&gt;EEPROM init is OK.&lt;BR /&gt;File size is 16872.&lt;BR /&gt;BOOTLOADER file is OK.&lt;BR /&gt;Function Starts...&lt;BR /&gt;Function Starts... vector_table:a0000000&lt;BR /&gt;Function Starts... sp_base:20018000&lt;BR /&gt;Function Starts... pc_func:a0000415&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but main code can not start.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i put bootloader code and main code into lpc's internal flash memory. after bootloader , main code is works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then i tested second things.&lt;/P&gt;&lt;P&gt;wrote some dummy data to external sd ram into bootloader. then i can read it again into main code.&lt;/P&gt;&lt;P&gt;is there any missing to work code form external sdram?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 07:13:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc54607-Running-Application-on-external-ram/m-p/1394633#M47531</guid>
      <dc:creator>omeraygor</dc:creator>
      <dc:date>2022-01-05T07:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: lpc54607 Running Application on external ram</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc54607-Running-Application-on-external-ram/m-p/1394944#M47537</link>
      <description>&lt;P&gt;You need to allow "instruction fetch" in the MMU for the external SDRAM:&lt;/P&gt;&lt;P&gt;(Note, in my case below I use area 0xA0200000 and forward, you need to adjust that to fit your application)&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;  // Set up MPU:&lt;/SPAN&gt;
&lt;SPAN&gt;  //  - Region 0: 0xA0200000 - 0xA0300000 --- SDRAM memory&lt;/SPAN&gt;
&lt;SPAN&gt;  //              + Size: 1MB&lt;/SPAN&gt;
&lt;SPAN&gt;  //              + XN=0: enable instruction fetch&lt;/SPAN&gt;
&lt;SPAN&gt;  //              + AP=b011: full access&lt;/SPAN&gt;
&lt;SPAN&gt;  //              + TEX=0, S=1, C=1, B=1&lt;/SPAN&gt;
&lt;SPAN&gt;  //&lt;/SPAN&gt;
&lt;SPAN&gt;  MPU-&amp;gt;RNR = 0;//indicate MPU region 0&lt;/SPAN&gt;
&lt;SPAN&gt;  MPU-&amp;gt;RBAR = 0xA0200000; // update the base address for region 0&lt;/SPAN&gt;
&lt;SPAN&gt;  MPU-&amp;gt;RASR = 0x03070026 | 0x00000001;&lt;/SPAN&gt;
&lt;SPAN&gt;  MPU-&amp;gt;CTRL =(1&amp;lt;&amp;lt;0) | (1&amp;lt;&amp;lt;2) ; // Enable the MPU and enable default memory map&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Jan 2022 16:20:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc54607-Running-Application-on-external-ram/m-p/1394944#M47537</guid>
      <dc:creator>carstengroen</dc:creator>
      <dc:date>2022-01-05T16:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: lpc54607 Running Application on external ram</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc54607-Running-Application-on-external-ram/m-p/1395333#M47543</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;If you run an api function in SRAMX, it is okay.&lt;/P&gt;
&lt;P&gt;But if you want to run an api function in external SDRAM, you have to initialize MPU module as Mr &lt;SPAN class="uiOutputText"&gt;Carsten Groen said.&lt;BR /&gt;I attach an application note which tell you how to run code in SDRAM.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="uiOutputText"&gt;Hope it can help you&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="uiOutputText"&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="uiOutputText"&gt;XiangJun Rong&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 05:46:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc54607-Running-Application-on-external-ram/m-p/1395333#M47543</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-01-06T05:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: lpc54607 Running Application on external ram</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc54607-Running-Application-on-external-ram/m-p/1400295#M47660</link>
      <description>&lt;P&gt;Hi again, soory late return. coz i moved my office.&lt;/P&gt;&lt;P&gt;and happy endings..&lt;/P&gt;&lt;P&gt;SPIFI flash dma started&lt;BR /&gt;Usart functional API interrupt example&lt;BR /&gt;Board receives characters then sends them out&lt;BR /&gt;Now please input:&lt;BR /&gt;EEPROM init is OK.&lt;BR /&gt;File size is 16872.&lt;BR /&gt;BOOTLOADER file is OK.&lt;BR /&gt;Function Starts...&lt;BR /&gt;Function Starts... vector_table:a0000000&lt;BR /&gt;Function Starts... sp_base:20018000&lt;BR /&gt;Function Starts... pc_func:a0000415&lt;BR /&gt;Main Bootloader Data:.&lt;BR /&gt;&lt;STRONG&gt;MAIN CODE WORKS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;thanks. for yor help.&lt;/P&gt;&lt;P&gt;what i done;&lt;/P&gt;&lt;P&gt;MPU-&amp;gt;RNR = 0; //Region number 0&lt;BR /&gt;MPU-&amp;gt;RBAR = 0xA0000000;//Region base address&lt;BR /&gt;/* Full Access | TEX: 000 | S: 0 | C: 0 | B:0 (No cacheable, no shareable)| 1M SIZE | ENABLE */&lt;BR /&gt;MPU-&amp;gt;RASR = (0 &amp;lt;&amp;lt; 28) | (0x3 &amp;lt;&amp;lt; 24) | (0x0 &amp;lt;&amp;lt; 19) | (0 &amp;lt;&amp;lt; 18) | (0 &amp;lt;&amp;lt; 17) | (0 &amp;lt;&amp;lt; 16) | (0xFF &amp;lt; &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt; | (0x13 &amp;lt;&amp;lt; 1) | (1 &amp;lt;&amp;lt; 0); //Region&lt;BR /&gt;//size and enable&lt;BR /&gt;MPU-&amp;gt;CTRL = MPU_CTRL_ENABLE_Msk | MPU_CTRL_PRIVDEFENA_Msk;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i added this lines as you said to my code before start main code into bootloader.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my bootloader sct file is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define m_interrupts_start             0x00000000
#define m_interrupts_size              0x00000400

#define m_text_start                   0x00000400
#define m_text_size                    0x0001A000

#define m_data_start                   0x20000000
#define m_data_size                    0x00018000

#define m_usb_sram_start               0x40100000
#define m_usb_sram_size                0x00002000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and my main code sct file is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define m_interrupts_start             0xA0000000
#define m_interrupts_size              0x00000400 

#define m_text_start                   0xA0000400
#define m_text_size                    0x0007FC00

#define m_data_start                   0x20000000
#define m_data_size                    0x00018000

#define m_usb_sram_start               0x40100000
#define m_usb_sram_size                0x00002000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jan 2022 12:42:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc54607-Running-Application-on-external-ram/m-p/1400295#M47660</guid>
      <dc:creator>omeraygor</dc:creator>
      <dc:date>2022-01-17T12:42:22Z</dc:date>
    </item>
  </channel>
</rss>

