<?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: LPC11U68 running code from internal SRAM in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725274#M29322</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="322634" data-username="shashank.garg@lntebg.com" href="https://community.nxp.com/people/shashank.garg@lntebg.com"&gt;Shashank Garg&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the user manual section 6.4.1 before the table you posted you will find the following information:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;STRONG&gt;Access time to the flash memory can be configured independently of the system frequency&lt;/STRONG&gt; by writing to the FLASHCFG register.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Victor.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jul 2018 15:58:55 GMT</pubDate>
    <dc:creator>victorjimenez</dc:creator>
    <dc:date>2018-07-23T15:58:55Z</dc:date>
    <item>
      <title>LPC11U68 running code from internal SRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725268#M29316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to move the application code stored in the flash of LPC11U68 to its 36kB SRAM block and execute the application program from the same. Any examples programs or document mentioning the same would be of great help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also is there any way by which the flash's code execution speed can be improved for this microcontroller.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 08:46:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725268#M29316</guid>
      <dc:creator>akhilesh_sreedh</dc:creator>
      <dc:date>2018-05-04T08:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11U68 running code from internal SRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725269#M29317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Akhilesh,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer to the following community where it's explained how to move code from flash to RAM memory:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/389110"&gt;Relocating code from FLASH to RAM&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;Victor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 14:33:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725269#M29317</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2018-05-04T14:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11U68 running code from internal SRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725270#M29318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Victor,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually we found the code execution speed of this microcontroller to be quite slow for our application and that is the reason why we are moving the code to RAM. Can anything be done to improve the code execution from flash as we don't want our RAM to be consumed much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We verified the program execution speed by running the following code snippets inside the main and the core was set to 48MHz:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;void main()
{
while(1)
 {
 Chip_GPIO_SetPinState(LPC_GPIO, 1, 13, FALSE);
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 Chip_GPIO_SetPinState(LPC_GPIO, 1, 13, TRUE);
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 }
}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The above code snippet produced a square waveform with an half cycle time of approximately &lt;STRONG&gt;1.66us.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We again ran the same code with 10 more NOPs added to every half cycle. The snippet is as shown below:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;void main()
{
while(1)
 {
 Chip_GPIO_SetPinState(LPC_GPIO, 1, 13, FALSE);
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 Chip_GPIO_SetPinState(LPC_GPIO, 1, 13, TRUE);
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 __asm("NOP");
 }
}
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This program produced a square wave on P1.13 with a half cycle period of &lt;STRONG&gt;1.88us&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The difference in time comes out to be around 220ns (execution time for 10 NOPs) and the per cycle execution of NOP comes to be around 22ns which fairly matches its theoretical value of 20.83ns. So, it appears that the code execution from flash takes significant time as per our needs. Is there any way by which the execution from the flash can be accelerated?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Akhilesh Sreedharan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 May 2018 05:55:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725270#M29318</guid>
      <dc:creator>akhilesh_sreedh</dc:creator>
      <dc:date>2018-05-05T05:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11U68 running code from internal SRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725271#M29319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;Akhilesh Sreedharan,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the late response.&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Is there any way by which the execution from the flash can be accelerated?&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes, I recommend you to check the user manual (&lt;A href="https://www.nxp.com/docs/en/user-guide/UM10732.pdf"&gt;UM10732.pdf&lt;/A&gt;) chapter 25: Flash Controller. In the table 354 you will see that you can change&amp;nbsp;flash memory access time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/39310iD0C7CBB67EC80BD8/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You are running at 48MHz and it's taking 3 system clocks to access the flash. But if you slow down the system clock to 20MHz then you can set the FLASHTIM so it only takes 1 system clock to access the flash. Although the system clock will be running at a lower frequency, this will decrease the flash memory access time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;Victor.&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2018 16:17:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725271#M29319</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2018-06-13T16:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11U68 running code from internal SRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725272#M29320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That won't actually make the access time too much faster. 2 cycles @ 40 MHz == 1 cycle @ 20 MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As to the original question - the chip is as fast as it goes... get a faster chip if you need a faster chip (e.g. LPC15xx).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure what you're trying to do, but running anything more than a small bit of code from SRAM is going to be a lot of work, since the code will likely have to be position independent (PIC). Plus, I think PIC tends to run slower because of all the addressing issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2018 19:08:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725272#M29320</guid>
      <dc:creator>chrispflieger</dc:creator>
      <dc:date>2018-07-05T19:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11U68 running code from internal SRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725273#M29321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the LPC 84x. I also want to confirm the same technical query. IN LPC 84x there is no such frequency depend wait cycle. Here in reference manual, the flash access time is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="LPC84x.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/65879i3B64D8883DF5DAAB/image-size/large?v=v2&amp;amp;px=999" role="button" title="LPC84x.jpg" alt="LPC84x.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As compared to LC11x, here in user manual, there is no wait cycle depend on frequency. Please confirm that&amp;nbsp;whether I can have 1 system clock flash access time independent of frequency.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2018 10:29:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725273#M29321</guid>
      <dc:creator>shashank_garg</dc:creator>
      <dc:date>2018-07-19T10:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11U68 running code from internal SRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725274#M29322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="322634" data-username="shashank.garg@lntebg.com" href="https://community.nxp.com/people/shashank.garg@lntebg.com"&gt;Shashank Garg&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the user manual section 6.4.1 before the table you posted you will find the following information:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;STRONG&gt;Access time to the flash memory can be configured independently of the system frequency&lt;/STRONG&gt; by writing to the FLASHCFG register.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Victor.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2018 15:58:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-running-code-from-internal-SRAM/m-p/725274#M29322</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2018-07-23T15:58:55Z</dc:date>
    </item>
  </channel>
</rss>

