<?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>Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79306/changing-flash-parameters-in-overlay-file</link><description>My project is using nRF52840. Early software development used an nRF52840-DK to develop most of the software. Software is based on Zephyr using nRF Connect version 1.6.1. I&amp;#39;m using the &amp;quot;littlefs&amp;quot; file system. I got most things working using the nRF52840</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Sep 2022 02:34:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79306/changing-flash-parameters-in-overlay-file" /><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/384680?ContentTypeID=1</link><pubDate>Tue, 06 Sep 2022 02:34:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc0a56a4-8179-4416-9f6e-69342c89e818</guid><dc:creator>CktDesigner</dc:creator><description>&lt;p&gt;OK, thanks...&amp;nbsp; &amp;nbsp;I didn&amp;#39;t read the spec as carefully as I should have...&amp;nbsp; &amp;nbsp;My bad!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks again...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/384615?ContentTypeID=1</link><pubDate>Mon, 05 Sep 2022 13:55:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f488db34-ba90-4e26-bd3d-daa17d9c7896</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;I asked one of our FileSystem gurus, and this seems to be the cause for your issue:&lt;/p&gt;
&lt;p&gt;- Hybrid sector size option - Physical set of thirty two 4kB sectors at top or bottom of address space with all&amp;nbsp;remaining sectors of 64 KB, for compatibility with prior generation S25FL devices.&lt;/p&gt;
&lt;p&gt;- Uniform sector option - always erase 256-KB blocks for software compatibility with higher density and future&lt;br /&gt;devices.&lt;/p&gt;
&lt;p&gt;The sector size is huge, it is not 4KB and is not uniform.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/384356?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2022 13:54:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0deb6525-512b-47e2-98bb-35e9708bad25</guid><dc:creator>CktDesigner</dc:creator><description>&lt;p&gt;As noted in the previous post...&amp;nbsp; &amp;nbsp; &amp;nbsp;I didn&amp;#39;t change the name for the memory entry, but did change some parameters (jedec-id, size, etc.).&amp;nbsp; &amp;nbsp; The name shouldn&amp;#39;t matter.&amp;nbsp; &amp;nbsp;It only provides an identifier so it can be referenced from other places.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/384302?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2022 11:04:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3782cd10-9d2d-4eda-808e-58f357b543cd</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;From this .dts file it seems like the QSPI is defined as the MX25 flash chip that is onboard the nRF52840. You need to configure it for the S25FL that you&amp;#39;re using. Make sure that the size and write/read permissions fits that board.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/384195?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2022 15:52:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb218e66-4d3c-4ecb-840b-069d5a29c45d</guid><dc:creator>CktDesigner</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here is the file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2017 Linaro Limited
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/dts-v1/;
#include &amp;lt;nordic/nrf52840_qiaa.dtsi&amp;gt;

/ {
	model = &amp;quot;Nordic nRF52840 ModelRocket&amp;quot;;
	compatible = &amp;quot;nordic,nrf52840-dk-nrf52840&amp;quot;;

	chosen {

#if 1
                zephyr,gps-uart = &amp;amp;uart0;
#endif
		zephyr,sram = &amp;amp;sram0;
		zephyr,flash = &amp;amp;flash0;
		zephyr,code-partition = &amp;amp;slot0_partition;
	};




	nrf_radio_fem: ble_pa {
	   compatible = &amp;quot;skyworks,sky66112-11&amp;quot;, &amp;quot;generic-fem-two-ctrl-pins&amp;quot;;
	   ctx-gpios = &amp;lt;&amp;amp;gpio1 2 GPIO_ACTIVE_HIGH&amp;gt;;
	   crx-gpios = &amp;lt;&amp;amp;gpio1 4 GPIO_ACTIVE_HIGH&amp;gt;;
    };

	fstab {
		compatible = &amp;quot;zephyr,fstab&amp;quot;;
		lfs2: lfs2 {
			compatible = &amp;quot;zephyr,fstab,littlefs&amp;quot;;
			mount-point = &amp;quot;/lfs2&amp;quot;;
			partition = &amp;lt;&amp;amp;lfs2_part&amp;gt;;
/*
			automount;
*/
			read-size = &amp;lt;16&amp;gt;;
			prog-size = &amp;lt;16&amp;gt;;
			cache-size = &amp;lt;64&amp;gt;;
			lookahead-size = &amp;lt;32&amp;gt;;
			block-cycles = &amp;lt;512&amp;gt;;
		};
	};


};


&amp;amp;adc {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpiote {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpio0 {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpio1 {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;uart0 {
	compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	tx-pin = &amp;lt;12&amp;gt;;
	rx-pin = &amp;lt;41&amp;gt;;
        /delete-property/ rts-pin;
        /delete-property/ cts-pin;
};

&amp;amp;uart1 {
        compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
	status = &amp;quot;disabled&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
        /* Unused pins */
	rx-pin = &amp;lt;33&amp;gt;;
	tx-pin = &amp;lt;25&amp;gt;;
};

&amp;amp;i2c0 {
	compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
        /* Cannot be used together with spi0 */
	status = &amp;quot;okay&amp;quot;;
	sda-pin = &amp;lt;26&amp;gt;;
	scl-pin = &amp;lt;27&amp;gt;;
};

&amp;amp;i2c1 {
	compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
	/* Cannot be used together with spi1. */
	status = &amp;quot;okay&amp;quot;;
	sda-pin = &amp;lt;11&amp;gt;;
	scl-pin = &amp;lt;13&amp;gt;;
};

&amp;amp;pwm0 {
	status = &amp;quot;disabled&amp;quot;;
	ch0-pin = &amp;lt;14&amp;gt;;
	ch0-inverted;
};

&amp;amp;spi0 {
	compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
	/* Cannot be used together with i2c0. */
	status = &amp;quot;disabled&amp;quot;;
	sck-pin = &amp;lt;27&amp;gt;;
	mosi-pin = &amp;lt;26&amp;gt;;
	miso-pin = &amp;lt;29&amp;gt;;
};

&amp;amp;spi1 {
	compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
        /* Cannot be used together with i2c1 */
	status = &amp;quot;disabled&amp;quot;;
	sck-pin = &amp;lt;31&amp;gt;;
	mosi-pin = &amp;lt;30&amp;gt;;
	miso-pin = &amp;lt;40&amp;gt;;
};

&amp;amp;spi2 {
	compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
	status = &amp;quot;disabled&amp;quot;;
	sck-pin = &amp;lt;19&amp;gt;;
	mosi-pin = &amp;lt;20&amp;gt;;
	miso-pin = &amp;lt;21&amp;gt;;
};

&amp;amp;spi3 {
	compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
	status = &amp;quot;disabled&amp;quot;;
	sck-pin = &amp;lt;47&amp;gt;;
	mosi-pin = &amp;lt;46&amp;gt;;
	miso-pin = &amp;lt;45&amp;gt;;
};

&amp;amp;qspi {
	status = &amp;quot;okay&amp;quot;;
	sck-pin = &amp;lt;19&amp;gt;;
	io-pins = &amp;lt;20&amp;gt;, &amp;lt;21&amp;gt;, &amp;lt;22&amp;gt;, &amp;lt;23&amp;gt;;
	csn-pins = &amp;lt;17&amp;gt;;
	mx25r64: mx25r6435f@0 {
		compatible = &amp;quot;nordic,qspi-nor&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		/* MX25R64 supports only pp and pp4io */
		writeoc = &amp;quot;pp4io&amp;quot;;
		/* MX25R64 supports all readoc options */
		readoc = &amp;quot;read4io&amp;quot;;
		sck-frequency = &amp;lt;8000000&amp;gt;;
		label = &amp;quot;MX25R64&amp;quot;;

		sfdp-bfp = [
			e5 20 f1 ff  ff ff ff 03  44 eb 08 6b  08 3b 04 bb
			ee ff ff ff  ff ff 00 ff  ff ff 00 ff  0c 20 0f 52
			10 d8 00 ff  23 72 f5 00  82 ed 04 cc  44 83 68 44
			30 b0 30 b0  f7 c4 d5 5c  00 be 29 ff  f0 d0 ff ff
		];

		has-dpd;
		t-enter-dpd = &amp;lt;10000&amp;gt;;
		t-exit-dpd = &amp;lt;35000&amp;gt;;

#if 0
		jedec-id = [c2 28 17];
		size = &amp;lt;67108864&amp;gt;;
#endif
		jedec-id = [01 20 18];
        size = &amp;lt;134217728&amp;gt;;
		partitions {
			compatible = &amp;quot;fixed-partitions&amp;quot;;
			#address-cells = &amp;lt;1&amp;gt;;
			#size-cells = &amp;lt;1&amp;gt;;

			lfs2_part: partition@0 {
				label = &amp;quot;main_storage&amp;quot;;
				reg = &amp;lt;0x00000000 0x02000000&amp;gt;;
			};
			
		};
		/* End from overlay */
	};
};

&amp;amp;flash0 {

	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x000000000 0x0000C000&amp;gt;;
		};
		slot0_partition: partition@c000 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0x0000C000 0x00067000&amp;gt;;
		};
		slot1_partition: partition@73000 {
			label = &amp;quot;image-1&amp;quot;;
			reg = &amp;lt;0x00073000 0x00067000&amp;gt;;
		};
		scratch_partition: partition@da000 {
			label = &amp;quot;image-scratch&amp;quot;;
			reg = &amp;lt;0x000da000 0x0001e000&amp;gt;;
		};

		/*
		 * The flash starting at 0x000f8000 and ending at
		 * 0x000fffff is reserved for use by the application.
		 */

		/*
		 * Storage partition will be used by FCB/LittleFS/NVS
		 * if enabled.
		 */
		storage_partition: partition@f8000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0x000f8000 0x00008000&amp;gt;;
		};
	};
};

zephyr_udc0: &amp;amp;usbd {
	compatible = &amp;quot;nordic,nrf-usbd&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Note that I started with the nRF52840-DK file and edited it to reflect my board.&amp;nbsp; &amp;nbsp; Also, I have two file systems.&amp;nbsp; &amp;nbsp;&amp;quot;/lfs1&amp;quot; mounts the on-chip storage partition, while &amp;quot;/lfs2&amp;quot; is for the external flash device attached to the QSPI bus.&amp;nbsp; &amp;nbsp; &amp;nbsp; Also note that I didn&amp;#39;t change the &amp;quot;name&amp;quot; of the flash device, but rather changed the important parameters.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/383866?ContentTypeID=1</link><pubDate>Tue, 30 Aug 2022 10:46:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:816a8f39-9375-44bf-b332-5dd3b0bca5d4</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Can you upload the overlay (.dts) file where your QSPI (pins, size, etc.) are set up of how it looks now so we can take a look? I&amp;#39;m afraid I&amp;#39;m not familiar with an error in this line in lfs.c, but it seems like the dir pair is corrupted at some point when trying to fetch a matching dir...&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/383735?ContentTypeID=1</link><pubDate>Mon, 29 Aug 2022 15:44:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66ac1a6e-3b82-48c3-a257-3ae22a6266dd</guid><dc:creator>CktDesigner</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Yes...&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Still using nRF52840 and S25FL external flash connected via QSPI, so it is not an SD card (your referenced case deals with SD cards).&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve also moved to NCS 2.0.2 (the latest released version of NCS).&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/LittleFS_5F00_QSPI_5F00_error.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve had trouble finding any detailed documentation on the structure/internals of littleFS.&amp;nbsp; &amp;nbsp; But I&amp;#39;ve traced through the code and the error appears to occur when the CRCs are being checked during the formatting process.&amp;nbsp; &amp;nbsp; &amp;nbsp;I saw one post that implied that the config statement &amp;quot;CONFIG_APP_WIPE_STORAGE=y&amp;quot; should be included in prj.conf, but if I do so, the build process fails, indicating that this configuration variable was not found.&lt;/p&gt;
&lt;p&gt;I assume the physical interface to the chip works since it reads the jedec-id (I had to change the listed on in the .dts file to expect the one in the S25FL device.).&amp;nbsp; &amp;nbsp; As I mentioned earlier, I had the software running on the -DK board, but am struggling to get it working on my custom board with a different (larger) QSPI device.&lt;/p&gt;
&lt;p&gt;Thanks...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/383669?ContentTypeID=1</link><pubDate>Mon, 29 Aug 2022 11:59:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41a84786-c72b-4bfc-ba17-83e4d6f12774</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;It&amp;#39;s been a while, so just to make sure we&amp;#39;re on the same page. You&amp;#39;re still using an nRF52840, the &lt;a href="https://www.infineon.com/dgdl/Infineon-S25FL128S_S25FL256S_128_Mb_(16_MB)_256_Mb_(32_MB)_3.0V_SPI_Flash_Memory-DataSheet-v18_00-EN.pdf?fileId=8ac78c8c7d0d8da4017d0ecfb6a64a17&amp;amp;utm_source=cypress&amp;amp;utm_medium=referral&amp;amp;utm_campaign=202110_globe_en_all_integration-files"&gt;S25FL external flash&lt;/a&gt;, and you&amp;#39;re still having error -5 (I/O error) when trying to mount the external board. Is that correct?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This could be due to the mount process already being in progress when this is called somehow. You can try waiting for the SD card to be detected before starting the mount process. You can also check out &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/68051/sd-card-mount-error-using-fat_fs-zephyr-example-code"&gt;this case&lt;/a&gt; where my colleague Torbjørn provided a possible fix to a mount error like this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/383550?ContentTypeID=1</link><pubDate>Sat, 27 Aug 2022 17:29:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43d7d66e-b081-4d36-ab4a-75246b38c179</guid><dc:creator>CktDesigner</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;I moved on to other issues (and other projects), but am now back to trying to solve this issue.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m now using NCS 2.0.0 but having the same issues.&amp;nbsp; &amp;nbsp; &amp;nbsp;I&amp;#39;m actually using two LFS volumes.&amp;nbsp; One uses an on-chip storage partition (and works well), and the other attempts to mount the qspi-nor device (for larger data files) and is still having issues mounting...&lt;/p&gt;
&lt;p&gt;Any thoughts?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/332047?ContentTypeID=1</link><pubDate>Fri, 01 Oct 2021 06:24:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acb315cd-8105-49f3-a8cb-dfd20493d401</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I have asked our development team to take a look at this, but I&amp;#39;m still waiting for a reply there. Hopefully I&amp;#39;ll hear back either today or just over the weekend. Thank you for your patience.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/331589?ContentTypeID=1</link><pubDate>Tue, 28 Sep 2021 23:07:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7dc9bdc8-0582-4bd4-bff0-f35f6893a27e</guid><dc:creator>CktDesigner</dc:creator><description>&lt;p&gt;OK, thanks.&lt;/p&gt;
&lt;p&gt;I updated the overlay to reflect the 128 Mbit size of the Cypress part, but it didn&amp;#39;t make any difference.&amp;nbsp; &amp;nbsp; Still fails during format with error code of -5.&lt;/p&gt;
&lt;p&gt;Thanks again...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/331280?ContentTypeID=1</link><pubDate>Mon, 27 Sep 2021 10:54:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d1b3140-3eb5-471a-b300-cba3ff56de9f</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;Yes, you seem to be right indeed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have looked at the Macronix and Cypress write procedures, and they seem very similar, so I&amp;#39;ve not been able to track down what exact changes are necessary to be done yet, but I have a few suggestions, and I&amp;#39;m also awaiting a reply from our FS/QSPI experts (I hoped they got back to me by today, but they have not). I will update you as soon as I hear from them.&lt;/p&gt;
&lt;p&gt;You can try setting&amp;nbsp;the size in your overlay file to match the size of your Cypress chip. Since you&amp;#39;re able to&amp;nbsp;read the JEDEC ID correctly for instance,&amp;nbsp;the flash chip seems to be set up correctly, but the file system procedure is what&amp;#39;s not working as intended.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/330888?ContentTypeID=1</link><pubDate>Thu, 23 Sep 2021 14:11:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4868b7aa-b43f-4434-894b-6fe3f89c09ac</guid><dc:creator>CktDesigner</dc:creator><description>&lt;p&gt;Yes, I&amp;#39;m using the project you referenced.&lt;/p&gt;
&lt;p&gt;But in main.c at lines 20 through 32 it defines &amp;quot;PARTITION_MODE&amp;quot; which references /lfs1 which is defined in the overlay file.&amp;nbsp; &amp;nbsp;There, the partition /lfs1_part is referenced which is defined in the &amp;amp;mx25r64, which is the Flash device connected via the qspi bus.&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;So by default, the example uses the external flash.&amp;nbsp; &amp;nbsp; I think to use the SOC flash you have to comment out the definition of PARTITION_MODE on main.c line 20...&lt;/p&gt;
&lt;p&gt;I needed to add the jedec-id line to redefine the device id to the one I&amp;#39;m using on my custom board.&amp;nbsp; &amp;nbsp;When it still didn&amp;#39;t work I thought that some other parameter must need to be adjusted but didn&amp;#39;t see any concise definitions for these parameters.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/330758?ContentTypeID=1</link><pubDate>Thu, 23 Sep 2021 07:51:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:364eb90d-9a76-4961-8003-68a4dc8eeb44</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Just to clarify, the project you&amp;#39;re using is the&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/subsys/fs/littlefs/README.html"&gt; littleFS File System Sample application in Zephyr,&lt;/a&gt; correct? I assume you have noticed that on an nRF52840 DK, the file system will be placed in the SoC flash by default. Have you not made any changes to make it use the external flash device except adding the jedec-id in your overlay file?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/330536?ContentTypeID=1</link><pubDate>Tue, 21 Sep 2021 18:25:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd77d7a9-2979-48af-8e47-b0221facf62f</guid><dc:creator>CktDesigner</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Thanks for your assistance!&lt;/p&gt;
&lt;p&gt;The only change I made to the example project was to add a line in the .overlay file for nrf52840kd_nrf52840 to change the jedec-id for the device I&amp;#39;m using.&lt;/p&gt;
&lt;p&gt;So the line:&amp;nbsp; &amp;nbsp; &amp;nbsp; jedec-id = [01 20 18];&amp;nbsp; &amp;nbsp;was added as line 27 of that file.&lt;/p&gt;
&lt;p&gt;I know the size parameters will need to be changed, but figured that could be done after the basic operation was verified since the new part is larger than the one on the nRF52840-DK.&lt;/p&gt;
&lt;p&gt;The device I&amp;#39;m using is a Cypress S25FL128SAGNFI001&amp;nbsp; (&lt;a href="https://www.digikey.com/en/products/detail/cypress-semiconductor-corp/S25FL128SAGNFI001/13167436"&gt;https://www.digikey.com/en/products/detail/cypress-semiconductor-corp/S25FL128SAGNFI001/13167436&lt;/a&gt;)&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The datasheet is:&amp;nbsp;&lt;a href="https://www.cypress.com/file/448601/download"&gt;https://www.cypress.com/file/448601/download&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/330419?ContentTypeID=1</link><pubDate>Tue, 21 Sep 2021 09:27:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0ae4294-4ffa-404f-a1e8-bd09d9a4f121</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;Okay, so it seems like the error you&amp;#39;re seeing is that the device tries to mount with the settings/parameters you&amp;#39;re using, but is not able to because the settings aren&amp;#39;t stored correctly. CONFIG_APP_WIPE_STORAGE does not seem to be the way to go, seeing as the littleFS device hasn&amp;#39;t been written to at all before. It should be sufficient to set up the device, let it fail to mount as LittleFS will have to format the device, and then reset it when the device is formatted correctly. If you then try to mount (automount should be fine as well), the device should be able to mount.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re still running into errors, can you tell me in detail what changes you&amp;#39;ve made to the example project and maybe provide a link to the datasheet of the Flash device you&amp;#39;re trying to format for?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/330131?ContentTypeID=1</link><pubDate>Sat, 18 Sep 2021 19:09:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f62fa87-6805-4bcd-a4c9-40f87e2e642f</guid><dc:creator>CktDesigner</dc:creator><description>&lt;p&gt;I stepped back and used the littlefs sample project to just test the Flash/LittleFS interface of my new board.&amp;nbsp; &amp;nbsp;Since the board is new, the flash has never been written, so when booting, the mount fails (as expected with an error at lfs.c line 997 (Corrupted dir pair at (0x0, 0x1))) and it appears LittleFS attempts to format the device.&amp;nbsp; &amp;nbsp; It looks like it prepares a superblock, then attempts to write it.&amp;nbsp; &amp;nbsp; A failure occurs during formatting (returning -28).&amp;nbsp; &amp;nbsp; Looking this up in lfs.h shows that -28 indicates LFS_ERR_NOSPC (no space left on device).&amp;nbsp; &amp;nbsp; &amp;nbsp;Stepping through, it looks like the error is being thrown at line 1692 of lfs.c due to the comparison at line 1689.&amp;nbsp; I&amp;#39;m not sure why this is happening yet.&amp;nbsp; &amp;nbsp; The device is new, so is there some other (erase?) procedure that needs to be performed before running this test?&amp;nbsp; &amp;nbsp; I would think that formatting would prepare/initialize any information about the device needed for the file system?&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I removed the comment from the CONFIG_APP_WIPE_STORAGE=y line in prj.conf thinking that perhaps it might erase the device during the formatting process, but got the same error (-28).&lt;/p&gt;
&lt;p&gt;Note that CONFIG_APP_WIPE_STORAGE=y works here, but if I put it in my prj.conf running Cmake fails!&amp;nbsp; &amp;nbsp;Both are using NCS 1.6.1&amp;nbsp; Running without the APP_WIPE config statement causes an error -5 (LFS_ERR_IO - Error during device operation).&amp;nbsp; &amp;nbsp; As mentioned earlier, the device on the new board is very similar to the one on nRF52840DK, except larger.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/330048?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 12:56:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7deab91f-b6b5-4ee7-a078-79b413d9c195</guid><dc:creator>CktDesigner</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;If &amp;quot;CONFIG_APP_WIPE_STORAGE=y&amp;quot; is included in prj.conf I get an error when Cmake executes.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/CONFIG_5F00_APP_5F00_WIPE_5F00_STORAGE_5F00_error.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;I then checked:&amp;nbsp;&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index-all.html"&gt;http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index-all.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and didn&amp;#39;t see it listed as a legal CONFIG option, so I assumed it had been removed.&lt;/p&gt;
&lt;p&gt;The call returns -5 (0xfffffffb)&lt;/p&gt;
&lt;p&gt;Sorry, line 1051 should be 1851...&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/329988?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 10:47:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b5f08ce-a61f-4810-b18f-674b38fa533f</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Where do you see that the&amp;nbsp;&lt;span&gt;CONFIG_APP_WIPE_STORAGE config is not supported in NCS v1.6.1? It seems to be included as an optional configuration in the&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/subsys/fs/littlefs/README.html?highlight=littlefs"&gt; littlefs sample project&lt;/a&gt;&amp;nbsp;for instance. lfs_dir_compact is not in line 1051 of lfs.c on my end. Can you show me the exact error and return code you&amp;#39;re getting?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/329707?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2021 05:35:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97901b88-010b-4e0c-96ae-792b25e38c4a</guid><dc:creator>CktDesigner</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Thanks...&amp;nbsp; &amp;nbsp;I commented out the &amp;quot;automount&amp;quot;, so the messages shown in the screen capture simply move from before boot to after boot (when I then have to manually mount the file system).&lt;/p&gt;
&lt;p&gt;In reading through the code (and looking through lots of posts), it appears that the problem occurs because the Flash is new (hasn&amp;#39;t been written).&amp;nbsp; &amp;nbsp; It seems that the LittleFS attempts to format the Flash but fails.&amp;nbsp; &amp;nbsp; I saw a post that recommended using &amp;quot;CONFIG_APP_WIPE_STORAGE=y&amp;quot; in the prj.conf file, but that doesn&amp;#39;t seem to be supported in the version I&amp;#39;m using (NCS 1.6.1).&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;More tracing seems to show that a call to &amp;quot;lfs_dir_compact&amp;quot; (during format? on line 1051 of lfs.c) returns -5 (fffffffb).&amp;nbsp; &amp;nbsp; &amp;nbsp;Haven&amp;#39;t figured out why yet...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/328986?ContentTypeID=1</link><pubDate>Fri, 10 Sep 2021 10:17:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34db02e1-b326-493f-9283-518135c1bcb4</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;This could to relate to an issue with the automount flag in the .overlay file of NCS. Can you try commenting out the automount flag in the &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/master/samples/subsys/fs/littlefs/boards/nrf52840dk_nrf52840.overlay#L16"&gt;.overlay file&lt;/a&gt; to see if the mount error resolves. This is an issue internally that we&amp;#39;re currently looking at and the fix will likely be added to a future release of NCS.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/328687?ContentTypeID=1</link><pubDate>Thu, 09 Sep 2021 03:21:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:933f2e77-e811-41ef-ae2a-eda4b3db2efb</guid><dc:creator>CktDesigner</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;To be truthful, I&amp;#39;m not sure right now what parameter(s) I need to change.&amp;nbsp; &amp;nbsp;I&amp;#39;m transitioning from using the nRF52840-DK for development/evaluation to my custom board for production and trying to get the file system to function using a slightly different Flash device.&amp;nbsp; The attached image shows the errors I&amp;#39;m seeing (minus the mismatch JEDEC-ID which was easy to fix).&amp;nbsp; &amp;nbsp;Since the errors occur prior to the call to &amp;quot;main()&amp;quot;, I assumed that some parameter set in the device-tree must be the culprit, but then couldn&amp;#39;t find documentation/definitions for the variables set there.&amp;nbsp; The call you referenced would be executed in main (at the earliest), after the error occurs (without editing code that probably shouldn&amp;#39;t be changed).&amp;nbsp; &amp;nbsp; Zephyr must be attempting to initialize the file system and failing.&amp;nbsp; &amp;nbsp;The Flash interface must be &amp;quot;basically&amp;quot; working since it reads the JEDEC-ID (and the error is not thrown once the correct value was put into the overlay file).&amp;nbsp; &amp;nbsp;So I&amp;#39;m looking for documentation so I can try to figure out what is happening (without having to read through a lot of Zephyr boot code).&amp;nbsp; &amp;nbsp; &amp;nbsp;Any pointers would be appreciated!!&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/FileSystemError.JPG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Flash parameters in overlay file</title><link>https://devzone.nordicsemi.com/thread/328301?ContentTypeID=1</link><pubDate>Tue, 07 Sep 2021 06:52:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11435350-09f9-4881-a476-9c137e59d5a5</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;What flash parameters specifically are you looking to modify? The block size and erase value are set in the qspi_flash_parameters() function in nrf_qspi_nor.c for instance, and all flash parameters can be found in flash.h in \zephyr\include\drivers\flash.h&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>