<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97163/ncs-dfu-supported-external-flash-devices</link><description>OS: Windows 
 NCS: 2.2.0 
 We have discovered that we do not have enough internal flash space to support BLE DFU and need to add an external flash to our nRF52833-based design. The nRF52840 DK board has an external flash ( MX25R64) and BLE DFU is shown</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 May 2023 13:55:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97163/ncs-dfu-supported-external-flash-devices" /><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/426984?ContentTypeID=1</link><pubDate>Tue, 23 May 2023 13:55:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d74dc0d2-3c47-4324-801c-54f805f39ed1</guid><dc:creator>Bryan</dc:creator><description>&lt;p&gt;The missing items were:&lt;br /&gt;&lt;br /&gt;&lt;span&gt;In child_image/mcuboot/boards/o1-agg-nrf52833.conf&lt;/span&gt;&lt;br /&gt;CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096&lt;br /&gt;CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=32&lt;br /&gt;CONFIG_LOG=y&lt;br /&gt;CONFIG_LOG_MODE_MINIMAL=y&lt;br /&gt;CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y&lt;br /&gt;&lt;br /&gt;In prj.conf&lt;br /&gt;CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096&lt;br /&gt;CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=32&lt;br /&gt;CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y&lt;br /&gt;&lt;br /&gt;Explicitly setting the flash layout page size fixed it.&lt;/p&gt;
&lt;p&gt;PS C:\Virtuix\nordic\myapps\hello_world_dfu_833DK_ext_flash\build&amp;gt; west build -t partition_manager_report&lt;br /&gt;-- west build: running target partition_manager_report&lt;br /&gt;[1/1] cmd.exe /C &amp;quot;cd /D C:\Virtuix\nordic\myapps\hello_world_.../myapps/hello_world_dfu_833DK_ext_flash/build/partitions.yml&amp;quot; external_flash (0x100000 - 1024kB):&lt;br /&gt;+-------------------------------------------+&lt;br /&gt;| 0x0: mcuboot_secondary (0x71000 - 452kB) |&lt;br /&gt;| 0x71000: external_flash (0x8f000 - 572kB) |&lt;br /&gt;+-------------------------------------------+&lt;/p&gt;
&lt;p&gt;flash_primary (0x80000 - 512kB):&lt;br /&gt;+-------------------------------------------------+&lt;br /&gt;| 0x0: mcuboot (0xf000 - 60kB) |&lt;br /&gt;+---0xf000: mcuboot_primary (0x71000 - 452kB)-----+&lt;br /&gt;| 0xf000: mcuboot_pad (0x200 - 512B) |&lt;br /&gt;+---0xf200: mcuboot_primary_app (0x70e00 - 451kB)-+&lt;br /&gt;| 0xf200: app (0x70e00 - 451kB) |&lt;br /&gt;+-------------------------------------------------+&lt;/p&gt;
&lt;p&gt;sram_primary (0x20000 - 128kB):&lt;br /&gt;+--------------------------------------------+&lt;br /&gt;| 0x20000000: sram_primary (0x20000 - 128kB) |&lt;br /&gt;+--------------------------------------------+&lt;/p&gt;
&lt;p&gt;PS C:\Virtuix\nordic\myapps\hello_world_dfu_833DK_ext_flash\build&amp;gt;&lt;br /&gt;&lt;br /&gt;Kenneth - Thanks for all the help!&amp;nbsp; Nordic&amp;#39;s next dev academy should be DFU!&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I have attached the working project.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8551.hello_5F00_world_5F00_dfu_5F00_833DK_5F00_ext_5F00_flash.zip"&gt;devzone.nordicsemi.com/.../8551.hello_5F00_world_5F00_dfu_5F00_833DK_5F00_ext_5F00_flash.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/424890?ContentTypeID=1</link><pubDate>Wed, 10 May 2023 13:32:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ef5a5d4-f6ae-4d53-80b6-7f9c3895b734</guid><dc:creator>Bryan</dc:creator><description>&lt;p&gt;I just read through Hakon&amp;#39;s response to my private case.&amp;nbsp; Now I see what you mean.&amp;nbsp; I will test it and update everyone.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/424869?ContentTypeID=1</link><pubDate>Wed, 10 May 2023 13:04:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dacab747-b27c-49fc-8c28-c80c50072a0c</guid><dc:creator>Bryan</dc:creator><description>&lt;p&gt;Kenneth,&lt;/p&gt;
&lt;p&gt;My private case is for our custom board that has two spi busses, so it is more complex.&amp;nbsp; This one is just to get the basic external flash DFU working.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/424771?ContentTypeID=1</link><pubDate>Wed, 10 May 2023 09:32:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:681f073b-f925-4dad-9648-f6b209bf534e</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I can see you are getting help in a private case. I suggest you continue there, but please share your findings for anyone experiencing the same that find this public case.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/424665?ContentTypeID=1</link><pubDate>Tue, 09 May 2023 19:58:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:809d10b6-ff3f-4e4b-a3b7-ef757a5192f0</guid><dc:creator>Bryan</dc:creator><description>&lt;p&gt;Kenneth,&lt;/p&gt;
&lt;p&gt;Once again I was switched off this and onto something else.&amp;nbsp; I never got to test adding &amp;quot;chosen&amp;quot;.&amp;nbsp; Without &amp;quot;chosen&amp;quot; it is still using internal flash.&lt;br /&gt;&lt;br /&gt;I have upgraded to the latest NCS 2.3.0.&amp;nbsp; I am back to getting this output when it boots.&lt;br /&gt;&lt;br /&gt;*** Booting Zephyr OS build v3.2.99-ncs2 ***&lt;br /&gt;I: Starting bootloader&lt;br /&gt;&lt;strong&gt;W: Cannot upgrade: not a compatible amount of sectors&lt;/strong&gt;&lt;br /&gt;I: Bootloader chainload address offset: 0xf000&lt;br /&gt;*** Booting Zephyr OS build v3.2.99-ncs2 ***&lt;br /&gt;Hello World 1! nrf52833dk_nrf52833&lt;br /&gt;&lt;br /&gt;Since it had been awhile, I reconfirmed that the&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/tests/drivers/flash"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/tests/drivers/flash&lt;/a&gt;&amp;nbsp;test still works.&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;from the file&amp;nbsp;ncs\v2.3.0\bootloader\mcuboot\boot\bootutil\src\swap_move.c&lt;/p&gt;
&lt;p&gt;num_sectors_pri = boot_img_num_sectors(state, BOOT_PRIMARY_SLOT);&lt;br /&gt; num_sectors_sec = boot_img_num_sectors(state, BOOT_SECONDARY_SLOT);&lt;br /&gt; if ((num_sectors_pri != num_sectors_sec) &amp;amp;&amp;amp;&lt;br /&gt; (num_sectors_pri != (num_sectors_sec + 1))) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BOOT_LOG_WRN(&amp;quot;Cannot upgrade: not a compatible amount of sectors&amp;quot;);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return 0;&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;However, if I look at the partition manager report it shows primary and secondary are exactly the same size.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;PS C:\Virtuix\nordic\myapps\hello_world_dfu_833DK_ext_flash\build&amp;gt; west build -t partition_manager_report&lt;br /&gt;-- west build: running target partition_manager_report&lt;br /&gt;[1/1] cmd.exe /C &amp;quot;cd /D C:\Virtuix\nordic\myapps\hello_w...ps/hello_world_dfu_833DK_ext_flash/build/partitions.yml&amp;quot; &lt;br /&gt; external_flash (0x100000 - 1024kB): &lt;br /&gt;+-------------------------------------------+ &lt;br /&gt;| 0x0: &lt;strong&gt;mcuboot_secondary (0x71000 - 452kB)&lt;/strong&gt; | &lt;br /&gt;| 0x71000: external_flash (0x8f000 - 572kB) | &lt;br /&gt;+-------------------------------------------+&lt;/p&gt;
&lt;p&gt;flash_primary (0x80000 - 512kB): &lt;br /&gt;+-------------------------------------------------+&lt;br /&gt;| 0x0: mcuboot (0xf000 - 60kB) |&lt;br /&gt;+---0xf000: &lt;strong&gt;mcuboot_primary (0x71000 - 452kB)&lt;/strong&gt;-----+&lt;br /&gt;| 0xf000: mcuboot_pad (0x200 - 512B) |&lt;br /&gt;+---0xf200: mcuboot_primary_app (0x70e00 - 451kB)-+&lt;br /&gt;| 0xf200: app (0x70e00 - 451kB) |&lt;br /&gt;+-------------------------------------------------+&lt;/p&gt;
&lt;p&gt;sram_primary (0x20000 - 128kB): &lt;br /&gt;+--------------------------------------------+ &lt;br /&gt;| 0x20000000: sram_primary (0x20000 - 128kB) | &lt;br /&gt;+--------------------------------------------+&lt;/p&gt;
&lt;p&gt;PS C:\Virtuix\nordic\myapps\hello_world_dfu_833DK_ext_flash\build&amp;gt;&lt;br /&gt;&lt;br /&gt;What I am missing?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8463.hello_5F00_world_5F00_dfu_5F00_833DK_5F00_ext_5F00_flash.zip"&gt;devzone.nordicsemi.com/.../8463.hello_5F00_world_5F00_dfu_5F00_833DK_5F00_ext_5F00_flash.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/416980?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 08:41:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26237484-f915-47f3-981b-0f207f826e61</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You should use both alias and chosen, ref:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ { 	
	aliases 
	{ spi-flash0 = &amp;amp;is25lp080d; }; 
	chosen 
	{ nordic,pm-ext-flash = &amp;amp;is25lp080d; }; 
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Looks like nRF52840DK already have the spi-flash0 defined in the board file:&lt;br /&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts#L129"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts#L129&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Well spotted this was the problem!&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/416639?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 17:39:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8ac5ca3-bcb0-4a1c-a854-ef20c6bf4a8b</guid><dc:creator>Bryan</dc:creator><description>&lt;p&gt;Kenneth,&lt;/p&gt;
&lt;p&gt;I keep getting shifted onto other tasks.&amp;nbsp; Sorry for the delay.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span&gt;CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y&amp;nbsp; was not the root cause.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I ported the&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/tests/drivers/flash"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/tests/drivers/flash&lt;/a&gt;&amp;nbsp;project to the nRF52833DK with the external SPI NOR Flash wired to it and got it working.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***&lt;br /&gt;Running TESTSUITE flash_driver&lt;br /&gt;===================================================================&lt;br /&gt;START - test_read_unaligned_address&lt;br /&gt; PASS - test_read_unaligned_address in 0.047 seconds&lt;br /&gt;===================================================================&lt;br /&gt;TESTSUITE flash_driver succeeded&lt;/p&gt;
&lt;p&gt;------ TESTSUITE SUMMARY START ------&lt;/p&gt;
&lt;p&gt;SUITE PASS - 100.00% [flash_driver]: pass = 1, fail = 0, skip = 0, total = 1 duration = 0.047 seconds&lt;br /&gt; - PASS - [flash_driver.test_read_unaligned_address] duration = 0.047 seconds&lt;/p&gt;
&lt;p&gt;------ TESTSUITE SUMMARY END ------&lt;/p&gt;
&lt;p&gt;===================================================================&lt;br /&gt;PROJECT EXECUTION SUCCESSFUL&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;I can confirm it is working by simply lifting the power pin to the SPI NOR Flash.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;E: Device id ff ff ff does not match config 9d 60 14&lt;br /&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***&lt;br /&gt;Running TESTSUITE flash_driver&lt;br /&gt;===================================================================&lt;/p&gt;
&lt;p&gt;Assertion failed at ../src/main.c:59: flash_driver_setup: device_is_ready(flash_dev) is false&lt;/p&gt;
&lt;p&gt;START - test_read_unaligned_address&lt;br /&gt; FAIL - test_read_unaligned_address in 0.001 seconds&lt;br /&gt;===================================================================&lt;br /&gt;TESTSUITE flash_driver failed.&lt;/p&gt;
&lt;p&gt;------ TESTSUITE SUMMARY START ------&lt;/p&gt;
&lt;p&gt;SUITE FAIL - 0.00% [flash_driver]: pass = 0, fail = 1, skip = 0, total = 1 duration = 0.001 seconds&lt;br /&gt; - FAIL - [flash_driver.test_read_unaligned_address] duration = 0.001 seconds&lt;/p&gt;
&lt;p&gt;------ TESTSUITE SUMMARY END ------&lt;/p&gt;
&lt;p&gt;===========================&lt;/p&gt;
&lt;p&gt;I now have the nRF52833DK with external SPI NOR flash working, too.&amp;nbsp; The key was to use the exact same nrf52833dk_nrf52833.overlay file from the flash test above in /boards and /child_image/mcuboot/boards.&lt;/p&gt;
&lt;p&gt;The only difference between what works and what caused issues is the first five lines in the overlay file.&lt;/p&gt;
&lt;p&gt;from the flash test that works&lt;/p&gt;
&lt;p&gt;/ {&lt;br /&gt;&amp;nbsp; &amp;nbsp; aliases {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;spi-flash0 = &amp;amp;is25lp080d;&lt;br /&gt;&amp;nbsp; &amp;nbsp; };&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;what I was trying to use, which was based on the nRF52840DK external flash overlay file.&lt;br /&gt;/ {&lt;br /&gt;&amp;nbsp; &amp;nbsp; chosen {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;nordic,pm-ext-flash = &amp;amp;is25lp080d;&lt;br /&gt;&amp;nbsp; &amp;nbsp; };&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Kenneth - Two final questions.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp; I am not understanding what it hated about&amp;nbsp;&lt;span&gt;&lt;strong&gt;nordic,pm-ext-flash = &amp;amp;is25lp080d; &lt;/strong&gt;This is the exact syntax used in the&amp;nbsp;hello_world_dfu_840DK_ext_flash project overlay files.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2.&amp;nbsp; I used spi-flash0 in the flash test because it was the exact same syntax as /boards/nrf52840dk_mx25l51245g.overlay&lt;/p&gt;
&lt;p&gt;I honestly didn&amp;#39;t expect it to work in the DFU project.&amp;nbsp; It seems that spi-flash0 is&amp;nbsp;standard label in Zephyr to define a external spi flash device.&amp;nbsp; It is used in a lot of zephyr/boards/*.dts files.&amp;nbsp; Am I understanding this correctly?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I have attached all three of the projects for everyone&amp;#39;s reference.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/hello_5F00_world_5F00_dfu_5F00_840DK_5F00_ext_5F00_flash.zip"&gt;devzone.nordicsemi.com/.../hello_5F00_world_5F00_dfu_5F00_840DK_5F00_ext_5F00_flash.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6153.flash.zip"&gt;devzone.nordicsemi.com/.../6153.flash.zip&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/hello_5F00_world_5F00_dfu_5F00_833DK_5F00_ext_5F00_flash.zip"&gt;devzone.nordicsemi.com/.../hello_5F00_world_5F00_dfu_5F00_833DK_5F00_ext_5F00_flash.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/415120?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 10:27:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6aabcd01-dea2-4d64-ba04-ed77b536188e</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I found 4 other cases with similar error message, I am linking it here it in case it can be of help?&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/94313/mcuboot-runtime-error-cannot-upgrade-not-a-compatible-amount-of-sectors-with-external-flash-on-nrf9160"&gt;MCUBoot runtime error: &amp;quot;Cannot upgrade: not a compatible amount of sectors&amp;quot; with external flash on nrf9160&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/97256/mcuboot-zephyr-and-static-partition-manager"&gt;MCUBoot, Zephyr, and static partition manager&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/92762/mcuboot-fails-to-load-if-using-cmake-overlay-config"&gt;MCUBoot fails to load if using CMake Overlay Config&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/81563/device-firmware-update-dfu-with-mcuboot-bootloader-showing-failed-reading-sectors-boot_max_img_sectors-128---too-small"&gt;Device Firmware Update (DFU) with MCUBoot bootloader showing Failed reading sectors; BOOT_MAX_IMG_SECTORS=128 - too small?&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Wild guess, can you try:&lt;br /&gt;&lt;span&gt;CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/415010?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 19:35:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65dc19a7-e190-4feb-bf3c-abe7f940a2bb</guid><dc:creator>Bryan</dc:creator><description>&lt;p&gt;Kenneth,&lt;/p&gt;
&lt;p&gt;I took the flash app you provided and modified it for the nRF52833DK with the ISSI&amp;nbsp;is25lp080d SPI NOR flash.&amp;nbsp; After a lot of experimental changes it is now passing.&amp;nbsp; This shows that the flash is connected properly and can be read/written.&amp;nbsp; I attached flash.zip for reference for everyone.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/tests/drivers/flash"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/tests/drivers/flash&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;ncs\v2.2.0\zephyr\tests\drivers\flash&lt;/p&gt;
&lt;p&gt;The key modifications were:&lt;/p&gt;
&lt;p&gt;* delete testcase.yaml&lt;/p&gt;
&lt;p&gt;* Modify the contents of the overlay file.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;/&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;aliases&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;spi-flash0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;is25lp080d&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;pinctrl&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;spi1_default:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;spi1_default&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;group1&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;psels&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SPIM_SCK&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;23&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SPIM_MOSI&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;21&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SPIM_MISO&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;22&lt;/span&gt;&lt;span&gt;)&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;spi1_sleep:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;spi1_sleep&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;group1&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;psels&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SPIM_SCK&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;23&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SPIM_MOSI&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;21&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SPIM_MISO&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;22&lt;/span&gt;&lt;span&gt;)&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;low-power-enable&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;spi1&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;compatible&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;nordic,nrf-spim&amp;quot;&lt;/span&gt;&lt;span&gt;;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; added&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;okay&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;cs-gpios&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;gpio0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;20&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;GPIO_ACTIVE_LOW&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;pinctrl-0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;spi1_default&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;pinctrl-1&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;spi1_sleep&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;pinctrl-names&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;default&amp;quot;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;&amp;quot;sleep&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;is25lp080d:is25lp080d&lt;/span&gt;&lt;span&gt;@&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;// &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.2.0/zephyr/build/dts/api/bindings/mtd/jedec,spi-nor.html"&gt;developer.nordicsemi.com/.../jedec,spi-nor.html&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;compatible&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;jedec,spi-nor&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;reg&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;spi-max-frequency&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;0x50000000&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;// see is25lp080d datasheet Section 8.29 for jedec-id&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;jedec-id&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; [ &lt;/span&gt;&lt;span&gt;9D&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;60&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;14&lt;/span&gt;&lt;span&gt; ];&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;nbsp; added&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;size&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&lt;span&gt; &amp;lt;8388608&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&amp;gt;; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;// 8 Mbits&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Notes from getting it working.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;1.&amp;nbsp; Required added&amp;nbsp;&amp;nbsp;compatible&amp;nbsp;=&amp;nbsp;&amp;quot;nordic,nrf-spim&amp;quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;2.&amp;nbsp; The jedec-id is required.&amp;nbsp; I modified&amp;nbsp;it to an incorrect value and the test fails.&amp;nbsp; Confirm it is correct.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;3.&amp;nbsp; The sfdp-bfp field (used on the nRF52840DK external flash example) is not required (at least for this part) and is&amp;nbsp;grossly over complex to implement.&amp;nbsp; If you get a single bit incorrect, it won&amp;#39;t work.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***&lt;br /&gt;Running TESTSUITE flash_driver&lt;br /&gt;===================================================================&lt;br /&gt;START - test_read_unaligned_address&lt;br /&gt; PASS - test_read_unaligned_address in 0.047 seconds&lt;br /&gt;===================================================================&lt;br /&gt;TESTSUITE flash_driver succeeded&lt;/div&gt;
&lt;p&gt;------ TESTSUITE SUMMARY START ------&lt;/p&gt;
&lt;p&gt;SUITE PASS - 100.00% [flash_driver]: pass = 1, fail = 0, skip = 0, total = 1 duration = 0.047 seconds&lt;br /&gt; - PASS - [flash_driver.test_read_unaligned_address] duration = 0.047 seconds&lt;/p&gt;
&lt;p&gt;------ TESTSUITE SUMMARY END ------&lt;/p&gt;
&lt;p&gt;===================================================================&lt;br /&gt;PROJECT EXECUTION SUCCESSFUL&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;=================================================================&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now that I know the flash is hooked up correctly and can talk to it, I integrated they overlay file it into my nRF52833 DK -based &amp;quot;hello world dfu&amp;quot; project.&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The only modification I did was to&amp;nbsp;both (/boards and /child_image/mcuboot/boards)&amp;nbsp;both nrf52833dk_nrf52833.overlay files to use the below for dfu&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;/&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;chosen&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;nordic,pm-ext-flash&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;is25lp080d&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Instead of the below used for the flash test&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;/&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;aliases&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;spi-flash0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;is25lp080d&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;When I flash the board, I got this error.&lt;br /&gt;&lt;br /&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***&lt;br /&gt;I: Starting bootloader&lt;br /&gt;W: Failed reading sectors; BOOT_MAX_IMG_SECTORS=256 - too small?&lt;br /&gt;W: Cannot upgrade: not a compatible amount of sectors&lt;br /&gt;I: Bootloader chainload address offset: 0xf000&lt;br /&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***&lt;br /&gt;Hello World 1! nrf52833dk_nrf52833&lt;br /&gt;&lt;br /&gt;If I increase&amp;nbsp;CONFIG_BOOT_MAX_IMG_SECTORS=512, one error goes away.&lt;br /&gt;&lt;br /&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***&lt;br /&gt;I: Starting bootloader&lt;br /&gt;W: Cannot upgrade: not a compatible amount of sectors&lt;br /&gt;I: Bootloader chainload address offset: 0xf000&lt;br /&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***&lt;br /&gt;Hello World 1! nrf52833dk_nrf52833&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_BOOT_MAX_IMG_SECTORS is a setting from the nrf52840 DK serial DFU&amp;nbsp; external flash example that I based this project on.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://github.com/simon-iversen/sdk-zephyr/tree/serial_dfu_ext_flash_hello_world/samples/hello_world"&gt;https://github.com/simon-iversen/sdk-zephyr/tree/serial_dfu_ext_flash_hello_world/samples/hello_world&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1.&amp;nbsp; I can not find a reference to what &lt;span&gt;CONFIG_BOOT_MAX_IMG_SECTORS&amp;nbsp;&lt;/span&gt; does and how it interacts with other settings.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp; &amp;quot;not a compatible amount of sectors&amp;quot;.&amp;nbsp; What is a &amp;quot;compatible amount of sectors&amp;quot;?&amp;nbsp; Please explain.&amp;nbsp;&lt;span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;3. I thought the source of the issues is the fact that I don&amp;#39;t have a pm_static.yaml like in the above serial dfu with external flash example I reference above.&amp;nbsp; Contents of pm_static.yaml&lt;/p&gt;
&lt;p&gt;external_flash:&lt;br /&gt;&amp;nbsp; address: 0xf4000&lt;br /&gt;&amp;nbsp; end_address: 0x800000&lt;br /&gt;&amp;nbsp; region: external_flash&lt;br /&gt;&amp;nbsp; size: 0x70c000&lt;/p&gt;
&lt;p&gt;mcuboot_secondary:&lt;br /&gt;&amp;nbsp; address: 0x00000&lt;br /&gt;&amp;nbsp; device: MX25R64&lt;br /&gt;&amp;nbsp; end_address: 0xf4000&lt;br /&gt;&amp;nbsp; region: external_flash&lt;br /&gt;&amp;nbsp; size: 0xf4000&lt;/p&gt;
&lt;p&gt;This matches the output of:&lt;/p&gt;
&lt;p&gt;PS C:\Virtuix\nordic\myapps\hello_world\build&amp;gt; west build -t partition_manager_report&lt;br /&gt;-- west build: running target partition_manager_report&lt;br /&gt;[1/1] cmd.exe /C &amp;quot;cd /D C:\Virtuix\nordic\myapps\hello_world\b...put C:/Virtuix/nordic/myapps/hello_world/build/partitions.yml&amp;quot; external_flash (0x800000 - 8192kB): &lt;br /&gt;+---------------------------------------------+&lt;br /&gt;| 0x0: mcuboot_secondary (0xf4000 - 976kB) |&lt;br /&gt;| 0xf4000: external_flash (0x70c000 - 7216kB) |&lt;br /&gt;+---------------------------------------------+&lt;/p&gt;
&lt;p&gt;flash_primary (0x100000 - 1024kB): &lt;br /&gt;+-------------------------------------------------+&lt;br /&gt;| 0x0: mcuboot (0xc000 - 48kB) |&lt;br /&gt;+---0xc000: mcuboot_primary (0xf4000 - 976kB)-----+&lt;br /&gt;| 0xc000: mcuboot_pad (0x200 - 512B) |&lt;br /&gt;+---0xc200: mcuboot_primary_app (0xf3e00 - 975kB)-+&lt;br /&gt;| 0xc200: app (0xf3e00 - 975kB) |&lt;br /&gt;+-------------------------------------------------+&lt;/p&gt;
&lt;p&gt;sram_primary (0x40000 - 256kB): &lt;br /&gt;+--------------------------------------------+&lt;br /&gt;| 0x20000000: sram_primary (0x40000 - 256kB) |&lt;br /&gt;+--------------------------------------------+&lt;/p&gt;
&lt;p&gt;I then attempted to create my own pm_static.yaml&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;external_flash&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;span&gt;address&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;0x71000&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;span&gt;end_address&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;0x100000&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;span&gt;region&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;external_flash&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;span&gt;size&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;0x8f000&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;mcuboot_secondary&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;span&gt;address&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;0x00000&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;span&gt;device&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;is25lp080d&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;span&gt;end_address&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;0x8f000&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;span&gt;region&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;external_flash&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;span&gt;size&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;0x8f000&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Again based off the output of&lt;/div&gt;
&lt;div&gt;PS C:\Virtuix\nordic\myapps\hello_world_dfu\build_nrf52833dk_nrf52833&amp;gt; west build -t partition_manager_report&lt;br /&gt;-- west build: running target partition_manager_report&lt;br /&gt;[1/1] cmd.exe /C &amp;quot;cd /D C:\Virtuix\nordic\myapps\hello_world_...pps/hello_world_dfu/build_nrf52833dk_nrf52833/partitions.yml&amp;quot; &lt;br /&gt; external_flash (0x100000 - 1024kB):&lt;br /&gt;+-------------------------------------------+&lt;br /&gt;| 0x0: mcuboot_secondary (0x71000 - 452kB) |&lt;br /&gt;PS C:\Virtuix\nordic\myapps\hello_world_dfu\build_nrf52833dk_nrf52833&amp;gt; west build -t partition_manager_report&lt;br /&gt;-- west build: running target partition_manager_report&lt;br /&gt;[1/1] cmd.exe /C &amp;quot;cd /D C:\Virtuix\nordic\myapps\hello_world_...pps/hello_world_dfu/build_nrf52833dk_nrf52833/partitions.yml&amp;quot; &lt;br /&gt; external_flash (0x100000 - 1024kB): &lt;br /&gt;+-------------------------------------------+&lt;br /&gt;| 0x0: mcuboot_secondary (0x71000 - 452kB) |&lt;br /&gt;| 0x71000: external_flash (0x8f000 - 572kB) |&lt;br /&gt;+-------------------------------------------+&lt;br /&gt;&lt;br /&gt; flash_primary (0x80000 - 512kB):&lt;br /&gt;+-------------------------------------------------+&lt;br /&gt;| 0x0: mcuboot (0xf000 - 60kB) |&lt;br /&gt;+---0xf000: mcuboot_primary (0x71000 - 452kB)-----+&lt;br /&gt;| 0xf000: mcuboot_pad (0x200 - 512B) |&lt;br /&gt;+---0xf200: mcuboot_primary_app (0x70e00 - 451kB)-+&lt;br /&gt;| 0xf200: app (0x70e00 - 451kB) |&lt;br /&gt;+-------------------------------------------------+&lt;br /&gt;&lt;br /&gt; sram_primary (0x20000 - 128kB):&lt;br /&gt;+--------------------------------------------+&lt;br /&gt;| 0x20000000: sram_primary (0x20000 - 128kB) |&lt;br /&gt;+--------------------------------------------+&lt;br /&gt;&lt;br /&gt;I still get the same output.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***&lt;br /&gt;I: Starting bootloader&lt;br /&gt;W: Cannot upgrade: not a compatible amount of sectors&lt;br /&gt;I: Bootloader chainload address offset: 0xf000&lt;br /&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***&lt;br /&gt;Hello World 1! nrf52833dk_nrf52833&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;There is something I am simply not understanding.&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/hello_5F00_world_5F00_dfu_5F00_13_5F00_3_5F00_23.zip"&gt;devzone.nordicsemi.com/.../hello_5F00_world_5F00_dfu_5F00_13_5F00_3_5F00_23.zip&lt;/a&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/flash.zip"&gt;devzone.nordicsemi.com/.../flash.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/414599?ContentTypeID=1</link><pubDate>Fri, 10 Mar 2023 11:31:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eca48dc9-4cc2-430e-8483-57e22b6ddc19</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;For testing can you first try to make the flash test driver to work?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/tests/drivers/flash"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/tests/drivers/flash&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In your case&amp;nbsp;that&amp;nbsp;want to use spi you can find these two files relevant:&lt;br /&gt;&lt;span&gt;boards/nrf52840dk_flash_spi.conf&lt;/span&gt;&lt;br /&gt;&lt;span&gt;boards/nrf52840dk_mx25r_high_perf.overlay &lt;br /&gt;(remove the&amp;nbsp;&lt;/span&gt;&lt;span&gt;mxicy,mx25r-power-mode&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&amp;quot;high-performance&amp;quot;&lt;/span&gt;&lt;span&gt;; in your case from the .overlay)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;By modifying the .overlay file you should hopefully relatively quickly find configuration that works.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/414502?ContentTypeID=1</link><pubDate>Thu, 09 Mar 2023 22:34:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a880ffc-b518-49bb-8406-6315a1af4567</guid><dc:creator>Bryan</dc:creator><description>&lt;p&gt;I have wired up the SPI NOR flash and added the sfdp-bfp into both overlay files&lt;/p&gt;
&lt;p&gt;* boards\nrf52833dk_nrf52833.overlay&lt;/p&gt;
&lt;p&gt;*&amp;nbsp;child_image\mcuboot\boards&lt;span&gt;\&lt;/span&gt;&lt;span&gt;nrf52833dk_nrf52833.overlay&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;However, I am still seeing issues around the conf settings in prj.conf and&amp;nbsp;&lt;span&gt;child_image\mcuboot\boards&lt;/span&gt;&lt;span&gt;\&lt;/span&gt;&lt;span&gt;nrf52833dk_nrf52833.conf&lt;/span&gt;&lt;/p&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&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;p&gt;&lt;strong&gt;warning: SPI_NOR (defined at drivers/flash/Kconfig.nor:4) was assigned the value &amp;#39;y&amp;#39; but got the&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;value &amp;#39;n&amp;#39;. Check these unsatisfied dependencies: DT_HAS_JEDEC_SPI_NOR_ENABLED (=n). See&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;a href="http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SPI_NOR"&gt;docs.zephyrproject.org/.../kconfig.html&lt;/a&gt; and/or look up SPI_NOR in the&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values,&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;and Kconfig - Tips and Best Practices sections of the manual might be helpful too.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It still builds, but when it boots...&lt;/p&gt;
&lt;p&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***&lt;br /&gt;I: Starting bootloader&lt;br /&gt;W: Failed reading sectors; BOOT_MAX_IMG_SECTORS=256 - too small?&lt;br /&gt;W: Cannot upgrade: not a compatible amount of sectors&lt;br /&gt;E: Unable to determine flash sector of the image trailer&lt;br /&gt;E: Image in the primary slot is not valid!&lt;br /&gt;E: Unable to find bootable image&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/414443?ContentTypeID=1</link><pubDate>Thu, 09 Mar 2023 15:26:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e9b65dc-8af8-4feb-87a8-5905ad7ee174</guid><dc:creator>Bryan</dc:creator><description>&lt;p&gt;Kenneth,&lt;/p&gt;
&lt;p&gt;You are a genius!&amp;nbsp; I started digging when you focused me&amp;nbsp;on MULTITHREADING and I found this reference online in a prj.conf file.&amp;nbsp; This resolved the error.&lt;br /&gt;&lt;br /&gt;# If you don&amp;#39;t add this when setting CONFIG_SPI=y, you&amp;#39;ll get a lot of undefined references&amp;nbsp;&lt;br /&gt;# from the nrfx spim driver E.G. &amp;quot;undefined reference to `z_impl_k_sleep&amp;#39;&amp;quot;&lt;br /&gt;CONFIG_MULTITHREADING=y&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/414419?ContentTypeID=1</link><pubDate>Thu, 09 Mar 2023 14:51:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cca850cb-a29e-4038-930f-0e4e51b2fc1a</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I did not have time to look into this today, and I am out of office tomorrow. The undefined reference to `z_impl_k_sem_give&amp;#39; error seems to be related to&amp;nbsp;&lt;span&gt;MULTITHREADING is not enabled? Maybe try to delete your build folder and build again.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/414262?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2023 23:21:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24dc9155-30e1-42d5-b414-302a9c60e59e</guid><dc:creator>Bryan</dc:creator><description>&lt;p&gt;I finally am getting back to this ticket.&amp;nbsp; Here is what I have done.&lt;br /&gt;&lt;br /&gt;1.&amp;nbsp; The &amp;quot;hello world&amp;quot; DFU over BLE using internal flash is working on the &lt;strong&gt;nRF52833 DK&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;2. I then ported the project to the &lt;strong&gt;nRF52840 DK&lt;/strong&gt; to use it&amp;#39;s external QSPI flash.&amp;nbsp; This is also working.&lt;/p&gt;
&lt;p&gt;3. Now I am trying to add an external SPI flash device on a breakout board to the &lt;strong&gt;nRF52833 DK&lt;/strong&gt; to prove it will work.&amp;nbsp; The SPI NOR flash I am using is the ISSI&amp;nbsp;IS25LP080D.&lt;br /&gt;&lt;a href="https://www.issi.com/WW/pdf/25LP-WP080D-040D-020D.pdf"&gt;www.issi.com/.../25LP-WP080D-040D-020D.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From item #2 above I modified...&lt;/p&gt;
&lt;p&gt;Both of these overlay files update the SPI bus (identical content in both files)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;/boards/nrf52833dk_nrf52833.overlay&lt;/li&gt;
&lt;li&gt;/child_image/mcuboot/boards/nrf52833dk_nrf52833.overlay&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both of the these conf files&amp;nbsp;have these lines added to switch&amp;nbsp;from QSPI to SPI&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;prj.conf&lt;/li&gt;
&lt;li&gt;/child_image/mcuboot/boards/nrf52833dk_nrf52833.conf&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt;# Additions for DFU external flash&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt;CONFIG_FLASH&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt;CONFIG_SPI&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt;CONFIG_SPI_NOR&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;hr /&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;I am seeing two things that are odd.&amp;nbsp; CONFIG_SPI_NOR in both .conf files has the red/orange squiggly lines under it.&amp;nbsp; When I highlight it says:&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;br /&gt;&lt;strong&gt;CONFIG_SPI_NOR was assigned the value y, but got the value n. Missing dependencies:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;DT_HAS_JEDEC_SPI_NOR_ENABLED&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;a id="" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html&lt;/a&gt;&amp;nbsp; and searching for&amp;nbsp;&amp;quot;CONFIG_SPI_NOR&amp;quot; shows does have&amp;nbsp;&lt;span&gt;DT_HAS_JEDEC_SPI_NOR_ENABLED as a dependency.&lt;br /&gt;&lt;br /&gt;However in my build directory both of the .config files shows&amp;nbsp;CONFIG_DT_HAS_JEDEC_SPI_NOR_ENABLED=y&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;build_nrf52833dk_nrf52833/mcuboot/zephyr/.config&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;build_nrf52833dk_nrf52833/zephyr/.config&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;br /&gt;I suspect this is the root cause of the build error I am getting, but the message doesn&amp;#39;t give any real detail.&lt;br /&gt;c:/users/bryan/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: zephyr/drivers/spi/libdrivers__spi.a(spi_nrfx_spi.c.obj): in function `k_sem_give&amp;#39;:&lt;br /&gt;C:\Virtuix\nordic\myapps\hello_world_dfu\build_nrf52833dk_nrf52833\mcuboot\zephyr\include\generated\syscalls\kernel.h:1071: undefined reference to `z_impl_k_sem_give&amp;#39;&lt;br /&gt;&lt;br /&gt;I have attached my hello_world_dfu project for reference.&amp;nbsp; The build output log is saved in the root directory (build_output.txt).&amp;nbsp; I appreciate any help!&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/hello_5F00_world_5F00_dfu.zip"&gt;devzone.nordicsemi.com/.../hello_5F00_world_5F00_dfu.zip&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/412810?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 16:04:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:839a0243-718e-4c67-890a-c0e7bbc6611a</guid><dc:creator>Bryan</dc:creator><description>&lt;p&gt;Thanks for the feedback.&amp;nbsp; I think spinning a breakout board and testing with the nRF52833 DK is the best way to go, too.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/412808?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 15:51:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4b19422-8d2d-4c7a-afac-fafacc699e63</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I think getting a breakout board as suggested is&amp;nbsp;a good option to debug/verify this works. The breakout board can be done with a different package type.&lt;/p&gt;
&lt;p&gt;That said, I do believe you should be able to make this work. The spi_nor driver is pretty generic.&lt;/p&gt;
&lt;p&gt;In terms of how to switch between internal flash, spi flash and qspi flash you can find the driver test for the flash module useful:&lt;br /&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/tests/drivers/flash"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/tests/drivers/flash&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In your case&amp;nbsp;that&amp;nbsp;want to use spi you can find these two files relevant:&lt;br /&gt;&lt;span&gt;boards/nrf52840dk_flash_spi.conf&lt;/span&gt;&lt;br /&gt;&lt;span&gt;boards/nrf52840dk_mx25r_high_perf.overlay&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;By modifying the .overlay file you should hopefully relatively quickly find configuration that works.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Edit, here are the properties that can be set:&lt;br /&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/dts/bindings/mtd/jedec%2Cspi-nor.yaml"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/dts/bindings/mtd/jedec%2Cspi-nor.yaml&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/dts/bindings/mtd/jedec%2Cspi-nor-common.yaml"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/dts/bindings/mtd/jedec%2Cspi-nor-common.yaml&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;Properties supporting Zephyr spi-nor flash driver (over the Zephyr SPI&amp;nbsp;API) control of serial flash memories using the standard M25P80-based&amp;nbsp;command set.&amp;quot;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS DFU Supported External Flash Devices</title><link>https://devzone.nordicsemi.com/thread/412597?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 18:16:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c31d7ae-a5cf-4b4d-b0a8-dff64e7f7f37</guid><dc:creator>nordicator_prim3</dc:creator><description>&lt;p&gt;Hi Bryan,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is not an answer to your question but just a tip on what else to look for when trying to find a compatible external flash.&lt;/p&gt;
&lt;p&gt;- Make sure if you&amp;#39;re going to use QSPI that the quad enable bit is at one of the supported registers. The options are shown in &amp;quot;jedec,jesd216.yaml&amp;quot; dts binding file. The options are: &amp;quot;S2B1v1&amp;quot;, &amp;quot;S1B6&amp;quot;, &amp;quot;S2B7&amp;quot;, &amp;quot;S2B1v4&amp;quot;, &amp;quot;S2B1v5&amp;quot;, &amp;quot;S2B1v6&amp;quot; where S1B6 would mean the quad enable bit is bit 6 of status register 2. The description in the dts binding file has more information on this.&lt;/p&gt;
&lt;p&gt;- Make sure that the read and write commands the the flash driver uses are supported by the chip you&amp;#39;re looking at. You&amp;#39;ll have to dig through the flash driver or just make sure that the read and write commands on the new chip are the same ones used in the MX25r64.&lt;/p&gt;
&lt;p&gt;Just thought I would chime in with those tips - it was very rough trying to find an external flash chip having had no experience with NOR chips before needing to look for one. That and understanding how the flash drivers from nordic/zephyr work and what their limitations were. I would be scared of spinning up a board without verifying it as you said. Is it an option to get a SOP8 breakout to put the chip on to hook up to a devkit?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.digikey.com/en/products/detail/adafruit-industries-llc/1212/5022800?utm_adgroup=Adapter%2C%20Breakout%20Boards&amp;amp;utm_source=google&amp;amp;utm_medium=cpc&amp;amp;utm_campaign=Shopping_Product_Prototyping%2C%20Fabrication%20Products_NEW&amp;amp;utm_term=&amp;amp;utm_content=Adapter%2C%20Breakout%20Boards&amp;amp;gclid=Cj0KCQiA6fafBhC1ARIsAIJjL8mOXW9DWxr5odwyvOOLTX1pvAM80a7WfErRodEIx46s3zjYh15Hqq4aAsnqEALw_wcB"&gt;https://www.digikey.com/en/products/detail/adafruit-industries-llc/1212/5022800?utm_adgroup=Adapter%2C%20Breakout%20Boards&amp;amp;utm_source=google&amp;amp;utm_medium=cpc&amp;amp;utm_campaign=Shopping_Product_Prototyping%2C%20Fabrication%20Products_NEW&amp;amp;utm_term=&amp;amp;utm_content=Adapter%2C%20Breakout%20Boards&amp;amp;gclid=Cj0KCQiA6fafBhC1ARIsAIJjL8mOXW9DWxr5odwyvOOLTX1pvAM80a7WfErRodEIx46s3zjYh15Hqq4aAsnqEALw_wcB&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Based on what you said about your board being small I&amp;#39;m guessing you&amp;#39;re using the USON form factor though, so that&amp;#39;s gonna be hard to find a breakout board for (and to solder).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Good luck!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>