<?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 LPC54628 export function code into SDRAM  in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54628-export-function-code-into-SDRAM/m-p/982530#M38755</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to create some helpers function inside SDRAM on my LPC54628 board. I am working on "emc_sdram" example project and decorate desired function with&amp;nbsp;&lt;STRONG&gt;__RAMFUNC(BOARD_SDRAM).&amp;nbsp;&lt;/STRONG&gt;I am able to compile the program with any errors and warnings. Also usage of sdram changes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"BOARD_SDRAM:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 32 B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16 MB&amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00%"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But after flashing everything is stucked and the program cannot acccess any breakpoint when debugging. SDRAM is initialized using example project. What should I do to run the function from sdram? Thanks for your answers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Oct 2019 18:15:54 GMT</pubDate>
    <dc:creator>mateuszkiełbasa</dc:creator>
    <dc:date>2019-10-29T18:15:54Z</dc:date>
    <item>
      <title>LPC54628 export function code into SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54628-export-function-code-into-SDRAM/m-p/982530#M38755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to create some helpers function inside SDRAM on my LPC54628 board. I am working on "emc_sdram" example project and decorate desired function with&amp;nbsp;&lt;STRONG&gt;__RAMFUNC(BOARD_SDRAM).&amp;nbsp;&lt;/STRONG&gt;I am able to compile the program with any errors and warnings. Also usage of sdram changes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"BOARD_SDRAM:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 32 B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16 MB&amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00%"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But after flashing everything is stucked and the program cannot acccess any breakpoint when debugging. SDRAM is initialized using example project. What should I do to run the function from sdram? Thanks for your answers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2019 18:15:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54628-export-function-code-into-SDRAM/m-p/982530#M38755</guid>
      <dc:creator>mateuszkiełbasa</dc:creator>
      <dc:date>2019-10-29T18:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54628 export function code into SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54628-export-function-code-into-SDRAM/m-p/982531#M38756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.&lt;BR /&gt;Firstly, please follow the below post to place the specific functions into RAM blocks&lt;BR /&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/thread/389099"&gt;https://community.nxp.com/thread/389099&lt;/A&gt;&lt;BR /&gt;Secondly, I'd like to point out that the SDRAM initialization should be finished prior to jump to the main() function if want to place the function in the SDRAM.&lt;/P&gt;&lt;P&gt;Have a great day.&lt;/P&gt;&lt;P&gt;TIC&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2019 02:12:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54628-export-function-code-into-SDRAM/m-p/982531#M38756</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2019-10-30T02:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54628 export function code into SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54628-export-function-code-into-SDRAM/m-p/982532#M38757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have read how to move function inside SDRAM using your link. This is main.c file contents:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro" style="background: none #f6f6f6; border-left: 2px solid #cccccc; margin: 10px 0px; padding: 10px 20px;"&gt;&lt;P&gt;#include "board.h"&lt;BR /&gt;#include "fsl_debug_console.h"&lt;BR /&gt;#include "fsl_emc.h"&lt;BR /&gt;#include &amp;lt;stdbool.h&amp;gt;&lt;BR /&gt;#include "pin_mux.h"&lt;BR /&gt;#include "cr_section_macros.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__RAMFUNC(BOARD_SDRAM) void testSDRAM(void)&lt;BR /&gt;{&lt;BR /&gt;for (int i = 0; i &amp;lt; 10; i++) {&lt;BR /&gt;PRINTF("It works!\n");&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;/* Initialization inside SystemInitHook function */&lt;/P&gt;&lt;P&gt;testSDRAM();&lt;BR /&gt;EMC_Deinit(EMC);&lt;/P&gt;&lt;P&gt;while (1) {}&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I moved all of the init function inside SystemInitHook function&amp;nbsp;in systemLPC54628.c:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro" style="background: none #f6f6f6; border-left: 2px solid #cccccc; margin: 10px 0px; padding: 10px 20px;"&gt;&lt;P&gt;/* ----------------------------------------------------------------------------&lt;BR /&gt;-- SystemInitHook()&lt;BR /&gt;---------------------------------------------------------------------------- */&lt;/P&gt;&lt;P&gt;void SystemInitHook (void) {&lt;BR /&gt;/* Void implementation of the weak function. */&lt;BR /&gt;/* Hardware Initialization */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_InputMux);&lt;BR /&gt;/* attach 12 MHz clock to FLEXCOMM0 (debug console) */&lt;BR /&gt;CLOCK_AttachClk(BOARD_DEBUG_UART_CLK_ATTACH);&lt;/P&gt;&lt;P&gt;BOARD_InitPins();&lt;BR /&gt;BOARD_BootClockPLL220M();&lt;BR /&gt;BOARD_InitDebugConsole();&lt;BR /&gt;BOARD_InitSDRAM();&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the program can reach first breakpoint inside main function but jumping into function code causes HardFault (MMSR) IACCVIOL.&lt;/P&gt;&lt;P&gt;I attached project structure. Could you provide any working "Hello world" example using attached project?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2019 07:25:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54628-export-function-code-into-SDRAM/m-p/982532#M38757</guid>
      <dc:creator>mateuszkiełbasa</dc:creator>
      <dc:date>2019-10-30T07:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54628 export function code into SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54628-export-function-code-into-SDRAM/m-p/982533#M38758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Thanks for your reply.&lt;BR /&gt;To provide the fastest possible support, I want to point you to a &lt;BR /&gt;similar question that has been answered on our NXP community. &lt;BR /&gt;Please refer to &lt;A _jive_internal="true" href="https://community.nxp.com/thread/471170"&gt;https://community.nxp.com/thread/471170&lt;/A&gt;&lt;BR /&gt;to view the details.&lt;BR /&gt;In further, I'd like to suggest you validate the SDRAM has already be initialized successfully via do some write and read operation to the SDRAM.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Have a great day.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;TIC&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2019 08:00:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54628-export-function-code-into-SDRAM/m-p/982533#M38758</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2019-10-31T08:00:13Z</dc:date>
    </item>
  </channel>
</rss>

