<?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>How to Interface W25Q32 External Flash with nRF21540DK/nRF52840 in nRF Connect SDK 2.9.0?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119873/how-to-interface-w25q32-external-flash-with-nrf21540dk-nrf52840-in-nrf-connect-sdk-2-9-0</link><description>I am using nRF Connect SDK 2.9.0 with Toolchain 2.9.0 and trying to interface Winbond W25Q32 SPI flash memory with nRF21540DK (nRF52840) . I need help with the following: 
 
 Device Tree Overlay – Proper setup for enabling W25Q32 in Zephyr. 
 Driver Support</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 31 Mar 2025 12:29:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119873/how-to-interface-w25q32-external-flash-with-nrf21540dk-nrf52840-in-nrf-connect-sdk-2-9-0" /><item><title>RE: How to Interface W25Q32 External Flash with nRF21540DK/nRF52840 in nRF Connect SDK 2.9.0?</title><link>https://devzone.nordicsemi.com/thread/529795?ContentTypeID=1</link><pubDate>Mon, 31 Mar 2025 12:29:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81e3fcad-e277-4e16-abf5-c298dee0d07c</guid><dc:creator>AMarch01</dc:creator><description>&lt;p&gt;I suggest you open a new question on this alone.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Interface W25Q32 External Flash with nRF21540DK/nRF52840 in nRF Connect SDK 2.9.0?</title><link>https://devzone.nordicsemi.com/thread/529688?ContentTypeID=1</link><pubDate>Mon, 31 Mar 2025 07:13:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc67f06b-40b0-45ff-b82b-5342b6b6382e</guid><dc:creator>Dalvadi Anil</dc:creator><description>&lt;div class="content full threaded-reply-content user-defined-markup" data-replyid="528217" data-userid="138155" data-permalink="~/f/nordic-q-a/119873/how-to-interface-w25q32-external-flash-with-nrf21540dk-nrf52840-in-nrf-connect-sdk-2-9-0/528217"&gt;
&lt;div class="content"&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/amarch01"&gt;AMarch01&lt;/a&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/kme"&gt;Kenneth&lt;/a&gt;&amp;nbsp;&lt;br /&gt;I am able to read and write to external flash using NVS. However, when I enable&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code data-start="80" data-end="129"&gt;SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y&lt;/code&gt;, the device does not start. If I use simple DFU, it works fine.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class="content full threaded-reply-content user-defined-markup" data-replyid="529441" data-userid="138155" data-permalink="~/f/nordic-q-a/119873/how-to-interface-w25q32-external-flash-with-nrf21540dk-nrf52840-in-nrf-connect-sdk-2-9-0/529441"&gt;
&lt;div class="content"&gt;
&lt;p class="" data-start="198" data-end="225"&gt;Best regards,&lt;br data-start="211" data-end="214" /&gt;Anil Dalvadi&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Interface W25Q32 External Flash with nRF21540DK/nRF52840 in nRF Connect SDK 2.9.0?</title><link>https://devzone.nordicsemi.com/thread/529520?ContentTypeID=1</link><pubDate>Fri, 28 Mar 2025 13:06:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24250ddd-e348-4401-815a-47e56d5de828</guid><dc:creator>AMarch01</dc:creator><description>&lt;p&gt;I kind of bailed when you went from a standard Nordic product (nrf21540) and immediately started saying you were testing with the Adafruit Feather. Have you reached out to Adafruit resources on how to work with their parts?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Did you attempt a simple check of accessing the spi device directly?&lt;br /&gt;\v2.9.0\zephyr\samples\drivers\spi_flash\ might help with testing the general setup, before committing to more complex things like booting from it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Interface W25Q32 External Flash with nRF21540DK/nRF52840 in nRF Connect SDK 2.9.0?</title><link>https://devzone.nordicsemi.com/thread/529441?ContentTypeID=1</link><pubDate>Fri, 28 Mar 2025 07:15:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29035257-0cee-4770-bd9a-121acef5ad3f</guid><dc:creator>Dalvadi Anil</dc:creator><description>&lt;p class="" data-start="36" data-end="168"&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/amarch01"&gt;AMarch01&lt;/a&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/kme"&gt;Kenneth&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I hope you&amp;#39;re both doing well. If you have any suggestions or advice on this, I would really appreciate it. Please let me know if there&amp;#39;s anything you recommend.&lt;/p&gt;
&lt;p class="" data-start="170" data-end="196"&gt;Thank you for your time!&lt;/p&gt;
&lt;p class="" data-start="198" data-end="225"&gt;Best regards,&lt;br data-start="211" data-end="214" /&gt;Anil Dalvadi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Interface W25Q32 External Flash with nRF21540DK/nRF52840 in nRF Connect SDK 2.9.0?</title><link>https://devzone.nordicsemi.com/thread/528493?ContentTypeID=1</link><pubDate>Sat, 22 Mar 2025 09:35:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0982777-6044-4f1e-9f65-bdd02a7d0050</guid><dc:creator>Dalvadi Anil</dc:creator><description>&lt;p class="" data-start="0" data-end="239"&gt;NVS is working properly in external flash, but when I add &lt;code data-start="58" data-end="107"&gt;SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y&lt;/code&gt; (which is for the MCUboot secondary slot in external flash), nothing works. The project does not start, and no logs are received.&lt;/p&gt;
&lt;p class="" data-start="241" data-end="505"&gt;I used the following example:&lt;/p&gt;
&lt;p class="" data-start="241" data-end="505"&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/118825/fota-over-ble-using-external-flash-nrf-connect-sdk-2-9-0---upload-to-device-stuck/522530"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/118825/fota-over-ble-using-external-flash-nrf-connect-sdk-2-9-0---upload-to-device-stuck/522530&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8054.peripheral_5F00_lbs_5F00_fota_5F00_spi.zip"&gt;devzone.nordicsemi.com/.../8054.peripheral_5F00_lbs_5F00_fota_5F00_spi.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;I am using the &lt;strong data-start="565" data-end="600"&gt;Adafruit Feather nRF52840 Sense&lt;/strong&gt; board along with the&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf21540dk_5F00_nrf52840.overlay"&gt;devzone.nordicsemi.com/.../nrf21540dk_5F00_nrf52840.overlay&lt;/a&gt;&lt;br data-start="657" data-end="660" /&gt; For external flash, I am using the &lt;strong data-start="695" data-end="705"&gt;W25Q32&lt;/strong&gt; module :&lt;a href="https://robu.in/product/w25q32-large-capacity-flash-storage-module/"&gt;https://robu.in/product/w25q32-large-capacity-flash-storage-module/&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Interface W25Q32 External Flash with nRF21540DK/nRF52840 in nRF Connect SDK 2.9.0?</title><link>https://devzone.nordicsemi.com/thread/528217?ContentTypeID=1</link><pubDate>Thu, 20 Mar 2025 12:43:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74784bac-9efe-4d4e-a88b-6a79d9602d90</guid><dc:creator>Dalvadi Anil</dc:creator><description>&lt;p&gt;I am able to read and write to external flash using NVS. However, when I enable &lt;code data-start="80" data-end="129"&gt;SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y&lt;/code&gt;, the device does not start. If I use simple DFU, it works fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Interface W25Q32 External Flash with nRF21540DK/nRF52840 in nRF Connect SDK 2.9.0?</title><link>https://devzone.nordicsemi.com/thread/528211?ContentTypeID=1</link><pubDate>Thu, 20 Mar 2025 12:26:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f5a717f-80b1-41bd-812b-9a5bf7c826e9</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Sorry, but I don&amp;#39;t see a better step forward other than start connecting a logic analyzer for debugging.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Interface W25Q32 External Flash with nRF21540DK/nRF52840 in nRF Connect SDK 2.9.0?</title><link>https://devzone.nordicsemi.com/thread/528134?ContentTypeID=1</link><pubDate>Thu, 20 Mar 2025 06:57:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3373f85-b5be-48e1-b3c5-63d5f495126f</guid><dc:creator>Dalvadi Anil</dc:creator><description>&lt;p&gt;I also checked using the Adafruit Feather nRF52840 Sense board in Arduino, and it is working fine. So, it is confirmed that there is no hardware issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Interface W25Q32 External Flash with nRF21540DK/nRF52840 in nRF Connect SDK 2.9.0?</title><link>https://devzone.nordicsemi.com/thread/527935?ContentTypeID=1</link><pubDate>Wed, 19 Mar 2025 06:06:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04e07468-5fc5-483c-83bd-4cb5e8b44056</guid><dc:creator>Dalvadi Anil</dc:creator><description>&lt;p&gt;I am checking with the ESP32 module, and it works correctly. I believe the module is working, and there are no hardware issues.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Interface W25Q32 External Flash with nRF21540DK/nRF52840 in nRF Connect SDK 2.9.0?</title><link>https://devzone.nordicsemi.com/thread/527814?ContentTypeID=1</link><pubDate>Tue, 18 Mar 2025 11:06:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d70d6ab7-2ddf-4cee-9912-300e3e86fc16</guid><dc:creator>Kenneth</dc:creator><description>[quote user="Dalvadi Anil"]E: Device id 00 00 00 does not match config ef 40 16 &lt;br /&gt;Flash device w25q32jv@0 is not ready[/quote]
&lt;p&gt;Normally means some electrical problem, try to connect a logic analyzer to the spi pins and check if the chip select, clock and mosi transfers as expected, then check if there is any data on miso. Maybe check that the external flash have same power supply level, and common ground with the DK.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Interface W25Q32 External Flash with nRF21540DK/nRF52840 in nRF Connect SDK 2.9.0?</title><link>https://devzone.nordicsemi.com/thread/527803?ContentTypeID=1</link><pubDate>Tue, 18 Mar 2025 10:27:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ff622c6-f066-48d1-b46b-28ca120a60a9</guid><dc:creator>Dalvadi Anil</dc:creator><description>&lt;p&gt;I am using the &lt;strong data-start="168" data-end="203"&gt;Adafruit Feather nRF52840 Sense&lt;/strong&gt; board with an &lt;strong data-start="218" data-end="263"&gt;external SPI NOR flash (Winbond W25Q32JV)&lt;/strong&gt; in &lt;strong data-start="267" data-end="292"&gt;nRF Connect SDK 2.9.0&lt;/strong&gt;. However, the flash is not being recognized, and I get the following error:&lt;br /&gt;&lt;br /&gt;E: Device id 00 00 00 does not match config ef 40 16 &lt;br /&gt;Flash device w25q32jv@0 is not ready &lt;br /&gt;&lt;br /&gt;Here is my &lt;strong data-start="486" data-end="502"&gt;overlay file:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt; &amp;amp;spi1 {
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 8 GPIO_ACTIVE_LOW&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;spi1_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi1_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	w25q32jv: w25q32jv@0 {
		compatible = &amp;quot;jedec,spi-nor&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		spi-max-frequency = &amp;lt;40000000&amp;gt;;
		size = &amp;lt;0x2000000&amp;gt;;
		has-dpd;
		t-enter-dpd = &amp;lt;3000&amp;gt;;
		t-exit-dpd = &amp;lt;30000&amp;gt;;
		jedec-id = [ ef 40 16 ];
	};
};  
/ {
    chosen {
        nordic,pm-ext-flash = &amp;amp;w25q32jv;
    };
};&lt;/pre&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong data-start="486" data-end="502"&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong data-start="486" data-end="502"&gt;&lt;span&gt;Here is my prj.conf&lt;/span&gt;&amp;nbsp;file:&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong data-start="486" data-end="502"&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NCS_SAMPLES_DEFAULTS=y
CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_ASYNC_API=y
CONFIG_LOG_BACKEND_UART=y
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME=&amp;quot;Nordic_LBS&amp;quot;

# Enable the LBS service
CONFIG_BT_LBS=y
CONFIG_BT_LBS_POLL_BUTTON=y
CONFIG_DK_LIBRARY=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

CONFIG_GPIO=y
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
CONFIG_NORDIC_QSPI_NOR=n  # Explicitly disable QSPI if using SPI
CONFIG_SPI_NOR_SFDP_MINIMAL=y
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
CONFIG_PM_PARTITION_REGION_NVS_STORAGE_EXTERNAL=y
CONFIG_PM_PARTITION_SIZE_NVS_STORAGE=0x8000
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
&lt;/pre&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong data-start="486" data-end="502"&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What could be causing this issue, and how can I fix it? Any suggestions would be appreciated!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Interface W25Q32 External Flash with nRF21540DK/nRF52840 in nRF Connect SDK 2.9.0?</title><link>https://devzone.nordicsemi.com/thread/527693?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2025 15:00:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d74ed3e9-a15a-4c6a-be67-3efb86d200c8</guid><dc:creator>AMarch01</dc:creator><description>&lt;p&gt;Also, the core .dtsi file that is included into the nrf52840 device tree is stored here&amp;nbsp;\zephyr\dts\arm\nordic\nrf52840.dtsi .&lt;br /&gt;This shows the base of spi1 which I think you will need to connect to for flash.&lt;br /&gt;&lt;br /&gt;For an example of how to add the flash to the device tree (but to a different spi since it&amp;#39;s a different board, sorry I couldn&amp;#39;t find one specific to the nrf21540/nrf52840)&amp;nbsp; zephyr\boards\sparkfun\thing_plus\sparkfun_thing_plus_nrf9160_common.dtsi . This shows a w25q32 attached to a spi3. You need to create an overlay for the nrf21540 and copy this into spi1.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t had to use an external flash, but this looks like some pieces to start from.&lt;br /&gt;&lt;br /&gt;I am assuming you understand the device tree layout system.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Also, IF&amp;nbsp;you haven&amp;#39;t run through them, I suggest you go through the Nordic courses on how to use their tools.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Interface W25Q32 External Flash with nRF21540DK/nRF52840 in nRF Connect SDK 2.9.0?</title><link>https://devzone.nordicsemi.com/thread/527677?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2025 14:21:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0670f8d-d605-44a9-81a7-08fc1f196c42</guid><dc:creator>AMarch01</dc:creator><description>&lt;p&gt;I assume you are connecting some external flash chip to the nrf21540DK since it didn&amp;#39;t include a flash chip. The&amp;nbsp;v2.9.0\zephyr\samples\drivers\spi_flash example might be a good starting point. Though it specifically targets the nrf52840DK. The only issue for you would be that the nrf52840 will be using a quad spi part.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>