<?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>NRF52840DK SPI Flash (w25q64) Device showing not ready</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126060/nrf52840dk-spi-flash-w25q64-device-showing-not-ready</link><description>Hi there! I am trying to set up external flash (w25q64) with my NRF52840 project over SPI. I have adapted the spi_flash sample in an attempt to set up this device, but I am having some issues that I think are related to the device tree. I can’t get the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Dec 2025 03:49:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126060/nrf52840dk-spi-flash-w25q64-device-showing-not-ready" /><item><title>RE: NRF52840DK SPI Flash (w25q64) Device showing not ready</title><link>https://devzone.nordicsemi.com/thread/557149?ContentTypeID=1</link><pubDate>Wed, 17 Dec 2025 03:49:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a797e0ec-b9c1-4444-a533-9f170c76de31</guid><dc:creator>bpolito8</dc:creator><description>&lt;p&gt;Hi there,&lt;br /&gt;&lt;br /&gt;First, thank you so much for all the help so far!&lt;br /&gt;&lt;br /&gt;I&amp;rsquo;ve done a ton of testing in the last few days and identified a few issues with my setup.&lt;br /&gt;&lt;br /&gt;First, I had the wrong DK selected as the build target in the build configuration. I had selected one of the other NRF52840 dk&amp;rsquo;s (nrf21540dk_nrf52840 I think), but not the NRF52840DK_NRF52840 configuration I should have been using.&lt;br /&gt;&lt;br /&gt;Second, some of the jumper cables that I am using appear to be faulty. I&amp;rsquo;ve swapped them out and the read/erase/write tests from spi_flash sample are now working!&lt;br /&gt;&lt;br /&gt;That being said, I believe I am at a similar starting point to the ticket you linked, where the flash operations work but the device still does not show ready. I&amp;rsquo;ve tried adding a 1 second delay (longer than necessary I imagine) to the beginning of main.c so the flash has time to power up before checking device_is_ready, but this did not work. I see the user&amp;rsquo;s solution was to &amp;ldquo;add a snippet to turn on the voltage before the jedec ID is checked,&amp;rdquo; but I&amp;rsquo;m unsure how to do that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840DK SPI Flash (w25q64) Device showing not ready</title><link>https://devzone.nordicsemi.com/thread/557137?ContentTypeID=1</link><pubDate>Tue, 16 Dec 2025 18:36:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:234fbfdd-958a-4cad-8dd5-0f54a449ba57</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Could you check if &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/107255/problems-with-spi-nor-flash/463902"&gt;this post&lt;/a&gt; can help or not?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840DK SPI Flash (w25q64) Device showing not ready</title><link>https://devzone.nordicsemi.com/thread/557010?ContentTypeID=1</link><pubDate>Mon, 15 Dec 2025 17:16:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:733344c5-6279-44f8-be7e-ea76efc354c9</guid><dc:creator>bpolito8</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes I edited the overlay for w25q64 based on the example. Here is that overlay after the change:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2022-2023 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: Apache-2.0
 */

// /delete-node/ &amp;amp;mx25r64;

&amp;amp;qspi {
	status = &amp;quot;disabled&amp;quot;;
};

/* The mx25, on nrf52840dk_nrf52840, uses pins for spi0, spi1, spi2 and spi3
 * to provide quad-spi feature. In individual specifications each of the spi
 * notes define own clock source (SCK), but spi2 shares the same clock source
 * as qspi configuration, which is pin (0,19). That is why spi2 is used here
 * to communicate with mx25, when qspi is not used, to avoid rerouting clock
 * pin.
 */
&amp;amp;spi2 {
	compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 17 GPIO_ACTIVE_LOW&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;spi2_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi2_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	w25q64_spi: spi-nor-flash@0 {
		compatible = &amp;quot;jedec,spi-nor&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		spi-max-frequency = &amp;lt;24000000&amp;gt;;
		size = &amp;lt;DT_SIZE_M(64)&amp;gt;; /* 64 Mbits */
		status = &amp;quot;okay&amp;quot;;
		jedec-id = [ef 40 17];
		has-dpd;
		t-enter-dpd = &amp;lt;3500&amp;gt;;
		t-exit-dpd = &amp;lt;3500&amp;gt;;
	};
};
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The only other edits to the sample are adding the nrf52840dk_nrf52840_spi.conf file and editing main.c to point to the updated&amp;nbsp;w25q64_spi device from the overlay.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# nrf52840dk_nrf52840_spi.conf
CONFIG_SPI=y
CONFIG_SPI_NOR=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2025_2D00_12_2D00_15-at-10.04.18_2F20_AM.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;I am still using the same wiring for spi2 as described above. I tried swapping the MOSI/MISO pins too, with no luck.&lt;br /&gt;&lt;br /&gt; I have also tried a different (identical) w25q64 module, and have tested one of the modules with a Arduino and simple sketch successfully.&lt;br /&gt;&lt;br /&gt;Unfortunately I am still seeing `spi-nor-flash@0: device not ready.` with the spi_flash sample and these changes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840DK SPI Flash (w25q64) Device showing not ready</title><link>https://devzone.nordicsemi.com/thread/557001?ContentTypeID=1</link><pubDate>Mon, 15 Dec 2025 15:20:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96870042-b948-42b6-b959-077f2d9e2887</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Got it.&lt;/p&gt;
[quote user="Amanda"]You can refer to&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/ncs-v3.1.1/samples/drivers/spi_flash/boards/blackpill_f411ce.overlay#L21-L30"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/ncs-v3.1.1/samples/drivers/spi_flash/boards/blackpill_f411ce.overlay#L21-L30&lt;/a&gt;&amp;nbsp;for the&amp;nbsp;&lt;span&gt;w25q64.&amp;nbsp;&lt;/span&gt;[/quote]
&lt;p&gt;Do you update the overlay for &lt;span&gt;the&amp;nbsp;&lt;/span&gt;&lt;span&gt;w25q64&lt;/span&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840DK SPI Flash (w25q64) Device showing not ready</title><link>https://devzone.nordicsemi.com/thread/556810?ContentTypeID=1</link><pubDate>Fri, 12 Dec 2025 00:20:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:432bbf32-c758-4be0-80b8-9ab9704d996c</guid><dc:creator>bpolito8</dc:creator><description>&lt;p&gt;Apologies for making things unnecessarily confusing, as mentioned in that quoted section I renamed the device in the overlay to `spi_flash0` in the spi_flash sample. In both samples I&amp;#39;ve made sure the&amp;nbsp;DEVICE_DT_GET(DT_NODELABEL()) call matches the name of the device from the overlay, as they will not build if there is a mismatch.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840DK SPI Flash (w25q64) Device showing not ready</title><link>https://devzone.nordicsemi.com/thread/556805?ContentTypeID=1</link><pubDate>Thu, 11 Dec 2025 21:13:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:508924ce-9a88-4d94-bdaf-9f02d31b8cfc</guid><dc:creator>Amanda Hsieh</dc:creator><description>[quote user="bpolito8"]In spi_flash I also named the device `spi_flash0` commented out the `/delete-node/ &amp;amp;mx25r64;` line from the overlay, and used DT_NODELABEL instead of&amp;nbsp;DT_ALIAS when getting the device from devicetree in main.c. [/quote]
&lt;p&gt;If you use &lt;span&gt;DT_NODELABEL&amp;nbsp;,&amp;nbsp;&lt;/span&gt;the code should be like this&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;const struct device *flash_dev = DEVICE_DT_GET(DT_NODELABEL(mx25r64)); // if you don&amp;#39;t rename for mx25q64&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You can refer to&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/ncs-v3.1.1/samples/drivers/spi_flash/boards/blackpill_f411ce.overlay#L21-L30"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/ncs-v3.1.1/samples/drivers/spi_flash/boards/blackpill_f411ce.overlay#L21-L30&lt;/a&gt;&amp;nbsp;for the&amp;nbsp;&lt;span&gt;w25q64.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840DK SPI Flash (w25q64) Device showing not ready</title><link>https://devzone.nordicsemi.com/thread/556750?ContentTypeID=1</link><pubDate>Thu, 11 Dec 2025 02:59:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64d6cd75-06e7-4bed-a5f1-41e5ba89afad</guid><dc:creator>bpolito8</dc:creator><description>&lt;p&gt;Hi, thank you for the response!&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve tried this overlay with both the jesd16 and spi_flash samples, no luck with either. In both cases I edited the overlay slightly to have the matching jedec-id and size as the w25q64 flash. I&amp;#39;ve also made sure to include this overlay and the relevant .conf file in the build configurations for both projects. I made no changes to main.c in the jesd16 sample.&lt;/p&gt;
&lt;p&gt;In spi_flash I also named the device `spi_flash0` commented out the `/delete-node/ &amp;amp;mx25r64;` line from the overlay, and used DT_NODELABEL instead of&amp;nbsp;DT_ALIAS when getting the device from devicetree in main.c. I&amp;#39;ve also moved the flash pins to match the pins for spi2.&lt;/p&gt;
&lt;p&gt;jesd216 overlay:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2025_2D00_12_2D00_10-at-7.38.12_2F20_PM.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;main.c for spi_flash:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2025_2D00_12_2D00_10-at-7.38.33_2F20_PM.png" alt=" " /&gt;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Module Pin&lt;/td&gt;
&lt;td&gt;DK Pin&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VCC&lt;/td&gt;
&lt;td&gt;VCC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GND&lt;/td&gt;
&lt;td&gt;GND&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CS&lt;/td&gt;
&lt;td&gt;P0.17&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MOSI/DI&lt;/td&gt;
&lt;td&gt;P0.20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MISO/DO&lt;/td&gt;
&lt;td&gt;P0.21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SCLK&lt;/td&gt;
&lt;td&gt;P0.19&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;spi_flash output:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2025_2D00_12_2D00_10-at-7.41.54_2F20_PM.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;jesd216 output:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2025_2D00_12_2D00_10-at-7.49.45_2F20_PM.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Is there anything else I could be missing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840DK SPI Flash (w25q64) Device showing not ready</title><link>https://devzone.nordicsemi.com/thread/556709?ContentTypeID=1</link><pubDate>Wed, 10 Dec 2025 15:01:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bda8b4c8-3021-4b88-82fb-b039b713870c</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You&amp;nbsp;can&amp;nbsp;refer to&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/samples/drivers/jesd216/boards/nrf52840dk_nrf52840_spi.overlay"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/samples/drivers/jesd216/boards/nrf52840dk_nrf52840_spi.overlay&lt;/a&gt;&amp;nbsp;for the overlay to test with the unmodified&amp;nbsp;&lt;span&gt;the spi_flash sample.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>