<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>NCS: flash_area_open(...) get a wrong  address</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82992/ncs-flash_area_open-get-a-wrong-address</link><description>Hi all: 
 I am using nrf52840 hardware. nrf connect sdk. 
 
 I am using file system and mcuboot at the same time. When i call ` flash_area_open (id, &amp;amp; pfa);`, i got a wrong device name. 
 I add ` CONFIG_BOOTLOADER_MCUBOOT = y` to prj.conf, and i use sample</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Dec 2021 10:04:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82992/ncs-flash_area_open-get-a-wrong-address" /><item><title>RE: NCS: flash_area_open(...) get a wrong  address</title><link>https://devzone.nordicsemi.com/thread/344541?ContentTypeID=1</link><pubDate>Tue, 21 Dec 2021 10:04:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7987d732-1a95-4645-aa14-d986a9de093b</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The default location is that the storage partition is located in internal flash.&lt;/p&gt;
&lt;p&gt;I suspect that you want the &amp;quot;littlefs_storage&amp;quot; section to be in your external flash?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To override this, you can statically define the partition(s):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html#static-configuration"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html#static-configuration&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can define this in your pm_static.yml file.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;littlefs_storage:
  address: &amp;lt;find the end-address of the &amp;quot;mcuboot_secondary&amp;quot; and place that here&amp;gt;
  device: mx25r6435f
  region: external_flash
  size: 0x6000  &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS: flash_area_open(...) get a wrong  address</title><link>https://devzone.nordicsemi.com/thread/344467?ContentTypeID=1</link><pubDate>Tue, 21 Dec 2021 02:06:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d77fedc-5f52-4ba3-9b31-6700051de129</guid><dc:creator>hu yang</dc:creator><description>&lt;p&gt;Got that:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/82821/after-enabling-mcuboot-in-ncs-external-flash-doesn-t-get-picked-up-by-littlefs"&gt;after-enabling-mcuboot-in-ncs-external-flash-doesn-t-get-picked-up-by-littlefs&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I set&amp;nbsp; `&lt;span&gt;CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;n` in my prj.conf. and set this in my .overlay:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
	chosen {
		nordic,pm-ext-flash = &amp;amp;mx25l256;
	};
};&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I got a wrong device address too.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>