<?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>nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87055/nr52832-nrf-connect-1-8-0-external-flash</link><description>Hello Team, 
 
 We are interfacing nRF52832 with an external flash for data storage. Could you please point to the right document/link/code reference on how to interface external flash (on SPI) with nRF52832 on nRF Connect SDK 1.8.0? 
 
 Thanks!</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 May 2022 18:40:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87055/nr52832-nrf-connect-1-8-0-external-flash" /><item><title>RE: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/367250?ContentTypeID=1</link><pubDate>Tue, 10 May 2022 18:40:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60a4b12f-5043-40ca-bcdc-da6e11754716</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;Thanks, Hakon. I&amp;#39;ll check this option.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Really appreciate your support..!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/367186?ContentTypeID=1</link><pubDate>Tue, 10 May 2022 12:57:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43ca209b-2cfa-4457-b022-0edd2dba686b</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;Great to hear that you found the root-cause of the issue!&lt;/p&gt;
[quote user="harshal034"]Can there be a cleaner way the this? Or we can use this workaround?[/quote]
&lt;p&gt;You could make your own board file, add a board.c file, similar to this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1-1/boards/arm/thingy52_nrf52832/CMakeLists.txt#L5"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1-1/boards/arm/thingy52_nrf52832/CMakeLists.txt#L5&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/arm/thingy52_nrf52832/board.c"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/arm/thingy52_nrf52832/board.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;where you add a 5 ms delay in case SPI_NOR is selected, and also add a check if the&amp;nbsp;init priority is lower than the&amp;nbsp;spi_nor library.&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/367034?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 22:07:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd4d1973-4a47-4ab1-9265-07969b27027b</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the response. I added 6 ms delay in the code before reading the JEDEC ID.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1652133985854v4.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;With this change, now when I flash the device or power the board, it works (first time as well).&lt;/p&gt;
&lt;p&gt;Can there be a cleaner way the this? Or we can use this workaround?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;TIA!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/366994?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 14:21:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fc59ac7-cc45-4e50-ae5c-bf75b31b7276</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;
[quote user="harshal034"]and also when we connect power to the board for the first time[/quote]
&lt;p&gt;This is interesting. It does sound like a timing issue.&lt;/p&gt;
&lt;p&gt;Could you scope the SPI lines, VDD_NRF and VDD_SPI, to see if the &amp;quot;time delay&amp;nbsp;before write instruction&amp;quot; (tPUW in the flash datasheet) of 5 ms is honored on the very first run?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you are unsure on how to test the above, or do not have such equipment available, you could (only for testing purposes!!) try to add a k_sleep delay before this sequence:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.0-ncs1/drivers/flash/spi_nor.c#L1037-L1055"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.0-ncs1/drivers/flash/spi_nor.c#L1037-L1055&lt;/a&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/366778?ContentTypeID=1</link><pubDate>Fri, 06 May 2022 17:13:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b11cf1c-3255-43af-ab5f-83cc4f7c971e</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried what you suggested and here is the outcome:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Erase and Flash the board using VS Code. ==&amp;gt; Flash chip not detected (E: Device id 00 00 00 does not match config ef 40 14) and device get for Flash failed&lt;/li&gt;
&lt;li&gt;Start the debug using VS Code. ==&amp;gt; Flash chip detected and I am able to get the device binding and do erase oeration on Flash chip.
&lt;ol&gt;
&lt;li&gt;Logs:&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;Reading symbols from c:\Users\ncs\v1.8.0\toolchain\opt\bin\arm-none-eabi-objdump.exe --syms -C -h -w c:\Users\Documents\Work\build\zephyr\zephyr.hex
Reading symbols from c:/users\ncs\v1.8.0\toolchain\opt\bin\arm-none-eabi-nm.exe --defined-only -S -l -C -p c:\Users\Documents\Work\build\zephyr\zephyr.hex
Launching GDB: &amp;quot;c:\\Users\\ncs\\v1.8.0\\toolchain\\opt\\bin\\arm-none-eabi-gdb.exe&amp;quot; -q --interpreter=mi2 &amp;quot;c:\\Users\\Documents\\\Work\\build\\zephyr\\zephyr.hex&amp;quot;
    Set &amp;quot;showDevDebugOutput&amp;quot;: true in your &amp;quot;launch.json&amp;quot; to see verbose GDB transactions here. Helpful to debug issues or report problems
Launching gdb-server: &amp;quot;C:\\Program Files\\SEGGER\\JLink\\JLinkGDBServerCL.exe&amp;quot; -singlerun -nogui -if swd -port 50007 -swoport 50008 -telnetport 50009 -device nRF52832_xxAA -select usb=601005338 -rtos &amp;quot;C:\\Program Files\\SEGGER\\JLink\\GDBServer\\RTOSPlugin_Zephyr.dll&amp;quot;
    Please check TERMINAL tab (gdb-server) for output from C:\Program Files\SEGGER\JLink\JLinkGDBServerCL.exe
Finished reading symbols from nm: Time: 186 ms
Finished reading symbols from objdump: Time: 234 ms
Reading symbols from c:\Users\Documents\Work\build\zephyr\zephyr.hex...
(No debugging symbols found in c:\Users\Documents\Work\build\zephyr\zephyr.hex)
WARNING: Cortex-Debug will deprecate use of GDB version 8 after July 2022. Please upgrade to version 9+
0x0001999e in ?? ()
Program stopped, probably due to a reset and/or halt issued by debugger
add symbol table from file &amp;quot;c:/Users/Documents/Work/build/zephyr/zephyr.elf&amp;quot;
(y or n) [answered Y; input not from terminal]
Reading symbols from c:/Users/Documents/Work/build/zephyr/zephyr.elf...
Resetting target
Resetting target
[New Thread 536881256]
[New Thread 536881008]
[New Thread 536880760]
[New Thread 536881504]
[Switching to Thread 536881256]

Thread 2 hit Temporary breakpoint 1, main () at ../src/main.c:24
24	{

&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Press Reset button on Debug Console. ==&amp;gt; Flash chip detected and I am able to get the device binding and do erase operation on Flash chip.
&lt;ol&gt;
&lt;li&gt;Logs:&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;[New Thread 536878976]
[New Thread 536878728]
[New Thread 536878480]
[New Thread 536880512]

Thread
3 received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 536881008]
?? () at C:/Users/ncs/v1.8.0/zephyr/arch/arm/core/aarch32\cpu_idle.S:107
107		cpsie	i
Resetting target
[Switching to Thread 536881256]

Thread 2 hit Temporary breakpoint 2, main () at ../src/main.c:24
24	{&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So, it seems it doesn&amp;#39;t work when we Flash the board for the first time and also when we connect power to the board for the first time. After that it works always.&lt;/p&gt;
&lt;p&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/366668?ContentTypeID=1</link><pubDate>Fri, 06 May 2022 10:09:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2aea7536-93ac-4228-b8bb-4dcc9c7fcb61</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;
[quote user="harshal034"]2. I tried with Ozone debugger (Run program in debug mode from Ozone) and it detects Flash chip every time. No error message (E: Device id 00 00 00 does not match config ef 40 14). However,&amp;nbsp;I think this behavior is same as pressing Reset button on our board and it works with that too.[/quote]
&lt;p&gt;Resetting and running in vscode should yield the same behavior as with Ozone. This seems strange to me that it only shows itself when you&amp;#39;re using the cortex m debug in vscode, which leads me to think that there&amp;#39;s something in the way that the plugin itself works that is causing the behavior.&lt;/p&gt;
&lt;p&gt;In VScode, when entering debug mode, you should see this appearing:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1651831576531v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If you click this image:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1651831718844v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;It should reset the target and run to main().&lt;/p&gt;
&lt;p&gt;Could you confirm if the readout still fails even after a reset in the debugger?&lt;/p&gt;
&lt;p&gt;Could you also share the debug console output?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="harshal034"]Is there a way we can try initializing the Flash device at the run time? Probably mimic what&amp;#39;s happening during the boot time (using overlay content)?[/quote]
&lt;p&gt;It is not an easy method to change the ordering, as the spi-nor is initialized before main in reached.&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/366545?ContentTypeID=1</link><pubDate>Thu, 05 May 2022 18:05:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c1b804d-32fe-4e4c-9c1f-003a922b70ae</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1. I tried with erase and flash, but it didn&amp;#39;t help.&lt;/p&gt;
&lt;p&gt;2. I tried with Ozone debugger (Run program in debug mode from Ozone) and it detects Flash chip every time. No error message (E: Device id 00 00 00 does not match config ef 40 14). However,&amp;nbsp;I think this behavior is same as pressing Reset button on our board and it works with that too.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Issue is when I connect the power for the first time with the board (same as when I program the board using JTAG). Unless I press the reset button, it doesn&amp;#39;t detect&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I also tried one more thing: reboot the board using sys_reboot(SYS_REBOOT_COLD/WARM) after&amp;nbsp;failing to get the Flash device binding. With this, after cold/warm boot, Flash chip is detected. First cycle after flash fails, but all cycles after sys_reboot are OK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is there a way we can try initializing the Flash device at the run time? Probably mimic what&amp;#39;s happening during the boot time (using overlay content)?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any other suggestions?&lt;/p&gt;
&lt;p&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/366209?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 11:45:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:554603b9-02b7-4389-b723-b3ac8ce4770f</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;
[quote user="harshal034"]The issue is I see this error, whenever I program it using JTAG and JTAG resets the board, it doesn&amp;#39;t detect the SPI. Also, if I disconnect the power of the board and reconnect it, first time, I see the similar issue. After pressing reset button on board, it works.[/quote]
&lt;p&gt;thank you for clarifying!&lt;/p&gt;
&lt;p&gt;Q1: Could you confirm if another debug reset puts the device into a good state? If yes, I think I have an idea on what can have happened here.&lt;/p&gt;
&lt;p&gt;Q2: Could you try to run this command before flashing the device to see if the issue still appears?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog -e&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This will erase the nRF first.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If the device now behaves normal after initial programming, I believe it can be related to a reset before flashing the new program. If your old program is also present in flash, it will boot up for a small period of time and can leave the SPI-NOR flash in a mid-sequence operation before the nRF is re-flashed.&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/366068?ContentTypeID=1</link><pubDate>Tue, 03 May 2022 18:32:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:417d911e-b184-43bc-ba95-7441fbde23d4</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;Thanks for keeping a tab on this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Few points to consider:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I tried with slower speed 1M, and it didn&amp;#39;t help. Our routing is not so long, Flash is right next to the BLE module.&lt;/li&gt;
&lt;li&gt;I&amp;nbsp;checked the datasheet of Flash and I believe the parameters in overlay are correct. Also, it works always when I reset the board using the reset button on the board.&lt;/li&gt;
&lt;li&gt;The issue is I see this error, whenever I program it using JTAG and JTAG resets the board, it doesn&amp;#39;t detect the SPI. Also, if I disconnect the power of the board and reconnect it, first time, I see the similar issue. After pressing reset button on board, it works.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Not sure what&amp;#39;s going on here.&lt;/p&gt;
&lt;p&gt;Is there a way we can init the external lash at run time (not from the overlay)? I may be reiterating but our usecase is to use external flash for OTA purpose.&lt;/p&gt;
&lt;p&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/366003?ContentTypeID=1</link><pubDate>Tue, 03 May 2022 13:24:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fda61f2b-827f-48fb-881a-f6da57628180</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;
[quote user="harshal034"]E: Device id 00 00 00 does not match config ef 40 14[/quote]
&lt;p&gt;This is an actual read out over the SPI bus, where as a part of the initialization of the SPI NOR flash device, the nRF reads out its ID and compares it to the one you&amp;#39;ve set in the .overlay file.&lt;/p&gt;
&lt;p&gt;If this is all zero&amp;#39;s, it means that the nRF is having issues reading your flash device. It can be many reasons why, for instance that the SPI speed is too high, creating issues for the GPIOs themselves to comply with the electrical specifications (ie. too much capacitance on the lines). This is easily testable by reducing the SPI speed.&lt;/p&gt;
&lt;p&gt;Please use a oscilloscope to verify if the toggling of the SPI signal is reaching GND and VDD levels and providing a nice and clean signal.&lt;/p&gt;
&lt;p&gt;As previously mentioned, your current speed is 8 MHz, which is too high if your routing is long. Reducing this to 1 MHz should help that scenario.&lt;/p&gt;
&lt;p&gt;Have you for instance double checked the timing parameters that you provided in the .overlay files with the electrical specifications of the flash itself? Parameters &amp;quot; t-enter-dpd = &amp;lt;3000&amp;gt;;&amp;quot; and &amp;quot;t-exit-dpd = &amp;lt;30000&amp;gt;;&amp;quot; ?&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/365852?ContentTypeID=1</link><pubDate>Mon, 02 May 2022 20:47:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5b2ff97-e39c-43ac-8575-bdd546041d78</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the info.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Using SPIM with &amp;quot;&lt;span&gt;CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58&lt;/span&gt;&lt;span&gt;=y&amp;quot; did compile the code and I don&amp;#39;t see earlier error during boot. However, it definitely&amp;nbsp;fails write transactions with warning:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;W: Transaction aborted since it would trigger nRF52832 PAN 58&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So, as you suggest, we shouldn&amp;#39;t be using SPIM but we will have to stick with the SPI driver.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you have any other suggestions to get rid off below error during boot:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;E: Device id 00 00 00 does not match config ef 40 14&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am still able to communicate with the Flash using SPI APIs, but I do see this error every time I reboot the board now. Please note, we want this to work since we are planning to use External flash for OTA in our next stage of development.&lt;/p&gt;
&lt;p&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/365750?ContentTypeID=1</link><pubDate>Mon, 02 May 2022 12:00:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:928e70ff-26cb-4e6d-80f0-5332c86b0afa</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;My apologies, you are right.&lt;/p&gt;
&lt;p&gt;The issue stems from this erratum on the nRF52832:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev3/ERR/nRF52832/Rev3/latest/anomaly_832_58.html#anomaly_832_58"&gt;https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev3/ERR/nRF52832/Rev3/latest/anomaly_832_58.html#anomaly_832_58&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which can be overridden by setting:&lt;/p&gt;
&lt;p&gt;CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58=y&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However; this can be problematic if you run into the scenario as described in the erratum. You can use NRF_SPIM for testing purposes, to see if the same issue occurs, but I would not recommend using it in cases where you do not know if you&amp;nbsp;can potentially receive only 1 byte over SPI.&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/365645?ContentTypeID=1</link><pubDate>Fri, 29 Apr 2022 21:23:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ac0865b-3a2e-44de-bd41-4e4bf89a402e</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the guidance. However, deleting the build folder didn&amp;#39;t help.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Changing compatible to nrf-spim still gives the linking error:&lt;/p&gt;
&lt;p&gt;ncs\v1.8.0\zephyr\drivers\flash\spi_nor.c:1230: undefined reference to `__device_dts_ord_68&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Current data of prj.conf for SPI:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#for SPI&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SPI&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_FLASH&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SPI_NOR&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE&lt;/span&gt;&lt;span&gt;=4096&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Anything else that I can try?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Thanks!&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/365349?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2022 09:12:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6332a7d-36d8-472a-8483-2a9acc9dab47</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;It should map this to the underlying driver that is used.&lt;/p&gt;
&lt;p&gt;Did you delete the build folder and regenerate the project? It might not be that the build system was able to catch the change in the .overlay file.&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/365024?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 18:08:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7aa72f5-2f62-4ebc-8842-1a0aa5acf2a8</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I think changing to NRF_SPIM should resolve the problem but by changing that I am facing linking error:&lt;/p&gt;
&lt;p&gt;ncs\v1.8.0\zephyr\drivers\flash\spi_nor.c:1230: undefined reference to `__device_dts_ord_68&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I believe I need to change the prj.conf as well for this, but not sure with what. This is what I&amp;#39;ve right now and works for NRF_SPI:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;#for SPI&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SPI&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_FLASH&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SPI_NOR&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE&lt;/span&gt;&lt;span&gt;=4096&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Thanks!&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/364832?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 07:26:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32ca3184-82ad-42b0-9131-dbaeb8015b3d</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;
[quote user="harshal034"]&lt;p&gt;I tried changing the max freq to:&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;spi-max-frequency&lt;/span&gt;&lt;span&gt; = &amp;lt;&lt;/span&gt;&lt;span&gt;10000000&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;This is 10M, meaning that the SPIM will run at 8 MHz, which can be problematic if your routing includes longer traces.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try switching from &amp;quot;NRF_SPI&amp;quot; to &amp;quot;NRF_SPIM&amp;quot; peripheral?&lt;/p&gt;
&lt;p&gt;This is done by changing the &amp;quot;compatible&amp;quot; member in the .overlay:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;compatible = &amp;quot;nordic,nrf-spim&amp;quot;;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;NRF_SPI&amp;quot; is the older non-DMA capable peripheral.&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/364777?ContentTypeID=1</link><pubDate>Mon, 25 Apr 2022 17:25:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db454cb7-0150-44f5-804c-0a4b4eeb18fa</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried changing the max freq to:&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;spi-max-frequency&lt;/span&gt;&lt;span&gt; = &amp;lt;&lt;/span&gt;&lt;span&gt;10000000&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;But it didn&amp;#39;t help. In our next stage of development, we are planning to use this external flash for OTA since our application size is more and we may not be able to fit it in internal flash. I am worried that, if we can&amp;#39;t resolve this issue, it may create problem in OTA.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Is there anything else that I can check?&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Thanks!&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/364611?ContentTypeID=1</link><pubDate>Mon, 25 Apr 2022 07:40:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acc9a4ee-6c13-4da0-bf9f-d3d5f5801425</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;
[quote user="harshal034"]E: Device id 00 00 00 does not match config ef 40 14[/quote]
&lt;p&gt;This means that the nRF isn&amp;#39;t able to successfully communicate with the SPI-flash, as its trying to read its ID.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="harshal034"]&lt;p&gt;&lt;span&gt;I&amp;#39;ve already shared my overlay file with you earlier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tried to look for some related issues on Nordic portal and found similar issue:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/75401/full_modem_update-failed-to-get-flash-device-mx25r64"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/75401/full_modem_update-failed-to-get-flash-device-mx25r64&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/41888/device-id"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/41888/device-id&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/84742/zephyr-spi-nor-device-id-does-not-match/353015#353015"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/84742/zephyr-spi-nor-device-id-does-not-match/353015#353015&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But what I am seeing is little weird&amp;nbsp;since it works after reset but not immediately&amp;nbsp;after flash+reset.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Tried adding &amp;quot;&lt;/span&gt;external_flash_pins_routing&lt;span&gt;&amp;quot; in overlay but it says unknown label.&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Most of these threads are related to other products, like the usage of the external flash on the nRF9160-DK, which requires specific handling to switch in the flash IC. On the nRF52-DK, you should just choose unused GPIOs and it should automatically try to communicate directly with your external device.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try relaxing the max. frequency to 1MHz and see if this has any impact on the reliability?&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/364534?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2022 17:10:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4d0010a-4f07-4270-adfe-c08dfb123fa0</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;HI Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks, adding&amp;nbsp;&lt;span&gt;CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE&lt;/span&gt;&lt;span&gt;=4096 in prj.conf is now giving me the correct PAGE SIZE. Here is how my updated prj.conf looks like for SPI:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SPI=y
CONFIG_FLASH=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But this doesn&amp;#39;t solved my problem of not detecting device for the first time. I just noticed that whenever I flash the chip it prints one extra error:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;E: Device id 00 00 00 does not match config ef 40 14&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and then it fails to detect the device. If I reset the device, using reset device, it works. In VS Code, I am using nrf52dk_nrf52832 for build.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;ve already shared my overlay file with you earlier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tried to look for some related issues on Nordic portal and found similar issue:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/75401/full_modem_update-failed-to-get-flash-device-mx25r64"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/75401/full_modem_update-failed-to-get-flash-device-mx25r64&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/41888/device-id"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/41888/device-id&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/84742/zephyr-spi-nor-device-id-does-not-match/353015#353015"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/84742/zephyr-spi-nor-device-id-does-not-match/353015#353015&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But what I am seeing is little weird&amp;nbsp;since it works after reset but not immediately&amp;nbsp;after flash+reset.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Tried adding &amp;quot;&lt;/span&gt;external_flash_pins_routing&lt;span&gt;&amp;quot; in overlay but it says unknown label.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;external_flash_pins_routing {
	status = &amp;quot;okay&amp;quot;;
};&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Is there anything else that I can try/configure?&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Thanks!&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/364395?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2022 08:21:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:716ecf8b-220a-4ba5-8704-3e0d0b7842a7</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>[quote user="harshal034"]&lt;p&gt;Thank you very much for the reference.&amp;nbsp;It helped and I&amp;#39;ve setup my flash with it. However, I&amp;#39;ve a couple of issues. Could you please guide?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Wrong page size info:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Page size&amp;nbsp;I am getting is: 65536. For&amp;nbsp;&lt;span&gt;W25Q80DV, page size is 256 bytes. Chip size is correct.&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;I believe the erase sector on your flash is 4k aligned?&lt;/p&gt;
&lt;p&gt;Could you try adding this config?&lt;/p&gt;
&lt;p&gt;CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="harshal034"]&lt;p&gt;&lt;strong&gt;2. Fails to get the Device in first attempt.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When I flash the device for the first time using JTAG (I use VS Code so whenever I flash the program it resets the chip), it always fail to get the device.&lt;/p&gt;[/quote]
&lt;p&gt;Since it works after a reset, it indicates that everything else is running as intended, meaning that the physical setup etc is OK.&lt;/p&gt;
&lt;p&gt;Could you try setting the page size to 4k and see if this issue still happens?&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/364320?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 18:26:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d7317ee-7513-41e0-9dc0-ecf848f37679</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you very much for the reference.&amp;nbsp;It helped and I&amp;#39;ve setup my flash with it. However, I&amp;#39;ve a couple of issues. Could you please guide?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Wrong page size info:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Page size&amp;nbsp;I am getting is: 65536. For&amp;nbsp;&lt;span&gt;W25Q80DV, page size is 256 bytes. Chip size is correct.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;W25Q80DV SPI flash testing
==========================
Using W25Q80DV, chip size: 1048576 bytes (page: 65536)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Fails to get the Device in first attempt.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When I flash the device for the first time using JTAG (I use VS Code so whenever I flash the program it resets the chip), it always fail to get the device.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;W25Q80DV SPI flash testing
==========================
SPI flash driver W25Q80DV was not found!&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;However, if I reset my device using reset button it gets the driver and can write/read the chip.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;W25Q80DV SPI flash testing
==========================
Using W25Q80DV, chip size: 1048576 bytes (page: 65536)

Test 1: Flash erase
Flash erase succeeded!

Test 2: Flash write
Attempting to write 4 bytes
Data read matches data written. Good!!&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reference:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Overlayfile&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;pre class="ui-code" data-mode="text"&gt;arduino_spi: &amp;amp;spi2 {
	compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	sck-pin = &amp;lt;27&amp;gt;;
	mosi-pin = &amp;lt;26&amp;gt;;
	miso-pin = &amp;lt;28&amp;gt;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 5 GPIO_ACTIVE_LOW&amp;gt;;

	w25q80dv: w25q80dv@0 {
		compatible = &amp;quot;jedec,spi-nor&amp;quot;;
		label = &amp;quot;W25Q80DV&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		spi-max-frequency = &amp;lt;40000000&amp;gt;;
		//wp-gpios = &amp;lt;&amp;amp;gpio0 8 GPIO_ACTIVE_LOW&amp;gt;;
		//hold-gpios = &amp;lt;&amp;amp;gpio0 10 GPIO_ACTIVE_LOW&amp;gt;;
		size = &amp;lt;0x800000&amp;gt;;
		has-dpd;
		t-enter-dpd = &amp;lt;3000&amp;gt;;
		t-exit-dpd = &amp;lt;30000&amp;gt;;
		jedec-id = [ef 40 14];
	};
};
&lt;/pre&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SPI flash test Code: (ref: samples/drivers/spi_flash)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;pre class="ui-code" data-mode="text"&gt;void spi_test_flash_api(void)
{
#define FLASH_NAME &amp;quot;W25Q80DV&amp;quot;
#define FLASH_TEST_REGION_OFFSET (0xff000)
#define FLASH_SECTOR_SIZE (4096)
#define FLASH_DEVICE DT_LABEL(DT_INST(0, jedec_spi_nor))

        const uint8_t expected[] = {0x55, 0xaa, 0x66, 0x99};
        const size_t len = sizeof(expected);
        uint8_t buf[sizeof(expected)];
        const struct device *flash_dev;
        int rc;
        
        const char *const spiName = &amp;quot;W25Q80DV&amp;quot;;

        printk(&amp;quot;\n&amp;quot; FLASH_NAME &amp;quot; SPI flash testing\n&amp;quot;);

        printk(&amp;quot;==========================\n&amp;quot;);

        flash_dev = device_get_binding(FLASH_NAME);
        if (!flash_dev)
        {
                printk(&amp;quot;SPI flash driver %s was not found!\n&amp;quot;,
                       FLASH_NAME);
                return;
        }

#ifdef CONFIG_FLASH_PAGE_LAYOUT
        struct flash_pages_info pages_info;
        size_t page_count, chip_size;
        page_count = flash_get_page_count(flash_dev);
        (void)flash_get_page_info_by_idx(flash_dev, 0, &amp;amp;pages_info);
        chip_size = page_count * pages_info.size;
        printk(&amp;quot;Using %s, chip size: %u bytes (page: %u)\n&amp;quot;,
               FLASH_NAME, chip_size, pages_info.size);

#endif

        /* Write protection needs to be disabled before each write or
         * erase, since the flash component turns on write protection
         * automatically after completion of write and erase
         * operations.
         */
        printk(&amp;quot;\nTest 1: Flash erase\n&amp;quot;);

        rc = flash_erase(flash_dev, FLASH_TEST_REGION_OFFSET,
                         FLASH_SECTOR_SIZE);
        if (rc != 0)
        {
                printk(&amp;quot;Flash erase failed! %d\n&amp;quot;, rc);
        }
        else
        {
                printk(&amp;quot;Flash erase succeeded!\n&amp;quot;);
        }


        printk(&amp;quot;\nTest 2: Flash write\n&amp;quot;);
        printk(&amp;quot;Attempting to write %zu bytes\n&amp;quot;, len);
        rc = flash_write(flash_dev, FLASH_TEST_REGION_OFFSET, expected, len);
        if (rc != 0)
        {
                printk(&amp;quot;Flash write failed! %d\n&amp;quot;, rc);
                return;
        }

        memset(buf, 0, len);
        rc = flash_read(flash_dev, FLASH_TEST_REGION_OFFSET, buf, len);
        if (rc != 0)
        {
                printk(&amp;quot;Flash read failed! %d\n&amp;quot;, rc);
                return;
        }

        if (memcmp(expected, buf, len) == 0)
        {
                printk(&amp;quot;Data read matches data written. Good!!\n&amp;quot;);
        }
        else
        {
                const uint8_t *wp = expected;
                const uint8_t *rp = buf;
                const uint8_t *rpe = rp + len;

                printk(&amp;quot;Data read does not match data written!!\n&amp;quot;);
                while (rp &amp;lt; rpe)
                {
                        printk(&amp;quot;%08x wrote %02x read %02x %s\n&amp;quot;,
                               (uint32_t)(FLASH_TEST_REGION_OFFSET + (rp - buf)),
                               *wp, *rp, (*rp == *wp) ? &amp;quot;match&amp;quot; : &amp;quot;MISMATCH&amp;quot;);
                        ++rp;
                        ++wp;
                }
        }
}
&lt;/pre&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/363765?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 07:26:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e116fbe-afd9-4c96-a885-d14bb5303807</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;Yes, you should if configured correctly.&lt;/p&gt;
&lt;p&gt;I was able to find a smaller variant of this flash here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1-1/boards/arm/sparkfun_thing_plus_nrf9160/sparkfun_thing_plus_nrf9160_common.dts#L135-L155"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1-1/boards/arm/sparkfun_thing_plus_nrf9160/sparkfun_thing_plus_nrf9160_common.dts#L135-L155&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You&amp;#39;ll have to adjust the naming, size, and &amp;quot;jedec-id&amp;quot; to match yours.&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/363689?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2022 16:46:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a5ec1ff-9b8f-40e2-9b96-0ff3aae3118a</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;Thanks, Hakon.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I just tested our Winbond Flash (W25Q80DV) over SPI with basic read and write using SPI APIs. As I check the datasheet, W25Q80DV supports the JEDEC, does that mean we should be able to use the flash APIs if we configure overlay and conf files as you suggested?&lt;/p&gt;
&lt;p&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: nr52832 + nRF Connect 1.8.0 + External Flash</title><link>https://devzone.nordicsemi.com/thread/363637?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2022 13:49:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4e73b6e-5d5c-40be-a860-a36a7be61fa3</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;You can try with the zephyr/samples/drivers/spi_flash for instance.&lt;/p&gt;
&lt;p&gt;You will need to add a $my_board.conf file and a $my_board.overlay file. I&amp;#39;m assuming that you&amp;#39;re using the nRF52-DK as a basis here.&lt;/p&gt;
&lt;p&gt;The nrf52dk_nrf52832.conf should hold:&lt;/p&gt;
&lt;p&gt;CONFIG_SPI_NOR=y&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And the .overlay should hold your spi configuration and the spi-nor device that you have.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s an example on how the nRF9160-DK has setup a SPI-NOR flash overlay:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1-1/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common_0_14_0.dtsi#L42-L65"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1-1/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common_0_14_0.dtsi#L42-L65&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Pin numbering, device name, and spi instance will differ from your wanted setting.&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></channel></rss>