<?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 Write to external flash when running from external flash using SPIFI in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Write-to-external-flash-when-running-from-external-flash-using/m-p/568997#M17834</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gvandenbosch on Wed Mar 09 01:32:17 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running my image from external flash using SPIFI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I want to write some files to the external flash as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When my image still ran from internal flash I did this the following way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;spifiDevSetMemMode(spifi_handle,0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;spifiDevUnlockDevice(spifi_handle);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//write to the device&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;spifiDevLockDevice(spifi_handle);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;spifiDevSetMemMode(spifi_handle,1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But now my application will crash when I do this because it is running in external flash using SPIFI as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way to accomplish to write to external flash while also running from it using SPIFI?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gerard&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:52:57 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:52:57Z</dc:date>
    <item>
      <title>Write to external flash when running from external flash using SPIFI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Write-to-external-flash-when-running-from-external-flash-using/m-p/568997#M17834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gvandenbosch on Wed Mar 09 01:32:17 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running my image from external flash using SPIFI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I want to write some files to the external flash as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When my image still ran from internal flash I did this the following way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;spifiDevSetMemMode(spifi_handle,0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;spifiDevUnlockDevice(spifi_handle);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//write to the device&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;spifiDevLockDevice(spifi_handle);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;spifiDevSetMemMode(spifi_handle,1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But now my application will crash when I do this because it is running in external flash using SPIFI as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way to accomplish to write to external flash while also running from it using SPIFI?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gerard&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:52:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Write-to-external-flash-when-running-from-external-flash-using/m-p/568997#M17834</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Write to external flash when running from external flash using SPIFI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Write-to-external-flash-when-running-from-external-flash-using/m-p/568998#M17835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bavarian on Wed Mar 09 04:19:36 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello Gerard,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;simply put the part of the program which is doing the erase/program activity to the internal SRAM, then it will work the same way as from internal flash.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, even if I used the word "simply", there are some things to consider:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[list]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [*]&amp;nbsp; depending on where you get the data from, take care that sub-functions for UART, I2S driver etc also need to run from SRAM at the time you are busy on the SPIFI. If you can work in batching mode (get data in - program it - get next data - etc) then this is not mandatory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [*]&amp;nbsp; Take care that the interrupt vectors are normally located in the SPIFI. So if you need to serve interrupts during erase/program cycles, then the interrupt vector table and the respective ISRs must be in SRAM. If you relocate it at runtime or put it statically into SRAM is up to you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/list]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NXP Support Team&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:52:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Write-to-external-flash-when-running-from-external-flash-using/m-p/568998#M17835</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: Write to external flash when running from external flash using SPIFI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Write-to-external-flash-when-running-from-external-flash-using/m-p/568999#M17836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gvandenbosch on Wed Mar 09 05:24:00 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the clear explanation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am going to try it this way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gerard&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:52:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Write-to-external-flash-when-running-from-external-flash-using/m-p/568999#M17836</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Write to external flash when running from external flash using SPIFI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Write-to-external-flash-when-running-from-external-flash-using/m-p/569000#M17837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;bump&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jun 2016 01:04:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Write-to-external-flash-when-running-from-external-flash-using/m-p/569000#M17837</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-19T01:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Write to external flash when running from external flash using SPIFI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Write-to-external-flash-when-running-from-external-flash-using/m-p/569001#M17838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Girard,&lt;/P&gt;&lt;P&gt;I posted my implementation source that I used to solve your same problem. &amp;nbsp;Check it out here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/828579"&gt;https://community.nxp.com/message/828579&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2016 14:38:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Write-to-external-flash-when-running-from-external-flash-using/m-p/569001#M17838</guid>
      <dc:creator>cheuschkel</dc:creator>
      <dc:date>2016-09-02T14:38:17Z</dc:date>
    </item>
  </channel>
</rss>

